小程序
小游戏
企业微信
微信支付
扫描小程序码分享
- 需求的场景描述(希望解决的问题)
<component>
<text>11</text>
</component>
component 是我自定义的控件
我在component中如何给所有 text 外层添加 view
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
<
component
>
view
slot
=
"aaa"
text
>1111</
</
<!-- component -->
class
"warp"
name
></
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
这个单个能实现,但是如果是多个并且在不知名的情况下,就没法实现
text wx:for="12"
>11</
这种情况下就没法实现 只能通过其他方法么。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
<
component
>
<
view
slot
=
"aaa"
>
<
text
>1111</
text
>
</
view
>
</
component
>
<!-- component -->
<
view
class
=
"warp"
>
<
slot
name
=
"aaa"
></
slot
>
</
view
>
这个单个能实现,但是如果是多个并且在不知名的情况下,就没法实现
<
component
>
<
text wx:for="12"
slot
=
"aaa"
>11</
text
>
</
component
>
这种情况下就没法实现 只能通过其他方法么。