Skip to content

Commit

Permalink
chore: add a default(true) value for enable when creating rule
Browse files Browse the repository at this point in the history
Signed-off-by: zhongwencool <zhongwencool@gmail.com>
  • Loading branch information
zhongwencool authored and ysfscream committed Sep 29, 2024
1 parent 39ced08 commit 70db2e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/hooks/Rule/rule/useRuleForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default (): {
sql: transSQLFormDataToSQL(DEFAULT_SELECT, [from]),
actions: [],
description: '',
enable: true
})

const getRuleDataForUpdate = ({
Expand Down
2 changes: 1 addition & 1 deletion src/types/rule.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export interface BasicRule {
sql: string
actions: Array<OutputItem>
description: string
enable: boolean
}

export interface RuleForm extends BasicRule {
created_at: string
enable: boolean
from: FromData
}

Expand Down
1 change: 1 addition & 0 deletions src/views/RuleEngine/components/RuleForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const ruleValueDefault = {
sql: transSQLFormDataToSQL(DEFAULT_SELECT, [DEFAULT_FROM]),
actions: [],
description: '',
enable: true,
}
let modelValueCache = ''
Expand Down

0 comments on commit 70db2e9

Please sign in to comment.