适配
This commit is contained in:
parent
35b7a99c45
commit
42576b9285
@ -106,6 +106,23 @@ const unitAnswer = {
|
||||
};
|
||||
const cdialog = ref(null);
|
||||
const dialog_message = ref("");
|
||||
watch(() => props.step, async(newVal) => {
|
||||
let imgArr = [];
|
||||
await nextTick(() => {
|
||||
const nodeList = document.querySelectorAll("#pagemain"+props.pageIndex+" .namebox img");
|
||||
console.log(nodeList);
|
||||
nodeList.forEach(function (node) {
|
||||
imgArr.push(node.src);
|
||||
node.removeEventListener("click",(e)=>{
|
||||
handleClick(e)
|
||||
});
|
||||
node.addEventListener("click", (e)=>{
|
||||
handleClick(e)
|
||||
});
|
||||
});
|
||||
imgList.value = [...new Set(imgArr)];
|
||||
});
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.pageItem,
|
||||
@ -284,21 +301,7 @@ const handleClick = (e) => {
|
||||
|
||||
};
|
||||
onMounted(async () => {
|
||||
let imgArr = [];
|
||||
await nextTick(() => {
|
||||
const nodeList = document.querySelectorAll("#pagemain"+props.pageIndex+" .namebox img");
|
||||
console.log(nodeList);
|
||||
nodeList.forEach(function (node) {
|
||||
imgArr.push(node.src);
|
||||
node.removeEventListener("click",(e)=>{
|
||||
handleClick(e)
|
||||
});
|
||||
node.addEventListener("click", (e)=>{
|
||||
handleClick(e)
|
||||
});
|
||||
});
|
||||
imgList.value = [...new Set(imgArr)];
|
||||
});
|
||||
|
||||
});
|
||||
const onChange=(newIndex)=>{
|
||||
position.value = newIndex || 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user