chore: config install according component

This commit is contained in:
Sagi 2022-09-30 15:02:45 +08:00
parent ba863b2c91
commit 5b8165bb38
5 changed files with 51 additions and 27 deletions

View File

@ -0,0 +1,13 @@
import type { App } from 'vue';
import According from './src/according.component';
import AccordingItem from './src/components/according-item.component';
export * from './src/according.props';
export * from './src/components/according-item.props';
export default {
install(app: App): void {
app.component(According.name, According);
app.component(AccordingItem.name, AccordingItem);
}
};

View File

@ -8,5 +8,5 @@ export { ButtonEdit };
export default {
install(app: App): void {
app.component(ButtonEdit.name, ButtonEdit);
},
}
};

View File

@ -0,0 +1,13 @@
import { defineComponent, SetupContext } from 'vue';
import { TabPageProps, tabPageProps } from './tab-page.props';
export default defineComponent({
name: 'FTabPage',
props: tabPageProps,
emits: [],
setup(props: TabPageProps, context: SetupContext) {
return () => {
return context.slots.default && context.slots.default();
};
}
});

View File

@ -1,7 +1,7 @@
{
"name": "@farris/ui-vue",
"private": true,
"version": "0.0.0",
"version": "0.0.1",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",

View File

@ -1,9 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue'
import { ref } from 'vue';
defineProps<{ msg: string }>()
defineProps<{ msg: string }>();
const count = ref(0)
const count = ref(0);
</script>
<template>
@ -19,9 +19,7 @@ const count = ref(0)
<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the official Vue + Vite starter
</p>
<p>
Install