使用modal组件怎样修改确认按钮的默认颜色(绿色)
发布于 5 年前 作者 jie53 17523 次浏览 来自 问答

代码如下:

<modal hidden="" title="" confirm-text=“确定”  bindconfirm=“confirmModel” cancel-text=“取消” bindcancel=“cancelModel”></modal>

5 回复

使用wx.showModal接口可以

使用wx.showModal,这个里面的内容要用content来表示,我需要使用input输入框来实时改变文字,可以实现吗?

需要实现功能完整代码:

<modal hidden="{{fm_ishidden}}" title=“填写名称” confirm-text=“添加”  bindconfirm=“confirmModel” cancel-text=“取消” bindcancel=“cancelModel”>

    <view class=“flex-lr modal modaltip”>

        <input style=“width:90%;” class=“fsize18” bindinput=“modalInput” cursor-spacing=“100” name="" maxlength=“15” placeholder=“请填写名称” value="{{sellername}}"/>

        <view>{{sellername.length>0?15-sellername.length:’’}}</view>

    </view>

</modal>

暂不支持富文本。

不是在modal组件上添加,modal组件已经被__废弃__了,请使用wx.showModal。

wx.showModal可以实现这个颜色修改。

在modal加    confirmColor="#f00"吗?实现不了呀

回到顶部