feat: use defineComponent wrapper
This commit is contained in:

committed by
kolaente

parent
a3329f1b42
commit
ba9f69344a
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
@ -37,12 +37,6 @@
|
||||
</notifications>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'notification',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.vue-notification {
|
||||
z-index: 9999;
|
||||
|
Reference in New Issue
Block a user