Skip to content

Commit

Permalink
bugfix: 文件上传设置的允许范围可以填入空格 TencentBlueKing#1539
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Dec 2, 2022
1 parent fe57a6d commit 66a7b77
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<bk-radio-group
v-model="info.restrictMode"
class="restrict-mode-radio"
@change="handleRestSuffixError">
@change="handleRestrictModeChange">
<bk-radio-button :value="-1">
{{ $t('setting.不限制') }}
</bk-radio-button>
Expand All @@ -71,11 +71,11 @@
<div v-if="info.restrictMode > -1">
<jb-form-item>
<bk-tag-input
v-model="info.suffixList"
:value="info.suffixList"
allow-create
has-delete-icon
:key="info.restrictMode"
@change="handleRestSuffixError" />
@change="handleSuffixChange" />
</jb-form-item>
<div class="form-item-error" v-html="suffixError" />
</div>
Expand Down Expand Up @@ -181,9 +181,13 @@
this.isLoading = false;
});
},
handleRestSuffixError () {
handleRestrictModeChange () {
this.suffixError = '';
},
handleSuffixChange (tagList) {
this.suffixError = '';
this.info.suffixList = tagList.map(tagItem => tagItem.replace(/ /g, ''));
},
/**
* @desc 提交修改
*/
Expand All @@ -196,7 +200,7 @@
} else {
this.suffixError = checkSuffixError(params.suffixList);
}

if (this.suffixError) {
return;
}
Expand Down

0 comments on commit 66a7b77

Please sign in to comment.