|
@@ -3,6 +3,7 @@ import { ref, onMounted, nextTick } from 'vue';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
import { SheetApi } from '@/request/api';
|
|
|
import sheet from '@/components/sheet.vue'
|
|
|
+import { isMobile } from '@/utils/utils';
|
|
|
import { IUnknowObject } from '@/types';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
|
@@ -57,7 +58,7 @@ const getInfo = async(type='') => {
|
|
|
}
|
|
|
getInfo()
|
|
|
|
|
|
-function updateToHeight() {
|
|
|
+function updateToHeight(type="") {
|
|
|
let ele = document.getElementsByClassName('sheet-show-wrapper')[0] as HTMLElement;
|
|
|
|
|
|
let params = {
|
|
@@ -66,6 +67,7 @@ function updateToHeight() {
|
|
|
}
|
|
|
|
|
|
window.parent.postMessage(params,'*')
|
|
|
+ type==='update'&&ElMessage.success('更新样式成功')
|
|
|
}
|
|
|
|
|
|
const refreshSheet = async()=>{
|
|
@@ -107,7 +109,7 @@ const refreshSheet = async()=>{
|
|
|
<!-- 占位 -->
|
|
|
<div v-else></div>
|
|
|
<div class="right-btns">
|
|
|
- <span @click="updateToHeight" v-if="route.query.sourceId">更新样式</span>
|
|
|
+ <span @click="updateToHeight('update')" v-if="route.query.sourceId&&!isMobile()">更新样式</span>
|
|
|
<span @click="refreshSheet">刷新</span>
|
|
|
</div>
|
|
|
</div>
|