Prvni naznak verejne casti, sprava profilu
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import {onMounted, ref, watch} from "vue";
|
||||
import {ref, watch} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
@@ -26,9 +26,9 @@ const props = defineProps({
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
|
||||
const content = ref("");
|
||||
onMounted(() => {
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
content.value = props.modelValue;
|
||||
})
|
||||
}, {immediate: true})
|
||||
|
||||
watch(content, () => emit("update:modelValue", content.value));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user