123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <view class="tui-label__box" :class="{'tui-label__full':isFull}" :style="{padding:padding,margin:margin}"
- @tap.stop="onClick">
- <slot></slot>
- </view>
- </template>
- <script>
-
- export default {
- name: "tui-label",
- props: {
- padding: {
- type: String,
- default: '0'
- },
- margin: {
- type: String,
- default: '0'
- },
- isFull: {
- type: Boolean,
- default: false
- }
- },
- created() {
- this.childrens = [];
- },
- methods: {
- onClick() {
- if (this.childrens && this.childrens.length > 0) {
- for (let child of this.childrens) {
- child.labelClick()
- }
- }
- }
- }
- }
- </script>
- <style scoped>
- .tui-label__box {
-
- box-sizing: border-box;
-
- }
- .tui-label__full {
- flex: 1;
-
- width: 100%;
-
- }
- </style>
|