diff --git a/packages/devui-vue/devui/button/index.ts b/packages/devui-vue/devui/button/index.ts index 91a9eb8d81..d2d44df9a1 100644 --- a/packages/devui-vue/devui/button/index.ts +++ b/packages/devui-vue/devui/button/index.ts @@ -1,21 +1,15 @@ -import type { App } from 'vue' -import Button from './src/button' -import { Loading } from '../loading/index' +import type { App } from 'vue'; +import Button from './src/button'; -Button.install = function (app: App) { - app.directive('dLoading', Loading) - app.component(Button.name, Button) -} +export * from './src/button-types'; -export * from './src/button-types' - -export { Button } +export { Button }; export default { title: 'Button 按钮', category: '通用', status: '100%', install(app: App): void { - app.use(Button as any) - } -} + app.component(Button.name, Button); + }, +}; diff --git a/packages/devui-vue/devui/button/src/button-types.ts b/packages/devui-vue/devui/button/src/button-types.ts index 81317ec17d..f489e4beb8 100644 --- a/packages/devui-vue/devui/button/src/button-types.ts +++ b/packages/devui-vue/devui/button/src/button-types.ts @@ -1,54 +1,40 @@ -import { ExtractPropTypes, PropType } from 'vue'; +import type { ComputedRef, ExtractPropTypes, PropType } from 'vue'; -export type IButtonType = 'button' | 'submit' | 'reset'; -export type IButtonVariant = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning'; -export type IButtonPosition = 'left' | 'right' | 'default'; +export type IButtonVariant = 'solid' | 'outline' | 'text'; +export type IButtonColor = 'secondary' | 'primary' | 'danger'; export type IButtonSize = 'lg' | 'md' | 'sm' | 'xs'; export const buttonProps = { - type: { - type: String as PropType, - default: 'button' - }, variant: { type: String as PropType, - default: 'primary' + default: 'outline', }, size: { type: String as PropType, - default: 'md' - }, - position: { - type: String as PropType, - default: 'default' + default: 'md', }, - bordered: { - type: Boolean, - default: false + color: { + type: String as PropType, }, icon: { type: String, - default: '' + default: '', }, - showLoading: { + loading: { type: Boolean, - default: false - }, - width: { - type: String, + default: false, }, disabled: { type: Boolean, - default: false - }, - autofocus: { - type: Boolean, - default: false + default: false, }, - onClick: { - type: Function as PropType<(event: MouseEvent) => void> - } } as const; +export type ButtonProps = ExtractPropTypes; -export type ButtonProps = ExtractPropTypes; \ No newline at end of file +export interface UseButtonReturnType { + classes: ComputedRef<{ + [key: string]: string | boolean; + }>; + iconClass: ComputedRef; +} diff --git a/packages/devui-vue/devui/button/src/button.scss b/packages/devui-vue/devui/button/src/button.scss index eb1415eb01..9287577fa1 100644 --- a/packages/devui-vue/devui/button/src/button.scss +++ b/packages/devui-vue/devui/button/src/button.scss @@ -4,303 +4,236 @@ @import '../../style/theme/font'; @import '../../style/theme/corner'; -$devui-btn-loading-color: $devui-text; -$devui-btn-xs-padding: 1px 5px; -$devui-btn-xs-height: 24px; -$devui-btn-icon-xs-min-width: 24px; -$devui-btn-xs-min-width: 48px; -$devui-btn-sm-padding: 1px 15px; -$devui-btn-sm-min-width: 56px; -$devui-btn-icon-sm-min-width: 24px; -$devui-btn-sm-height: 24px; -$devui-btn-min-width: 64px; -$devui-btn-height: 28px; -$devui-btn-padding: 3px 20px; -$devui-btn-lg-padding: 5px 23px; -$devui-btn-lg-min-width: 72px; -$devui-btn-icon-lg-min-width: 32px; -$devui-btn-lg-height: 32px; -$devui-btn-xs-font-size: $devui-font-size-sm; -$devui-btn-sm-font-size: $devui-font-size-sm; -$devui-btn-font-size: $devui-font-size-md; -$devui-btn-lg-font-size: $devui-font-size-lg; -$devui-btn-line-height: $devui-line-height-base; - -$devui-btn-normal-config: ( - text: ( - color: $devui-brand-active, - padding: 0 - ), - text-dark: ( - color: $devui-brand-active, - padding: 0 - ), - common: ( - color: $devui-text, - min-width: $devui-btn-min-width, - background-color: $devui-block, - border-color: $devui-line - ), - stress: ( - color: $devui-light-text, - min-width: $devui-btn-min-width, - background-color: $devui-primary - ), - primary: ( - color: $devui-light-text, - min-width: $devui-btn-min-width, - background-color: $devui-primary - ), - danger: ( - color: $devui-light-text, - min-width: $devui-btn-min-width, - background-color: $devui-contrast - ), - success: ( - color: $devui-dark-text, - min-width: $devui-btn-min-width, - background-color: $devui-success - ), - warning: ( - color: $devui-dark-text, - min-width: $devui-btn-min-width, - background-color: $devui-warning - ), - xs: ( - padding: $devui-btn-xs-padding, - height: $devui-btn-xs-height, - font-size: $devui-btn-xs-font-size, - min-width: $devui-btn-xs-min-width - ), - sm: ( - padding: $devui-btn-sm-padding, - height: $devui-btn-sm-height, - font-size: $devui-btn-sm-font-size, - min-width: $devui-btn-sm-min-width, - ), - lg: ( - padding: $devui-btn-lg-padding, - height: $devui-btn-lg-height, - font-size: $devui-btn-lg-font-size, - min-width: $devui-btn-lg-min-width, - ), - left: ( - border-radius: $devui-border-radius 0 0 $devui-border-radius, - ), - right: ( - border-radius: 0 $devui-border-radius $devui-border-radius 0, - ), - default: ( - border-radius: $devui-border-radius, - ) -); - -$devui-btn-pseudo-config: ( - text: ( - hover: ( - background-color: transparent, - color: $devui-brand-active-focus - ), - focus: ( - background-color: transparent, - color: $devui-brand-active-focus - ), - active: ( - background-color: transparent, - color: $devui-brand-active-focus - ) - ), - text-dark: ( - hover: ( - background-color: transparent, - color: $devui-brand-active-focus - ), - focus: ( - background-color: transparent, - color: $devui-brand-active-focus - ), - active: ( - background-color: transparent, - color: $devui-brand-active-focus - ) - ), - common: ( - hover: ( - border-color: $devui-form-control-line-active, - color: $devui-brand-active - ), - focus: ( - border-color: $devui-form-control-line-active, - color: $devui-brand-active - ), - active: ( - border-color: $devui-form-control-line-active, - color: $devui-brand-active - ) - ), - stress: ( - hover: ( - background-color: $devui-primary-hover - ), - focus: ( - background-color: $devui-primary-hover - ), - active: ( - background-color: $devui-primary-active - ) - ), - primary: ( - hover: ( - background-color: $devui-primary-hover - ), - focus: ( - background-color: $devui-primary-hover - ), - active: ( - background-color: $devui-primary-active - ) - ), - danger: ( - hover: ( - background-color: $devui-contrast-hover - ), - focus: ( - background-color: $devui-contrast-hover - ), - active: ( - background-color: $devui-contrast-active - ) - ), - success: ( - hover: ( - background-color: $devui-success-hover - ), - focus: ( - background-color: $devui-success-hover - ), - active: ( - background-color: $devui-success-active - ) - ), - warning: ( - hover: ( - background-color: $devui-warning-hover - ), - focus: ( - background-color: $devui-warning-hover - ), - active: ( - background-color: $devui-warning-active - ) - ) -); - .devui-btn { - padding: $devui-btn-padding; - font-size: $devui-btn-font-size; - height: $devui-btn-height; - line-height: $devui-btn-line-height; + padding: 0 20px; + font-size: $devui-font-size-md; + height: 28px; + line-height: $devui-line-height-base; + border: none; border-radius: $devui-border-radius; border-width: 1px; - border-color: transparent; background-color: transparent; - @each $type in text, text-dark, common, stress, primary, danger, success, warning, left, right, xs, sm, lg { - &.devui-btn-#{$type} { - @each $key, $value in map-get($devui-btn-normal-config, $type) { - #{$key}: $value; - } - } + + &:hover { + cursor: pointer; } - @each $type in text, text-dark, common, stress, primary, danger, success, warning, { - &.devui-btn-#{$type} { - @each $pseudo, $value in map-get($devui-btn-pseudo-config, $type) { - &:#{$pseudo} { - @each $key, $value2 in map-get(map-get($devui-btn-pseudo-config, $type), $pseudo) { - #{$key}: $value2; - } - } + + &:disabled { + cursor: not-allowed; + } + + &-solid { + color: $devui-light-text; + min-width: 64px; + + &-secondary { + color: $devui-text; + background-color: $devui-dividing-line; + + &:hover { + opacity: 0.8; + } + + &:focus { + opacity: 0.8; + } + + &:active { + opacity: 0.8; + } + + &:disabled { + opacity: 0.8; } } - } - &.devui-btn-common { - &:disabled { - color: $devui-disabled-text; - background: $devui-disabled-bg; - border: 1px solid $devui-disabled-line; + &-primary { + background-color: $devui-primary; + + &:hover { + background-color: $devui-primary-hover; + } + + &:focus { + background-color: $devui-primary-hover; + } + + &:active { + background-color: $devui-primary-active; + } + + &:disabled { + color: $devui-light-text; + background: $devui-primary-disabled; + border: none; + } } - } - &.devui-btn-primary { - &:disabled { - color: $devui-light-text; - background: $devui-primary-disabled; - border: none; + &-danger { + background-color: $devui-contrast; + + &:hover { + background-color: $devui-contrast-hover; + } + + &:focus { + background-color: $devui-contrast-hover; + } + + &:active { + background-color: $devui-contrast-active; + } + + &:disabled { + background-color: $devui-contrast-disabled; + } } } - &.devui-btn-danger { - &:disabled { - color: $devui-disabled-text; - background: $devui-disabled-bg; - border: 1px solid $devui-disabled-line; + &-outline { + background-color: $devui-block; + border-style: solid; + + &-secondary { + color: $devui-text; + border-color: $devui-line; + + &:hover { + color: $devui-brand-active; + border-color: $devui-form-control-line-active; + } + + &:focus { + color: $devui-brand-active; + border-color: $devui-form-control-line-active; + } + + &:active { + color: $devui-brand-active; + border-color: $devui-form-control-line-active; + } + + &:disabled { + color: $devui-disabled-text; + border-color: $devui-disabled-line; + background-color: $devui-disabled-bg; + } } - } - &.devui-btn-text-dark { - &:disabled { - color: $devui-disabled-text; + &-primary { + color: $devui-brand-active; + border-color: $devui-form-control-line-active; + + &:hover { + color: $devui-brand-active-focus; + border-color: $devui-form-control-line-active-hover; + } + + &:focus { + color: $devui-brand-active-focus; + border-color: $devui-form-control-line-active-hover; + } + + &:active { + color: $devui-brand-active-focus; + border-color: $devui-form-control-line-active-hover; + } + + &:disabled { + opacity: 0.8; + } } - } - &.devui-btn-text { - &:disabled { - color: $devui-disabled-text; + &-danger { + color: $devui-contrast; + border-color: $devui-contrast; + + &:hover, + &:focus, + &:active, + &:disabled { + opacity: 0.8; + } } } - &.bordered { - &.devui-btn-common { + &-text { + padding: 0; + + &-secondary { color: $devui-text; - border-color: transparent; - &:hover, + &:hover { + color: $devui-list-item-hover-text; + } + &:focus { - border-color: $devui-primary-hover; + color: $devui-list-item-hover-text; } &:active { - border-color: $devui-primary-active; + color: $devui-list-item-hover-text; } - } - &.devui-btn-stress, - &.devui-btn-primary { - border-color: $devui-brand; - color: $devui-brand; - background-color: $devui-block; + &:disabled { + color: $devui-disabled-text; + } } - &.devui-btn-success { - border-color: $devui-success; - color: $devui-success; - background-color: $devui-block; - } + &-primary { + color: $devui-brand-active; + + &:hover { + color: $devui-brand-active-focus; + } - &.devui-btn-warning { - border-color: $devui-warning; - color: $devui-warning; - background-color: $devui-block; + &:focus { + color: $devui-brand-active-focus; + } + + &:active { + color: $devui-brand-active-focus; + } + + &:disabled { + opacity: 0.8; + } } - &.devui-btn-danger { - border-color: $devui-danger; - color: $devui-danger; - background-color: $devui-block; + &-danger { + color: $devui-contrast; + + &:hover, + &:focus, + &:active, + &:disabled { + opacity: 0.8; + } } } - &.d-btn-icon { + &-xs { + padding: 0 4px; + height: 24px; + font-size: $devui-font-size-sm; + min-width: 48px; + } + + &-sm { + padding: 0 16px; + height: 24px; + font-size: $devui-font-size-sm; + min-width: 56px; + } + + &-lg { + padding: 0 24px; + height: 32px; + font-size: $devui-font-size-lg; + min-width: 72px; + } + + &.devui-btn-icon { &:hover, &:focus { border: 1px solid $devui-list-item-hover-bg; @@ -313,9 +246,8 @@ $devui-btn-pseudo-config: ( } &:not(:disabled) { - &.devui-btn-text, - &.devui-btn-text-dark { - &.d-btn-icon-wrap { + &.devui-btn-text { + &.devui-btn-icon-wrap { color: $devui-text; .devui-icon-fix { @@ -342,39 +274,29 @@ $devui-btn-pseudo-config: ( } } -.devui-btn-host { - display: inline-block; -} - .devui-btn { transition: background-color 0.2s; - border-style: solid; white-space: nowrap; - display: flex; + display: inline-flex; align-items: center; justify-content: center; - &:disabled, - &[disabled] { - cursor: not-allowed; - } - - &.d-btn-icon { - padding: 7px 8px; + &.devui-btn-icon { + padding: 8px; line-height: 1em; border: 1px solid transparent; &.devui-btn-xs, &.devui-btn-sm { - padding: 5px; + padding: 4px; } &.devui-btn-xs { - min-width: $devui-btn-icon-xs-min-width; + min-width: 24px; } &.devui-btn-sm { - min-width: $devui-btn-icon-sm-min-width; + min-width: 24px; } &.devui-btn-lg { @@ -382,11 +304,11 @@ $devui-btn-pseudo-config: ( font-size: $devui-font-size-icon; } - min-width: $devui-btn-icon-lg-min-width; + min-width: 32px; } } - &:not(.d-btn-icon) { + &:not(.devui-btn-icon) { .icon-fix { font-size: $devui-font-size-icon; } @@ -398,20 +320,6 @@ $devui-btn-pseudo-config: ( font-size: $devui-font-size; } -.devui-btn.devui-btn-common:not(:disabled) { - .devui-icon-fix { - color: $devui-text-weak; - } - - &:hover, - &:active, - &:focus { - .devui-icon-fix { - color: $devui-icon-fill-active; - } - } -} - .button-content { display: inline-block; position: relative; diff --git a/packages/devui-vue/devui/button/src/button.tsx b/packages/devui-vue/devui/button/src/button.tsx index 5a08a4c839..58e50f20a8 100644 --- a/packages/devui-vue/devui/button/src/button.tsx +++ b/packages/devui-vue/devui/button/src/button.tsx @@ -1,79 +1,36 @@ -import { computed, defineComponent, ref } from 'vue'; +import { defineComponent, toRefs } from 'vue'; +import type { SetupContext } from 'vue'; import { Icon } from '../../icon'; import loadingDirective from '../../loading/src/directive'; -import { buttonProps } from './button-types'; - +import { buttonProps, ButtonProps } from './button-types'; +import useButton from './use-button'; import './button.scss'; export default defineComponent({ name: 'DButton', directives: { - devLoading: loadingDirective + devLoading: loadingDirective, }, props: buttonProps, - setup(props, ctx) { - const buttonContent = ref(null); + emits: ['click'], + setup(props: ButtonProps, ctx: SetupContext) { + const { icon, disabled, loading } = toRefs(props); + const { classes, iconClass } = useButton(props, ctx); const onClick = (e: MouseEvent) => { - if (props.showLoading) { - return; - } - props.onClick?.(e); - } - - const hasContent = computed(() => ctx.slots.default); - - const btnClass = computed(() => { - const { variant, size, position, bordered, icon } = props; - const origin = `devui-btn devui-btn-${variant} devui-btn-${size} devui-btn-${position}`; - const borderedClass = bordered ? 'bordered' : ''; - const btnIcon = !!icon && !hasContent.value && variant !== 'primary' ? 'd-btn-icon' : ''; - const btnIconWrap = !!icon ? 'd-btn-icon-wrap' : ''; - return `${origin} ${borderedClass} ${btnIcon} ${btnIconWrap}`; - }); - - const iconClass = computed(() => { - if (!props.icon) { + if (loading.value) { return; } - const origin = 'devui-icon-fix icon'; - if (hasContent.value) { - return `${origin} clear-right-5`; - } else { - return origin; - } - }); + ctx.emit('click', e); + }; return () => { - const { - icon, - type, - disabled, - showLoading, - width - } = props; return ( -
- -
+ ); - } - } + }; + }, }); diff --git a/packages/devui-vue/devui/button/src/use-button.ts b/packages/devui-vue/devui/button/src/use-button.ts new file mode 100644 index 0000000000..a27c458832 --- /dev/null +++ b/packages/devui-vue/devui/button/src/use-button.ts @@ -0,0 +1,35 @@ +import { computed } from 'vue'; +import type { SetupContext } from 'vue'; +import { ButtonProps, UseButtonReturnType } from './button-types'; + +export default function useButton(props: ButtonProps, ctx: SetupContext): UseButtonReturnType { + const hasContent = computed(() => ctx.slots.default); + const colorMap = { + solid: 'primary', + outline: 'secondary', + text: 'secondary', + }; + const defaultColor = colorMap[props.variant]; + + const classes = computed(() => ({ + 'devui-btn': true, + [`devui-btn-${props.variant}`]: true, + [`devui-btn-${props.variant}-${props.color || defaultColor}`]: true, + [`devui-btn-${props.size}`]: true, + 'devui-btn-icon-wrap': props.icon, + 'devui-btn-icon': props.icon && !hasContent.value && props.variant !== 'solid', + })); + const iconClass = computed(() => { + if (!props.icon) { + return; + } + const origin = 'devui-icon-fix icon'; + if (hasContent.value) { + return `${origin} clear-right-5`; + } else { + return origin; + } + }); + + return { classes, iconClass }; +} diff --git a/packages/devui-vue/devui/style/theme/_color.scss b/packages/devui-vue/devui/style/theme/_color.scss index 20ed2842ea..e78d335685 100755 --- a/packages/devui-vue/devui/style/theme/_color.scss +++ b/packages/devui-vue/devui/style/theme/_color.scss @@ -8,7 +8,7 @@ $devui-brand-foil: var(--devui-brand-foil, #859bff); // 品牌 $devui-brand-hover: var(--devui-brand-hover, #7693f5); // 品牌色高亮色(加亮) $devui-brand-active: var(--devui-brand-active, #526ecc); // 品牌色激活色(加深) $devui-brand-active-focus: var(--devui-brand-active-focus, #344899); // 品牌色焦点色(重度加深) -$devui-contrast: var(--devui-contrast, #f66f6a); // 品牌色撞色、对比色、反衬色、第二品牌色 +$devui-contrast: var(--devui-contrast, #c7000b); // 品牌色撞色、对比色、反衬色、第二品牌色 $devui-text: var(--devui-text, #252b3a); // 正文文本 $devui-text-weak: var(--devui-text-weak, #575d6c); // 弱化的正文信息(手风琴子项,表头) $devui-aide-text: var(--devui-aide-text, #8a8e99); // 辅助文本、帮助信息(面包屑) @@ -84,8 +84,9 @@ $devui-primary: var(--devui-primary, #5e7ce0); // 主要按钮, $devui-primary-hover: var(--devui-primary-hover, #7693f5); // 主要按钮悬停 $devui-primary-active: var(--devui-primary-active, #344899); // 主要按钮激活 -$devui-contrast-hover: var(--devui-contrast-hover, #ff8b87); // 突出按钮悬停 -$devui-contrast-active: var(--devui-contrast-active, #de504e);// 突出按钮激活 +$devui-contrast-hover: var(--devui-contrast-hover, #d64a52); // 突出按钮悬停 +$devui-contrast-active: var(--devui-contrast-active, #b12220);// 突出按钮激活 +$devui-contrast-disabled: var(--devui-contrast-disabled, #ffbcba); // 突出按钮禁用 // 状态 $devui-danger-line: var(--devui-danger-line, #f66f6a); // 失败边框 diff --git a/packages/devui-vue/docs/components/button/index.md b/packages/devui-vue/docs/components/button/index.md index 05128fd859..3023a010eb 100644 --- a/packages/devui-vue/docs/components/button/index.md +++ b/packages/devui-vue/docs/components/button/index.md @@ -6,206 +6,204 @@ 标记了一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。 -### 主要按钮 +### 按钮类型 -:::demo +:::demo 通过`variant`设置按钮类型,目前支持`solid`、`outline`、`text`三种类型,默认为`outline`类型。 ```vue + + ``` + ::: -### 次要按钮 -:::demo +### 主题色 + +:::demo 通过`color`设置按钮主题,目前支持`secondary`、`primary`、`danger`三种类型,默认为`secondary`类型。 ```vue ``` + ::: -### 左按钮与右按钮 +### 按钮大小 + +:::demo 通过`size`设置按钮大小,支持`xs`、`sm`、`md`、`lg`四种类型,默认为`md`。 -:::demo ```vue ``` + ::: +### 禁用按钮 +:::demo 通过`disabled`参数设置按钮禁用状态。 -### 按钮形态 -用于给按钮增加不同的使用场景。 -:::demo ```vue ``` -::: -### 文字按钮 -:::demo -```vue - -``` ::: ### 加载中状态 -:::demo + +:::demo 通过`loading`参数设置按钮加载中状态。 + ```vue ``` -::: -### 自动获得焦点 -通过autofocus设置按钮自动获得焦点。 -:::demo -```vue - -``` ::: ### 图标 :::demo + ```vue ``` + ::: -### API -d-button 参数 -| 参数 | 类型 | 默认 | 说明 | -| :-------: | :---------------: | :-------: | :------------------------------- | -| type | `IButtonType` | 'button' | 可选,按钮类型 | -| variant | `IButtonVariant` | 'primary' | 可选,按钮的形态 | -| position | `IButtonPosition` | 'default' | 可选,按钮位置 | -| size | `IButtonSize` | 'md' | 可选,按钮大小 | -| bordered | `boolean` | false | 可选,是否有边框 | -| icon | `string` | -- | 可选,点击背景触发的事件 | -| width | `string` | -- | 可选,弹出框宽度(e.g '300px') | -| disabled | `boolean` | false | 可选,是否禁用button | -| autofocus | `boolean` | false | 可选,按钮加载时是否自动获得焦点 | -| showLoading| `boolean` | false | 可选,是否显示加载提示 | - -d-button 事件 -| 参数 | 类型 | 默认 | 说明 | -| :-----: | :---------------------------: | :---: | :------------- | -| onClick | `(event: MouseEvent) => void` | -- | 可选,点击事件 | - - -IButtonType -``` typescript -type IButtonType = 'button' | 'submit' | 'reset'; -``` +### d-button 参数 -IButtonVariant -``` typescript -type IButtonVariant = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning'; -``` +| 参数 | 类型 | 默认 | 说明 | 跳转 Demo | +| -------- | ---------------- | ----------- | --------------------- | ------------------------- | +| variant | `IButtonVariant` | 'outline' | 可选,按钮的形态 | [按钮类型](#按钮类型) | +| color | `IButtonColor` | 'secondary' | 可选,按钮主题 | [主题色](#主题色) | +| size | `IButtonSize` | 'md' | 可选,按钮大小 | [按钮大小](#按钮大小) | +| icon | `string` | -- | 可选,自定义按钮图标 | [图标](#图标) | +| disabled | `boolean` | false | 可选,是否禁用 button | [禁用按钮](#禁用按钮) | +| loading | `boolean` | false | 可选,设置加载中状态 | [加载中状态](#加载中状态) | -IButtonPosition -``` typescript -type IButtonPosition = 'left' | 'right' | 'default'; +### IButtonVariant 类型 + +```typescript +type IButtonVariant = 'solid' | 'outline' | 'text'; ``` -IButtonSize -``` typescript +### IButtonSize 类型 + +```typescript type IButtonSize = 'lg' | 'md' | 'sm' | 'xs'; ``` + +### IButtonColor 类型 + +```typescript +type IButtonColor = 'secondary' | 'primary' | 'danger'; +``` diff --git a/packages/devui-vue/docs/components/carousel/index.md b/packages/devui-vue/docs/components/carousel/index.md index c1f6450788..370a009c8d 100644 --- a/packages/devui-vue/docs/components/carousel/index.md +++ b/packages/devui-vue/docs/components/carousel/index.md @@ -117,9 +117,9 @@ export default defineComponent({ {{ item }}