Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张善主
2024-05-30 15:39:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8c4bc35feec7a5913a64ac7fdeab351f3fc9d691
8c4bc35f
1 parent
08f6a1c6
fix(17807):功能缺陷-【uat】意见反馈-描述您的问题-输入框输入超过500字未提示“请输入 10-500 个字以内”且500数字未标红,框框缺标红了。并且输入框变成了圆角,看图
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
12 deletions
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
sight_harmony/features/wdComponent/src/main/ets/components/FeedBackActivity.ets
View file @
8c4bc35
...
...
@@ -11,6 +11,7 @@ import { router } from '@kit.ArkUI';
import { CommonConstants } from 'wdConstant/Index';
import { ProcessUtils } from 'wdRouter/Index';
import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index';
import inputMethod from '@ohos.inputMethod';
const TAG = 'FeedBackActivity'
...
...
@@ -23,14 +24,15 @@ const TAG = 'FeedBackActivity'
export struct FeedBackActivity {
pageShowTime:number = 0;
@State canSubmit: boolean = false;
@State textNumLabel: string = '0/500';
contact: string = "";
@State textNumLabel: number = 0;
email: string = "";
//UI
scroller: Scroller = new Scroller();
@State isNetConnected: boolean = true
@State editValue: FeedbackTypeBean = {classifyName:''} as FeedbackTypeBean
@State feedbackTypeBeans: FeedbackTypeBean[] = [] as FeedbackTypeBean[]
//添加图片
addPic: PhotoListBean = {itemType:1} as PhotoListBean
...
...
@@ -107,7 +109,7 @@ export struct FeedBackActivity {
.width(CommonConstants.FULL_WIDTH)
.margin({ left: 24, top: $r('app.float.vp_12') })
Stack({ alignContent: Alignment.BottomEnd }) {
TextArea({ placeholder: $r('app.string.feedback_comments')
})
TextArea({ placeholder: $r('app.string.feedback_comments')
,text: this.editValue.classifyName
})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.fontColor($r('app.color.color_222222'))
...
...
@@ -116,12 +118,20 @@ export struct FeedBackActivity {
.placeholderFont({size:$r('app.float.font_size_13_2')})
.padding({bottom:96})
.backgroundColor($r('app.color.color_F5F5F5'))
.outlineColor($r('app.color.color_F5F5F5'))
.align(Alignment.TopStart)
.maxLength(500)
.onChange((value) => {
// Logger.debug(TAG, "onChange" + value + "/" + this.passwordContent)
this.contact = value
this.textNumLabel = value.length+"/500"
if(value.length> 500){
//隐藏键盘
inputMethod.getController().stopInputSession();
ToastUtils.shortToast($r('app.string.res_feedback_commentsFail'))
// Logger.debug(TAG, "onChange > 500 " + value)
this.editValue = {classifyName:value.substring(0,500)} as FeedbackTypeBean
}else{
this.editValue.classifyName = value
}
// Logger.debug(TAG, "onChange " + value)
this.textNumLabel = value.length
this.canSubmit = this.checkSubmit()
})
GridRow({
...
...
@@ -185,9 +195,17 @@ export struct FeedBackActivity {
})
}
.margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_12'),left: $r('app.float.vp_12')})
Text(this.textNumLabel)
Text(){
ContainerSpan(){
if(this.textNumLabel<500){
Span(this.textNumLabel+'/500').fontColor($r('app.color.color_999999'))
}else{
Span(this.textNumLabel+'').fontColor($r('app.color.color_ED2800'))
Span('/500').fontColor($r('app.color.color_999999'))
}
}
}
.margin({bottom: $r('app.float.vp_12'), right: $r('app.float.vp_11')})
.fontColor($r('app.color.color_999999'))
.fontSize($r('app.float.font_size_13_5'))
}
.height(200)
...
...
@@ -279,7 +297,7 @@ export struct FeedBackActivity {
* */
checkSubmit(): boolean {
if(StringUtils.isEmpty(this.
contact) || this.contact
.length < 10){
if(StringUtils.isEmpty(this.
editValue.classifyName) || this.editValue.classifyName
.length < 10){
return false
}
...
...
@@ -395,7 +413,7 @@ export struct FeedBackActivity {
return
}
//内容必填
if(StringUtils.isEmpty(this.
contact) || this.contact.length < 10 || this.contact
.length>500){
if(StringUtils.isEmpty(this.
editValue.classifyName) || this.editValue.classifyName.length < 10 || this.editValue.classifyName
.length>500){
ToastUtils.shortToast($r('app.string.res_feedback_commentsFail'))
return
}
...
...
@@ -403,7 +421,7 @@ export struct FeedBackActivity {
try {
let feedBackParams: FeedBackParams = {
//反馈内容
"content": this.
contact
,
"content": this.
editValue.classifyName
,
//投诉类型 id
"classifyFlagIds": selectType,
//设备
...
...
Please
register
or
login
to post a comment