vueless 0.0.470 → 0.0.471
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 +1 -1
- package/ui.button/UButton.vue +7 -3
- package/web-types.json +1 -1
package/package.json
CHANGED
package/ui.button/UButton.vue
CHANGED
|
@@ -291,13 +291,17 @@ const iconColor = computed(() => {
|
|
|
291
291
|
|
|
292
292
|
watch(
|
|
293
293
|
() => props.loading,
|
|
294
|
-
(newValue) => {
|
|
295
|
-
|
|
294
|
+
(newValue, oldValue) => {
|
|
295
|
+
const isLoaderOn = newValue && oldValue !== undefined;
|
|
296
|
+
|
|
297
|
+
if (isLoaderOn && buttonRef.value) {
|
|
296
298
|
buttonWidth.value = buttonRef.value.offsetWidth;
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
buttonStyle.value = {
|
|
300
|
-
width:
|
|
302
|
+
width: isLoaderOn ? `${buttonWidth.value}px` : null,
|
|
303
|
+
paddingLeft: isLoaderOn ? "0px" : null,
|
|
304
|
+
paddingRight: isLoaderOn ? "0px" : null,
|
|
301
305
|
};
|
|
302
306
|
},
|
|
303
307
|
{ immediate: true },
|