vsoft-ui 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,63 +1,67 @@
1
1
  {
2
2
  "name": "vsoft-ui",
3
- "version": "1.0.1",
4
- "description": "A Vue 3 component library based on Element Plus",
3
+ "version": "1.0.2",
4
+ "description": "基于Element Plus的二次封装组件库,支持全局按钮级权限控制",
5
5
  "type": "module",
6
- "main": "./dist/vsoft-ui.umd.js",
7
- "module": "./dist/vsoft-ui.es.js",
8
- "types": "./dist/index.d.ts",
6
+ "main": "dist/vsoft-ui.umd.js",
7
+ "module": "dist/vsoft-ui.es.js",
8
+ "types": "dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./dist/vsoft-ui.es.js",
12
- "require": "./dist/vsoft-ui.umd.js",
13
- "types": "./dist/index.d.ts"
13
+ "require": "./dist/vsoft-ui.umd.js"
14
14
  },
15
- "./style.css": "./dist/style.css"
15
+ "./dist/*": "./dist/*",
16
+ "./package.json": "./package.json"
16
17
  },
17
18
  "files": [
18
19
  "dist",
19
- "README.md"
20
+ "README.md",
21
+ "LICENSE"
20
22
  ],
21
23
  "scripts": {
22
- "dev": "vite",
23
- "build": "vite build --mode lib",
24
- "build:docs": "vitepress build docs",
24
+ "dev": "vite --config examples/vite.config.ts",
25
+ "build": "vite build",
25
26
  "dev:docs": "vitepress dev docs",
27
+ "build:docs": "vitepress build docs",
26
28
  "preview:docs": "vitepress preview docs",
27
- "type-check": "vue-tsc --noEmit",
28
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
29
- "prepublishOnly": "pnpm run build",
30
- "pack:test": "pnpm pack && tar -tzf vsoft-ui-*.tgz && Remove-Item vsoft-ui-*.tgz"
29
+ "lint": "eslint --ext .ts,.vue packages",
30
+ "lint:fix": "eslint --ext .ts,.vue packages --fix",
31
+ "prepublishOnly": "pnpm build"
31
32
  },
32
33
  "keywords": [
33
- "vue3",
34
- "component-library",
34
+ "vue",
35
35
  "element-plus",
36
+ "component",
37
+ "permission",
36
38
  "ui",
37
- "components"
39
+ "vsoft-ui"
38
40
  ],
39
41
  "author": "",
40
42
  "license": "MIT",
41
- "publishConfig": {
42
- "access": "public",
43
- "registry": "https://registry.npmjs.org/"
43
+ "packageManager": "pnpm@10.20.0",
44
+ "peerDependencies": {
45
+ "vue": "^3.3.0",
46
+ "element-plus": "^2.13.0"
44
47
  },
45
48
  "dependencies": {
46
- "element-plus": "^2.4.4",
47
- "vue": "^3.3.4"
49
+ "vue-router": "^4.6.4"
48
50
  },
49
51
  "devDependencies": {
50
- "@vitejs/plugin-vue": "^4.5.0",
51
- "@vue/tsconfig": "^0.4.0",
52
- "typescript": "^5.2.2",
53
- "vite": "^5.0.0",
54
- "vite-plugin-dts": "^3.6.4",
55
- "vue-tsc": "^2.0.0",
56
- "vitepress": "^1.0.0-rc.31",
57
- "sass": "^1.69.5"
52
+ "@vitejs/plugin-vue": "^5.2.0",
53
+ "@vue/eslint-config-typescript": "^13.0.0",
54
+ "eslint": "^8.57.1",
55
+ "eslint-plugin-vue": "^9.27.1",
56
+ "typescript": "^5.7.0",
57
+ "vite": "^6.4.0",
58
+ "vite-plugin-dts": "^4.5.4",
59
+ "vitepress": "^1.6.4",
60
+ "vue": "^3.5.0"
58
61
  },
59
- "peerDependencies": {
60
- "vue": "^3.3.4"
61
- }
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "git+https://github.com/your-username/vsoft-ui.git"
65
+ },
66
+ "homepage": "https://your-username.github.io/vsoft-ui/"
62
67
  }
