|
@@ -50,8 +50,15 @@ const getInfo = async(type='') => {
|
|
|
}
|
|
|
showData.value = true;
|
|
|
type==='refresh'&&ElMessage.success('刷新成功')
|
|
|
- nextTick(() => {
|
|
|
- let ele = document.getElementsByClassName('sheet-show-wrapper')[0] as HTMLElement;
|
|
|
+ type!=='refresh'&&nextTick(() => {
|
|
|
+ updateToHeight()
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+getInfo()
|
|
|
+
|
|
|
+function updateToHeight() {
|
|
|
+ let ele = document.getElementsByClassName('sheet-show-wrapper')[0] as HTMLElement;
|
|
|
|
|
|
let params = {
|
|
|
height: ele.offsetHeight,
|
|
@@ -59,11 +66,7 @@ const getInfo = async(type='') => {
|
|
|
}
|
|
|
|
|
|
window.parent.postMessage(params,'*')
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
}
|
|
|
-getInfo()
|
|
|
|
|
|
const refreshSheet = async()=>{
|
|
|
loading.value = true;
|
|
@@ -86,7 +89,11 @@ const refreshSheet = async()=>{
|
|
|
>
|
|
|
<!-- <h3 class="title">{{info.ExcelName}}</h3> -->
|
|
|
|
|
|
- <sheet :data="info.TableInfo.TableDataList" :config="info.Config"/>
|
|
|
+ <sheet
|
|
|
+ :data="info.TableInfo.TableDataList"
|
|
|
+ :config="info.Config"
|
|
|
+ :sceneConfig="info.ReferencedExcelConfig"
|
|
|
+ />
|
|
|
<div class="tool sheet-bottom">
|
|
|
<div class="sheet-source"
|
|
|
v-if="info.SourcesFrom&&JSON.parse(info.SourcesFrom).isShow"
|
|
@@ -99,7 +106,10 @@ const refreshSheet = async()=>{
|
|
|
</div>
|
|
|
<!-- 占位 -->
|
|
|
<div v-else></div>
|
|
|
- <span @click="refreshSheet" style="color: #666;">刷新</span>
|
|
|
+ <div class="right-btns">
|
|
|
+ <span @click="updateToHeight" v-if="route.query.sourceId">更新样式</span>
|
|
|
+ <span @click="refreshSheet">刷新</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -137,6 +147,12 @@ const refreshSheet = async()=>{
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
+ .right-btns {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap:15px;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|