We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前的 SwipeAction 只支持通过 text 来定制文本
希望可以自定义样式, 比如在文本下面多一个 icon
The text was updated successfully, but these errors were encountered:
思路 1 , 使用 slot-scope + named slot
<slot name='button'. position='left/right' index='index' text="getText()" item="item">
思路 2 , 用户自定义 slot 的名字
[{ slotName: 'button-one' }]
<view slot="button-one" / >
思路 1 的缺点是微信不支持 named slot 思路 2 的缺点是不支持 confirmText
Sorry, something went wrong.
第二种思路的 slot 定义 与 消费
{ item.slotName && item.confirm && <slot name="{{item.slotName}}-confirm"> item.slotName && !item.confirm && <slot name="{{item.slotName}}"> !item.slotName && <text>默认实现</text> } <block a:for="{{ rightBtns }}"> <block a:if="{{ item.slotName }}"> <view slot="{{item.slotName}}"> {{item.text}} </view> <view slot="{{item.slotName}}-confirm"> {{item.confirmText}} </view> </block> </block>
No branches or pull requests
背景
目前的 SwipeAction 只支持通过 text 来定制文本
期望
希望可以自定义样式, 比如在文本下面多一个 icon
The text was updated successfully, but these errors were encountered: