@leevan/jtui 2.0.1 → 2.0.2-alpha1
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/examples/tableTest/table-tree.vue +6 -0
- package/examples/tableTest/tree-table.vue +9 -1
- package/lib/jtui.common.js +56 -20
- package/lib/jtui.umd.js +56 -20
- package/lib/jtui.umd.min.js +1 -1
- package/package.json +4 -4
- package/packages/jt-form-pc/JtFormPc.vue +2 -2
- package/packages/jt-table/components/tabsBtn.vue +59 -44
- package/packages/jt-table-pc/components/tabsBtn.vue +59 -44
- package/vue.config.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leevan/jtui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2-alpha1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "vue-cli-service serve",
|
|
6
6
|
"build": "vue-cli-service build",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"lib": "vue-cli-service build --target lib --name jtui --dest lib packages/index.js"
|
|
9
9
|
},
|
|
10
10
|
"description": "jt Components",
|
|
11
|
-
"homepage": "http://
|
|
11
|
+
"homepage": "http://jtgitlab.scsqzx.com/jtxa/jtui-pc",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "http://
|
|
14
|
+
"url": "http://jtgitlab.scsqzx.com/jtxa/jtui-pc/issues"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "git+http://
|
|
18
|
+
"url": "git+http://jtgitlab.scsqzx.com/jtxa/jtui-pc.git"
|
|
19
19
|
},
|
|
20
20
|
"contributors": [
|
|
21
21
|
"leevan",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
:style="{width:item.width ? item.width === 'auto' ? item.width : item.width + 'px' : '200px'}"
|
|
59
59
|
v-if="item.type === 'iNumber'"
|
|
60
60
|
:disabled="item.disabled ? item.disabled : false"
|
|
61
|
-
:min="item.min ? item.min : -1.7976931348623157E+10308"
|
|
62
|
-
:max="item.max ? item.max : 1.7976931348623157E+10308"
|
|
61
|
+
:min="item.min!=undefined ? item.min : -1.7976931348623157E+10308"
|
|
62
|
+
:max="item.max!=undefined ? item.max : 1.7976931348623157E+10308"
|
|
63
63
|
controls-position="right"></el-input-number>
|
|
64
64
|
<!-- 选择器 -->
|
|
65
65
|
<el-select
|
|
@@ -1,53 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</el-radio-
|
|
2
|
+
<div>
|
|
3
|
+
<el-radio-group v-model="radio_value" size="mini" @change="btnsClick" v-if="dataType !== 'string'">
|
|
4
|
+
<el-radio-button
|
|
5
|
+
v-for="(item, index) in fullData"
|
|
6
|
+
:key="index"
|
|
7
|
+
:label="item.value"
|
|
8
|
+
>{{ item.label }}</el-radio-button
|
|
9
|
+
>
|
|
10
|
+
</el-radio-group>
|
|
11
|
+
<div v-else>
|
|
12
|
+
{{rowData}}
|
|
9
13
|
</div>
|
|
14
|
+
</div>
|
|
10
15
|
</template>
|
|
11
16
|
|
|
12
17
|
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
export default {
|
|
19
|
+
name: "TabsBtn",
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
radio_value: "",
|
|
23
|
+
fullData: [],
|
|
24
|
+
oldValue: "",
|
|
25
|
+
dataType: '',
|
|
26
|
+
rowData: ''
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
params: Object,
|
|
31
|
+
},
|
|
32
|
+
created() {
|
|
33
|
+
this.load();
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
load() {
|
|
37
|
+
const { row, column } = this.params;
|
|
38
|
+
if (row) {
|
|
39
|
+
this.rowData = row[column.property];
|
|
40
|
+
this.dataType = typeof this.rowData;
|
|
41
|
+
}
|
|
42
|
+
if (this.rowData && this.rowData.enum) {
|
|
43
|
+
this.fullData = this.rowData.enum;
|
|
44
|
+
this.radio_value = this.rowData.selected;
|
|
45
|
+
this.oldValue = this.rowData.selected;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
async btnsClick(val) {
|
|
49
|
+
const { row, column } = this.params;
|
|
50
|
+
const { events, parentRow } = this.$attrs;
|
|
51
|
+
const result = await events.radioChange({
|
|
52
|
+
row,
|
|
53
|
+
property: column.property,
|
|
54
|
+
val,
|
|
55
|
+
params: parentRow,
|
|
56
|
+
});
|
|
57
|
+
if (result) {
|
|
58
|
+
this.oldValue = val;
|
|
59
|
+
} else {
|
|
60
|
+
this.radio_value = this.oldValue;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
49
65
|
</script>
|
|
50
66
|
|
|
51
67
|
<style lang="scss" scoped>
|
|
52
|
-
|
|
53
68
|
</style>
|
|
@@ -1,53 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</el-radio-
|
|
2
|
+
<div>
|
|
3
|
+
<el-radio-group v-model="radio_value" size="mini" @change="btnsClick" v-if="dataType !== 'string'">
|
|
4
|
+
<el-radio-button
|
|
5
|
+
v-for="(item, index) in fullData"
|
|
6
|
+
:key="index"
|
|
7
|
+
:label="item.value"
|
|
8
|
+
>{{ item.label }}</el-radio-button
|
|
9
|
+
>
|
|
10
|
+
</el-radio-group>
|
|
11
|
+
<div v-else>
|
|
12
|
+
{{rowData}}
|
|
9
13
|
</div>
|
|
14
|
+
</div>
|
|
10
15
|
</template>
|
|
11
16
|
|
|
12
17
|
<script>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
export default {
|
|
19
|
+
name: "TabsBtn",
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
radio_value: "",
|
|
23
|
+
fullData: [],
|
|
24
|
+
oldValue: "",
|
|
25
|
+
dataType: '',
|
|
26
|
+
rowData: ''
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
params: Object,
|
|
31
|
+
},
|
|
32
|
+
created() {
|
|
33
|
+
this.load();
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
load() {
|
|
37
|
+
const { row, column } = this.params;
|
|
38
|
+
if (row) {
|
|
39
|
+
this.rowData = row[column.property];
|
|
40
|
+
this.dataType = typeof this.rowData;
|
|
41
|
+
}
|
|
42
|
+
if (this.rowData && this.rowData.enum) {
|
|
43
|
+
this.fullData = this.rowData.enum;
|
|
44
|
+
this.radio_value = this.rowData.selected;
|
|
45
|
+
this.oldValue = this.rowData.selected;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
async btnsClick(val) {
|
|
49
|
+
const { row, column } = this.params;
|
|
50
|
+
const { events, parentRow } = this.$attrs;
|
|
51
|
+
const result = await events.radioChange({
|
|
52
|
+
row,
|
|
53
|
+
property: column.property,
|
|
54
|
+
val,
|
|
55
|
+
params: parentRow,
|
|
56
|
+
});
|
|
57
|
+
if (result) {
|
|
58
|
+
this.oldValue = val;
|
|
59
|
+
} else {
|
|
60
|
+
this.radio_value = this.oldValue;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
49
65
|
</script>
|
|
50
66
|
|
|
51
67
|
<style lang="scss" scoped>
|
|
52
|
-
|
|
53
68
|
</style>
|