Component({
    options: {
        addGlobalClass: true // 启用全局样式
    },
    properties: {
        title: {
            type: String
        },
        open: {
            type: Boolean,
            value: false
        }, //是否展开
        onChange: {
            type: Function,
        }
    },
    lifetimes: {
        attached: function () {
            getApp().globalData.Language.getLanguagePackage(this)
            this.setData({
                show: this.data.open
            })
        }
    },
    data: {
        show: false,
    },
    methods: {
        changeShow() {
            const show = !this.data.show
            this.setData({
                show
            })
            this.triggerEvent("onChange", show)
        }
    }
})