diff --git a/locales/en.json b/locales/en.json index 4d364f9..be128dd 100644 --- a/locales/en.json +++ b/locales/en.json @@ -30,6 +30,7 @@ "Corners Square type": "Corners Square type", "Corners Dot color": "Corners Dot color", "Corners Dot type": "Corners Dot type", + "With background": "With background", "QR code preset": "QR code preset", "Preset": "Preset", "dots": "dots", diff --git a/src/App.vue b/src/App.vue index b94be2f..68584ce 100644 --- a/src/App.vue +++ b/src/App.vue @@ -49,6 +49,17 @@ const cornersDotOptionsType = ref() const styleBorderRadius = ref() const styledBorderRadiusFormatted = computed(() => `${styleBorderRadius.value}px`) const styleBackground = ref(defaultPreset.style.background) +const lastBackground = ref(defaultPreset.style.background) + +const withBackground = ref(true) +watch(withBackground, () => { + if (!withBackground.value) { + lastBackground.value = styleBackground.value + styleBackground.value = 'transparent' + } else { + styleBackground.value = lastBackground.value + } +}) const dotsOptions = computed(() => ({ color: dotsOptionsColor.value, @@ -592,7 +603,22 @@ onMounted(() => { v-model="image" /> -
+
+ + +
+