@huteming/ui-styles
v1.2.0
Published
> 样式定制
Downloads
2
Readme
代码演示
自定义变量
<theme-provider :theme="theme">
<tm-button>hello</tm-button>
</theme-provider>
import { createTheme, ThemeProvider } from '@huteming/ui-styles'
const theme = createTheme({
button: {
borderColorDefault: 'lightblue',
colorDefault: 'lightBlue',
},
})
export default {
data () {
return {
theme,
}
},
}
嵌套主题
<theme-provider :theme="theme">
<tm-button>hello</tm-button>
<theme-provider :theme="innerTheme">
<tm-button>inner</tm-button>
</theme-provider>
</theme-provider>
import { createTheme, ThemeProvider } from '@huteming/ui-styles'
const theme = createTheme({
button: {
borderColorDefault: 'lightblue',
colorDefault: 'lightBlue',
},
})
const innerTheme = createTheme({
button: {
borderColorDefault: '#ff9800',
colorDefault: '#ff9800',
},
})
export default {
data () {
return {
theme,
innerTheme,
}
},
}