0.1.4 • Published 10 months ago
vue-fun-rain v0.1.4
vue-fun-rain
Install & Use
pnpm i vue-fun-rain
# or
npm install vue-fun-rain
# or
yarn add vue-fun-rain
Import and register component
Global
import { createApp } from 'vue'
import App from './App.vue'
import VueFunRain from 'vue-fun-rain'
import 'vue-fun-rain/css'
const app = createApp(App)
app.use(VueFunRain)
<ts-view :textCon="这是代码雨" :width="100" :height="100" />
Attention
注:如果在Ts下提示:无法找到模块“vue-fun-rain”的声明文件, 隐式拥有 "any" 类型, 添加一个包含 declare module 'vue-fun-rain';
的新声明(.d.ts) 。直接在项目project的根目录,新建一个 .d.ts 文件, declare module 'vue-fun-rain'对模块进行声明,如果存在env.d.ts文件,可以定义在里面,没有可以新建一个此文件。
Components
Component name | Descriptions |
---|---|
TsView | 代码雨 |
Parameter
Parameter name | Type | Default value | other |
---|---|---|---|
width | number | 100 | 宽度 |
height | number | 100 | 高度 |
textCon | string | 这是canva下代码雨插件哦 | 标题内容 |
textSize | number | 18 | 标题字体大小 |
canvasTxtCon | string | dudusaxxdhaizi010101 | 代码雨的内容 |
speeds | number | 10000 | 下雨的速度 |
backgroundColor | string | rgba(0,0,0,.05) | 背景颜色 |
rainColor | string | #0f0 | 雨的颜色 |