Blame view

components/thorui/tui-table/tui-table.vue 1.22 KB
46b6767c   刘淇   init 提交到库
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
  <template>
  	<!--需要固定宽高滚动在页面层使用scroll-view即可-->
  	<view class="tui-table__box" :style="{
  			borderTop:borderTop? `${borderWidth} solid ${borderColor}`:'0',
  			borderLeft:borderLeft? `${borderWidth} solid ${borderColor}`:'0',
  			borderBottom: borderBottom ? `${borderWidth} solid ${borderColor}` : '0',
  			borderRight: borderRight ? `${borderWidth} solid ${borderColor}` : '0'
  		}">
  		<slot></slot>
  	</view>
  </template>
  
  <script>
  	//字体/背景等配置
  	export default {
  		name: 'tuiTable',
  		props: {
  			//border width 不需要border传0即可
  			borderWidth: {
  				type: String,
  				default: '1rpx'
  			},
  			//border color
  			borderColor: {
  				type: String,
  				default: '#EAEEF5'
  			},
  			//是否需要上边框
  			borderTop: {
  				type: Boolean,
  				default: true
  			},
  			//是否需要左边框
  			borderLeft: {
  				type: Boolean,
  				default: true
  			},
  			//是否需要下边框
  			borderBottom: {
  				type: Boolean,
  				default: false
  			},
  			//是否需要右边框
  			borderRight: {
  				type: Boolean,
  				default: false
  			}
  		},
  		data() {
  			return {
  				width: 320
  			};
  		},
  		methods:{
  			
  		}
  	};
  </script>
  
  <style scoped>
  	.tui-table__box {
  		font-size: 0;
  		box-sizing: border-box;
  	}
  </style>