Skip to content

Commit

Permalink
fix(docs): fix components number (opentiny#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr authored Jul 19, 2024
1 parent ab8188e commit 6cd4c50
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
34 changes: 17 additions & 17 deletions examples/sites/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-docs",
"version": "3.17.0",
"version": "3.17.1",
"license": "MIT",
"scripts": {
"start": "vite",
Expand All @@ -23,32 +23,33 @@
"dependencies": {
"@opentiny/vue": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-icon-saas": "workspace:~",
"@opentiny/vue-design-aurora": "workspace:~",
"@opentiny/vue-directive": "workspace:~",
"@opentiny/vue-design-smb": "workspace:~",
"@opentiny/vue-design-saas": "workspace:~",
"@opentiny/vue-design-smb": "workspace:~",
"@opentiny/vue-directive": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-icon-saas": "workspace:~",
"@opentiny/vue-repl": "^1.1.2",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-theme-mobile": "workspace:~",
"@opentiny/vue-vite-import": "workspace:~",
"@opentiny/vue-theme-saas": "workspace:~",
"@opentiny/vue-vite-import": "workspace:~",
"@unocss/reset": "0.38.2",
"@vue/repl": "^2.5.5",
"@vueuse/head": "0.7.13",
"github-markdown-css": "^5.1.0",
"highlight.js": "^11.5.1",
"marked": "^4.3.0",
"prismjs": "^1.28.0",
"vue": "^3.3.9",
"sortablejs": "1.15.0",
"tailwindcss": "^3.2.4",
"vue": "^3.3.9",
"vue-i18n": "^9.1.10",
"vue-router": "4.1.5",
"marked": "^4.3.0",
"sortablejs": "1.15.0",
"@opentiny/vue-repl": "^1.1.2"
"vue-router": "4.1.5"
},
"devDependencies": {
"@opentiny-internal/unplugin-virtual-template": "workspace:~",
"@playwright/test": "~1.42.0",
"@types/markdown-it": "^12.2.3",
"@types/node": "^17.0.45",
"@unocss/preset-icons": "^0.38.2",
Expand All @@ -59,7 +60,6 @@
"cross-spawn": "^7.0.3",
"fs-extra": "^10.1.0",
"less": "^4.1.3",
"@playwright/test": "~1.42.0",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.4",
"markdown-it-emoji": "^2.0.2",
Expand All @@ -72,17 +72,17 @@
"prettier": "^2.7.1",
"stylelint": "^14.9.1",
"stylelint-config-standard": "^26.0.0",
"typescript": "^5.0.2",
"unocss": "^0.39.3",
"unplugin-vue-components": "^0.19.9",
"vite-plugin-static-copy": "^0.17.0",
"uslug": "^1.0.4",
"typescript": "^5.0.2",
"vite": "^4.3.8",
"vite-plugin-dynamic-import": "1.5.0",
"vite-plugin-html": "^3.0.0",
"vite-plugin-inspect": "^0.5.0",
"vite-svg-loader": "^3.6.0",
"vite-plugin-md": "0.13.1",
"vite-plugin-dynamic-import": "1.5.0",
"vite-plugin-static-copy": "^0.17.0",
"vite-svg-loader": "^3.6.0",
"vue-tsc": "^1.8.5"
}
}
}
10 changes: 7 additions & 3 deletions examples/sites/src/views/overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,14 @@ export default defineComponent({
getTotalComponentsNum: () => {
let total = 0
cmpMenus.forEach((cmpCategory) => {
if (cmpCategory.key === 'cmp_frame_style') {
total += 2
} else if (cmpCategory.key === 'cmp_table_components') {
if (cmpCategory.key === 'cmp-frame-style') {
// 需要减去色彩、字体、图标
total += cmpCategory.children.length - 3
} else if (cmpCategory.key === 'cmp-table-components') {
total += 1
} else if (cmpCategory.key === 'cmp-chart-components') {
// 需要减去图表说明的4个文档
total += cmpCategory.children.length - 4
} else {
total += cmpCategory.children.length
}
Expand Down

0 comments on commit 6cd4c50

Please sign in to comment.