Skip to content

Commit 343f22a

Browse files
authored
feat(docs): 文档增加切换主题提示 (#2024)
1 parent 9739d68 commit 343f22a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

examples/sites/src/views/components/float-settings.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
<script>
9090
import { defineComponent, reactive, toRefs, onMounted, onUnmounted, watch, nextTick, ref } from 'vue'
91-
import { Tooltip, Radio, RadioGroup, Popover } from '@opentiny/vue'
91+
import { Tooltip, Radio, RadioGroup, Popover, Notify } from '@opentiny/vue'
9292
import { iconUpWard } from '@opentiny/vue-icon'
9393
import debounce from '@opentiny/vue-renderless/common/deps/debounce'
9494
import { i18nByKey, useApiMode, useTemplateMode } from '@/tools'
@@ -129,6 +129,17 @@ export default defineComponent({
129129
initBottomVal: null, // 初始底部偏移
130130
isSettingsAside: false // 是否贴边
131131
})
132+
let isShowTip = false
133+
const showTip = () => {
134+
Notify({
135+
type: 'info',
136+
title: '请注意',
137+
message: '主题切换成功,如有部分主题样式不生效,请尝试手动刷新页面即可',
138+
position: 'top-right',
139+
duration: 3000
140+
})
141+
isShowTip = true
142+
}
132143
133144
if (isPlus) {
134145
state.styleSettings = state.styleSettings.filter((item) => item.name !== 'apiMode')
@@ -164,6 +175,10 @@ export default defineComponent({
164175
themeItemClick(node) {
165176
const val = node?.value || 'tiny-smb-theme'
166177
changeTheme(val)
178+
179+
if (!isShowTip) {
180+
showTip()
181+
}
167182
}
168183
}
169184

0 commit comments

Comments
 (0)