123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template>
- <view class="u-table" :style="[tableStyle]">
- <slot />
- </view>
- </template>
- <script>
-
- export default {
- name: "u-table",
- props: {
- borderColor: {
- type: String,
- default: '#e4e7ed'
- },
- align: {
- type: String,
- default: 'center'
- },
-
- padding: {
- type: String,
- default: '10rpx 6rpx'
- },
-
- fontSize: {
- type: [String, Number],
- default: 28
- },
-
- color: {
- type: String,
- default: '#606266'
- },
-
- thStyle: {
- type: Object,
- default () {
- return {}
- }
- },
-
- bgColor: {
- type: String,
- default: '#ffffff'
- }
- },
- data() {
- return {}
- },
- computed: {
- tableStyle() {
- let style = {};
- style.borderLeft = `solid 1px ${this.borderColor}`;
- style.borderTop = `solid 1px ${this.borderColor}`;
- style.backgroundColor = this.bgColor;;
- return style;
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "../../libs/css/style.components.scss";
-
- .u-table {
- width: 100%;
- box-sizing: border-box;
- }
- </style>
|