From 3089f8911eb7648ac5c96c5639113586124bbec4 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Tue, 23 Jul 2024 11:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/tenant/index.vue | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 95d4786f..37b6acac 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -228,7 +228,10 @@ const modalStateTypeFrom = Form.useForm( max: 50, message: t('views.system.tenant.key') + t('common.unableNull'), }, - { pattern: /^[a-zA-Z0-9]+$/, message: t('views.system.tenant.patternTip') }, + { + pattern: /^[a-zA-Z0-9]+$/, + message: t('views.system.tenant.patternTip'), + }, ], radioType: [ { @@ -581,6 +584,9 @@ function fnModalTypeOk() { content: `${res.msg}`, duration: 2, }); + // 去除百分号 + modalState.typeFrom.tenancyKey = + modalState.typeFrom.tenancyKey.replace(/%/g, ''); } }) .finally(() => { @@ -651,16 +657,7 @@ function fnTypeChange(value: any) { keyTip.value = tipMapping[value]; } -//限制不给输入百分号 -function handleInputChange(value: any) { - // 去掉百分号 - const filteredValue = value.data.replace('%', ''); - console.log('filteredValue', filteredValue); - if (filteredValue) modalState.typeFrom.tenancyKey += filteredValue; - // 更新数据模型 - //modalState.typeFrom.tenancyKey = filteredValue; -} //为后续批量请求使用 let promises = ref([]); @@ -1047,7 +1044,6 @@ onMounted(() => { v-model:value="modalState.typeFrom.tenancyKey" allow-clear style="width: 80%" - @change="handleInputChange" >