htui-yllkbz 1.4.13 → 1.4.15
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/lib/htui.common.js +388 -393
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +388 -393
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +4 -4
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtTable/htTableColumn.vue +51 -4
- package/src/packages/HtTable/index.vue +22 -2
- package/src/views/About.vue +25 -3
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -24,13 +24,34 @@
|
|
|
24
24
|
:min-width="item.minWidth"
|
|
25
25
|
:width="item.width"
|
|
26
26
|
>
|
|
27
|
-
<template v-
|
|
27
|
+
<template v-if="item.children && item.children.length">
|
|
28
28
|
<HtTableColumn
|
|
29
29
|
:item="child"
|
|
30
|
+
v-for="(child, childindex) in item.children"
|
|
30
31
|
@showFiles="(val) => $emit('showFiles', val)"
|
|
31
32
|
:fromColumn="true"
|
|
32
33
|
:key="`${child.key}_${childindex}_1`"
|
|
33
|
-
|
|
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>
|
|
34
55
|
</template>
|
|
35
56
|
<template slot-scope="{ row, column, $index }">
|
|
36
57
|
<slot :name="item.key" :row="row" :column="column" :rowIndex="$index">
|
|
@@ -207,7 +228,7 @@ import HtShowBaseData from '@/packages/HtShowBaseData';
|
|
|
207
228
|
import HtOrgInfo from '@/packages/HtOrgInfo';
|
|
208
229
|
import HtUploadFiles from '@/packages/HtUploadFiles/index.vue';
|
|
209
230
|
import HtSelectUnit from '@/packages/HtSelectUnit';
|
|
210
|
-
|
|
231
|
+
|
|
211
232
|
interface State {
|
|
212
233
|
/** 数据状态 */
|
|
213
234
|
loading: boolean;
|
|
@@ -234,8 +255,34 @@ export default class Index extends Vue {
|
|
|
234
255
|
};
|
|
235
256
|
/** 生命周期 */
|
|
236
257
|
/** 方法 */
|
|
258
|
+
// getPropByPath(obj: any, path: string, strict = true) {
|
|
259
|
+
// return getPropByPath(obj, path, strict);
|
|
260
|
+
// }
|
|
237
261
|
getPropByPath(obj: any, path: string, strict = true) {
|
|
238
|
-
|
|
262
|
+
let tempObj = obj;
|
|
263
|
+
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
264
|
+
path = path.replace(/^\./, '');
|
|
265
|
+
|
|
266
|
+
const keyArr = path.split('.');
|
|
267
|
+
let i = 0;
|
|
268
|
+
for (let len = keyArr.length; i < len - 1; ++i) {
|
|
269
|
+
if (!tempObj && !strict) break;
|
|
270
|
+
const key = keyArr[i];
|
|
271
|
+
if (key in tempObj) {
|
|
272
|
+
tempObj = tempObj[key];
|
|
273
|
+
} else {
|
|
274
|
+
if (strict) {
|
|
275
|
+
throw new Error(`table中${path}字段发生错误,请检查`);
|
|
276
|
+
}
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// return {
|
|
281
|
+
// o: tempObj,
|
|
282
|
+
// k: keyArr[i],
|
|
283
|
+
// v: tempObj ? tempObj[keyArr[i]] : null,
|
|
284
|
+
// };
|
|
285
|
+
return tempObj ? tempObj[keyArr[i]] : null;
|
|
239
286
|
}
|
|
240
287
|
/** 监听 */
|
|
241
288
|
/** 计算属性 */
|
|
@@ -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-
|
|
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
|
-
|
|
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>
|
package/src/views/About.vue
CHANGED
|
@@ -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
|
|
7
|
+
* @LastEditTime: 2023-04-09 18:46:03
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
@@ -41,13 +41,29 @@
|
|
|
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>
|
|
47
63
|
</template>
|
|
48
64
|
<script lang="ts">
|
|
49
65
|
import { Component, Vue } from 'vue-property-decorator';
|
|
50
|
-
import HtTable from '@/packages/HtTable/
|
|
66
|
+
import HtTable from '@/packages/HtTable/index.vue';
|
|
51
67
|
import HtCountDown from '@/packages/HtCountDown/index.vue';
|
|
52
68
|
import HtSelectUser from '@/packages/HtSelectUser/index.vue';
|
|
53
69
|
import HtSelectOrg from '@/packages/HtSelectOrg/index.vue';
|
|
@@ -134,6 +150,12 @@ export default class Index extends Vue {
|
|
|
134
150
|
disabled: true,
|
|
135
151
|
deafaultShow: true,
|
|
136
152
|
},
|
|
153
|
+
{
|
|
154
|
+
title: 'selectable',
|
|
155
|
+
key: 'selectable',
|
|
156
|
+
width: '300px',
|
|
157
|
+
type: 'boolean',
|
|
158
|
+
},
|
|
137
159
|
{
|
|
138
160
|
title: '姓额外名',
|
|
139
161
|
key: 'namey',
|
|
@@ -144,7 +166,7 @@ export default class Index extends Vue {
|
|
|
144
166
|
},
|
|
145
167
|
{
|
|
146
168
|
title: '名',
|
|
147
|
-
key: '
|
|
169
|
+
key: 'time1',
|
|
148
170
|
type: 'date',
|
|
149
171
|
align: 'center',
|
|
150
172
|
},
|