Commit 82a8b7e9 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 619a7bfe 25a92094
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -60,41 +60,6 @@ ...@@ -60,41 +60,6 @@
background: filterItem('4', i), background: filterItem('4', i),
}" }"
></div> ></div>
<!-- <div
class="footer-btn flex flexc jcc"
:class="{ border: !filterItem('4', 1) }"
:style="{
background: filterItem('4', 1),
}"
></div>
<div
class="footer-btn flex flexc jcc"
:class="{ border: !filterItem('4', 2) }"
:style="{
background: filterItem('4', 2),
}"
></div>
<div
class="footer-btn flex flexc jcc"
:class="{ border: !filterItem('4', 3) }"
:style="{
background: filterItem('4', 3),
}"
></div>
<div
class="footer-btn flex flexc jcc"
:class="{ border: !filterItem('4', 4) }"
:style="{
background: filterItem('4', 4),
}"
></div>
<div
class="footer-btn flex flexc jcc"
:class="{ border: !filterItem('4', 5) }"
:style="{
background: filterItem('4', 5),
}"
></div> -->
</div> </div>
</div> </div>
<!-- 空数据显示 --> <!-- 空数据显示 -->
...@@ -112,6 +77,9 @@ ...@@ -112,6 +77,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -123,48 +91,26 @@ export default { ...@@ -123,48 +91,26 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
// 过滤图片
// filterImg(val) {
// let url = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "2";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// url = v.fieldValue;
// }
// });
// return url;
// },
// // 过滤颜色
// filterColor(val) {
// let str = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "1";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// str = v.fieldValue;
// }
// });
// return str;
// },
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => { let arr = this.skinFieldList.filter((v) => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -138,6 +138,9 @@ ...@@ -138,6 +138,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -149,48 +152,26 @@ export default { ...@@ -149,48 +152,26 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
// 过滤图片
// filterImg(val) {
// let url = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "2";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// url = v.fieldValue;
// }
// });
// return url;
// },
// // 过滤颜色
// filterColor(val) {
// let str = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "1";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// str = v.fieldValue;
// }
// });
// return str;
// },
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => { let arr = this.skinFieldList.filter((v) => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
class="centralize-across" class="centralize-across"
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<div <div
class="vertical-skin" class="vertical-skin"
:id="componentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="resolution === '1080x1920'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -288,6 +288,9 @@ ...@@ -288,6 +288,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -299,48 +302,26 @@ export default { ...@@ -299,48 +302,26 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
methods: { methods: {
// 过滤图片
// filterImg(val) {
// let url = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "2";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// url = v.fieldValue;
// }
// });
// return url;
// },
// // 过滤颜色
// filterColor(val) {
// let str = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "1";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// str = v.fieldValue;
// }
// });
// return str;
// },
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => { let arr = this.skinFieldList.filter((v) => {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
> >
<img :src="v.previewImagePath" /> <img :src="v.previewImagePath" />
<div class="name"> <div class="name">
{{ v.name }} {{ v.name }}-{{ filterItems(v.imageResolution, imageResolution) }}
</div> </div>
</div> </div>
</div> </div>
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
import { getSkinList } from "@/services/surface"; import { getSkinList } from "@/services/surface";
import { Empty } from "ant-design-vue"; import { Empty } from "ant-design-vue";
import { mapMutations, mapState } from "vuex"; import { mapMutations, mapState } from "vuex";
import { filterItems } from "@/utils";
export default { export default {
props: { props: {
classifyList: { classifyList: {
...@@ -56,6 +57,7 @@ export default { ...@@ -56,6 +57,7 @@ export default {
}, },
data() { data() {
return { return {
filterItems,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
categoryId: "", // 分类ID categoryId: "", // 分类ID
previewList: [], // 皮肤列表 previewList: [], // 皮肤列表
...@@ -63,7 +65,7 @@ export default { ...@@ -63,7 +65,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState("site", ["curSkinIndex", "curProduct"]), ...mapState("site", ["curSkinIndex", "curProduct", "imageResolution"]),
}, },
watch: { watch: {
curProduct(newVal) { curProduct(newVal) {
...@@ -198,9 +200,10 @@ export default { ...@@ -198,9 +200,10 @@ export default {
left: 0px; left: 0px;
bottom: 0px; bottom: 0px;
text-align: center; text-align: center;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.active { .active {
......
...@@ -4,22 +4,21 @@ ...@@ -4,22 +4,21 @@
<div <div
:id="componentsId" :id="componentsId"
class="across-skin" class="across-skin"
v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
></div> ></div>
<!-- 竖版 1080*1920 --> <!-- 竖版 1080*1920 -->
<div <!-- <div
class="vertical-skin" class="vertical-skin"
:id="componentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="resolution === '1080x1920'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
></div> ></div> -->
<!-- 空数据显示 --> <!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else> <!-- <div class="empty flex aic jcc" v-else>
<a-empty <a-empty
:image="require('../../../../assets/img/original.png')" :image="require('../../../../assets/img/original.png')"
:image-style="{ :image-style="{
...@@ -28,11 +27,14 @@ ...@@ -28,11 +27,14 @@
> >
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span> <span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty> </a-empty>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
// imgItem: { // imgItem: {
...@@ -51,13 +53,20 @@ export default { ...@@ -51,13 +53,20 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 桌面自助服务终端 横板 --> <!-- 桌面自助服务终端 横板 -->
<div <div
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -106,13 +109,20 @@ export default { ...@@ -106,13 +109,20 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
class="vertical-skin flex flexc aic" class="vertical-skin flex flexc aic"
:id="componentsId" :id="componentsId"
v-if="imageResolution === '2'" v-if="resolution === '1080x1920'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -51,15 +51,11 @@ ...@@ -51,15 +51,11 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
// imgItem: {
// type: Array,
// required: true,
// default: () => {
// return [];
// },
// },
skinFieldList: { skinFieldList: {
type: Array, type: Array,
required: true, required: true,
...@@ -69,18 +65,26 @@ export default { ...@@ -69,18 +65,26 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="across-skin flex flexc" class="across-skin flex flexc"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
> >
<div <div
class="header" class="header"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="vertical-skin flex flexc" class="vertical-skin flex flexc"
v-else-if="imageResolution === '2'" v-else-if="resolution === '1080x1920'"
> >
<div <div
class="header" class="header"
...@@ -101,6 +101,9 @@ ...@@ -101,6 +101,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -112,7 +115,7 @@ export default { ...@@ -112,7 +115,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -124,6 +127,13 @@ export default { ...@@ -124,6 +127,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
formData: { formData: {
categoryId: undefined, // 所属种类 categoryId: undefined, // 所属种类
name: "", // 皮肤名称 name: "", // 皮肤名称
imageResolution: "1", // 分辨率 imageResolution: undefined, // 分辨率
skinFieldList: [], // 字段属性列表 skinFieldList: [], // 字段属性列表
previewImagePath: "", // 预览图地址 previewImagePath: "", // 预览图地址
}, },
...@@ -469,6 +469,7 @@ export default { ...@@ -469,6 +469,7 @@ export default {
onAdd() { onAdd() {
Object.assign(this.formData, this.$options.data().formData); Object.assign(this.formData, this.$options.data().formData);
this.formData.id && this.$delete(this.formData, "id"); this.formData.id && this.$delete(this.formData, "id");
this.formData.imageResolution = Object.keys(this.imageResolution)[0];
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="across-skin" class="across-skin"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div <div
class="vertical-skin" class="vertical-skin"
:id="componentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="resolution === '1080x1920'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -153,15 +153,11 @@ ...@@ -153,15 +153,11 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
// imgItem: {
// type: Array,
// required: true,
// default: () => {
// return [];
// },
// },
skinFieldList: { skinFieldList: {
type: Array, type: Array,
required: true, required: true,
...@@ -171,7 +167,7 @@ export default { ...@@ -171,7 +167,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -183,6 +179,13 @@ export default { ...@@ -183,6 +179,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 样表机 横板 --> <!-- 样表机 横板 -->
<div <div
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -127,6 +127,9 @@ ...@@ -127,6 +127,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -138,7 +141,7 @@ export default { ...@@ -138,7 +141,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -150,6 +153,13 @@ export default { ...@@ -150,6 +153,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 自助服务终端 横板 --> <!-- 自助服务终端 横板 -->
<div <div
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -106,7 +109,7 @@ export default { ...@@ -106,7 +109,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -118,6 +121,13 @@ export default { ...@@ -118,6 +121,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 导视机 横板 --> <!-- 导视机 横板 -->
<div <div
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
> >
<!-- 头部 --> <!-- 头部 -->
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -85,7 +88,7 @@ export default { ...@@ -85,7 +88,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -97,6 +100,13 @@ export default { ...@@ -97,6 +100,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div <div
:id="componentsId" :id="componentsId"
class="window-skin-across flex jcb aic" class="window-skin-across flex jcb aic"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -82,7 +85,7 @@ export default { ...@@ -82,7 +85,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -94,6 +97,13 @@ export default { ...@@ -94,6 +97,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
<template> <template>
<div class="skin-box"> <div class="skin-box">
<!-- 样表机 横板 --> <!-- 填单机 横板 -->
<div <div
:id="componentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="resolution === '1920x1080'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -166,6 +166,9 @@ ...@@ -166,6 +166,9 @@
</template> </template>
<script> <script>
import { unifyResolution } from "@/utils";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default { export default {
props: { props: {
skinFieldList: { skinFieldList: {
...@@ -177,7 +180,7 @@ export default { ...@@ -177,7 +180,7 @@ export default {
}, },
imageResolution: { imageResolution: {
required: true, required: true,
default: "1", default: "",
}, },
componentsId: { componentsId: {
required: true, required: true,
...@@ -189,6 +192,13 @@ export default { ...@@ -189,6 +192,13 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
}; };
}, },
computed: {
...mapGetters("site", ["imageResolutions"]),
resolution() {
let data = filterItems(this.imageResolution, this.imageResolutions);
return unifyResolution(data);
},
},
methods: { methods: {
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
......
...@@ -39,6 +39,9 @@ export default { ...@@ -39,6 +39,9 @@ export default {
siteId(state) { siteId(state) {
return state.siteId; return state.siteId;
}, },
imageResolutions(state) {
return state.imageResolution;
},
}, },
mutations: { mutations: {
SET_path(state, path) { SET_path(state, path) {
......
...@@ -17,3 +17,7 @@ export const transverter = (obj) => { ...@@ -17,3 +17,7 @@ export const transverter = (obj) => {
}; };
}); });
}; };
// 统一分辨率格式
export const unifyResolution = (resolution) => {
return resolution.replace(/[xX*]/, "x");
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment