12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <template>
- <view class="u-table" :style="[tableStyle]">
- <slot />
- </view>
- </template>
- <script>
-
- export default {
- name: "u-table",
- emits: ["click", "close"],
- 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>
|