@gct-paas/core 0.0.1-dev.16 → 0.0.1-dev.18
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/dist/index.min.cjs +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/constants/editor-type/editor-type.d.ts +33 -1
- package/es/constants/editor-type/editor-type.mjs +8 -0
- package/es/controller/edit-form/edit-form.controller.d.ts +1 -0
- package/es/controller/edit-form/edit-form.controller.mjs +6 -0
- package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +2 -2
- package/es/interface/controller/edit-form/edit-form.controller.d.ts +6 -0
- package/es/interface/form/i-form/i-edit-form.d.ts +6 -0
- package/es/interface/index.d.ts +1 -0
- package/es/interface/low-code-types/widget-basic-types.d.ts +10 -0
- package/es/interface/style/i-border.d.ts +16 -0
- package/es/interface/style/i-border.mjs +1 -0
- package/es/interface/style/i-font.d.ts +9 -0
- package/es/interface/style/i-font.mjs +1 -0
- package/es/interface/style/i-margin.d.ts +2 -0
- package/es/interface/style/i-margin.mjs +1 -0
- package/es/interface/style/i-padding.d.ts +2 -0
- package/es/interface/style/i-padding.mjs +1 -0
- package/es/interface/style/i-position.d.ts +14 -0
- package/es/interface/style/i-position.mjs +1 -0
- package/es/interface/style/i-spacing.d.ts +13 -0
- package/es/interface/style/i-spacing.mjs +1 -0
- package/es/interface/style/index.d.ts +6 -0
- package/es/interface/style/index.mjs +1 -0
- package/es/utils/axios/interceptors.mjs +1 -1
- package/es/utils/width-install/width-install.d.ts +2 -1
- package/es/utils/width-install/width-install.mjs +2 -2
- package/package.json +5 -5
|
@@ -105,6 +105,10 @@ export declare enum EditorTypeOld {
|
|
|
105
105
|
* 下拉选择编辑器
|
|
106
106
|
*/
|
|
107
107
|
SELECT = "select-editor",
|
|
108
|
+
/**
|
|
109
|
+
* 下拉选择编辑器
|
|
110
|
+
*/
|
|
111
|
+
MODEL_SELECT = "model-editor",
|
|
108
112
|
/**
|
|
109
113
|
* 单选框编辑器
|
|
110
114
|
*/
|
|
@@ -140,5 +144,33 @@ export declare enum EditorTypeOld {
|
|
|
140
144
|
/**
|
|
141
145
|
* 复选框
|
|
142
146
|
*/
|
|
143
|
-
CHECKBOX = "checkbox-editor"
|
|
147
|
+
CHECKBOX = "checkbox-editor",
|
|
148
|
+
/**
|
|
149
|
+
* 边距
|
|
150
|
+
*/
|
|
151
|
+
BORDER = "border-editor",
|
|
152
|
+
/**
|
|
153
|
+
* 边框圆角
|
|
154
|
+
*/
|
|
155
|
+
BORDER_RADIUS = "border-radius-editor",
|
|
156
|
+
/**
|
|
157
|
+
* 文本对齐方式
|
|
158
|
+
*/
|
|
159
|
+
ALIGN = "align-editor",
|
|
160
|
+
/**
|
|
161
|
+
* 字体样式
|
|
162
|
+
*/
|
|
163
|
+
FONT_STYLE = "font-style-editor",
|
|
164
|
+
/**
|
|
165
|
+
* 位置
|
|
166
|
+
*/
|
|
167
|
+
POSITION = "position-editor",
|
|
168
|
+
/**
|
|
169
|
+
* 间距
|
|
170
|
+
*/
|
|
171
|
+
SPACING = "spacing-editor",
|
|
172
|
+
/**
|
|
173
|
+
* 间距
|
|
174
|
+
*/
|
|
175
|
+
MARGIN = "margin-editor"
|
|
144
176
|
}
|
|
@@ -26,6 +26,7 @@ var EditorTypeOld = /* @__PURE__ */ ((EditorTypeOld2) => {
|
|
|
26
26
|
EditorTypeOld2["NUMBER"] = "number-editor";
|
|
27
27
|
EditorTypeOld2["INFO"] = "info-editor";
|
|
28
28
|
EditorTypeOld2["SELECT"] = "select-editor";
|
|
29
|
+
EditorTypeOld2["MODEL_SELECT"] = "model-editor";
|
|
29
30
|
EditorTypeOld2["RADIO"] = "radio-editor";
|
|
30
31
|
EditorTypeOld2["PICKER"] = "picker-editor";
|
|
31
32
|
EditorTypeOld2["I18N"] = "i18n-editor";
|
|
@@ -35,6 +36,13 @@ var EditorTypeOld = /* @__PURE__ */ ((EditorTypeOld2) => {
|
|
|
35
36
|
EditorTypeOld2["CHECK_SWITCH"] = "check-switch-editor";
|
|
36
37
|
EditorTypeOld2["ICON_SELECT"] = "icon-select-editor";
|
|
37
38
|
EditorTypeOld2["CHECKBOX"] = "checkbox-editor";
|
|
39
|
+
EditorTypeOld2["BORDER"] = "border-editor";
|
|
40
|
+
EditorTypeOld2["BORDER_RADIUS"] = "border-radius-editor";
|
|
41
|
+
EditorTypeOld2["ALIGN"] = "align-editor";
|
|
42
|
+
EditorTypeOld2["FONT_STYLE"] = "font-style-editor";
|
|
43
|
+
EditorTypeOld2["POSITION"] = "position-editor";
|
|
44
|
+
EditorTypeOld2["SPACING"] = "spacing-editor";
|
|
45
|
+
EditorTypeOld2["MARGIN"] = "margin-editor";
|
|
38
46
|
return EditorTypeOld2;
|
|
39
47
|
})(EditorTypeOld || {});
|
|
40
48
|
|
|
@@ -13,6 +13,7 @@ import { GctFormController } from '../gct-form/gct-form.controller';
|
|
|
13
13
|
export declare class EditFormController extends GctFormController implements IEditFormController {
|
|
14
14
|
model: IEditForm;
|
|
15
15
|
protected initEvent(): void;
|
|
16
|
+
autoSave(): Promise<IData>;
|
|
16
17
|
save(): Promise<IData>;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
@@ -19,8 +19,14 @@ class EditFormController extends GctFormController {
|
|
|
19
19
|
if (val != oldVal) {
|
|
20
20
|
this.calcHidden();
|
|
21
21
|
}
|
|
22
|
+
if (this.model.autosave === true && this.state.loading === false) {
|
|
23
|
+
this.autoSave();
|
|
24
|
+
}
|
|
22
25
|
});
|
|
23
26
|
}
|
|
27
|
+
autoSave() {
|
|
28
|
+
return this.save();
|
|
29
|
+
}
|
|
24
30
|
save() {
|
|
25
31
|
const data = this.getData();
|
|
26
32
|
if (this.state.isNew === true && this.model.newRequest) {
|
|
@@ -8,10 +8,10 @@ function useGctFormValue(key) {
|
|
|
8
8
|
const form = useForm();
|
|
9
9
|
val = computed({
|
|
10
10
|
get() {
|
|
11
|
-
return form.
|
|
11
|
+
return form.item[key].value;
|
|
12
12
|
},
|
|
13
13
|
set(val2) {
|
|
14
|
-
form.
|
|
14
|
+
form.item[key].value = val2;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
} else {
|
|
@@ -18,6 +18,12 @@ export interface IEditForm extends IForm {
|
|
|
18
18
|
* @date 2024-06-11 17:06:55
|
|
19
19
|
*/
|
|
20
20
|
watch?: Record<string, (form: IFormController, val: any, oldValue: any) => void>;
|
|
21
|
+
/**
|
|
22
|
+
* 自动保存
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
*/
|
|
26
|
+
autosave?: boolean;
|
|
21
27
|
/**
|
|
22
28
|
* 新建请求
|
|
23
29
|
*
|
package/es/interface/index.d.ts
CHANGED
|
@@ -341,8 +341,13 @@ export declare namespace LowCodeWidget {
|
|
|
341
341
|
* editor内部的自定义config逻辑
|
|
342
342
|
*/
|
|
343
343
|
_config?: Partial<StyleEditorConfig>;
|
|
344
|
+
/** 表单编辑器额外配置 */
|
|
345
|
+
editor?: Record<string, any>;
|
|
346
|
+
/** 表单项配置 */
|
|
347
|
+
formItem?: Record<string, any>;
|
|
344
348
|
}
|
|
345
349
|
interface StyleEditorConfig {
|
|
350
|
+
[key: string]: any;
|
|
346
351
|
options: Function | {
|
|
347
352
|
label: string;
|
|
348
353
|
value: string | boolean | number;
|
|
@@ -389,6 +394,10 @@ export declare namespace LowCodeWidget {
|
|
|
389
394
|
* editor内部的自定义config逻辑
|
|
390
395
|
*/
|
|
391
396
|
_config?: Partial<PropEditorConfig>;
|
|
397
|
+
/** 表单项额外配置 */
|
|
398
|
+
editor?: Record<string, any>;
|
|
399
|
+
/** 表单项配置 */
|
|
400
|
+
formItem?: Record<string, any>;
|
|
392
401
|
/**prop变时的callback */
|
|
393
402
|
changeCallback?: (arg: BasicSchema, val: any) => void;
|
|
394
403
|
/** 是否是纯表单字段配置(在 hidden 方法之后执行,如果为 false 直接隐藏)只针对于字段 */
|
|
@@ -403,6 +412,7 @@ export declare namespace LowCodeWidget {
|
|
|
403
412
|
}
|
|
404
413
|
/**editor属性 */
|
|
405
414
|
interface PropEditorConfig {
|
|
415
|
+
[key: string]: any;
|
|
406
416
|
width?: number;
|
|
407
417
|
filterFields: FIELD_TYPE[];
|
|
408
418
|
filterTypes: CreateType[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BorderStyle } from '../../enums';
|
|
2
|
+
export interface IBorderItem {
|
|
3
|
+
style?: BorderStyle;
|
|
4
|
+
color?: string;
|
|
5
|
+
width?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IBorder {
|
|
8
|
+
top?: IBorderItem;
|
|
9
|
+
right?: IBorderItem;
|
|
10
|
+
bottom?: IBorderItem;
|
|
11
|
+
left?: IBorderItem;
|
|
12
|
+
topRightRadius?: string;
|
|
13
|
+
topLeftRadius?: string;
|
|
14
|
+
bottomRightRadius?: string;
|
|
15
|
+
bottomLeftRadius?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { IBorder, IBorderItem } from './i-border';
|
|
2
|
+
export type { ISpacing } from './i-spacing';
|
|
3
|
+
export type { IPadding } from './i-padding';
|
|
4
|
+
export type { IMargin } from './i-margin';
|
|
5
|
+
export type { IPosition } from './i-position';
|
|
6
|
+
export type { IFont } from './i-font';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosHeaders } from 'axios';
|
|
2
|
-
import { getTimezone,
|
|
2
|
+
import { getTimezone, isMobile, getToken, getPathQuery } from '../tools/tools.mjs';
|
|
3
3
|
import '../../enums/index.mjs';
|
|
4
4
|
import { ProjectName } from '../../enums/appEnum.mjs';
|
|
5
5
|
|
|
@@ -9,8 +9,9 @@ import { IEditorProvider } from '../../interface';
|
|
|
9
9
|
* @param {string} providerTag
|
|
10
10
|
* @param {() => IEditorProvider} provider
|
|
11
11
|
* @param {*} [com]
|
|
12
|
+
* @param {string} [comName]
|
|
12
13
|
* @return {*}
|
|
13
14
|
*/
|
|
14
|
-
export declare function widthEditorInstall(providerTag: string, provider: () => IEditorProvider, com?: any): {
|
|
15
|
+
export declare function widthEditorInstall(providerTag: string, provider: () => IEditorProvider, com?: any, comName?: string): {
|
|
15
16
|
install(app: App): void;
|
|
16
17
|
};
|
|
@@ -2,7 +2,7 @@ import '../../constants/index.mjs';
|
|
|
2
2
|
import { EditorRegisterConst } from '../../constants/editor-register/editor-register.mjs';
|
|
3
3
|
|
|
4
4
|
"use strict";
|
|
5
|
-
function widthEditorInstall(providerTag, provider, com) {
|
|
5
|
+
function widthEditorInstall(providerTag, provider, com, comName) {
|
|
6
6
|
return {
|
|
7
7
|
install(app) {
|
|
8
8
|
if (providerTag && provider) {
|
|
@@ -12,7 +12,7 @@ function widthEditorInstall(providerTag, provider, com) {
|
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
14
|
if (com) {
|
|
15
|
-
app.component(com.name, com);
|
|
15
|
+
app.component(comName ?? com.name, com);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/core",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台核心包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"async-validator": "^4.2.5",
|
|
48
|
-
"axios": "^1.
|
|
48
|
+
"axios": "^1.8.1",
|
|
49
49
|
"lodash-es": "^4.17.21",
|
|
50
50
|
"path-browserify": "^1.0.1",
|
|
51
51
|
"pinia": "^2.3.1",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"vue-i18n": "9.6.5"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@gct-paas/build": "0.0.1-dev.
|
|
60
|
-
"@gct-paas/cli": "0.0.1-dev.
|
|
59
|
+
"@gct-paas/build": "0.0.1-dev.18",
|
|
60
|
+
"@gct-paas/cli": "0.0.1-dev.18",
|
|
61
61
|
"@types/path-browserify": "^1.0.3",
|
|
62
62
|
"@types/qs": "^6.9.18",
|
|
63
63
|
"fs-extra": "^11.3.0"
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"vue": "^3.x"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0a61c5593beffb2a893dffde18fc6759983b72cb"
|
|
69
69
|
}
|