|
@@ -205,6 +205,9 @@
|
|
|
<el-input
|
|
|
v-model="item.product_name"
|
|
|
placeholder="请输入产品名称"
|
|
|
+ @input="
|
|
|
+ ($e) => inputFilter($e, forms[index], 'product_name')
|
|
|
+ "
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<div
|
|
@@ -230,6 +233,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_url"
|
|
|
placeholder="请输入产品链接"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_url')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -276,6 +280,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_size"
|
|
|
placeholder="请输入尺寸"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_size')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -298,6 +303,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_hd"
|
|
|
placeholder="请输入厚度"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_hd')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -320,6 +326,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_capacity"
|
|
|
placeholder="请输入容量"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_capacity')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -342,6 +349,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_material"
|
|
|
placeholder="请输入材质"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_material')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -364,6 +372,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_battery"
|
|
|
placeholder="是否带电池"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_battery')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -386,6 +395,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_require_print"
|
|
|
placeholder="请输入要求"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_require_print')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -410,6 +420,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_color"
|
|
|
placeholder="请输入颜色"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_color')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -432,6 +443,7 @@
|
|
|
<el-input
|
|
|
v-model="item.product_require_color"
|
|
|
placeholder="请输入颜色定制要求"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_require_color')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -458,6 +470,7 @@
|
|
|
placeholder="其他信息"
|
|
|
type="textarea"
|
|
|
:rows="3"
|
|
|
+ @input="($e) => inputFilter($e, forms[index], 'product_other')"
|
|
|
></el-input>
|
|
|
<div
|
|
|
v-if="index < forms.length - 1"
|
|
@@ -1413,6 +1426,13 @@ const createQuoteFunc = function () {
|
|
|
close()
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+const inputFilter = (value: string, target: any, key: string) => {
|
|
|
+ target[key] = value
|
|
|
+ .split('')
|
|
|
+ .filter((i) => i.charCodeAt(0) > 0 && i.charCodeAt(0) < 255)
|
|
|
+ .join('')
|
|
|
+}
|
|
|
// 用来动态绑定ref, 便于调用表单验证
|
|
|
const formRef = ref({} as any)
|
|
|
const getFormRef = (el: any, key: string) => {
|