@gct-paas/core-web 0.0.1-dev.17 → 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/core-web.css +1 -1
- package/dist/index.min.cjs +11 -11
- package/dist/index.system.min.js +12 -12
- package/es/components/code-editor/code-editor.d.ts +9 -0
- package/es/components/code-editor/code-editor.mjs +9 -2
- package/es/editor/gct-form-color/gct-form-color.mjs +2 -9
- package/es/editor/gct-form-modal-select/gct-form-modal-select.d.ts +45 -0
- package/es/editor/gct-form-modal-select/gct-form-modal-select.mjs +99 -0
- package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.d.ts +13 -0
- package/es/editor/gct-form-modal-select/gct-form-modal-select.provider.mjs +6 -0
- package/es/editor/gct-form-modal-select/gct-form-modal-select.scss +7 -0
- package/es/editor/gct-form-modal-select/index.d.ts +4 -0
- package/es/editor/gct-form-modal-select/index.mjs +12 -0
- package/es/editor/gct-form-number/gct-form-number.d.ts +1 -2
- package/es/editor/gct-form-number/gct-form-number.mjs +5 -7
- package/es/editor/gct-form-number/gct-form-number.scss +3 -0
- package/es/editor/gct-form-text/gct-form-text.mjs +1 -1
- package/es/editor/index.mjs +5 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +1 -1
- package/es/widgets/gct-form/gct-form.mjs +1 -0
- package/package.json +5 -5
|
@@ -9,6 +9,10 @@ export declare const CodeEditor: import('vue').DefineComponent<import('vue').Ext
|
|
|
9
9
|
type: PropType<editor.IStandaloneEditorConstructionOptions>;
|
|
10
10
|
default: () => {};
|
|
11
11
|
};
|
|
12
|
+
language: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
12
16
|
}>, {
|
|
13
17
|
ns: import('@gct-paas/core').Namespace;
|
|
14
18
|
el: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -21,9 +25,14 @@ export declare const CodeEditor: import('vue').DefineComponent<import('vue').Ext
|
|
|
21
25
|
type: PropType<editor.IStandaloneEditorConstructionOptions>;
|
|
22
26
|
default: () => {};
|
|
23
27
|
};
|
|
28
|
+
language: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
24
32
|
}>> & Readonly<{
|
|
25
33
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
26
34
|
}>, {
|
|
27
35
|
value: string;
|
|
28
36
|
config: editor.IStandaloneEditorConstructionOptions;
|
|
37
|
+
language: string;
|
|
29
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -15,6 +15,10 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
config: {
|
|
16
16
|
type: Object,
|
|
17
17
|
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
language: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "typescript"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
24
|
emits: ["update:value"],
|
|
@@ -24,7 +28,7 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
|
|
|
24
28
|
const ns = useNamespace("code-editor");
|
|
25
29
|
const val = computed({
|
|
26
30
|
get() {
|
|
27
|
-
return props.value;
|
|
31
|
+
return props.value || "";
|
|
28
32
|
},
|
|
29
33
|
set(v) {
|
|
30
34
|
emit("update:value", v);
|
|
@@ -37,12 +41,15 @@ const CodeEditor = /* @__PURE__ */ defineComponent({
|
|
|
37
41
|
if (el.value) {
|
|
38
42
|
monacoEditor = m.editor.create(el.value, deepMerge({
|
|
39
43
|
value: val.value,
|
|
40
|
-
language:
|
|
44
|
+
language: props.language,
|
|
41
45
|
automaticLayout: true,
|
|
42
46
|
minimap: {
|
|
43
47
|
enabled: false
|
|
44
48
|
}
|
|
45
49
|
}, props.config));
|
|
50
|
+
monacoEditor.onDidBlurEditorText(() => {
|
|
51
|
+
val.value = monacoEditor.getValue();
|
|
52
|
+
});
|
|
46
53
|
}
|
|
47
54
|
});
|
|
48
55
|
});
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
|
-
import { useNamespace,
|
|
3
|
-
import { ColorPicker as re } from '../../node_modules/.pnpm/vue3-colorpicker@2.3.0_@aesoper_normal-utils@0.1.5_@popperjs_core@2.11.8_@vueuse_core@10.11.1_67dx55qyw5ulzyggoxgyarn5m4/node_modules/vue3-colorpicker/index.es.mjs';
|
|
4
|
-
import 'vue3-colorpicker/style.css';
|
|
2
|
+
import { useNamespace, useGctFormValue } from '@gct-paas/core';
|
|
5
3
|
import './gct-form-color.scss';
|
|
6
4
|
|
|
7
5
|
"use strict";
|
|
8
6
|
const GctFormColor = /* @__PURE__ */ defineComponent({
|
|
9
7
|
name: "GctFormColor",
|
|
10
|
-
components: {
|
|
11
|
-
ColorPicker: re
|
|
12
|
-
},
|
|
13
8
|
inheritAttrs: false,
|
|
14
9
|
props: {
|
|
15
10
|
itemModel: {
|
|
@@ -25,13 +20,11 @@ const GctFormColor = /* @__PURE__ */ defineComponent({
|
|
|
25
20
|
}
|
|
26
21
|
},
|
|
27
22
|
emits: ["update:value"],
|
|
28
|
-
setup(
|
|
23
|
+
setup() {
|
|
29
24
|
const ns = useNamespace("form-color");
|
|
30
|
-
const c = new ColorEditorController(props.model);
|
|
31
25
|
const val = useGctFormValue();
|
|
32
26
|
return {
|
|
33
27
|
ns,
|
|
34
|
-
c,
|
|
35
28
|
val
|
|
36
29
|
};
|
|
37
30
|
},
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormItemController, ISelectEditor } from '@gct-paas/core';
|
|
3
|
+
export declare const GctFormModalSelect: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
c: {
|
|
5
|
+
type: PropType<IFormItemController>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
model: {
|
|
9
|
+
type: PropType<ISelectEditor>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
value: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
ns: import('@gct-paas/core').Namespace;
|
|
18
|
+
val: import('vue').WritableComputedRef<any, any>;
|
|
19
|
+
options: import('vue').ComputedRef<{
|
|
20
|
+
label: string;
|
|
21
|
+
options: {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
}[]>;
|
|
26
|
+
modelCategory: import('vue').Ref<string, string>;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
|
+
c: {
|
|
29
|
+
type: PropType<IFormItemController>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
model: {
|
|
33
|
+
type: PropType<ISelectEditor>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
value: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
}>> & Readonly<{
|
|
41
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
value: string;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
export default GctFormModalSelect;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent, mergeProps, ref, computed } from 'vue';
|
|
2
|
+
import { useNamespace, useGctFormValue } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-modal-select.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const GctFormModalSelect = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "GctFormModalSelect",
|
|
8
|
+
props: {
|
|
9
|
+
c: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
model: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
value: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:value"],
|
|
23
|
+
setup() {
|
|
24
|
+
const ns = useNamespace("gct-form-modal-select");
|
|
25
|
+
const modelCategory = ref("1");
|
|
26
|
+
const val = useGctFormValue();
|
|
27
|
+
const selectValue = computed({
|
|
28
|
+
get() {
|
|
29
|
+
return val.value || void 0;
|
|
30
|
+
},
|
|
31
|
+
set(v) {
|
|
32
|
+
val.value = v;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const options = computed(() => {
|
|
36
|
+
return [{
|
|
37
|
+
label: "\u9ED8\u8BA4",
|
|
38
|
+
options: [{
|
|
39
|
+
value: "1",
|
|
40
|
+
label: "\u6A21\u578B\u4E00"
|
|
41
|
+
}, {
|
|
42
|
+
value: "2",
|
|
43
|
+
label: "\u6A21\u578B\u4E8C"
|
|
44
|
+
}]
|
|
45
|
+
}, {
|
|
46
|
+
label: "\u4EA7\u54C1\u5EFA\u6A21",
|
|
47
|
+
options: [{
|
|
48
|
+
value: "3",
|
|
49
|
+
label: "\u4EA7\u54C1\u4FE1\u606F"
|
|
50
|
+
}, {
|
|
51
|
+
value: "4",
|
|
52
|
+
label: "\u4EA7\u54C1\u7C7B\u578B"
|
|
53
|
+
}]
|
|
54
|
+
}];
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
ns,
|
|
58
|
+
val: selectValue,
|
|
59
|
+
options,
|
|
60
|
+
modelCategory
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
render() {
|
|
64
|
+
return createVNode(resolveComponent("a-input-group"), {
|
|
65
|
+
"class": this.ns.b()
|
|
66
|
+
}, {
|
|
67
|
+
default: () => [createVNode(resolveComponent("a-form-item-rest"), null, {
|
|
68
|
+
default: () => [createVNode(resolveComponent("a-select"), mergeProps({
|
|
69
|
+
"value": this.modelCategory,
|
|
70
|
+
"onUpdate:value": ($event) => this.modelCategory = $event
|
|
71
|
+
}, this.model.props || {}, {
|
|
72
|
+
"placeholder": "\u8BF7\u9009\u62E9",
|
|
73
|
+
"options": [{
|
|
74
|
+
value: "1",
|
|
75
|
+
label: "\u5B9E\u4F53"
|
|
76
|
+
}, {
|
|
77
|
+
value: "2",
|
|
78
|
+
label: "\u89C6\u56FE"
|
|
79
|
+
}, {
|
|
80
|
+
value: "3",
|
|
81
|
+
label: "\u6570\u636E"
|
|
82
|
+
}],
|
|
83
|
+
"disabled": this.c.state.disabled
|
|
84
|
+
}), null)]
|
|
85
|
+
}), createVNode(resolveComponent("a-select"), mergeProps({
|
|
86
|
+
"class": this.ns.e("select"),
|
|
87
|
+
"value": this.val,
|
|
88
|
+
"onUpdate:value": ($event) => this.val = $event
|
|
89
|
+
}, this.model.props || {}, {
|
|
90
|
+
"placeholder": "\u8BF7\u9009\u62E9",
|
|
91
|
+
"options": this.options,
|
|
92
|
+
"allowClear": true,
|
|
93
|
+
"disabled": this.c.state.disabled
|
|
94
|
+
}), null)]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export { GctFormModalSelect, GctFormModalSelect as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IEditorProvider } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 纯预览编辑器
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-03-27 10:03:03
|
|
7
|
+
* @export
|
|
8
|
+
* @class FormSelectProvider
|
|
9
|
+
* @implements {IEditorProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class GctFormModalSelectProvider implements IEditorProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { widthEditorInstall, EditorTypeOld } from '@gct-paas/core';
|
|
2
|
+
import { GctFormModalSelectProvider } from './gct-form-modal-select.provider.mjs';
|
|
3
|
+
import { GctFormModalSelect as GctFormModalSelect$1 } from './gct-form-modal-select.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var GctFormModalSelect = widthEditorInstall(
|
|
7
|
+
EditorTypeOld.MODEL_SELECT,
|
|
8
|
+
() => new GctFormModalSelectProvider(),
|
|
9
|
+
GctFormModalSelect$1
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export { GctFormModalSelect as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { INumberEditor
|
|
2
|
+
import { INumberEditor } from '@gct-paas/core';
|
|
3
3
|
export declare const GctFormNumber: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
4
|
model: {
|
|
5
5
|
type: PropType<INumberEditor>;
|
|
@@ -11,7 +11,6 @@ export declare const GctFormNumber: import('vue').DefineComponent<import('vue').
|
|
|
11
11
|
};
|
|
12
12
|
}>, {
|
|
13
13
|
ns: import('@gct-paas/core').Namespace;
|
|
14
|
-
c: EditorController<INumberEditor>;
|
|
15
14
|
val: import('vue').WritableComputedRef<any, any>;
|
|
16
15
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
16
|
model: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
|
-
import { useNamespace,
|
|
2
|
+
import { useNamespace, useGctFormValue } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-number.scss';
|
|
3
4
|
|
|
4
5
|
"use strict";
|
|
5
6
|
const GctFormNumber = /* @__PURE__ */ defineComponent({
|
|
@@ -15,21 +16,18 @@ const GctFormNumber = /* @__PURE__ */ defineComponent({
|
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
18
|
emits: ["update:value"],
|
|
18
|
-
setup(
|
|
19
|
+
setup() {
|
|
19
20
|
const ns = useNamespace("gct-form-number");
|
|
20
|
-
const c = new EditorController(props.model);
|
|
21
21
|
const val = useGctFormValue();
|
|
22
22
|
return {
|
|
23
23
|
ns,
|
|
24
|
-
c,
|
|
25
24
|
val
|
|
26
25
|
};
|
|
27
26
|
},
|
|
28
27
|
render() {
|
|
29
28
|
return createVNode(resolveComponent("a-input-number"), mergeProps({
|
|
30
29
|
"value": this.val,
|
|
31
|
-
"onUpdate:value": ($event) => this.val = $event
|
|
32
|
-
}, this.model.props || {}, {
|
|
30
|
+
"onUpdate:value": ($event) => this.val = $event,
|
|
33
31
|
"class": this.ns.b(),
|
|
34
32
|
"prefix": this.model.prefix,
|
|
35
33
|
"suffix": this.model.suffix,
|
|
@@ -39,7 +37,7 @@ const GctFormNumber = /* @__PURE__ */ defineComponent({
|
|
|
39
37
|
"max": this.model.max,
|
|
40
38
|
"min": this.model.min,
|
|
41
39
|
"precision": this.model.precision
|
|
42
|
-
}), null);
|
|
40
|
+
}, this.model.props || {}), null);
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
43
|
|
|
@@ -26,7 +26,7 @@ const GctFormText = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
render() {
|
|
29
|
-
return createVNode(resolveComponent("a-
|
|
29
|
+
return createVNode(resolveComponent("a-select"), mergeProps({
|
|
30
30
|
"value": this.val,
|
|
31
31
|
"onUpdate:value": ($event) => this.val = $event
|
|
32
32
|
}, this.model.props || {}, {
|
package/es/editor/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import GctFormIconSelect from './gct-form-icon-select/index.mjs';
|
|
|
6
6
|
import GctFormNumber, { oldNumberCom } from './gct-form-number/index.mjs';
|
|
7
7
|
import GctFormPicker from './gct-form-picker/index.mjs';
|
|
8
8
|
import GctFormSelect from './gct-form-select/index.mjs';
|
|
9
|
+
import GctFormModalSelect from './gct-form-modal-select/index.mjs';
|
|
9
10
|
import GctFormSpan from './gct-form-span/index.mjs';
|
|
10
11
|
import GctFormSwitch, { oldSwitchCom } from './gct-form-switch/index.mjs';
|
|
11
12
|
import GctFormText, { oldTextCom } from './gct-form-text/index.mjs';
|
|
@@ -13,6 +14,8 @@ import GctFormTextarea from './gct-form-textarea/index.mjs';
|
|
|
13
14
|
import GctFormRadio, { oldRadioCom } from './gct-form-radio/index.mjs';
|
|
14
15
|
import GctFormInfo from './gct-form-info/index.mjs';
|
|
15
16
|
import GctFormCheckbox, { oldCheckboxCom } from './gct-form-checkbox/index.mjs';
|
|
17
|
+
import { ColorPicker as re } from '../node_modules/.pnpm/vue3-colorpicker@2.3.0_@aesoper_normal-utils@0.1.5_@popperjs_core@2.11.8_@vueuse_core@10.11.1_67dx55qyw5ulzyggoxgyarn5m4/node_modules/vue3-colorpicker/index.es.mjs';
|
|
18
|
+
import 'vue3-colorpicker/style.css';
|
|
16
19
|
|
|
17
20
|
"use strict";
|
|
18
21
|
var Editor = {
|
|
@@ -25,6 +28,7 @@ var Editor = {
|
|
|
25
28
|
app.use(GctFormNumber);
|
|
26
29
|
app.use(GctFormPicker);
|
|
27
30
|
app.use(GctFormSelect);
|
|
31
|
+
app.use(GctFormModalSelect);
|
|
28
32
|
app.use(GctFormSpan);
|
|
29
33
|
app.use(GctFormSwitch);
|
|
30
34
|
app.use(GctFormText);
|
|
@@ -38,6 +42,7 @@ var Editor = {
|
|
|
38
42
|
app.use(oldSwitchCom);
|
|
39
43
|
app.use(oldTextCom);
|
|
40
44
|
app.use(oldNumberCom);
|
|
45
|
+
app.component("ColorPicker", re);
|
|
41
46
|
}
|
|
42
47
|
};
|
|
43
48
|
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -47,6 +47,7 @@ const GctForm = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
return h(typeof provider.component === "string" ? resolveComponent(provider.component) : provider.component, {
|
|
48
48
|
key: item.name,
|
|
49
49
|
model: item,
|
|
50
|
+
formModel: props.model,
|
|
50
51
|
c: c.item[item.name],
|
|
51
52
|
data: c.state.data,
|
|
52
53
|
class: item.class,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/core-web",
|
|
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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"gen-api:platform": "gct-paas gen-api --url=http://paas.paasdev.gct-paas.com --tag=platform -t ../cli/hbs-temp -o ./src/service/gct-platform && prettier './src/service/gct-platform' --write"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@gct-paas/core": "0.0.1-dev.
|
|
47
|
+
"@gct-paas/core": "0.0.1-dev.18",
|
|
48
48
|
"@monaco-editor/loader": "^1.5.0",
|
|
49
49
|
"ant-design-vue": "3.2.20",
|
|
50
50
|
"lodash-es": "^4.17.21",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"vue3-colorpicker": "^2.3.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@gct-paas/build": "0.0.1-dev.
|
|
57
|
-
"@gct-paas/scss": "0.0.1-dev.
|
|
56
|
+
"@gct-paas/build": "0.0.1-dev.18",
|
|
57
|
+
"@gct-paas/scss": "0.0.1-dev.18",
|
|
58
58
|
"sass": "^1.85.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"vue": "^3.x"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "0a61c5593beffb2a893dffde18fc6759983b72cb"
|
|
64
64
|
}
|