@gct-paas/core-web 0.0.1-dev.14 → 0.0.1-dev.16
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 -0
- package/dist/index.min.cjs +3 -3
- package/dist/index.system.min.js +3 -3
- package/es/components/code-editor/code-editor.d.ts +28 -2
- package/es/components/code-editor/code-editor.mjs +39 -8
- package/es/components/code-editor/code-editor.scss +1 -1
- package/es/components/index.d.ts +4 -0
- package/es/components/index.mjs +4 -0
- package/es/components/layout/flex-container/flex-container.d.ts +15 -0
- package/es/components/layout/flex-container/flex-container.mjs +90 -0
- package/es/components/layout/flex-container/flex-container.scss +3 -0
- package/es/components/layout/flex-item/flex-item.d.ts +14 -0
- package/es/components/layout/flex-item/flex-item.mjs +53 -0
- package/es/components/layout/flex-item/flex-item.scss +17 -0
- package/es/components/layout/grid-container/grid-container.d.ts +13 -0
- package/es/components/layout/grid-container/grid-container.mjs +47 -0
- package/es/components/layout/view-container/view-container.d.ts +25 -0
- package/es/components/layout/view-container/view-container.mjs +39 -0
- package/es/components/layout/view-container/view-container.scss +19 -0
- package/es/editor/gct-form-check-switch/gct-form-check-switch.d.ts +40 -0
- package/es/editor/gct-form-check-switch/gct-form-check-switch.mjs +53 -0
- package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.d.ts +13 -0
- package/es/editor/gct-form-check-switch/gct-form-check-switch.provider.mjs +6 -0
- package/es/editor/gct-form-check-switch/gct-form-check-switch.scss +10 -0
- package/es/editor/gct-form-check-switch/index.d.ts +4 -0
- package/es/editor/gct-form-check-switch/index.mjs +12 -0
- package/es/editor/gct-form-checkbox/gct-form-checkbox.d.ts +41 -0
- package/es/editor/gct-form-checkbox/gct-form-checkbox.mjs +70 -0
- package/es/editor/gct-form-checkbox/gct-form-checkbox.scss +56 -0
- package/es/editor/gct-form-checkbox/index.d.ts +11 -0
- package/es/editor/gct-form-checkbox/index.mjs +19 -0
- package/es/editor/gct-form-color/gct-form-color.d.ts +37 -0
- package/es/editor/gct-form-color/gct-form-color.mjs +43 -0
- package/es/editor/gct-form-color/gct-form-color.provider.d.ts +13 -0
- package/es/editor/gct-form-color/gct-form-color.provider.mjs +6 -0
- package/es/editor/gct-form-color/gct-form-color.scss +3 -0
- package/es/editor/gct-form-color/index.d.ts +4 -0
- package/es/editor/gct-form-color/index.mjs +12 -0
- package/es/editor/gct-form-i18n/gct-form-i18n.d.ts +38 -0
- package/es/editor/gct-form-i18n/gct-form-i18n.mjs +62 -0
- package/es/editor/gct-form-i18n/gct-form-i18n.provider.d.ts +13 -0
- package/es/editor/gct-form-i18n/gct-form-i18n.provider.mjs +6 -0
- package/es/editor/gct-form-i18n/index.d.ts +4 -0
- package/es/editor/gct-form-i18n/index.mjs +12 -0
- package/es/editor/gct-form-icon-select/gct-form-icon-select.d.ts +29 -0
- package/es/editor/gct-form-icon-select/gct-form-icon-select.mjs +74 -0
- package/es/editor/gct-form-icon-select/gct-form-icon-select.scss +14 -0
- package/es/editor/gct-form-icon-select/index.d.ts +8 -0
- package/es/editor/gct-form-icon-select/index.mjs +14 -0
- package/es/editor/gct-form-info/gct-form-info.d.ts +28 -0
- package/es/editor/gct-form-info/gct-form-info.mjs +40 -0
- package/es/editor/gct-form-info/gct-form-info.scss +8 -0
- package/es/editor/gct-form-info/index.d.ts +8 -0
- package/es/editor/gct-form-info/index.mjs +14 -0
- package/es/editor/gct-form-length-unit/gct-form-length-unit.d.ts +39 -0
- package/es/editor/gct-form-length-unit/gct-form-length-unit.mjs +43 -0
- package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.d.ts +13 -0
- package/es/editor/gct-form-length-unit/gct-form-length-unit.provider.mjs +6 -0
- package/es/editor/gct-form-length-unit/index.d.ts +4 -0
- package/es/editor/gct-form-length-unit/index.mjs +12 -0
- package/es/editor/gct-form-number/gct-form-number.d.ts +29 -0
- package/es/editor/gct-form-number/gct-form-number.mjs +46 -0
- package/es/editor/gct-form-number/gct-form-number.provider.d.ts +4 -0
- package/es/editor/gct-form-number/gct-form-number.provider.mjs +6 -0
- package/es/editor/gct-form-number/index.d.ts +4 -0
- package/es/editor/gct-form-number/index.mjs +12 -0
- package/es/editor/gct-form-picker/gct-form-picker.d.ts +39 -0
- package/es/editor/gct-form-picker/gct-form-picker.mjs +92 -0
- package/es/editor/gct-form-picker/gct-form-picker.provider.d.ts +13 -0
- package/es/editor/gct-form-picker/gct-form-picker.provider.mjs +6 -0
- package/es/editor/gct-form-picker/index.d.ts +4 -0
- package/es/editor/gct-form-picker/index.mjs +12 -0
- package/es/editor/gct-form-radio/gct-form-radio.d.ts +37 -0
- package/es/editor/gct-form-radio/gct-form-radio.mjs +70 -0
- package/es/editor/gct-form-radio/gct-form-radio.scss +68 -0
- package/es/editor/gct-form-radio/index.d.ts +11 -0
- package/es/editor/gct-form-radio/index.mjs +19 -0
- package/es/editor/gct-form-select/gct-form-select.d.ts +38 -0
- package/es/editor/gct-form-select/gct-form-select.mjs +50 -0
- package/es/editor/gct-form-select/gct-form-select.provider.d.ts +13 -0
- package/es/editor/gct-form-select/gct-form-select.provider.mjs +6 -0
- package/es/editor/gct-form-select/index.d.ts +4 -0
- package/es/editor/gct-form-select/index.mjs +12 -0
- package/es/editor/gct-form-span/gct-form-span.d.ts +43 -0
- package/es/editor/gct-form-span/gct-form-span.mjs +89 -0
- package/es/editor/gct-form-span/gct-form-span.provider.d.ts +13 -0
- package/es/editor/gct-form-span/gct-form-span.provider.mjs +6 -0
- package/es/editor/gct-form-span/gct-form-span.scss +10 -0
- package/es/editor/gct-form-span/index.d.ts +4 -0
- package/es/editor/gct-form-span/index.mjs +12 -0
- package/es/editor/gct-form-switch/gct-form-switch.d.ts +26 -0
- package/es/editor/gct-form-switch/gct-form-switch.mjs +35 -0
- package/es/editor/gct-form-switch/gct-form-switch.provider.d.ts +13 -0
- package/es/editor/gct-form-switch/gct-form-switch.provider.mjs +6 -0
- package/es/editor/gct-form-switch/index.d.ts +7 -0
- package/es/editor/gct-form-switch/index.mjs +17 -0
- package/es/editor/gct-form-text/gct-form-text.d.ts +32 -0
- package/es/editor/gct-form-text/gct-form-text.mjs +45 -0
- package/es/editor/gct-form-text/gct-form-text.provider.d.ts +13 -0
- package/es/editor/gct-form-text/gct-form-text.provider.mjs +6 -0
- package/es/editor/gct-form-text/index.d.ts +7 -0
- package/es/editor/gct-form-text/index.mjs +17 -0
- package/es/editor/gct-form-textarea/gct-form-textarea.d.ts +28 -0
- package/es/editor/gct-form-textarea/gct-form-textarea.mjs +40 -0
- package/es/editor/gct-form-textarea/gct-form-textarea.provider.d.ts +4 -0
- package/es/editor/gct-form-textarea/gct-form-textarea.provider.mjs +6 -0
- package/es/editor/gct-form-textarea/index.d.ts +4 -0
- package/es/editor/gct-form-textarea/index.mjs +12 -0
- package/es/editor/index.d.ts +5 -0
- package/es/editor/index.mjs +42 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +15 -1
- package/es/types/index.d.ts +1 -0
- package/es/widgets/gct-edit-form/gct-edit-form.d.ts +62 -0
- package/es/widgets/gct-edit-form/gct-edit-form.mjs +126 -0
- package/es/widgets/gct-edit-form/index.d.ts +5 -0
- package/es/widgets/gct-edit-form/index.mjs +10 -0
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.d.ts +31 -0
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.mjs +73 -0
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-collapse/gct-form-collapse.scss +62 -0
- package/es/widgets/gct-form/gct-form-collapse/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-collapse/index.mjs +15 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.d.ts +29 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.mjs +71 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.provider.mjs +13 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/gct-form-collapse-pane.scss +23 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-collapse-pane/index.mjs +15 -0
- package/es/widgets/gct-form/gct-form-group/gct-form-group.d.ts +30 -0
- package/es/widgets/gct-form/gct-form-group/gct-form-group.mjs +88 -0
- package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-group/gct-form-group.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-group/gct-form-group.scss +28 -0
- package/es/widgets/gct-form/gct-form-group/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-group/index.mjs +15 -0
- package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-hidden-item/gct-form-hidden-item.provider.mjs +13 -0
- package/es/widgets/gct-form/gct-form-item/gct-form-item.d.ts +35 -0
- package/es/widgets/gct-form/gct-form-item/gct-form-item.mjs +141 -0
- package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-item/gct-form-item.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-item/gct-form-item.scss +115 -0
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.d.ts +28 -0
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.mjs +53 -0
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-tab/gct-form-tab.scss +63 -0
- package/es/widgets/gct-form/gct-form-tab/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-tab/index.mjs +12 -0
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.d.ts +29 -0
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.mjs +65 -0
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-tab-pane/gct-form-tab-pane.scss +16 -0
- package/es/widgets/gct-form/gct-form-tab-pane/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-tab-pane/index.mjs +15 -0
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.d.ts +30 -0
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.mjs +71 -0
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.provider.mjs +11 -0
- package/es/widgets/gct-form/gct-form-title-group/gct-form-title-group.scss +25 -0
- package/es/widgets/gct-form/gct-form-title-group/index.d.ts +5 -0
- package/es/widgets/gct-form/gct-form-title-group/index.mjs +16 -0
- package/es/widgets/gct-form/gct-form.d.ts +31 -0
- package/es/widgets/gct-form/gct-form.mjs +109 -0
- package/es/widgets/gct-form/gct-form.scss +11 -0
- package/es/widgets/gct-form/index.d.ts +5 -0
- package/es/widgets/gct-form/index.mjs +31 -0
- package/package.json +7 -5
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const FlexItem = /* @__PURE__ */ defineComponent({
|
|
6
|
+
name: "FlexItem",
|
|
7
|
+
props: {
|
|
8
|
+
layout: Object
|
|
9
|
+
},
|
|
10
|
+
setup(props) {
|
|
11
|
+
const ns = useNamespace("flex-item");
|
|
12
|
+
const getStyle = () => {
|
|
13
|
+
const style = {};
|
|
14
|
+
if (props.layout) {
|
|
15
|
+
const {
|
|
16
|
+
order,
|
|
17
|
+
alignSelf,
|
|
18
|
+
flexBasis,
|
|
19
|
+
flexGrow,
|
|
20
|
+
flexShrink
|
|
21
|
+
} = props.layout;
|
|
22
|
+
if (order != null) {
|
|
23
|
+
style["order"] = order;
|
|
24
|
+
}
|
|
25
|
+
if (alignSelf != null) {
|
|
26
|
+
style["align-self"] = alignSelf;
|
|
27
|
+
}
|
|
28
|
+
if (flexBasis != null) {
|
|
29
|
+
style["flex-basis"] = flexBasis;
|
|
30
|
+
}
|
|
31
|
+
if (flexGrow != null) {
|
|
32
|
+
style["flex-grow"] = flexGrow;
|
|
33
|
+
}
|
|
34
|
+
if (flexShrink != null) {
|
|
35
|
+
style["flex-shrink"] = flexShrink;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return style;
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
ns,
|
|
42
|
+
getStyle
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
render() {
|
|
46
|
+
return createVNode("div", {
|
|
47
|
+
"class": this.ns.b(),
|
|
48
|
+
"style": this.getStyle()
|
|
49
|
+
}, [this.$slots.default?.()]);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export { FlexItem, FlexItem as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// $flex-item: (
|
|
2
|
+
// 'order': 0,
|
|
3
|
+
// 'flex-grow': 0,
|
|
4
|
+
// 'flex-shrink': 1,
|
|
5
|
+
// 'flex-basis': 'auto',
|
|
6
|
+
// 'align-self': 'auto'
|
|
7
|
+
// );
|
|
8
|
+
|
|
9
|
+
// @include b(flex-item) {
|
|
10
|
+
// @include set-component-css-var('flex-item', $flex-item);
|
|
11
|
+
|
|
12
|
+
// order: #{getCssVar(flex-item, order)};
|
|
13
|
+
// flex-grow: #{getCssVar(flex-item, flex-grow)};
|
|
14
|
+
// flex-shrink: #{getCssVar(flex-item, flex-shrink)};
|
|
15
|
+
// flex-basis: #{getCssVar(flex-item, flex-basis)};
|
|
16
|
+
// align-self: #{getCssVar(flex-item, align-self)};
|
|
17
|
+
// }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IGridContainer } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 栅格布局
|
|
5
|
+
*/
|
|
6
|
+
export declare const GridContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
layout: PropType<IGridContainer>;
|
|
8
|
+
}>, {
|
|
9
|
+
ns: import('@gct-paas/core').Namespace;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
11
|
+
layout: PropType<IGridContainer>;
|
|
12
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
export default GridContainer;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
function _isSlot(s) {
|
|
6
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
7
|
+
}
|
|
8
|
+
const GridContainer = /* @__PURE__ */ defineComponent({
|
|
9
|
+
name: "GridContainer",
|
|
10
|
+
props: {
|
|
11
|
+
layout: Object
|
|
12
|
+
},
|
|
13
|
+
setup() {
|
|
14
|
+
const ns = useNamespace("grid-container");
|
|
15
|
+
return {
|
|
16
|
+
ns
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
render() {
|
|
20
|
+
let _slot;
|
|
21
|
+
const l = this.layout || {};
|
|
22
|
+
let items = this.$slots.default?.() || [];
|
|
23
|
+
if (items.length > 0) {
|
|
24
|
+
items = items[0].children || [];
|
|
25
|
+
}
|
|
26
|
+
return createVNode(resolveComponent("a-row"), {
|
|
27
|
+
"class": this.ns.b(),
|
|
28
|
+
"wrap": true,
|
|
29
|
+
"gutter": l.gutter
|
|
30
|
+
}, _isSlot(_slot = items.map((item) => {
|
|
31
|
+
if (!item) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const model = item.props.model.gridItem;
|
|
35
|
+
return createVNode(resolveComponent("a-col"), {
|
|
36
|
+
"span": model ? model.span ?? 24 : 24,
|
|
37
|
+
"offset": model ? model.offset ?? 0 : 0
|
|
38
|
+
}, _isSlot(item) ? item : {
|
|
39
|
+
default: () => [item]
|
|
40
|
+
});
|
|
41
|
+
})) ? _slot : {
|
|
42
|
+
default: () => [_slot]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { GridContainer, GridContainer as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const ViewContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
context: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
};
|
|
5
|
+
params: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
};
|
|
8
|
+
modal: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {
|
|
13
|
+
ns: import('@gct-paas/core').Namespace;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
context: {
|
|
16
|
+
type: ObjectConstructor;
|
|
17
|
+
};
|
|
18
|
+
params: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
};
|
|
21
|
+
modal: {
|
|
22
|
+
type: ObjectConstructor;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
import './view-container.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const ViewContainer = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "ViewContainer",
|
|
8
|
+
props: {
|
|
9
|
+
context: {
|
|
10
|
+
type: Object
|
|
11
|
+
},
|
|
12
|
+
params: {
|
|
13
|
+
type: Object
|
|
14
|
+
},
|
|
15
|
+
modal: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup() {
|
|
21
|
+
const ns = useNamespace("view-container");
|
|
22
|
+
return {
|
|
23
|
+
ns
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
render() {
|
|
27
|
+
return createVNode("div", {
|
|
28
|
+
"class": this.ns.b()
|
|
29
|
+
}, [this.$slots.header ? createVNode("div", {
|
|
30
|
+
"class": this.ns.b("header")
|
|
31
|
+
}, [this.$slots.header()]) : null, createVNode("div", {
|
|
32
|
+
"class": this.ns.b("content")
|
|
33
|
+
}, [this.$slots.default?.()]), this.$slots.footer ? createVNode("div", {
|
|
34
|
+
"class": this.ns.b("footer")
|
|
35
|
+
}, [this.$slots.footer()]) : null]);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { ViewContainer };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@include b(view-container) {
|
|
2
|
+
background-color: white;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@include b(view-container-header) {
|
|
9
|
+
flex-shrink: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@include b(view-container-content) {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
overflow: hidden auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@include b(view-container-footer) {
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormItem, ICheckSwitchEditor, EditorController } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 文本编辑器
|
|
5
|
+
*/
|
|
6
|
+
export declare const GctFormCheckSwitch: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
itemModel: {
|
|
8
|
+
type: PropType<IFormItem>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
model: {
|
|
12
|
+
type: PropType<ICheckSwitchEditor>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
value: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
}>, {
|
|
20
|
+
ns: import('@gct-paas/core').Namespace;
|
|
21
|
+
c: EditorController<ICheckSwitchEditor>;
|
|
22
|
+
val: import('vue').WritableComputedRef<any, any>;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
24
|
+
itemModel: {
|
|
25
|
+
type: PropType<IFormItem>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
model: {
|
|
29
|
+
type: PropType<ICheckSwitchEditor>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
value: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{
|
|
37
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
value: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
|
+
import { useNamespace, EditorController, useGctFormValue } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-check-switch.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const GctFormCheckSwitch = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "GctFormCheckSwitch",
|
|
8
|
+
props: {
|
|
9
|
+
itemModel: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
model: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
value: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:value"],
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("gct-form-check-switch");
|
|
25
|
+
const c = new EditorController(props.model);
|
|
26
|
+
const val = useGctFormValue();
|
|
27
|
+
return {
|
|
28
|
+
ns,
|
|
29
|
+
c,
|
|
30
|
+
val
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
render() {
|
|
34
|
+
if (this.model.isSwitch) {
|
|
35
|
+
return createVNode("div", {
|
|
36
|
+
"class": [this.ns.b(), this.ns.m("switch"), this.ns.is("readonly", this.model.readonly)]
|
|
37
|
+
}, [createVNode(resolveComponent("a-switch"), mergeProps({
|
|
38
|
+
"checked": this.val,
|
|
39
|
+
"onUpdate:checked": ($event) => this.val = $event
|
|
40
|
+
}, this.model.props || {}), null)]);
|
|
41
|
+
}
|
|
42
|
+
return createVNode(resolveComponent("a-checkbox"), mergeProps({
|
|
43
|
+
"checked": this.val,
|
|
44
|
+
"onUpdate:checked": ($event) => this.val = $event
|
|
45
|
+
}, this.model.props || {}, {
|
|
46
|
+
"class": [this.ns.b(), this.ns.m("checkbox"), this.ns.is("readonly", this.model.readonly)]
|
|
47
|
+
}), {
|
|
48
|
+
default: () => [this.model.label]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export { GctFormCheckSwitch };
|
|
@@ -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 GctFormCheckSwitchProvider
|
|
9
|
+
* @implements {IEditorProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class GctFormCheckSwitchProvider implements IEditorProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { widthEditorInstall, EditorType } from '@gct-paas/core';
|
|
2
|
+
import { GctFormCheckSwitchProvider } from './gct-form-check-switch.provider.mjs';
|
|
3
|
+
import { GctFormCheckSwitch as GctFormCheckSwitch$1 } from './gct-form-check-switch.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var GctFormCheckSwitch = widthEditorInstall(
|
|
7
|
+
EditorType.CHECK_SWITCH,
|
|
8
|
+
() => new GctFormCheckSwitchProvider(),
|
|
9
|
+
GctFormCheckSwitch$1
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export { GctFormCheckSwitch as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormItemController, ICheckboxEditor, IDictionaryItem } from '@gct-paas/core';
|
|
3
|
+
export declare const GctFormCheckbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
c: {
|
|
5
|
+
type: PropType<IFormItemController>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
model: {
|
|
9
|
+
type: PropType<ICheckboxEditor>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
value: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
ns: import('@gct-paas/core').Namespace;
|
|
18
|
+
checked: import('vue').ComputedRef<any>;
|
|
19
|
+
onChange: (checkVal: any) => void;
|
|
20
|
+
options: import('vue').ComputedRef<(IDictionaryItem & {
|
|
21
|
+
checked?: boolean;
|
|
22
|
+
})[]>;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
24
|
+
c: {
|
|
25
|
+
type: PropType<IFormItemController>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
model: {
|
|
29
|
+
type: PropType<ICheckboxEditor>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
value: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{
|
|
37
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
value: string;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
41
|
+
export default GctFormCheckbox;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent, createVNode, mergeProps, computed } from 'vue';
|
|
2
|
+
import { useNamespace, useGctFormValue } from '@gct-paas/core';
|
|
3
|
+
import { CheckboxGroup } from 'ant-design-vue';
|
|
4
|
+
import { cloneDeep } from 'lodash-es';
|
|
5
|
+
import './gct-form-checkbox.scss';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const GctFormCheckbox = /* @__PURE__ */ defineComponent({
|
|
9
|
+
name: "GctFormCheckbox",
|
|
10
|
+
props: {
|
|
11
|
+
c: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
model: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
value: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:value"],
|
|
25
|
+
setup(props, {
|
|
26
|
+
emit
|
|
27
|
+
}) {
|
|
28
|
+
const ns = useNamespace("gct-form-checkbox");
|
|
29
|
+
const val = useGctFormValue();
|
|
30
|
+
const checked = computed(() => {
|
|
31
|
+
return val.value;
|
|
32
|
+
});
|
|
33
|
+
const options = computed(() => {
|
|
34
|
+
return cloneDeep(props.c.state.options);
|
|
35
|
+
});
|
|
36
|
+
const onChange = (checkVal) => {
|
|
37
|
+
options.value.forEach((e) => {
|
|
38
|
+
if (props.model.minLength && checkVal.length <= props.model.minLength && checkVal.includes(e.value)) {
|
|
39
|
+
e.disabled = true;
|
|
40
|
+
} else {
|
|
41
|
+
e.disabled = false;
|
|
42
|
+
}
|
|
43
|
+
e.checked = checkVal.includes(e.value);
|
|
44
|
+
});
|
|
45
|
+
emit("update:value", checkVal);
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
ns,
|
|
49
|
+
checked,
|
|
50
|
+
onChange,
|
|
51
|
+
options
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
render() {
|
|
55
|
+
const attrs = {
|
|
56
|
+
...this.model.props || {},
|
|
57
|
+
class: [this.ns.b(), this.ns.m("checkbox"), this.model.layout === "column" && "isColumn"],
|
|
58
|
+
disabled: this.c.state.disabled
|
|
59
|
+
};
|
|
60
|
+
return createVNode(CheckboxGroup, mergeProps({
|
|
61
|
+
"value": this.checked,
|
|
62
|
+
"onUpdate:value": ($event) => this.checked = $event,
|
|
63
|
+
"options": this.options
|
|
64
|
+
}, attrs, {
|
|
65
|
+
"onChange": this.onChange
|
|
66
|
+
}), null);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export { GctFormCheckbox, GctFormCheckbox as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@include b(gct-form-checkbox) {
|
|
2
|
+
@include m(checkbox){
|
|
3
|
+
&.ant-checkbox-group {
|
|
4
|
+
height: 32px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{bem(gct-form-checkbox)}.ant-checkbox-group{
|
|
12
|
+
width: 100%;
|
|
13
|
+
padding: 2px;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
display: flex;
|
|
16
|
+
gap: 4px 8px;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
height: auto;
|
|
19
|
+
|
|
20
|
+
.ant-checkbox+span {
|
|
21
|
+
padding-left: 4px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ant-checkbox-group-item {
|
|
25
|
+
margin-right: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ant-checkbox-wrapper {
|
|
31
|
+
display: flex;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.isColumn {
|
|
35
|
+
flex-flow: column wrap;
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.drag-wrap {
|
|
40
|
+
width: 100%;
|
|
41
|
+
|
|
42
|
+
.drag-checkbox-item {
|
|
43
|
+
padding: 6px 4px;
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
background-color: #F2F4F7;
|
|
46
|
+
|
|
47
|
+
.icon-drag {
|
|
48
|
+
line-height: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& + .drag-checkbox-item {
|
|
52
|
+
margin-top: 4px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IEditorProvider } from '@gct-paas/core';
|
|
2
|
+
export declare class Provider implements IEditorProvider {
|
|
3
|
+
component: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: {
|
|
6
|
+
install(app: import('vue').App): void;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const oldCheckboxCom: {
|
|
10
|
+
install(app: import('vue').App): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { widthEditorInstall, EditorType, EditorTypeOld } from '@gct-paas/core';
|
|
2
|
+
import { GctFormCheckbox as GctFormCheckbox$1 } from './gct-form-checkbox.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
class Provider {
|
|
6
|
+
component = "gct-form-checkbox";
|
|
7
|
+
}
|
|
8
|
+
var GctFormCheckbox = widthEditorInstall(
|
|
9
|
+
EditorType.CHECKBOX,
|
|
10
|
+
() => new Provider(),
|
|
11
|
+
GctFormCheckbox$1
|
|
12
|
+
);
|
|
13
|
+
const oldCheckboxCom = widthEditorInstall(
|
|
14
|
+
EditorTypeOld.CHECKBOX,
|
|
15
|
+
() => new Provider(),
|
|
16
|
+
GctFormCheckbox$1
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { Provider, GctFormCheckbox as default, oldCheckboxCom };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ColorEditorController, IColorEditor, IFormItem } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 颜色选择编辑器
|
|
5
|
+
*/
|
|
6
|
+
export declare const GctFormColor: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
itemModel: {
|
|
8
|
+
type: PropType<IFormItem>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
model: {
|
|
12
|
+
type: PropType<IColorEditor>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
value: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
}>, {
|
|
19
|
+
ns: import('@gct-paas/core').Namespace;
|
|
20
|
+
c: ColorEditorController;
|
|
21
|
+
val: import('vue').WritableComputedRef<any, any>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
+
itemModel: {
|
|
24
|
+
type: PropType<IFormItem>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
model: {
|
|
28
|
+
type: PropType<IColorEditor>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
value: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{
|
|
35
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
export default GctFormColor;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent, mergeProps } from 'vue';
|
|
2
|
+
import { useNamespace, ColorEditorController, useGctFormValue } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-color.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const GctFormColor = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "GctFormColor",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
props: {
|
|
10
|
+
itemModel: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
model: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
value: {
|
|
19
|
+
type: String
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:value"],
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("form-color");
|
|
25
|
+
const c = new ColorEditorController(props.model);
|
|
26
|
+
const val = useGctFormValue();
|
|
27
|
+
return {
|
|
28
|
+
ns,
|
|
29
|
+
c,
|
|
30
|
+
val
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
render() {
|
|
34
|
+
return createVNode(resolveComponent("color-editor"), mergeProps({
|
|
35
|
+
"value": this.val,
|
|
36
|
+
"onUpdate:value": ($event) => this.val = $event
|
|
37
|
+
}, this.model.props || {}, {
|
|
38
|
+
"class": [this.ns.b(), this.ns.is("readonly", this.model.readonly)]
|
|
39
|
+
}), null);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { GctFormColor, GctFormColor as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IEditorProvider } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 颜色选择编辑器
|
|
4
|
+
*
|
|
5
|
+
* @author lingxiaoming
|
|
6
|
+
* @date 2024-07-17 04:48:33
|
|
7
|
+
* @export
|
|
8
|
+
* @class GctFormColorProvider
|
|
9
|
+
* @implements {IEditorProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class GctFormColorProvider implements IEditorProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
}
|