mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
DEV: Move computed to discourseComputed (#8312)
This commit is contained in:

committed by
GitHub

parent
d74546f50e
commit
6275c05c0d
@ -1,8 +1,8 @@
|
||||
import Component from "@ember/component";
|
||||
import {
|
||||
default as computed,
|
||||
default as discourseComputed,
|
||||
observes
|
||||
} from "ember-addons/ember-computed-decorators";
|
||||
} from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["inline-edit"],
|
||||
@ -21,12 +21,12 @@ export default Component.extend({
|
||||
this.set("checkedInternal", this.checked);
|
||||
},
|
||||
|
||||
@computed("labelKey")
|
||||
@discourseComputed("labelKey")
|
||||
label(key) {
|
||||
return I18n.t(key);
|
||||
},
|
||||
|
||||
@computed("checked", "checkedInternal")
|
||||
@discourseComputed("checked", "checkedInternal")
|
||||
changed(checked, checkedInternal) {
|
||||
return !!checked !== !!checkedInternal;
|
||||
},
|
||||
|
Reference in New Issue
Block a user