mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
chore(Divider): use tsx
This commit is contained in:
@@ -62,7 +62,7 @@ app.use(Divider);
|
|||||||
### Props
|
### Props
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
| ---------------- | -------------------------------- | --------- | -------- |
|
| ---------------- | --------------------------------- | --------- | -------- |
|
||||||
| dashed | 是否使用虚线 | _boolean_ | `false` |
|
| dashed | 是否使用虚线 | _boolean_ | `false` |
|
||||||
| hairline | 是否使用 0.5px 线 | _boolean_ | `true` |
|
| hairline | 是否使用 0.5px 线 | _boolean_ | `true` |
|
||||||
| content-position | 内容位置,可选值为 `left` `right` | _string_ | `center` |
|
| content-position | 内容位置,可选值为 `left` `right` | _string_ | `center` |
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
|
import { PropType } from 'vue';
|
||||||
import { createNamespace } from '../utils';
|
import { createNamespace } from '../utils';
|
||||||
|
|
||||||
const [createComponent, bem] = createNamespace('divider');
|
const [createComponent, bem] = createNamespace('divider');
|
||||||
|
|
||||||
|
export type DividerContentPosition = 'left' | 'center' | 'right';
|
||||||
|
|
||||||
export default createComponent({
|
export default createComponent({
|
||||||
props: {
|
props: {
|
||||||
dashed: Boolean,
|
dashed: Boolean,
|
||||||
@@ -10,7 +13,7 @@ export default createComponent({
|
|||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
contentPosition: {
|
contentPosition: {
|
||||||
type: String,
|
type: String as PropType<DividerContentPosition>,
|
||||||
default: 'center',
|
default: 'center',
|
||||||
},
|
},
|
||||||
},
|
},
|
Reference in New Issue
Block a user