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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x 7x | <template> <div :class="$style.root" :selected="allChecked === true" :partial-selected="allChecked === null" :focused="isFocused" :readonly="parentVM.readonly" :disabled="parentVM.disabled" @mouseenter="hover" :style="{ direction: parentVM.ellipsisDirection }" @click="select" isShowMultipleIcon v-ellipsis-title> <slot>全选</slot> </div> </template> <script> export default { name: 'u-select-item-all-check', props: { allChecked: [Boolean, null], checkAll: Function, parentVM: Object, }, computed: { isFocused() { return this.parentVM && this.parentVM.focusedVM === this; }, currentText() { return this.text || this.$slots.default[0] && this.$slots.default[0].text; }, }, methods: { hover() { this.parentVM && (this.parentVM.focusedVM = this); }, select() { this.checkAll(this.allChecked !== true); }, }, }; </script> <style module> .root { cursor: var(--cursor-pointer); padding: var(--list-view-item-padding); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; position: relative; line-height: 32px; color: var(--select-popper-item-color); background: var(--select-popper-item-background); } .root { padding-top: 0; padding-bottom: 0; } .root[readonly] { cursor: default !important; color: var(--select-popper-item-color-readonly); background: var(--select-popper-item-background-readonly); } .root[focused] { color: var(--select-popper-item-color-focused); background: var(--select-popper-item-background-focused); } .root[selected] { color: var(--select-popper-item-color-selected); background: var(--select-popper-item-background-selected); } .root:hover { color: var(--select-popper-item-color-hover); background: var(--select-popper-item-background-hover); } .root[disabled] { cursor: var(--cursor-not-allowed); background: var(--list-view-item-background-disabled); color: var(--list-view-item-color-disabled); opacity: 0.5; } .root[selected][disabled] { color: var(--select-popper-item-color-selected-disabled); background: var(--select-popper-item-background-selected-disabled); } .root[duplicated] { color: var(--select-popper-item-color-duplicated); background: var(--select-popper-item-background-duplicated); } .root[duplicated]:hover { color: var(--select-popper-item-color-duplicated-hover); background: var(--select-popper-item-background-duplicated-hover); } .root[isShowMultipleIcon]::before { content: ""; box-sizing: border-box; display: inline-block; width: 18px; height: 18px; border: var(--select-multiple-border-color); border-radius: 4px; vertical-align: text-top; margin-right: 8px; } .root[isShowMultipleIcon][selected]:before { border-color: transparent; background-color: var(--select-multiple-background-color); } .root[isShowMultipleIcon][selected]:after { position: absolute; left: 13px; top: 0px; font-size: 16px; color: var(--select-multiple-icon-color); icon-font: url('../i-icon.vue/icons/select-dark.svg'); } .root[isShowMultipleIcon][partial-selected]:after { position: absolute; height: 8px; width: 8px; left: 21px; top: 50%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); content: ''; background: var(--select-multiple-partial-icon-color); border-radius: 2px; } .flag { position: absolute; top: 0; left: 0; border: 7px solid; border-color: #4ec9ab transparent transparent #4ec9ab; } .flag[layer="high"] { width: 14px; height: 14px; border: none; background-image: url("../../assets/images/high.png"); } .desc { color: var(--select-popper-item-description-color); font-size: var(--select-popper-item-description-font-size); line-height: var(--select-popper-item-description-line-height); margin-top: -3px; margin-bottom: 5px; white-space: initial; } .root[selected] .desc { color: var(--select-popper-item-description-selected-color); } </style> |