63
-
package/README.md DELETED
@@ -1,126 +0,0 @@
1
- # VS UI
2
-
3
- 一个基于 Element Plus 的 Vue 3 组件库。
4
-
5
- ## 特性
6
-
7
- - 🎨 基于 Element Plus,API 保持一致
8
- - ⚡️ Vue 3 Composition API
9
- - 📦 TypeScript 支持
10
- - 🎯 按需引入
11
- - 📱 响应式设计
12
- - 🔐 **全局权限管理系统** - 所有组件支持权限控制
13
-
14
- ## 安装
15
-
16
- ```bash
17
- # 使用 pnpm(推荐)
18
- pnpm add vsoft-ui
19
-
20
- # 使用 npm
21
- npm install vsoft-ui
22
-
23
- # 使用 yarn
24
- yarn add vsoft-ui
25
- ```
26
-
27
- ## 快速开始
28
-
29
- ### 安装
30
-
31
- ```bash
32
- # 使用 pnpm(推荐)
33
- pnpm add vsoft-ui
34
-
35
- # 使用 npm
36
- npm install vsoft-ui
37
-
38
- # 使用 yarn
39
- yarn add vsoft-ui
40
- ```
41
-
42
- ### 完整引入
43
-
44
- ```javascript
45
- import { createApp } from 'vue'
46
- import App from './App.vue'
47
- import VsUI from 'vsoft-ui'
48
- import 'vsoft-ui/style.css'
49
-
50
- const app = createApp(App)
51
-
52
- // 初始化权限(可选)
53
- app.use(VsUI, {
54
- permissions: ['user:view', 'user:edit', 'user:delete']
55
- })
56
-
57
- app.mount('#app')
58
- ```
59
-
60
- ### 按需引入
61
-
62
- ```vue
63
- <template>
64
- <vs-button type="primary">按钮</vs-button>
65
- </template>
66
-
67
- <script setup>
68
- import { VsButton } from 'vsoft-ui'
69
- </script>
70
- ```
71
-
72
- > 📖 更多使用示例请查看 [USAGE.md](./USAGE.md)
73
-
74
- ## 开发
75
-
76
- ```bash
77
- # 安装依赖
78
- pnpm install
79
-
80
- # 启动开发服务器
81
- pnpm dev
82
-
83
- # 构建组件库
84
- pnpm build
85
-
86
- # 启动文档开发服务器
87
- pnpm dev:docs
88
-
89
- # 构建文档
90
- pnpm build:docs
91
- ```
92
-
93
- ## 项目结构
94
-
95
- ```
96
- vs-ui/
97
- ├── src/ # 组件库源码
98
- │ ├── components/ # 组件目录
99
- │ ├── install.ts # 安装函数
100
- │ └── index.ts # 入口文件
101
- ├── docs/ # VitePress 文档
102
- │ ├── .vitepress/ # VitePress 配置
103
- │ ├── guide/ # 指南文档
104
- │ └── components/ # 组件文档
105
- ├── dist/ # 构建输出目录
106
- ├── vite.config.ts # Vite 配置
107
- ├── tsconfig.json # TypeScript 配置
108
- └── package.json # 项目配置
109
- ```
110
-
111
- ## 组件列表
112
-
113
- - Button 按钮
114
- - Card 卡片
115
- - Table 表格(支持后端控制列显示/隐藏、排序和权限控制)
116
-
117
- 更多组件正在开发中...
118
-
119
- ## 浏览器支持
120
-
121
- 现代浏览器和 IE11+(需要 polyfills)
122
-
123
- ## 许可证
124
-
125
- MIT
126
-
@@ -1,56 +0,0 @@
1
- export interface ButtonProps {
2
- type?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
3
- size?: 'large' | 'default' | 'small';
4
- disabled?: boolean;
5
- loading?: boolean;
6
- /** 权限标识 */
7
- permission?: string | string[];
8
- }
9
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
10
- type: string;
11
- size: string;
12
- disabled: boolean;
13
- loading: boolean;
14
- permission: undefined;
15
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
- click: (event: MouseEvent) => void;
17
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
18
- type: string;
19
- size: string;
20
- disabled: boolean;
21
- loading: boolean;
22
- permission: undefined;
23
- }>>> & Readonly<{
24
- onClick?: ((event: MouseEvent) => any) | undefined;
25
- }>, {
26
- permission: string | string[];
27
- size: "large" | "default" | "small";
28
- type: "default" | "primary" | "success" | "warning" | "danger" | "info" | "text";
29
- disabled: boolean;
30
- loading: boolean;
31
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
32
- default?(_: {}): any;
33
- }>;
34
- export default _default;
35
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
- type __VLS_TypePropsToRuntimeProps<T> = {
37
- [K in keyof T]-?: {} extends Pick<T, K> ? {
38
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
- } : {
40
- type: import('vue').PropType<T[K]>;
41
- required: true;
42
- };
43
- };
44
- type __VLS_WithDefaults<P, D> = {
45
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
- default: D[K];
47
- }> : P[K];
48
- };
49
- type __VLS_Prettify<T> = {
50
- [K in keyof T]: T[K];
51
- } & {};
52
- type __VLS_WithTemplateSlots<T, S> = T & {
53
- new (): {
54
- $slots: S;
55
- };
56
- };
@@ -1,45 +0,0 @@
1
- import { CSSProperties } from 'vue';
2
-
3
- export interface CardProps {
4
- header?: string;
5
- shadow?: 'always' | 'hover' | 'never';
6
- bodyStyle?: CSSProperties;
7
- /** 权限标识 */
8
- permission?: string | string[];
9
- }
10
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CardProps>, {
11
- shadow: string;
12
- permission: undefined;
13
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CardProps>, {
14
- shadow: string;
15
- permission: undefined;
16
- }>>> & Readonly<{}>, {
17
- permission: string | string[];
18
- shadow: "always" | "hover" | "never";
19
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
20
- header?(_: {}): any;
21
- default?(_: {}): any;
22
- }>;
23
- export default _default;
24
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
- type __VLS_TypePropsToRuntimeProps<T> = {
26
- [K in keyof T]-?: {} extends Pick<T, K> ? {
27
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
- } : {
29
- type: import('vue').PropType<T[K]>;
30
- required: true;
31
- };
32
- };
33
- type __VLS_WithDefaults<P, D> = {
34
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
35
- default: D[K];
36
- }> : P[K];
37
- };
38
- type __VLS_Prettify<T> = {
39
- [K in keyof T]: T[K];
40
- } & {};
41
- type __VLS_WithTemplateSlots<T, S> = T & {
42
- new (): {
43
- $slots: S;
44
- };
45
- };