diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js index 34b69c72..e5f1a923 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js @@ -2,10 +2,10 @@ import html from "html"; import { ElConfigProvider } from "element-plus"; import zh from "./lib/element-plus/locale/zh-cn.min.mjs"; import en from "./lib/element-plus/locale/en.min.mjs"; -import { Suspense, reactive, onMounted } from "vue"; +import { reactive, onMounted } from "vue"; export default { - components: { ElConfigProvider, Suspense }, + components: { ElConfigProvider }, template: html` diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js index 93d71b6a..febb3864 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js @@ -1,7 +1,7 @@ import html from "html"; import { ref, reactive, watch, onMounted } from "vue"; import { dayjs } from "element-plus"; -import request, { post } from "../../request/index.js"; +import request from "../../request/index.js"; import { importFunction } from "../../utils/index.js"; export default { @@ -127,6 +127,9 @@ export default { value: o[props.schema.value], label: o[props.schema.label], })); + if (!props.schema.selected && options.value.length) { + model[props.prop] = options.value[0].value; + } } catch (error) { console.log(error); } diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-item.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-item.js index 4bb25cf0..ee42c8c6 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-item.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-item.js @@ -4,7 +4,9 @@ import { getRules } from "../../utils/validation.js"; export default { name: "formItem", - components: { AppFormInput: defineAsyncComponent(() => import("./form-input.js")) }, + components: { + AppFormInput: defineAsyncComponent(() => import("./form-input.js")), + }, template: html`