You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
"use strict"; |
|
const config_host = require("../../config/host.js"); |
|
const common_vendor = require("../../common/vendor.js"); |
|
const _sfc_main = { |
|
name: "MzButton", |
|
props: { |
|
title: { |
|
type: String, |
|
default: "确认" |
|
}, |
|
buttonColor: { |
|
type: String, |
|
default: "#FFFFFF" |
|
}, |
|
fontColor: { |
|
type: String, |
|
default: "#131313" |
|
}, |
|
buttonWidth: { |
|
type: String, |
|
default: "100%" |
|
}, |
|
isBackground: { |
|
type: Boolean, |
|
default: true |
|
}, |
|
fontSize: { |
|
type: String, |
|
default: "30rpx" |
|
}, |
|
paddingTb: { |
|
type: String, |
|
default: "15rpx" |
|
}, |
|
btnStyle: { |
|
type: Object, |
|
default: {} |
|
} |
|
}, |
|
data() { |
|
return { |
|
loading: true, |
|
buttonBackground: config_host.imghost + "/static/image/small-button-background.png", |
|
staticImage: { |
|
buttonBackground: config_host.imghost + "/static/image/small-button-background.png" |
|
} |
|
}; |
|
}, |
|
onLoad() { |
|
}, |
|
methods: {} |
|
}; |
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { |
|
return { |
|
a: common_vendor.t($props.title), |
|
b: common_vendor.s(Object.assign($props.btnStyle, { |
|
backgroundImage: $props.isBackground ? "url(" + $data.staticImage.buttonBackground + ")" : "", |
|
fontSize: $props.fontSize, |
|
padding: $props.paddingTb + " 0" |
|
})), |
|
c: $props.buttonColor, |
|
d: $props.fontColor, |
|
e: $props.buttonWidth |
|
}; |
|
} |
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/project/pet-uni/components/MzButton/Index.vue"]]); |
|
wx.createComponent(Component);
|
|
|