diff --git a/src/core/helpers/protocol/ui/tab-bar.js b/src/core/helpers/protocol/ui/tab-bar.js index 0573d60395e08d0508ce89cabe16db7b26f5889e..660cec899d775a1eb2e8e47fc5bfde596d67300e 100644 --- a/src/core/helpers/protocol/ui/tab-bar.js +++ b/src/core/helpers/protocol/ui/tab-bar.js @@ -1,6 +1,7 @@ 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) {