better: trigger when

This commit is contained in:
devezhao 2020-12-07 16:29:02 +08:00
parent 09fd443f1c
commit 87f41e7942
3 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ class ContentAutoApproval extends ActionContentSpec {
.find('.custom-control-input')
.each(function () {
const v = ~~$(this).val()
if (v !== 1 && v !== 4) $(this).attr('disabled', true)
if (!(v === 1 || v === 4 || v === 512)) $(this).attr('disabled', true)
})
const content = this.props.content || {}

View file

@ -60,7 +60,7 @@ class ContentAutoAssign extends ActionContentSpec {
.find('.custom-control-input')
.each(function () {
const v = ~~$(this).val()
if (!(v === 1 || v === 4 || v >= 128)) $(this).attr('disabled', true)
if (v === 2 || v === 16) $(this).attr('disabled', true)
})
const content = this.props.content || {}

View file

@ -47,7 +47,7 @@ class ContentAutoShare extends ActionContentSpec {
.find('.custom-control-input')
.each(function () {
const v = ~~$(this).val()
if (!(v === 1 || v === 4 || v >= 128)) $(this).attr('disabled', true)
if (v === 2 || v === 32 || v === 64) $(this).attr('disabled', true)
})
const content = this.props.content || {}