gyyg-components 0.4.6 → 0.4.8
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/gyyg-components.common.js +110 -110
- package/lib/gyyg-components.umd.js +110 -110
- package/lib/gyyg-components.umd.min.js +110 -110
- package/package.json +1 -1
- package/src/components/MecButtonGroup/MecButtonGroup.vue +1 -0
- package/src/components/MecSelect/MecSelect.vue +1 -0
- package/src/components/MecTable/MecTable.vue +40 -1
- package/src/otherComponents/styleText.vue +2 -2
package/package.json
CHANGED
|
@@ -92,6 +92,38 @@
|
|
|
92
92
|
</el-table-column>
|
|
93
93
|
|
|
94
94
|
<!-- 有type的列 -->
|
|
95
|
+
<el-table-column
|
|
96
|
+
v-else-if="col.type === 'expand'"
|
|
97
|
+
type="expand"
|
|
98
|
+
:label="col.label"
|
|
99
|
+
:align="col.align"
|
|
100
|
+
:min-width="col.minWidth"
|
|
101
|
+
:max-width="col.maxWidth"
|
|
102
|
+
:width="col.width"
|
|
103
|
+
:key="index + col.type"
|
|
104
|
+
:fixed="col.fixed"
|
|
105
|
+
>
|
|
106
|
+
<template slot-scope="scope">
|
|
107
|
+
<component
|
|
108
|
+
v-if="getExpandComponentType(col, scope.row)"
|
|
109
|
+
:is="getExpandComponentType(col, scope.row)"
|
|
110
|
+
:row="scope.row"
|
|
111
|
+
:scope="scope"
|
|
112
|
+
:tableData="col"
|
|
113
|
+
v-bind="
|
|
114
|
+
typeof col.componentProps === 'function'
|
|
115
|
+
? col.componentProps(scope.row)
|
|
116
|
+
: col.componentProps
|
|
117
|
+
"
|
|
118
|
+
v-on="
|
|
119
|
+
typeof col.componentListeners === 'function'
|
|
120
|
+
? col.componentListeners(scope.row)
|
|
121
|
+
: col.componentListeners || {}
|
|
122
|
+
"
|
|
123
|
+
></component>
|
|
124
|
+
</template>
|
|
125
|
+
</el-table-column>
|
|
126
|
+
|
|
95
127
|
<el-table-column
|
|
96
128
|
v-else
|
|
97
129
|
:label="col.label"
|
|
@@ -303,6 +335,13 @@ export default {
|
|
|
303
335
|
}
|
|
304
336
|
return col.type || "";
|
|
305
337
|
},
|
|
338
|
+
getExpandComponentType(col, row) {
|
|
339
|
+
const component = col.component ;
|
|
340
|
+
if (typeof component === "function") {
|
|
341
|
+
return component(row);
|
|
342
|
+
}
|
|
343
|
+
return component || "";
|
|
344
|
+
},
|
|
306
345
|
// 列表选中当前行字体加粗
|
|
307
346
|
selectedRowStyle({ row }) {
|
|
308
347
|
const idArr = this.multipleSelection.map((row) => row[this.rowKey]);
|
|
@@ -411,4 +450,4 @@ export default {
|
|
|
411
450
|
font-size: 15px;
|
|
412
451
|
color: #f56c6c;
|
|
413
452
|
}
|
|
414
|
-
</style>
|
|
453
|
+
</style>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<span>
|
|
3
3
|
<span class="default-text" :style="[statusStyle]" v-if="tableData.columnType == 'text'"
|
|
4
4
|
:class="tableData.getClass ? tableData.getClass(scope.row) : ''">{{ getText(tableData.bind) }}</span>
|
|
5
5
|
<el-button v-if="tableData.columnType == 'button' && getText(tableData.bind)" size="mini" plain round :type="tableData.setType(this.scope.row)">{{ getText(tableData.bind) }}</el-button>
|
|
6
|
-
</
|
|
6
|
+
</span>
|
|
7
7
|
</template>
|
|
8
8
|
<script>
|
|
9
9
|
|