Skip to content

Commit

Permalink
Merge pull request #48 from zmops/fix-web-bug
Browse files Browse the repository at this point in the history
fix: fix save dialog close
  • Loading branch information
jiangxd2016 committed Apr 14, 2023
2 parents b762bfb + 310e883 commit 3fc26af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web-app/src/pages/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const nameRules = [{
}];

export const reset = (form, formData, defaultForm) => {
form.resetFields();
form.value?.resetFields();

Object.keys(form).forEach((key) => {
formData[key] = defaultForm[key];
Expand Down
4 changes: 2 additions & 2 deletions web-app/src/pages/warn/notify-rules/operate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default defineComponent({
<a-switch v-model={form.filterAll}></a-switch>
</a-form-item>
<a-form-item label={t('notificationRules.form.tags')}>
<a-select v-model={form.tags} disabled={!props.editId} multiple placeholder={t('notificationRules.form.tags_tip')}>
<a-select v-model={form.tags} multiple placeholder={t('notificationRules.form.tags_tip')}>
{
tagsOptions.value.map((item) => {
return (
Expand All @@ -131,7 +131,7 @@ export default defineComponent({
</a-select>
</a-form-item>
<a-form-item label={t('notificationRules.form.priorities')}>
<a-select v-model={form.priorities} disabled={!props.editId} multiple placeholder={t('notificationRules.form.priorities_placeholder')}>
<a-select v-model={form.priorities} multiple placeholder={t('notificationRules.form.priorities_placeholder')}>
{
WARN_LEVEL.map((item) => {
return (
Expand Down
5 changes: 4 additions & 1 deletion web-app/src/pages/warn/warn-rules/ass-monitoring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export default defineComponent({

};
watch(() => props.editId, (val) => {
getData();

if (props.visible) {
getData();
}
});

return () => (
Expand Down

0 comments on commit 3fc26af

Please sign in to comment.