mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-07 13:48:31 +08:00
feat(divider): wai-aria
This commit is contained in:
parent
0f81ac65e6
commit
1409f90065
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user