mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-07 13:48:31 +08:00
commit
3fd19124da
@ -1,12 +1,12 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
## 2.11.9 (2021-06-15)
|
||||
|
||||
### 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.
|
||||
|
@ -1,9 +1,10 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
## 2.11.9 (2021-06-15)
|
||||
|
||||
### 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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui",
|
||||
"version": "2.11.8",
|
||||
"version": "2.11.9",
|
||||
"description": "A Vue 3 Component Library. Fairly Complete, Customizable Themes, Uses TypeScript, Not Too Slow",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -367,45 +367,45 @@ export default defineComponent({
|
||||
>
|
||||
{this.showButton
|
||||
? {
|
||||
suffix: () => [
|
||||
<NButton
|
||||
text
|
||||
disabled={!this.minusable || this.disabled}
|
||||
focusable={false}
|
||||
builtinThemeOverrides={this.buttonThemeOverrides}
|
||||
onClick={this.handleMinusClick}
|
||||
ref="minusButtonInstRef"
|
||||
>
|
||||
{{
|
||||
default: () => (
|
||||
<NBaseIcon clsPrefix={mergedClsPrefix}>
|
||||
{{
|
||||
default: () => <RemoveIcon />
|
||||
}}
|
||||
</NBaseIcon>
|
||||
)
|
||||
}}
|
||||
</NButton>,
|
||||
<NButton
|
||||
text
|
||||
disabled={!this.addable || this.disabled}
|
||||
focusable={false}
|
||||
builtinThemeOverrides={this.buttonThemeOverrides}
|
||||
onClick={this.handleAddClick}
|
||||
ref="addButtonInstRef"
|
||||
>
|
||||
{{
|
||||
default: () => (
|
||||
<NBaseIcon clsPrefix={mergedClsPrefix}>
|
||||
{{
|
||||
default: () => <AddIcon />
|
||||
}}
|
||||
</NBaseIcon>
|
||||
)
|
||||
}}
|
||||
</NButton>
|
||||
]
|
||||
}
|
||||
suffix: () => [
|
||||
<NButton
|
||||
text
|
||||
disabled={!this.minusable || this.disabled}
|
||||
focusable={false}
|
||||
builtinThemeOverrides={this.buttonThemeOverrides}
|
||||
onClick={this.handleMinusClick}
|
||||
ref="minusButtonInstRef"
|
||||
>
|
||||
{{
|
||||
default: () => (
|
||||
<NBaseIcon clsPrefix={mergedClsPrefix}>
|
||||
{{
|
||||
default: () => <RemoveIcon />
|
||||
}}
|
||||
</NBaseIcon>
|
||||
)
|
||||
}}
|
||||
</NButton>,
|
||||
<NButton
|
||||
text
|
||||
disabled={!this.addable || this.disabled}
|
||||
focusable={false}
|
||||
builtinThemeOverrides={this.buttonThemeOverrides}
|
||||
onClick={this.handleAddClick}
|
||||
ref="addButtonInstRef"
|
||||
>
|
||||
{{
|
||||
default: () => (
|
||||
<NBaseIcon clsPrefix={mergedClsPrefix}>
|
||||
{{
|
||||
default: () => <AddIcon />
|
||||
}}
|
||||
</NBaseIcon>
|
||||
)
|
||||
}}
|
||||
</NButton>
|
||||
]
|
||||
}
|
||||
: null}
|
||||
</NInput>
|
||||
</div>
|
||||
|
@ -68,10 +68,8 @@ export default defineComponent({
|
||||
return (
|
||||
<div class={`${clsPrefix}-progress-content`} role="none">
|
||||
<div class={`${clsPrefix}-progress-graph`} aria-hidden>
|
||||
<div
|
||||
class={`${clsPrefix}-progress-graph-circle`}
|
||||
>
|
||||
<svg viewBox="0 0 110 110" aria-hidden>
|
||||
<div class={`${clsPrefix}-progress-graph-circle`}>
|
||||
<svg viewBox="0 0 110 110">
|
||||
<g>
|
||||
<path
|
||||
class={`${clsPrefix}-progress-graph-circle-rail`}
|
||||
@ -118,7 +116,7 @@ export default defineComponent({
|
||||
{slots.default()}
|
||||
</div>
|
||||
) : status !== 'default' ? (
|
||||
<div class={`${clsPrefix}-progress-icon`}>
|
||||
<div class={`${clsPrefix}-progress-icon`} aria-hidden>
|
||||
<NBaseIcon clsPrefix={clsPrefix}>
|
||||
{{
|
||||
default: () => iconMap[status]
|
||||
@ -131,6 +129,7 @@ export default defineComponent({
|
||||
style={{
|
||||
color: indicatorTextColor
|
||||
}}
|
||||
role="none"
|
||||
>
|
||||
<span class={`${clsPrefix}-progress-text__percentage`}>
|
||||
{percentage}
|
||||
|
@ -98,7 +98,8 @@ export default defineComponent({
|
||||
class={[
|
||||
`${clsPrefix}-progress-graph-line`,
|
||||
{
|
||||
[`${clsPrefix}-progress-graph-line--indicator-${indicatorPlacement}`]: true
|
||||
[`${clsPrefix}-progress-graph-line--indicator-${indicatorPlacement}`]:
|
||||
true
|
||||
}
|
||||
]}
|
||||
>
|
||||
@ -151,6 +152,7 @@ export default defineComponent({
|
||||
</div>
|
||||
) : status === 'default' ? (
|
||||
<div
|
||||
role="none"
|
||||
class={`${clsPrefix}-progress-icon ${clsPrefix}-progress-icon--as-text`}
|
||||
style={{
|
||||
color: indicatorTextColor
|
||||
@ -160,7 +162,7 @@ export default defineComponent({
|
||||
{unit}
|
||||
</div>
|
||||
) : (
|
||||
<div class={`${clsPrefix}-progress-icon`}>
|
||||
<div class={`${clsPrefix}-progress-icon`} aria-hidden>
|
||||
<NBaseIcon clsPrefix={clsPrefix}>
|
||||
{{ default: () => iconMap[status] }}
|
||||
</NBaseIcon>
|
||||
|
@ -12,10 +12,7 @@ import MultipleCircle from './MultipleCircle'
|
||||
|
||||
const progressProps = {
|
||||
...(useTheme.props as ThemeProps<ProgressTheme>),
|
||||
processing: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
processing: Boolean,
|
||||
type: {
|
||||
type: String as PropType<'line' | 'circle' | 'multiple-circle'>,
|
||||
default: 'line'
|
||||
@ -57,26 +54,14 @@ const progressProps = {
|
||||
type: String as PropType<'inside' | 'outside'>,
|
||||
default: 'outside'
|
||||
},
|
||||
indicatorTextColor: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
indicatorTextColor: String,
|
||||
circleGap: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: undefined
|
||||
},
|
||||
borderRadius: {
|
||||
type: [String, Number] as PropType<string | number | undefined>,
|
||||
default: undefined
|
||||
},
|
||||
fillBorderRadius: {
|
||||
type: [String, Number] as PropType<string | number | undefined>,
|
||||
default: undefined
|
||||
}
|
||||
height: Number,
|
||||
borderRadius: [String, Number] as PropType<string | number>,
|
||||
fillBorderRadius: [String, Number] as PropType<string | number>
|
||||
} as const
|
||||
|
||||
export type ProgressProps = ExtractPublicPropTypes<typeof progressProps>
|
||||
@ -174,7 +159,7 @@ export default defineComponent({
|
||||
aria-valuemax={100}
|
||||
aria-valuemin={0}
|
||||
aria-valuenow={percentage as number}
|
||||
role={ type === 'circle' || type === 'line' ? 'progressbar' : 'none' }
|
||||
role={type === 'circle' || type === 'line' ? 'progressbar' : 'none'}
|
||||
>
|
||||
{type === 'circle' ? (
|
||||
<Circle
|
||||
|
@ -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,
|
||||
{
|
||||
|
@ -1 +1 @@
|
||||
export default '2.11.8'
|
||||
export default '2.11.9'
|
||||
|
Loading…
Reference in New Issue
Block a user