- scroll-view弹性布局align-items异常
[图片] <scroll-view class="sv" scroll-x enable-flex show-scrollbar="{{false}}" enable-passive enhanced > <view class="v" > align-items: flex-start </view> </scroll-view> <scroll-view class="sv" scroll-x enable-flex show-scrollbar="{{false}}" enable-passive enhanced > <view class="v" > align-items: center </view> </scroll-view> <scroll-view class="sv" scroll-x enable-flex show-scrollbar="{{false}}" enable-passive enhanced > <view class="v" > align-items: flex-end </view> </scroll-view> .sv { display: flex; flex-direction: row; justify-content: center; background-color: pink; height: 56px; margin-bottom: 32px; } .sv:first-of-type { align-items: flex-start; } .sv:nth-of-type(2) { align-items: center; } .sv:last-of-type { align-items: flex-end; } .v { background-color: lime; }
2023-04-03 - 动态slot不生效
https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/glass-easel/dynamic-slots.html 封装了一个组件 dev-list ,全局注册使用。 dev-list 组件内代码示例 js Component({ options:{ // multipleSlots: true, dynamicSlots:true }, properties: { }, data: { list: [1,2,3], }, methods: { }, lifetimes: { // 生命周期函数,可以为函数,或一个在methods段中定义的方法名 attached: function () { }, }, }); json { "component": true, "usingComponents": { }, "componentFramework": "glass-easel" } wxml <block wx:for="{{ list }}" wx:key="index"> <slot list-index="{{ index }}" item="{{ item }}" /> </block> 在页面中使用这个组件代码示例 wxml <dev-list> <view slot:item="{{item}}">{{item}} </view> </dev-list> slot:item 直接在编译器中报红,并且没有任何渲染,开发工具中给出提示说,重复使用了slot,这个动态slot 本身不就是要重复使用的吗? [图片]
2023-09-21