This commit is contained in:
lb
2023-02-20 11:25:32 +08:00
parent 20806b355d
commit 7d0c66ad73
6 changed files with 287 additions and 4 deletions

View File

@@ -14,8 +14,9 @@
</div>
<div class="dialog-body__inner relative">
<!-- v-if="dataForm.id && !detailMode && /属性|详情/.test(activeMenu) && $hasPermission()" -->
<el-button
v-if="dataForm.id && !detailMode && /属性/.test(activeMenu)"
v-if="dataForm.id && !detailMode && /属性|详情/.test(activeMenu)"
plain
type="primary"
size="small"

View File

@@ -83,6 +83,19 @@ export default {
row.forEach((col) => {
dataForm[col.prop] = col.default ?? "";
console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
if (typeof col.fetchData === "function")
col.fetchData().then(({ data: res }) => {
if (res.code === 0) {
this.$set(
col,
"options",
res.data.list.map((item) => ({ label: item.name, value: item.id }))
);
} else {
this.$set(col, "options", []);
}
});
});
});