Appearance
DANGER
This is an example GitHub Pages site and is NOT intended for actual use in real projects/products!
@obewds/vite-vue-ts-compo-pkg-starter
Welcome to the docs page for OBE:WDS's ViteVueTsCompoPkgStarter.vue component for Vue.js!
Installation
npm install @obewds/vite-vue-ts-compo-pkg-starter --save-dev
1
Import Component
Template syntax
<template>
    <ViteVueTsCompoPkgStarter/>
</template>
1
2
3
2
3
Script setup syntax
<script setup lang="ts">
    import { ViteVueTsCompoPkgStarter } from '@obewds/vite-vue-ts-compo-pkg-starter'
</script>
1
2
3
2
3
Composition API syntax
<script lang="ts">
    import { defineComponent } from 'vue'
    import { ViteVueTsCompoPkgStarter } from '@obewds/vite-vue-ts-compo-pkg-starter'
    export default defineComponent({
        components: { ViteVueTsCompoPkgStarter }
    })
</script>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Props
text
✅ - Type String
 ❌ - Not Required
 ❌ - Doesn't Validate
<template>
    <ViteVueTsCompoPkgStarter text="My text prop string"/>
</template>
1
2
3
2
3
Outputs:
<div>My text prop string</div>
1
WARNING
If both the text prop and slot content are used, then the text prop takes precidence and the slot content will NOT render!
Slots
default
<template>
    <ViteVueTsCompoPkgStarter>
        My slot content
    </ViteVueTsCompoPkgStarter>
</template>
1
2
3
4
5
2
3
4
5
Outputs:
<div>My slot content</div>
1
DANGER
If both the text prop and slot content are used, then the text prop takes precidence and the slot content will NOT render!
Uninstall
npm uninstall @obewds/vite-vue-ts-compo-pkg-starter
1