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
组件模板:
<template v-for="(col, i) in columns" :key="col.prop"> <view class="table-body-cell cell" :class="[`cell-fixed-${col.fixed}`]" :style="{ width: col.width, textAlign: col.align }" > <view class="cell-wrapper"> <view class="cell-content stock-item-content f32" :class="col.prop"> <!-- 自定义插槽 --> <template v-if="col.slot && $slots[col.slot]"> <slot :name="col.slot" :data="dataItem"></slot> </template> <template v-else> <view>2</view> ......
使用组件:
<template v-for="item in stocks[currentTabItem.id]" :key="item.code"> <stock-table-row :dataItem="item"> <template #name="{ data }"> <view class="stock-name flex y"> 123 <view>{{ data.name }}</view> </view> </template> <template #chart="{ data }"> <view class="stock-name flex y"> <view>{{ data.code }}</view> </view> </template> ......
微信小程序解析:
HBuilderX 4.36
可以看到,解析后的插槽名变了,如何能正确渲染?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
组件模板:
使用组件:
微信小程序解析:
HBuilderX 4.36
可以看到,解析后的插槽名变了,如何能正确渲染?
The text was updated successfully, but these errors were encountered: