@ajaxjs/ui 1.2.2 → 1.2.3

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 (137) hide show
  1. package/README.md +8 -11
  2. package/dist/api-helper/common/arg.vue +46 -0
  3. package/dist/api-helper/common/http-method.vue +53 -0
  4. package/dist/api-helper/common/input-table.vue +128 -0
  5. package/dist/api-helper/document/document-render.d.ts +10 -0
  6. package/dist/api-helper/document/document-render.js +38 -0
  7. package/dist/api-helper/document/document-render.js.map +1 -0
  8. package/dist/api-helper/document/document-render.ts +35 -0
  9. package/dist/api-helper/document/document-render.vue +155 -0
  10. package/dist/api-helper/document/document.d.ts +31 -0
  11. package/dist/api-helper/document/document.js +55 -0
  12. package/dist/api-helper/document/document.js.map +1 -0
  13. package/dist/api-helper/document/document.ts +55 -0
  14. package/dist/api-helper/document/document.vue +78 -0
  15. package/dist/api-helper/document/perview.vue +0 -0
  16. package/dist/api-helper/index.js +142 -0
  17. package/dist/api-helper/index.vue +108 -0
  18. package/dist/api-helper/request-body.vue +66 -0
  19. package/dist/api-helper/table.d.ts +7 -0
  20. package/dist/api-helper/table.js +13 -0
  21. package/dist/api-helper/table.js.map +1 -0
  22. package/dist/api-helper/table.ts +10 -0
  23. package/dist/api-helper/table.vue +103 -0
  24. package/dist/api-helper/xhr.js +100 -0
  25. package/dist/api-selector/api-list-dataservice.d.ts +18 -0
  26. package/dist/api-selector/api-list-dataservice.js +209 -0
  27. package/dist/api-selector/api-list-dataservice.js.map +1 -0
  28. package/dist/api-selector/api-list-dataservice.ts +232 -0
  29. package/dist/api-selector/api-list-swagger.d.ts +28 -0
  30. package/dist/api-selector/api-list-swagger.js +179 -0
  31. package/dist/api-selector/api-list-swagger.js.map +1 -0
  32. package/dist/api-selector/api-list-swagger.ts +206 -0
  33. package/dist/api-selector/api-list.d.ts +80 -0
  34. package/dist/api-selector/api-list.js +129 -0
  35. package/dist/api-selector/api-list.js.map +1 -0
  36. package/dist/api-selector/api-list.ts +135 -0
  37. package/dist/api-selector/index.vue +125 -0
  38. package/dist/api-selector/test-dataservice.d.ts +23 -0
  39. package/dist/api-selector/test-dataservice.js +74 -0
  40. package/dist/api-selector/test-dataservice.js.map +1 -0
  41. package/dist/api-selector/test-swagger.d.ts +901 -0
  42. package/dist/api-selector/test-swagger.js +656 -0
  43. package/dist/api-selector/test-swagger.js.map +1 -0
  44. package/dist/data-source/data-source.css +44 -0
  45. package/dist/data-source/data-source.html +59 -0
  46. package/dist/data-source/data-source.js +96 -0
  47. package/dist/iView-ext/fast-iview-table/fast-iview-table.d.ts +37 -0
  48. package/dist/iView-ext/fast-iview-table/fast-iview-table.js +72 -0
  49. package/dist/iView-ext/fast-iview-table/fast-iview-table.js.map +1 -0
  50. package/dist/iView-ext/fast-iview-table/fast-iview-table.ts +75 -0
  51. package/dist/iView-ext/fast-iview-table/fast-iview-table.vue +52 -0
  52. package/dist/iView-ext/fast-iview-table/list.d.ts +44 -0
  53. package/dist/iView-ext/fast-iview-table/list.js +97 -0
  54. package/dist/iView-ext/fast-iview-table/list.js.map +1 -0
  55. package/dist/iView-ext/fast-iview-table/list.ts +109 -0
  56. package/dist/index.d.ts +35 -31
  57. package/dist/index.js +41 -56
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.ts +58 -0
  60. package/dist/libs/api-helper.d.ts +194 -0
  61. package/dist/libs/api-list.d.ts +15 -0
  62. package/dist/libs/common.d.ts +201 -0
  63. package/dist/libs/entity.d.ts +26 -0
  64. package/dist/libs/entity.js +1 -0
  65. package/dist/libs/entity.js.map +1 -0
  66. package/dist/libs/entity.ts +31 -0
  67. package/dist/libs/iview-widgets.d.ts +59 -0
  68. package/dist/libs/iview-widgets.js +2 -0
  69. package/dist/libs/iview-widgets.js.map +1 -0
  70. package/dist/libs/iview-widgets.ts +73 -0
  71. package/dist/main.d.ts +1 -1
  72. package/dist/main.js +16 -8
  73. package/dist/main.js.map +1 -1
  74. package/dist/main.ts +22 -0
  75. package/dist/table-selector/table-selector.htm +28 -0
  76. package/dist/table-selector/table-selector.js +149 -0
  77. package/package.json +16 -17
  78. package/dist/router/index.d.ts +0 -3
  79. package/dist/router/index.js +0 -44
  80. package/dist/router/index.js.map +0 -1
  81. package/dist/util/cookies.d.ts +0 -18
  82. package/dist/util/cookies.js +0 -46
  83. package/dist/util/cookies.js.map +0 -1
  84. package/dist/util/dom.d.ts +0 -17
  85. package/dist/util/dom.js +0 -44
  86. package/dist/util/dom.js.map +0 -1
  87. package/dist/util/utils.d.ts +0 -51
  88. package/dist/util/utils.js +0 -174
  89. package/dist/util/utils.js.map +0 -1
  90. package/dist/util/xhr-config.d.ts +0 -22
  91. package/dist/util/xhr-config.js +0 -3
  92. package/dist/util/xhr-config.js.map +0 -1
  93. package/dist/util/xhr.d.ts +0 -71
  94. package/dist/util/xhr.js +0 -262
  95. package/dist/util/xhr.js.map +0 -1
  96. package/dist/widget/AccordionMenu.vue +0 -140
  97. package/dist/widget/AdjustFontSize.vue +0 -65
  98. package/dist/widget/Article.vue +0 -59
  99. package/dist/widget/EmptyContent.d.ts +0 -5
  100. package/dist/widget/EmptyContent.js +0 -7
  101. package/dist/widget/EmptyContent.js.map +0 -1
  102. package/dist/widget/Expander.vue +0 -65
  103. package/dist/widget/FileUploader/FileUploader.d.ts +0 -70
  104. package/dist/widget/FileUploader/FileUploader.js +0 -139
  105. package/dist/widget/FileUploader/FileUploader.js.map +0 -1
  106. package/dist/widget/FileUploader/FileUploader.less +0 -68
  107. package/dist/widget/FileUploader/FileUploader.ts +0 -156
  108. package/dist/widget/FileUploader/FileUploader.vue +0 -43
  109. package/dist/widget/HtmlEditor/HtmlEditor.d.ts +0 -70
  110. package/dist/widget/HtmlEditor/HtmlEditor.js +0 -287
  111. package/dist/widget/HtmlEditor/HtmlEditor.js.map +0 -1
  112. package/dist/widget/HtmlEditor/HtmlEditor.less +0 -345
  113. package/dist/widget/HtmlEditor/HtmlEditor.ts +0 -339
  114. package/dist/widget/HtmlEditor/HtmlEditor.vue +0 -70
  115. package/dist/widget/HtmlEditor/html-editor-HtmlSanitizer.js +0 -103
  116. package/dist/widget/ImageEnlarger.vue +0 -105
  117. package/dist/widget/OpacityBanner.vue +0 -125
  118. package/dist/widget/ProcessLine.vue +0 -133
  119. package/dist/widget/Resize.d.ts +0 -51
  120. package/dist/widget/Resize.js +0 -133
  121. package/dist/widget/Resize.js.map +0 -1
  122. package/dist/widget/Resize.ts +0 -152
  123. package/dist/widget/Resize.vue +0 -104
  124. package/dist/widget/TreeSelector.vue +0 -4
  125. package/dist/widget/calendar/BetweenDate.vue +0 -63
  126. package/dist/widget/calendar/Calendar.d.ts +0 -55
  127. package/dist/widget/calendar/Calendar.js +0 -145
  128. package/dist/widget/calendar/Calendar.js.map +0 -1
  129. package/dist/widget/calendar/Calendar.less +0 -210
  130. package/dist/widget/calendar/Calendar.ts +0 -167
  131. package/dist/widget/calendar/Calendar.vue +0 -52
  132. package/dist/widget/calendar/CalendarInput.vue +0 -71
  133. package/dist/widget/form/validator.d.ts +0 -70
  134. package/dist/widget/form/validator.js +0 -220
  135. package/dist/widget/form/validator.js.map +0 -1
  136. package/dist/widget/form/validator.ts +0 -289
  137. package/dist/widget/play-ground/sku.vue +0 -93
@@ -0,0 +1,109 @@
1
+ import { dateFormat } from '@ajaxjs/util/dist/util/utils';
2
+ import { xhr_del } from '@ajaxjs/util/dist/util/xhr';
3
+
4
+ /**
5
+ * 处理响应的回调函数
6
+ */
7
+ type XhrCallback = (json: {}, text: string) => void;
8
+
9
+ export default {
10
+ afterDelete(cb?: Function): Function {
11
+ return function (j: RepsonseResult) {
12
+ if (j.status) {
13
+ cb && cb(j);
14
+ this.$Message.success('删除成功');
15
+ }
16
+ else
17
+ this.$Message.info('删除失败。' + j.message);
18
+ }
19
+ },
20
+
21
+ delInfo(index: number) {
22
+ xhr_del(`${this.API}/${this.list.data[index].id}`, (j: RepsonseResult) => {
23
+ if (j.status) {
24
+ this.list.data.splice(index, 1);
25
+ this.list.total--;
26
+ this.$Message.success('删除成功');
27
+ } else
28
+ this.$Message.info('删除失败。' + j.message);
29
+ });
30
+ },
31
+
32
+ /**
33
+ * id 列
34
+ */
35
+ id: { title: '#', width: 60, key: 'id', align: 'center' },
36
+
37
+ /**
38
+ * 创建日期
39
+ */
40
+ createDate: {
41
+ title: '创建日期',/* key: 'createDate', */ width: 160, align: 'center', render(h: Function, params: any) {
42
+ return h('div', dateFormat.call(new Date(params.row.createDate), 'yyyy-MM-dd hh:mm'));
43
+ }
44
+ },
45
+
46
+ /**
47
+ * 分类标签
48
+ */
49
+ tags: { title: '分类标签', minWidth: 100, key: 'tagsNames', align: 'center', ellipsis: true },
50
+
51
+ status: {
52
+ title: '状态', width: 80,
53
+ render(h: Function, params: any) {
54
+ let str: string = '', color: string = '';
55
+
56
+ switch (params.row.stat) {
57
+ case -1:
58
+ str = '草稿';
59
+ color = 'gray';
60
+ break;
61
+ case 2:
62
+ color = 'red';
63
+ str = '禁用';
64
+ break;
65
+ case 1:
66
+ color = 'red';
67
+ str = '已删除';
68
+ break
69
+ case null:
70
+ case 0:
71
+ default:
72
+ color = 'green';
73
+ str = "启用";
74
+ }
75
+
76
+ return h('div', {
77
+ style: {
78
+ color: color
79
+ }
80
+ }, str);
81
+ }
82
+ },
83
+ getPageList(self: any, listArray: any, callback?: Function): XhrCallback {
84
+ return (j: JsonResponse) => {
85
+ if (j.status) {
86
+ listArray.total = j.data.total;
87
+ listArray.data = j.data.rows;
88
+
89
+ callback && callback();
90
+ } else
91
+ self.$Message.warning(j.message || '获取数据失败');
92
+ }
93
+ },
94
+
95
+ copyBeanClean(bean: {}): {} {
96
+ const deepCopy: any = JSON.parse(JSON.stringify(bean));
97
+
98
+ delete deepCopy.createDate;
99
+ delete deepCopy.updateDate;
100
+ delete deepCopy.updateDate;
101
+ delete deepCopy.creatorId;
102
+ delete deepCopy.updaterId;
103
+ delete deepCopy.creator;
104
+ delete deepCopy.updater;
105
+ delete deepCopy.extend;
106
+
107
+ return deepCopy;
108
+ }
109
+ };
package/dist/index.d.ts CHANGED
@@ -1,38 +1,42 @@
1
- import * as util from './util/utils';
2
- import { setBaseHeadParams } from './util/xhr';
3
- import { xhr_get, xhr_post, xhr_put, xhr_del } from './util/xhr';
4
- import OpacityBanner from "@/widget/OpacityBanner.vue";
1
+ import iViewListCommon from './iView-ext/fast-iview-table/fast-iview-table.vue';
5
2
  /**
6
3
  * 暴露各个组件
7
4
  */
