Skip to content

Conversation

chouchouji
Copy link
Contributor

@chouchouji chouchouji commented Aug 22, 2025

close #5706

测试代码

<template>
    <view>
        <text v-if="!$slots.default">Text Content</text>
        <slot v-else :item="1"></slot>
    </view>
</template>

编译产物

<view>
  <text wx:if="{{a}}">Text Content</text>
  <slot wx:else name="d"></slot>
  <slot wx:else></slot>
</view>

修复后编译产物

<view>
  <text wx:if="{{a}}">Text Content</text>
  <block wx:else>
    <slot name="d"></slot>
    <slot></slot>
  </block>
</view>

Copy link

Size report

Path Size
packages/size-check/dist/size-check.es.js 47.19 KB (0%)
packages/size-check/dist/style.css 2.82 KB (0%)
packages/uni-app/dist/uni-app.es.js 2.5 KB (0%)
packages/uni-h5-vue/dist/vue.runtime.esm.js 76.41 KB (0%)
packages/uni-mp-vue/dist/vue.runtime.esm.js 43.22 KB (0%)
packages/uni-mp-alipay/dist/uni.api.esm.js 14.8 KB (0%)
packages/uni-mp-alipay/dist/uni.mp.esm.js 8.04 KB (0%)
packages/uni-mp-baidu/dist/uni.api.esm.js 11.33 KB (0%)
packages/uni-mp-baidu/dist/uni.mp.esm.js 9.68 KB (0%)
packages/uni-mp-qq/dist/uni.api.esm.js 10.65 KB (0%)
packages/uni-mp-qq/dist/uni.mp.esm.js 7.6 KB (0%)
packages/uni-mp-toutiao/dist/uni.api.esm.js 10.47 KB (0%)
packages/uni-mp-toutiao/dist/uni.mp.esm.js 9.42 KB (0%)
packages/uni-mp-weixin/dist/uni.api.esm.js 11.65 KB (0%)
packages/uni-mp-weixin/dist/uni.mp.esm.js 8.16 KB (0%)
packages/uni-quickapp-webview/dist/uni.api.esm.js 10.6 KB (0%)
packages/uni-quickapp-webview/dist/uni.mp.esm.js 8.16 KB (0%)

@chouchouji chouchouji force-pushed the fix-default-slot-with-if-and-props branch from b1dfaec to 47d4ebc Compare August 26, 2025 08:12
@chouchouji chouchouji merged commit abd4e7d into next Aug 27, 2025
4 checks passed
@chouchouji chouchouji deleted the fix-default-slot-with-if-and-props branch August 27, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

小程序端默认插槽携带参数时编译产物错误
1 participant