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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sike-vue3-ui-components

v1.3.7

Published

Vue3 UI组件库 - 基于Element Plus的企业级组件库

Readme

sike-vue3-ui-components

基于 Vue 3 + Element Plus 的组件库,内置完整的素材管理模块。

📦 安装

pnpm add sike-vue3-ui-components

🚀 快速开始

1. 引入样式

在项目入口文件(如 src/main.ts)中引入组件库样式:

// main.ts
import { createApp } from 'vue'
import App from './App.vue'

// 引入组件库样式
import 'sike-vue3-ui-components/dist/style.css'

const app = createApp(App)
app.mount('#app')

2. 配置 API 适配器

创建 API 适配器来连接你的后端接口:

import { createMaterialAPI } from 'sike-vue3-ui-components'

const materialAPI = createMaterialAPI({
  // 获取素材列表
  list: (params) => http.get('/api/material/list', { params }),

  // 获取分组列表
  groups: () => http.get('/api/material/groups'),

  // 创建分组
  createGroup: (data) => http.post('/api/material/group', data),

  // 更新分组
  updateGroup: (data) => http.put('/api/material/group', data),

  // 删除分组
  deleteGroup: (id) => http.delete(`/api/material/group/${id}`),

  // 上传素材
  upload: (formData) => http.post('/api/material/upload', formData),

  // 删除素材
  remove: (id) => http.delete(`/api/material/${id}`)
})

3. 使用组件

在页面中使用素材管理组件:

<template>
  <div class="material-page">
    <!-- 完整的素材管理界面 -->
    <MaterialLibrary
      :material-a-p-i="materialAPI"
      :t="$t"
      :use-type="1"
    />
  </div>
  
</template>

<script setup lang="ts">
import { MaterialLibrary, createMaterialAPI } from 'sike-vue3-ui-components'
import { useI18n } from 'vue-i18n'

const { t } = useI18n()

// 配置 API(如上所示)
const materialAPI = createMaterialAPI({
  // ... API 配置
})
</script>

📋 组件说明

MaterialLibrary

完整的素材管理界面,包含分组管理、素材列表、上传、预览等功能。

Props:

  • material-a-p-i - API 适配器对象(必需)
  • t - 国际化函数,传入项目的 $tt 函数
  • use-type - 使用类型,数字类型

MaterialGroup

素材分组管理组件,支持创建、编辑、删除分组。

MaterialTable

素材列表展示组件,支持分页、搜索、预览、删除等操作。

🌍 国际化支持

组件库内置中文文案,同时支持项目级国际化:

<template>
  <!-- 传入项目的国际化函数 -->
  <MaterialLibrary :material-a-p-i="materialAPI" :t="$t" />
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
</script>

🖼️ 图片预览

  • 支持图片全屏预览
  • 预览层使用 teleport 挂载到 body,不影响页面布局
  • 支持鼠标滚轮缩放、拖拽移动

📋 依赖要求

  • Vue 3.x
  • Element Plus
  • Vue I18n(可选,用于国际化)

🔧 开发

# 克隆项目
git clone <repository-url>

# 安装依赖
pnpm install

# 启动开发服务器
pnpm dev

# 构建
pnpm build

# 发布
pnpm publish

📄 License

MIT