lw-cdp-ui 1.2.21 → 1.2.22

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.
@@ -57,18 +57,15 @@
57
57
  <!-- 操作 -->
58
58
  <template v-if="t?.operation">
59
59
  <!-- 操作按钮少于3个或不需要省略号 -->
60
-
61
- <div
62
- v-if="t.operation.filter(o => !o?.isShow || o.isShow(scope.row)).length <= 3">
63
- <span v-for="o in t.operation.filter(o => !o?.isShow || o.isShow(scope.row))"
60
+ <div v-if="filterOperations(t.operation, scope.row).length <= 3">
61
+ <span v-for="o in filterOperations(t.operation, scope.row)"
64
62
  :key="o">
65
63
  <el-tooltip v-if="o.icon"
66
- v-auth="o.auth"
67
64
  :content="o.label"
68
65
  placement="top">
69
66
  <el-button type="primary"
70
67
  size="small"
71
- @click="o.clickFun(row, $index, tableData)"
68
+ @click="o.clickFun(scope.row, scope.$index, tableData)"
72
69
  :disabled="o.disabled ? o.disabled(scope.row) : false"
73
70
  :icon="o.icon"
74
71
  circle></el-button>
@@ -76,7 +73,6 @@
76
73
  <el-button v-else
77
74
  type="primary"
78
75
  text
79
- v-auth="o.auth"
80
76
  size="small"
81
77
  @click="o.clickFun(scope.row, scope.$index, tableData)"
82
78
  :disabled="o.disabled ? o.disabled(scope.row) : false">
@@ -87,10 +83,9 @@
87
83
 
88
84
  <!-- 操作按钮多于3个且需要省略号 -->
89
85
  <div v-else>
90
- <span v-for="o in t.operation.filter(o => !o.isShow || o.isShow(scope.row)).slice(0, 2)"
86
+ <span v-for="o in filterOperations(t.operation, scope.row).slice(0, 2)"
91
87
  :key="o">
92
88
  <el-tooltip v-if="o.icon"
93
- v-auth="o.auth"
94
89
  :content="o.label"
95
90
  placement="top">
96
91
  <el-button type="primary"
@@ -103,7 +98,6 @@
103
98
  <el-button v-else
104
99
  type="primary"
105
100
  text
106
- v-auth="o.auth"
107
101
  size="small"
108
102
  @click="o.clickFun(scope.row, scope.$index, tableData)"
109
103
  :disabled="o.disabled ? o.disabled(scope.row) : false">
@@ -117,18 +111,15 @@
117
111
  <el-icon class="more-btn"
118
112
  size="16"><el-icon-more-filled /></el-icon>
119
113
  </el-button>
120
-
121
114
  <template #dropdown>
122
115
  <el-dropdown-menu>
123
- <el-dropdown-item v-for="o in t.operation.filter(o => !o.isShow || o.isShow(scope.row)).slice(2)"
116
+ <el-dropdown-item v-for="o in filterOperations(t.operation, scope.row).slice(2)"
124
117
  :key="o"
125
- v-auth="o.auth"
126
118
  @click="o.clickFun(scope.row, scope.$index, tableData)">
127
119
  {{ o.label }}
128
120
  </el-dropdown-item>
129
121
  </el-dropdown-menu>
130
122
  </template>
131
-
132
123
  </el-dropdown>
133
124
  </div>
134
125
  </template>
@@ -263,17 +254,17 @@
263
254
 
264
255
  <!-- 自定义插槽 -->
265
256
  <template v-else-if="t.slot">
266
- <slot :name="t.component"
267
- :row="scope.row">
268
- <el-tag type="danger">[{{t.component}}]
269
- 没有这个默认组件也未自定义插槽内容</el-tag>
270
- </slot>
271
- </template>
257
+ <slot :name="t.component"
258
+ :row="scope.row">
259
+ <el-tag type="danger">[{{t.component}}]
260
+ 没有这个默认组件也未自定义插槽内容</el-tag>
261
+ </slot>
262
+ </template>
272
263
 
273
264
  <!-- 常规渲染 -->
274
265
  <template v-else>
275
- {{ scope.row[t.dataIndex] ? scope.row[t.dataIndex] :scope.row[t.dataIndex] === 0?'0':'' }}
276
- </template>
266
+ {{ scope.row[t.dataIndex] ? scope.row[t.dataIndex] :scope.row[t.dataIndex] === 0?'0':'' }}
267
+ </template>
277
268
 
278
269
  </template>
279
270
  </el-table-column>