@gct-paas/core 0.0.1-dev.16 → 0.0.1-dev.17
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 +29 -1
- package/es/constants/editor-type/editor-type.mjs +7 -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/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
|
@@ -140,5 +140,33 @@ export declare enum EditorTypeOld {
|
|
|
140
140
|
/**
|
|
141
141
|
* 复选框
|
|
142
142
|
*/
|
|
143
|
-
CHECKBOX = "checkbox-editor"
|
|
143
|
+
CHECKBOX = "checkbox-editor",
|
|
144
|
+
/**
|
|
145
|
+
* 边距
|
|
146
|
+
*/
|
|
147
|
+
BORDER = "border-editor",
|
|
148
|
+
/**
|
|
149
|
+
* 边框圆角
|
|
150
|
+
*/
|
|
151
|
+
BORDER_RADIUS = "border-radius-editor",
|
|
152
|
+
/**
|
|
153
|
+
* 文本对齐方式
|
|
154
|
+
*/
|
|
155
|
+
ALIGN = "align-editor",
|
|
156
|
+
/**
|
|
157
|
+
* 字体样式
|
|
158
|
+
*/
|
|
159
|
+
FONT_STYLE = "font-style-editor",
|
|
160
|
+
/**
|
|
161
|
+
* 位置
|
|
162
|
+
*/
|
|
163
|
+
POSITION = "position-editor",
|
|
164
|
+
/**
|
|
165
|
+
* 间距
|
|
166
|
+
*/
|
|
167
|
+
SPACING = "spacing-editor",
|
|
168
|
+
/**
|
|
169
|
+
* 间距
|
|
170
|
+
*/
|
|
171
|
+
MARGIN = "margin-editor"
|
|
144
172
|
}
|
|
@@ -35,6 +35,13 @@ var EditorTypeOld = /* @__PURE__ */ ((EditorTypeOld2) => {
|
|
|
35
35
|
EditorTypeOld2["CHECK_SWITCH"] = "check-switch-editor";
|
|
36
36
|
EditorTypeOld2["ICON_SELECT"] = "icon-select-editor";
|
|
37
37
|
EditorTypeOld2["CHECKBOX"] = "checkbox-editor";
|
|
38
|
+
EditorTypeOld2["BORDER"] = "border-editor";
|
|
39
|
+
EditorTypeOld2["BORDER_RADIUS"] = "border-radius-editor";
|
|
40
|
+
EditorTypeOld2["ALIGN"] = "align-editor";
|
|
41
|
+
EditorTypeOld2["FONT_STYLE"] = "font-style-editor";
|
|
42
|
+
EditorTypeOld2["POSITION"] = "position-editor";
|
|
43
|
+
EditorTypeOld2["SPACING"] = "spacing-editor";
|
|
44
|
+
EditorTypeOld2["MARGIN"] = "margin-editor";
|
|
38
45
|
return EditorTypeOld2;
|
|
39
46
|
})(EditorTypeOld || {});
|
|
40
47
|
|
|
@@ -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
|
@@ -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.17",
|
|
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.17",
|
|
60
|
+
"@gct-paas/cli": "0.0.1-dev.17",
|
|
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": "419dd717051ab05e03f561d8215a5ba6309816c2"
|
|
69
69
|
}
|