0.5.0 • Published 10 months ago
tool-test-003 v0.5.0
tool-test-003
组件下载
npm i tool-test-003
组件效果预览
全局使用方法
在vue3项目中全局引用的方式
//main.ts or main.js
import { createApp } from 'vue';
import App from './App.vue';
import Vue3StarrySky from 'tool-test-003';
import 'tool-test-003/lib/style.css';
const app = createApp(App);
app.use(Vue3StarrySky);
app.mount('#app');
如果使用ts+vite的方式,需要在env.d.ts中加入最后一句声明,否则ts会检测报错。
/// <reference types="vite/client" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
declare module 'tool-test-003';
组件内使用
<script setup></script>
<template>
<starry-sky :stars-count="1000" :distance="1000" />
</template>
<style></style>
局部引用方法
示例:
<script setup>
import { StarrySky } from '../packages/index';
</script>
<template>
<starry-sky :stars-count="1000" :distance="1000" />
</template>
<style></style>
参数说明
属性 | 类型 | 默认值 |
---|---|---|
stars-count | Number | 800 |
distance | Number | 800 |
源码地址
- gitee地址:tool-test-003
- github地址:tool-test-003
相关(vue-starry-sky)
本项目基于vite+vue3基于之前的cli+vue2升级改造而来,想访问vue2库组件请点击下面链接地址:
- gitee地址:vue-starry-sky
- github地址:vue-starry-sky
0.4.8
10 months ago
0.4.7
10 months ago
0.5.0
10 months ago
0.3.9
2 years ago
0.3.0
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.3.6
2 years ago
0.2.7
2 years ago
0.1.8
2 years ago
0.4.4
2 years ago
0.3.5
2 years ago
0.2.6
2 years ago
0.1.7
2 years ago
0.3.8
2 years ago
0.2.9
2 years ago
0.4.6
2 years ago
0.3.7
2 years ago
0.2.8
2 years ago
0.1.9
2 years ago
0.4.1
2 years ago
0.3.2
2 years ago
0.2.3
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.2.2
2 years ago
0.4.3
2 years ago
0.2.5
2 years ago
0.1.6
2 years ago
0.4.2
2 years ago
0.3.3
2 years ago
0.2.4
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago