mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
feat(space): a11y
This commit is contained in:
parent
5905c07276
commit
f1812ff90a
@ -4,9 +4,9 @@
|
||||
|
||||
### Feats
|
||||
|
||||
|
||||
- `n-button-group` supports wai-aria
|
||||
- `n-progress` supports wai-aria
|
||||
- `n-space` supports wai-aria.
|
||||
- `n-button-group` supports wai-aria.
|
||||
- `n-progress` supports wai-aria.
|
||||
- `n-menu` supports use `<a />` and `<router-link />` as label, closes [#84](https://github.com/TuSimple/naive-ui/issues/84).
|
||||
- `n-input-number` add `show-button` prop.
|
||||
- `n-rate` support `default` slot for icon customizing.
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
### Feats
|
||||
|
||||
- `n-space` 支持 wai-aria
|
||||
- `n-button-group` 支持 wai-aria
|
||||
- `n-progress` 支持 wai-aria
|
||||
- `n-menu` 支持使用 `<a />` 和 `<router-link />` 作为 label,关闭 [#84](https://github.com/TuSimple/naive-ui/issues/84)
|
||||
|
@ -18,22 +18,13 @@ type Align =
|
||||
|
||||
const spaceProps = {
|
||||
...(useTheme.props as ThemeProps<SpaceTheme>),
|
||||
align: {
|
||||
type: String as PropType<Align>,
|
||||
default: undefined
|
||||
},
|
||||
align: String as PropType<Align>,
|
||||
justify: {
|
||||
type: String as PropType<'start' | 'end'>,
|
||||
default: 'start'
|
||||
},
|
||||
inline: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
vertical: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
inline: Boolean,
|
||||
vertical: Boolean,
|
||||
size: {
|
||||
type: [String, Number, Array] as PropType<
|
||||
'small' | 'medium' | 'large' | number | [number, number]
|
||||
@ -107,6 +98,7 @@ export default defineComponent({
|
||||
const lastIndex = children.length - 1
|
||||
return (
|
||||
<div
|
||||
role="none"
|
||||
class={`${mergedClsPrefix}-space`}
|
||||
style={{
|
||||
display: inline ? 'inline-flex' : 'flex',
|
||||
@ -120,6 +112,7 @@ export default defineComponent({
|
||||
>
|
||||
{children.map((child, index) => (
|
||||
<div
|
||||
role="none"
|
||||
style={[
|
||||
itemStyle as any,
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user