fix: data-table filter menu action style

This commit is contained in:
07akioni 2021-02-13 22:05:10 +08:00
parent 3417a4119d
commit 6ebe6847c7
4 changed files with 11 additions and 18 deletions

View File

@ -262,10 +262,12 @@ export default defineComponent({
rowKey: toRef(props, 'rowKey'),
filterMenuCssVars: computed(() => {
const {
self: { actionDividerColor }
self: { actionDividerColor, actionPadding, actionButtonMargin }
} = themeRef.value
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return {
'--action-padding': actionPadding,
'--action-button-margin': actionButtonMargin,
'--action-divider-color': actionDividerColor
} as CSSProperties
}),
@ -321,8 +323,6 @@ export default defineComponent({
tdColorHoverModal,
paginationMargin,
emptyPadding,
actionPadding,
actionButtonMargin,
[createKey('fontSize', size)]: fontSize,
[createKey('thPadding', size)]: thPadding,
[createKey('tdPadding', size)]: tdPadding
@ -353,9 +353,7 @@ export default defineComponent({
'--th-icon-color-active': thIconColorActive,
'--filter-size': filterSize,
'--pagination-margin': paginationMargin,
'--empty-padding': emptyPadding,
'--action-padding': actionPadding,
'--action-button-margin': actionButtonMargin
'--empty-padding': emptyPadding
}
})
}

View File

@ -8,10 +8,6 @@ export default defineComponent({
type: Function as PropType<SorterRender>,
required: true
},
active: {
type: Boolean,
default: false
},
order: {
// asc, desc
type: [String, Boolean] as PropType<SortOrder>,
@ -19,9 +15,8 @@ export default defineComponent({
}
},
render () {
const { render, active, order } = this
const { render, order } = this
return render({
active,
order
})
}

View File

@ -12,14 +12,14 @@ form
## Props
| Name | Type | Default | Description |
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- |
| closable | `boolean` | `false` | |
| default-value | `string[]` | `[]` | |
| disabled | `boolean` | `false` | |
| input-style | `string | Object` | `undefined` | |
| input-style | `string \| Object` | `undefined` | |
| round | `boolean` | `false` | |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
| tag-style | `string | Object` | `undefined` | |
| tag-style | `string \| Object` | `undefined` | |
| type | `'default' \| 'info' \| 'success' \| 'warning' \| 'error'` | `'default'` | |
| value | `string[]` | `undefined` | |
| on-update:value | `(value: boolean) => any` | `undefined` | |

View File

@ -12,14 +12,14 @@ form
## Props
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- |
| closable | `boolean` | `false` | |
| default-value | `string[]` | `[]` | |
| disabled | `boolean` | `false` | |
| input-style | `string | Object` | `undefined` | |
| input-style | `string \| Object` | `undefined` | |
| round | `boolean` | `false` | |
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
| tag-style | `string | Object` | `undefined` | |
| tag-style | `string \| Object` | `undefined` | |
| type | `'default' \| 'info' \| 'success' \| 'warning' \| 'error'` | `'default'` | |
| value | `string[]` | `undefined` | |
| on-update:value | `(value: boolean) => any` | `undefined` | |