Skip to content

Commit

Permalink
Merge pull request #270 from Kabimon/dev-1.0.0
Browse files Browse the repository at this point in the history
LGTM
  • Loading branch information
FinalTarget authored Apr 8, 2022
2 parents 43338b7 + 5e54336 commit 2fcdaa7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export default {
message: `${this.$t('message.linkis.datasource.pleaseInput')}${this.$t('message.linkis.datasource.sourceName')}`,
trigger: 'blur'
},{
pattern: /^(.){0,240}$/,
message: '最多240字',
pattern: /^(.){0,200}$/,
message: '最多200字',
trigger: 'change'
}],
},
Expand All @@ -143,8 +143,8 @@ export default {
"placeholder": this.$t('message.linkis.datasource.sourceDec'),
},
validate: [{
pattern: /^(.){0,240}$/,
message: '最多240字',
pattern: /^(.){0,200}$/,
message: '最多200字',
trigger: 'change'
}]
},
Expand All @@ -157,8 +157,8 @@ export default {
"placeholder": this.$t('message.linkis.datasource.label'),
},
validate: [{
pattern: /^(.){0,240}$/,
message: '最多240字',
pattern: /^(.){0,200}$/,
message: '最多200字',
trigger: 'change'
}]
}
Expand Down
32 changes: 13 additions & 19 deletions web/src/pages/jobManagement/components/createJob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
</a-form-item>
<a-form-item :label="$t('job.jobDetail.label')" name="jobLabels">
<a-tag
v-for="tag in tags"
v-for="tag in state.tags"
:key="tag"
closable
@close="handleClose(tag)"
>
{{ tag }}
</a-tag>
<a-input
v-if="inputVisible"
v-if="state.inputVisible"
ref="inputRef"
type="text"
size="small"
:style="{ width: '100px' }"
v-model:value="inputValue"
v-model:value="state.inputValue"
@blur="handleInputConfirm"
@keyup.enter="handleInputConfirm"
:maxLength="20"
Expand Down Expand Up @@ -233,11 +233,9 @@ export default defineComponent({
message.success(successMap[props.mode])
context.emit('handleJobAction', { ...params, ...editData });
formRef.value.resetFields();
Object.assign(state, {
tags: [],
inputVisible: false,
inputValue: '',
});
state.tags = []
state.inputVisible = false
state.inputValue = ''
}
})
.catch((e) => {
Expand All @@ -247,11 +245,9 @@ export default defineComponent({
const handleCancel = () => {
context.emit('handleJobAction');
formRef.value.resetFields();
Object.assign(state, {
tags: [],
inputVisible: false,
inputValue: '',
});
state.tags = []
state.inputVisible = false
state.inputValue = ''
};
const handleClose = (removedTag) => {
Expand All @@ -272,11 +268,9 @@ export default defineComponent({
if (inputValue && !tags.includes(inputValue.trim())) {
tags = [...tags, inputValue.trim()];
}
Object.assign(state, {
tags,
inputVisible: false,
inputValue: '',
});
state.tags = tags
state.inputVisible = false
state.inputValue = ''
};
return {
Expand All @@ -288,7 +282,7 @@ export default defineComponent({
rules,
handleOk,
handleCancel,
...toRefs(state),
state,
...toRefs(engines),
handleClose,
showInput,
Expand Down
9 changes: 3 additions & 6 deletions web/src/pages/projectManage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<a-row :gutter="[24, 24]">
<a-col :span="24">
<div class="title-line">
<!-- <span class="title">
<a-typography-title :level="5" style="margin-bottom: 0">{{
$t("projectManage.topLine.title")
}}</a-typography-title>
</span> -->

<a-input
:loading="loading"
:placeholder="$t('projectManage.topLine.searchBar.searchInputPlaceholder')"
Expand Down Expand Up @@ -199,6 +193,9 @@ export default {
// 处理搜索
handleOnSearch() {
this.pageCfg.current = 1;
if (/\%/.test(this.projectName)) {
return message.error("项目名搜索不支持通配符%");
}
this.getDataList(this.projectName);
},
// 删除项目
Expand Down

0 comments on commit 2fcdaa7

Please sign in to comment.