quasar-ui-sellmate-ui-kit 2.2.33 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -142
- package/dist/index.common.js +3 -3
- package/dist/index.css +2 -2
- package/dist/index.esm.js +3 -3
- package/dist/index.min.css +2 -2
- package/dist/index.rtl.css +2 -2
- package/dist/index.rtl.min.css +2 -2
- package/dist/index.umd.js +3558 -3550
- package/dist/index.umd.min.js +3 -3
- package/package.json +75 -75
- package/src/components/SBreadcrumbs.vue +55 -55
- package/src/components/SButton.vue +206 -206
- package/src/components/SButtonGroup.vue +41 -41
- package/src/components/SCaution.vue +102 -102
- package/src/components/SCheckbox.vue +123 -123
- package/src/components/SChip.vue +99 -99
- package/src/components/SDate.vue +717 -717
- package/src/components/SDateAutoRangePicker.vue +341 -341
- package/src/components/SDatePicker.vue +472 -472
- package/src/components/SDateRange.vue +470 -470
- package/src/components/SDateRangePicker.vue +660 -660
- package/src/components/SDateTimePicker.vue +349 -349
- package/src/components/SDialog.vue +250 -250
- package/src/components/SDropdown.vue +216 -216
- package/src/components/SEditor.vue +490 -490
- package/src/components/SFilePicker.vue +207 -207
- package/src/components/SHelp.vue +146 -146
- package/src/components/SInput.vue +343 -343
- package/src/components/SInputCounter.vue +46 -46
- package/src/components/SInputNumber.vue +179 -179
- package/src/components/SList.vue +29 -29
- package/src/components/SMarkupTable.vue +141 -141
- package/src/components/SPagination.vue +266 -266
- package/src/components/SRadio.vue +78 -78
- package/src/components/SRouteTab.vue +67 -67
- package/src/components/SSelect.vue +294 -294
- package/src/components/SSelectCheckbox.vue +222 -225
- package/src/components/SSelectCustom.vue +25 -17
- package/src/components/SSelectGroupCheckbox.vue +235 -235
- package/src/components/SSelectSearch.vue +261 -261
- package/src/components/SSelectSearchAutoComplete.vue +172 -172
- package/src/components/SSelectSearchCheckbox.vue +356 -356
- package/src/components/SStringToInput.vue +66 -66
- package/src/components/STab.vue +80 -80
- package/src/components/STableTree.vue +208 -208
- package/src/components/STimePicker.vue +159 -159
- package/src/components/SToggle.vue +68 -68
- package/src/components/STooltip.vue +209 -209
- package/src/components/SelelctItem.vue +21 -21
- package/src/components/TimePickerCard.vue +352 -352
- package/src/composables/date.js +11 -11
- package/src/composables/modelBinder.js +13 -13
- package/src/composables/table/use-navigator.js +110 -110
- package/src/composables/table/use-resizable.js +80 -80
- package/src/css/app.scss +90 -90
- package/src/css/extends.scss +154 -154
- package/src/css/quasar.variables.scss +189 -189
- package/src/index.common.js +1 -1
- package/src/index.esm.js +4 -4
- package/src/index.scss +9 -9
- package/src/index.umd.js +3 -3
- package/src/vue-plugin.js +92 -92
|
@@ -1,294 +1,294 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-v-text-v-html-on-component -->
|
|
2
|
-
<template>
|
|
3
|
-
<q-select
|
|
4
|
-
outlined
|
|
5
|
-
dense
|
|
6
|
-
options-dense
|
|
7
|
-
:dropdown-icon="selectDownArrowIcon"
|
|
8
|
-
:options-selected-class="selectedOpt"
|
|
9
|
-
:popup-content-class="
|
|
10
|
-
['s-select-opts', popupContentClass, group ? 's-select-group-opts' : ''].join(' ')
|
|
11
|
-
"
|
|
12
|
-
class="s-select"
|
|
13
|
-
ref="sSelectRef"
|
|
14
|
-
:use-input="searchable && !$attrs.modelValue"
|
|
15
|
-
input-debounce="0"
|
|
16
|
-
:options="searchable ? filteredOptions : options"
|
|
17
|
-
:option-label="optionLabel"
|
|
18
|
-
:option-value="optionValue"
|
|
19
|
-
@input-value="filterFn"
|
|
20
|
-
v-bind="searchableProps"
|
|
21
|
-
@focus="focus"
|
|
22
|
-
@blur="blur"
|
|
23
|
-
:emit-value="emitValue"
|
|
24
|
-
@popup-hide="popupHide"
|
|
25
|
-
no-error-icon
|
|
26
|
-
hide-bottom-space
|
|
27
|
-
:menu-offset="[0, 4]"
|
|
28
|
-
menu-self="top left"
|
|
29
|
-
menu-anchor="bottom start"
|
|
30
|
-
>
|
|
31
|
-
<template v-for="(_, slotName, index) in $slots" #[slotName]="data">
|
|
32
|
-
<!-- eslint-disable-next-line -->
|
|
33
|
-
<slot :key="index" :name="slotName" v-bind="data"></slot>
|
|
34
|
-
</template>
|
|
35
|
-
<template v-if="label" #prepend>
|
|
36
|
-
<div class="include-label">{{ label }}</div>
|
|
37
|
-
</template>
|
|
38
|
-
<template v-if="$attrs.multiple" #selected>
|
|
39
|
-
<span v-for="(items, idx) in $attrs.modelValue" :key="idx">
|
|
40
|
-
{{ items }}
|
|
41
|
-
<span v-if="$attrs.modelValue.length > 1 && $attrs.modelValue.length - 1 > idx">
|
|
42
|
-
,
|
|
43
|
-
</span>
|
|
44
|
-
</span>
|
|
45
|
-
</template>
|
|
46
|
-
<template v-if="group" #option="{itemProps, opt}">
|
|
47
|
-
<q-item v-if="opt.group" v-bind="itemProps" class="group-title">
|
|
48
|
-
<q-item-section>
|
|
49
|
-
<q-item-label overline>
|
|
50
|
-
{{ opt.group }}
|
|
51
|
-
</q-item-label>
|
|
52
|
-
</q-item-section>
|
|
53
|
-
</q-item>
|
|
54
|
-
<q-item v-else v-bind="itemProps" class="group-option">
|
|
55
|
-
<q-item-section>
|
|
56
|
-
<q-item-label v-html="opt.label" />
|
|
57
|
-
</q-item-section>
|
|
58
|
-
</q-item>
|
|
59
|
-
</template>
|
|
60
|
-
<template #no-option>
|
|
61
|
-
<q-item class="s-select-no-option">
|
|
62
|
-
<q-item-section class="text-grey">{{ noOptionLabel }}</q-item-section>
|
|
63
|
-
</q-item>
|
|
64
|
-
</template>
|
|
65
|
-
</q-select>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script>
|
|
69
|
-
import { computed, defineComponent, ref, watch } from 'vue';
|
|
70
|
-
import { QSelect, QItem, QItemSection, QItemLabel } from 'quasar';
|
|
71
|
-
import { selectDownArrowIcon } from '../assets/icons.js';
|
|
72
|
-
|
|
73
|
-
export default defineComponent({
|
|
74
|
-
name: 'SSelect',
|
|
75
|
-
components: {
|
|
76
|
-
QSelect,
|
|
77
|
-
QItem,
|
|
78
|
-
QItemSection,
|
|
79
|
-
QItemLabel,
|
|
80
|
-
},
|
|
81
|
-
props: {
|
|
82
|
-
label: String,
|
|
83
|
-
group: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
default: false,
|
|
86
|
-
},
|
|
87
|
-
checkbox: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: false,
|
|
90
|
-
},
|
|
91
|
-
selectedOpt: String,
|
|
92
|
-
searchable: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
default: false,
|
|
95
|
-
},
|
|
96
|
-
optionLabel: {
|
|
97
|
-
type: [String, Function],
|
|
98
|
-
default: 'label',
|
|
99
|
-
},
|
|
100
|
-
optionValue: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: 'value',
|
|
103
|
-
},
|
|
104
|
-
noOptionLabel: {
|
|
105
|
-
type: String,
|
|
106
|
-
default: '선택지가 없습니다.',
|
|
107
|
-
},
|
|
108
|
-
options: Array,
|
|
109
|
-
noSelected: String,
|
|
110
|
-
emitValue: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: false,
|
|
113
|
-
},
|
|
114
|
-
popupContentClass: {
|
|
115
|
-
default: () => '',
|
|
116
|
-
type: String,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
setup(props, { emit, attrs }) {
|
|
120
|
-
const filteredOptions = ref(props.options);
|
|
121
|
-
const sSelectRef = ref(null);
|
|
122
|
-
const focused = ref(false);
|
|
123
|
-
function filterFn(val) {
|
|
124
|
-
if (val === '') {
|
|
125
|
-
filteredOptions.value = props.options;
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
filteredOptions.value = props.options.filter(
|
|
129
|
-
v => (v[props.optionLabel].toUpperCase()
|
|
130
|
-
|| v.toUpperCase()).indexOf(val.toUpperCase())
|
|
131
|
-
> -1,
|
|
132
|
-
);
|
|
133
|
-
emit('input-value', val);
|
|
134
|
-
}
|
|
135
|
-
function focus(e) {
|
|
136
|
-
if (props.searchable) {
|
|
137
|
-
focused.value = true;
|
|
138
|
-
}
|
|
139
|
-
emit('focus', e);
|
|
140
|
-
}
|
|
141
|
-
function blur(e) {
|
|
142
|
-
if (props.searchable) {
|
|
143
|
-
focused.value = false;
|
|
144
|
-
}
|
|
145
|
-
emit('focus', e);
|
|
146
|
-
}
|
|
147
|
-
function popupHide(e) {
|
|
148
|
-
if (props.searchable) {
|
|
149
|
-
sSelectRef.value.blur();
|
|
150
|
-
}
|
|
151
|
-
emit('popup-hide', e);
|
|
152
|
-
}
|
|
153
|
-
watch(
|
|
154
|
-
() => props.options,
|
|
155
|
-
() => {
|
|
156
|
-
filteredOptions.value = props.options;
|
|
157
|
-
},
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
const notingSelected = computed(() => {
|
|
161
|
-
if (!attrs.modelValue) {
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
if (props.emitValue) {
|
|
165
|
-
return Boolean(!attrs.modelValue);
|
|
166
|
-
}
|
|
167
|
-
return Boolean(!attrs.modelValue[props.optionValue]);
|
|
168
|
-
});
|
|
169
|
-
const selectedLabel = computed(() => {
|
|
170
|
-
if (props.emitValue) {
|
|
171
|
-
return props.options.find(e => e[props.optionValue] === attrs.modelValue)[
|
|
172
|
-
props.optionLabel
|
|
173
|
-
];
|
|
174
|
-
}
|
|
175
|
-
return attrs.modelValue[props.optionLabel];
|
|
176
|
-
});
|
|
177
|
-
const searchableProps = computed(() => {
|
|
178
|
-
if (props.searchable) {
|
|
179
|
-
return {
|
|
180
|
-
displayValue: !notingSelected.value
|
|
181
|
-
? selectedLabel.value
|
|
182
|
-
: !focused.value
|
|
183
|
-
? props.noSelected
|
|
184
|
-
: '',
|
|
185
|
-
clearable: attrs.modelValue && !notingSelected.value,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return {}; // NOTE: displayValue를 사용하면 model이 보이지 않음
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
return {
|
|
192
|
-
selectDownArrowIcon,
|
|
193
|
-
sSelectRef,
|
|
194
|
-
focused,
|
|
195
|
-
filteredOptions,
|
|
196
|
-
filterFn,
|
|
197
|
-
focus,
|
|
198
|
-
blur,
|
|
199
|
-
popupHide,
|
|
200
|
-
notingSelected,
|
|
201
|
-
selectedLabel,
|
|
202
|
-
searchableProps,
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
</script>
|
|
207
|
-
|
|
208
|
-
<style lang="scss">
|
|
209
|
-
@import '../css/quasar.variables.scss';
|
|
210
|
-
@import '../css/extends.scss';
|
|
211
|
-
|
|
212
|
-
.s-select {
|
|
213
|
-
@extend %select;
|
|
214
|
-
|
|
215
|
-
&.q-field--disabled {
|
|
216
|
-
.q-field__control > .q-field__prepend {
|
|
217
|
-
opacity: 1 !important;
|
|
218
|
-
border-right: 1px solid $Grey_Lighten-2;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.q-field__prepend {
|
|
223
|
-
background-color: $Grey_Lighten-5;
|
|
224
|
-
height: auto;
|
|
225
|
-
border-right: 1px solid $Grey_Lighten-1;
|
|
226
|
-
padding: $button-padding-sm;
|
|
227
|
-
.include-label {
|
|
228
|
-
font-size: $default-font;
|
|
229
|
-
font-weight: $default-font-weight;
|
|
230
|
-
color: $Grey_Darken-4;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.s-select.q-select--multiple {
|
|
236
|
-
.q-field__inner {
|
|
237
|
-
.q-field__control {
|
|
238
|
-
&-container {
|
|
239
|
-
.q-field__native {
|
|
240
|
-
display: block;
|
|
241
|
-
min-height: 0;
|
|
242
|
-
height: $default-height;
|
|
243
|
-
padding: $select-padding !important;
|
|
244
|
-
color: $Grey_Darken-4;
|
|
245
|
-
white-space: nowrap;
|
|
246
|
-
overflow: hidden;
|
|
247
|
-
text-overflow: ellipsis;
|
|
248
|
-
> span {
|
|
249
|
-
max-height: $default-height;
|
|
250
|
-
text-overflow: ellipsis;
|
|
251
|
-
overflow-x: hidden;
|
|
252
|
-
}
|
|
253
|
-
> input {
|
|
254
|
-
min-height: 100%;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.s-select-opts {
|
|
263
|
-
@extend %select-menu-list;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.s-select-group-opts {
|
|
267
|
-
padding: 0;
|
|
268
|
-
.s-select-no-option {
|
|
269
|
-
padding: $select-menu-padding;
|
|
270
|
-
}
|
|
271
|
-
@extend %select-menu-list;
|
|
272
|
-
.group-title {
|
|
273
|
-
opacity: 1 !important;
|
|
274
|
-
background: $Grey_Lighten-5 !important;
|
|
275
|
-
border: none;
|
|
276
|
-
border-top: 1px solid $Grey_Lighten-3;
|
|
277
|
-
.q-item__section {
|
|
278
|
-
.q-item__label {
|
|
279
|
-
color: $Grey_Darken-4 !important;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
.group-option {
|
|
284
|
-
padding: 4px 12px 4px 20px !important;
|
|
285
|
-
&.disabled {
|
|
286
|
-
background: white !important;
|
|
287
|
-
border: none !important;
|
|
288
|
-
.q-item__section {
|
|
289
|
-
color: $Grey_Lighten-1 !important;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
</style>
|
|
1
|
+
<!-- eslint-disable vue/no-v-text-v-html-on-component -->
|
|
2
|
+
<template>
|
|
3
|
+
<q-select
|
|
4
|
+
outlined
|
|
5
|
+
dense
|
|
6
|
+
options-dense
|
|
7
|
+
:dropdown-icon="selectDownArrowIcon"
|
|
8
|
+
:options-selected-class="selectedOpt"
|
|
9
|
+
:popup-content-class="
|
|
10
|
+
['s-select-opts', popupContentClass, group ? 's-select-group-opts' : ''].join(' ')
|
|
11
|
+
"
|
|
12
|
+
class="s-select"
|
|
13
|
+
ref="sSelectRef"
|
|
14
|
+
:use-input="searchable && !$attrs.modelValue"
|
|
15
|
+
input-debounce="0"
|
|
16
|
+
:options="searchable ? filteredOptions : options"
|
|
17
|
+
:option-label="optionLabel"
|
|
18
|
+
:option-value="optionValue"
|
|
19
|
+
@input-value="filterFn"
|
|
20
|
+
v-bind="searchableProps"
|
|
21
|
+
@focus="focus"
|
|
22
|
+
@blur="blur"
|
|
23
|
+
:emit-value="emitValue"
|
|
24
|
+
@popup-hide="popupHide"
|
|
25
|
+
no-error-icon
|
|
26
|
+
hide-bottom-space
|
|
27
|
+
:menu-offset="[0, 4]"
|
|
28
|
+
menu-self="top left"
|
|
29
|
+
menu-anchor="bottom start"
|
|
30
|
+
>
|
|
31
|
+
<template v-for="(_, slotName, index) in $slots" #[slotName]="data">
|
|
32
|
+
<!-- eslint-disable-next-line -->
|
|
33
|
+
<slot :key="index" :name="slotName" v-bind="data"></slot>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-if="label" #prepend>
|
|
36
|
+
<div class="include-label">{{ label }}</div>
|
|
37
|
+
</template>
|
|
38
|
+
<template v-if="$attrs.multiple" #selected>
|
|
39
|
+
<span v-for="(items, idx) in $attrs.modelValue" :key="idx">
|
|
40
|
+
{{ items }}
|
|
41
|
+
<span v-if="$attrs.modelValue.length > 1 && $attrs.modelValue.length - 1 > idx">
|
|
42
|
+
,
|
|
43
|
+
</span>
|
|
44
|
+
</span>
|
|
45
|
+
</template>
|
|
46
|
+
<template v-if="group" #option="{itemProps, opt}">
|
|
47
|
+
<q-item v-if="opt.group" v-bind="itemProps" class="group-title">
|
|
48
|
+
<q-item-section>
|
|
49
|
+
<q-item-label overline>
|
|
50
|
+
{{ opt.group }}
|
|
51
|
+
</q-item-label>
|
|
52
|
+
</q-item-section>
|
|
53
|
+
</q-item>
|
|
54
|
+
<q-item v-else v-bind="itemProps" class="group-option">
|
|
55
|
+
<q-item-section>
|
|
56
|
+
<q-item-label v-html="opt.label" />
|
|
57
|
+
</q-item-section>
|
|
58
|
+
</q-item>
|
|
59
|
+
</template>
|
|
60
|
+
<template #no-option>
|
|
61
|
+
<q-item class="s-select-no-option">
|
|
62
|
+
<q-item-section class="text-grey">{{ noOptionLabel }}</q-item-section>
|
|
63
|
+
</q-item>
|
|
64
|
+
</template>
|
|
65
|
+
</q-select>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import { computed, defineComponent, ref, watch } from 'vue';
|
|
70
|
+
import { QSelect, QItem, QItemSection, QItemLabel } from 'quasar';
|
|
71
|
+
import { selectDownArrowIcon } from '../assets/icons.js';
|
|
72
|
+
|
|
73
|
+
export default defineComponent({
|
|
74
|
+
name: 'SSelect',
|
|
75
|
+
components: {
|
|
76
|
+
QSelect,
|
|
77
|
+
QItem,
|
|
78
|
+
QItemSection,
|
|
79
|
+
QItemLabel,
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
label: String,
|
|
83
|
+
group: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
87
|
+
checkbox: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
selectedOpt: String,
|
|
92
|
+
searchable: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
optionLabel: {
|
|
97
|
+
type: [String, Function],
|
|
98
|
+
default: 'label',
|
|
99
|
+
},
|
|
100
|
+
optionValue: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: 'value',
|
|
103
|
+
},
|
|
104
|
+
noOptionLabel: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: '선택지가 없습니다.',
|
|
107
|
+
},
|
|
108
|
+
options: Array,
|
|
109
|
+
noSelected: String,
|
|
110
|
+
emitValue: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false,
|
|
113
|
+
},
|
|
114
|
+
popupContentClass: {
|
|
115
|
+
default: () => '',
|
|
116
|
+
type: String,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
setup(props, { emit, attrs }) {
|
|
120
|
+
const filteredOptions = ref(props.options);
|
|
121
|
+
const sSelectRef = ref(null);
|
|
122
|
+
const focused = ref(false);
|
|
123
|
+
function filterFn(val) {
|
|
124
|
+
if (val === '') {
|
|
125
|
+
filteredOptions.value = props.options;
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
filteredOptions.value = props.options.filter(
|
|
129
|
+
v => (v[props.optionLabel].toUpperCase()
|
|
130
|
+
|| v.toUpperCase()).indexOf(val.toUpperCase())
|
|
131
|
+
> -1,
|
|
132
|
+
);
|
|
133
|
+
emit('input-value', val);
|
|
134
|
+
}
|
|
135
|
+
function focus(e) {
|
|
136
|
+
if (props.searchable) {
|
|
137
|
+
focused.value = true;
|
|
138
|
+
}
|
|
139
|
+
emit('focus', e);
|
|
140
|
+
}
|
|
141
|
+
function blur(e) {
|
|
142
|
+
if (props.searchable) {
|
|
143
|
+
focused.value = false;
|
|
144
|
+
}
|
|
145
|
+
emit('focus', e);
|
|
146
|
+
}
|
|
147
|
+
function popupHide(e) {
|
|
148
|
+
if (props.searchable) {
|
|
149
|
+
sSelectRef.value.blur();
|
|
150
|
+
}
|
|
151
|
+
emit('popup-hide', e);
|
|
152
|
+
}
|
|
153
|
+
watch(
|
|
154
|
+
() => props.options,
|
|
155
|
+
() => {
|
|
156
|
+
filteredOptions.value = props.options;
|
|
157
|
+
},
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
const notingSelected = computed(() => {
|
|
161
|
+
if (!attrs.modelValue) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
if (props.emitValue) {
|
|
165
|
+
return Boolean(!attrs.modelValue);
|
|
166
|
+
}
|
|
167
|
+
return Boolean(!attrs.modelValue[props.optionValue]);
|
|
168
|
+
});
|
|
169
|
+
const selectedLabel = computed(() => {
|
|
170
|
+
if (props.emitValue) {
|
|
171
|
+
return props.options.find(e => e[props.optionValue] === attrs.modelValue)[
|
|
172
|
+
props.optionLabel
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
return attrs.modelValue[props.optionLabel];
|
|
176
|
+
});
|
|
177
|
+
const searchableProps = computed(() => {
|
|
178
|
+
if (props.searchable) {
|
|
179
|
+
return {
|
|
180
|
+
displayValue: !notingSelected.value
|
|
181
|
+
? selectedLabel.value
|
|
182
|
+
: !focused.value
|
|
183
|
+
? props.noSelected
|
|
184
|
+
: '',
|
|
185
|
+
clearable: attrs.modelValue && !notingSelected.value,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return {}; // NOTE: displayValue를 사용하면 model이 보이지 않음
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
selectDownArrowIcon,
|
|
193
|
+
sSelectRef,
|
|
194
|
+
focused,
|
|
195
|
+
filteredOptions,
|
|
196
|
+
filterFn,
|
|
197
|
+
focus,
|
|
198
|
+
blur,
|
|
199
|
+
popupHide,
|
|
200
|
+
notingSelected,
|
|
201
|
+
selectedLabel,
|
|
202
|
+
searchableProps,
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
</script>
|
|
207
|
+
|
|
208
|
+
<style lang="scss">
|
|
209
|
+
@import '../css/quasar.variables.scss';
|
|
210
|
+
@import '../css/extends.scss';
|
|
211
|
+
|
|
212
|
+
.s-select {
|
|
213
|
+
@extend %select;
|
|
214
|
+
|
|
215
|
+
&.q-field--disabled {
|
|
216
|
+
.q-field__control > .q-field__prepend {
|
|
217
|
+
opacity: 1 !important;
|
|
218
|
+
border-right: 1px solid $Grey_Lighten-2;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.q-field__prepend {
|
|
223
|
+
background-color: $Grey_Lighten-5;
|
|
224
|
+
height: auto;
|
|
225
|
+
border-right: 1px solid $Grey_Lighten-1;
|
|
226
|
+
padding: $button-padding-sm;
|
|
227
|
+
.include-label {
|
|
228
|
+
font-size: $default-font;
|
|
229
|
+
font-weight: $default-font-weight;
|
|
230
|
+
color: $Grey_Darken-4;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.s-select.q-select--multiple {
|
|
236
|
+
.q-field__inner {
|
|
237
|
+
.q-field__control {
|
|
238
|
+
&-container {
|
|
239
|
+
.q-field__native {
|
|
240
|
+
display: block;
|
|
241
|
+
min-height: 0;
|
|
242
|
+
height: $default-height;
|
|
243
|
+
padding: $select-padding !important;
|
|
244
|
+
color: $Grey_Darken-4;
|
|
245
|
+
white-space: nowrap;
|
|
246
|
+
overflow: hidden;
|
|
247
|
+
text-overflow: ellipsis;
|
|
248
|
+
> span {
|
|
249
|
+
max-height: $default-height;
|
|
250
|
+
text-overflow: ellipsis;
|
|
251
|
+
overflow-x: hidden;
|
|
252
|
+
}
|
|
253
|
+
> input {
|
|
254
|
+
min-height: 100%;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.s-select-opts {
|
|
263
|
+
@extend %select-menu-list;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.s-select-group-opts {
|
|
267
|
+
padding: 0;
|
|
268
|
+
.s-select-no-option {
|
|
269
|
+
padding: $select-menu-padding;
|
|
270
|
+
}
|
|
271
|
+
@extend %select-menu-list;
|
|
272
|
+
.group-title {
|
|
273
|
+
opacity: 1 !important;
|
|
274
|
+
background: $Grey_Lighten-5 !important;
|
|
275
|
+
border: none;
|
|
276
|
+
border-top: 1px solid $Grey_Lighten-3;
|
|
277
|
+
.q-item__section {
|
|
278
|
+
.q-item__label {
|
|
279
|
+
color: $Grey_Darken-4 !important;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
.group-option {
|
|
284
|
+
padding: 4px 12px 4px 20px !important;
|
|
285
|
+
&.disabled {
|
|
286
|
+
background: white !important;
|
|
287
|
+
border: none !important;
|
|
288
|
+
.q-item__section {
|
|
289
|
+
color: $Grey_Lighten-1 !important;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
</style>
|