Skip to content

Commit 67a96db

Browse files
authored
fix(site): site provides examples of both SaaS and non-SaaS filter modes (#3827)
1 parent 9737a8e commit 67a96db

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

examples/sites/demos/pc/app/icon/advance-usage-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function click(name) {
113113
.svgs-icon {
114114
cursor: pointer;
115115
transition: all 0.4s;
116-
font-size: 24px;
116+
font-size: 40px;
117117
fill: var(--tv-color-icon-control);
118118
color: var(--tv-color-icon-control);
119119
}

examples/sites/demos/pc/app/icon/advance-usage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default {
138138
.svgs-icon {
139139
cursor: pointer;
140140
transition: all 0.4s;
141-
font-size: 24px;
141+
font-size: 40px;
142142
fill: var(--tv-color-icon-control);
143143
color: var(--tv-color-icon-control);
144144
}

examples/sites/src/components/anchor.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const emit = defineEmits(['link-click'])
2525
// 实例锚点
2626
const demoAnchorLinks = computed(() =>
2727
(props.currentJson?.demos || [])
28-
.filter((demo) => (isSaas ? !demo.hideSaas : true))
28+
.filter((demo) => (isSaas ? !demo.hideSaas : true)) // saas 模式, hideSaas的过滤掉
29+
.filter((demo) => (!isSaas ? !demo.hidePc : true)) // 非saas模式, hidePc的过滤掉
2930
.map((demo) => ({
3031
key: demo.demoId,
3132
title: demo.name[props.langKey],

examples/sites/src/views/components-doc/common.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,12 @@ const loadPage = () => {
324324
demos: $clone(demosJson.demos || []), // 克隆一下,避免保存上次的isOpen
325325
column: demosJson.column || '1' // columns可能为空
326326
}
327+
// saas 和 非saas 模式,展示的demos是不同的
328+
if (isSaas) {
329+
state.currJson.demos = state.currJson.demos.filter((d) => !d.hideSaas)
330+
} else {
331+
state.currJson.demos = state.currJson.demos.filter((d) => !d.hidePc)
332+
}
327333
} else {
328334
state.activeTab = 'api'
329335
// 隐藏tab的头部

0 commit comments

Comments
 (0)