mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 09:26:46 +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 { USER_INFO } from "@/api/api";
|
||||
console.log("版本1.3.5------------");
|
||||
console.log("版本1.3.6------------");
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
@@ -156,12 +156,33 @@ const imgAttr = computed(
|
||||
() =>
|
||||
imageAttrs[Object.keys(imageAttrs).find((e) => props.img.includes(e))] || {}
|
||||
);
|
||||
const imgAttrindex = computed(() =>
|
||||
Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图背景"
|
||||
? 1
|
||||
: Object.keys(imageAttrs).find((e) => props.img.includes(e)) === "路径图2"
|
||||
? 2
|
||||
: 3
|
||||
const imgAttrindex = computed(
|
||||
() => {
|
||||
// console.log("props.img.includes1", props.img);
|
||||
// console.log("props.img", props.img.includes("路径图背景"));
|
||||
if (
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user