next-element-vue 0.2.6 → 0.2.9

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.
@@ -59,11 +59,11 @@ declare const _default: import("vue").DefineComponent<{
59
59
  }>> & {
60
60
  [x: `on${Capitalize<any>}`]: (...args: any[]) => any;
61
61
  }, {
62
- data: unknown[];
63
- style: import("vue").CSSProperties;
64
62
  className: string;
63
+ style: import("vue").CSSProperties;
65
64
  options: Record<string, any>;
66
65
  loading: boolean;
66
+ data: unknown[];
67
67
  page: Record<string, any>;
68
68
  }, {}>;
69
69
  export default _default;
@@ -0,0 +1,118 @@
1
+ import './src/index.scss';
2
+ export declare const NextLabelimg: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
3
+ className: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ style: {
8
+ type: import("vue").PropType<import("vue").CSSProperties>;
9
+ default: () => {
10
+ position: string;
11
+ };
12
+ };
13
+ rowKey: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ options: {
18
+ type: ObjectConstructor;
19
+ default: () => {};
20
+ };
21
+ classes: {
22
+ type: ArrayConstructor;
23
+ default: () => any[];
24
+ };
25
+ data: {
26
+ type: import("vue").PropType<import("./src/hooks/canvas-context-hook").RectProps[]>;
27
+ default: () => any[];
28
+ };
29
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "save" | "prev-click" | "next-click")[], "change" | "save" | "prev-click" | "next-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ className: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ style: {
35
+ type: import("vue").PropType<import("vue").CSSProperties>;
36
+ default: () => {
37
+ position: string;
38
+ };
39
+ };
40
+ rowKey: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ options: {
45
+ type: ObjectConstructor;
46
+ default: () => {};
47
+ };
48
+ classes: {
49
+ type: ArrayConstructor;
50
+ default: () => any[];
51
+ };
52
+ data: {
53
+ type: import("vue").PropType<import("./src/hooks/canvas-context-hook").RectProps[]>;
54
+ default: () => any[];
55
+ };
56
+ }>> & {
57
+ onChange?: (...args: any[]) => any;
58
+ onSave?: (...args: any[]) => any;
59
+ "onPrev-click"?: (...args: any[]) => any;
60
+ "onNext-click"?: (...args: any[]) => any;
61
+ }, {
62
+ className: string;
63
+ style: import("vue").CSSProperties;
64
+ rowKey: string;
65
+ options: Record<string, any>;
66
+ classes: unknown[];
67
+ data: import("./src/hooks/canvas-context-hook").RectProps[];
68
+ }, {}>> & Record<string, any>;
69
+ export declare const NextLabelimgPreview: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
70
+ className: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ style: {
75
+ type: import("vue").PropType<import("vue").CSSProperties>;
76
+ default: () => {};
77
+ };
78
+ src: {
79
+ type: StringConstructor;
80
+ default: string;
81
+ };
82
+ classes: {
83
+ type: ArrayConstructor;
84
+ default: () => any[];
85
+ };
86
+ labels: {
87
+ type: ArrayConstructor;
88
+ default: () => any[];
89
+ };
90
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
91
+ className: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ style: {
96
+ type: import("vue").PropType<import("vue").CSSProperties>;
97
+ default: () => {};
98
+ };
99
+ src: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ classes: {
104
+ type: ArrayConstructor;
105
+ default: () => any[];
106
+ };
107
+ labels: {
108
+ type: ArrayConstructor;
109
+ default: () => any[];
110
+ };
111
+ }>>, {
112
+ className: string;
113
+ style: import("vue").CSSProperties;
114
+ classes: unknown[];
115
+ src: string;
116
+ labels: unknown[];
117
+ }, {}>> & Record<string, any>;
118
+ export default NextLabelimg;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ mainContentHeight: number;
3
+ };
4
+ export default _default;
@@ -0,0 +1,59 @@
1
+ export interface ResizeCorner {
2
+ topLeft: boolean;
3
+ topCenter: boolean;
4
+ topRight: boolean;
5
+ leftCenter: boolean;
6
+ rightCenter: boolean;
7
+ bottomLeft: boolean;
8
+ bottomCenter: boolean;
9
+ bottomRight: boolean;
10
+ }
11
+ export interface RectProps {
12
+ type?: number;
13
+ typeName?: string;
14
+ startX: number;
15
+ startY: number;
16
+ rectWidth: number;
17
+ rectHeight: number;
18
+ canvasWidth: number;
19
+ canvasHeight: number;
20
+ }
21
+ export interface CreateRectCanvasProps {
22
+ canvasWidth: number;
23
+ canvasHeight: number;
24
+ }
25
+ export interface DrawBaseCanvasProps extends CreateRectCanvasProps {
26
+ canvas?: HTMLCanvasElement;
27
+ ctx: CanvasRenderingContext2D;
28
+ image: HTMLImageElement;
29
+ labels: RectProps[];
30
+ scaleFactor?: number;
31
+ }
32
+ export declare const DrawRectCanvas: (canvas: HTMLCanvasElement, callback?: Function, keyW?: Function) => {
33
+ canvas: HTMLCanvasElement;
34
+ ctx: CanvasRenderingContext2D;
35
+ clearCanvas: () => void;
36
+ drawRect: (color?: string) => void;
37
+ };
38
+ export declare const colors: string[];
39
+ export declare const DrawBaseCanvas: (options: DrawBaseCanvasProps) => {
40
+ updateLabels: () => void;
41
+ addDrawRect: (rect: RectProps, color?: string) => void;
42
+ hitCanvasLabel: (x: number, y: number) => any;
43
+ };
44
+ /**
45
+ * 根据比例重新设置标注框位置和大小
46
+ * @param labels
47
+ * @returns
48
+ */
49
+ export declare const formatCanvasLabelScale: (labels: RectProps[], canvasHeight: number) => RectProps[];
50
+ export declare const convertToLabel: (rect: RectProps) => number[];
51
+ export declare const canvertToCanvas: (labelData: number[], canvasWidth: number, canvasHeight: number) => {
52
+ type: number;
53
+ startX: number;
54
+ startY: number;
55
+ rectWidth: number;
56
+ rectHeight: number;
57
+ canvasWidth: number;
58
+ canvasHeight: number;
59
+ };
@@ -0,0 +1,69 @@
1
+ import type { PropType, CSSProperties } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ className: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ style: {
8
+ type: PropType<CSSProperties>;
9
+ default: () => {
10
+ position: string;
11
+ };
12
+ };
13
+ rowKey: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ options: {
18
+ type: ObjectConstructor;
19
+ default: () => {};
20
+ };
21
+ classes: {
22
+ type: ArrayConstructor;
23
+ default: () => any[];
24
+ };
25
+ data: {
26
+ type: PropType<any[]>;
27
+ default: () => any[];
28
+ };
29
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "save" | "prev-click" | "next-click")[], "change" | "save" | "prev-click" | "next-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ className: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ style: {
35
+ type: PropType<CSSProperties>;
36
+ default: () => {
37
+ position: string;
38
+ };
39
+ };
40
+ rowKey: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ options: {
45
+ type: ObjectConstructor;
46
+ default: () => {};
47
+ };
48
+ classes: {
49
+ type: ArrayConstructor;
50
+ default: () => any[];
51
+ };
52
+ data: {
53
+ type: PropType<any[]>;
54
+ default: () => any[];
55
+ };
56
+ }>> & {
57
+ onChange?: (...args: any[]) => any;
58
+ onSave?: (...args: any[]) => any;
59
+ "onPrev-click"?: (...args: any[]) => any;
60
+ "onNext-click"?: (...args: any[]) => any;
61
+ }, {
62
+ className: string;
63
+ style: CSSProperties;
64
+ rowKey: string;
65
+ options: Record<string, any>;
66
+ classes: unknown[];
67
+ data: any[];
68
+ }, {}>;
69
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import type { PropType, CSSProperties } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ className: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ style: {
8
+ type: PropType<CSSProperties>;
9
+ default: () => {};
10
+ };
11
+ src: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ classes: {
16
+ type: ArrayConstructor;
17
+ default: () => any[];
18
+ };
19
+ labels: {
20
+ type: ArrayConstructor;
21
+ default: () => any[];
22
+ };
23
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ className: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ style: {
29
+ type: PropType<CSSProperties>;
30
+ default: () => {};
31
+ };
32
+ src: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ classes: {
37
+ type: ArrayConstructor;
38
+ default: () => any[];
39
+ };
40
+ labels: {
41
+ type: ArrayConstructor;
42
+ default: () => any[];
43
+ };
44
+ }>>, {
45
+ className: string;
46
+ style: CSSProperties;
47
+ src: string;
48
+ classes: unknown[];
49
+ labels: unknown[];
50
+ }, {}>;
51
+ export default _default;
@@ -0,0 +1,34 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ classes: {
3
+ type: ArrayConstructor;
4
+ default: () => any[];
5
+ };
6
+ contextClientHeight: {
7
+ type: NumberConstructor;
8
+ default: any;
9
+ };
10
+ rowInfo: {
11
+ type: ObjectConstructor;
12
+ default: () => {};
13
+ };
14
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ classes: {
16
+ type: ArrayConstructor;
17
+ default: () => any[];
18
+ };
19
+ contextClientHeight: {
20
+ type: NumberConstructor;
21
+ default: any;
22
+ };
23
+ rowInfo: {
24
+ type: ObjectConstructor;
25
+ default: () => {};
26
+ };
27
+ }>> & {
28
+ onChange?: (...args: any[]) => any;
29
+ }, {
30
+ classes: unknown[];
31
+ contextClientHeight: number;
32
+ rowInfo: Record<string, any>;
33
+ }, {}>;
34
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import type { PropType } from 'vue';
2
+ import type { RectProps } from '../hooks/canvas-context-hook';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ labelRect: {
5
+ type: ObjectConstructor;
6
+ default: () => {};
7
+ };
8
+ classes: {
9
+ type: ArrayConstructor;
10
+ default: () => any[];
11
+ };
12
+ activateRect: {
13
+ type: PropType<RectProps>;
14
+ default: any;
15
+ };
16
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "select" | "delete")[], "close" | "select" | "delete", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
+ labelRect: {
18
+ type: ObjectConstructor;
19
+ default: () => {};
20
+ };
21
+ classes: {
22
+ type: ArrayConstructor;
23
+ default: () => any[];
24
+ };
25
+ activateRect: {
26
+ type: PropType<RectProps>;
27
+ default: any;
28
+ };
29
+ }>> & {
30
+ onClose?: (...args: any[]) => any;
31
+ onSelect?: (...args: any[]) => any;
32
+ onDelete?: (...args: any[]) => any;
33
+ }, {
34
+ labelRect: Record<string, any>;
35
+ classes: unknown[];
36
+ activateRect: RectProps;
37
+ }, {}>;
38
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import type { PropType } from 'vue';
2
+ import type { RectProps } from '../hooks/canvas-context-hook';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ parentEl: {
5
+ type: PropType<HTMLElement>;
6
+ default: any;
7
+ };
8
+ rect: {
9
+ type: PropType<RectProps>;
10
+ default: () => {};
11
+ };
12
+ color: {
13
+ type: StringConstructor;
14
+ default: any;
15
+ };
16
+ }, {
17
+ onMousedown: (e: MouseEvent) => void;
18
+ onMouseup: (e: MouseEvent) => void;
19
+ onContextmenu: (e: MouseEvent) => void;
20
+ rect: import("vue").Ref<{
21
+ type?: number;
22
+ typeName?: string;
23
+ startX: number;
24
+ startY: number;
25
+ rectWidth: number;
26
+ rectHeight: number;
27
+ canvasWidth: number;
28
+ canvasHeight: number;
29
+ }>;
30
+ onMousedownDot: (e: MouseEvent, corner: string) => void;
31
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("draggle-resize" | "contextmenu")[], "draggle-resize" | "contextmenu", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ parentEl: {
33
+ type: PropType<HTMLElement>;
34
+ default: any;
35
+ };
36
+ rect: {
37
+ type: PropType<RectProps>;
38
+ default: () => {};
39
+ };
40
+ color: {
41
+ type: StringConstructor;
42
+ default: any;
43
+ };
44
+ }>> & {
45
+ "onDraggle-resize"?: (...args: any[]) => any;
46
+ onContextmenu?: (...args: any[]) => any;
47
+ }, {
48
+ parentEl: HTMLElement;
49
+ rect: RectProps;
50
+ color: string;
51
+ }, {}>;
52
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { PropType } from 'vue';
2
+ import type { RectProps } from '../hooks/canvas-context-hook';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ classes: {
5
+ type: ArrayConstructor;
6
+ default: () => any[];
7
+ };
8
+ labels: {
9
+ type: PropType<RectProps[]>;
10
+ default: () => any[];
11
+ };
12
+ }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "select")[], "delete" | "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ classes: {
14
+ type: ArrayConstructor;
15
+ default: () => any[];
16
+ };
17
+ labels: {
18
+ type: PropType<RectProps[]>;
19
+ default: () => any[];
20
+ };
21
+ }>> & {
22
+ onDelete?: (...args: any[]) => any;
23
+ onSelect?: (...args: any[]) => any;
24
+ }, {
25
+ classes: unknown[];
26
+ labels: RectProps[];
27
+ }, {}>;
28
+ export default _default;
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  };
19
19
  }, {
20
20
  t: import("packages/hooks").Translator;
21
+ elementInstance: import("vue").Ref<HTMLElement>;
21
22
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
23
  className: {
23
24
  type: StringConstructor;
@@ -11,3 +11,4 @@ export * from './components/spin-loading';
11
11
  export * from './components/upload';
12
12
  export * from './components/video-player';
13
13
  export * from './components/drag-resize';
14
+ export * from './components/labelimg';
@@ -70,6 +70,9 @@ export declare const localeLang: {
70
70
  tabsAll: string;
71
71
  systemSetting: string;
72
72
  };
73
+ labelimg: {
74
+ saveTxt: string;
75
+ };
73
76
  };
74
77
  };
75
78
  };
@@ -66,6 +66,11 @@ declare const _default: {
66
66
  tabsAll: string;
67
67
  systemSetting: string;
68
68
  };
69
+ labelimg: {
70
+ saveTxt: string;
71
+ emptyLabelText: string;
72
+ confirmDeleteLabel: string;
73
+ };
69
74
  };
70
75
  };
71
76
  export default _default;
@@ -66,6 +66,11 @@ declare const _default: {
66
66
  tabsAll: string;
67
67
  systemSetting: string;
68
68
  };
69
+ labelimg: {
70
+ saveTxt: string;
71
+ emptyLabelText: string;
72
+ confirmDeleteLabel: string;
73
+ };
69
74
  };
70
75
  };
71
76
  export default _default;
@@ -66,6 +66,11 @@ declare const _default: {
66
66
  tabsAll: string;
67
67
  systemSetting: string;
68
68
  };
69
+ labelimg: {
70
+ saveTxt: string;
71
+ emptyLabelText: string;
72
+ confirmDeleteLabel: string;
73
+ };
69
74
  };
70
75
  };
71
76
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-element-vue",
3
- "version": "0.2.6",
3
+ "version": "0.2.9",
4
4
  "author": {
5
5
  "name": "huangteng",
6
6
  "email": "htengweb@163.com"
@@ -46,60 +46,6 @@
46
46
  "vue-i18n": "^9.4.1",
47
47
  "vue-router": "^4.2.5"
48
48
  },
49
- "devDependencies": {
50
- "@babel/core": "^7.22.20",
51
- "@babel/plugin-transform-runtime": "^7.22.15",
52
- "@babel/preset-env": "^7.22.20",
53
- "@babel/preset-typescript": "^7.22.15",
54
- "@rollup/plugin-alias": "^5.1.0",
55
- "@rollup/plugin-babel": "^6.0.4",
56
- "@rollup/plugin-commonjs": "^25.0.7",
57
- "@rollup/plugin-json": "^6.1.0",
58
- "@rollup/plugin-node-resolve": "^15.2.3",
59
- "@rollup/plugin-replace": "^5.0.5",
60
- "@rollup/plugin-terser": "^0.4.4",
61
- "@rollup/plugin-url": "^8.0.2",
62
- "@tensorflow/tfjs": "^4.11.0",
63
- "@types/lodash-es": "^4.17.9",
64
- "@types/node": "^20.6.3",
65
- "@typescript-eslint/eslint-plugin": "^6.7.2",
66
- "@typescript-eslint/parser": "^6.7.2",
67
- "@vue/babel-plugin-jsx": "^1.1.5",
68
- "@vue/compiler-sfc": "^3.3.4",
69
- "@vueuse/core": "^10.4.1",
70
- "autoprefixer": "^10.4.16",
71
- "concurrently": "^8.2.1",
72
- "cssnano": "^6.0.1",
73
- "element-plus": "^2.7.4",
74
- "eslint": "^8.50.0",
75
- "eslint-plugin-unicorn": "^48.0.1",
76
- "eslint-plugin-vue": "^9.17.0",
77
- "flv.js": "^1.6.2",
78
- "lint-staged": "^14.0.1",
79
- "lodash-es": "^4.17.21",
80
- "mockjs": "^1.1.0",
81
- "mpegts.js": "^1.7.3",
82
- "postcss-import": "^15.1.0",
83
- "postcss-scss": "^4.0.8",
84
- "prettier": "^3.0.3",
85
- "rimraf": "^5.0.1",
86
- "rollup": "^4.13.0",
87
- "rollup-plugin-copy": "^3.5.0",
88
- "rollup-plugin-postcss": "^4.0.2",
89
- "rollup-plugin-serve": "^1.1.1",
90
- "rollup-plugin-typescript2": "^0.36.0",
91
- "rollup-plugin-vue": "6.0.0",
92
- "sass": "^1.68.0",
93
- "simple-git-hooks": "^2.9.0",
94
- "typescript": "^5.2.2",
95
- "unplugin-vue-macros": "^2.5.1",
96
- "video.js": "^8.6.0",
97
- "vitest": "^0.34.5",
98
- "vue": "^3.4.21",
99
- "vue-eslint-parser": "^9.3.1",
100
- "vue-i18n": "^9.4.1",
101
- "vue-router": "^4.2.5"
102
- },
103
49
  "engines": {
104
50
  "node": ">=16"
105
51
  },