+
diff --git a/docs/docs/zh-CN/guide/norms.md b/docs/docs/zh-CN/guide/norms.md
index a29453a4..1c7a3f8e 100644
--- a/docs/docs/zh-CN/guide/norms.md
+++ b/docs/docs/zh-CN/guide/norms.md
@@ -1,2 +1,2 @@
-::: field 开发规范
+::: title 开发规范
:::
diff --git a/docs/docs/zh-CN/guide/problem.md b/docs/docs/zh-CN/guide/problem.md
index a9811627..ddcf1b94 100644
--- a/docs/docs/zh-CN/guide/problem.md
+++ b/docs/docs/zh-CN/guide/problem.md
@@ -1,2 +1,2 @@
-::: field 常见问题
+::: title 常见问题
:::
diff --git a/docs/docs/zh-CN/guide/sandbox.md b/docs/docs/zh-CN/guide/sandbox.md
index 333d1de7..324c8cb4 100644
--- a/docs/docs/zh-CN/guide/sandbox.md
+++ b/docs/docs/zh-CN/guide/sandbox.md
@@ -1,4 +1,4 @@
-::: field 测试
+::: title 测试
:::
::: demo
diff --git a/docs/docs/zh-CN/hooks/useClickOutside.md b/docs/docs/zh-CN/hooks/useClickOutside.md
index 6fdfbf71..fa0a74ff 100644
--- a/docs/docs/zh-CN/hooks/useClickOutside.md
+++ b/docs/docs/zh-CN/hooks/useClickOutside.md
@@ -1,4 +1,4 @@
-::: field useClickOutside
+::: title useClickOutside
:::
```html
@@ -9,5 +9,7 @@
const dropdownRef = (ref < null) | (HTMLElement > null)
const isClickOutside = useClickOutside(dropdownRef)
-watch(isClickOutside, () => {})
+watch(isClickOutside, () => {
+ // do something
+})
```
diff --git a/docs/src/layouts/Layout.vue b/docs/src/layouts/Layout.vue
index 96f9b9a6..cc2e1bff 100644
--- a/docs/src/layouts/Layout.vue
+++ b/docs/src/layouts/Layout.vue
@@ -43,7 +43,7 @@
- 0.2.0
+ 0.2.1
@@ -349,6 +349,7 @@ export default {
position: fixed;
margin-top: 60px;
height: calc(100% - 60px);
+ box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
}
.layui-layout-document > .layui-layout > .layui-body {
diff --git a/docs/src/plugin/common-plugins.ts b/docs/src/plugin/common-plugins.ts
index f82b6a28..364fc83a 100644
--- a/docs/src/plugin/common-plugins.ts
+++ b/docs/src/plugin/common-plugins.ts
@@ -4,7 +4,9 @@ import container from 'markdown-it-container'
import highlight from './highlight'
import snippet from './snippet'
import demo from './demo'
-import createContainer from './create-container'
+import createTitle from './create-title'
+import createBlock from './create-block'
+import createDescribe from './create-describe'
import preWrapper from './pre-wrapper'
const plugins = [
@@ -22,7 +24,9 @@ const plugins = [
md.use(snippet)
.use(preWrapper)
.use(container, 'demo', demo)
- .use(...createContainer('field', '描述信息'))
+ .use(...createBlock('block', '描述信息'))
+ .use(...createTitle('title', '标题信息'))
+ .use(...createDescribe('describe', '描述信息'))
},
}),
] as any
diff --git a/docs/src/plugin/create-block.ts b/docs/src/plugin/create-block.ts
new file mode 100644
index 00000000..5f1b1241
--- /dev/null
+++ b/docs/src/plugin/create-block.ts
@@ -0,0 +1,31 @@
+import container from 'markdown-it-container'
+import type Token from 'markdown-it/lib/token'
+
+type ContainerArgs = [
+ typeof container,
+ string,
+ {
+ render(tokens: Token[], idx: number): string
+ }
+]
+
+export default function createContainer(
+ klass: string,
+ defaultTitle: string
+): ContainerArgs {
+ return [
+ container,
+ klass,
+ {
+ render(tokens, idx) {
+ const token = tokens[idx]
+ const info = token.info.trim().slice(klass.length).trim()
+ if (token.nesting === 1) {
+ return `${info}`
+ } else {
+ return '\n'
+ }
+ },
+ },
+ ]
+}
\ No newline at end of file
diff --git a/docs/src/plugin/create-describe.ts b/docs/src/plugin/create-describe.ts
new file mode 100644
index 00000000..6beb3f9b
--- /dev/null
+++ b/docs/src/plugin/create-describe.ts
@@ -0,0 +1,31 @@
+import container from 'markdown-it-container'
+import type Token from 'markdown-it/lib/token'
+
+type ContainerArgs = [
+ typeof container,
+ string,
+ {
+ render(tokens: Token[], idx: number): string
+ }
+]
+
+export default function createContainer(
+ klass: string,
+ defaultTitle: string
+): ContainerArgs {
+ return [
+ container,
+ klass,
+ {
+ render(tokens, idx) {
+ const token = tokens[idx]
+ const info = token.info.trim().slice(klass.length).trim()
+ if (token.nesting === 1) {
+ return `${info}`
+ } else {
+ return '
\n'
+ }
+ },
+ },
+ ]
+}
\ No newline at end of file
diff --git a/docs/src/plugin/create-container.ts b/docs/src/plugin/create-title.ts
similarity index 100%
rename from docs/src/plugin/create-container.ts
rename to docs/src/plugin/create-title.ts
diff --git a/docs/src/router/zh-CN.ts b/docs/src/router/zh-CN.ts
index 221accab..cfd71a69 100644
--- a/docs/src/router/zh-CN.ts
+++ b/docs/src/router/zh-CN.ts
@@ -56,7 +56,7 @@ const zhCN = [
},
{
path: '/zh-CN/components',
- redirect: '/zh-CN/components/button',
+ redirect: '/zh-CN/components/color',
component: Component,
meta: { title: '组件' },
children: [
diff --git a/docs/src/view/component.vue b/docs/src/view/component.vue
index 27301a46..2620ac34 100644
--- a/docs/src/view/component.vue
+++ b/docs/src/view/component.vue
@@ -1,7 +1,7 @@
-
+