From 2022c676e269d201acf4e378b699e25659034083 Mon Sep 17 00:00:00 2001 From: GuoJikun Date: Tue, 21 Nov 2023 17:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20docs:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20link=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .markdownlint.json | 5 +- .../src/.vitepress/{config.mjs => config.js} | 0 .../docs/src/.vitepress/config/sidebar.js | 86 +++++++++++-------- packages/docs/src/components/link.md | 43 ++++++++++ 4 files changed, 95 insertions(+), 39 deletions(-) rename packages/docs/src/.vitepress/{config.mjs => config.js} (100%) create mode 100644 packages/docs/src/components/link.md diff --git a/.markdownlint.json b/.markdownlint.json index d373ef6..5e9685b 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -42,7 +42,10 @@ "ivy-drawer", "ivy-tooltip", "ivy-details", - "ivy-tree" + "ivy-tree", + "ivy-link", + "ivy-tag", + "ivy-text" ] } } diff --git a/packages/docs/src/.vitepress/config.mjs b/packages/docs/src/.vitepress/config.js similarity index 100% rename from packages/docs/src/.vitepress/config.mjs rename to packages/docs/src/.vitepress/config.js diff --git a/packages/docs/src/.vitepress/config/sidebar.js b/packages/docs/src/.vitepress/config/sidebar.js index 012a3f6..4f3b4cd 100644 --- a/packages/docs/src/.vitepress/config/sidebar.js +++ b/packages/docs/src/.vitepress/config/sidebar.js @@ -21,48 +21,58 @@ const guide = [ }, ]; +const basic = [ + { + text: "Icon 图标", + link: "/components/icon", + }, + { + text: "Button 按钮", + link: "/components/button", + }, + { + text: "Space 间距", + link: "/components/space", + }, + { + text: "Grid 宫格布局", + link: "/components/grid-layout.md", + }, + { + text: "Row/Col 栅格", + link: "/components/grid", + }, + { + text: "Split 分割面板", + link: "/components/split", + }, + { + text: "Divider 分割线", + link: "/components/divider", + }, + { + text: "AspectRatio 比例容器", + link: "/components/aspect-ratio", + }, + { + text: "Scrollbar 滚动条", + link: "/components/scrollbar", + }, + { + text: "Link 链接", + link: "/components/link", + }, + { + text: "Text 文字", + link: "/components/text", + }, +]; + const components = [ { text: "基础/布局", collapsible: true, - items: [ - { - text: "Icon 图标", - link: "/components/icon", - }, - { - text: "Button 按钮", - link: "/components/button", - }, - { - text: "Space 间距", - link: "/components/space", - }, - { - text: "Grid 宫格布局", - link: "/components/grid-layout.md", - }, - { - text: "Row/Col 栅格", - link: "/components/grid", - }, - { - text: "Split 分割面板", - link: "/components/split", - }, - { - text: "Divider 分割线", - link: "/components/divider", - }, - { - text: "AspectRatio 比例容器", - link: "/components/aspect-ratio", - }, - { - text: "Scrollbar 滚动条", - link: "/components/scrollbar", - }, - ], + items: basic, }, { text: "表单", diff --git a/packages/docs/src/components/link.md b/packages/docs/src/components/link.md new file mode 100644 index 0000000..8f5e82c --- /dev/null +++ b/packages/docs/src/components/link.md @@ -0,0 +1,43 @@ +# Link 链接 + +文字超链接 + +## 基础用法 + +基础的文字链接用法。 + +default +primary +success +warning +danger +info + +## 禁用状态 + +文字链接不可用状态。 + +default +primary +success +warning +danger +info + +## 显示下划线 + +default +primary +success +warning +danger +info + +## Props + +| 属性名 | 说明 | 类型 | 可选值 | 默认值 | +| --------- | ---------------- | --------- | ------------------------------------- | ------ | +| type | 类型 | `string` | `primary/success/warning/danger/info` | - | +| disabled | 禁用 | `boolean` | - | - | +| underline | 下划线 | `boolean` | - | - | +| href | 同 a 标签的 href | `string` | - | - |