quasar-ui-sellmate-ui-kit 1.1.96 → 2.0.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/dist/index.css +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.rtl.css +1 -1
- package/dist/index.rtl.min.css +1 -1
- package/package.json +1 -1
- package/src/components/SButton.vue +2 -2
- package/src/components/SCaution.vue +40 -26
- package/src/components/SChip.vue +51 -4
- package/src/components/STable.vue +40 -6
- package/src/css/default.scss +699 -0
- package/src/css/variable.scss +3 -1
- package/src/vue-plugin.js +0 -3
- package/dist/index.common.js +0 -6
- package/dist/index.esm.js +0 -6
- package/dist/index.umd.js +0 -3870
- package/dist/index.umd.min.js +0 -6
- package/src/components/SBanner.vue +0 -28
package/dist/index.css
CHANGED
package/dist/index.min.css
CHANGED
package/dist/index.rtl.css
CHANGED
package/dist/index.rtl.min.css
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-banner
|
|
3
|
-
|
|
2
|
+
<q-banner
|
|
3
|
+
dense
|
|
4
|
+
rounded
|
|
5
|
+
class="text-grey-2 col relative-position s-caution"
|
|
6
|
+
:class="{
|
|
7
|
+
's-caution__title': title,
|
|
8
|
+
's-caution__page bg-red-14': !useModal,
|
|
9
|
+
'bg-red-11': useModal,
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
12
|
+
<div v-if="title" class="s-caution-title">{{ title }}</div>
|
|
4
13
|
<ul>
|
|
5
14
|
<slot />
|
|
6
15
|
</ul>
|
|
7
|
-
<q-icon
|
|
16
|
+
<q-icon
|
|
17
|
+
v-if="!useModal"
|
|
18
|
+
class="s-caution-icon"
|
|
19
|
+
size="240px"
|
|
20
|
+
:name="cautionOutlineIcon"
|
|
21
|
+
/>
|
|
8
22
|
</q-banner>
|
|
9
23
|
</template>
|
|
10
|
-
|
|
11
24
|
<script>
|
|
12
25
|
import { defineComponent } from 'vue';
|
|
13
26
|
import { QBanner, QIcon } from 'quasar';
|
|
@@ -20,7 +33,8 @@ export default defineComponent({
|
|
|
20
33
|
QIcon,
|
|
21
34
|
},
|
|
22
35
|
props: {
|
|
23
|
-
title: String,
|
|
36
|
+
title: { type: String, default: '' },
|
|
37
|
+
useModal: { type: Boolean, default: false },
|
|
24
38
|
},
|
|
25
39
|
setup() {
|
|
26
40
|
return {
|
|
@@ -31,34 +45,14 @@ export default defineComponent({
|
|
|
31
45
|
</script>
|
|
32
46
|
|
|
33
47
|
<style lang="scss">
|
|
34
|
-
@import "../css/variable.scss";
|
|
35
|
-
|
|
36
48
|
.s-caution {
|
|
37
49
|
padding: 20px 0;
|
|
38
|
-
background-color: #fef1f1;
|
|
39
50
|
border-radius: 4px;
|
|
40
|
-
border: 1px solid $red-9;
|
|
41
|
-
border-left: 8px solid $red-7;
|
|
42
|
-
position: relative;
|
|
43
51
|
overflow: hidden;
|
|
44
52
|
max: {
|
|
45
53
|
height: 100%;
|
|
46
54
|
width: 100%;
|
|
47
55
|
}
|
|
48
|
-
.s-caution-title {
|
|
49
|
-
width: 100%;
|
|
50
|
-
height: 30px;
|
|
51
|
-
line-height: 30px;
|
|
52
|
-
color: $red-6;
|
|
53
|
-
font: {
|
|
54
|
-
size: 18px;
|
|
55
|
-
weight: 700;
|
|
56
|
-
}
|
|
57
|
-
margin: {
|
|
58
|
-
left: $caution-margin-left;
|
|
59
|
-
bottom: 16px;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
56
|
ul {
|
|
63
57
|
margin: 0;
|
|
64
58
|
padding: 0;
|
|
@@ -79,8 +73,28 @@ export default defineComponent({
|
|
|
79
73
|
position: absolute;
|
|
80
74
|
right: -41px;
|
|
81
75
|
bottom: -34px;
|
|
82
|
-
color: #
|
|
76
|
+
color: #fd9595;
|
|
83
77
|
opacity: 0.24;
|
|
84
78
|
}
|
|
85
79
|
}
|
|
80
|
+
.s-caution__page {
|
|
81
|
+
border: 1px solid $red-9;
|
|
82
|
+
}
|
|
83
|
+
.s-caution__title {
|
|
84
|
+
border-left: 8px solid $red-7;
|
|
85
|
+
.s-caution-title {
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 30px;
|
|
88
|
+
line-height: 30px;
|
|
89
|
+
color: $red-6;
|
|
90
|
+
font: {
|
|
91
|
+
size: 18px;
|
|
92
|
+
weight: 700;
|
|
93
|
+
}
|
|
94
|
+
margin: {
|
|
95
|
+
left: $caution-margin-left;
|
|
96
|
+
bottom: 16px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
86
100
|
</style>
|
package/src/components/SChip.vue
CHANGED
|
@@ -1,29 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-chip
|
|
3
|
-
class="row items-center text-color-grey-2 s-chip"
|
|
3
|
+
class="no-hover row items-center text-color-grey-2 s-chip"
|
|
4
4
|
square
|
|
5
5
|
removable
|
|
6
6
|
outline
|
|
7
7
|
dense
|
|
8
|
+
:clickable="useInput"
|
|
8
9
|
color="grey-6"
|
|
9
10
|
:ripple="false"
|
|
10
11
|
:icon-remove="chipRemoveIcon"
|
|
12
|
+
v-model="model"
|
|
11
13
|
>
|
|
14
|
+
<template v-if="useInput">
|
|
15
|
+
<span
|
|
16
|
+
class="s-chip-input"
|
|
17
|
+
role="textbox"
|
|
18
|
+
id="inputSpan"
|
|
19
|
+
v-bind:contenteditable="useInput"
|
|
20
|
+
@keypress="handleInput"
|
|
21
|
+
>{{ inputValue }}</span>
|
|
22
|
+
</template>
|
|
12
23
|
<slot></slot>
|
|
13
24
|
</q-chip>
|
|
14
25
|
</template>
|
|
15
26
|
|
|
16
27
|
<script>
|
|
17
|
-
import { defineComponent } from 'vue';
|
|
28
|
+
import { defineComponent, ref, watch } from 'vue';
|
|
18
29
|
import { QChip } from 'quasar';
|
|
19
30
|
import { chipRemoveIcon } from '../assets/icons.js';
|
|
20
31
|
|
|
21
32
|
export default defineComponent({
|
|
22
33
|
name: 'SChip',
|
|
23
34
|
components: { QChip },
|
|
24
|
-
|
|
35
|
+
props: {
|
|
36
|
+
useInput: { type: Boolean, default: false },
|
|
37
|
+
modelValue: { type: Boolean, default: false },
|
|
38
|
+
input: { type: String, default: '' },
|
|
39
|
+
},
|
|
40
|
+
setup(props, { emit }) {
|
|
41
|
+
const model = ref(props.modelValue);
|
|
42
|
+
watch(
|
|
43
|
+
() => props.modelValue,
|
|
44
|
+
(val) => {
|
|
45
|
+
model.value = val;
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
const inputValue = ref(props.input);
|
|
49
|
+
watch(
|
|
50
|
+
() => props.input,
|
|
51
|
+
(val) => {
|
|
52
|
+
inputValue.value = val;
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
function handleInput(event) {
|
|
56
|
+
inputValue.value = event.target.outerText;
|
|
57
|
+
if (event.key === 'Enter') {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
event.target.blur();
|
|
60
|
+
emit('update:input', inputValue.value);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
25
63
|
return {
|
|
26
64
|
chipRemoveIcon,
|
|
65
|
+
model,
|
|
66
|
+
inputValue,
|
|
67
|
+
handleInput,
|
|
27
68
|
};
|
|
28
69
|
},
|
|
29
70
|
});
|
|
@@ -49,7 +90,6 @@ export default defineComponent({
|
|
|
49
90
|
font-weight: $default-font-weight;
|
|
50
91
|
height: $default-content-height;
|
|
51
92
|
min-height: $default-content-height;
|
|
52
|
-
|
|
53
93
|
}
|
|
54
94
|
.q-chip__icon--remove {
|
|
55
95
|
color: $grey-2;
|
|
@@ -58,4 +98,11 @@ export default defineComponent({
|
|
|
58
98
|
margin-left: $default-icon-margin;
|
|
59
99
|
}
|
|
60
100
|
}
|
|
101
|
+
.s-chip-input {
|
|
102
|
+
height: 28px;
|
|
103
|
+
padding: 4px 0 !important;
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
outline: none;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
61
108
|
</style>
|
|
@@ -5,16 +5,27 @@
|
|
|
5
5
|
hide-pagination
|
|
6
6
|
hide-selected-banner
|
|
7
7
|
class="s-table"
|
|
8
|
-
:class="{
|
|
8
|
+
:class="{
|
|
9
|
+
's-select-table': useSelect,
|
|
10
|
+
'resizable-table': resizable,
|
|
11
|
+
'sticky-resizable-table': stickyResizable,
|
|
12
|
+
'sticky-header': stickyHeader,
|
|
13
|
+
'before-search': beforeSearch,
|
|
14
|
+
}"
|
|
9
15
|
:table-class="{ 'resizable-table': resizable }"
|
|
10
16
|
:columns="columns"
|
|
11
17
|
:rows="rows"
|
|
18
|
+
v-model:pagination="paginationModel"
|
|
19
|
+
:no-data-label="noDataLabel"
|
|
12
20
|
ref="sTableRef"
|
|
13
21
|
@selection="updateSelected"
|
|
14
22
|
>
|
|
15
|
-
<template #no-data>
|
|
16
|
-
<slot name="noData">
|
|
17
|
-
<div class="full-width text-center"
|
|
23
|
+
<template #no-data="props">
|
|
24
|
+
<slot name="noData" v-bind="props">
|
|
25
|
+
<div class="full-width text-center">
|
|
26
|
+
{{ props }}
|
|
27
|
+
{{ props.message }}
|
|
28
|
+
</div>
|
|
18
29
|
</slot>
|
|
19
30
|
</template>
|
|
20
31
|
<template #loading>
|
|
@@ -67,6 +78,12 @@
|
|
|
67
78
|
</slot>
|
|
68
79
|
</template>
|
|
69
80
|
</q-table>
|
|
81
|
+
<s-pagination2
|
|
82
|
+
v-if="!hideBottom"
|
|
83
|
+
v-model="paginationModel.page"
|
|
84
|
+
:lastPage="pagesNumber"
|
|
85
|
+
class="q-mt-md"
|
|
86
|
+
/>
|
|
70
87
|
</template>
|
|
71
88
|
|
|
72
89
|
<script>
|
|
@@ -74,7 +91,7 @@ import {
|
|
|
74
91
|
QTable, QInnerLoading, QTd, QIcon,
|
|
75
92
|
} from 'quasar';
|
|
76
93
|
import {
|
|
77
|
-
defineComponent, onMounted, ref,
|
|
94
|
+
defineComponent, onMounted, ref, computed,
|
|
78
95
|
} from 'vue';
|
|
79
96
|
import { useResizable } from '../composables/table/use-resizable';
|
|
80
97
|
import { useNavigator } from '../composables/table/use-navigator';
|
|
@@ -88,6 +105,21 @@ export default defineComponent({
|
|
|
88
105
|
QIcon,
|
|
89
106
|
},
|
|
90
107
|
props: {
|
|
108
|
+
pagination: {
|
|
109
|
+
type: Object,
|
|
110
|
+
default: () => ({
|
|
111
|
+
page: 1,
|
|
112
|
+
rowsPerPage: 50,
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
hideBottom: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
119
|
+
noDataLabel: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: '데이터 조회가 필요합니다',
|
|
122
|
+
},
|
|
91
123
|
columns: {
|
|
92
124
|
type: Array,
|
|
93
125
|
default: () => [],
|
|
@@ -126,6 +158,7 @@ export default defineComponent({
|
|
|
126
158
|
},
|
|
127
159
|
},
|
|
128
160
|
setup(props, { emit, attrs }) {
|
|
161
|
+
const paginationModel = ref(props.pagination);
|
|
129
162
|
const sTableRef = ref(null);
|
|
130
163
|
const {
|
|
131
164
|
focusCell,
|
|
@@ -164,6 +197,8 @@ export default defineComponent({
|
|
|
164
197
|
closeInput,
|
|
165
198
|
editIcon,
|
|
166
199
|
updateSelected,
|
|
200
|
+
paginationModel,
|
|
201
|
+
pagesNumber: computed(() => Math.ceil((paginationModel.value.rowsNumber || props.rows.length) / paginationModel.value.rowsPerPage)),
|
|
167
202
|
};
|
|
168
203
|
},
|
|
169
204
|
});
|
|
@@ -233,7 +268,6 @@ export default defineComponent({
|
|
|
233
268
|
}
|
|
234
269
|
}
|
|
235
270
|
.s-select-table {
|
|
236
|
-
margin-bottom: $pagination-size;
|
|
237
271
|
.q-table__middle {
|
|
238
272
|
.q-table {
|
|
239
273
|
thead {
|