@leevan/jtui 2.0.42 → 2.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,8 @@
2
2
  <div style="height:100%">
3
3
  <div style="margin-bottom:12px;">
4
4
  <el-button size="mini" @click="exportTableData">导出数据</el-button>
5
+ <el-button size="mini" @click="loadData1">数据1</el-button>
6
+ <el-button size="mini" @click="loadData2">数据2</el-button>
5
7
  <el-button size="mini" @click="exportDataExcel">直接导出数据</el-button>
6
8
  <el-button size="mini" @click="importData">导入数据</el-button>
7
9
  <el-button size="mini" @click="clearData">清空数据</el-button>
@@ -101,7 +103,7 @@
101
103
  </template>
102
104
 
103
105
  <script>
104
- import { data23 , data13,data7 ,data5} from '../../packages/jt-table/data2';
106
+ import { data23 , data13,data7 ,data5,data15} from '../../packages/jt-table/data2';
105
107
  import { data1 ,data0} from '../data2';
106
108
  export default {
107
109
  data(){
@@ -133,19 +135,46 @@ import { data1 ,data0} from '../data2';
133
135
  }
134
136
  },
135
137
  created(){
136
- const res = data5();
138
+ const res = data15();
137
139
  this.tableData[0].retjson = res[0].retjson;
138
140
  },
139
141
  mounted(){
140
142
  this.loading = true;
141
- const res = data5();
143
+ const res = data15();
142
144
  let timeId = setTimeout(()=>{
143
145
  this.$refs.tablePtbg.loadData(res[0].DataArray);
144
146
  clearTimeout(timeId);
145
147
  this.loading = false
146
- },2000)
148
+ },1000)
147
149
  },
148
150
  methods:{
151
+ loadData1(){
152
+ const res = data15();
153
+ this.tableData[0].retjson = []
154
+ this.$nextTick(() => {
155
+ this.tableData[0].retjson = res[0].retjson;
156
+ this.loading = true;
157
+ let timeId = setTimeout(()=>{
158
+ this.$refs.tablePtbg.reloadData(res[0].DataArray);
159
+ clearTimeout(timeId);
160
+ this.loading = false
161
+ },1000)
162
+ })
163
+ },
164
+ loadData2(){
165
+ const res = data5();
166
+ this.tableData[0].retjson = []
167
+ this.$nextTick(() => {
168
+ this.tableData[0].retjson = res[0].retjson;
169
+ this.loading = true;
170
+ let timeId = setTimeout(()=>{
171
+ this.$refs.tablePtbg.reloadData(res[0].DataArray);
172
+ clearTimeout(timeId);
173
+ this.loading = false
174
+ },1000)
175
+ })
176
+
177
+ },
149
178
  //导出数据
150
179
  exportTableData(){
151
180
  this.$refs.tablePtbg.exportTableData();