hldy_app/unpackage/dist/dev/mp-weixin/component/public/game/skilladd.js

80 lines
3.2 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "skilladd",
emits: ["getDownListIndex"],
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 "up":
isClick.value = false;
setTimeout(() => {
upmenuIndex.value = -1;
isClick.value = true;
emit("getDownListIndex", 3);
}, 0);
break;
case "leftup":
isClick.value = false;
setTimeout(() => {
upmenuIndex.value = -1;
isClick.value = true;
emit("getDownListIndex", 2);
}, 0);
break;
case "rightup":
isClick.value = false;
setTimeout(() => {
upmenuIndex.value = -1;
isClick.value = true;
emit("getDownListIndex", 1);
}, 0);
break;
case "leftbottom":
isClick.value = false;
setTimeout(() => {
upmenuIndex.value = -1;
isClick.value = true;
emit("getDownListIndex", 4);
}, 0);
break;
case "rightbottom":
isClick.value = false;
setTimeout(() => {
upmenuIndex.value = -1;
isClick.value = true;
emit("getDownListIndex", 0);
}, 0);
break;
}
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
b: upmenuIndex.value == 0 ? `/static/index/keyimg/key1.png` : `/static/index/keyimg/key1-1.png`,
c: common_vendor.o(($event) => clickCircle(`up`)),
d: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
e: upmenuIndex.value == 0 ? `/static/index/keyimg/key1.png` : `/static/index/keyimg/key5-1.png`,
f: common_vendor.o(($event) => clickCircle(`leftup`)),
g: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
h: upmenuIndex.value == 0 ? `/static/index/keyimg/key1.png` : `/static/index/keyimg/key4-1.png`,
i: common_vendor.o(($event) => clickCircle(`rightup`)),
j: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
k: upmenuIndex.value == 0 ? `/static/index/keyimg/key1.png` : `/static/index/keyimg/key3-1.png`,
l: common_vendor.o(($event) => clickCircle(`leftbottom`)),
m: common_vendor.n(upmenuIndex.value == 0 ? `circle-img-target` : `circle-img`),
n: upmenuIndex.value == 0 ? `/static/index/keyimg/key1.png` : `/static/index/keyimg/key2-2.png`,
o: common_vendor.o(($event) => clickCircle(`rightbottom`))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3da2d352"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/component/public/game/skilladd.js.map