htui-yllkbz 1.4.14 → 1.4.16

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -31,10 +31,29 @@
31
31
  @showFiles="(val) => $emit('showFiles', val)"
32
32
  :fromColumn="true"
33
33
  :key="`${child.key}_${childindex}_1`"
34
- ></HtTableColumn>
34
+ >
35
+ <template :slot="child.key" slot-scope="scope">
36
+ <slot
37
+ :name="child.key"
38
+ :row="scope.row"
39
+ :column="scope.column"
40
+ :rowIndex="scope.rowIndex"
41
+ >
42
+ </slot>
43
+ </template>
44
+ <!-- <template slot="title" slot-scope="{ data }">
45
+ <slot name="title" :data="data"></slot
46
+ ></template> -->
47
+ <template slot-scope="scope" :slot="'header_' + child.key">
48
+ <slot
49
+ :name="'header_' + child.key"
50
+ :column="scope.column"
51
+ :$index="scope.$index"
52
+ ></slot>
53
+ </template>
54
+ </HtTableColumn>
35
55
  </template>
36
56
  <template slot-scope="{ row, column, $index }">
37
- {{ item.type }}
38
57
  <slot :name="item.key" :row="row" :column="column" :rowIndex="$index">
39
58
  <!-- 处理部门 -->
40
59
  <template v-if="item.type === 'org'">
@@ -253,7 +272,7 @@ export default class Index extends Vue {
253
272
  tempObj = tempObj[key];
254
273
  } else {
255
274
  if (strict) {
256
- throw new Error(`table中${path}字段发生错误,请检查`);
275
+ // throw new Error(`table中${path}字段发生错误,请检查`);
257
276
  }
258
277
  break;
259
278
  }
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-11 11:23:24
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-04-09 16:12:58
7
+ * @LastEditTime: 2023-04-10 10:08:02
8
8
  -->
9
9
  <template>
10
10
  <div v-loading="state.loading" style="background:#fff">
@@ -138,7 +138,27 @@
138
138
  :key="`${item.key}_${index}`"
139
139
  :item="item"
140
140
  @showFiles="showFiles"
141
- ></HtTableColumn>
141
+ >
142
+ <template :slot="item.key" slot-scope="scope">
143
+ <slot
144
+ :name="item.key"
145
+ :row="scope.row"
146
+ :column="scope.column"
147
+ :rowIndex="scope.rowIndex"
148
+ >
149
+ </slot>
150
+ </template>
151
+ <template
152
+ slot-scope="{ column, $index }"
153
+ :slot="'header_' + item.key"
154
+ >
155
+ <slot
156
+ :name="'header_' + item.key"
157
+ :column="column"
158
+ :$index="$index"
159
+ ></slot>
160
+ </template>
161
+ </HtTableColumn>
142
162
  </template>
143
163
  </el-table>
144
164
  </article>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2023-04-09 14:33:12
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-04-09 16:12:06
7
+ * @LastEditTime: 2023-04-10 18:22:09
8
8
  */
9
9
  /** 处理table里面根据字段获取对应的值 */
10
10
  export function getPropByPath(obj: any, path: string, strict = true) {
@@ -21,7 +21,7 @@ export function getPropByPath(obj: any, path: string, strict = true) {
21
21
  tempObj = tempObj[key];
22
22
  } else {
23
23
  if (strict) {
24
- throw new Error(`table中${path}字段发生错误,请检查`);
24
+ //throw new Error(`table中${path}字段发生错误,请检查`);
25
25
  }
26
26
  break;
27
27
  }
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2023-04-09 16:48:04
7
+ * @LastEditTime: 2023-04-09 18:46:03
8
8
  -->
9
9
  <template>
10
10
  <div>
@@ -41,6 +41,22 @@
41
41
  :height="500"
42
42
  :columns="state.columns"
43
43
  >
44
+ jjjj
45
+ <template slot="name" slot-scope="{ row }">
46
+ ----{{ row.name }}----yy
47
+ </template>
48
+ <template slot="time1" slot-scope="{ row }">
49
+ ----{{ row.name }}----yy
50
+ </template>
51
+ <template slot="header_time1">
52
+ 次数
53
+ </template>
54
+ <template slot="header_selectable">
55
+ 是否看一下
56
+ </template>
57
+ <template slot="selectable" slot-scope="{ row }">
58
+ ----{{ row.selectable }}----yy
59
+ </template>
44
60
  </HtTable>
45
61
  </div>
46
62
  </div>
@@ -150,7 +166,7 @@ export default class Index extends Vue {
150
166
  },
151
167
  {
152
168
  title: '名',
153
- key: 'time',
169
+ key: 'time1',
154
170
  type: 'date',
155
171
  align: 'center',
156
172
  },