tianheng-ui 0.0.20 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.0.20",
4
+ "version": "0.0.23",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -16,7 +16,7 @@
16
16
  <div
17
17
  v-if="title"
18
18
  class="th-cell-title"
19
- :class="[titleClass, active ? titleActive : '', hover ? titleHover : 'title-color']"
19
+ :class="[titleClass, active ? titleActive : '', hover ? titleHover : '']"
20
20
  :style="titleStyle"
21
21
  >
22
22
  {{ title }}
@@ -2,28 +2,28 @@
2
2
  <div>
3
3
  <template v-for="(item, index) in actions">
4
4
  <el-button
5
- v-if="item.act_type === 'edit'"
5
+ v-if="item.act === 'edit'"
6
6
  :key="index"
7
- :style="{ color: btnDisabled(item) ? '' : item.btn_color }"
8
- :type="item.btn_type"
9
- :icon="item.btn_icon"
7
+ :style="item.style"
8
+ :type="item.type"
9
+ :icon="item.icon"
10
10
  :disabled="btnDisabled(item)"
11
11
  @click="doEdit(item)"
12
- >{{ item.btn_name }}</el-button
12
+ >{{ item.name }}</el-button
13
13
  >
14
14
  <el-button
15
- v-else-if="item.act_type === 'look'"
15
+ v-else-if="item.act === 'look'"
16
16
  :key="index"
17
- :style="{ color: btnDisabled(item) ? '' : item.btn_color }"
18
- :type="item.btn_type"
19
- :icon="item.btn_icon"
17
+ :style="item.style"
18
+ :type="item.type"
19
+ :icon="item.icon"
20
20
  :disabled="btnDisabled(item)"
21
21
  @click="doLook(item)"
22
- >{{ item.btn_name }}</el-button
22
+ >{{ item.name }}</el-button
23
23
  >
24
24
  <el-popover
25
25
  class="action-popover"
26
- v-else-if="item.act_type === 'delete'"
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.btn_delmsg || msg }}</p>
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="{ color: btnDisabled(item) ? '' : item.btn_color }"
47
+ :style="item.style"
48
48
  slot="reference"
49
49
  :disabled="loadingDel || btnDisabled(item)"
50
- :type="item.btn_type"
51
- :icon="item.btn_icon"
50
+ :type="item.type"
51
+ :icon="item.icon"
52
52
  @click="toDelete"
53
- >{{ item.btn_name }}</el-button
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="{ color: item.btn_color }"
60
- :type="item.btn_type"
61
- :icon="item.btn_icon"
59
+ :style="item.style"
60
+ :type="item.type"
61
+ :icon="item.icon"
62
62
  :disabled="btnDisabled(item)"
63
63
  @click="doEval(item)"
64
- >{{ item.btn_name }}</el-button
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 (item) => {
101
- if (item.btn_disabled instanceof Boolean) {
102
- return item.btn_disabled
100
+ return item => {
101
+ if (item.disabled instanceof Boolean) {
102
+ return item.disabled;
103
103
  }
104
- if (item.btn_disabled instanceof Function) {
105
- return item.btn_disabled(this.scope);
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() {