|
|
@@ -21,7 +21,7 @@
|
|
|
<!-- 操作按钮区域 -->
|
|
|
<div class="upload-area">
|
|
|
<!-- 拍照按钮 -->
|
|
|
- <button class="photo-btn" @click="takePhoto">
|
|
|
+ <button class="photo-btn" @click="takePhoto" v-if="isMobile">
|
|
|
<span class="plus-icon">+</span>
|
|
|
<span>{{ lang.ssTakePhoto }}</span>
|
|
|
</button>
|
|
|
@@ -52,7 +52,8 @@ export default {
|
|
|
work: {
|
|
|
fileList: []
|
|
|
},
|
|
|
- recordObj: {}
|
|
|
+ recordObj: {},
|
|
|
+ isMobile: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -124,10 +125,17 @@ export default {
|
|
|
delImage(index) {
|
|
|
this.work.fileList.splice(index, 1);
|
|
|
this.changeWorkData(this.work);
|
|
|
+ },
|
|
|
+ checkMobile() {
|
|
|
+ this.isMobile = window.innerWidth <= 1024;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ this.checkMobile();
|
|
|
+ window.addEventListener('resize', this.checkMobile);
|
|
|
+ },
|
|
|
+ beforeUnmount() {
|
|
|
+ window.removeEventListener('resize', this.checkMobile);
|
|
|
}
|
|
|
};
|
|
|
</script>
|