全局添加输入框空格校验
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
{{ deviceData.appCheck }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-tabs v-model="dataSet" type="border-card" class="device-manage-box-card" @tab-click="handleClick">
|
||||
<el-tabs v-model.trim="dataSet" type="border-card" class="device-manage-box-card" @tab-click="handleClick">
|
||||
<el-tab-pane lazy :label="item.name" :name="item.id" v-for="(item, index) in deviceData.dataSetList"
|
||||
:key="index"></el-tab-pane>
|
||||
<div :style="{ height: tableHeight }" v-loading="tableLoading">
|
||||
@@ -207,19 +207,19 @@ const handleRestartDevice = () => {
|
||||
inputType: 'text',
|
||||
beforeClose: (action, instance, done) => {
|
||||
|
||||
if (action === 'confirm') {
|
||||
if (instance.inputValue == null) {
|
||||
return ElMessage.warning('请输入密码')
|
||||
} else if (instance.inputValue?.length > 32) {
|
||||
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
if (action === 'confirm') {
|
||||
if (instance.inputValue == null) {
|
||||
return ElMessage.warning('请输入密码')
|
||||
} else if (instance.inputValue?.length > 32) {
|
||||
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(({ value }) => {
|
||||
if (!value) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="cn-operate-dialog device-manage-popup" v-model="dialogVisible" title="设备模版分组">
|
||||
<el-dialog class="cn-operate-dialog device-manage-popup" v-model.trim="dialogVisible" title="设备模版分组">
|
||||
<el-descriptions class="mb10" :column="3" border>
|
||||
<el-descriptions-item label="名称">
|
||||
{{ popupData.deviceData.name }}
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-descriptions :title="'数据集名称: ' + popupData.dataSetName" size="small" :column="2" border>
|
||||
<template #extra>
|
||||
<div v-if="newGroupVisible" style="display: flex; align-items: center">
|
||||
<el-input maxlength="32" show-word-limit v-model="groupName" autocomplete="off" clearable
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="groupName" autocomplete="off" clearable
|
||||
placeholder="请输入分组名称"></el-input>
|
||||
<el-button class="ml10" ctype="primary" size="small" @click="newGroupVisible = false">取消</el-button>
|
||||
<el-button class="ml10" type="primary" size="small" @click="addNewGroup">完成</el-button>
|
||||
@@ -35,7 +35,7 @@
|
||||
<Icon name="el-icon-Delete"></Icon>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-checkbox v-model="data.isShow" @click.stop.native="" class="ml5"></el-checkbox>
|
||||
<el-checkbox v-model.trim="data.isShow" @click.stop.native="" class="ml5"></el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user