npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pinia-logo

v0.1.2

Published

你可以非常简单的将这个可爱的宠物放在页面右下角,建议开发时使用

Downloads

13

Readme

Pinia Dynamic Logo

effect.gif

灵感来自于piniajs/example-vue-3-vite

Description

你可以非常简单的将这个可爱的宠物放在页面右下角,建议开发时使用

Usage

用法很简单,你只需要引入组件后,使用Vue.use即可

import PiniaLogo from 'pinia-logo'

const app = createApp(App)

// 第二个参数为注入,第三个参数为注入的组件props
app.use(PiniaLogo, true, {
  ...props
})

app.mount('#app')

默认情况下,组件会自动注入到视图,不再需要写组件标签,你也可以传入参数禁止自动注入,此时组件将会全局安装,你可以自行使用组件

// main.ts
app.use(PiniaLogo,false)

// 你可以这样使用
// App.vue
<pinia-logo width="204" custom-class="custom-logo"></pinia-logo>

同样,你也可以单独引入组件

import { PiniaLogo } from 'pinia-logo'
app.component('pinia-logo', PiniaLogo)

组件Props类型

type PiniaPropType = {
    /**
     * SVG宽
     */
  width: number | string

  /**
   * SVG高
   */
  height: number | string

  /**
   * 
   * 动画是否自动触发,如果是,每隔8s将会自动触发一次
   * @default true
   */
  auto: boolean

  /**
   * 手动触发动画的方式
   * @member LeftClick 左键点击时发生
   * @member Hover 鼠标移入时发生
   * @member None 任何情况下都不发生
   * @default 'none'
   */
  play: 'LeftClick' | 'Hover' | 'None'

  /**
   * 是否鼠标穿透,但是会导致鼠标事件无法发生
   * @default false
   */
  penetrate: boolean

  /**
   * 新增自定义类名
   */
  customClass: string

  /**
   * 是否自动定位到页面右下角,当组件自动注入到页面时,将会默认为true
   */
  autoFixed:boolean
}

Refence

https://stackblitz.com/github/piniajs/example-vue-3-vite