mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-08 18:36:48 +08:00
feat:修改includes问题
This commit is contained in:
@@ -27,7 +27,7 @@ import { GET_USER_INFO } from "@/api/ThirdApi";
|
|||||||
import { getCookie } from "@/api/utils";
|
import { getCookie } from "@/api/utils";
|
||||||
|
|
||||||
import { USER_INFO } from "@/api/api";
|
import { USER_INFO } from "@/api/api";
|
||||||
console.log("版本1.3.5------------");
|
console.log("版本1.3.6------------");
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
@@ -156,12 +156,33 @@ const imgAttr = computed(
|
|||||||
() =>
|
() =>
|
||||||
imageAttrs[Object.keys(imageAttrs).find((e) => props.img.includes(e))] || {}
|
imageAttrs[Object.keys(imageAttrs).find((e) => props.img.includes(e))] || {}
|
||||||
);
|
);
|
||||||
const imgAttrindex = computed(() =>
|
const imgAttrindex = computed(
|
||||||
Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图背景"
|
() => {
|
||||||
? 1
|
// console.log("props.img.includes1", props.img);
|
||||||
: Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
|
// console.log("props.img", props.img.includes("路径图背景"));
|
||||||
? 2
|
if (
|
||||||
: 3
|
props.img &&
|
||||||
|
Object.keys(imageAttrs).find((e) => props.img.includes(e)) ===
|
||||||
|
"路径图背景"
|
||||||
|
) {
|
||||||
|
return 1;
|
||||||
|
} else if (
|
||||||
|
props.img &&
|
||||||
|
Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
|
||||||
|
) {
|
||||||
|
return 2;
|
||||||
|
} else if (
|
||||||
|
props.img &&
|
||||||
|
Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图3"
|
||||||
|
) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图背景"
|
||||||
|
// ? 1
|
||||||
|
// : Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
|
||||||
|
// ? 2
|
||||||
|
// : 3
|
||||||
);
|
);
|
||||||
console.log("imgAttrindex", imgAttrindex);
|
console.log("imgAttrindex", imgAttrindex);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user