diff --git a/packages/devui-vue/docs/components/button/buttonGroup.vue b/packages/devui-vue/docs/components/button/buttonGroup.vue deleted file mode 100644 index 9a87aacb9d..0000000000 --- a/packages/devui-vue/docs/components/button/buttonGroup.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - 按钮名称 - - - - - 尺寸:sm - - - 上海 - - 北京 - 深圳 - - - 尺寸:默认 - - - 上海 - - 北京 - 深圳 - - - 尺寸:lg - - - 上海 - - 北京 - 深圳 - - - 与dropdown下拉菜单一起使用 - - - Click Me 1 - - - - Item 1 - - - Item 2 - - - Item 3 - - - Item 4 - - - - - - 上海 - - - Click Me 2 - - - - Item 1 - - - Item 2 - - - Item 3 - - - Item 4 - - - - - - 北京 - - - Click Me 3 - - - - Item 1 - - - Item 2 - - - Item 3 - - - Item 4 - - - - - - - - - diff --git a/packages/devui-vue/docs/components/button/disable.vue b/packages/devui-vue/docs/components/button/disable.vue deleted file mode 100644 index e2e4ceec35..0000000000 --- a/packages/devui-vue/docs/components/button/disable.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Solid Button - - Outline Button - - Text Button - - - - - - Solid Button - - - Outline Button - - - Text Button - - - - diff --git a/packages/devui-vue/docs/components/button/icon.vue b/packages/devui-vue/docs/components/button/icon.vue deleted file mode 100644 index ed6f044414..0000000000 --- a/packages/devui-vue/docs/components/button/icon.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - New - - - Filter - - - Link - - - - Add - - - - - - diff --git a/packages/devui-vue/docs/components/button/index.md b/packages/devui-vue/docs/components/button/index.md index 1b47383b51..4ad82f0c73 100644 --- a/packages/devui-vue/docs/components/button/index.md +++ b/packages/devui-vue/docs/components/button/index.md @@ -2,31 +2,77 @@ 按钮用于开始一个即时操作。 -#### 何时使用 - +:::tip 何时使用 标记了一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。 +::: + +## 用法 ### 形态 -:::demo 通过`variant`设置按钮形态,目前支持`solid`、`outline`、`text`三种形态,默认为`outline`。 +通过`variant`设置按钮形态,目前支持`solid`、`outline`、`text`三种形态,默认为`outline`。 -button/shape +:::demo + +```vue + + + Solid Button + Outline Button + Text Button + + +``` ::: ### 主题色 -:::demo 通过`color`设置按钮的主题色,目前支持`primary`、`secondary`、`danger`三种主题色,默认为`secondary`。注意:如果`variant`设置成`solid`,则默认使用`primary`主题色。 +通过`color`设置按钮的主题色,目前支持`primary`、`secondary`、`danger`三种主题色,默认为`secondary`。注意:如果`variant`设置成`solid`,则默认使用`primary`主题色。 + +:::demo -button/theme +```vue + + + + Primary + Primary + Primary + + + + Secondary + Secondary + Secondary + + + + Danger + Danger + Danger + + + +``` ::: ### 尺寸 -:::demo 通过`size`设置按钮尺寸,支持`sm`、`md`、`lg`三种类型的尺寸,默认为`md`。 +通过`size`设置按钮尺寸,支持`sm`、`md`、`lg`三种类型的尺寸,默认为`md`。 -button/size +:::demo + +```vue + + + Small + Medium + Large + + +``` ::: @@ -34,15 +80,49 @@ button/size :::demo 通过`disabled`参数设置按钮禁用状态。 -button/disable +```vue + + + + Solid Button + Outline Button + Text Button + + + + Solid Button + Outline Button + Text Button + + + +``` ::: ### 加载中状态 -:::demo 通过`loading`参数设置按钮加载中状态。 +通过`loading`参数设置按钮加载中状态。 -button/loading +:::demo + +```vue + + Click Me + + + +``` ::: @@ -50,7 +130,20 @@ button/loading :::demo -button/icon +```vue + + + New + Filter + Link + + Add + + + + + +``` ::: @@ -60,22 +153,97 @@ button/icon :::demo -button/buttonGroup +```vue + + + + 按钮名称 + + + + 尺寸:sm + + 上海 + 北京 + 深圳 + + + 尺寸:默认 + + 上海 + 北京 + 深圳 + + + 尺寸:lg + + 上海 + 北京 + 深圳 + + + 与dropdown下拉菜单一起使用 + + + Click Me 1 + + + Item 1 + Item 2 + Item 3 + Item 4 + + + + 上海 + + Click Me 2 + + + Item 1 + Item 2 + Item 3 + Item 4 + + + + 北京 + + Click Me 3 + + + Item 1 + Item 2 + Item 3 + Item 4 + + + + + + + + +``` ::: ### Button 参数 -| 参数名 | 类型 | 默认 | 说明 | 跳转 Demo | -| :------- | :-------------------------------- | :---------- | :------------------------ | :------------------------ | -| variant | [IButtonVariant](#ibuttonvariant) | 'outline' | 可选,按钮形态 | [形态](#形态) | -| color | [IButtonColor](#ibuttoncolor) | 'secondary' | 可选,按钮主题 | [主题色](#主题色) | -| size | [IButtonSize](#ibuttonsize) | 'md' | 可选,按钮尺寸 | [尺寸](#尺寸) | -| icon | `string` | -- | 可选,自定义按钮图标 | [图标按钮](#图标按钮) | -| shape | [IButtonShape](#ibuttonshape) | -- | 可选,按钮形状(圆形/圆角) | [图标按钮](#图标按钮) | -| disabled | `boolean` | false | 可选,是否禁用 button | [禁用状态](#禁用状态) | -| loading | `boolean` | false | 可选,设置加载中状态 | [加载中状态](#加载中状态) | -| native-type | [IButtonType](#ibuttontype) | 'button' | 可选,按钮原生type属性 | | +| 参数名 | 类型 | 默认 | 说明 | 跳转 Demo | +| :---------- | :-------------------------------- | :---------- | :------------------------ | :------------------------ | +| variant | [IButtonVariant](#ibuttonvariant) | 'outline' | 可选,按钮形态 | [形态](#形态) | +| color | [IButtonColor](#ibuttoncolor) | 'secondary' | 可选,按钮主题 | [主题色](#主题色) | +| size | [IButtonSize](#ibuttonsize) | 'md' | 可选,按钮尺寸 | [尺寸](#尺寸) | +| icon | `string` | -- | 可选,自定义按钮图标 | [图标按钮](#图标按钮) | +| shape | [IButtonShape](#ibuttonshape) | -- | 可选,按钮形状(圆形/圆角) | [图标按钮](#图标按钮) | +| disabled | `boolean` | false | 可选,是否禁用 button | [禁用状态](#禁用状态) | +| loading | `boolean` | false | 可选,设置加载中状态 | [加载中状态](#加载中状态) | +| native-type | [IButtonType](#ibuttontype) | 'button' | 可选,按钮原生 type 属性 | | ### Button 类型定义 diff --git a/packages/devui-vue/docs/components/button/loading.vue b/packages/devui-vue/docs/components/button/loading.vue deleted file mode 100644 index e9c27cc3cd..0000000000 --- a/packages/devui-vue/docs/components/button/loading.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - Click Me - - - - diff --git a/packages/devui-vue/docs/components/button/shape.vue b/packages/devui-vue/docs/components/button/shape.vue deleted file mode 100644 index af6e4c72a3..0000000000 --- a/packages/devui-vue/docs/components/button/shape.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - Solid Button - - Outline Button - - Text Button - - - diff --git a/packages/devui-vue/docs/components/button/size.vue b/packages/devui-vue/docs/components/button/size.vue deleted file mode 100644 index 6205115fa9..0000000000 --- a/packages/devui-vue/docs/components/button/size.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - Small - - Medium - - Large - - - diff --git a/packages/devui-vue/docs/components/button/theme.vue b/packages/devui-vue/docs/components/button/theme.vue deleted file mode 100644 index 8639f578e8..0000000000 --- a/packages/devui-vue/docs/components/button/theme.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - Primary - - - Primary - - - Primary - - - - - - Secondary - - - Secondary - - - Secondary - - - - - - Danger - - - Danger - - - Danger - - - -
尺寸:sm
尺寸:默认
尺寸:lg
与dropdown下拉菜单一起使用