ol-base-components 1.3.1 → 1.4.0
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
|
@@ -404,9 +404,21 @@ export default {
|
|
|
404
404
|
methods: {
|
|
405
405
|
init() {
|
|
406
406
|
const swaggerColumns = this.$swagger.specification.paths[this.url].get.responses["200"].content['application/json'].schema.properties.items.items.properties
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
|
|
408
|
+
Object.keys(swaggerColumns).forEach(key => {
|
|
409
|
+
const item = swaggerColumns[key]
|
|
410
|
+
let tempItem = this.tableData.columns.find((e) => e.prop == key)
|
|
411
|
+
if (tempItem) {
|
|
412
|
+
tempItem = { ...item, ...tempItem }
|
|
413
|
+
} else if (item.description) {
|
|
414
|
+
this.tableData.columns.push({
|
|
415
|
+
prop: key,
|
|
416
|
+
label: item.description,
|
|
417
|
+
show: true,
|
|
418
|
+
sortable: false,
|
|
419
|
+
attrs: {}
|
|
420
|
+
})
|
|
421
|
+
}
|
|
410
422
|
})
|
|
411
423
|
|
|
412
424
|
// 一定加上selection,通过show显示隐藏
|