diff --git a/components-diy/diy-form.vue b/components-diy/diy-form.vue index 14c2300..480937d 100644 --- a/components-diy/diy-form.vue +++ b/components-diy/diy-form.vue @@ -209,6 +209,10 @@ export default { // 占位符:遗漏会被 ns-newform SCSS 默认值回退覆盖 placeholderColor: pick('placeholderColor', 'placeholder_color'), placeholderFontSize: pick('placeholderFontSize', 'placeholder_font_size'), + // textarea 显示行数 / 行高(透传给 ns-newform,与 ns-form 保持一致) + // 不传时 ns-newform 走自己的默认 4 行 / 44rpx + textareaRows: pick('textareaRows', 'textarea_rows'), + textareaLineHeight: pick('textareaLineHeight', 'textarea_line_height'), // 输入框视觉增强(与 ns-newform 对齐) inputBorderColor: pick('inputBorderColor', 'input_border_color'), inputBgColor: pick('inputBgColor', 'input_bg_color'), diff --git a/components/ns-form/ns-form.vue b/components/ns-form/ns-form.vue index b7f187b..a3f1cb4 100644 --- a/components/ns-form/ns-form.vue +++ b/components/ns-form/ns-form.vue @@ -26,38 +26,17 @@ {{ item.value.required ? '*' : '' }} - - + - - - - - - - - - - @@ -301,6 +280,11 @@ checkedColor: '#ff4544', placeholderColor: '#909399', placeholderFontSize: 28, + // textarea 显示行数 / 行高(与 ns-newform 对齐) + // 改用 :rows + line-height 驱动高度:rows 给原生 @@ -377,6 +383,10 @@ export default { checkedColor: '#ff4544', placeholderColor: '#ddd', placeholderFontSize: 28, + // textarea 显示行数 / 行高(与 ns-form 保持一致,由 formConfig 覆盖) + // 改用 :rows + line-height 驱动高度,rows 给原生