From 82a9801ac617107666ce5e44aded2d98ea2ee63b Mon Sep 17 00:00:00 2001 From: chenxing Date: Thu, 15 Oct 2026 21:24:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(p88-fill):=20=E5=A1=AB=E6=8A=A5=E9=A1=B5?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=B1=BB=E5=AD=97=E6=AE=B5=E6=8A=8A=20InputE?= =?UTF-8?q?vent=20=E5=AD=98=E8=BF=9B=E5=80=BC=20+=20=E5=A3=B3=E5=86=85?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E6=94=B6=E7=BC=A9=E6=88=90=E7=AA=84=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [object InputEvent]:text/textarea/phone 三个控件在 view-ui-plus Input 上 监听 @input——该组件 emits 表里没有 input(源码取证:on-*/update:modelValue), 监听器穿透到根元素收原生 InputEvent,事件对象被当作字段值写入答卷, 提交即被后端值类型校验拒(「字段「单行文本」必须是字符串」)。 值通道改 @update:model-value;其余六类控件走 @on-change 取值本就正确未动。 - 窄卡:base.layout.css 把 .yh-fill 定为纵向 flex 卡片模型,flex 子项水平 margin:auto 放弃 stretch 收缩到内容宽(~300px)。Fill 卡片改 width:100% + max-width:800px + align-self:center,底色/边框/外距交还平台卡片规则; 同叶删掉 min-height:100vh(壳内双滚动来源),嵌入态 fill-plain 不受影响。 - 验证:view-ui-plus 源码 emits 表逐控件核对;vue-tsc + vite build 双绿。 --- src/components/fields/phone/pc.vue | 3 ++- src/components/fields/text/pc.vue | 4 +++- src/components/fields/textarea/pc.vue | 3 ++- src/views/Fill.vue | 15 ++++++--------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/fields/phone/pc.vue b/src/components/fields/phone/pc.vue index 475d03f..466c5c8 100644 --- a/src/components/fields/phone/pc.vue +++ b/src/components/fields/phone/pc.vue @@ -24,6 +24,7 @@ function onInput(val: string) { \ No newline at end of file diff --git a/src/components/fields/text/pc.vue b/src/components/fields/text/pc.vue index 1b340f2..e760da7 100644 --- a/src/components/fields/text/pc.vue +++ b/src/components/fields/text/pc.vue @@ -24,6 +24,8 @@ function onInput(val: string) { \ No newline at end of file diff --git a/src/components/fields/textarea/pc.vue b/src/components/fields/textarea/pc.vue index a1d6353..7d61131 100644 --- a/src/components/fields/textarea/pc.vue +++ b/src/components/fields/textarea/pc.vue @@ -24,6 +24,7 @@ function onInput(val: string) { \ No newline at end of file diff --git a/src/views/Fill.vue b/src/views/Fill.vue index 2694c4a..fe21cb4 100644 --- a/src/views/Fill.vue +++ b/src/views/Fill.vue @@ -399,17 +399,14 @@ const readonlyReason = computed(() => { padding: 16px; } -.page-wrapper.yh-fill { - min-height: 100vh; - background: #f5f7f9; -} - +/* 壳内渲染吃平台的卡片模型(base.layout.css:.yh-fill=纵向 flex、.main-container=卡片 + 自带底色/边框/16px 外距),这里只做定宽居中。P88 窄卡根因:flex 子项水平 margin:auto + 会放弃 stretch、收缩到内容宽(~300px),所以用 width:100% + align-self:center 定宽, + 外距与底色留给平台,嵌入态(fill-plain)不受影响。 */ .main-container { + width: 100%; max-width: 800px; - margin: 0 auto; - padding: 24px; - background: white; - border-radius: 4px; + align-self: center; } .loading-state,