Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 542c55c8
authored
Oct 22, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
特殊说明textarea高度自适应修改
1 parent
498d65dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletions
src/views/config/addConfig.vue
src/views/config/addConfig.vue
View file @
542c55c
...
...
@@ -36,7 +36,7 @@
<el-input
v-model=
"contractObj['typeData'][index].contractSubjectName"
:maxlength=
"50"
@
input=
"(event) => handleInput(event, index, 'contractSubjectName')"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"特别声明:"
label-width=
"154px"
>
<el-input
type=
"textarea"
placeholder=
"请输入"
:maxlength=
"200"
@
input=
"(event) => handleInput(event, index, 'contractImportantClause')"
v-model=
"contractObj['typeData'][index].contractImportantClause"
></el-input>
<el-input
type=
"textarea"
placeholder=
"请输入"
:maxlength=
"200"
ref=
"contractImportantClauseInput"
@
input=
"(event) => handleInput(event, index, 'contractImportantClause')"
v-model=
"contractObj['typeData'][index].contractImportantClause"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"合同Logo:"
label-width=
"154px"
>
<Upload
@
uploadSuccess=
"(event) => uploadSuccess(event, index)"
:checkObj=
"checkObj"
@
delImage=
"(event) => delImage(event, index)"
class=
"upload"
:attr=
"'contractLogoUrl'"
:url=
"contractObj['typeData'][index]['contractLogoUrl']"
></Upload>
...
...
@@ -264,6 +264,12 @@ export default {
}
}
},
'contractObj.contractSubjectType'
:
{
deep
:
true
,
handler
(
val
)
{
this
.
changeContractType
()
}
}
},
created
(){
...
...
@@ -299,6 +305,9 @@ export default {
this
.
collisionRadio
=
'1'
this
.
vehicleRadio
=
'1'
this
.
contractObj
.
contractSubjectType
=
1
// 默认是批发 选中深圳广联数科科技有限公司
if
(
!
this
.
showGh
)
{
this
.
adjustInputHeight
()
}
}
this
.
getStoreConfig
()
},
...
...
@@ -378,9 +387,19 @@ export default {
// }
// this.data = storeArr
// },
changeContractType
(
e
)
{
this
.
$nextTick
(()
=>
{
this
.
adjustInputHeight
()
})
},
handleInput
(
e
,
index
,
attr
)
{
this
.
$set
(
this
.
contractObj
.
typeData
[
index
],
attr
,
e
)
this
.
$forceUpdate
()
if
(
attr
==
'contractImportantClause'
)
{
this
.
$nextTick
(()
=>
{
this
.
adjustInputHeight
()
})
}
},
getConfig
(
merchantId
)
{
let
para
=
{
...
...
@@ -462,9 +481,18 @@ export default {
contractLogoUrl
:
res
.
contractLogoUrl
,
contractSealUrl
:
res
.
contractSealUrl
}
this
.
adjustInputHeight
()
}
})
},
// textarea高度自适应
adjustInputHeight
()
{
this
.
$nextTick
(()
=>
{
const
input
=
this
.
$refs
[
'contractImportantClauseInput'
][
0
]?.
$refs
.
textarea
input
.
style
.
height
=
'auto'
input
.
style
.
height
=
(
input
.
scrollHeight
+
5
)
+
'px'
})
},
onSubmit
()
{
// robberyServerList:[],
// vehicleServerList:[],
...
...
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