Replies: 6 comments 13 replies
-
type 是指设计稿中的状态吗? |
Beta Was this translation helpful? Give feedback.
-
插槽
|
Beta Was this translation helpful? Give feedback.
-
有个小建议就是现有的type改为status 然后线形、方形、等用type进行控制,否则线形和方形都可以进行设置,会不会出现不可控制的情况 |
Beta Was this translation helpful? Give feedback.
-
#68 一些小问题
// 不合法的
const Props = {
type: {
type: String,
default: (): String => 'primary',
},
}
// 合法的
const Props = {
type: {
type: String,
default: (): string => 'primary',
},
}
import type { PropType } from 'vue'
type buttonType = 'default' | 'primary' | 'success' | 'danger' | 'warning'
const Props = {
type: {
type: String as PropType<buttonType>,
default: (): buttonType => 'default',
validator: (val: buttonType): boolean => {
return (
['default', 'primary', 'success', 'danger', 'warning'] as const
).includes(val)
},
},
} 其它没问题,很优秀 |
Beta Was this translation helpful? Give feedback.
-
另外在模板中就可以直接使用 |
Beta Was this translation helpful? Give feedback.
-
百分比没有垂直居中,要修改一下样式 |
Beta Was this translation helpful? Give feedback.
-
Progress 进度条
Attributes
percentage
百分比type
类型square
方形的linear
线性的show-text
是否展示进度百分比color
自定义颜色background
背景色width
自定义宽度height
自定义高度Event
full
当到达满进度的回调设计稿
https://www.figma.com/file/Z0iGT78cxmEiPsZhZN75C2/Progress-%E8%BF%9B%E5%BA%A6%E6%9D%A1?node-id=0%3A1
参考
可以通过下面进行参考设计组件
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input](https://github.com/FightingDesign/fighting-design/blob/master/start/src/Progress.vue)
Beta Was this translation helpful? Give feedback.
All reactions