55 lines
1.9 KiB
JavaScript
55 lines
1.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "skilmove",
|
|
props: {
|
|
ismove: {
|
|
type: Boolean,
|
|
required: true
|
|
}
|
|
},
|
|
emits: ["clickcard"],
|
|
setup(__props, { emit: __emit }) {
|
|
const emit = __emit;
|
|
const upmenuIndex = common_vendor.ref(-1);
|
|
const isClick = common_vendor.ref(true);
|
|
const clickCircle = (type) => {
|
|
if (isClick.value) {
|
|
switch (type) {
|
|
case "rightup":
|
|
isClick.value = false;
|
|
setTimeout(() => {
|
|
upmenuIndex.value = -1;
|
|
isClick.value = true;
|
|
emit("clickcard", 0);
|
|
}, 0);
|
|
break;
|
|
case "leftbottom":
|
|
isClick.value = false;
|
|
setTimeout(() => {
|
|
upmenuIndex.value = -1;
|
|
isClick.value = true;
|
|
emit("clickcard", 1);
|
|
}, 0);
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
|
|
b: __props.ismove ? `/static/index/keyimg/white.png` : `/static/index/keyimg/move.png`,
|
|
c: common_vendor.t(__props.ismove ? `确定` : `移动`),
|
|
d: common_vendor.o(($event) => clickCircle(`rightup`)),
|
|
e: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
|
|
f: __props.ismove ? `/static/index/keyimg/back.png` : `/static/index/keyimg/delete.png`,
|
|
g: common_vendor.t(__props.ismove ? `取消` : `删除`),
|
|
h: common_vendor.o(($event) => clickCircle(`leftbottom`))
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bcab5993"]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/component/public/game/skilmove.js.map
|