tianheng-ui 0.1.4 → 0.1.5

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -220,9 +220,6 @@ export default {
220
220
  // table
221
221
  for (let i = 0; i < this.tableJson.table.options.length; i++) {
222
222
  const element = this.tableJson.table.options[i];
223
- if (element.primaryKey) {
224
- element.hide = true
225
- }
226
223
  delete element.type;
227
224
  }
228
225
  if (this.tableJson.table.sequence) {
@@ -239,7 +239,7 @@ export default {
239
239
  sizes: [10, 20, 30, 50, 100]
240
240
  }
241
241
  },
242
- sort: { type: "1", key: "create_time" },
242
+ sort: { type: "1", key: "" },
243
243
  loading: { show: false, text: "加载中", image: "" },
244
244
  empty: { show: true, text: "暂无数据", image: "" },
245
245
  sequence: true //是否显示序号
@@ -68,12 +68,13 @@
68
68
  <div class="table-title">列表字段</div>
69
69
  <div class="tableList">
70
70
  <div class="table-header">
71
- <div>拖动</div>
71
+ <div class="table-item-custom">拖动</div>
72
72
  <div>列名</div>
73
73
  <!-- <div>字段</div> -->
74
- <div>排序</div>
75
74
  <div>对齐</div>
76
75
  <div>宽度</div>
76
+ <div class="table-item-custom">排序</div>
77
+ <div class="table-item-custom" style="width:50px">隐藏</div>
77
78
  </div>
78
79
  <draggable
79
80
  class="table-content"
@@ -88,15 +89,14 @@
88
89
  >
89
90
  <div
90
91
  v-for="item in tableData"
91
- :key="item.key"
92
+ :key="item.prop"
92
93
  class="table-content-item"
93
94
  >
94
- <div class="drag">
95
+ <div class="table-item-custom drag">
95
96
  <i class="iconfont icon-drag drag-widget"></i>
96
97
  </div>
97
98
  <div>{{ item.label }}</div>
98
99
  <!-- <div>{{ item.prop }}</div> -->
99
- <div><el-checkbox v-model="item.sortable"></el-checkbox></div>
100
100
  <div>
101
101
  <el-select v-model="item.align" placeholder="请选择" size="mini">
102
102
  <el-option
@@ -116,6 +116,12 @@
116
116
  size="mini"
117
117
  ></el-input-number>
118
118
  </div>
119
+ <div class="table-item-custom">
120
+ <el-checkbox v-model="item.sortable"></el-checkbox>
121
+ </div>
122
+ <div class="table-item-custom">
123
+ <el-checkbox v-model="item.hide"></el-checkbox>
124
+ </div>
119
125
  </div>
120
126
  </draggable>
121
127
  </div>
@@ -227,7 +233,7 @@ export default {
227
233
 
228
234
  .table-content {
229
235
  height: 120px;
230
- overflow-y: scroll;
236
+ overflow-y: overlay;
231
237
  }
232
238
  }
233
239
  .tableList {
@@ -235,20 +241,10 @@ export default {
235
241
  height: calc(100% - 240px);
236
242
  border: 1px solid #dcdfe6;
237
243
 
238
- // .table-header {
239
- // div:nth-child(4) {
240
- // flex: none;
241
- // width: 70px !important;
242
- // }
243
- // }
244
244
  .table-content {
245
245
  height: calc(100% - 40px);
246
- overflow-y: scroll;
246
+ overflow-y: overlay;
247
247
  }
248
- // .table-content .table-content-item > div:nth-child(4) {
249
- // flex: none;
250
- // width: 70px !important;
251
- // }
252
248
  .el-input-number--mini {
253
249
  width: 100%;
254
250
  }
@@ -264,11 +260,6 @@ export default {
264
260
  height: 40px;
265
261
  line-height: 40px;
266
262
  }
267
- div:nth-child(1) {
268
- flex: none;
269
- width: 60px;
270
- text-align: center;
271
- }
272
263
  }
273
264
  .table-content {
274
265
  .table-content-item {
@@ -288,13 +279,13 @@ export default {
288
279
  line-height: 40px;
289
280
  padding: 0 10px;
290
281
  }
291
- > div:nth-child(1) {
292
- flex: none;
293
- width: 60px;
294
- text-align: center;
295
- }
296
282
  }
297
283
  }
284
+ .table-item-custom {
285
+ flex: none !important;
286
+ width: 60px !important;
287
+ text-align: center;
288
+ }
298
289
  // .table-content:hover::-webkit-scrollbar-thumb {
299
290
  // background-color: rgba(69, 90, 100, 0.2);
300
291
  // }