chore(Divider): use tsx

This commit is contained in:
chenjiahan 2020-10-09 19:56:33 +08:00
parent 861a77ce44
commit aaec78d54d
2 changed files with 9 additions and 6 deletions

View File

@ -61,11 +61,11 @@ app.use(Divider);
### Props
| 参数 | 说明 | 类型 | 默认值 |
| ---------------- | -------------------------------- | --------- | -------- |
| dashed | 是否使用虚线 | _boolean_ | `false` |
| hairline | 是否使用 0.5px 线 | _boolean_ | `true` |
| content-position | 内容位置,可选值为`left` `right` | _string_ | `center` |
| 参数 | 说明 | 类型 | 默认值 |
| ---------------- | --------------------------------- | --------- | -------- |
| dashed | 是否使用虚线 | _boolean_ | `false` |
| hairline | 是否使用 0.5px 线 | _boolean_ | `true` |
| content-position | 内容位置,可选值为 `left` `right` | _string_ | `center` |
### Slots

View File

@ -1,7 +1,10 @@
import { PropType } from 'vue';
import { createNamespace } from '../utils';
const [createComponent, bem] = createNamespace('divider');
export type DividerContentPosition = 'left' | 'center' | 'right';
export default createComponent({
props: {
dashed: Boolean,
@ -10,7 +13,7 @@ export default createComponent({
default: true,
},
contentPosition: {
type: String,
type: String as PropType<DividerContentPosition>,
default: 'center',
},
},