1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
| <template> <view class="table"> <view class="tableM"> <uni-table-s :list="listData" :headerData="headerData" :headerAttr="headerAttr" > </uni-table-s> </view> <view class="tableM"> <uni-table-s :list="listData1" :headerData="headerData" :headerAttr="headerAttr" > </uni-table-s> </view> <view class="tableM"> <uni-table-s className="header-fixed-1" :list="listData2" :headerData="headerData1" :headerAttr="headerAttr1" > </uni-table-s> </view> <view class="tableM"> <uni-table-s :headerData="headerData2" :headerAttr="headerAttr2" :list="listData2" :fixedAttrNum="fixedAttrNum" ></uni-table-s> </view> </view> </template>
<script> import uniTableS from "../components/uni-table-s/uni-table-s.vue"; export default { data() { return { headerData: ["研究方向", "初试科目", "备注"], headerAttr: ["name", "list", "remark"], headerData1: [ { name: "年份", }, { name: "A类", childrens: [{ name: "单科(满分=100)" }, { name: "单科(满分>100)" }], }, { name: "B类", childrens: [{ name: "单科(满分=100)" }, { name: "单科(满分>100)" }], }, ], headerAttr1: ["name", "list", "age", "sex", "remark"], listData: [ { name: "张三封", list: ["计算机网络", "计算机组成原理", "操作系统"], remark: "备注1", }, { name: "李四", list: ["计算机网络", "计算机组成原理", "操作系统"], remark: "备注2", }, ], listData2: [ { name: "张三封", list: "bb", age: "2000000000000000000000", sex: "男", remark: "备注1", }, { name: "李四", list: "cc", age: "20", sex: "男", remark: "备注2", }, ], listData1: [ { name: "张三封", list: "bb", age: "20", sex: "男", remark: "备注1", }, { name: "李四", list: "cc", age: "20", sex: "男", remark: "备注2", }, ], fixedAttrNum: 1, headerData2: ["排名", "姓名", "性别", "城市", "职业"], headerAttr2: ["id", "name", "sex", "city", "job"], fixedArr2: ["id"], listData2: [ { id: "网三", name: "张三张三张三张三张三张三", age: 12, sex: "男", job: "务农务农务农务农务农务农务农务农务农务农务农务农务农务农务农务农", city: "北京", }, { id: "网四", name: "00000000000000000000", age: 12, sex: "男", job: "务农", city: "北京", }, ], }; }, components: { uniTableS }, methods: {}, }; </script>
<style lang="scss" scoped> .table { padding: 30rpx; } .tableM { margin-bottom: 20rpx; } </style>
|