@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,31 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormCollapse, IFormCollapseController } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 表单折叠面板
|
|
5
|
+
*/
|
|
6
|
+
export declare const GctFormCollapse: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
c: {
|
|
8
|
+
type: PropType<IFormCollapseController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
model: {
|
|
12
|
+
type: PropType<IFormCollapse>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
ns: import('@gct-paas/core').Namespace;
|
|
17
|
+
keys: import('vue').Ref<number[], number[]>;
|
|
18
|
+
style: IParams;
|
|
19
|
+
activeKeys: import('vue').Ref<string[], string[]>;
|
|
20
|
+
expandIconPosition: import('vue').ComputedRef<"left" | "right">;
|
|
21
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
22
|
+
c: {
|
|
23
|
+
type: PropType<IFormCollapseController>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
model: {
|
|
27
|
+
type: PropType<IFormCollapse>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
export default GctFormCollapse;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent, createVNode, ref, computed } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
import { Collapse } from 'ant-design-vue';
|
|
4
|
+
import './gct-form-collapse.scss';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const GctFormCollapse = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "GctFormCollapse",
|
|
9
|
+
props: {
|
|
10
|
+
c: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
model: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const ns = useNamespace("form-collapse");
|
|
21
|
+
const keys = ref([0]);
|
|
22
|
+
const style = {};
|
|
23
|
+
if (props.model.width) {
|
|
24
|
+
style[ns.cssVarName("form-collapse-width")] = props.model.width;
|
|
25
|
+
}
|
|
26
|
+
if (props.model.height) {
|
|
27
|
+
style[ns.cssVarName("form-collapse-height")] = props.model.height;
|
|
28
|
+
}
|
|
29
|
+
const activeKeys = ref([]);
|
|
30
|
+
activeKeys.value = props.model.children?.map((item) => item.name) || [];
|
|
31
|
+
const expandIconPosition = computed(() => {
|
|
32
|
+
return props.model.expandIconPosition === "left" ? "left" : "right";
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
ns,
|
|
36
|
+
keys,
|
|
37
|
+
style,
|
|
38
|
+
activeKeys,
|
|
39
|
+
expandIconPosition
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
render() {
|
|
43
|
+
if (this.c.state.keepalive !== true && this.c.state.visible === false) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const items = this.$slots.default?.() || [];
|
|
47
|
+
return createVNode(Collapse, {
|
|
48
|
+
"class": [this.ns.b(), this.ns.is("hidden", this.c.state.visible === false), this.ns.m("icon-" + (this.model.expandIconStyle || "up-down"))],
|
|
49
|
+
"style": this.style,
|
|
50
|
+
"accordion": this.model.accordion,
|
|
51
|
+
"expandIconPosition": this.expandIconPosition,
|
|
52
|
+
"activeKey": this.activeKeys,
|
|
53
|
+
"onUpdate:activeKey": ($event) => this.activeKeys = $event
|
|
54
|
+
}, {
|
|
55
|
+
default: () => [this.model.children?.map((item, index) => {
|
|
56
|
+
const _item = items[index];
|
|
57
|
+
if (_item.props.c.state.visible === false) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const collapsible = item.collapsible !== false ? void 0 : "disabled";
|
|
61
|
+
return createVNode(Collapse.Panel, {
|
|
62
|
+
"key": item.name,
|
|
63
|
+
"header": item.title,
|
|
64
|
+
"collapsible": collapsible
|
|
65
|
+
}, {
|
|
66
|
+
default: () => [items[index]]
|
|
67
|
+
});
|
|
68
|
+
})]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export { GctFormCollapse, GctFormCollapse as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFormController, IFormCollapseController, IFormItemBasic, IFormItemProvider } from '@gct-paas/core';
|
|
2
|
+
export declare class GctFormCollapseProvider implements IFormItemProvider {
|
|
3
|
+
component: string;
|
|
4
|
+
createController(form: IFormController, item: IFormItemBasic): IFormCollapseController;
|
|
5
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useFormItemController, FormCollapseController } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class GctFormCollapseProvider {
|
|
5
|
+
component = "gct-form-collapse";
|
|
6
|
+
createController(form, item) {
|
|
7
|
+
return useFormItemController(() => new FormCollapseController(form, item));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { GctFormCollapseProvider };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
$gct-form-collapse: (
|
|
2
|
+
width: auto,
|
|
3
|
+
height: auto,
|
|
4
|
+
);
|
|
5
|
+
|
|
6
|
+
@include b(form-collapse) {
|
|
7
|
+
@include set-component-css-var('form-collapse', $gct-form-collapse);
|
|
8
|
+
|
|
9
|
+
width: getCssVar(form-collapse, width);
|
|
10
|
+
height: getCssVar(form-collapse, height);
|
|
11
|
+
border: none;
|
|
12
|
+
|
|
13
|
+
@include when(hidden) {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 默认样式调整
|
|
18
|
+
&.ant-collapse{
|
|
19
|
+
> .ant-collapse-item > .ant-collapse-header {
|
|
20
|
+
background: #f2f4f7;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
color: #212528;
|
|
24
|
+
padding: 8px 12px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 取消面板内容区的边框
|
|
29
|
+
> .ant-collapse-item {
|
|
30
|
+
border-bottom: none;
|
|
31
|
+
|
|
32
|
+
>.ant-collapse-content{
|
|
33
|
+
border-top: none;
|
|
34
|
+
|
|
35
|
+
>.ant-collapse-content-box{
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
// 上下模式箭头方向
|
|
43
|
+
@include m(icon-up-down){
|
|
44
|
+
> .ant-collapse-item {
|
|
45
|
+
&.ant-collapse-item-active{
|
|
46
|
+
> .ant-collapse-header .ant-collapse-arrow{
|
|
47
|
+
svg{
|
|
48
|
+
transform: rotate(-90deg) !important;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
> .ant-collapse-header .ant-collapse-arrow{
|
|
54
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
55
|
+
svg{
|
|
56
|
+
transform: rotate(90deg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GctFormCollapseProvider } from './gct-form-collapse.provider.mjs';
|
|
2
|
+
import { GctFormCollapse as GctFormCollapse$1 } from './gct-form-collapse.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
var GctFormCollapse = {
|
|
6
|
+
install(app) {
|
|
7
|
+
_gct.register.formItem.register(
|
|
8
|
+
"collapse",
|
|
9
|
+
() => new GctFormCollapseProvider()
|
|
10
|
+
);
|
|
11
|
+
app.component(GctFormCollapse$1.name, GctFormCollapse$1);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { GctFormCollapse as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormCollapsePane, IFormCollapsePaneController } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 表单折叠面板项
|
|
5
|
+
*/
|
|
6
|
+
export declare const GctFormCollapsePane: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
c: {
|
|
8
|
+
type: PropType<IFormCollapsePaneController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
model: {
|
|
12
|
+
type: PropType<IFormCollapsePane>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
ns: import('@gct-paas/core').Namespace;
|
|
17
|
+
style: IParams;
|
|
18
|
+
renderContainer: (items: unknown[]) => import("vue/jsx-runtime").JSX.Element | undefined;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
c: {
|
|
21
|
+
type: PropType<IFormCollapsePaneController>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
model: {
|
|
25
|
+
type: PropType<IFormCollapsePane>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default GctFormCollapsePane;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isVNode, defineComponent, mergeProps, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-collapse-pane.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function _isSlot(s) {
|
|
7
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
+
}
|
|
9
|
+
const GctFormCollapsePane = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "GctFormCollapsePane",
|
|
11
|
+
props: {
|
|
12
|
+
c: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
model: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(props) {
|
|
22
|
+
const ns = useNamespace("form-collapse-pane");
|
|
23
|
+
const style = {};
|
|
24
|
+
function renderContainer(items) {
|
|
25
|
+
if (props.model.layout === "flex") {
|
|
26
|
+
return createVNode(resolveComponent("flex-container"), {
|
|
27
|
+
"layout": props.model.flex
|
|
28
|
+
}, _isSlot(items) ? items : {
|
|
29
|
+
default: () => [items]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (props.model.layout === "grid") {
|
|
33
|
+
return createVNode(resolveComponent("grid-container"), {
|
|
34
|
+
"layout": props.model.grid
|
|
35
|
+
}, _isSlot(items) ? items : {
|
|
36
|
+
default: () => [items]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
console.error("\u4E0D\u652F\u6301\u7684layout\u7C7B\u578B" + props.model.layout);
|
|
40
|
+
}
|
|
41
|
+
if (props.model.width) {
|
|
42
|
+
style[ns.cssVarName("form-collapse-pane-width")] = props.model.width;
|
|
43
|
+
}
|
|
44
|
+
if (props.model.height) {
|
|
45
|
+
style[ns.cssVarName("form-collapse-pane-height")] = props.model.height;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
ns,
|
|
49
|
+
style,
|
|
50
|
+
renderContainer
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
render() {
|
|
54
|
+
if (this.c.state.keepalive !== true && this.c.state.visible === false) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const items = this.$slots.default?.() || [];
|
|
58
|
+
const lastVNode = items[items.length - 1];
|
|
59
|
+
if (lastVNode) {
|
|
60
|
+
lastVNode.props = mergeProps(lastVNode.props || {}, {
|
|
61
|
+
class: this.ns.e("last-child")
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return createVNode("div", {
|
|
65
|
+
"class": [this.ns.b(), this.ns.is("hidden", this.c.state.visible === false)],
|
|
66
|
+
"style": this.style
|
|
67
|
+
}, [this.renderContainer(items)]);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export { GctFormCollapsePane, GctFormCollapsePane as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFormController, IFormCollapsePaneController, IFormItemBasic, IFormItemProvider } from '@gct-paas/core';
|
|
2
|
+
export declare class GctFormCollapsePaneProvider implements IFormItemProvider {
|
|
3
|
+
component: string;
|
|
4
|
+
createController(form: IFormController, item: IFormItemBasic): IFormCollapsePaneController;
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useFormItemController, FormCollapsePaneController } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class GctFormCollapsePaneProvider {
|
|
5
|
+
component = "gct-form-collapse-pane";
|
|
6
|
+
createController(form, item) {
|
|
7
|
+
return useFormItemController(
|
|
8
|
+
() => new FormCollapsePaneController(form, item)
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { GctFormCollapsePaneProvider };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$gct-form-collapse-pane: (
|
|
2
|
+
width: auto,
|
|
3
|
+
height: auto,
|
|
4
|
+
padding: 12px,
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
@include b(form-collapse-pane) {
|
|
8
|
+
@include set-component-css-var('form-collapse-pane', $gct-form-collapse-pane);
|
|
9
|
+
|
|
10
|
+
width: getCssVar(form-collapse-pane, width);
|
|
11
|
+
height: getCssVar(form-collapse-pane, height);
|
|
12
|
+
padding: getCssVar(form-collapse-pane, padding);
|
|
13
|
+
|
|
14
|
+
@include when(hidden) {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 把最后一个的直接子组件的margin-bottom设置为0
|
|
21
|
+
.#{bem(form-collapse)} .#{bem(form-collapse-pane)} .#{bem(form-collapse-pane,last-child)}{
|
|
22
|
+
margin-bottom: 0 !important;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GctFormCollapsePaneProvider } from './gct-form-collapse-pane.provider.mjs';
|
|
2
|
+
import { GctFormCollapsePane as GctFormCollapsePane$1 } from './gct-form-collapse-pane.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
var GctFormCollapsePane = {
|
|
6
|
+
install(app) {
|
|
7
|
+
_gct.register.formItem.register(
|
|
8
|
+
"collapse-pane",
|
|
9
|
+
() => new GctFormCollapsePaneProvider()
|
|
10
|
+
);
|
|
11
|
+
app.component(GctFormCollapsePane$1.name, GctFormCollapsePane$1);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { GctFormCollapsePane as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFormGroup, IFormGroupController } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* 表单分组
|
|
5
|
+
*/
|
|
6
|
+
export declare const GctFormGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
c: {
|
|
8
|
+
type: PropType<IFormGroupController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
model: {
|
|
12
|
+
type: PropType<IFormGroup>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
ns: import('@gct-paas/core').Namespace;
|
|
17
|
+
keys: import('vue').Ref<number[], number[]>;
|
|
18
|
+
style: IParams;
|
|
19
|
+
renderContainer: (items: unknown[]) => import("vue/jsx-runtime").JSX.Element | undefined;
|
|
20
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
21
|
+
c: {
|
|
22
|
+
type: PropType<IFormGroupController>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
model: {
|
|
26
|
+
type: PropType<IFormGroup>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
export default GctFormGroup;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, ref } from 'vue';
|
|
2
|
+
import { useNamespace } from '@gct-paas/core';
|
|
3
|
+
import './gct-form-group.scss';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function _isSlot(s) {
|
|
7
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
+
}
|
|
9
|
+
const GctFormGroup = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "GctFormGroup",
|
|
11
|
+
props: {
|
|
12
|
+
c: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
model: {
|
|
17
|
+
type: Object,
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(props) {
|
|
22
|
+
const ns = useNamespace("gct-form-group");
|
|
23
|
+
const keys = ref([0]);
|
|
24
|
+
function renderContainer(items) {
|
|
25
|
+
if (props.model.layout === "flex") {
|
|
26
|
+
return createVNode(resolveComponent("flex-container"), {
|
|
27
|
+
"layout": props.model.flex
|
|
28
|
+
}, _isSlot(items) ? items : {
|
|
29
|
+
default: () => [items]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (props.model.layout === "grid") {
|
|
33
|
+
return createVNode(resolveComponent("grid-container"), {
|
|
34
|
+
"layout": props.model.grid
|
|
35
|
+
}, _isSlot(items) ? items : {
|
|
36
|
+
default: () => [items]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
console.error("\u4E0D\u652F\u6301\u7684layout\u7C7B\u578B" + props.model.layout);
|
|
40
|
+
}
|
|
41
|
+
const style = {};
|
|
42
|
+
if (props.model.width) {
|
|
43
|
+
style[ns.cssVarName("form-group-width")] = props.model.width;
|
|
44
|
+
}
|
|
45
|
+
if (props.model.height) {
|
|
46
|
+
style[ns.cssVarName("form-group-height")] = props.model.height;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
ns,
|
|
50
|
+
keys,
|
|
51
|
+
style,
|
|
52
|
+
renderContainer
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
render() {
|
|
56
|
+
if (this.c.state.keepalive !== true && this.c.state.visible === false) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const items = this.$slots.default?.() || [];
|
|
60
|
+
if (this.model.isCollapse) {
|
|
61
|
+
let _slot;
|
|
62
|
+
return createVNode(resolveComponent("a-collapse"), {
|
|
63
|
+
"activeKey": this.keys,
|
|
64
|
+
"onUpdate:activeKey": ($event) => this.keys = $event,
|
|
65
|
+
"class": [this.ns.b(), this.ns.is("hidden-header", this.model.showHeader === false), this.ns.is("hidden", this.c.state.visible === false)],
|
|
66
|
+
"style": this.style,
|
|
67
|
+
"ghost": true
|
|
68
|
+
}, {
|
|
69
|
+
default: () => [createVNode(resolveComponent("a-collapse-panel"), {
|
|
70
|
+
"key": "0",
|
|
71
|
+
"header": this.model.title
|
|
72
|
+
}, _isSlot(_slot = this.renderContainer(items)) ? _slot : {
|
|
73
|
+
default: () => [_slot]
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return createVNode("div", {
|
|
78
|
+
"class": [this.ns.b(), this.ns.is("hidden-header", this.model.showHeader === false), this.ns.is("hidden", this.c.state.visible === false)],
|
|
79
|
+
"style": this.style
|
|
80
|
+
}, [this.model.showHeader === false ? createVNode("div", {
|
|
81
|
+
"class": this.ns.e("title")
|
|
82
|
+
}, [this.model.title]) : null, createVNode("div", {
|
|
83
|
+
"class": this.ns.e("content")
|
|
84
|
+
}, [this.renderContainer(items)])]);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export { GctFormGroup, GctFormGroup as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFormController, IFormGroupController, IFormItemBasic, IFormItemProvider } from '@gct-paas/core';
|
|
2
|
+
export declare class GctFormGroupProvider implements IFormItemProvider {
|
|
3
|
+
component: string;
|
|
4
|
+
createController(form: IFormController, item: IFormItemBasic): IFormGroupController;
|
|
5
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useFormItemController, FormGroupController } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class GctFormGroupProvider {
|
|
5
|
+
component = "gct-form-group";
|
|
6
|
+
createController(form, item) {
|
|
7
|
+
return useFormItemController(() => new FormGroupController(form, item));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { GctFormGroupProvider };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$gct-form-group: (
|
|
2
|
+
min-height: 32px,
|
|
3
|
+
width: auto,
|
|
4
|
+
height: auto,
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
@include b(gct-form-group) {
|
|
8
|
+
@include set-component-css-var('form-group', $gct-form-group);
|
|
9
|
+
|
|
10
|
+
width: getCssVar(form-group, width);
|
|
11
|
+
height: getCssVar(form-group, height);
|
|
12
|
+
min-height: getCssVar(form-group, min-height);
|
|
13
|
+
|
|
14
|
+
@include when(hidden-header) {
|
|
15
|
+
@include e(title) {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include e(content) {
|
|
20
|
+
overflow: auto;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include when(hidden) {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GctFormGroupProvider } from './gct-form-group.provider.mjs';
|
|
2
|
+
import { GctFormGroup as GctFormGroup$1 } from './gct-form-group.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
var GctFormGroup = {
|
|
6
|
+
install(app) {
|
|
7
|
+
_gct.register.formItem.register(
|
|
8
|
+
"container",
|
|
9
|
+
() => new GctFormGroupProvider()
|
|
10
|
+
);
|
|
11
|
+
app.component(GctFormGroup$1.name, GctFormGroup$1);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { GctFormGroup as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FormHiddenItemController, IFormController, IFormItemBasic, IFormItemProvider } from '@gct-paas/core';
|
|
2
|
+
export declare class GctFormHiddenItemProvider implements IFormItemProvider {
|
|
3
|
+
component: string;
|
|
4
|
+
createController(form: IFormController, item: IFormItemBasic): FormHiddenItemController;
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useFormItemController, FormHiddenItemController } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class GctFormHiddenItemProvider {
|
|
5
|
+
component = "gct-form-hidden-item";
|
|
6
|
+
createController(form, item) {
|
|
7
|
+
return useFormItemController(
|
|
8
|
+
() => new FormHiddenItemController(form, item)
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { GctFormHiddenItemProvider };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IForm, IFormItem, IFormItemController } from '@gct-paas/core';
|
|
3
|
+
export declare const GctFormItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
c: {
|
|
5
|
+
type: PropType<IFormItemController>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
formModel: {
|
|
9
|
+
type: PropType<IForm>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
model: {
|
|
13
|
+
type: PropType<IFormItem>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, {
|
|
17
|
+
ns: import('@gct-paas/core').Namespace;
|
|
18
|
+
style: IParams;
|
|
19
|
+
required: import('vue').ComputedRef<boolean>;
|
|
20
|
+
renderLabelTooltip: () => import("vue/jsx-runtime").JSX.Element | null;
|
|
21
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
22
|
+
c: {
|
|
23
|
+
type: PropType<IFormItemController>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
formModel: {
|
|
27
|
+
type: PropType<IForm>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
model: {
|
|
31
|
+
type: PropType<IFormItem>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default GctFormItem;
|