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

ft-func-set

v1.0.22-beta

Published

简单的项目定制函数整合, 如scaleBox等

Downloads

1

Readme

引用方式

<template>
  <div class="resizeContainer">
    
  </div>
</template>
<script setup>
  import { onMounted, nextTick, onBeforeUnmount } from 'vue';
  import { scaleBox } from 'ft-func-set';

  // 自适应分辨率
  const initScale = () => {
    const scale = new scaleBox({
      width: 1920,
      height: 1080,
      element: document.querySelector('.resizeContainer'),
      status: 'default'
    })
    scale.setScale()
  }

  onMounted(() => {
    nextTick(() => {
      initScale()
    })
    window.addEventListener('resize', initScale);
  })
  onBeforeUnmount(() => {
    window.removeEventListener('resize', initScale);
  });
</script>

Options: scaleBox 窗口按比例缩放

| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | height | 窗口高度 |Number| -- | | width | 窗口宽度 |Number | -- | | element | dom元素 | Object | -- | | status | 默认根据比例缩放default,或者根据宽度/高度进行缩放width、height | String | default |

Options: autoHover

| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | chart | ECharts实例 |Object| -- | | option | charts的配置信息 |Object | -- | | newNum | -- |Number | 14 | | newTime | -- |Number | 3000 | | scrollType | -- |String | tooltip |

Options: uuid 随机id

| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | len | 长度 |Number| -- | | radia | 基数 |Number | -- |

Options: waterMark 文本水印

| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | opt | 配置 |Object| { text: 'waterMark', degree: 30,... } | | -- | opt配置如下所示 |Object| -- | | text | 水印文本 |String| watermark | | degree | 水印文本旋转角度 |Number| -20 | | width | 单个水印容器宽度 |Number| 400 | | height | 单个水印容器高度 |Number| 200 | | fontSize | 水印字体 |String| 30px | | fontStyle | 水印字体 |String| 黑体 | | textAlign | 水印文本样式 |String| center | | color | 水印文本颜色 |String| rgba(100,100,100,0.15) | | id | 元素id,不传默认是body |String| -- |

Options: Websocketconfig 连接通信

| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | data | 配置 |Object| { src: '',... } | | -- | opt配置如下所示 |Object| -- | | src | 连接服务地址 |String| -- |