|
@@ -40,7 +40,7 @@ export function renderStatusList(options: any[]) {
|
|
|
)
|
|
|
);
|
|
|
});
|
|
|
- return arr2;
|
|
|
+ return h("div", {}, arr2);
|
|
|
}
|
|
|
|
|
|
export function renderImage(prop = "image") {
|
|
@@ -89,13 +89,35 @@ export function renderImages(prop: string) {
|
|
|
)
|
|
|
);
|
|
|
});
|
|
|
- return arr2;
|
|
|
+ return h("div", {}, arr2);
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
+export function renderGoodParam(prop: string) {
|
|
|
+ return {
|
|
|
+ cellRenderer({ row }) {
|
|
|
+ const arr2 = [];
|
|
|
+ row[prop].forEach(item => {
|
|
|
+ arr2.push(
|
|
|
+ h(
|
|
|
+ ElTag,
|
|
|
+ {
|
|
|
+ type: "",
|
|
|
+ style: "margin:0 0 0 10px"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ default: () => `${item.key}:${item.value}` || "--"
|
|
|
+ }
|
|
|
+ )
|
|
|
+ );
|
|
|
+ });
|
|
|
+ return h("div", {}, arr2);
|
|
|
+ }
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
export function convertOptions(source: any[], prop = "id") {
|
|
|
return source.map(item => ({ value: item[prop], label: item.label }));
|