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-card` supports wai-aria.
- `n-switch` supports wai-aria. - `n-switch` supports wai-aria.
- `n-menu` supports basic wai-aria. - `n-menu` supports basic wai-aria.
- `n-divider` supports basic wai-aria.
### Fixes ### Fixes

View File

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

View File

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