fix(radio-button): font-size

This commit is contained in:
07akioni 2021-06-07 18:16:31 +08:00
parent 1e5f4c3ef9
commit 22d8e97392
3 changed files with 12 additions and 6 deletions

View File

@ -37,6 +37,7 @@ module.exports = {
'@typescript-eslint/strict-boolean-expressions': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/naming-convention': 0,
'multiline-ternary': 0,
'no-void': 0
}
},

View File

@ -74,7 +74,8 @@ function mapSlot (
[`${clsPrefix}-radio-group__splitor--checked`]: lastInstanceChecked
}
const currentInstanceClass = {
[`${clsPrefix}-radio-group__splitor--disabled`]: currentInstanceDisabled,
[`${clsPrefix}-radio-group__splitor--disabled`]:
currentInstanceDisabled,
[`${clsPrefix}-radio-group__splitor--checked`]: currentInstanceChecked
}
const splitorClass =
@ -116,7 +117,7 @@ const radioGroupProps = {
onUpdateValue: Function as PropType<(value: string | number) => void>,
// deprecated
onChange: {
type: (Function as unknown) as PropType<
type: Function as unknown as PropType<
((value: string | number) => void) | undefined
>,
validator: () => {
@ -199,10 +200,12 @@ export default defineComponent({
buttonTextColorActive,
buttonTextColorHover,
opacityDisabled,
[createKey('buttonHeight', size)]: height
[createKey('buttonHeight', size)]: height,
[createKey('fontSize', size)]: fontSize
}
} = themeRef.value
return {
'--font-size': fontSize,
'--bezier': cubicBezierEaseInOut,
'--button-border-color': buttonBorderColor,
'--button-border-color-active': buttonBorderColorActive,

View File

@ -5,9 +5,11 @@ import { cB, cE, cM, c, cNotM } from '../../../_utils/cssr'
// --button-border-color
// --height
// --opacity-disabled
export default cB('radio-group', {
display: 'inline-block'
}, [
// --font-size
export default cB('radio-group', `
display: inline-block;
font-size: var(--font-size);
`, [
cE('splitor', `
display: inline-block;
vertical-align: bottom;