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

datafe-ui

v0.2.34

Published

数安云智 - 公共UI组件库(基于 Vue3 + TS + Naive UI)

Downloads

361

Readme

简介

数安云智 - 公共 UI 组件库 基于 Vue3ViteNaive UITypeScript 等最新的前端技术栈开发。

特性

  • Datafe UI 全量使用 TypeScript 编写,和你的 TypeScript 项目无缝衔接
  • 顺便一提,它们支持按需引入,全都可以 treeshaking

文档

文档地址 - 语雀

准备

  • nodegit -项目开发环境
  • Vue3 - 熟悉 Vue 基础语法
  • Vite - 熟悉 vite 特性
  • Naive-ui - UI 库 基本使用
  • TypeScript - 熟悉TypeScript基本语法
  • pnpm pnpm - 速度快、节省磁盘空间的软件包管理器
  • Es6+ - 熟悉 es6 基本语法

安装使用

  • 获取项目代码
git clone http://192.168.11.201:1080/mess/datafe/common-ui.git
  • 安装依赖
cd common-ui

pnpm install #(如果电脑没有安装 pnpm 的,可以执行 npm install -g pnpm@next-7,node版本推荐16.x以上)
  • 运行
pnpm run dev
  • 打包
pnpm run build
  • 发布 npm 包
pnpm run patch # 补丁版本发布
pnpm run minor # 次版本发布
pnpm run major # 主版本发布
  • 下载 npm 包
pnpm install datafe-ui

在 SFC 中使用

直接引入(推荐)

你可以直接导入组件并使用它。这种情况下,只有导入的组件才会被打包。

<template>
  <s-button>按钮</s-button>
</template>

<script>
  import { defineComponent } from 'vue'
  import { SButton } from 'datafe-ui'

  export default defineComponent({
    components: {
      SButton
    }
  })
</script>

如果你可以使用 setup script,你可以用下面的方式使用组件。

<template>
  <s-button>按钮</s-button>
</template>

<script setup>
  import { SButton } from 'datafe-ui'
</script>

全局安装(不推荐)

安装全部组件

失去 tree-shaking 的能力,打包有冗余代码。

import { createApp } from 'vue';
import datafe from 'datafe-ui';

const app = createApp(App);
app.use(datafe);

安装后,你可以这样在 SFC 中使用全部组件。

<template>
  <s-button>按钮</s-button>
</template>

按需全局安装(推荐)

import { createApp } from 'vue';
import * as DatafeUI from 'datafe-ui';

const datafe = DatafeUI.create({
  components: [DatafeUI.NButton],
});

const app = createApp();
app.use(datafe);

注意事项

  • 必须使用 npm 官方源进行发布,推荐使用 nrm 源管理器
  • 该组件库仅适用于 Vue3 Vite Naive UI 项目

更新日志

CHANGELOG

浏览器

本地开发推荐使用 Chrome 80+ 浏览器

维护者

JieFei Duan Email: [email protected]