1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <uni-table ref="table" :loading="loading" stripe emptyText="暂无更多数据">
- <uni-tr>
- <uni-th align="center">
- <image src="../../static/tip.svg" style="width: 35rpx;height: 35rpx;"></image>
- </uni-th>
- <uni-th v-for="(item, index) in column" :key="index" align="center">{{item}}</uni-th>
- </uni-tr>
- <uni-tr v-for="(item, index) in tableData" :key="index">
- <uni-td align="center">
- <view :style="{
- 'width': '20rpx',
- 'height': '20rpx',
- 'background-color': 'green',
- 'border-radius': '50%',
- 'display': 'inline-block'
- }"
- ></view>
- </uni-td>
- <uni-td align="center" v-for="(val,key,idx) in item" :key="idx">{{ val }}</uni-td>
- <uni-td align="center" width="180">
- <view class="uni-group">
- <button class="uni-button" size="mini" type="primary" @click="handleBL(item)">办理</button>
- <button class="uni-button" size="mini" type="warn">删除</button>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table>
-
- <view class="uni-pagination-box">
- <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
- </view>
- </template>
- <script setup>
- import {ref} from "vue"
- const props = defineProps({
- column:{
- type: Array,
- default: []
- },
- tableData:{
- type: Array,
- default: []
- },
- pageCurrent:{
- type: Number,
- default: 1
- },
- pageSize:{
- type: Number,
- default: 10
- },
- total:{
- type: Number,
- default: 0
- },
- loading:{
- type: Boolean,
- default: false
- },
- blUrl:{
- type: String,
- default: ''
- }
- })
-
- const table = ref()
-
-
- function change(){
-
- }
-
- function handleBL(item){
- uni.reLaunch({
- url: props.blUrl + '&name=' + item.name
- })
- }
- </script>
- <style lang="scss" scope>
- .uni-group {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
- }
- .uni-pagination-box{
- padding: 20rpx;
- .uni-pagination{
- justify-content: end;
- }
- }
- ::v-deep .uni-table{
- min-width: 800rpx !important;
- }
- </style>
|