1234567891011121314151617181920212223242526272829303132333435 |
- Component({
- properties: {
- title: {
- type: String
- },
- type: {
- type: String,
- value: "default",
- },
- switchLabel: {
- type: String
- },
- switch: {
- type: Boolean
- },
- callBack: {
- type: Function
- }
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- methods: {
-
- changeSwitch() {
- let showAll = !this.data.switch;
- this.setData({
- switch: showAll
- })
- this.triggerEvent("callBack", showAll)
- }
- }
- })
|