fix(sites): change demo default mode and delete bulletin (#1049)

* fix(sites): change demo default mode and delete bulletin

* fix(sites): change demo default mode and delete bulletin
This commit is contained in:
gimmyhehe 2023-12-07 14:22:53 +08:00 committed by GitHub
parent 9b9e7130b1
commit 812ed2abf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 7 deletions

View File

@ -16,7 +16,6 @@ import { ConfigProvider, Modal } from '@opentiny/vue'
import { iconClose } from '@opentiny/vue-icon'
import { appData } from './tools'
import useTheme from './tools/useTheme'
import { useBulletin } from './tools/useBulletin.jsx'
export default defineComponent({
name: 'AppVue',
@ -43,9 +42,6 @@ export default defineComponent({
common.renderHeader()
})
const { designConfig } = useTheme()
if (!navigator.webdriver) {
useBulletin()
}
provide('showPreview', (url) => {
previewUrl.value = url

View File

@ -4,8 +4,8 @@ import { $local } from './storage'
const _modeKey = 'tiny-vue-api-mode'
const _demoModeKey = 'tiny-vue-demo-mode'
const apiModeState = reactive({
apiMode: $local[_modeKey] || 'Options',
demoMode: $local[_demoModeKey] || 'single' // 示例展示: default:多示例, single:单示例
apiMode: $local[_modeKey] || 'Composition',
demoMode: $local[_demoModeKey] || 'default' // 示例展示: default:多示例, single:单示例
})
const apiModeFn = {

View File

@ -7,5 +7,15 @@ const baseURL = `${origin}/tiny-vue/zh-CN/os-theme/components/`
export default Config({
testDir: '../sites/demos',
baseURL,
storageState: { origins: [{ origin, localStorage: [{ name: 'tiny-vue-demo-mode', value: 'single' }] }] }
storageState: {
origins: [
{
origin,
localStorage: [
{ name: 'tiny-vue-api-mode', value: 'Composition' },
{ name: 'tiny-vue-demo-mode', value: 'single' }
]
}
]
}
})