修改输入框字段限制

This commit is contained in:
GGJ
2024-12-13 14:36:23 +08:00
parent a856075ddb
commit 8c4cc891e5
58 changed files with 663 additions and 1211 deletions

View File

@@ -20,8 +20,8 @@
</div>
<div class="filter" v-if="activePathList.length != 0">
<el-input style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称" clearable v-model="filterText"
type="text"></el-input>
<el-input maxlength="32" show-word-limit style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称"
clearable v-model="filterText" type="text"></el-input>
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
<el-button @click="handleRefresh" :icon="Refresh">重置</el-button>
<el-upload v-if="activePath != '/'" action="" :auto-upload="false" :show-file-list="false" :on-change="(file: any, fileList: any) => {
@@ -130,7 +130,7 @@
<el-form ref="formRef" :model="form"
:rules="{ path: [{ required: true, message: '请输入文件夹名称', trigger: 'blur' }] }">
<el-form-item label="文件夹名称" prop="path">
<el-input v-model="form.path" placeholder="请输入文件夹名称" />
<el-input maxlength="32" show-word-limit v-model="form.path" placeholder="请输入文件夹名称" />
</el-form-item>
</el-form>
<template #footer>
@@ -524,7 +524,7 @@ mqttRef.value.on('message', (topic: any, message: any) => {
console.log('mqtt接收到消息', JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message)))))
let str = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
let regex = /fileName:(.*?),allStep/
let regex1 = /allStep:(.*?),nowStep/
let regex2 = /nowStep:(.*?),userId/
@@ -536,7 +536,7 @@ mqttRef.value.on('message', (topic: any, message: any) => {
nowStep: str.match(regex2)[1],
userId: str.match(regex3)[1]
}
console.log("🚀 ~ str.match(regex3)[1]:", str.match(regex3)[1])
console.log("🚀 ~ str.match(regex3)[1]:", str.match(regex3)[1])
status.value = parseInt(Number((mqttMessage.value.nowStep / mqttMessage.value.allStep) * 100))
fileRef.value.setStatus(mqttMessage.value)
fileName.value = mqttMessage.value.fileName