From cff01c0108fc3d5c5cfa2bb53014df7a253db75c Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Sun, 11 Jan 2026 11:35:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/HandleFormItem.vue | 7 ++++--- src/components/Template/Step.vue | 1 + src/views/business/comps/template/mixins/templateMixin.js | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index 6d35314..34a5266 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -17,7 +17,7 @@ @input="onInputChange" @change="onInputChange" /> + :placeholder="getPlaceholder()" @change="onInputChange"> @@ -190,19 +190,21 @@ export default { // 用户输入密码并点击确定,保存修改 this.oldValue = this.inputValue; // 更新旧值 this.$emit("blur", val); + this.$emit('input', this.inputValue); this.$emit("change", val); // 调用后端接口记录修改记录 await this.saveModificationRecord(); } catch { // 用户点击取消,还原数据 this.inputValue = this.oldValue; - this.$emit('input', this.oldValue); // 触发 v-model 更新 + this.$emit('input', this.inputValue); // 触发 v-model 更新 this.$emit("blur", this.oldValue); this.$emit("change", this.oldValue); } } else { // 值没有变化,正常触发 blur和change 事件 this.$emit("blur", val) + // this.$emit('input', val); this.$emit("change", val) } }, @@ -339,7 +341,6 @@ export default { // 生成唯一字段ID (id + key值) getFieldId() { - // 使用写死的id作为示例,后续您可以用实际的id替换 const templateId = 'template_123'; // 这里是写死的id const fieldKey = this.item.key || this.item.prop || this.item.label || 'default_key'; diff --git a/src/components/Template/Step.vue b/src/components/Template/Step.vue index 123afa0..c8a9656 100644 --- a/src/components/Template/Step.vue +++ b/src/components/Template/Step.vue @@ -364,6 +364,7 @@ export default { .step-type-select{ width: 200px; margin-right: 10px; + max-width: 200px; } .delete-btn { color: #f56c6c; diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 0fedd5f..cacacf7 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -18,7 +18,7 @@ export default { if (v.bdnr) { this.formData = { ...n, ...JSON.parse(v.bdnr) }; } - + console.log(v,"formData from templateData") this.setTemplateData(n); } } @@ -31,8 +31,8 @@ export default { } }, mounted() { - this.setTemplateStatus("actFill"); - // this.setTemplateStatus(this.fillType); + // this.setTemplateStatus("actFill"); + this.setTemplateStatus(this.fillType); }, unmounted() { this.setTemplateStatus("");