@chewel611/naive-ui-plus 0.0.48 → 0.0.50

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.
@@ -3,6 +3,7 @@ export type DataTableColumnActionDefine = {
3
3
  name: string;
4
4
  key: string;
5
5
  icon?: Component;
6
+ permission?: string;
6
7
  action: (row: any) => void;
7
8
  };
8
9
  export type DataTableColumnDefine = {
@@ -17,6 +18,9 @@ export type DataTableColumnDefine = {
17
18
  export type DataTableProps = {
18
19
  title?: string;
19
20
  idField?: string;
21
+ addPermission?: string;
22
+ editPermission?: string;
23
+ deletePermission?: string;
20
24
  columns: DataTableColumnDefine[];
21
25
  onLoad: (page: number, pageSize: number) => Promise<{
22
26
  items: any[];
@@ -25,6 +29,7 @@ export type DataTableProps = {
25
29
  onDelete?: (rows: any[]) => Promise<boolean>;
26
30
  onAdd?: () => Promise<void>;
27
31
  onEdit?: (row: any) => Promise<void>;
32
+ onCheckPermission?: (value?: string) => Promise<boolean>;
28
33
  };
29
34
  export type DataTableMethods = {
30
35
  refreshData: () => Promise<void>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=t=>!t||!t.getBoundingClientRect?0:t.getBoundingClientRect(),C=t=>{const e=document.documentElement,f=e.scrollLeft,r=e.scrollTop,g=e.clientLeft,u=e.clientTop,c=window.pageXOffset,i=window.pageYOffset,p=d(t),{left:h,top:w,width:m,height:T}=p,L=(c||f)-(g||0),O=(i||r)-(u||0),a=h+c,B=w+i,o=a-L,n=B-O,s=window.document.documentElement.clientWidth,l=window.document.documentElement.clientHeight;return{left:o,top:n,right:s-m-o,bottom:l-T-n,rightIncludeBody:s-o,bottomIncludeBody:l-n}};exports.getBoundingClientRect=d;exports.getViewportOffset=C;
@@ -1 +1,10 @@
1
1
  export declare const resetObject: (obj: Record<string, any>) => void;
2
+ export declare const getBoundingClientRect: (element: Element) => DOMRect | number;
3
+ export declare const getViewportOffset: (element: Element) => {
4
+ left: number;
5
+ top: number;
6
+ right: number;
7
+ bottom: number;
8
+ rightIncludeBody: number;
9
+ bottomIncludeBody: number;
10
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=t=>{const n=t;return n.install=function(e){e.component(n.__name,t)},t};exports.withInstall=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(n,t)=>{const e=t;return e.install=function(l){l.component(n,t)},t};exports.withInstall=i;
@@ -1,2 +1,2 @@
1
1
  import { Plugin, Component } from 'vue';
2
- export declare const withInstall: <T extends Component>(comp: T) => T & Plugin;
2
+ export declare const withInstall: <T extends Component>(name: string, comp: T) => T & Plugin;
package/package.json CHANGED
@@ -1,102 +1,103 @@
1
- {
2
- "name": "@chewel611/naive-ui-plus",
3
- "private": false,
4
- "version": "0.0.48",
5
- "license": "MIT",
6
- "type": "module",
7
- "sideEffects": false,
8
- "main": "lib/index.cjs",
9
- "module": "es/index.js",
10
- "types": "es/index.d.ts",
11
- "exports": {
12
- ".": {
13
- "types": "./es/index.d.ts",
14
- "import": "./es/index.js",
15
- "require": "./lib/index.cjs"
16
- },
17
- "./css": "./dist/style.css",
18
- "./*": "./*"
19
- },
20
- "scripts": {
21
- "dev": "vite",
22
- "pub": "sh scripts/publish.sh",
23
- "build": "run-s format clean build:components",
24
- "format": "prettier --write src/ components/",
25
- "clean": "rimraf dist es lib",
26
- "build:components": "run-p type-check build:dist build-only",
27
- "type-check": "vue-tsc --skipLibCheck --noEmit",
28
- "build:dist": "vite build -- dir=dist",
29
- "build-only": "vite build",
30
- "preview": "vite preview",
31
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
32
- },
33
- "peerDependency": {
34
- "@tailwindcss/vite": "^4.1.11",
35
- "@vicons/antd": "^0.13.0",
36
- "pinia": "^3.0.4",
37
- "less": "^4.5.1",
38
- "less-loader": "^12.3.0",
39
- "vue-router": "^5.0.2"
40
- },
41
- "dependencies": {
42
- "@vicons/antd": "^0.13.0",
43
- "element-resize-detector": "^1.2.4",
44
- "pinia": "^3.0.4",
45
- "vuedraggable": "^4.1.0"
46
- },
47
- "devDependencies": {
48
- "@tailwindcss/vite": "^4.1.18",
49
- "@types/element-resize-detector": "^1.1.6",
50
- "@types/minimist": "^1.2.5",
51
- "@types/node": "^24.12.0",
52
- "@vicons/antd": "^0.13.0",
53
- "@vicons/carbon": "^0.13.0",
54
- "@vicons/ionicons5": "^0.12.0",
55
- "@vitejs/plugin-vue": "^6.0.4",
56
- "@vue/tsconfig": "^0.8.1",
57
- "alova": "^3.5.1",
58
- "less": "^4.4.0",
59
- "less-loader": "^12.3.0",
60
- "minimist": "^1.2.8",
61
- "naive-ui": "^2.43.2",
62
- "npm-run-all2": "^8.0.4",
63
- "oidc-client-ts": "^2.4.0",
64
- "prettier": "^3.8.1",
65
- "rimraf": "^6.1.2",
66
- "rollup": "^4.57.1",
67
- "tailwindcss": "^4.1.18",
68
- "typescript": "^5.9.3",
69
- "unplugin-vue-components": "^31.0.0",
70
- "vite": "^7.3.1",
71
- "vite-plugin-dts": "^4.5.4",
72
- "vite-plugin-vue-devtools": "^8.0.6",
73
- "vue": "^3.5.27",
74
- "vue-router": "^5.0.2",
75
- "vue-tsc": "^3.2.4"
76
- },
77
- "homepage": "https://gitee.com/chewel/naive-ui-plus",
78
- "repository": {
79
- "type": "git",
80
- "url": "https://gitee.com/chewel/naive-ui-plus.git"
81
- },
82
- "files": [
83
- "dist",
84
- "es",
85
- "lib",
86
- "package.json",
87
- "README.md",
88
- "README.zh-CN.md"
89
- ],
90
- "keywords": [
91
- "naive-ui",
92
- "naive-ui-plus",
93
- "component library",
94
- "ui framework",
95
- "ui",
96
- "vue"
97
- ],
98
- "publishConfig": {
99
- "access": "public",
100
- "registry": "https://registry.npmjs.org/"
101
- }
102
- }
1
+ {
2
+ "name": "@chewel611/naive-ui-plus",
3
+ "private": false,
4
+ "version": "0.0.50",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "main": "lib/index.cjs",
9
+ "module": "es/index.js",
10
+ "types": "es/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./es/index.d.ts",
14
+ "import": "./es/index.js",
15
+ "require": "./lib/index.cjs"
16
+ },
17
+ "./css": "./dist/style.css",
18
+ "./*": "./*"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "pub": "sh scripts/publish.sh",
23
+ "build": "run-s format clean build:components",
24
+ "format": "prettier --write src/ components/",
25
+ "clean": "rimraf dist es lib",
26
+ "build:components": "run-p type-check build:dist build-only",
27
+ "type-check": "vue-tsc --skipLibCheck --noEmit",
28
+ "build:dist": "vite build -- dir=dist",
29
+ "build-only": "vite build",
30
+ "preview": "vite preview",
31
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
32
+ },
33
+ "peerDependency": {
34
+ "@tailwindcss/vite": "^4.1.11",
35
+ "@vicons/antd": "^0.13.0",
36
+ "pinia": "^3.0.4",
37
+ "less": "^4.5.1",
38
+ "less-loader": "^12.3.0",
39
+ "vue-router": "^5.0.2"
40
+ },
41
+ "dependencies": {
42
+ "@vicons/antd": "^0.13.0",
43
+ "element-resize-detector": "^1.2.4",
44
+ "pinia": "^3.0.4",
45
+ "vuedraggable": "^4.1.0"
46
+ },
47
+ "devDependencies": {
48
+ "@tailwindcss/vite": "^4.1.18",
49
+ "@types/element-resize-detector": "^1.1.6",
50
+ "@types/minimist": "^1.2.5",
51
+ "@types/node": "^24.12.0",
52
+ "@vicons/antd": "^0.13.0",
53
+ "@vicons/carbon": "^0.13.0",
54
+ "@vicons/ionicons5": "^0.12.0",
55
+ "@vitejs/plugin-vue": "^6.0.4",
56
+ "@vue/tsconfig": "^0.8.1",
57
+ "alova": "^3.5.1",
58
+ "i18n-jsautotranslate": "^4.0.0",
59
+ "less": "^4.4.0",
60
+ "less-loader": "^12.3.0",
61
+ "minimist": "^1.2.8",
62
+ "naive-ui": "^2.43.2",
63
+ "npm-run-all2": "^8.0.4",
64
+ "oidc-client-ts": "^2.4.0",
65
+ "prettier": "^3.8.1",
66
+ "rimraf": "^6.1.2",
67
+ "rollup": "^4.57.1",
68
+ "tailwindcss": "^4.1.18",
69
+ "typescript": "^5.9.3",
70
+ "unplugin-vue-components": "^31.0.0",
71
+ "vite": "^7.3.1",
72
+ "vite-plugin-dts": "^4.5.4",
73
+ "vite-plugin-vue-devtools": "^8.0.6",
74
+ "vue": "^3.5.27",
75
+ "vue-router": "^5.0.2",
76
+ "vue-tsc": "^3.2.4"
77
+ },
78
+ "homepage": "https://gitee.com/chewel/naive-ui-plus",
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "https://gitee.com/chewel/naive-ui-plus.git"
82
+ },
83
+ "files": [
84
+ "dist",
85
+ "es",
86
+ "lib",
87
+ "package.json",
88
+ "README.md",
89
+ "README.zh-CN.md"
90
+ ],
91
+ "keywords": [
92
+ "naive-ui",
93
+ "naive-ui-plus",
94
+ "component library",
95
+ "ui framework",
96
+ "ui",
97
+ "vue"
98
+ ],
99
+ "publishConfig": {
100
+ "access": "public",
101
+ "registry": "https://registry.npmjs.org/"
102
+ }
103
+ }