我使用uniapp写的小程序,使用到了uni-table这个组件
我希望最后一列,更多操作这列可以固定列,该如何写呢? 求大佬
uni-table的源码
<view class="uni-table" :style="{ 'min-width': minWidth + 'px' }" :class="{ 'table--stripe': stripe }">
<slot></slot>
<view v-if="noData" class="uni-table-loading">
<view class="uni-table-text" :class="{ 'empty-border': border }">{{ emptyText }}</view>
</view>
<view v-if="loading" class="uni-table-mask" :class="{ 'empty-border': border }"><div class="uni-table--loader"></div></view>
</view>
uni-tr 的源码
<view class="uni-table-tr">
<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }">
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled" @checkboxSelected="checkboxSelected"></table-checkbox>
</view>
<slot></slot>
</view>
uni-td的源码
<view class="uni-table-td" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
<slot></slot>
</view>
这是我调用的代码
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
<uni-tr class="sticky">
<uni-th width="150" align="center">下单时间</uni-th>
<uni-th width="150" align="center">下单编号</uni-th>
<uni-th align="center">子单编号</uni-th>
<uni-th width="100" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>{{ item.date }}</uni-td>
<uni-td>
<view class="name">{{ item.name }}</view>
</uni-td>
<uni-td align="center">{{ item.address }}</uni-td>
<uni-td align="center">
<view class="uni-group">
<p>更多操作</p>
<!-- <view class="actions">
<p>签署/下载函件</p>
<p>上传图片</p>
<p>上传PDF</p>
</view> -->
</view>
</uni-td>
</uni-tr>
</uni-table>