WeChat Mini Programs custom components show hidden problems

I customized a component, adding hidden= "{{modalHidden}}" to .wxml and

to the corresponding js.
Component({
    properties: {
        modalHidden: {//modalHidden.modal-hidden 
            type: Boolean,
            value: true
        },  
    },
    data: {
       
        text: "text",
    },
    methods: {
        // 
        startAnswerButton() {
            wx.navigateTo({
                url: "XXX"
            });
        },
        //
        closeReward() {
            this.setData({
                modalHidden: true,
            })
        }
    }
});

then add
< modal modal-hidden= "{{is_modal_hidden}}"modal-msg=" {{is_modal_Msg}} "/ >
to the called .wxml, but both true and false display

.
Mar.03,2021

< modal modal-hidden= "{{isModalHidden}}" modal-msg= "{{isModalMsg}}" / >
in the properties definition segment, the attribute name is written in hump (propertyName); in wxml, the corresponding hyphen (component-tag-name property-name= "attr value") is used when specifying attribute values, and hump writing is used in data binding (attr= "{{propertyName}}").


I also have a problem like yours. What does the default value mean by how to solve it?

Menu