mirror of
https://git.beihong.wang/wangbeihong/iot-bedroom-environment-controller.git
synced 2026-04-23 11:53:03 +08:00
25 lines
682 B
Plaintext
25 lines
682 B
Plaintext
<view class="fui-white__space-wrap {{'fui-white__space-'+(parse.getHeight(height || c_height)?'':(size || c_size))}}" style="{{parse.getStyles(background || c_background,height || c_height)}}" bindtap="handleClick">
|
|
<slot></slot>
|
|
</view>
|
|
|
|
<wxs module="parse">
|
|
function gHeight(height) {
|
|
var style = ''
|
|
var h = parseInt(height)
|
|
if (h && h > 0) {
|
|
style += h + 'rpx'
|
|
}
|
|
return style;
|
|
}
|
|
module.exports = {
|
|
getHeight: gHeight,
|
|
getStyles: function (background, height) {
|
|
var style = "background:" + background + ";"
|
|
var h = gHeight(height)
|
|
if (h) {
|
|
style += "height:" + h + ";"
|
|
}
|
|
return style
|
|
}
|
|
}
|
|
</wxs> |