Commit cf709651 authored by Jenny's avatar Jenny

feat: table height

parent df80d2f4
<template> <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> <NormalTitle :elementInfo="elementInfo"></NormalTitle>
<scroll-view scroll-x scroll-y class="scroll-view_H" :style="[tableConfigStyle]"> <scroll-view scroll-x scroll-y class="scroll-view_H" :style="[tableConfigStyle]">
<view class="table"> <view class="table">
...@@ -62,8 +62,7 @@ ...@@ -62,8 +62,7 @@
left: 'start', left: 'start',
center: 'center', center: 'center',
right: 'flex-end' right: 'flex-end'
}, }
scale: 1
}; };
}, },
computed: { computed: {
...@@ -96,7 +95,6 @@ ...@@ -96,7 +95,6 @@
initChart() { initChart() {
const that = this const that = this
that.$nextTick(() => { that.$nextTick(() => {
that.calculateScale()
that.chartTables = that.elementData.dataList.chartTables that.chartTables = that.elementData.dataList.chartTables
}) })
}, },
...@@ -107,17 +105,6 @@ ...@@ -107,17 +105,6 @@
uni.$emit('handleLinkParams', { index, paramName, value: value }) 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) { imageClick(index, key) {
const images = [] const images = []
...@@ -167,7 +154,7 @@ ...@@ -167,7 +154,7 @@
<style scoped lang="scss"> <style scoped lang="scss">
.normal-table { .normal-table {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 20px);
margin-top: 20px; margin-top: 20px;
} }
.scroll-view_H { .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