page-schema-enginer-shun 1.0.4

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.
Files changed (40) hide show
  1. package/dist/index.cjs.js +1416 -0
  2. package/dist/index.cjs.js.map +1 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.es.js +1416 -0
  5. package/dist/index.es.js.map +1 -0
  6. package/dist/index.umd.js +1415 -0
  7. package/dist/index.umd.js.map +1 -0
  8. package/dist/src/hooks/useSchema.d.ts +128 -0
  9. package/dist/src/http/index.d.ts +8 -0
  10. package/dist/src/index.d.ts +5 -0
  11. package/dist/src/main.d.ts +1 -0
  12. package/dist/src/pinia/modules/user.d.ts +3 -0
  13. package/dist/src/router.d.ts +2 -0
  14. package/dist/src/schema-view/complex-view/search-panel/search-panel.vue.d.ts +8 -0
  15. package/dist/src/schema-view/complex-view/table-panel/table-panel.vue.d.ts +18 -0
  16. package/dist/src/schema-view/components/component-config.d.ts +6 -0
  17. package/dist/src/schema-view/components/createForm/createForm.vue.d.ts +9 -0
  18. package/dist/src/schema-view/components/editForm/editForm.vue.d.ts +10 -0
  19. package/dist/src/schema-view/hooks/useSchema.d.ts +72 -0
  20. package/dist/src/schema-view/schema-view.vue.d.ts +15 -0
  21. package/dist/src/schema-view/type.d.ts +15 -0
  22. package/dist/src/utils/request.d.ts +5 -0
  23. package/dist/src/wigdets/schema-form/complex-view/form-item-config.d.ts +6 -0
  24. package/dist/src/wigdets/schema-form/complex-view/input/input.vue.d.ts +17 -0
  25. package/dist/src/wigdets/schema-form/complex-view/input-number/input-number.vue.d.ts +17 -0
  26. package/dist/src/wigdets/schema-form/complex-view/radio/radio.vue.d.ts +17 -0
  27. package/dist/src/wigdets/schema-form/complex-view/select/select.vue.d.ts +17 -0
  28. package/dist/src/wigdets/schema-form/schema-form.vue.d.ts +23 -0
  29. package/dist/src/wigdets/schema-search/complex-view/input/input.vue.d.ts +36 -0
  30. package/dist/src/wigdets/schema-search/schema-item-config.d.ts +6 -0
  31. package/dist/src/wigdets/schema-search/schema-search-bar.vue.d.ts +33 -0
  32. package/dist/src/wigdets/schema-table/schema-table.vue.d.ts +38 -0
  33. package/dist/src/wigdets/schema-table/schema-view/format-date/format-date.vue.d.ts +41 -0
  34. package/dist/src/wigdets/schema-table/schema-view/format-enum/format-enum.vue.d.ts +41 -0
  35. package/dist/src/wigdets/schema-table/schema-view/schema-table-item-config.d.ts +12 -0
  36. package/dist/src/wigdets/schema-table/schema-view/tag/tag.vue.d.ts +41 -0
  37. package/dist/src/wigdets/utls/date.d.ts +3 -0
  38. package/dist/style.css +62 -0
  39. package/dist/vite.config.d.ts +2 -0
  40. package/package.json +44 -0
@@ -0,0 +1,36 @@
1
+ declare const props: {
2
+ readonly schema: Record<string, any>;
3
+ readonly schemaKey: string;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ schemaKey: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ schema: {
11
+ type: ObjectConstructor;
12
+ default: () => void;
13
+ };
14
+ }>, {
15
+ getValue: () => {
16
+ [props.schemaKey]: any;
17
+ };
18
+ reset: () => void;
19
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ loaded: (...args: any[]) => void;
21
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
22
+ schemaKey: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ schema: {
27
+ type: ObjectConstructor;
28
+ default: () => void;
29
+ };
30
+ }>> & Readonly<{
31
+ onLoaded?: ((...args: any[]) => any) | undefined;
32
+ }>, {
33
+ schema: Record<string, any>;
34
+ schemaKey: string;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
36
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { Component } from 'vue';
2
+
3
+ declare const SearchConfig: Record<string, {
4
+ component: Component;
5
+ }>;
6
+ export default SearchConfig;
@@ -0,0 +1,33 @@
1
+ import { DtoSchema } from '../../hooks/useSchema';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ schema: DtoSchema;
5
+ schemaConfig?: Record<string, any>;
6
+ }>>, {
7
+ search: () => void;
8
+ reset: () => void;
9
+ load: () => void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ search: (payload: Record<string, any>) => void;
12
+ reset: () => void;
13
+ load: () => void;
14
+ loaded: (payload: Record<string, any>) => void;
15
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
16
+ schema: DtoSchema;
17
+ schemaConfig?: Record<string, any>;
18
+ }>>> & Readonly<{
19
+ onReset?: (() => any) | undefined;
20
+ onSearch?: ((payload: Record<string, any>) => any) | undefined;
21
+ onLoaded?: ((payload: Record<string, any>) => any) | undefined;
22
+ onLoad?: (() => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
25
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
26
+ type __VLS_TypePropsToRuntimeProps<T> = {
27
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
28
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
29
+ } : {
30
+ type: import('vue').PropType<T[K]>;
31
+ required: true;
32
+ };
33
+ };
@@ -0,0 +1,38 @@
1
+ import { ApiConfig, DtoSchema } from '../../hooks/useSchema';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ schema: DtoSchema;
5
+ api: ApiConfig;
6
+ buttons: any[];
7
+ apiParms: Record<string, any>;
8
+ }>>, {
9
+ initData: () => void;
10
+ loadTableData: () => Promise<void>;
11
+ showLoding: () => void;
12
+ hideLoding: () => void;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ operate: (data: {
15
+ btnConfig: any;
16
+ rowData: any;
17
+ }) => void;
18
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
19
+ schema: DtoSchema;
20
+ api: ApiConfig;
21
+ buttons: any[];
22
+ apiParms: Record<string, any>;
23
+ }>>> & Readonly<{
24
+ onOperate?: ((data: {
25
+ btnConfig: any;
26
+ rowData: any;
27
+ }) => any) | undefined;
28
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
29
+ export default _default;
30
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
+ type __VLS_TypePropsToRuntimeProps<T> = {
32
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
33
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
34
+ } : {
35
+ type: import('vue').PropType<T[K]>;
36
+ required: true;
37
+ };
38
+ };
@@ -0,0 +1,41 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ row: {
3
+ type: ObjectConstructor;
4
+ default: () => void;
5
+ };
6
+ column: {
7
+ type: ObjectConstructor;
8
+ default: () => void;
9
+ };
10
+ index: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ itemKey: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ row: {
20
+ type: ObjectConstructor;
21
+ default: () => void;
22
+ };
23
+ column: {
24
+ type: ObjectConstructor;
25
+ default: () => void;
26
+ };
27
+ index: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ itemKey: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ row: Record<string, any>;
37
+ column: Record<string, any>;
38
+ index: number;
39
+ itemKey: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
41
+ export default _default;
@@ -0,0 +1,41 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ row: {
3
+ type: ObjectConstructor;
4
+ default: () => void;
5
+ };
6
+ column: {
7
+ type: ObjectConstructor;
8
+ default: () => void;
9
+ };
10
+ index: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ itemKey: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ row: {
20
+ type: ObjectConstructor;
21
+ default: () => void;
22
+ };
23
+ column: {
24
+ type: ObjectConstructor;
25
+ default: () => void;
26
+ };
27
+ index: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ itemKey: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ row: Record<string, any>;
37
+ column: Record<string, any>;
38
+ index: number;
39
+ itemKey: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
41
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { default as tag } from './tag/tag.vue';
2
+
3
+ export interface TableConfig {
4
+ tag: {
5
+ component: typeof tag;
6
+ };
7
+ [key: string]: {
8
+ component: any;
9
+ };
10
+ }
11
+ declare const tableConfig: TableConfig;
12
+ export default tableConfig;
@@ -0,0 +1,41 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ row: {
3
+ type: ObjectConstructor;
4
+ default: () => void;
5
+ };
6
+ column: {
7
+ type: ObjectConstructor;
8
+ default: () => void;
9
+ };
10
+ index: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ itemKey: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ row: {
20
+ type: ObjectConstructor;
21
+ default: () => void;
22
+ };
23
+ column: {
24
+ type: ObjectConstructor;
25
+ default: () => void;
26
+ };
27
+ index: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ itemKey: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ row: Record<string, any>;
37
+ column: Record<string, any>;
38
+ index: number;
39
+ itemKey: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
41
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export declare function formatDate(input: number | string | Date, pattern?: string): string;
2
+ export declare function formatTimeToStr(times: number | string | Date, pattern?: string): string;
3
+ export declare function computedAge(birthday: number | string | Date): number;
package/dist/style.css ADDED
@@ -0,0 +1,62 @@
1
+ .schema-form-input[data-v-5d94c475] {
2
+ display: flex;
3
+ align-items: center;
4
+ }
5
+ .schema-form-input .schema-form-input-item-label[data-v-5d94c475] {
6
+ margin-right: 10px;
7
+ min-width: 70px;
8
+ }.schema-form-radio[data-v-844b46ca] {
9
+ display: flex;
10
+ align-items: center;
11
+ }
12
+ .schema-form-radio-label[data-v-844b46ca] {
13
+ margin-right: 10px;
14
+ min-width: 70px;
15
+ }.schema-form-input-number[data-v-be909ea6] {
16
+ display: flex;
17
+ align-items: center;
18
+ }
19
+ .schema-form-input-number-label[data-v-be909ea6] {
20
+ margin-right: 10px;
21
+ min-width: 70px;
22
+ }.schema-form-select[data-v-65d85e93] {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+ .schema-form-select-label[data-v-65d85e93] {
27
+ margin-right: 10px;
28
+ min-width: 70px;
29
+ }.schema-form-complex-view .schema-form-input-container[data-v-81b6c9bb] {
30
+ margin-bottom: 10px;
31
+ }
32
+ .schema-form-complex-view .schema-form-radio-container[data-v-81b6c9bb] {
33
+ margin-bottom: 10px;
34
+ }
35
+ .schema-form-complex-view .schema-form-input-number-container[data-v-81b6c9bb] {
36
+ margin-bottom: 10px;
37
+ }
38
+ .schema-form-complex-view .schema-form-select-container[data-v-81b6c9bb] {
39
+ margin-bottom: 10px;
40
+ }.schema-table[data-v-fb006ee8] {
41
+ width: 98%;
42
+ margin: 0 auto;
43
+ margin-top: 5px;
44
+ }
45
+ .table-panel[data-v-fb006ee8] {
46
+ height: 100%;
47
+ }
48
+ .gva-pagination[data-v-fb006ee8] {
49
+ margin-top: 16px;
50
+ display: flex;
51
+ justify-content: flex-end;
52
+ padding-bottom: 20px;
53
+ }.table-panel[data-v-cef68da3] {
54
+ margin: 0 auto;
55
+ height: 100%;
56
+ background-color: #fff;
57
+ }
58
+ .table-panel .operation-panel[data-v-cef68da3] {
59
+ padding: 10px;
60
+ }.schema-view[data-v-6aa05693] {
61
+ height: 100%;
62
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "page-schema-enginer-shun",
3
+ "version": "1.0.4",
4
+ "description": "页面级别的schema渲染引擎",
5
+ "type": "module",
6
+ "main": "dist/index.cjs.js",
7
+ "module": "dist/index.es.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.es.js",
13
+ "require": "./dist/index.cjs.js",
14
+ "default": "./dist/index.umd.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "vite build",
23
+ "preview": "vite preview",
24
+ "typecheck": "tsc --noEmit"
25
+ },
26
+ "author": "",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "ajv": "^8.17.1",
30
+ "axios": "^1.7.7",
31
+ "element-plus": "^2.7.8",
32
+ "pinia": "^2.1.7",
33
+ "vue": "^3.4.0",
34
+ "vue-router": "^4.3.0"
35
+ },
36
+ "devDependencies": {
37
+ "@vitejs/plugin-vue": "^5.1.0",
38
+ "@types/node": "^20.11.0",
39
+ "sass": "^1.77.0",
40
+ "typescript": "^5.6.3",
41
+ "vite": "^5.0.10",
42
+ "vite-plugin-dts": "^3.5.3"
43
+ }
44
+ }