Skip to content

Commit

Permalink
optimize api docs and build:theme script (#1441)
Browse files Browse the repository at this point in the history
* feat(drawer): fit x-design theme

* feat(drawer): add demo and api document for 'tipsProps'

* fix(docs): optimize api type anchor

* fix(build): optimize build:theme script
  • Loading branch information
Huangyilin19 authored Mar 1, 2024
1 parent 0b4ef3c commit a74ec33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/sites/src/views/components/components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@
>
</version-tip>
</td>
<td v-if="!key.includes('slots')">
<td v-if="!key.includes('slots')" @click="handleTypeClick">
<a
v-if="row.typeAnchorName"
:href="`${row.typeAnchorName.indexOf('#') === -1 ? '#' : ''}${row.typeAnchorName}`"
v-html="row.type"
@click="handleTypeClick"
></a>
<span v-else v-html="row.type"></span>
</td>
Expand Down Expand Up @@ -370,7 +369,10 @@ export default defineComponent({
},
// 点击api 区域的type列
handleTypeClick: (ev) => {
changeActiveNames(ev.target.hash, true)
const hash = ev.target.hash
if (hash) {
changeActiveNames(hash, true)
}
},
// 目录列表上的点击
handleAnchorClick: (e, data) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"./*": "./src/*"
},
"scripts": {
"clean": "rimraf dist",
"clean": "rimraf dist src/aurora-theme src/smb-theme",
"build:theme": "gulp build --gulpfile build/gulp-dist.js",
"build": "npm run clean && npm run build:theme && node build/replace-img.js",
"build:fast": "npm run build && npm run release",
Expand Down

0 comments on commit a74ec33

Please sign in to comment.