Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(site): optimize the overall theme logic of the official website #2109

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions examples/docs/newsrc/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@
</div>
</div>
</tiny-floatbar>
<!-- 切换主题 -->
<tiny-dropdown class="!fixed bottom20 right140" :show-icon="false" @item-click="changeTheme" :disabled="isSaasMode">
<!-- 切换主题 暂时先屏蔽,等后续其他主题验收完成再放出此功能 -->
<tiny-dropdown
v-if="false"
class="!fixed bottom20 right140"
:show-icon="false"
@item-click="changeTheme"
:disabled="isSaasMode"
>
<span title="切换主题">
<SvgTheme></SvgTheme>
</span>
Expand Down Expand Up @@ -152,7 +158,6 @@ import {
import { iconStarActive, iconSelect } from '@opentiny/vue-icon'
import Loading from '@opentiny/vue-loading'
import designSmbConfig from '@opentiny/vue-design-smb'
import designAuroraConfig from '@opentiny/vue-design-aurora'
import designSaasConfig from '@opentiny/vue-design-saas'
import { menuData, demoStr, demoVue, mds, demos } from './resourcePc.js'
import { useTheme, useModeCtx } from './uses'
Expand Down Expand Up @@ -194,7 +199,7 @@ export default {
currMd: hooks.computed(() => mds[`${modeState.pathName}.cn.md`]),
demoLoading: false
})
// hui chart 新增图表类型,新增图表的 api 和原有图表的api 区分开。
// hui chart 新增图表类型,新增图表的 api 和原有图表的api 区分开。
const huiNewChart = ['chart-process']
const fn = {
// 菜单搜索:忽略大小写
Expand Down Expand Up @@ -258,9 +263,10 @@ export default {
modeFn.pushToUrl()
}

// 默认全部使用designSmbConfig,后续验收完毕再调整
const designConfigMap = {
'tiny-smb-theme': designSmbConfig,
'tiny-aurora-theme': designAuroraConfig
'tiny-aurora-theme': designSmbConfig
}

const lastThemeKey = localStorage.getItem('tinyThemeToolkey')
Expand Down
7 changes: 3 additions & 4 deletions examples/docs/newsrc/uses/useTheme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import TinyThemeTool from '@opentiny/vue-theme/theme-tool'
import { tinyAuroraTheme, tinySmbTheme, tinyInfinityTheme } from '@opentiny/vue-theme/theme'
import { hooks } from '@opentiny/vue-common'
import { Notify } from '@opentiny/vue'

Expand All @@ -21,9 +20,9 @@ export function useTheme({ readCacheImmediate = true } = {}) {
const lastThemeKey = localStorage.getItem('tinyThemeToolkey')

const THEME_MAP = {
'tiny-aurora-theme': tinyAuroraTheme,
'tiny-smb-theme': tinySmbTheme,
'tiny-infinity-theme': tinyInfinityTheme
'tiny-aurora-theme': null,
'tiny-smb-theme': null,
'tiny-infinity-theme': null
}

const changeTheme = ({ vm }) => {
Expand Down
18 changes: 9 additions & 9 deletions examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"type": "module",
"version": "1.0.8",
"description": "",
"keywords": [],
"author": "",
"license": "ISC",
"keywords": [],
"files": [
"resources"
],
"dependencies": {
"@opentiny/vue": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-design-aurora": "workspace:~",
"@opentiny/vue-design-saas": "workspace:~",
"@opentiny/vue-design-smb": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-theme-mobile": "workspace:~",
"@opentiny/vue-theme-saas": "workspace:~",
"@opentiny/vue-design-aurora": "workspace:~",
"@opentiny/vue-design-smb": "workspace:~",
"@opentiny/vue-design-saas": "workspace:~",
"sortablejs": "1.15.0"
},
"devDependencies": {
"@playwright/test": "~1.42.0"
},
"files": [
"resources"
]
}
}
}

This file was deleted.

8 changes: 0 additions & 8 deletions examples/sites/demos/pc/app/color/auxiliary-color.spec.js

This file was deleted.

47 changes: 0 additions & 47 deletions examples/sites/demos/pc/app/color/auxiliary-color.vue

This file was deleted.

46 changes: 0 additions & 46 deletions examples/sites/demos/pc/app/color/main-color-composition-api.vue

This file was deleted.

9 changes: 0 additions & 9 deletions examples/sites/demos/pc/app/color/main-color.spec.js

This file was deleted.

53 changes: 0 additions & 53 deletions examples/sites/demos/pc/app/color/main-color.vue

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions examples/sites/demos/pc/app/color/neutral-color.spec.js

This file was deleted.

Loading
Loading