Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7a1aa88c
authored
Oct 27, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:文本域禁止空格换行
1 parent
0498b34b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
13 deletions
packageEquity/pages/recruitManage/recruitDetail/recruitDetail.js
packageEquity/pages/recruitManage/recruitInsert/recruitInsert.js
packageEquity/pages/recruitManage/recruitInsert/recruitInsert.scss
packageEquity/pages/recruitManage/recruitDetail/recruitDetail.js
View file @
7a1aa88
...
@@ -268,12 +268,16 @@ Page({
...
@@ -268,12 +268,16 @@ Page({
},
},
/**
/**
* Textarea 输入处理(带字数统计)
* Textarea 输入处理(带字数统计)
- 禁止空格和换行
*/
*/
handleTextareaInput
(
e
)
{
handleTextareaInput
(
e
)
{
const
{
field
}
=
e
.
currentTarget
.
dataset
const
{
field
}
=
e
.
currentTarget
.
dataset
const
{
value
}
=
e
.
detail
let
value
=
e
.
detail
.
value
const
{
formData
}
=
this
.
data
const
{
formData
}
=
this
.
data
// 过滤掉空格和换行符
value
=
value
.
replace
(
/
[\s\r\n]
/g
,
''
)
formData
[
field
]
=
value
formData
[
field
]
=
value
formData
[
field
+
'Length'
]
=
value
.
length
// 统计字数
formData
[
field
+
'Length'
]
=
value
.
length
// 统计字数
this
.
setData
({
this
.
setData
({
...
...
packageEquity/pages/recruitManage/recruitInsert/recruitInsert.js
View file @
7a1aa88
...
@@ -236,11 +236,15 @@ Page({
...
@@ -236,11 +236,15 @@ Page({
formList
formList
});
});
},
},
// textarea输入变化
// textarea输入变化
,禁止空格和换行
onTextareaInput
(
e
)
{
onTextareaInput
(
e
)
{
const
index
=
e
.
currentTarget
.
dataset
.
index
;
const
index
=
e
.
currentTarget
.
dataset
.
index
;
cons
t
value
=
e
.
detail
.
value
;
le
t
value
=
e
.
detail
.
value
;
const
formList
=
this
.
data
.
formList
;
const
formList
=
this
.
data
.
formList
;
// 过滤掉空格和换行符
value
=
value
.
replace
(
/
[\s\r\n]
/g
,
''
);
// 更新对应项的值
// 更新对应项的值
formList
[
index
].
value
=
value
;
formList
[
index
].
value
=
value
;
formList
[
index
].
displayValue
=
value
;
formList
[
index
].
displayValue
=
value
;
...
...
packageEquity/pages/recruitManage/recruitInsert/recruitInsert.scss
View file @
7a1aa88
...
@@ -287,12 +287,3 @@ page {
...
@@ -287,12 +287,3 @@ page {
background-color
:
#1989fa
;
background-color
:
#1989fa
;
color
:
#fff
;
color
:
#fff
;
}
}
/* 自定义对话框样式 */
.custom-dialog
{
height
:
364px
!
important
;
}
.custom-dialog
.van-dialog
{
height
:
364px
!
important
;
}
\ No newline at end of file
\ No newline at end of file
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