purchase-let/unpackage/dist/dev/mp-weixin/components/addressPopup.js

100 lines
3.3 KiB
JavaScript

"use strict";
const common_vendor = require("../common/vendor.js");
const common_assets = require("../common/assets.js");
if (!Array) {
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
(_easycom_up_icon2 + _easycom_u_tag2 + _easycom_up_button2 + _easycom_up_popup2)();
}
const _easycom_up_icon = () => "../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_u_tag = () => "../uni_modules/uview-plus/components/u-tag/u-tag.js";
const _easycom_up_button = () => "../uni_modules/uview-plus/components/u-button/u-button.js";
const _easycom_up_popup = () => "../uni_modules/uview-plus/components/u-popup/u-popup.js";
if (!Math) {
(_easycom_up_icon + _easycom_u_tag + _easycom_up_button + _easycom_up_popup)();
}
const _sfc_main = {
__name: "addressPopup",
props: {
show: {
type: Boolean,
default: false
},
list: {
type: Array,
default: () => []
}
},
emits: ["close", "change"],
setup(__props, { emit: __emit }) {
const addressType = common_vendor.ref(-1);
const props = __props;
const emit = __emit;
const close = () => {
emit("close");
};
const submitAddress = () => {
emit("change", props.list[addressType.value]);
};
const navTo = (url) => {
common_vendor.index.navigateTo({
url
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
name: "edit-pen",
color: "#20B128"
}),
b: common_vendor.o(($event) => navTo("/pagesOrder/addressList/addressList")),
c: common_vendor.p({
name: "plus",
color: "#20B128"
}),
d: common_vendor.o(($event) => navTo("/pagesOrder/addressEdit/addressEdit")),
e: common_vendor.f(__props.list, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.real_name),
b: common_vendor.t(item.phone),
c: item.is_default
}, item.is_default ? {
d: "dc6b9753-3-" + i0 + ",dc6b9753-0",
e: common_vendor.p({
text: "默认",
type: "success",
plain: true,
size: "mini"
})
} : {}, {
f: common_vendor.t(item.detail),
g: addressType.value == index
}, addressType.value == index ? {
h: common_assets._imports_0
} : {
i: common_assets._imports_1
}, {
j: index,
k: common_vendor.o(($event) => addressType.value = index, index)
});
}),
f: common_vendor.o(submitAddress),
g: common_vendor.p({
color: "#20B128",
shape: "circle"
}),
h: common_vendor.o(close),
i: common_vendor.p({
show: __props.show,
closeable: true,
round: "10"
})
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-dc6b9753"], ["__file", "D:/里海数字乡村/purchase-let/components/addressPopup.vue"]]);
wx.createComponent(Component);