|
@@ -128,9 +128,10 @@ const changeList = async (list) => {
|
|
|
const arr = [];
|
|
|
newList.map((i) => arr.push(JSON.parse(JSON.stringify(i))));
|
|
|
const type = sortType.value ? 2 : 1;
|
|
|
+
|
|
|
if (!loadedDrawData.value) {
|
|
|
const res = await getCaseImgTagData(caseId.value);
|
|
|
- loadedDrawData.value = res.data ? res.data.data : [];
|
|
|
+ loadedDrawData.value = res.data ? res.data.data || [] : [];
|
|
|
}
|
|
|
|
|
|
if (scene) {
|
|
@@ -173,7 +174,7 @@ const onSlideChange = (swiper) => {
|
|
|
};
|
|
|
const handleItem = (item) => {
|
|
|
let active = sortType.value ? item : Math.floor(item / 2);
|
|
|
- swiperRef.value.slideTo(active);
|
|
|
+ // swiperRef.value.slideTo(active);
|
|
|
console.log("handleItem", item, active);
|
|
|
};
|
|
|
const handleDetele = async (item) => {
|
|
@@ -221,13 +222,13 @@ const handleClear = () => {
|
|
|
};
|
|
|
|
|
|
onMounted(async () => {
|
|
|
+ renderCanvas();
|
|
|
try {
|
|
|
const res = await getCaseImgTagData(caseId.value);
|
|
|
const { isHorizontal, data } = res.data;
|
|
|
sortType.value = !isHorizontal;
|
|
|
data && (loadedDrawData.value = data);
|
|
|
} catch (error) {}
|
|
|
- renderCanvas();
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|