Commit cf709651 authored by Jenny's avatar Jenny

feat: table height

parent df80d2f4
<template>
<view class="normal-table" :style="{ transform: `scaleY(${scale}) translate(0px, ${elementInfo.height * (scale - 1) /2}px)`}">
<view class="normal-table">
<NormalTitle :elementInfo="elementInfo"></NormalTitle>
<scroll-view scroll-x scroll-y class="scroll-view_H" :style="[tableConfigStyle]">
<view class="table">
......@@ -62,8 +62,7 @@
left: 'start',
center: 'center',
right: 'flex-end'
},
scale: 1
}
};
},
computed: {
......@@ -96,7 +95,6 @@
initChart() {
const that = this
that.$nextTick(() => {
that.calculateScale()
that.chartTables = that.elementData.dataList.chartTables
})
},
......@@ -107,17 +105,6 @@
uni.$emit('handleLinkParams', { index, paramName, value: value })
},
calculateScale() {
var query = wx.createSelectorQuery().in(this);
query.select(".normal-table").boundingClientRect(res => {
const w = res.width
const { width, height } = this.elementInfo
const scale = w / width
this.scale = scale
}).exec();
},
// 图片增加点击事件,查看全部图片
imageClick(index, key) {
const images = []
......@@ -167,7 +154,7 @@
<style scoped lang="scss">
.normal-table {
width: 100%;
height: 100%;
height: calc(100% - 20px);
margin-top: 20px;
}
.scroll-view_H {
......
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