kouxiangtang 0.0.87 → 0.0.88
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/dist/{AttachmentUploader-B4pX4-Yq.js → AttachmentUploader-D2UqyEKD.js} +2 -2
- package/dist/{AttachmentUploader-B4pX4-Yq.js.map → AttachmentUploader-D2UqyEKD.js.map} +1 -1
- package/dist/{ImageUploader-BkCExkEy.js → ImageUploader-BAOSCt4w.js} +2 -2
- package/dist/{ImageUploader-BkCExkEy.js.map → ImageUploader-BAOSCt4w.js.map} +1 -1
- package/dist/{ImagesUploader-CjRH6O1L.js → ImagesUploader-Cz7xW0aH.js} +2 -2
- package/dist/{ImagesUploader-CjRH6O1L.js.map → ImagesUploader-Cz7xW0aH.js.map} +1 -1
- package/dist/{RichTextEditor-CDqwfcAi.js → RichTextEditor-nkc6LpQ-.js} +2 -2
- package/dist/{RichTextEditor-CDqwfcAi.js.map → RichTextEditor-nkc6LpQ-.js.map} +1 -1
- package/dist/{config-DtEcupsu.js → config-BAO6yAAj.js} +2 -2
- package/dist/{config-DtEcupsu.js.map → config-BAO6yAAj.js.map} +1 -1
- package/dist/{config-CwjAEk26.js → config-BEFzrL_I.js} +3 -3
- package/dist/{config-CwjAEk26.js.map → config-BEFzrL_I.js.map} +1 -1
- package/dist/{config-RAxfaUNa.js → config-BUb73Jjn.js} +2 -2
- package/dist/{config-RAxfaUNa.js.map → config-BUb73Jjn.js.map} +1 -1
- package/dist/{config-DMN9s66_.js → config-C0-2c0oG.js} +2 -2
- package/dist/{config-DMN9s66_.js.map → config-C0-2c0oG.js.map} +1 -1
- package/dist/{config-BYAfOPPJ.js → config-C9LtXS-k.js} +2 -2
- package/dist/{config-BYAfOPPJ.js.map → config-C9LtXS-k.js.map} +1 -1
- package/dist/config-CN7BOn4v.js +181 -0
- package/dist/config-CN7BOn4v.js.map +1 -0
- package/dist/{config-BqC9IVKH.js → config-CPq56A6U.js} +3 -3
- package/dist/{config-BqC9IVKH.js.map → config-CPq56A6U.js.map} +1 -1
- package/dist/{config-DE3vLJyX.js → config-CsDIc4zS.js} +2 -2
- package/dist/{config-DE3vLJyX.js.map → config-CsDIc4zS.js.map} +1 -1
- package/dist/{config-DMZKncqs.js → config-Ct2LlGak.js} +2 -2
- package/dist/{config-DMZKncqs.js.map → config-Ct2LlGak.js.map} +1 -1
- package/dist/{config-Ut2E1TaK.js → config-Cy2WJfHU.js} +2 -2
- package/dist/{config-Ut2E1TaK.js.map → config-Cy2WJfHU.js.map} +1 -1
- package/dist/{config-C2sD4VPj.js → config-Cy7TPXIU.js} +2 -2
- package/dist/{config-C2sD4VPj.js.map → config-Cy7TPXIU.js.map} +1 -1
- package/dist/{config-B89Z-LnS.js → config-DBdq-WLb.js} +2 -2
- package/dist/{config-B89Z-LnS.js.map → config-DBdq-WLb.js.map} +1 -1
- package/dist/{config-B2CWYjIt.js → config-DUey9IlS.js} +2 -2
- package/dist/{config-B2CWYjIt.js.map → config-DUey9IlS.js.map} +1 -1
- package/dist/{config-X2LhF_WL.js → config-DkHNC_jv.js} +2 -2
- package/dist/{config-X2LhF_WL.js.map → config-DkHNC_jv.js.map} +1 -1
- package/dist/{config-D3WxbOr9.js → config-Dlxkoyyf.js} +2 -2
- package/dist/{config-D3WxbOr9.js.map → config-Dlxkoyyf.js.map} +1 -1
- package/dist/{config-VPO2Rsz4.js → config-ELkAYfby.js} +3 -3
- package/dist/{config-VPO2Rsz4.js.map → config-ELkAYfby.js.map} +1 -1
- package/dist/{config-BH4A_NiQ.js → config-JsPZV_67.js} +2 -2
- package/dist/{config-BH4A_NiQ.js.map → config-JsPZV_67.js.map} +1 -1
- package/dist/{config-CtnT1VxY.js → config-KNKAglrH.js} +2 -2
- package/dist/{config-CtnT1VxY.js.map → config-KNKAglrH.js.map} +1 -1
- package/dist/{config-DAN1rEwr.js → config-PwTun2Fq.js} +2 -2
- package/dist/{config-DAN1rEwr.js.map → config-PwTun2Fq.js.map} +1 -1
- package/dist/{config-B-pjuj8Y.js → config-y0AnFmt0.js} +2 -2
- package/dist/{config-B-pjuj8Y.js.map → config-y0AnFmt0.js.map} +1 -1
- package/dist/{index-DOzO-57R.js → index-BJmwYFGo.js} +3 -3
- package/dist/{index-DOzO-57R.js.map → index-BJmwYFGo.js.map} +1 -1
- package/dist/kouxiangtang.js +1 -1
- package/dist/kouxiangtang.umd.cjs +1 -1
- package/dist/kouxiangtang.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/config-CBgiOKrA.js +0 -173
- package/dist/config-CBgiOKrA.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-Cy7TPXIU.js","sources":["../src/framework/field/images/FieldDisplay.vue","../src/framework/field/images/config.js"],"sourcesContent":["<script setup>\nimport { ElSpace, ElImage } from \"element-plus\";\nimport EmptyTip from \"../../component/EmptyTip.vue\";\nimport { ref, watch } from \"vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\n\nconst url = ref(null);\nconst urls = ref([]);\n\nwatch(\n () => props.row,\n () => {\n const images = props.row[props.field.code];\n if (images) {\n urls.value = images.map((item) => item.url);\n url.value = urls.value[0];\n }\n },\n { immediate: true },\n);\n</script>\n\n<template>\n <el-space v-if=\"props.row[props.field.code].length > 0\" wrap>\n <div\n v-for=\"image in props.row[props.field.code]\"\n class=\"image-card\"\n style=\"margin-bottom: 20px\"\n >\n <el-image\n v-if=\"image.url\"\n :src=\"image.url\"\n fit=\"contain\"\n :preview-src-list=\"urls\"\n class=\"image\"\n >\n <template #error>\n <div class=\"loading-error\">\n <div>图片加载失败</div>\n <div>{{ url }}</div>\n </div>\n </template>\n </el-image>\n <div v-else class=\"loading-error\">\n <div>暂无</div>\n </div>\n </div>\n </el-space>\n <EmptyTip v-else />\n</template>\n\n<style scoped lang=\"scss\">\n.image-card {\n width: 200px;\n height: 200px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: #eee;\n border: 1px solid #ddd;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.image {\n width: 100%;\n height: 100%;\n}\n\n.loading-error {\n width: 100%;\n height: 100%;\n min-height: 50px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n</style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class ImagesFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.props = rawConfig.props;\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n this.converter = this.defaultBy(rawConfig.converter, (raw) => raw);\n\n this.checkValidProperties(rawConfig);\n }\n\n defaultConfig() {\n return {\n showInList: false,\n };\n }\n}\n"],"names":["props","__props","url","ref","urls","watch","images","item","ImagesFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor","raw"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,GASRC,IAAMC,EAAI,IAAI,GACdC,IAAOD,EAAI,CAAA,CAAE;AAEnB,WAAAE;AAAA,MACE,MAAML,EAAM;AAAA,MACZ,MAAM;AACJ,cAAMM,IAASN,EAAM,IAAIA,EAAM,MAAM,IAAI;AACzC,QAAIM,MACFF,EAAK,QAAQE,EAAO,IAAI,CAACC,MAASA,EAAK,GAAG,GAC1CL,EAAI,QAAQE,EAAK,MAAM,CAAC;AAAA,MAE3B;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvBe,MAAMI,UAA0BC,EAAgB;AAAA,EAC7D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,QAAQD,EAAU,OACvB,KAAK,UAAUE,GACf,KAAK,SAASC,GACd,KAAK,YAAY,KAAK,UAAUH,EAAU,WAAW,CAACI,MAAQA,CAAG,GAEjE,KAAK,qBAAqBJ,CAAS;AAAA,EACpC;AAAA,EAED,gBAAgB;AACd,WAAO;AAAA,MACL,YAAY;AAAA,IAClB;AAAA,EACG;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as p } from "./index-
|
|
1
|
+
import { B as p } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as f, computed as b, openBlock as u, createElementBlock as V, createVNode as h, unref as c, reactive as v, watch as y, createBlock as B } from "vue";
|
|
3
3
|
import { ElSwitch as m } from "element-plus";
|
|
4
4
|
import "./el-switch-l0sNRNKZ.js";
|
|
@@ -66,4 +66,4 @@ class C extends p {
|
|
|
66
66
|
export {
|
|
67
67
|
C as default
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=config-
|
|
69
|
+
//# sourceMappingURL=config-DBdq-WLb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-DBdq-WLb.js","sources":["../src/framework/field/switch/FieldDisplay.vue","../src/framework/field/switch/FieldEditor.vue","../src/framework/field/switch/config.js"],"sourcesContent":["<template>\n <span style=\"display: flex; align-items: center\">\n <el-switch\n v-model=\"value\"\n size=\"small\"\n :disabled=\"isDeleted ? true : false\"\n :before-change=\"($event) => switchChange(row, field.label)\"\n />\n </span>\n</template>\n\n<script setup>\nimport { ElSwitch } from \"element-plus\";\nimport { computed, ref } from \"vue\";\n\nconst emit = defineEmits([\"enable\"]);\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\nconst isDeleted = ref(props.row.deletedAt);\n\nfunction switchChange(row, label) {\n row.label = label;\n return new Promise((resolve, reject) => {\n emit(\"enable\", row);\n });\n}\n\nconst value = computed(() => {\n return props.row[props.field.code];\n});\n</script>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <el-switch\n v-model=\"_form.value\"\n :disabled=\"props.disabled\"\n @change=\"change\"\n />\n</template>\n\n<script setup>\nimport { ElSwitch } from \"element-plus\";\nimport { reactive, watch } from \"vue\";\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: Boolean,\n field: Object,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class SwitchFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.default = rawConfig.default || false;\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n\n this.checkValidProperties(rawConfig);\n }\n}\n"],"names":["emit","__emit","props","__props","isDeleted","ref","switchChange","row","label","resolve","reject","value","computed","_form","reactive","change","watch","SwitchFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;;;AAeA,UAAMA,IAAOC,GACPC,IAAQC,GAQRC,IAAYC,EAAIH,EAAM,IAAI,SAAS;AAEzC,aAASI,EAAaC,GAAKC,GAAO;AAChC,aAAAD,EAAI,QAAQC,GACL,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,QAAAV,EAAK,UAAUO,CAAG;AAAA,MACtB,CAAG;AAAA,IACH;AAEA,UAAMI,IAAQC,EAAS,MACdV,EAAM,IAAIA,EAAM,MAAM,IAAI,CAClC;;;;;;;;;;;;;;;;;;;;ACvBD,UAAMF,IAAOC,GACPC,IAAQC,GAKRU,IAAQC,EAAS,EAAE,OAAOZ,EAAM,WAAY,CAAA;AAElD,aAASa,IAAS;AAChB,MAAAf,EAAK,qBAAqBa,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAG;AAAA,MACE,MAAMd,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAW,EAAM,QAAQX,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;AC1Be,MAAMe,UAA0BC,EAAgB;AAAA,EAC7D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUD,EAAU,WAAW,IACpC,KAAK,UAAUE,GACf,KAAK,SAASC,GAEd,KAAK,qBAAqBH,CAAS;AAAA,EACpC;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as v, B as x } from "./index-
|
|
1
|
+
import { E as v, B as x } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as c, watch as p, openBlock as r, createElementBlock as V, toDisplayString as u, createBlock as y, reactive as h, unref as b, createSlots as g, withCtx as f, createTextVNode as m } from "vue";
|
|
3
3
|
import { ElInput as k } from "element-plus";
|
|
4
4
|
const E = { key: 0 }, B = {
|
|
@@ -73,4 +73,4 @@ class N extends x {
|
|
|
73
73
|
export {
|
|
74
74
|
N as default
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=config-
|
|
76
|
+
//# sourceMappingURL=config-DUey9IlS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-DUey9IlS.js","sources":["../src/framework/field/string/FieldDisplay.vue","../src/framework/field/string/FieldEditor.vue","../src/framework/field/string/config.js"],"sourcesContent":["<template>\n <span v-if=\"!isEmpty\"> {{ formattedValue }} </span>\n <EmptyTip v-else />\n</template>\n\n<script setup>\nimport EmptyTip from \"../../component/EmptyTip.vue\";\nimport { ref, watch } from \"vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\nconst isEmpty = ref(false);\nconst formattedValue = ref(\"...\");\n\nasync function getName() {\n const fields = props.field.code.toString().split(\".\");\n const value = fields.reduce((acc, curr) => acc[curr], props.row);\n\n if (value === undefined || value === null) {\n isEmpty.value = true;\n } else if (`${value}`.trim() === \"\") {\n isEmpty.value = true;\n } else {\n formattedValue.value = value;\n isEmpty.value = false;\n }\n}\n\nwatch(() => props.row, getName, { immediate: true });\n</script>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <el-input\n v-model=\"_form.value\"\n :type=\"field.type\"\n clearable\n :disabled=\"props.disabled\"\n :placeholder=\"field.placeholder\"\n @input=\"change\"\n >\n <template v-if=\"field.prefix\" #prefix>{{ field.prefix }}</template>\n <template v-if=\"field.suffix\" #suffix>{{ field.suffix }}</template>\n </el-input>\n</template>\n\n<script setup>\nimport { ElInput } from \"element-plus\";\nimport { reactive, watch } from \"vue\";\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: [Object, String, Number],\n field: Object,\n type: String,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class StringFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n\n this.checkValidProperties(rawConfig);\n }\n}\n"],"names":["props","__props","isEmpty","ref","formattedValue","getName","value","acc","curr","watch","emit","__emit","_form","reactive","change","StringFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;AASA,UAAMA,IAAQC,GAQRC,IAAUC,EAAI,EAAK,GACnBC,IAAiBD,EAAI,KAAK;AAEhC,mBAAeE,IAAU;AAEvB,YAAMC,IADSN,EAAM,MAAM,KAAK,WAAW,MAAM,GAAG,EAC/B,OAAO,CAACO,GAAKC,MAASD,EAAIC,CAAI,GAAGR,EAAM,GAAG;AAE/D,MAA2BM,KAAU,QAE1B,GAAGA,CAAK,GAAG,KAAI,MAAO,KAD/BJ,EAAQ,QAAQ,MAIhBE,EAAe,QAAQE,GACvBJ,EAAQ,QAAQ;AAAA,IAEpB;AAEA,WAAAO,EAAM,MAAMT,EAAM,KAAKK,GAAS,EAAE,WAAW,GAAI,CAAE;;;;;;;;;;;;AChBnD,UAAMK,IAAOC,GACPX,IAAQC,GAMRW,IAAQC,EAAS,EAAE,OAAOb,EAAM,WAAY,CAAA;AAElD,aAASc,IAAS;AAChB,MAAAJ,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAH;AAAA,MACE,MAAMT,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAY,EAAM,QAAQZ,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;ACjCe,MAAMe,UAA0BC,EAAgB;AAAA,EAC7D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUC,GACf,KAAK,SAASC,GAEd,KAAK,qBAAqBH,CAAS;AAAA,EACpC;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as b, E as _, s as x, B as V } from "./index-
|
|
1
|
+
import { _ as b, E as _, s as x, B as V } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as o, watch as k, openBlock as n, createBlock as u, unref as y, reactive as S } from "vue";
|
|
3
3
|
import "./color-DbNhHNpt.js";
|
|
4
4
|
import { ElTree as g, ElTreeSelect as B } from "element-plus";
|
|
@@ -114,4 +114,4 @@ class I extends V {
|
|
|
114
114
|
export {
|
|
115
115
|
I as default
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=config-
|
|
117
|
+
//# sourceMappingURL=config-DkHNC_jv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-DkHNC_jv.js","sources":["../src/framework/field/tree-select/FieldDisplay.vue","../src/framework/field/tree-select/FieldEditor.vue","../src/framework/field/tree-select/config.js"],"sourcesContent":["<script setup>\nimport color from \"../../utils/color\";\nimport EmptyTip from \"../../component/EmptyTip.vue\";\nimport { ref, watch } from \"vue\";\nimport { ElTree } from \"element-plus\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\nconst formValue = ref([]);\nconst options = ref([]);\nconst defaultTreeSelectProps = {\n label: \"name\",\n children: \"children\",\n value: \"id\",\n};\nconst invalidTip = ref(\"...\");\nconst found = ref(false);\nconst items = ref([]);\n\nasync function getSelectName() {\n formValue.value = props.row[props.field.code];\n options.value = await props.field.options();\n // if (!options.value) {\n // invalidTip.value = `<无>`;\n // found.value = false;\n // return;\n // }\n\n // let selectedOptions = [];\n // if (props.field.multiple) {\n // selectedOptions = options.value.filter((item) => val.includes(item.code));\n // } else {\n // selectedOptions = options.value.filter((item) => val === item.code);\n // }\n\n // if (selectedOptions.length === 0) {\n // invalidTip.value = `<无>`;\n // found.value = false;\n // return;\n // }\n\n // items.value = selectedOptions.map((item) => ({\n // bgColor: color.strToHexColor(`${item.code}-${item.name}`),\n // code: item.code,\n // name: item.name,\n // }));\n\n found.value = true;\n}\n\nwatch(() => props.row, getSelectName, { immediate: true });\n</script>\n\n<template>\n <template v-if=\"found\">\n <el-tree\n :default-checked-keys=\"formValue\"\n style=\"width: 100%\"\n :data=\"options\"\n :props=\"defaultTreeSelectProps\"\n node-key=\"id\"\n :multiple=\"props.field.multiple\"\n :render-after-expand=\"false\"\n check-on-click-node\n :expand-on-click-node=\"false\"\n default-expand-all\n highlight-current\n disabled=\"true\"\n :check-strictly=\"props.field.checkStrictly\"\n show-checkbox\n filterable\n />\n </template>\n <EmptyTip v-else :text=\"invalidTip\" />\n</template>\n\n<style scoped lang=\"scss\">\n.select-fields {\n display: inline-block;\n}\n\n.select-field {\n font-size: 12px;\n padding: 4px 6px;\n border-radius: 4px;\n}\n\n.found {\n color: #fff;\n}\n</style>\n","<template>\n <el-tree-select\n v-model=\"_form.value\"\n style=\"width: 100%\"\n :data=\"options\"\n :props=\"defaultTreeSelectProps\"\n node-key=\"id\"\n :multiple=\"props.field.multiple\"\n :render-after-expand=\"false\"\n check-on-click-node\n :expand-on-click-node=\"false\"\n default-expand-all\n highlight-current\n :disabled=\"props.field.disabled\"\n :check-strictly=\"props.field.checkStrictly\"\n remote\n show-checkbox\n filterable\n :remote-method=\"remoteSearch\"\n @check=\"change\"\n @change=\"change\"\n />\n</template>\n\n<script setup>\nimport { ElTreeSelect } from \"element-plus\";\nimport { reactive, watch, ref } from \"vue\";\nimport { useRoute } from \"vue-router\";\nimport { setupRouteQuery } from \"../../utils/route-query\";\n\nconst route = useRoute();\nconst routeQuery = setupRouteQuery(route);\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: Number,\n field: Object,\n disabled: Boolean,\n formData: Object,\n});\nconst _form = reactive({ value: props.modelValue });\nconst options = ref([]);\nconst defaultTreeSelectProps = {\n label: \"name\",\n children: \"children\",\n value: \"id\",\n};\n\nasync function remoteSearch(keyword) {\n options.value = await props.field.options(\n props.formData,\n routeQuery,\n keyword,\n );\n}\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\nremoteSearch();\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nclass TreeFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.options = rawConfig.options || (() => []);\n this.formChange = rawConfig.formChange || (() => {});\n this.multiple = this.defaultBy(rawConfig.multiple, false);\n this.checkStrictly = this.defaultBy(rawConfig.checkStrictly, true);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n\n this.checkValidProperties(rawConfig);\n }\n\n defaultConfig() {\n return {\n showInList: false,\n };\n }\n}\n\nexport default TreeFieldConfig;\n"],"names":["props","__props","formValue","ref","options","defaultTreeSelectProps","invalidTip","found","getSelectName","watch","route","useRoute","routeQuery","setupRouteQuery","emit","__emit","_form","reactive","remoteSearch","keyword","change","TreeFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GAQRC,IAAYC,EAAI,CAAA,CAAE,GAClBC,IAAUD,EAAI,CAAA,CAAE,GAChBE,IAAyB;AAAA,MAC7B,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OAAO;AAAA,IACT,GACMC,IAAaH,EAAI,KAAK,GACtBI,IAAQJ,EAAI,EAAK;AACT,IAAAA,EAAI,EAAE;AAEpB,mBAAeK,IAAgB;AAC7B,MAAAN,EAAU,QAAQF,EAAM,IAAIA,EAAM,MAAM,IAAI,GAC5CI,EAAQ,QAAQ,MAAMJ,EAAM,MAAM,QAAO,GA0BzCO,EAAM,QAAQ;AAAA,IAChB;AAEA,WAAAE,EAAM,MAAMT,EAAM,KAAKQ,GAAe,EAAE,WAAW,GAAI,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BzD,UAAME,IAAQC,EAAQ,GAChBC,IAAaC,EAAgBH,CAAK,GAClCI,IAAOC,GACPf,IAAQC,GAMRe,IAAQC,EAAS,EAAE,OAAOjB,EAAM,WAAY,CAAA,GAC5CI,IAAUD,EAAI,CAAA,CAAE,GAChBE,IAAyB;AAAA,MAC7B,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OAAO;AAAA,IACT;AAEA,mBAAea,EAAaC,GAAS;AACnC,MAAAf,EAAQ,QAAQ,MAAMJ,EAAM,MAAM;AAAA,QAChCA,EAAM;AAAA,QACNY;AAAA,QACAO;AAAA,MACJ;AAAA,IACA;AAEA,aAASC,IAAS;AAChB,MAAAN,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAP;AAAA,MACE,MAAMT,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAgB,EAAM,QAAQhB,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB,GACAkB;;;;;;;;;;;;;;;;;;;;;;;;AC9DA,MAAMG,UAAwBC,EAAgB;AAAA,EAC5C,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUD,EAAU,YAAY,MAAM,CAAE,IAC7C,KAAK,aAAaA,EAAU,eAAe,MAAM;AAAA,IAAE,IACnD,KAAK,WAAW,KAAK,UAAUA,EAAU,UAAU,EAAK,GACxD,KAAK,gBAAgB,KAAK,UAAUA,EAAU,eAAe,EAAI,GACjE,KAAK,UAAUE,GACf,KAAK,SAASC,GAEd,KAAK,qBAAqBH,CAAS;AAAA,EACpC;AAAA,EAED,gBAAgB;AACd,WAAO;AAAA,MACL,YAAY;AAAA,IAClB;AAAA,EACG;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as p, _ as f, B as h } from "./index-
|
|
1
|
+
import { E as p, _ as f, B as h } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as r, watch as u, openBlock as s, createElementBlock as _, toDisplayString as v, createBlock as c, reactive as y, unref as V } from "vue";
|
|
3
3
|
import { ElDatePicker as D } from "element-plus";
|
|
4
4
|
const Y = { key: 0 }, b = {
|
|
@@ -61,4 +61,4 @@ class w extends h {
|
|
|
61
61
|
export {
|
|
62
62
|
w as default
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=config-
|
|
64
|
+
//# sourceMappingURL=config-Dlxkoyyf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-Dlxkoyyf.js","sources":["../src/framework/field/datetime/FieldDisplay.vue","../src/framework/field/datetime/FieldEditor.vue","../src/framework/field/datetime/config.js"],"sourcesContent":["<script setup>\nimport EmptyTip from \"../../component/EmptyTip.vue\";\nimport { ref, watch } from \"vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\nconst isEmpty = ref(false);\nconst formattedValue = ref(\"...\");\n\nasync function getTime() {\n const value = props.row[props.field.code];\n\n if (value === undefined || value === null) {\n isEmpty.value = true;\n } else if (`${value}`.trim() === \"\") {\n isEmpty.value = true;\n } else {\n formattedValue.value = value;\n isEmpty.value = false;\n }\n}\n\nwatch(() => props.row, getTime, { immediate: true });\n</script>\n\n<template>\n <span v-if=\"!isEmpty\">\n {{ formattedValue }}\n </span>\n <EmptyTip v-else />\n</template>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <el-date-picker\n v-model=\"_form.value\"\n :disabled=\"props.disabled\"\n type=\"datetime\"\n format=\"YYYY-MM-DD HH:mm:ss\"\n value-format=\"YYYY-MM-DD HH:mm:ss\"\n :placeholder=\"field.placeholder\"\n @change=\"change\"\n />\n</template>\n\n<script setup>\nimport { ElDatePicker } from \"element-plus\";\nimport { reactive, watch } from \"vue\";\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: String,\n field: Object,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\">\n:deep(.el-date-editor) {\n width: 100% !important;\n}\n</style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class DatetimeFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n this.width = this.computeWidth(rawConfig);\n\n this.checkValidProperties(rawConfig);\n }\n\n computeWidth(rawConfig) {\n if (rawConfig.width) {\n return rawConfig.width;\n }\n\n return 200;\n }\n}\n"],"names":["props","__props","isEmpty","ref","formattedValue","getTime","value","watch","emit","__emit","_form","reactive","change","DatetimeFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;AAIA,UAAMA,IAAQC,GAQRC,IAAUC,EAAI,EAAK,GACnBC,IAAiBD,EAAI,KAAK;AAEhC,mBAAeE,IAAU;AACvB,YAAMC,IAAQN,EAAM,IAAIA,EAAM,MAAM,IAAI;AAExC,MAA2BM,KAAU,QAE1B,GAAGA,CAAK,GAAG,KAAI,MAAO,KAD/BJ,EAAQ,QAAQ,MAIhBE,EAAe,QAAQE,GACvBJ,EAAQ,QAAQ;AAAA,IAEpB;AAEA,WAAAK,EAAM,MAAMP,EAAM,KAAKK,GAAS,EAAE,WAAW,GAAI,CAAE;;;;;;;;;;;ACZnD,UAAMG,IAAOC,GACPT,IAAQC,GAKRS,IAAQC,EAAS,EAAE,OAAOX,EAAM,WAAY,CAAA;AAElD,aAASY,IAAS;AAChB,MAAAJ,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAH;AAAA,MACE,MAAMP,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAU,EAAM,QAAQV,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;;AC9Be,MAAMa,UAA4BC,EAAgB;AAAA,EAC/D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUC,GACf,KAAK,SAASC,GACd,KAAK,QAAQ,KAAK,aAAaH,CAAS,GAExC,KAAK,qBAAqBA,CAAS;AAAA,EACpC;AAAA,EAED,aAAaA,GAAW;AACtB,WAAIA,EAAU,QACLA,EAAU,QAGZ;AAAA,EACR;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as f, B as h } from "./index-
|
|
1
|
+
import { _ as f, B as h } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as d, watch as p, openBlock as i, createElementBlock as n, normalizeClass as g, createBlock as u, unref as m, withCtx as y, createElementVNode as a, toDisplayString as b, pushScopeId as w, popScopeId as S, defineAsyncComponent as V, reactive as I } from "vue";
|
|
3
3
|
import { ElImage as k } from "element-plus";
|
|
4
4
|
const _ = (t) => (w("data-v-3b7cda77"), t = t(), S(), t), x = { class: "loading-error" }, B = /* @__PURE__ */ _(() => /* @__PURE__ */ a("div", null, "加载失败", -1)), F = {
|
|
@@ -58,7 +58,7 @@ const _ = (t) => (w("data-v-3b7cda77"), t = t(), S(), t), x = { class: "loading-
|
|
|
58
58
|
},
|
|
59
59
|
emits: ["update:modelValue"],
|
|
60
60
|
setup(t, { emit: e }) {
|
|
61
|
-
const o = V(() => import("./ImageUploader-
|
|
61
|
+
const o = V(() => import("./ImageUploader-BAOSCt4w.js")), l = e, s = t, r = I({ value: s.modelValue });
|
|
62
62
|
function v(c) {
|
|
63
63
|
l("update:modelValue", c);
|
|
64
64
|
}
|
|
@@ -83,4 +83,4 @@ class U extends h {
|
|
|
83
83
|
export {
|
|
84
84
|
U as default
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=config-
|
|
86
|
+
//# sourceMappingURL=config-ELkAYfby.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-ELkAYfby.js","sources":["../src/framework/field/image/FieldDisplay.vue","../src/framework/field/image/FieldEditor.vue","../src/framework/field/image/config.js"],"sourcesContent":["<script setup>\nimport { ElImage } from \"element-plus\";\nimport { watch, ref } from \"vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n mode: {\n type: String,\n },\n});\n\nconst url = ref(null);\nconst urls = ref([]);\n\nwatch(\n () => props.row,\n () => {\n url.value = props.row[props.field.code];\n urls.value = [props.row[props.field.code]];\n },\n { immediate: true },\n);\n</script>\n\n<template>\n <div :class=\"`image-card ${props.mode}`\">\n <el-image\n v-if=\"url\"\n :src=\"url\"\n preview-teleported\n fit=\"contain\"\n :preview-src-list=\"urls\"\n class=\"image\"\n >\n <template #error>\n <div class=\"loading-error\">\n <div>加载失败</div>\n <div>{{ url }}</div>\n </div>\n </template>\n </el-image>\n <div v-else class=\"loading-error\">\n <div>暂无</div>\n </div>\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n.image-card {\n width: 100%;\n height: 200px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: #eee;\n border: 1px solid #ddd;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.image {\n width: 100%;\n height: 100%;\n}\n\n.list {\n height: 50px;\n}\n\n.extend {\n width: 200px;\n height: 200px;\n}\n\n.loading-error {\n width: 100%;\n height: 100%;\n min-height: 50px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: var(--el-color-error);\n color: var(--el-color-white);\n}\n</style>\n","<template>\n <ImageUploader\n :image-url=\"_form.value\"\n :disabled=\"props.disabled\"\n @on-success=\"change\"\n />\n</template>\n\n<script setup>\nimport { reactive, defineAsyncComponent, watch } from \"vue\";\n\nconst ImageUploader = defineAsyncComponent(() => {\n return import(\"./ImageUploader.vue\");\n});\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: String,\n field: Object,\n type: String,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change(image) {\n emit(\"update:modelValue\", image);\n}\n\nwatch(\n () => props.modelValue,\n async () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class ImageFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n\n this.checkValidProperties(rawConfig);\n }\n}\n"],"names":["props","__props","url","ref","urls","watch","ImageUploader","defineAsyncComponent","emit","__emit","_form","reactive","change","image","ImageFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,UAAMA,IAAQC,GAYRC,IAAMC,EAAI,IAAI,GACdC,IAAOD,EAAI,CAAA,CAAE;AAEnB,WAAAE;AAAA,MACE,MAAML,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAE,EAAI,QAAQF,EAAM,IAAIA,EAAM,MAAM,IAAI,GACtCI,EAAK,QAAQ,CAACJ,EAAM,IAAIA,EAAM,MAAM,IAAI,CAAC;AAAA,MAC1C;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfA,UAAMM,IAAgBC,EAAqB,MAClC,OAAO,6BAAqB,CACpC,GAEKC,IAAOC,GACPT,IAAQC,GAMRS,IAAQC,EAAS,EAAE,OAAOX,EAAM,WAAY,CAAA;AAElD,aAASY,EAAOC,GAAO;AACrB,MAAAL,EAAK,qBAAqBK,CAAK;AAAA,IACjC;AAEA,WAAAR;AAAA,MACE,MAAML,EAAM;AAAA,MACZ,YAAY;AACV,QAAAU,EAAM,QAAQV,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;AC9Be,MAAMc,UAAyBC,EAAgB;AAAA,EAC5D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUC,GACf,KAAK,SAASC,GAEd,KAAK,qBAAqBH,CAAS;AAAA,EACpC;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as f, f as _, q as h, B as V } from "./index-
|
|
1
|
+
import { e as f, f as _, q as h, B as V } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { computed as y, openBlock as s, createElementBlock as v, createBlock as i, unref as l, withCtx as c, createVNode as u, reactive as b, watch as B } from "vue";
|
|
3
3
|
import { ElIcon as r, ElSwitch as k } from "element-plus";
|
|
4
4
|
import "./el-switch-l0sNRNKZ.js";
|
|
@@ -81,4 +81,4 @@ class D extends V {
|
|
|
81
81
|
export {
|
|
82
82
|
D as default
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=config-
|
|
84
|
+
//# sourceMappingURL=config-JsPZV_67.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-JsPZV_67.js","sources":["../src/framework/field/boolean/FieldDisplay.vue","../src/framework/field/boolean/FieldEditor.vue","../src/framework/field/boolean/config.js"],"sourcesContent":["<template>\n <span style=\"display: flex; align-items: center\">\n <el-icon v-if=\"value == true\" color=\"#529b2e\" :size=\"20\">\n <SuccessFilled />\n </el-icon>\n <el-icon v-else-if=\"value == false\" color=\"#F56C6C\" :size=\"20\">\n <CircleCloseFilled />\n </el-icon>\n <el-icon v-else color=\"#73767a\" :size=\"20\">\n <QuestionFilled />\n </el-icon>\n </span>\n</template>\n\n<script setup>\nimport { ElIcon } from \"element-plus\";\nimport { computed } from \"vue\";\nimport {\n SuccessFilled,\n CircleCloseFilled,\n QuestionFilled,\n} from \"@element-plus/icons-vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\n\nconst value = computed(() => {\n return props.row[props.field.code];\n});\n</script>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <el-switch\n v-model=\"_form.value\"\n :disabled=\"props.disabled\"\n @change=\"change\"\n />\n</template>\n\n<script setup>\nimport { ElSwitch } from \"element-plus\";\nimport { reactive, watch } from \"vue\";\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: Boolean,\n field: Object,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class BooleanFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.default = rawConfig.default || false;\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n this.formChange = rawConfig.formChange || (() => {});\n\n this.checkValidProperties(rawConfig);\n }\n}\n"],"names":["props","__props","value","computed","emit","__emit","_form","reactive","change","watch","BooleanFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;;AAuBA,UAAMA,IAAQC,GASRC,IAAQC,EAAS,MACdH,EAAM,IAAIA,EAAM,MAAM,IAAI,CAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtBD,UAAMI,IAAOC,GACPL,IAAQC,GAKRK,IAAQC,EAAS,EAAE,OAAOP,EAAM,WAAY,CAAA;AAElD,aAASQ,IAAS;AAChB,MAAAJ,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAG;AAAA,MACE,MAAMT,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAM,EAAM,QAAQN,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;AC1Be,MAAMU,UAA2BC,EAAgB;AAAA,EAC9D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUD,EAAU,WAAW,IACpC,KAAK,UAAUE,GACf,KAAK,SAASC,GACd,KAAK,aAAaH,EAAU,eAAe,MAAM;AAAA,IAAE,IAEnD,KAAK,qBAAqBA,CAAS;AAAA,EACpC;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as p, B as f } from "./index-
|
|
1
|
+
import { E as p, B as f } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { ref as d, watch as u, openBlock as r, createElementBlock as h, toDisplayString as v, createBlock as m, reactive as _, unref as y } from "vue";
|
|
3
3
|
import { ElTimePicker as V } from "element-plus";
|
|
4
4
|
const b = { key: 0 }, k = {
|
|
@@ -59,4 +59,4 @@ class T extends f {
|
|
|
59
59
|
export {
|
|
60
60
|
T as default
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=config-
|
|
62
|
+
//# sourceMappingURL=config-KNKAglrH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-KNKAglrH.js","sources":["../src/framework/field/time/FieldDisplay.vue","../src/framework/field/time/FieldEditor.vue","../src/framework/field/time/config.js"],"sourcesContent":["<script setup>\nimport EmptyTip from \"../../component/EmptyTip.vue\";\nimport { ref, watch } from \"vue\";\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\nconst isEmpty = ref(false);\nconst formattedValue = ref(\"...\");\n\nasync function getTime() {\n const value = props.row[props.field.code];\n\n if (value === undefined || value === null) {\n isEmpty.value = true;\n } else if (`${value}`.trim() === \"\") {\n isEmpty.value = true;\n } else {\n formattedValue.value = value;\n isEmpty.value = false;\n }\n}\n\nwatch(() => props.row, getTime, { immediate: true });\n</script>\n\n<template>\n <span v-if=\"!isEmpty\">\n {{ formattedValue }}\n </span>\n <EmptyTip v-else />\n</template>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <el-time-picker\n v-model=\"_form.value\"\n :disabled=\"props.disabled\"\n :format=\"props.field.format\"\n :value-format=\"props.field.format\"\n @change=\"change\"\n >\n </el-time-picker>\n</template>\n\n<script setup>\nimport { ElTimePicker } from \"element-plus\";\nimport { reactive, watch } from \"vue\";\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: String,\n field: Object,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change() {\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class TimeFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n this.width = this.computeWidth(rawConfig);\n\n this.checkValidProperties(rawConfig);\n }\n\n computeWidth(rawConfig) {\n if (rawConfig.width) {\n return rawConfig.width;\n }\n\n return 200;\n }\n}\n"],"names":["props","__props","isEmpty","ref","formattedValue","getTime","value","watch","emit","__emit","_form","reactive","change","TimeFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;;AAIA,UAAMA,IAAQC,GAQRC,IAAUC,EAAI,EAAK,GACnBC,IAAiBD,EAAI,KAAK;AAEhC,mBAAeE,IAAU;AACvB,YAAMC,IAAQN,EAAM,IAAIA,EAAM,MAAM,IAAI;AAExC,MAA2BM,KAAU,QAE1B,GAAGA,CAAK,GAAG,KAAI,MAAO,KAD/BJ,EAAQ,QAAQ,MAIhBE,EAAe,QAAQE,GACvBJ,EAAQ,QAAQ;AAAA,IAEpB;AAEA,WAAAK,EAAM,MAAMP,EAAM,KAAKK,GAAS,EAAE,WAAW,GAAI,CAAE;;;;;;;;;;;ACbnD,UAAMG,IAAOC,GACPT,IAAQC,GAKRS,IAAQC,EAAS,EAAE,OAAOX,EAAM,WAAY,CAAA;AAElD,aAASY,IAAS;AAChB,MAAAJ,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAH;AAAA,MACE,MAAMP,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAU,EAAM,QAAQV,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;AC7Be,MAAMa,UAAwBC,EAAgB;AAAA,EAC3D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUC,GACf,KAAK,SAASC,GACd,KAAK,QAAQ,KAAK,aAAaH,CAAS,GAExC,KAAK,qBAAqBA,CAAS;AAAA,EACpC;AAAA,EAED,aAAaA,GAAW;AACtB,WAAIA,EAAU,QACLA,EAAU,QAGZ;AAAA,EACR;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as V, B as y } from "./index-
|
|
1
|
+
import { E as V, B as y } from "./index-BJmwYFGo.js";
|
|
2
2
|
import { defineAsyncComponent as c, ref as m, watch as p, openBlock as i, createBlock as s, unref as f, reactive as b } from "vue";
|
|
3
3
|
const h = {
|
|
4
4
|
__name: "FieldDisplay",
|
|
@@ -73,4 +73,4 @@ class k extends y {
|
|
|
73
73
|
export {
|
|
74
74
|
k as default
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=config-
|
|
76
|
+
//# sourceMappingURL=config-PwTun2Fq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-PwTun2Fq.js","sources":["../src/framework/field/json/FieldDisplay.vue","../src/framework/field/json/FieldEditor.vue","../src/framework/field/json/config.js"],"sourcesContent":["<script setup>\nimport { defineAsyncComponent, ref, watch } from \"vue\";\nimport EmptyTip from \"../../component/EmptyTip.vue\";\n\nconst JsonEditorVue = defineAsyncComponent(() => {\n return import(\"json-editor-vue\");\n});\n\nconst props = defineProps({\n field: {\n type: Object,\n },\n row: {\n type: Object,\n },\n});\n\nconst valid = ref(false);\nconst formattedValue = ref(\"加载中...\");\n\nwatch(\n () => props.row,\n () => {\n valid.value = false;\n const value = props.row[props.field.code];\n if (value === undefined || value === null) {\n return;\n }\n\n if (`${value}`.trim() === \"\") {\n return;\n }\n\n valid.value = true;\n formattedValue.value = value;\n },\n { immediate: true },\n);\n</script>\n\n<template>\n <JsonEditorVue\n v-if=\"valid\"\n v-model=\"formattedValue\"\n mode=\"text\"\n :main-menu-bar=\"false\"\n :navigation-bar=\"false\"\n :read-only=\"true\"\n />\n <EmptyTip v-else />\n</template>\n\n<style scoped lang=\"scss\"></style>\n","<template>\n <JsonEditorVue\n v-model=\"_form.value\"\n style=\"width: 100%; height: 300px\"\n mode=\"text\"\n :main-menu-bar=\"false\"\n :navigation-bar=\"false\"\n @change=\"change\"\n />\n</template>\n\n<script setup>\nimport { reactive, watch, defineAsyncComponent } from \"vue\";\n\nconst JsonEditorVue = defineAsyncComponent(() => {\n return import(\"json-editor-vue\");\n});\n\nconst emit = defineEmits([\"update:modelValue\"]);\nconst props = defineProps({\n modelValue: Object,\n field: Object,\n disabled: Boolean,\n});\nconst _form = reactive({ value: props.modelValue });\n\nfunction change(value) {\n _form.value = value.text;\n emit(\"update:modelValue\", _form.value);\n}\n\nwatch(\n () => props.modelValue,\n () => {\n _form.value = props.modelValue;\n },\n { immediate: true },\n);\n</script>\n\n<style scoped lang=\"scss\"></style>\n","import BaseFieldConfig from \"../base-field-config\";\nimport FieldDisplay from \"./FieldDisplay.vue\";\nimport FieldEditor from \"./FieldEditor.vue\";\n\nexport default class JsonFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.display = FieldDisplay;\n this.editor = FieldEditor;\n\n this.checkValidProperties(rawConfig);\n }\n\n defaultConfig() {\n return {\n showInList: false,\n };\n }\n}\n"],"names":["JsonEditorVue","defineAsyncComponent","props","__props","valid","ref","formattedValue","watch","value","emit","__emit","_form","reactive","change","JsonFieldConfig","BaseFieldConfig","rawConfig","domain","FieldDisplay","FieldEditor"],"mappings":";;;;;;;;;;;;;AAIA,UAAMA,IAAgBC,EAAqB,MAClC,OAAO,iBAAiB,CAChC,GAEKC,IAAQC,GASRC,IAAQC,EAAI,EAAK,GACjBC,IAAiBD,EAAI,QAAQ;AAEnC,WAAAE;AAAA,MACE,MAAML,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAE,EAAM,QAAQ;AACd,cAAMI,IAAQN,EAAM,IAAIA,EAAM,MAAM,IAAI;AACxC,QAA2BM,KAAU,QAIjC,GAAGA,CAAK,GAAG,KAAI,MAAO,OAI1BJ,EAAM,QAAQ,IACdE,EAAe,QAAQE;AAAA,MACxB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;;;;;;;;;ACvBA,UAAMR,IAAgBC,EAAqB,MAClC,OAAO,iBAAiB,CAChC,GAEKQ,IAAOC,GACPR,IAAQC,GAKRQ,IAAQC,EAAS,EAAE,OAAOV,EAAM,WAAY,CAAA;AAElD,aAASW,EAAOL,GAAO;AACrB,MAAAG,EAAM,QAAQH,EAAM,MACpBC,EAAK,qBAAqBE,EAAM,KAAK;AAAA,IACvC;AAEA,WAAAJ;AAAA,MACE,MAAML,EAAM;AAAA,MACZ,MAAM;AACJ,QAAAS,EAAM,QAAQT,EAAM;AAAA,MACrB;AAAA,MACD,EAAE,WAAW,GAAM;AAAA,IACrB;;;;;;;;;;;ACjCe,MAAMY,UAAwBC,EAAgB;AAAA,EAC3D,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,UAAUC,GACf,KAAK,SAASC,GAEd,KAAK,qBAAqBH,CAAS;AAAA,EACpC;AAAA,EAED,gBAAgB;AACd,WAAO;AAAA,MACL,YAAY;AAAA,IAClB;AAAA,EACG;AACH;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as o } from "./index-
|
|
1
|
+
import { B as o } from "./index-BJmwYFGo.js";
|
|
2
2
|
class p extends o {
|
|
3
3
|
constructor(e, t) {
|
|
4
4
|
super(e, t), this.component = e.component, this.display = e.component, this.editor = e.component, this.checkValidProperties(e);
|
|
@@ -7,4 +7,4 @@ class p extends o {
|
|
|
7
7
|
export {
|
|
8
8
|
p as default
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=config-
|
|
10
|
+
//# sourceMappingURL=config-y0AnFmt0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-y0AnFmt0.js","sources":["../src/framework/field/component/config.js"],"sourcesContent":["import BaseFieldConfig from \"../base-field-config\";\n\nexport default class ComponentFieldConfig extends BaseFieldConfig {\n constructor(rawConfig, domain) {\n super(rawConfig, domain);\n this.component = rawConfig.component;\n this.display = rawConfig.component;\n this.editor = rawConfig.component;\n\n this.checkValidProperties(rawConfig);\n }\n}\n"],"names":["ComponentFieldConfig","BaseFieldConfig","rawConfig","domain"],"mappings":";AAEe,MAAMA,UAA6BC,EAAgB;AAAA,EAChE,YAAYC,GAAWC,GAAQ;AAC7B,UAAMD,GAAWC,CAAM,GACvB,KAAK,YAAYD,EAAU,WAC3B,KAAK,UAAUA,EAAU,WACzB,KAAK,SAASA,EAAU,WAExB,KAAK,qBAAqBA,CAAS;AAAA,EACpC;AACH;"}
|
|
@@ -2009,7 +2009,7 @@ const st = {
|
|
|
2009
2009
|
"input-number": { config: "input-number" }
|
|
2010
2010
|
};
|
|
2011
2011
|
async function Gt(t, e, n) {
|
|
2012
|
-
const s = await Zo(/* @__PURE__ */ Object.assign({ "./field/attachment/config.js": () => import("./config-
|
|
2012
|
+
const s = await Zo(/* @__PURE__ */ Object.assign({ "./field/attachment/config.js": () => import("./config-BEFzrL_I.js"), "./field/belongs-to/config.js": () => import("./config-CN7BOn4v.js"), "./field/boolean/config.js": () => import("./config-JsPZV_67.js"), "./field/cascader/config.js": () => import("./config-BAO6yAAj.js"), "./field/component/config.js": () => import("./config-y0AnFmt0.js"), "./field/date/config.js": () => import("./config-CsDIc4zS.js"), "./field/datetime/config.js": () => import("./config-Dlxkoyyf.js"), "./field/image/config.js": () => import("./config-ELkAYfby.js"), "./field/images/config.js": () => import("./config-Cy7TPXIU.js"), "./field/input-number/config.js": () => import("./config-Ct2LlGak.js"), "./field/json/config.js": () => import("./config-PwTun2Fq.js"), "./field/radio-group/config.js": () => import("./config-C9LtXS-k.js"), "./field/rich-text/config.js": () => import("./config-CPq56A6U.js"), "./field/row-id/config.js": () => import("./config-C0-2c0oG.js"), "./field/select/config.js": () => import("./config-BUb73Jjn.js"), "./field/string/config.js": () => import("./config-DUey9IlS.js"), "./field/switch/config.js": () => import("./config-DBdq-WLb.js"), "./field/text/config.js": () => import("./config-Cy2WJfHU.js"), "./field/time/config.js": () => import("./config-KNKAglrH.js"), "./field/tree-select/config.js": () => import("./config-DkHNC_jv.js") }), `./field/${t}/config.js`, 4);
|
|
2013
2013
|
return new s.default(e, n);
|
|
2014
2014
|
}
|
|
2015
2015
|
function Kt(t, e = "unknown") {
|
|
@@ -2740,7 +2740,7 @@ const Se = {
|
|
|
2740
2740
|
},
|
|
2741
2741
|
emits: ["update:modelValue"],
|
|
2742
2742
|
setup(t, { emit: e }) {
|
|
2743
|
-
const n = Zn(() => import("./ImagesUploader-
|
|
2743
|
+
const n = Zn(() => import("./ImagesUploader-Cz7xW0aH.js")), s = He().fileUploadUrl, o = e, r = t, a = xe({ value: r.modelValue }), i = r.field.converter;
|
|
2744
2744
|
function d(l) {
|
|
2745
2745
|
let c = -1;
|
|
2746
2746
|
l.id && (c = a.value.findIndex((b) => b.id === l.id)), l.url && (c = a.value.findIndex((b) => b.url === l.url)), c >= 0 && (a.value.splice(c, 1), o("update:modelValue", a.value));
|
|
@@ -5739,4 +5739,4 @@ export {
|
|
|
5739
5739
|
cl as y,
|
|
5740
5740
|
pl as z
|
|
5741
5741
|
};
|
|
5742
|
-
//# sourceMappingURL=index-
|
|
5742
|
+
//# sourceMappingURL=index-BJmwYFGo.js.map
|