Refactor page-editor elements to use Composition API (#8721)

* refactor(client): refactor page-editor elements to use Composition API

* Apply review suggestions from @Johann150

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
This commit is contained in:
Andreas Nedbal
2022-06-18 11:39:04 +02:00
committed by GitHub
parent 802a35d4b6
commit 54465d36a7
15 changed files with 214 additions and 428 deletions

View File

@@ -11,32 +11,18 @@
</XContainer>
</template>
<script lang="ts">
<script lang="ts" setup>
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import { } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkTextarea from '@/components/form/textarea.vue';
import MkInput from '@/components/form/input.vue';
import * as os from '@/os';
export default defineComponent({
components: {
XContainer, MkTextarea, MkInput
},
props: {
value: {
required: true
},
},
data() {
return {
};
},
created() {
if (this.value.name == null) this.value.name = '';
},
withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
});
</script>