提交 34956cf9 编写于 作者: Q qiang

fix: uni.setTabBarStyle 增加 backgroundImage、backgroundRepeat 校验

上级 feee0e9d
import {
getLen
} from 'uni-shared'
import getRealPath from 'uni-platform/helpers/get-real-path'
const indexValidator = {
type: Number,
......@@ -30,6 +31,17 @@ export const setTabBarStyle = {
backgroundColor: {
type: String
},
backgroundImage: {
type: String,
validator (backgroundImage, params) {
if (backgroundImage && !(/^(linear|radial)-gradient\(.+?\);?$/.test(backgroundImage))) {
params.backgroundImage = getRealPath(backgroundImage)
}
}
},
backgroundRepeat: {
type: String
},
borderStyle: {
type: String,
validator (borderStyle, params) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册