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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jun1999/components

v0.0.21

Published

这个包提供了 Vue3 版本的 自己封装的组件。

Downloads

13

Readme

Vue3 自定义封装组件包

这个包提供了 Vue3 版本的 自己封装的组件。

依赖说明

本组件包依赖于 Element Plus UI 库,请确保在使用前已安装。

安装说明

  1. 安装本组件包
npm install @jun1999/components
  1. 安装 Element Plus
npm install element-plus

使用说明

  1. 在你的 Vue3 项目中导入并注册 Element Plus
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

const app = createApp(App)
app.use(ElementPlus)
app.mount('#app')
  1. 导入并使用本组件包的组件
import { YourComponent } from '@jun1999/components'
import '@jun1999/components/dist/style.css';

组件列表

  • FilePreview:文件预览组件
  • FormGrid:表单网格组件

示例

<template>
  <FilePreview ref="FilePreviewRef"></FilePreview>
  <div>
    FormGrid
    <FormGrid ref="FormGridRef" v-model="formData" :formfield="formfield"></FormGrid>
  </div>
  <button @click="showBtn">查看文件</button>
</template>


<script setup lang="ts">
// 本地开发
// import FilePreview from "../packages/FilePreview/index";
// import FormGrid from "../packages/FormGrid/index";

// 打包之后测试
// import { FilePreview, FormGrid } from "../dist/components.es.js";

// 测试发布的包
import { FilePreview, FormGrid } from "@jun1999/components";

import { ref } from "vue";
const FilePreviewRef = ref(null);
const showBtn = () => {
  if (FilePreviewRef.value && typeof (FilePreviewRef.value as any).show === 'function') {
    (FilePreviewRef.value as any).show(fileType.value['xlsx'])
  }
}

const formData = ref({
  name: ''
})
const formfield = ref([
  {
    key: 'name',
    type: 'input',
    label: '姓名'
  }
])

const fileType = ref({
  img: 'https://jljy2021.oss-cn-hangzhou.aliyuncs.com/wxb3999eccac7b923b2024/05/11/b0b07202405111553135596.jpg',
  xlsx: 'https://handingweixiu.oss-cn-shanghai.aliyuncs.com/ruoyi/28a4216a-401f-43b1-aa9d-7ab7029cac6e.xlsx'
});
</script>


<style scoped></style>