refactor: convert to script setup

This commit is contained in:
liyasthomas
2021-11-17 20:12:15 +05:30
parent 114c37645a
commit 9f944506e0
2 changed files with 18 additions and 22 deletions

View File

@@ -28,17 +28,15 @@
</div>
</template>
<script>
import { defineComponent } from "@nuxtjs/composition-api"
export default defineComponent({
props: {
on: {
type: Boolean,
default: false,
},
},
})
<script setup lang="ts">
withDefaults(
defineProps<{
on: Boolean
}>(),
{
on: false,
}
)
</script>
<style scoped lang="scss">

View File

@@ -12,17 +12,15 @@
</div>
</template>
<script>
import { defineComponent } from "@nuxtjs/composition-api"
export default defineComponent({
props: {
on: {
type: Boolean,
default: false,
},
},
})
<script setup lang="ts">
withDefaults(
defineProps<{
on: Boolean
}>(),
{
on: false,
}
)
</script>
<style scoped lang="scss">