<!-- :class="{weui-btn_disabled: disabled}",这样写报错,所以另写了一个名字,样式和weui-btn_disabled是一样的--> <button :class="{disabledStyle: disabled}" :disabled="disabled" class="weui-btn weui-btn_primary btn-confirm" @click="onSubmit">确定</button>
出现上述问题的原因是以为没有正确使用weui的样式,如下(切记加引号):
<button :class="{'weui-btn_disabled': disabled}" :disabled="disabled" class="weui-btn weui-btn_primary btn-confirm" @click="onSubmit">确定</button>