@v1nt1248/3nclient-lib 0.1.65 → 0.1.67
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/package.json
CHANGED
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function turnOnEditMode() {
|
|
64
|
+
if (props.disabled) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
64
68
|
inEdit.value = true;
|
|
65
69
|
initialValue.value = value.value;
|
|
66
70
|
|
|
@@ -80,6 +84,10 @@
|
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
function done() {
|
|
87
|
+
if (props.disabled) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
83
91
|
if (props.disallowEmptyValue && !isValid.value) {
|
|
84
92
|
return;
|
|
85
93
|
}
|
|
@@ -93,6 +101,10 @@
|
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
function cancel() {
|
|
104
|
+
if (props.disabled) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
96
108
|
if (value.value !== initialValue.value) {
|
|
97
109
|
value.value = initialValue.value;
|
|
98
110
|
emits('update:modelValue', value.value);
|
|
@@ -102,6 +114,10 @@
|
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
function onClickOutside() {
|
|
117
|
+
if (props.disabled) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
105
121
|
if (inEdit.value) {
|
|
106
122
|
emits('focusout');
|
|
107
123
|
done();
|
|
@@ -121,7 +137,7 @@
|
|
|
121
137
|
watch(
|
|
122
138
|
() => inEdit.value,
|
|
123
139
|
val => {
|
|
124
|
-
emits('toggle:editMode', val);
|
|
140
|
+
!props.disabled && emits('toggle:editMode', val);
|
|
125
141
|
},
|
|
126
142
|
);
|
|
127
143
|
</script>
|
|
@@ -129,7 +145,7 @@
|
|
|
129
145
|
<template>
|
|
130
146
|
<div
|
|
131
147
|
v-ui3n-click-outside="onClickOutside"
|
|
132
|
-
:class="$style.ui3nEditable"
|
|
148
|
+
:class="[$style.ui3nEditable, disabled && $style.ui3nEditableDisabled]"
|
|
133
149
|
@focusin="emits('focusin', $event);"
|
|
134
150
|
>
|
|
135
151
|
<template v-if="inEdit">
|
|
@@ -148,11 +164,19 @@
|
|
|
148
164
|
@keydown.esc="cancel"
|
|
149
165
|
/>
|
|
150
166
|
|
|
151
|
-
<div
|
|
167
|
+
<div
|
|
168
|
+
v-ui3n-ripple
|
|
169
|
+
:class="[$style.btn, $style.doneBtn, disabled && $style.btnDisabled]"
|
|
170
|
+
@click.stop.prevent="done"
|
|
171
|
+
>
|
|
152
172
|
<ui3n-icon icon="round-done" size="12" color="var(--color-icon-table-accent-default)" />
|
|
153
173
|
</div>
|
|
154
174
|
|
|
155
|
-
<div
|
|
175
|
+
<div
|
|
176
|
+
v-ui3n-ripple
|
|
177
|
+
:class="[$style.btn, $style.cancelBtn, disabled && $style.btnDisabled]"
|
|
178
|
+
@click.stop.prevent="cancel"
|
|
179
|
+
>
|
|
156
180
|
<ui3n-icon icon="round-close" size="12" color="var(--color-icon-table-secondary-default)" />
|
|
157
181
|
</div>
|
|
158
182
|
</template>
|
|
@@ -192,6 +216,11 @@
|
|
|
192
216
|
overflow: hidden;
|
|
193
217
|
}
|
|
194
218
|
|
|
219
|
+
.ui3nEditableDisabled {
|
|
220
|
+
cursor: default;
|
|
221
|
+
pointer-events: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
195
224
|
.content {
|
|
196
225
|
position: relative;
|
|
197
226
|
height: var(--ui3n-editable-height);
|
|
@@ -300,4 +329,10 @@
|
|
|
300
329
|
opacity: 1;
|
|
301
330
|
}
|
|
302
331
|
}
|
|
332
|
+
|
|
333
|
+
.btnDisabled {
|
|
334
|
+
cursor: default;
|
|
335
|
+
pointer-events: none;
|
|
336
|
+
opacity: 0.75;
|
|
337
|
+
}
|
|
303
338
|
</style>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
tableEl,
|
|
15
15
|
currentConfig,
|
|
16
16
|
visibleColumns,
|
|
17
|
+
hasGroupActionsRow,
|
|
17
18
|
showGroupActionsRow,
|
|
18
19
|
selectedRowsArray,
|
|
19
20
|
selectedRowsSize,
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
defineExpose({
|
|
34
35
|
getRowStyle,
|
|
35
36
|
selectedRowsArray,
|
|
37
|
+
hasGroupActionsRow,
|
|
36
38
|
closeGroupActionsRow,
|
|
37
39
|
});
|
|
38
40
|
</script>
|