valaxy-theme-yun 0.17.3 → 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
package/layouts/home.vue CHANGED
@@ -10,6 +10,11 @@ const themeConfig = useThemeConfig()
10
10
 
11
11
  const route = useRoute()
12
12
  const isPage = computed(() => route.path.startsWith('/page'))
13
+
14
+ const showNotice = computed(() => {
15
+ const notice = themeConfig.value.notice
16
+ return notice.enable && (isPage.value ? !notice.hideInPages : true)
17
+ })
13
18
  </script>
14
19
 
15
20
  <template>
@@ -25,7 +30,7 @@ const isPage = computed(() => route.path.startsWith('/page'))
25
30
  </template>
26
31
 
27
32
  <YunNotice
28
- v-if="themeConfig.notice.enable"
33
+ v-if="showNotice"
29
34
  :content="themeConfig.notice.content" mt="4"
30
35
  />
31
36
 
package/node/config.ts CHANGED
@@ -39,6 +39,7 @@ export const defaultThemeConfig: ThemeConfig = {
39
39
 
40
40
  notice: {
41
41
  enable: false,
42
+ hideInPages: false,
42
43
  content: '',
43
44
  },
44
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.17.3",
3
+ "version": "0.17.5",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -19,13 +19,13 @@
19
19
  "module": "index.ts",
20
20
  "dependencies": {
21
21
  "@explosions/fireworks": "^0.0.2",
22
- "@iconify-json/ant-design": "^1.1.14",
23
- "@iconify-json/simple-icons": "^1.1.89",
22
+ "@iconify-json/ant-design": "^1.1.15",
23
+ "@iconify-json/simple-icons": "^1.1.90",
24
24
  "animejs": "^3.2.2"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/animejs": "^3.1.12",
28
- "valaxy": "0.17.3",
28
+ "valaxy": "0.17.5",
29
29
  "valaxy-addon-waline": "0.1.1"
30
30
  }
31
31
  }
package/types/index.d.ts CHANGED
@@ -106,6 +106,11 @@ export interface ThemeConfig {
106
106
  */
107
107
  notice: {
108
108
  enable: boolean
109
+ /**
110
+ * @en Hide in /pages/[page]
111
+ * @zh 在 /pages/[page] 中隐藏
112
+ */
113
+ hideInPages?: boolean
109
114
  content: string
110
115
  }
111
116