8
5
  declare const _default: {
9
- /**
10
- * 设置 API 统一前缀
11
- *
12
- * @param perfix API 统一前缀
13
- */
14
- setApiBaseUrl(perfix: string): void;
15
- /**
16
- * 获取 API 统一前缀
17
- *
18
- * @returns API 统一前缀
19
- */
20
- getApiBaseUrl(): string;
21
- setBaseHeadParams: typeof setBaseHeadParams;
22
- util: typeof util;
23
- xhr: {
24
- xhr_get: typeof xhr_get;
25
- xhr_post: typeof xhr_post;
26
- xhr_put: typeof xhr_put;
27
- xhr_del: typeof xhr_del;
6
+ ApiSelector: import("vue").VueConstructor<iViewListCommon<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => iViewListCommon<Record<string, any>, Record<string, any>, never, never, any>>>;
7
+ Fast_iViewTable: {
8
+ afterDelete(cb?: Function): Function;
9
+ delInfo(index: number): void;
10
+ id: {
11
+ title: string;
12
+ width: number;
13
+ key: string;
14
+ align: string;
15
+ };
16
+ createDate: {
17
+ title: string;
18
+ width: number;
19
+ align: string;
20
+ render(h: Function, params: any): any;
21
+ };
22
+ tags: {
23
+ /**
24
+ * API 统一前缀
25
+ */
26
+ title: string;
27
+ minWidth: number;
28
+ key: string;
29
+ align: string;
30
+ ellipsis: boolean;
31
+ };
32
+ status: {
33
+ title: string;
34
+ width: number;
35
+ render(h: Function, params: any): any;
36
+ };
37
+ getPageList(self: any, listArray: any, callback?: Function): (json: {}, text: string) => void;
38
+ copyBeanClean(bean: {}): {};
28
39
  };
29
- OpacityBanner: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
30
- ProcessLine: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
31
- AccordionMenu: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
32
- Expander: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
33
- Article: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
34
- HtmlEditor: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
35
- FileUploader: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
36
- Calendar: import("vue").VueConstructor<OpacityBanner<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => OpacityBanner<Record<string, any>, Record<string, any>, never, never, any>>>;
40
+ iViewListCommon: import("vue").VueConstructor<iViewListCommon<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => iViewListCommon<Record<string, any>, Record<string, any>, never, never, any>>>;
37
41
  };
38
42
  export default _default;
package/dist/index.js CHANGED
@@ -1,42 +1,31 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
2
+ // import * as sys_config from './util/system/config';
3
+ // import * as util from './util/utils';
4
+ // import { setBaseHeadParams } from './util/xhr';
25
5
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
7
  };
