Open AprilLemon opened 1 year ago
存在动态绑定class类的情况下,编译到支付宝小程序里直接报错。
Module build failed (from C:/snapshot/code-repo/out/target/bundle/node_modules/@ali/antcube-thread-loader/lib/cjs.js): Thread Loader (Worker 0) Expected " at (c:\Workspace\gitlab\efficient-wx\dist\dev\mp-alipay\pages\search\modules\Hots.axml:1:1322) at (c:\Workspace\gitlab\efficient-wx\dist\dev\mp-alipay\pages\search\modules\Hots.axml:1:1322) Module build failed (from C:/snapshot/code-repo/out/target/bundle/node_modules/@ali/antcube-thread-loader/lib/cjs.js): Thread Loader (Worker 1) Expected " at (c:\Workspace\gitlab\efficient-wx\dist\dev\mp-alipay\pages\search\modules\Hots.axml:1:1322) at (c:\Workspace\gitlab\efficient-wx\dist\dev\mp-alipay\pages\search\modules\Hots.axml:1:1322)
报错情况:
<view v-for="(item,index) in table.list" :key="index" class="mt-[41rpx] text-center tracking-[2.8rpx]" :class="[table.index === index ? 'text-theme' : 'text-main']" @tap="fetchHotDetail(item, index)" > {{ item.name }} </view>
不报错:
<view class="hot-item"> <view v-for="(item,index) in table.list" :key="index" class="base-item" :class="[table.index === index ? 'text-theme' : 'text-main']" @tap="fetchHotDetail(item, index)" > {{ item.name }} </view> </view> css: .base-item{ @apply @apply mt-[41rpx] text-center tracking-[2.8rpx]; }
存在动态绑定class类的情况下,编译到支付宝小程序里直接报错。
报错情况:
不报错: