Press n or j to go to the next uncovered block, b, p or k for the previous block.
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x | <template> <div role="separator" :direction="direction" :style="{ borderColor: borderColor, padding: direction==='column' && !title ? '0 4px' : '0' }" :class="{ [$style.root]: true, [$style.dashed]: dashed !== 'a', [$style.hairline]: hairline, [$style[`content-${contentPosition}`]]: title || $slots.default || $env.VUE_APP_DESIGNER, }" > <span vusion-slot-name-edit="title" vusion-slot-name="default"> <slot> {{ title }} <s-empty v-if="!$slots.default && !title && $env.VUE_APP_DESIGNER && !!$attrs['vusion-node-path']"> </s-empty> </slot> </span> </div> </template> <script> import SEmpty from '../s-empty.vue'; export default { name: 'u-divider', components: { SEmpty, }, props: { direction: { type: String, default: 'horizontal', }, dashed: { type: String, default: 'a', }, hairline: { type: Boolean, default: true, }, contentPosition: { type: String, default: 'center', }, title: { type: String, }, }, }; </script> <style module> .root { display: flex; align-items: center; margin: 24px 0; color: #969799; font-size: 14px; line-height: 24px; border-color: #ebedf0; border-style: solid; border-width: 0; } .root[direction="column"] { display: inline-flex; height: 100%; margin: 0; flex-direction: column; } .root::before, .root::after { display: block; flex: 1; box-sizing: border-box; height: 1px; border-color: inherit; border-style: inherit; border-width: 1px 0 0; } .root[direction="column"]::before, .root[direction="column"]::after { border-width: 0; border-left-width: 1px; border-top-width: 1px; } .root::before { content: ''; } .dashed { border-style: dashed; } .hairline {} .hairline::before, .hairline::after { /* transform: scaleY(0.5); */ } .content-center, .content-left, .content-right {} .content-center::before, .content-left::before, .content-right::before { margin-right: 24px; } .content-center::after, .content-left::after, .content-right::after { margin-left: 24px; content: ''; } .content-center[direction="column"]::before, .content-left[direction="column"]::before, .content-right[direction="column"]::before { margin-right: 0; margin-bottom: 24px; } .content-center[direction="column"]::after, .content-left[direction="column"]::after, .content-right[direction="column"]::after { margin-top: 24px; margin-left: 0; content: ''; } .content-left::before { max-width: 10%; } .content-right::after { max-width: 10%; } .content-left[direction="column"]::before { max-height: 10%; } .content-right[direction="column"]::after { max-height: 10%; } </style> |