28
8
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const util = __importStar(require("./util/utils"));
30
- const xhr_1 = require("./util/xhr");
31
- const xhr_2 = require("./util/xhr");
32
- const OpacityBanner_vue_1 = __importDefault(require("@/widget/OpacityBanner.vue"));
33
- const ProcessLine_vue_1 = __importDefault(require("@/widget/ProcessLine.vue"));
34
- const AccordionMenu_vue_1 = __importDefault(require("@/widget/AccordionMenu.vue"));
35
- const Expander_vue_1 = __importDefault(require("@/widget/Expander.vue"));
36
- const HtmlEditor_vue_1 = __importDefault(require("@/widget/HtmlEditor/HtmlEditor.vue"));
37
- const FileUploader_vue_1 = __importDefault(require("@/widget/FileUploader/FileUploader.vue"));
38
- const Calendar_vue_1 = __importDefault(require("@/widget/calendar/Calendar.vue"));
39
- const Article_vue_1 = __importDefault(require("@/widget/Article.vue"));
9
+ // import DataSource from './components/data-service/datasource/datasource.vue';
10
+ // import DataService from './components/data-service/data-service.vue';
11
+ // import DataServiceInfo from './components/data-service/info/info.vue';
12
+ // import FactoryFormAdmin from './components/factory-form/list.vue';
13
+ // import FactoryFormAdminInfo from './components/factory-form/form-factory.vue';
14
+ // import FactoryFormLoader from './components/factory-form/loader.vue';
15
+ // import FactoryListAdmin from './components/factory-list/list.vue';
16
+ // import FactoryListAdminInfo from './components/factory-list/list-factory.vue';
17
+ // import FactoryListLoader from './components/factory-list/list-loader.vue';
18
+ const list_1 = __importDefault(require("./iView-ext/fast-iview-table/list"));
19
+ const fast_iview_table_vue_1 = __importDefault(require("./iView-ext/fast-iview-table/fast-iview-table.vue"));
20
+ const index_vue_1 = __importDefault(require("./api-selector/index.vue"));
21
+ // import DeveloperTools from './components/admin-page/developer-tools/index.vue';
22
+ // import SysConfig from './components/admin-page/system/config.vue';
23
+ // import DataDict from './components/admin-page/system/data-dict.vue';
24
+ // import OrgIndex from './components/admin-page/user/org/index.vue';
25
+ // import RBAC from './components/admin-page/user/rbac/rbac.vue';
26
+ // import WebsiteConfig from './components/admin-page/website/config.vue';
27
+ // import FormDesigner from './components/form-designer/demo.vue';
28
+ // import WorkflowDesigner from './components/work-flow/index.vue';
40
29
  /**
41
30
  * API 统一前缀
42
31
  */
