Commit 894d7d6b by 无尘

fix: 修改输入限制

parent 7ce77c54
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-12-06 13:44:22 * @Date: 2018-12-06 13:44:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-04 11:38:17 * @LastEditTime: 2020-09-07 17:17:18
--> -->
<!-- <!--
限制输入框组件 限制输入框组件
...@@ -132,6 +132,10 @@ export default { ...@@ -132,6 +132,10 @@ export default {
inputValue: function(newData, oldData) { inputValue: function(newData, oldData) {
let that = this; let that = this;
that.itemValue = newData || ''; that.itemValue = newData || '';
if (that.getByType == 'normal') {
that.inputNum = String(that.itemValue).trim().length;
return false;
}
if (that.getByType == 'word') { if (that.getByType == 'word') {
that.inputNum = strLength.getZhLen(that.itemValue); that.inputNum = strLength.getZhLen(that.itemValue);
} else { } else {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 16:51:22 * @Date: 2020-08-28 16:51:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-07 16:56:30 * @LastEditTime: 2020-09-07 17:23:57
--> -->
<template> <template>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="clerk-tag-right p-20 border-box"> <div class="clerk-tag-right p-20 border-box">
<div class="clerk-tag-search"> <div class="clerk-tag-search">
<div class="flex flex-space-between"> <div class="flex flex-space-between">
<div><el-input placeholder="请输入标签名称" maxlength="50" v-model="searchVal" style="width: 298px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value)" clearable @clear="clearInput"></el-input></div> <div><el-input placeholder="请输入标签名称" maxlength="50" v-model="searchVal" style="width: 298px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, searchVal)" clearable @clear="clearInput"></el-input></div>
<div><el-button type="primary" @click="toAddTag">新建标签</el-button></div> <div><el-button type="primary" @click="toAddTag">新建标签</el-button></div>
</div> </div>
</div> </div>
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
toInput: _debounce(function() { toInput: _debounce(function() {
const that = this; const that = this;
that.getTableList(); that.getTableList();
}, 300), }, 500),
/** /**
* @description: 搜索清除 * @description: 搜索清除
* @author: 无尘 * @author: 无尘
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment