tianheng-ui 0.0.22 → 0.0.23
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/index.js +1 -1
- package/lib/tianheng-ui.js +1 -1
- package/lib/tianheng-ui.js.map +1 -1
- package/package.json +1 -1
- package/packages/table/action.vue +27 -27
package/package.json
CHANGED
@@ -2,28 +2,28 @@
|
|
2
2
|
<div>
|
3
3
|
<template v-for="(item, index) in actions">
|
4
4
|
<el-button
|
5
|
-
v-if="item.
|
5
|
+
v-if="item.act === 'edit'"
|
6
6
|
:key="index"
|
7
|
-
:style="
|
8
|
-
:type="item.
|
9
|
-
:icon="item.
|
7
|
+
:style="item.style"
|
8
|
+
:type="item.type"
|
9
|
+
:icon="item.icon"
|
10
10
|
:disabled="btnDisabled(item)"
|
11
11
|
@click="doEdit(item)"
|
12
|
-
>{{ item.
|
12
|
+
>{{ item.name }}</el-button
|
13
13
|
>
|
14
14
|
<el-button
|
15
|
-
v-else-if="item.
|
15
|
+
v-else-if="item.act === 'look'"
|
16
16
|
:key="index"
|
17
|
-
:style="
|
18
|
-
:type="item.
|
19
|
-
:icon="item.
|
17
|
+
:style="item.style"
|
18
|
+
:type="item.type"
|
19
|
+
:icon="item.icon"
|
20
20
|
:disabled="btnDisabled(item)"
|
21
21
|
@click="doLook(item)"
|
22
|
-
>{{ item.
|
22
|
+
>{{ item.name }}</el-button
|
23
23
|
>
|
24
24
|
<el-popover
|
25
25
|
class="action-popover"
|
26
|
-
v-else-if="item.
|
26
|
+
v-else-if="item.act === 'delete'"
|
27
27
|
:key="index"
|
28
28
|
v-model="pop"
|
29
29
|
placement="top"
|
@@ -31,7 +31,7 @@
|
|
31
31
|
width="180"
|
32
32
|
trigger="manual"
|
33
33
|
>
|
34
|
-
<p>{{ item.
|
34
|
+
<p>{{ item.delmsg || msg }}</p>
|
35
35
|
<div style="text-align: right; margin: 0">
|
36
36
|
<el-button type="text" :disabled="loadingDel" @click="doCancel"
|
37
37
|
>取消</el-button
|
@@ -44,24 +44,24 @@
|
|
44
44
|
>
|
45
45
|
</div>
|
46
46
|
<el-button
|
47
|
-
:style="
|
47
|
+
:style="item.style"
|
48
48
|
slot="reference"
|
49
49
|
:disabled="loadingDel || btnDisabled(item)"
|
50
|
-
:type="item.
|
51
|
-
:icon="item.
|
50
|
+
:type="item.type"
|
51
|
+
:icon="item.icon"
|
52
52
|
@click="toDelete"
|
53
|
-
>{{ item.
|
53
|
+
>{{ item.name }}</el-button
|
54
54
|
>
|
55
55
|
</el-popover>
|
56
56
|
<el-button
|
57
57
|
v-else
|
58
58
|
:key="index"
|
59
|
-
:style="
|
60
|
-
:type="item.
|
61
|
-
:icon="item.
|
59
|
+
:style="item.style"
|
60
|
+
:type="item.type"
|
61
|
+
:icon="item.icon"
|
62
62
|
:disabled="btnDisabled(item)"
|
63
63
|
@click="doEval(item)"
|
64
|
-
>{{ item.
|
64
|
+
>{{ item.name }}</el-button
|
65
65
|
>
|
66
66
|
</template>
|
67
67
|
</div>
|
@@ -78,7 +78,7 @@ export default {
|
|
78
78
|
}
|
79
79
|
},
|
80
80
|
scope: {
|
81
|
-
type: Object | String
|
81
|
+
type: Object | String
|
82
82
|
},
|
83
83
|
permission: {
|
84
84
|
type: Object,
|
@@ -97,15 +97,15 @@ export default {
|
|
97
97
|
},
|
98
98
|
computed: {
|
99
99
|
btnDisabled() {
|
100
|
-
return
|
101
|
-
if (item.
|
102
|
-
return item.
|
100
|
+
return item => {
|
101
|
+
if (item.disabled instanceof Boolean) {
|
102
|
+
return item.disabled;
|
103
103
|
}
|
104
|
-
if (item.
|
105
|
-
return item.
|
104
|
+
if (item.disabled instanceof Function) {
|
105
|
+
return item.disabled(this.scope);
|
106
106
|
}
|
107
107
|
};
|
108
|
-
}
|
108
|
+
}
|
109
109
|
},
|
110
110
|
methods: {
|
111
111
|
toDelete() {
|