@@ -45,27 +34,23 @@ let API_BASE_URL;
45
34
  * 暴露各个组件
46
35
  */
47
36
  exports.default = {
48
- /**
49
- * 设置 API 统一前缀
50
- *
51
- * @param perfix API 统一前缀
52
- */
53
- setApiBaseUrl(perfix) {
54
- API_BASE_URL = perfix;
55
- },
56
- /**
57
- * 获取 API 统一前缀
58
- *
59
- * @returns API 统一前缀
60
- */
61
- getApiBaseUrl() {
62
- return API_BASE_URL;
63
- },
64
- setBaseHeadParams: xhr_1.setBaseHeadParams,
65
- util: util,
66
- xhr: {
67
- xhr_get: xhr_2.xhr_get, xhr_post: xhr_2.xhr_post, xhr_put: xhr_2.xhr_put, xhr_del: xhr_2.xhr_del
68
- },
69
- OpacityBanner: OpacityBanner_vue_1.default, ProcessLine: ProcessLine_vue_1.default, AccordionMenu: AccordionMenu_vue_1.default, Expander: Expander_vue_1.default, Article: Article_vue_1.default, HtmlEditor: HtmlEditor_vue_1.default, FileUploader: FileUploader_vue_1.default, Calendar: Calendar_vue_1.default
37
+ // system: sys_config,
38
+ // /**
39
+ // * 设置 API 统一前缀
40
+ // *
41
+ // * @param perfix API 统一前缀
42
+ // */
43
+ // setApiBaseUrl(perfix: string): void {
44
+ // API_BASE_URL = perfix;
45
+ // },
46
+ // /**
47
+ // * 获取 API 统一前缀
48
+ // *
49
+ // * @returns API 统一前缀
50
+ // */
51
+ // getApiBaseUrl(): string {
52
+ // return API_BASE_URL;
53
+ // },
54
+ ApiSelector: index_vue_1.default, Fast_iViewTable: list_1.default, iViewListCommon: fast_iview_table_vue_1.default
70
55
  };
71
56
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AACrC,oCAA+C;AAC/C,oCAAiE;AAEjE,mFAAuD;AACvD,+EAAmD;AACnD,mFAAuD;AACvD,yEAA6C;AAC7C,wFAA4D;AAC5D,8FAAkE;AAClE,kFAAsD;AACtD,uEAA2C;AAE3C;;GAEG;AACH,IAAI,YAAoB,CAAC;AAEzB;;GAEG;AACH,kBAAe;IACX;;;;OAIG;IACH,aAAa,CAAC,MAAc;QACxB,YAAY,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,aAAa;QACT,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,iBAAiB,EAAjB,uBAAiB;IAEjB,IAAI,EAAE,IAAI;IAEV,GAAG,EAAE;QACD,OAAO,EAAP,aAAO,EAAE,QAAQ,EAAR,cAAQ,EAAE,OAAO,EAAP,aAAO,EAAE,OAAO,EAAP,aAAO;KACtC;IAED,aAAa,EAAb,2BAAa,EAAE,WAAW,EAAX,yBAAW,EAAE,aAAa,EAAb,2BAAa,EAAE,QAAQ,EAAR,sBAAQ,EAAE,OAAO,EAAP,qBAAO,EAAE,UAAU,EAAV,wBAAU,EAAE,YAAY,EAAZ,0BAAY,EAAE,QAAQ,EAAR,sBAAQ;CACnG,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,wCAAwC;AACxC,kDAAkD;;;;;AAElD,gFAAgF;AAChF,wEAAwE;AACxE,yEAAyE;AAEzE,qEAAqE;AACrE,iFAAiF;AACjF,wEAAwE;AAExE,qEAAqE;AACrE,iFAAiF;AACjF,6EAA6E;AAE7E,6EAAgE;AAChE,6GAAgF;AAChF,yEAAmD;AACnD,kFAAkF;AAClF,qEAAqE;AACrE,uEAAuE;AACvE,qEAAqE;AACrE,iEAAiE;AACjE,0EAA0E;AAC1E,kEAAkE;AAClE,mEAAmE;AAEnE;;GAEG;AACH,IAAI,YAAoB,CAAC;AAEzB;;GAEG;AACH,kBAAe;IACX,sBAAsB;IAEtB,MAAM;IACN,iBAAiB;IACjB,MAAM;IACN,4BAA4B;IAC5B,MAAM;IACN,wCAAwC;IACxC,6BAA6B;IAC7B,KAAK;IAEL,MAAM;IACN,iBAAiB;IACjB,MAAM;IACN,uBAAuB;IACvB,MAAM;IACN,4BAA4B;IAC5B,2BAA2B;IAC3B,KAAK;IACL,WAAW,EAAX,mBAAW,EAAE,eAAe,EAAf,cAAe,EAAE,eAAe,EAAf,8BAAe;CAChD,CAAC"}
package/dist/index.ts ADDED
@@ -0,0 +1,58 @@
1
+ // import * as sys_config from './util/system/config';
2
+ // import * as util from './util/utils';
3
+ // import { setBaseHeadParams } from './util/xhr';
4
+
5
+ // import DataSource from './components/data-service/datasource/datasource.vue';
6
+ // import DataService from './components/data-service/data-service.vue';
7
+ // import DataServiceInfo from './components/data-service/info/info.vue';
8
+
9
+ // import FactoryFormAdmin from './components/factory-form/list.vue';
10
+ // import FactoryFormAdminInfo from './components/factory-form/form-factory.vue';
11
+ // import FactoryFormLoader from './components/factory-form/loader.vue';
12
+
13
+ // import FactoryListAdmin from './components/factory-list/list.vue';
14
+ // import FactoryListAdminInfo from './components/factory-list/list-factory.vue';
15
+ // import FactoryListLoader from './components/factory-list/list-loader.vue';
16
+
17
+ import Fast_iViewTable from './iView-ext/fast-iview-table/list';
18
+ import iViewListCommon from './iView-ext/fast-iview-table/fast-iview-table.vue';
19
+ import ApiSelector from './api-selector/index.vue';
20
+ // import DeveloperTools from './components/admin-page/developer-tools/index.vue';
21
+ // import SysConfig from './components/admin-page/system/config.vue';
22
+ // import DataDict from './components/admin-page/system/data-dict.vue';
23
+ // import OrgIndex from './components/admin-page/user/org/index.vue';
24
+ // import RBAC from './components/admin-page/user/rbac/rbac.vue';
25
+ // import WebsiteConfig from './components/admin-page/website/config.vue';
26
+ // import FormDesigner from './components/form-designer/demo.vue';
27
+ // import WorkflowDesigner from './components/work-flow/index.vue';
28
+
29
+ /**
30
+ * API 统一前缀
31
+ */
32
+ let API_BASE_URL: string;
33
+
34
+ /**
35
+ * 暴露各个组件
36
+ */
37
+ export default {
38
+ // system: sys_config,
39
+
40
+ // /**
41
+ // * 设置 API 统一前缀
42
+ // *
43
+ // * @param perfix API 统一前缀
44
+ // */
45
+ // setApiBaseUrl(perfix: string): void {
46
+ // API_BASE_URL = perfix;
47
+ // },
48
+
49
+ // /**
50
+ // * 获取 API 统一前缀
51
+ // *
52
+ // * @returns API 统一前缀
53
+ // */
54
+ // getApiBaseUrl(): string {
55
+ // return API_BASE_URL;
56
+ // },
57
+ ApiSelector, Fast_iViewTable, iViewListCommon
58
+ };
@@ -0,0 +1,194 @@
1
+ /**
2
+ * 表格定义
3
+ */
4
+ declare type API_HELPER_TABLE = {
5
+ mode: 'SIMPLE' | 'SCHEME';
6
+ };
7
+
8
+ /**
9
+ * 环境
10
+ */
11
+ declare type API_HELPER_ENV = {
12
+ id: number;
13
+ name: string;
14
+
15
+ /**
16
+ * URL 前缀
17
+ */
18
+ urlPrefix: string;
19
+
20
+ /**
21
+ *
22
+ */
23
+ actived: boolean;
24
+ };
25
+
26
+ /**
27
+ * HTTP 方法
28
+ */
29
+ declare type API_HELPER_HTTP_METHOD = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTION';
30
+
31
+ /**
32
+ * 历史记录
33
+ */
34
+ declare type API_HELPER_HISTORY = {
35
+ id: number;
36
+
37
+ /**
38
+ * 任务名称,可选
39
+ */
40
+ name?: string;
41
+
42
+ /**
43
+ * 任务 id,可选
44
+ */
45
+ nameId: number;
46
+
47
+ httpMethod: API_HELPER_HTTP_METHOD;
48
+
49
+ url: string;
50
+
51
+ /**
52
+ * 请求日期
53
+ */
54
+ date: string;
55
+
56
+ /**
57
+ * 耗时
58
+ */
59
+ time: number;
60
+
61
+ stateCode: number;
62
+ };
63
+
64
+ /**
65
+ * 参数的枚举值
66
+ */
67
+ declare type API_HELPER_ARGUMENT_ENU = {
68
+ /**
69
+ * 是否默认
70
+ */
71
+ isDefault?: boolean;
72
+
73
+ /**
74
+ * 值
75
+ */
76
+ value: any;
77
+
78
+ /**
79
+ * 值是什么含义
80
+ */
81
+ comment: string;
82
+ };
83
+
84
+ /**
85
+ * 参数
86
+ */
87
+ declare type API_HELPER_ARGUMENT = {
88
+ /**
89
+ * 是否使用
90
+ */
91
+ isEnable: boolean;
92
+
93
+ /**
94
+ * 变量
95
+ */
96
+ name: string;
97
+
98
+ /**
99
+ * 参数说明
100
+ */
101
+ desc: string;
102
+
103
+ /**
104
+ * 参数位置
105
+ */
106
+ type: 'HEADER' | 'PATH' | 'QUERY' | 'BODY' | 'FORM';
107
+
108
+ /**
109
+ * 数据类型
110
+ */
111
+ dataType: any;
112
+
113
+ /**
114
+ * 对应后端语言的类型或者枚举
115
+ */
116
+ mappingType?: any;
117
+
118
+ /**
119
+ * 值,枚举值
120
+ */
121
+ values?: API_HELPER_ARGUMENT_ENU[];
122
+
123
+ /**
124
+ * 是否必填
125
+ */
126
+ isRequired: boolean;
127
+
128
+ /**
129
+ * 说明,描述
130
+ */
131
+ comment: string;
132
+ };
133
+
134
+ /**
135
+ * JSON 类型参数
136
+ */
137
+ declare type API_HELPER_JSON_ARGUMENT = API_HELPER_ARGUMENT & {
138
+ /**
139
+ * 类型
140
+ */
141
+ dataType: number | string | boolean | null | array | object;
142
+ };
143
+
144
+ /**
145
+ * 文档
146
+ */
147
+ declare type API_HELPER_DOCUMENT = {
148
+ /**
149
+ * ID
150
+ */
151
+ id: any;
152
+
153
+ /**
154
+ * 名称
155
+ */
156
+ name: string;
157
+
158
+ /**
159
+ * 分组
160
+ */
161
+ catalogId: any;
162
+
163
+ /**
164
+ * 说明
165
+ */
166
+ description: string;
167
+
168
+ /**
169
+ * HTTP 请求方法
170
+ */
171
+ httpMethod: API_HELPER_HTTP_METHOD;
172
+
173
+ url: string;
174
+
175
+ /**
176
+ * 对应 UI,图片地址
177
+ */
178
+ ui: string;
179
+
180
+ /**
181
+ * 请求示例
182
+ */
183
+ demoUrl: string;
184
+
185
+ /**
186
+ * 接口编码状态
187
+ */
188
+ codeState: 'INITED' | 'DEFINED' | 'DONE';
189
+
190
+ /**
191
+ * 是否在文档汇总中展示
192
+ */
193
+ isShow: boolean;
194
+ };
@@ -0,0 +1,15 @@
1
+
2
+ /**
3
+ * 选择 API 后返回的结果
4
+ */
5
+ type ApiListSelectedReuslt = {
6
+ /**
7
+ * HTTP 方法
8
+ */
9
+ method: string;
10
+
11
+ /**
12
+ * 接口地址
13
+ */
14
+ url: string;
15
+ };