Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ca7c0616
authored
Jan 19, 2022
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整代码
1 parent
41f3a5e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/components/rule-form/index.vue
src/components/rule-form/index.vue
View file @
ca7c061
...
...
@@ -4,8 +4,7 @@
<el-form-item
v-for=
"(item, index) in ruleData"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop || ''"
:class=
"item.class"
v-show=
"!item.hidden"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.type === 'input'"
>
<!-- @keyup.enter.native="ruleForm[item.prop]=handClick" -->
<el-input
v-if=
"item.clickFunc"
:type=
"item.inputText || 'text'"
:readonly=
"item.readonly || false"
:disabled=
"item.disabled || false"
@
click
.
native=
"item.clickFunc"
:class=
"item.clickFunc ? 'pointer' : ''"
:placeholder=
"item.placeholder || '请输入'"
:ref=
"item.ref"
v-model
.
trim=
"ruleForm[item.prop]"
@
input=
"ruleForm[item.prop] = update($event)"
></el-input>
<el-input
v-if=
"item.clickFunc"
:type=
"item.inputText || 'text'"
:readonly=
"item.readonly || false"
:disabled=
"item.disabled || false"
@
click
.
native=
"item.clickFunc"
:class=
"item.clickFunc ? 'pointer' : ''"
:placeholder=
"item.placeholder || '请输入'"
:ref=
"item.ref"
v-model
.
trim=
"ruleForm[item.prop]"
@
keyup
.
native=
"ruleForm[item.prop]=update($event)"
></el-input>
<el-input
v-else
:type=
"item.inputText || 'text'"
:readonly=
"item.readonly || false"
:disabled=
"item.disabled || false"
v-model
.
trim=
"ruleForm[item.prop]"
:maxlength=
"item.maxlength"
:minlength=
"item.minlength"
:placeholder=
"item.placeholder || '请输入'"
:show-password=
"item.showPassword || false"
:clearable=
"item.clearable"
:show-word-limit=
"item.showWordLimit || false"
></el-input>
</
template
>
<
template
v-else-if=
"item.type == 'select'"
>
...
...
@@ -91,7 +90,8 @@ export default {
},
update
(
e
)
{
// this.$forceUpdate()
return
this
.
$Utils
.
cutMaxCharStr
(
e
)
console
.
log
(
'输入事件'
)
return
this
.
$Utils
.
cutMaxCharStr
(
e
.
target
.
value
)
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment