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 20c09605
authored
Jun 25, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
21e988cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
src/components/rule-form/index.vue
src/components/rule-form/index.vue
View file @
20c0960
<
template
>
<
template
>
<div
class=
"gl-form-page gl-form-min"
>
<div
class=
"gl-form-page gl-form-min"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
:label-position=
"labelPosition"
:size=
"size"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
:label-position=
"labelPosition"
:size=
"size"
>
<el-form-item
v-for=
"(item, index) in ruleData"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop || ''"
:class=
"item.class"
v-show=
"!item.hidden"
>
<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
slot-scope=
"scope"
>
<template
v-if=
"item.type === 'input'"
>
<template
v-if=
"item.type === '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-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>
<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
>
<
template
v-else-if=
"item.type == 'select'"
>
<
template
v-else-if=
"item.type == 'select'"
>
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
size
:
{
size
:
{
type
:
String
,
type
:
String
,
default
:
'small'
default
:
'small'
}
,
}
// labelWidth: {
// labelWidth: {
// type: String,
// type: String,
// default: '100px'
// default: '100px'
...
@@ -90,13 +90,18 @@ export default {
...
@@ -90,13 +90,18 @@ export default {
},
},
update
(
e
)
{
update
(
e
)
{
// this.$forceUpdate()
// this.$forceUpdate()
return
this
.
$Utils
.
cutMaxCharStr
(
e
.
target
.
value
)
return
this
.
$Utils
.
cutMaxCharStr
(
e
.
target
.
value
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.pointer
input
{
.pointer
input
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.gl-form-page
/
deep
/
.el-form-item--small
.el-form-item__error
{
padding-left
:
154px
!important
;
}
</
style
>
</
style
>
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