0.1.144 • Published 3 days ago

datafe-ui v0.1.144

Weekly downloads
-
License
MIT
Repository
-
Last release
3 days ago

简介

数安云智 - 公共 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 项目

更新日志

CHANGELOG

浏览器

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

维护者

@JieFei Duan

0.1.144

3 days ago

0.1.143

8 days ago

0.1.138

27 days ago

0.1.137

27 days ago

0.1.142

27 days ago

0.1.136

1 month ago

0.1.135

2 months ago

0.1.132

2 months ago

0.1.131

2 months ago

0.1.134

2 months ago

0.1.133

2 months ago

0.1.129

2 months ago

0.1.128

2 months ago

0.1.125

2 months ago

0.1.124

2 months ago

0.1.127

2 months ago

0.1.126

2 months ago

0.1.121

2 months ago

0.1.123

2 months ago

0.1.122

2 months ago

0.1.130

2 months ago

0.1.120

3 months ago

0.1.113

3 months ago

0.1.107

3 months ago

0.1.106

4 months ago

0.1.105

4 months ago

0.1.103

4 months ago

0.1.102

5 months ago

0.1.101

5 months ago

0.1.100

5 months ago

0.1.99

5 months ago

0.1.98

6 months ago

0.1.97

6 months ago

0.1.96

7 months ago

0.1.95

7 months ago

0.1.94

7 months ago

0.1.93

7 months ago

0.1.92

7 months ago

0.1.91

7 months ago

0.1.90

7 months ago

0.1.89

7 months ago

0.1.88

7 months ago

0.1.87

7 months ago

0.1.86

7 months ago

0.1.85

7 months ago

0.1.84

7 months ago

0.1.83

7 months ago

0.1.82

7 months ago

0.1.81

7 months ago

0.1.80

7 months ago

0.1.79

7 months ago

0.1.78

7 months ago

0.1.77

7 months ago

0.1.76

7 months ago

0.1.75

7 months ago

0.1.74

7 months ago

0.1.73

7 months ago

0.1.72

7 months ago

0.1.71

7 months ago

0.1.70

8 months ago

0.1.69

8 months ago

0.1.68

8 months ago

0.1.67

8 months ago

0.1.66

8 months ago

0.1.65

8 months ago

0.1.64

8 months ago

0.1.63

9 months ago

0.1.62

9 months ago

0.1.61

9 months ago

0.1.60

9 months ago

0.1.59

9 months ago

0.1.58

9 months ago

0.1.57

9 months ago

0.1.56

9 months ago

0.1.55

9 months ago

0.1.54

9 months ago

0.1.53

9 months ago

0.1.52

9 months ago

0.1.51

9 months ago

0.1.50

9 months ago

0.1.49

9 months ago

0.1.48

9 months ago

0.1.47

9 months ago

0.1.46

9 months ago

0.1.45

9 months ago

0.1.44

9 months ago

0.1.43

9 months ago

0.1.42

9 months ago

0.1.41

9 months ago

0.1.40

9 months ago

0.1.39

9 months ago

0.1.38

9 months ago

0.1.37

9 months ago

0.1.36

9 months ago

0.1.35

9 months ago

0.1.34

9 months ago

0.1.33

9 months ago

0.1.32

9 months ago

0.1.31

9 months ago

0.1.30

9 months ago

0.1.29

9 months ago

0.1.28

9 months ago

0.1.27

9 months ago

0.1.26

9 months ago

0.1.25

9 months ago

0.1.20

9 months ago

0.1.19

9 months ago

0.1.18

9 months ago

0.1.17

9 months ago

0.1.16

9 months ago

0.1.15

9 months ago

0.1.14

9 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.11

9 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago