1
0

feat: use defineComponent wrapper

This commit is contained in:
Dominik Pschenitschni
2022-02-15 13:07:59 +01:00
committed by kolaente
parent a3329f1b42
commit ba9f69344a
75 changed files with 309 additions and 236 deletions

View File

@ -41,49 +41,45 @@
</modal>
</template>
<script lang="ts">
<script setup lang="ts">
import { i18n } from '@/i18n'
export default {
name: 'create-edit',
props: {
title: {
type: String,
default: '',
},
primaryLabel: {
type: String,
default() {
return i18n.global.t('misc.create')
},
},
primaryIcon: {
type: String,
default: 'plus',
},
primaryDisabled: {
type: Boolean,
default: false,
},
tertiary: {
type: String,
default: '',
},
wide: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
defineProps({
title: {
type: String,
default: '',
},
primaryLabel: {
type: String,
default() {
return i18n.global.t('misc.create')
},
},
emits: ['create', 'primary', 'tertiary'],
methods: {
primary() {
this.$emit('create')
this.$emit('primary')
},
primaryIcon: {
type: String,
default: 'plus',
},
primaryDisabled: {
type: Boolean,
default: false,
},
tertiary: {
type: String,
default: '',
},
wide: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
})
const emit = defineEmits(['create', 'primary', 'tertiary'])
function primary() {
emit('create')
emit('primary')
}
</script>

View File

@ -16,9 +16,10 @@
</template>
<script lang="ts">
import {defineComponent} from 'vue'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
export default {
export default defineComponent({
name: 'dropdown',
data() {
return {
@ -55,5 +56,5 @@ export default {
})
},
},
}
})
</script>

View File

@ -2,10 +2,4 @@
<p class="has-text-centered has-text-grey is-italic p-4 mb-4">
<slot></slot>
</p>
</template>
<script lang="ts">
export default {
name: 'nothing',
}
</script>
</template>

View File

@ -37,12 +37,6 @@
</notifications>
</template>
<script lang="ts">
export default {
name: 'notification',
}
</script>
<style scoped>
.vue-notification {
z-index: 9999;