feat(divider): wai-aria

This commit is contained in:
07akioni 2021-06-06 18:25:13 +08:00
parent 0f81ac65e6
commit 1409f90065
3 changed files with 6 additions and 9 deletions

View File

@ -8,6 +8,7 @@
- `n-card` supports wai-aria.
- `n-switch` supports wai-aria.
- `n-menu` supports basic wai-aria.
- `n-divider` supports basic wai-aria.
### Fixes

View File

@ -8,6 +8,7 @@
- `n-card` 支持 wai-aria
- `n-switch` 支持 wai-aria
- `n-menu` 部分支持 wai-aria
- `n-divider` 部分支持 wai-aria
### Fixes

View File

@ -19,14 +19,8 @@ const dividerProps = {
type: String as PropType<'left' | 'center' | 'right'>,
default: 'center'
},
dashed: {
type: Boolean,
default: false
},
vertical: {
type: Boolean,
default: false
}
dashed: Boolean,
vertical: Boolean
} as const
export type DividerProps = ExtractPublicPropTypes<typeof dividerProps>
@ -71,6 +65,7 @@ export default defineComponent({
} = this
return (
<div
role="separator"
class={[
`${mergedClsPrefix}-divider`,
{
@ -84,7 +79,7 @@ export default defineComponent({
style={cssVars as CSSProperties}
>
{!vertical ? (
<hr
<div
class={`${mergedClsPrefix}-divider__line ${mergedClsPrefix}-divider__line--left`}
/>
) : null}