From 693c27d1e72caf5eb6dc0f176abc9cb4d2c0cb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 29 Mar 2023 13:29:26 +0300 Subject: [PATCH] InputStyle and Ripple usage fixes on configurator --- layouts/AppConfigurator.vue | 41 ++++++++++++++++++++++--------------- layouts/default.vue | 5 ++++- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/layouts/AppConfigurator.vue b/layouts/AppConfigurator.vue index 7c6431d9b..d6deeed04 100755 --- a/layouts/AppConfigurator.vue +++ b/layouts/AppConfigurator.vue @@ -15,11 +15,11 @@

Input Style

- +
- +
@@ -27,7 +27,7 @@

Ripple Effect

- +
@@ -312,28 +312,23 @@ import EventBus from '@/layouts/AppEventBus'; export default { - emits: ['update:modelValue'], + emits: ['updateConfigActive'], props: { - modelValue: Boolean + configActive: { + type: Boolean, + default: false + } }, data() { return { visible: false, scale: 14, - scales: [12, 13, 14, 15, 16], - inputStyle: 'outlined', - ripple: true + scales: [12, 13, 14, 15, 16] }; }, watch: { - modelValue(value) { + configActive(value) { this.visible = value; - }, - inputStyle(value) { - this.$primevue.config.inputStyle = value; - }, - ripple(value) { - this.$primevue.config.ripple = value; } }, outsideClickListener: null, @@ -354,7 +349,7 @@ export default { methods: { onSidebarHide() { this.visible = false; - this.$emit('update:modelValue', false); + this.$emit('updateConfigActive', false); }, changeTheme(theme, dark) { EventBus.emit('theme-change', { theme: theme, dark: dark }); @@ -369,6 +364,20 @@ export default { }, applyScale() { document.documentElement.style.fontSize = this.scale + 'px'; + }, + onInputStyleChange(value) { + this.$primevue.config.inputStyle = value; + }, + onRippleChange(value) { + this.$primevue.config.ripple = value; + } + }, + computed: { + inputStyle() { + return this.$primevue.config.inputStyle; + }, + rippleActive() { + return this.$primevue.config.ripple; } } }; diff --git a/layouts/default.vue b/layouts/default.vue index 17841afaa..e141e1f9e 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -3,7 +3,7 @@ - +
@@ -107,6 +107,9 @@ export default { }, onConfigButtonClick() { this.appConfigActive = true; + }, + onUpdateConfigActive() { + this.appConfigActive = false; } }, computed: {