Internal: UI: BaseAdvancedSettingsButton component accept v-model

pull/4788/head
Angel Fernando Quiroz Campos 1 year ago
parent 640f3361e5
commit 55e3f07704
  1. 13
      assets/vue/components/basecomponents/BaseAdvancedSettingsButton.vue

@ -19,9 +19,18 @@ import BaseButton from "./BaseButton.vue";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
const props = defineProps({
modelValue: {
type: Boolean,
required: false,
default: () => false,
}
})
const emit = defineEmits(['update:modelValue']);
const { t } = useI18n();
const showAdvancedSettings = ref(false);
const showAdvancedSettings = ref(props.modelValue);
const showAdvancedSettingsLabel = computed(() => {
if (showAdvancedSettings.value) {
@ -33,5 +42,7 @@ const showAdvancedSettingsLabel = computed(() => {
const advancedSettingsClicked = () => {
showAdvancedSettings.value = !showAdvancedSettings.value;
emit('update:modelValue', showAdvancedSettings.value);
};
</script>

Loading…
Cancel
Save