1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <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 {}
- }
- },
-
- tdStyle: {
- 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>
|