@kp-ui/lowcode 2.15.0-beta.7 → 2.16.0-alpha.10
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/install.js +17 -15
- package/install.js.map +1 -1
- package/package.json +4 -7
- package/src/components/FormRender/FormContainer.vue.js +55 -0
- package/src/components/FormRender/FormContainer.vue.js.map +1 -0
- package/src/components/FormRender/FormContainer.vue2.js +5 -0
- package/src/components/FormRender/FormContainer.vue2.js.map +1 -0
- package/src/components/FormRender/index.vue.js +2 -2
- package/src/components/FormRender/index.vue2.js +28 -30
- package/src/components/FormRender/index.vue2.js.map +1 -1
- package/src/components/FormRender/useFormContext.js +116 -109
- package/src/components/FormRender/useFormContext.js.map +1 -1
- package/src/components/{designer.js → form-designer/designer.js} +76 -71
- package/src/components/form-designer/designer.js.map +1 -0
- package/src/components/form-designer/form-widget/RenderDesignerWigetList.vue.js +1 -1
- package/src/components/form-designer/form-widget/RenderDesignerWigetList.vue.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +143 -138
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/vf-box-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/container-widget/vf-box-widget.vue2.js +18 -19
- package/src/components/form-designer/form-widget/container-widget/vf-box-widget.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue2.js +22 -16
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/bpmn-editor-widget copy.vue.js +8 -0
- package/src/components/form-designer/form-widget/field-widget/bpmn-editor-widget copy.vue.js.map +1 -0
- package/src/components/form-designer/form-widget/field-widget/bpmn-editor-widget copy.vue2.js +58 -0
- package/src/components/form-designer/form-widget/field-widget/bpmn-editor-widget copy.vue2.js.map +1 -0
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue2.js +66 -54
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/index.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/index.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/rich-editor-widget.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/useField.js +140 -140
- package/src/components/form-designer/form-widget/field-widget/useField.js.map +1 -1
- package/src/components/form-designer/form-widget/index.vue.js +2 -2
- package/src/components/form-designer/form-widget/index.vue2.js +56 -47
- package/src/components/form-designer/form-widget/index.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/useFormDesigner.js +34 -0
- package/src/components/form-designer/form-widget/useFormDesigner.js.map +1 -0
- package/src/components/form-designer/index.vue.js +77 -74
- package/src/components/form-designer/index.vue.js.map +1 -1
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +100 -126
- package/src/components/form-designer/setting-panel/form-setting.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/index.vue.js +1 -1
- package/src/components/form-designer/setting-panel/index.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/index.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/option-items-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/option-items-setting.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/option-items-setting.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/boxModel-editor.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/boxModel-editor.vue2.js +255 -201
- package/src/components/form-designer/setting-panel/property-editor/boxModel-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +45 -39
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-customClass-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-customClass-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue.js +32 -0
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue.js +32 -0
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/height-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue.js +5 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue2.js +38 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue2.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue.js +5 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue2.js +38 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue2.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue2.js +10 -10
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/customClass-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/customClass-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onTableChange-editor.vue2.js +4 -4
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onTableChange-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-slider/range-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-slider/range-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-switch/switch-defaultValue-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-switch/switch-defaultValue-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/index.js +178 -176
- package/src/components/form-designer/setting-panel/property-editor/index.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue2.js +29 -18
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/multiple-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/rightSlotCss-editor.vue2.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/rightSlotCss-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/type-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/useEditor.js +1 -1
- package/src/components/form-designer/setting-panel/property-editor/useEditor.js.map +1 -1
- package/src/components/form-designer/setting-panel/propertyRegister.js +12 -12
- package/src/components/form-designer/setting-panel/propertyRegister.js.map +1 -1
- package/src/components/form-designer/toolbar-panel/PreviewDialog.vue.js +1 -1
- package/src/components/form-designer/toolbar-panel/PreviewDialog.vue.js.map +1 -1
- package/src/components/form-designer/toolbar-panel/index.vue.js +2 -2
- package/src/components/form-designer/toolbar-panel/index.vue2.js +177 -137
- package/src/components/form-designer/toolbar-panel/index.vue2.js.map +1 -1
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js.map +1 -0
- package/src/components/form-designer/widget-panel/basicFields/input.js +4 -2
- package/src/components/form-designer/widget-panel/basicFields/input.js.map +1 -1
- package/src/components/form-designer/widget-panel/containers/vf-box.js +1 -4
- package/src/components/form-designer/widget-panel/containers/vf-box.js.map +1 -1
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js +34 -10
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js.map +1 -1
- package/src/components/form-designer/widget-panel/index.vue.js +2 -2
- package/src/components/form-designer/widget-panel/index.vue2.js +34 -74
- package/src/components/form-designer/widget-panel/index.vue2.js.map +1 -1
- package/src/components/form-render/container-items/data-table-widget.vue.js +3 -3
- package/src/components/form-render/container-items/data-table-widget.vue2.js +65 -64
- package/src/components/form-render/container-items/data-table-widget.vue2.js.map +1 -1
- package/src/components/form-render/dynamic-dialog.vue.js +79 -83
- package/src/components/form-render/dynamic-dialog.vue.js.map +1 -1
- package/src/components/public/ActionButtonListDialog.vue.js +2 -2
- package/src/components/public/ActionButtonListDialog.vue2.js +117 -96
- package/src/components/public/ActionButtonListDialog.vue2.js.map +1 -1
- package/src/components/public/ActionButtonListRender.vue.js +17 -15
- package/src/components/public/ActionButtonListRender.vue.js.map +1 -1
- package/src/components/public/ActionButtonListRender.vue2.js +48 -38
- package/src/components/public/ActionButtonListRender.vue2.js.map +1 -1
- package/src/components/public/ConfigView/CustomPageRender.vue.js +58 -0
- package/src/components/public/ConfigView/CustomPageRender.vue.js.map +1 -0
- package/src/components/public/ConfigView/CustomPageRender.vue2.js +5 -0
- package/src/components/public/ConfigView/CustomPageRender.vue2.js.map +1 -0
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +63 -56
- package/src/components/public/CustomerModal/CustomerModal.vue2.js.map +1 -1
- package/src/constants/EditorTypeEnum.js +1 -1
- package/src/constants/EditorTypeEnum.js.map +1 -1
- package/src/constants/WidgetTypeEnum.js +3 -4
- package/src/constants/WidgetTypeEnum.js.map +1 -1
- package/src/hooks/useDataHttp.js +8 -7
- package/src/hooks/useDataHttp.js.map +1 -1
- package/src/hooks/useLowcode.js.map +1 -1
- package/src/lang/en-US.js +3 -1
- package/src/lang/en-US.js.map +1 -1
- package/src/lang/zh-CN.js +5 -5
- package/src/lang/zh-CN.js.map +1 -1
- package/src/utils/util.js +26 -35
- package/src/utils/util.js.map +1 -1
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/FormRender/FormContainer.js +0 -52
- package/src/components/FormRender/FormContainer.js.map +0 -1
- package/src/components/bi-widget/echartBar/echart-bar-widget.vue.js +0 -8
- package/src/components/bi-widget/echartBar/echart-bar-widget.vue.js.map +0 -1
- package/src/components/bi-widget/echartBar/echart-bar-widget.vue2.js +0 -43
- package/src/components/bi-widget/echartBar/echart-bar-widget.vue2.js.map +0 -1
- package/src/components/bi-widget/echartBar/echart-bar.js +0 -35
- package/src/components/bi-widget/echartBar/echart-bar.js.map +0 -1
- package/src/components/bi-widget/index.js +0 -13
- package/src/components/bi-widget/index.js.map +0 -1
- package/src/components/designer.js.map +0 -1
- package/src/components/form-designer/form-widget/RenderDesignerPC.vue.js +0 -26
- package/src/components/form-designer/form-widget/RenderDesignerPC.vue.js.map +0 -1
- package/src/components/form-designer/form-widget/RenderDesignerPC.vue2.js +0 -5
- package/src/components/form-designer/form-widget/RenderDesignerPC.vue2.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/RenderDesignerBI.vue.js +0 -8
- package/src/components/form-designer/form-widget/bi/RenderDesignerBI.vue.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/RenderDesignerBI.vue2.js +0 -68
- package/src/components/form-designer/form-widget/bi/RenderDesignerBI.vue2.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/RenderDesignerBIWigetList.vue.js +0 -8
- package/src/components/form-designer/form-widget/bi/RenderDesignerBIWigetList.vue.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/RenderDesignerBIWigetList.vue2.js +0 -136
- package/src/components/form-designer/form-widget/bi/RenderDesignerBIWigetList.vue2.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/WidgetContextMenu.vue.js +0 -8
- package/src/components/form-designer/form-widget/bi/WidgetContextMenu.vue.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/WidgetContextMenu.vue2.js +0 -153
- package/src/components/form-designer/form-widget/bi/WidgetContextMenu.vue2.js.map +0 -1
- package/src/components/form-designer/form-widget/bi/useRuler.js +0 -66
- package/src/components/form-designer/form-widget/bi/useRuler.js.map +0 -1
- package/src/components/form-designer/setting-panel/panel/PanelItemDrag.vue.js +0 -51
- package/src/components/form-designer/setting-panel/panel/PanelItemDrag.vue.js.map +0 -1
- package/src/components/form-designer/setting-panel/panel/PanelItemDragForBI.vue.js +0 -51
- package/src/components/form-designer/setting-panel/panel/PanelItemDragForBI.vue.js.map +0 -1
- package/src/components/form-designer/setting-panel/panel/PanelItemDragForBI.vue2.js +0 -5
- package/src/components/form-designer/setting-panel/panel/PanelItemDragForBI.vue2.js.map +0 -1
- package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue.js +0 -5
- package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue.js.map +0 -1
- package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue2.js +0 -71
- package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue2.js.map +0 -1
- package/src/components/form-designer/setting-panel/property-editor/echart-bar-editor.vue.js +0 -5
- package/src/components/form-designer/setting-panel/property-editor/echart-bar-editor.vue.js.map +0 -1
- package/src/components/form-designer/setting-panel/property-editor/echart-bar-editor.vue2.js +0 -81
- package/src/components/form-designer/setting-panel/property-editor/echart-bar-editor.vue2.js.map +0 -1
- package/src/components/form-render/SubmitButtonRender.vue.js +0 -92
- package/src/components/form-render/SubmitButtonRender.vue.js.map +0 -1
- package/src/components/form-render/SubmitButtonRender.vue2.js +0 -5
- package/src/components/form-render/SubmitButtonRender.vue2.js.map +0 -1
- package/src/constants/LayoutTypeEnum.js +0 -5
- package/src/constants/LayoutTypeEnum.js.map +0 -1
- package/src/hooks/useDesigner.js +0 -51
- package/src/hooks/useDesigner.js.map +0 -1
- /package/src/components/form-designer/{setting-panel/panel → widget-panel}/PanelItemDrag.vue2.js +0 -0
- /package/src/components/form-designer/{setting-panel/panel → widget-panel}/PanelItemDrag.vue2.js.map +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, mergeModels as m, useModel as L, createBlock as R, openBlock as _, unref as a, mergeProps as B, withCtx as E, createElementVNode as w, createVNode as p, withModifiers as z, Fragment as A } from "vue";
|
|
2
|
-
import { useDesigner as F, getWidget as N } from "../../../../hooks/useDesigner.js";
|
|
3
|
-
import O from "../../../../lib/vuedraggable/src/vuedraggable.js";
|
|
4
|
-
import { ESDrager as P } from "../../../../../node_modules/.pnpm/es-drager@1.3.2_vue@3.5.17_typescript@5.8.2_/node_modules/es-drager/lib/index.es.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
const S = {
|
|
7
|
-
class: "transition-group-el"
|
|
8
|
-
}, G = /* @__PURE__ */ I({
|
|
9
|
-
name: "RenderDesignerWigetList",
|
|
10
|
-
__name: "RenderDesignerBIWigetList",
|
|
11
|
-
props: /* @__PURE__ */ m({
|
|
12
|
-
parentWidget: {},
|
|
13
|
-
list: {},
|
|
14
|
-
end: {},
|
|
15
|
-
update: {
|
|
16
|
-
type: Function,
|
|
17
|
-
default: () => {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}, {
|
|
21
|
-
shadow: {
|
|
22
|
-
default() {
|
|
23
|
-
return {
|
|
24
|
-
x: 0,
|
|
25
|
-
y: 0,
|
|
26
|
-
width: 0,
|
|
27
|
-
height: 0
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
shadowModifiers: {}
|
|
32
|
-
}),
|
|
33
|
-
emits: /* @__PURE__ */ m(["open-context-menu"], ["update:shadow"]),
|
|
34
|
-
setup(c, {
|
|
35
|
-
emit: g
|
|
36
|
-
}) {
|
|
37
|
-
const r = c, x = g, C = (t, e, o) => {
|
|
38
|
-
x("open-context-menu", {
|
|
39
|
-
event: t,
|
|
40
|
-
widget: e,
|
|
41
|
-
index: o
|
|
42
|
-
});
|
|
43
|
-
}, u = L(c, "shadow"), {
|
|
44
|
-
selectWidget: W,
|
|
45
|
-
selected: k
|
|
46
|
-
} = F(), v = (t, e) => {
|
|
47
|
-
var o, n, i, s, l;
|
|
48
|
-
((o = t.options) == null ? void 0 : o.width) === e.width && ((n = t.options) == null ? void 0 : n.height) === e.height && ((i = t.options) == null ? void 0 : i.rotate) === e.angle && ((s = t.options) == null ? void 0 : s.left) === e.left && ((l = t.options) == null ? void 0 : l.top) === e.top || (t.options || (t.options = {}), t.options.width = e.width, t.options.height = e.height, t.options.rotate = e.angle, t.options.left = e.left, t.options.top = e.top, u.value = {
|
|
49
|
-
x: e.left,
|
|
50
|
-
y: e.top,
|
|
51
|
-
width: e.width,
|
|
52
|
-
height: e.height
|
|
53
|
-
});
|
|
54
|
-
}, y = (t) => {
|
|
55
|
-
const e = t.newIndex, o = r.list[e];
|
|
56
|
-
if (o) {
|
|
57
|
-
const n = t.to.getBoundingClientRect(), i = t.originalEvent;
|
|
58
|
-
let s = i.clientX, l = i.clientY;
|
|
59
|
-
if (s != null && l != null) {
|
|
60
|
-
const d = s - n.left, f = l - n.top;
|
|
61
|
-
o.options || (o.options = {});
|
|
62
|
-
const h = {
|
|
63
|
-
width: 500,
|
|
64
|
-
height: 300,
|
|
65
|
-
position: "absolute",
|
|
66
|
-
left: d,
|
|
67
|
-
top: f
|
|
68
|
-
};
|
|
69
|
-
u.value = {
|
|
70
|
-
x: d,
|
|
71
|
-
y: f,
|
|
72
|
-
width: h.width,
|
|
73
|
-
height: h.height
|
|
74
|
-
}, Object.assign(o.options, h);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}, M = (t) => (console.log(t), !0), b = ({
|
|
78
|
-
widget: t,
|
|
79
|
-
index: e
|
|
80
|
-
}) => {
|
|
81
|
-
const o = N(t);
|
|
82
|
-
return o ? p(P, {
|
|
83
|
-
selected: k(t.id),
|
|
84
|
-
width: t.options.width,
|
|
85
|
-
height: t.options.height,
|
|
86
|
-
left: t.options.left,
|
|
87
|
-
top: t.options.top,
|
|
88
|
-
onChange: (n) => v(t, n),
|
|
89
|
-
border: !1,
|
|
90
|
-
markline: !0,
|
|
91
|
-
disabled: t.options.locked,
|
|
92
|
-
style: {
|
|
93
|
-
zIndex: t.options.zIndex
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
default: () => [p(o, {
|
|
97
|
-
parentList: r.list,
|
|
98
|
-
indexOfParentList: e,
|
|
99
|
-
parentWidget: r.parentWidget,
|
|
100
|
-
designState: !0,
|
|
101
|
-
widget: t,
|
|
102
|
-
field: t
|
|
103
|
-
}, null)]
|
|
104
|
-
}) : p(A, null, null);
|
|
105
|
-
};
|
|
106
|
-
return (t, e) => (_(), R(a(O), B({
|
|
107
|
-
list: t.list,
|
|
108
|
-
"item-key": "id"
|
|
109
|
-
}, {
|
|
110
|
-
group: "dragGroup",
|
|
111
|
-
ghostClass: "ghost",
|
|
112
|
-
animation: 300
|
|
113
|
-
}, {
|
|
114
|
-
tag: "transition-group",
|
|
115
|
-
handle: ".drag-handler",
|
|
116
|
-
onAdd: y,
|
|
117
|
-
onUpdate: t.update,
|
|
118
|
-
move: M
|
|
119
|
-
}), {
|
|
120
|
-
item: E(({
|
|
121
|
-
element: o,
|
|
122
|
-
index: n
|
|
123
|
-
}) => [w("div", S, [p(b, {
|
|
124
|
-
onContextmenu: z((i) => C(i, o, n), ["prevent", "stop"]),
|
|
125
|
-
onClick: (i) => a(W)(o),
|
|
126
|
-
widget: o,
|
|
127
|
-
index: n
|
|
128
|
-
}, null, 8, ["onContextmenu", "onClick", "widget", "index"])])]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 16, ["list", "onUpdate"]));
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
export {
|
|
134
|
-
G as default
|
|
135
|
-
};
|
|
136
|
-
//# sourceMappingURL=RenderDesignerBIWigetList.vue2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RenderDesignerBIWigetList.vue2.js","sources":["../../../../../../src/components/form-designer/form-widget/bi/RenderDesignerBIWigetList.vue"],"sourcesContent":["<template>\n <Draggable\n :list=\"list\"\n item-key=\"id\"\n v-bind=\"{ group: 'dragGroup', ghostClass: 'ghost', animation: 300 }\"\n tag=\"transition-group\"\n handle=\".drag-handler\"\n @add=\"onDragAdd\"\n @update=\"update\"\n :move=\"checkMove\"\n >\n <template #item=\"{ element: widget, index }\">\n <div class=\"transition-group-el\">\n <WidgetRender\n @contextmenu.prevent.stop=\"e => onContextMenu(e, widget, index)\"\n @click=\"selectWidget(widget)\"\n :widget=\"widget\"\n :index=\"index\"\n />\n </div>\n </template>\n </Draggable>\n</template>\n\n<script lang=\"tsx\" setup>\n import { getWidget, useDesigner } from '@/hooks/useDesigner';\n import { Widget } from '@/types/schema';\n import Draggable from '@/lib/vuedraggable/src/vuedraggable';\n import { FormDesigner } from '@/types/designer';\n import Drager from 'es-drager';\n import 'es-drager/lib/style.css';\n\n defineOptions({\n name: 'RenderDesignerWigetList'\n });\n\n const props = withDefaults(\n defineProps<{\n parentWidget: Widget | FormDesigner | null;\n list: Widget[];\n end?: (e: any) => void;\n update?: (e: any) => void;\n }>(),\n {\n update: () => {}\n }\n );\n\n const emit = defineEmits<{\n (\n e: 'open-context-menu',\n payload: { event: MouseEvent; widget: Widget; index: number }\n ): void;\n }>();\n\n const onContextMenu = (event: MouseEvent, widget: Widget, index: number) => {\n emit('open-context-menu', { event, widget, index });\n };\n\n const shadow = defineModel('shadow', {\n default() {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n });\n const { selectWidget, selected } = useDesigner();\n\n const onChange = (widget: Widget, dragData: any) => {\n if (\n widget.options?.width === dragData.width &&\n widget.options?.height === dragData.height &&\n widget.options?.rotate === dragData.angle &&\n widget.options?.left === dragData.left &&\n widget.options?.top === dragData.top\n ) {\n return;\n }\n\n if (!widget.options) widget.options = {} as any;\n widget.options.width = dragData.width;\n widget.options.height = dragData.height;\n widget.options.rotate = dragData.angle;\n widget.options.left = dragData.left;\n widget.options.top = dragData.top;\n shadow.value = {\n x: dragData.left,\n y: dragData.top,\n width: dragData.width,\n height: dragData.height\n };\n };\n const onDragAdd = (ev: any) => {\n const newIndex = ev.newIndex;\n const widget = props.list[newIndex];\n\n if (widget) {\n const containerRect = ev.to.getBoundingClientRect();\n const originalEvent = ev.originalEvent;\n let clientX = originalEvent.clientX;\n let clientY = originalEvent.clientY;\n\n if (clientX != null && clientY != null) {\n const left = clientX - containerRect.left;\n const top = clientY - containerRect.top;\n\n if (!widget.options) {\n widget.options = {} as any;\n }\n\n const styles = {\n width: 500,\n height: 300,\n position: 'absolute',\n left: left,\n top: top\n };\n shadow.value = {\n x: left,\n y: top,\n width: styles.width,\n height: styles.height\n };\n Object.assign(widget.options, styles);\n }\n }\n };\n\n const checkMove = evt => {\n console.log(evt);\n\n return true;\n };\n\n const WidgetRender = ({ widget, index }: { widget: Widget; index: number }) => {\n const CurrentWidget = getWidget(widget) as any;\n if (!CurrentWidget) {\n return <></>;\n }\n return (\n <Drager\n selected={selected(widget.id as string)}\n width={widget.options.width}\n height={widget.options.height}\n left={widget.options.left}\n top={widget.options.top}\n onChange={dragData => onChange(widget, dragData)}\n border={false}\n markline={true}\n disabled={widget.options.locked}\n style={{ zIndex: widget.options.zIndex }}\n >\n <CurrentWidget\n parentList={props.list}\n indexOfParentList={index}\n parentWidget={props.parentWidget}\n designState={true}\n widget={widget}\n field={widget}\n />\n </Drager>\n );\n };\n</script>\n\n<style scoped lang=\"less\">\n .transition-group-el {\n position: absolute;\n :deep(.es-drager) {\n --es-drager-color: var(--ant-primary-2) !important;\n --es-drager-dot-handle-color: #51d6a9;\n &:hover:not(.es-drager-text):after {\n display: block;\n outline: 1px dashed var(--es-drager-color);\n }\n &.selected {\n background-color: rgba(81, 214, 169, 0.1);\n &:not(.es-drager-text):after {\n outline: 1px solid var(--es-drager-color);\n }\n }\n .es-drager-dot-handle {\n border: 3px solid var(--es-drager-dot-handle-color);\n border-radius: 5px;\n background-color: #fff;\n }\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","onContextMenu","event","widget","index","shadow","_useModel","selectWidget","selected","useDesigner","onChange","dragData","options","width","height","rotate","angle","left","top","value","x","y","onDragAdd","ev","newIndex","list","containerRect","to","getBoundingClientRect","originalEvent","clientX","clientY","styles","position","Object","assign","checkMove","evt","console","log","WidgetRender","CurrentWidget","getWidget","_createVNode2","Drager","id","locked","zIndex","default","parentWidget","_Fragment","_openBlock","_createBlock","_unref","_mergeProps","group","ghostClass","animation","tag","handle","onAdd","onUpdate","update","move","item","_withCtx","element","_createElementVNode","_hoisted_1","_createVNode","onContextmenu","_withModifiers","e","onClick","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCI,UAAMA,IAAQC,GAYRC,IAAOC,GAOPC,IAAgBA,CAACC,GAAmBC,GAAgBC,MAAkB;AACxEL,MAAAA,EAAK,qBAAqB;AAAA,QAAEG,OAAAA;AAAAA,QAAOC,QAAAA;AAAAA,QAAQC,OAAAA;AAAAA,MAAM,CAAC;AAAA,IACtD,GAEMC,IAASC,EAAWR,GAAC,QAS1B,GACK;AAAA,MAAES,cAAAA;AAAAA,MAAcC,UAAAA;AAAAA,QAAaC,EAAW,GAExCC,IAAWA,CAACP,GAAgBQ,MAAkB;;AAChD,QACIR,IAAAA,EAAOS,YAAPT,gBAAAA,EAAgBU,WAAUF,EAASE,WACnCV,IAAAA,EAAOS,YAAPT,gBAAAA,EAAgBW,YAAWH,EAASG,YACpCX,IAAAA,EAAOS,YAAPT,gBAAAA,EAAgBY,YAAWJ,EAASK,WACpCb,IAAAA,EAAOS,YAAPT,gBAAAA,EAAgBc,UAASN,EAASM,UAClCd,IAAAA,EAAOS,YAAPT,gBAAAA,EAAgBe,SAAQP,EAASO,QAKhCf,EAAOS,YAAST,EAAOS,UAAU,CAAA,IACtCT,EAAOS,QAAQC,QAAQF,EAASE,OAChCV,EAAOS,QAAQ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,CAAA,EAAaJ,CAAM;AAAA,QAC1BA,QAAQA;AAAAA,QACRC,OAAOA;AAAAA;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import t from "./WidgetContextMenu.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import o from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5c0e43ed"]]);
|
|
5
|
-
export {
|
|
6
|
-
p as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=WidgetContextMenu.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetContextMenu.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, resolveComponent as r, createBlock as O, openBlock as x, withCtx as o, createElementVNode as B, normalizeStyle as V, createVNode as n, createElementBlock as y, Fragment as _, createTextVNode as d, unref as l } from "vue";
|
|
2
|
-
import { UnlockOutlined as A, LockOutlined as L, VerticalAlignTopOutlined as D, VerticalAlignBottomOutlined as M, ArrowUpOutlined as T, ArrowDownOutlined as $, AppstoreOutlined as F, DeleteOutlined as N } from "@ant-design/icons-vue";
|
|
3
|
-
import { useDesigner as U } from "../../../../hooks/useDesigner.js";
|
|
4
|
-
const S = /* @__PURE__ */ I({
|
|
5
|
-
name: "WidgetContextMenu",
|
|
6
|
-
__name: "WidgetContextMenu",
|
|
7
|
-
props: {
|
|
8
|
-
widget: {},
|
|
9
|
-
index: {},
|
|
10
|
-
visible: { type: Boolean },
|
|
11
|
-
x: {},
|
|
12
|
-
y: {}
|
|
13
|
-
},
|
|
14
|
-
emits: ["update:visible"],
|
|
15
|
-
setup(c, { emit: b }) {
|
|
16
|
-
const m = c, { designer: w } = U(), v = b, p = (t) => {
|
|
17
|
-
v("update:visible", t);
|
|
18
|
-
}, C = () => {
|
|
19
|
-
const t = m.widget;
|
|
20
|
-
t.options.locked = !t.options.locked, p(!1);
|
|
21
|
-
}, a = (t) => {
|
|
22
|
-
const e = m.widget, i = e.options.zIndex || 0, u = w.value.widgetList;
|
|
23
|
-
switch (t) {
|
|
24
|
-
case "top":
|
|
25
|
-
const k = Math.max(...u.map((s) => s.options.zIndex || 0));
|
|
26
|
-
e.options.zIndex = k + 1;
|
|
27
|
-
break;
|
|
28
|
-
case "bottom":
|
|
29
|
-
const g = Math.min(...u.map((s) => s.options.zIndex || 0));
|
|
30
|
-
e.options.zIndex = g - 1;
|
|
31
|
-
break;
|
|
32
|
-
case "up":
|
|
33
|
-
e.options.zIndex = i + 1;
|
|
34
|
-
break;
|
|
35
|
-
case "down":
|
|
36
|
-
e.options.zIndex = i - 1;
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
p(!1);
|
|
40
|
-
}, z = () => {
|
|
41
|
-
w.value.widgetList.splice(m.index, 1), p(!1);
|
|
42
|
-
};
|
|
43
|
-
return (t, e) => {
|
|
44
|
-
const i = r("a-menu-item"), u = r("a-sub-menu"), k = r("a-menu-divider"), g = r("a-menu"), s = r("a-dropdown");
|
|
45
|
-
return x(), O(s, {
|
|
46
|
-
open: t.visible,
|
|
47
|
-
"onUpdate:open": p,
|
|
48
|
-
trigger: ["click"]
|
|
49
|
-
}, {
|
|
50
|
-
overlay: o(() => [
|
|
51
|
-
n(g, null, {
|
|
52
|
-
default: o(() => [
|
|
53
|
-
n(i, {
|
|
54
|
-
key: "lock",
|
|
55
|
-
onClick: C
|
|
56
|
-
}, {
|
|
57
|
-
default: o(() => [
|
|
58
|
-
t.widget.options.locked ? (x(), y(_, { key: 0 }, [
|
|
59
|
-
n(l(A)),
|
|
60
|
-
e[4] || (e[4] = d(" 解锁 "))
|
|
61
|
-
], 64)) : (x(), y(_, { key: 1 }, [
|
|
62
|
-
n(l(L)),
|
|
63
|
-
e[5] || (e[5] = d(" 锁定 "))
|
|
64
|
-
], 64))
|
|
65
|
-
]),
|
|
66
|
-
_: 1
|
|
67
|
-
}),
|
|
68
|
-
n(u, {
|
|
69
|
-
key: "layer",
|
|
70
|
-
title: "图层"
|
|
71
|
-
}, {
|
|
72
|
-
icon: o(() => [
|
|
73
|
-
n(l(F))
|
|
74
|
-
]),
|
|
75
|
-
default: o(() => [
|
|
76
|
-
n(i, {
|
|
77
|
-
key: "bringToFront",
|
|
78
|
-
onClick: e[0] || (e[0] = (f) => a("top"))
|
|
79
|
-
}, {
|
|
80
|
-
default: o(() => [
|
|
81
|
-
n(l(D)),
|
|
82
|
-
e[6] || (e[6] = d(" 置于顶层 "))
|
|
83
|
-
]),
|
|
84
|
-
_: 1,
|
|
85
|
-
__: [6]
|
|
86
|
-
}),
|
|
87
|
-
n(i, {
|
|
88
|
-
key: "sendToBack",
|
|
89
|
-
onClick: e[1] || (e[1] = (f) => a("bottom"))
|
|
90
|
-
}, {
|
|
91
|
-
default: o(() => [
|
|
92
|
-
n(l(M)),
|
|
93
|
-
e[7] || (e[7] = d(" 置于底层 "))
|
|
94
|
-
]),
|
|
95
|
-
_: 1,
|
|
96
|
-
__: [7]
|
|
97
|
-
}),
|
|
98
|
-
n(i, {
|
|
99
|
-
key: "bringForward",
|
|
100
|
-
onClick: e[2] || (e[2] = (f) => a("up"))
|
|
101
|
-
}, {
|
|
102
|
-
default: o(() => [
|
|
103
|
-
n(l(T)),
|
|
104
|
-
e[8] || (e[8] = d(" 上移一层 "))
|
|
105
|
-
]),
|
|
106
|
-
_: 1,
|
|
107
|
-
__: [8]
|
|
108
|
-
}),
|
|
109
|
-
n(i, {
|
|
110
|
-
key: "sendBackward",
|
|
111
|
-
onClick: e[3] || (e[3] = (f) => a("down"))
|
|
112
|
-
}, {
|
|
113
|
-
default: o(() => [
|
|
114
|
-
n(l($)),
|
|
115
|
-
e[9] || (e[9] = d(" 下移一层 "))
|
|
116
|
-
]),
|
|
117
|
-
_: 1,
|
|
118
|
-
__: [9]
|
|
119
|
-
})
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}),
|
|
123
|
-
n(k),
|
|
124
|
-
n(i, {
|
|
125
|
-
key: "delete",
|
|
126
|
-
onClick: z
|
|
127
|
-
}, {
|
|
128
|
-
default: o(() => [
|
|
129
|
-
n(l(N)),
|
|
130
|
-
e[10] || (e[10] = d(" 删除 "))
|
|
131
|
-
]),
|
|
132
|
-
_: 1,
|
|
133
|
-
__: [10]
|
|
134
|
-
})
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
]),
|
|
139
|
-
default: o(() => [
|
|
140
|
-
B("div", {
|
|
141
|
-
class: "context-menu-trigger",
|
|
142
|
-
style: V({ position: "fixed", left: t.x + "px", top: t.y + "px" })
|
|
143
|
-
}, null, 4)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}, 8, ["open"]);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
export {
|
|
151
|
-
S as default
|
|
152
|
-
};
|
|
153
|
-
//# sourceMappingURL=WidgetContextMenu.vue2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetContextMenu.vue2.js","sources":["../../../../../../src/components/form-designer/form-widget/bi/WidgetContextMenu.vue"],"sourcesContent":["<template>\n <a-dropdown :open=\"visible\" @update:open=\"handleVisibleChange\" :trigger=\"['click']\">\n <div\n class=\"context-menu-trigger\"\n :style=\"{ position: 'fixed', left: x + 'px', top: y + 'px' }\"\n ></div>\n <template #overlay>\n <a-menu>\n <a-menu-item key=\"lock\" @click=\"handleLock\">\n <template v-if=\"widget.options.locked\">\n <unlock-outlined />\n 解锁\n </template>\n <template v-else>\n <lock-outlined />\n 锁定\n </template>\n </a-menu-item>\n <a-sub-menu key=\"layer\" title=\"图层\">\n <template #icon>\n <appstore-outlined />\n </template>\n <a-menu-item key=\"bringToFront\" @click=\"handleLayer('top')\">\n <vertical-align-top-outlined />\n 置于顶层\n </a-menu-item>\n <a-menu-item key=\"sendToBack\" @click=\"handleLayer('bottom')\">\n <vertical-align-bottom-outlined />\n 置于底层\n </a-menu-item>\n <a-menu-item key=\"bringForward\" @click=\"handleLayer('up')\">\n <arrow-up-outlined />\n 上移一层\n </a-menu-item>\n <a-menu-item key=\"sendBackward\" @click=\"handleLayer('down')\">\n <arrow-down-outlined />\n 下移一层\n </a-menu-item>\n </a-sub-menu>\n <a-menu-divider />\n <a-menu-item key=\"delete\" @click=\"handleDelete\">\n <delete-outlined />\n 删除\n </a-menu-item>\n </a-menu>\n </template>\n </a-dropdown>\n</template>\n\n<script lang=\"ts\" setup>\n import { Widget } from '@/types/schema';\n import {\n DeleteOutlined,\n LockOutlined,\n UnlockOutlined,\n VerticalAlignTopOutlined,\n VerticalAlignBottomOutlined,\n ArrowUpOutlined,\n ArrowDownOutlined,\n AppstoreOutlined\n } from '@ant-design/icons-vue';\n import { useDesigner } from '../../../../hooks/useDesigner';\n\n defineOptions({\n name: 'WidgetContextMenu'\n });\n\n const props = defineProps<{\n widget: Widget;\n index: number;\n visible: boolean;\n x: number;\n y: number;\n }>();\n const { designer, onDragUpdate } = useDesigner();\n const emit = defineEmits<{\n (e: 'update:visible', visible: boolean): void;\n }>();\n\n const handleVisibleChange = (val: boolean) => {\n emit('update:visible', val);\n };\n\n const handleLock = () => {\n const widget = props.widget;\n widget.options.locked = !widget.options.locked;\n handleVisibleChange(false);\n };\n\n const handleLayer = (type: 'top' | 'bottom' | 'up' | 'down') => {\n const widget = props.widget;\n const zIndex = widget.options.zIndex || 0;\n const list = designer.value.widgetList;\n switch (type) {\n case 'top':\n const maxZ = Math.max(...list.map(w => w.options.zIndex || 0));\n widget.options.zIndex = maxZ + 1;\n break;\n case 'bottom':\n const minZ = Math.min(...list.map(w => w.options.zIndex || 0));\n widget.options.zIndex = minZ - 1;\n break;\n case 'up':\n widget.options.zIndex = zIndex + 1;\n break;\n case 'down':\n widget.options.zIndex = zIndex - 1;\n break;\n }\n handleVisibleChange(false);\n };\n\n const handleDelete = () => {\n designer.value.widgetList.splice(props.index, 1);\n handleVisibleChange(false);\n };\n</script>\n\n<style scoped>\n .context-menu-trigger {\n width: 1px;\n height: 1px;\n z-index: 9999;\n }\n</style>\n"],"names":["props","__props","designer","useDesigner","emit","__emit","handleVisibleChange","val","handleLock","widget","handleLayer","type","zIndex","list","maxZ","w","minZ","handleDelete","_createBlock","_component_a_dropdown","visible","_createVNode","_component_a_menu","_component_a_menu_item","_createElementBlock","_Fragment","_unref","UnlockOutlined","LockOutlined","_component_a_sub_menu","AppstoreOutlined","VerticalAlignTopOutlined","VerticalAlignBottomOutlined","ArrowUpOutlined","ArrowDownOutlined","_component_a_menu_divider","DeleteOutlined","_createElementVNode","_normalizeStyle","x","y"],"mappings":";;;;;;;;;;;;;;;AAmEI,UAAMA,IAAQC,GAOR,EAAE,UAAAC,EAAuB,IAAIC,EAAA,GAC7BC,IAAOC,GAIPC,IAAsB,CAACC,MAAiB;AAC1C,MAAAH,EAAK,kBAAkBG,CAAG;AAAA,IAC9B,GAEMC,IAAa,MAAM;AACrB,YAAMC,IAAST,EAAM;AACrB,MAAAS,EAAO,QAAQ,SAAS,CAACA,EAAO,QAAQ,QACxCH,EAAoB,EAAK;AAAA,IAC7B,GAEMI,IAAc,CAACC,MAA2C;AAC5D,YAAMF,IAAST,EAAM,QACfY,IAASH,EAAO,QAAQ,UAAU,GAClCI,IAAOX,EAAS,MAAM;AAC5B,cAAQS,GAAA;AAAA,QACJ,KAAK;AACD,gBAAMG,IAAO,KAAK,IAAI,GAAGD,EAAK,IAAI,CAAAE,MAAKA,EAAE,QAAQ,UAAU,CAAC,CAAC;AAC7D,UAAAN,EAAO,QAAQ,SAASK,IAAO;AAC/B;AAAA,QACJ,KAAK;AACD,gBAAME,IAAO,KAAK,IAAI,GAAGH,EAAK,IAAI,CAAAE,MAAKA,EAAE,QAAQ,UAAU,CAAC,CAAC;AAC7D,UAAAN,EAAO,QAAQ,SAASO,IAAO;AAC/B;AAAA,QACJ,KAAK;A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W,QAAA;AAAA,kBAAA;+BAC7C,MAAkC;AAAA,sBAAlCW,EAAkCK,EAAAM,CAAA,CAAA;AAAA,wCAAA,QAEtC;AAAA,oBAAA;;;;kBACAX,EAGcE,GAAA;AAAA,oBAHD,KAAI;AAAA,oBAAgB,gCAAOb,EAAW,IAAA;AAAA,kBAAA;+BAC/C,MAAqB;AAAA,sBAArBW,EAAqBK,EAAAO,CAAA,CAAA;AAAA,wCAAA,QAEzB;AAAA,oBAAA;;;;kBACAZ,EAGcE,GAAA;AAAA,oBAHD,KAAI;AAAA,oBAAgB,gCAAOb,EAAW,MAAA;AAAA,kBAAA;+BAC/C,MAAuB;AAAA,sBAAvBW,EAAuBK,EAAAQ,CAAA,CAAA;AAAA,wCAAA,QAE3B;AAAA,oBAAA;;;;;;;cAEJb,EAAkBc,CAAA;AAAA,cAClBd,EAGcE,GAAA;AAAA,gBAHD,KAAI;AAAA,gBAAU,SAAON;AAAA,cAAA;2BAC9B,MAAmB;AAAA,kBAAnBI,EAAmBK,EAAAU,CAAA,CAAA;AAAA,sCAAA,MAEvB;AAAA,gBAAA;;;;;;;;mBAzCR,MAGO;AAAA,UAHPC,EAGO,OAAA;AAAA,YAFH,OAAM;AAAA,YACL,OAAKC,EAAA,EAAA,UAAA,SAAA,MAA6BC,EAAAA,IAAC,MAAA,KAAcC,EAAAA,IAAC,MAAA;AAAA,UAAA;;;;;;;"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { debounce as h } from "lodash-es";
|
|
2
|
-
import { ref as n } from "vue";
|
|
3
|
-
function C() {
|
|
4
|
-
const t = n(0.5), o = n({
|
|
5
|
-
lines: { h: [], v: [] },
|
|
6
|
-
//不能直接写{}不然删除有问题
|
|
7
|
-
width: 1920,
|
|
8
|
-
height: 1080,
|
|
9
|
-
canvasWidth: 1920,
|
|
10
|
-
canvasHeight: 1080,
|
|
11
|
-
isShowReferLine: !0,
|
|
12
|
-
showRuler: !0,
|
|
13
|
-
gridRatio: 1,
|
|
14
|
-
thick: 22,
|
|
15
|
-
panzoomOption: {
|
|
16
|
-
canvas: !0,
|
|
17
|
-
maxScale: 3,
|
|
18
|
-
miniScale: 0.3,
|
|
19
|
-
disablePan: !1,
|
|
20
|
-
disableZoom: !1,
|
|
21
|
-
contain: "none"
|
|
22
|
-
},
|
|
23
|
-
shadow: {
|
|
24
|
-
x: 0,
|
|
25
|
-
y: 0,
|
|
26
|
-
width: 0,
|
|
27
|
-
height: 0
|
|
28
|
-
},
|
|
29
|
-
palette: {
|
|
30
|
-
bgColor: "#f5f5f5",
|
|
31
|
-
longfgColor: "#BABBBC",
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
shortfgColor: "#C8CDD0",
|
|
34
|
-
fontColor: "#7D8694",
|
|
35
|
-
shadowColor: "#E8E8E8",
|
|
36
|
-
lineColor: "#51d6a9",
|
|
37
|
-
borderColor: "#DADADC",
|
|
38
|
-
cornerActiveColor: "#fff",
|
|
39
|
-
fontSize: 12
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
let e = null;
|
|
43
|
-
return {
|
|
44
|
-
scale: t,
|
|
45
|
-
disconnectObserver: () => {
|
|
46
|
-
e && e.disconnect();
|
|
47
|
-
},
|
|
48
|
-
resizeObserver: e,
|
|
49
|
-
onResizeObserver: (r) => {
|
|
50
|
-
if (r.value) {
|
|
51
|
-
const i = h((s) => {
|
|
52
|
-
for (const l of s) {
|
|
53
|
-
const { width: a, height: c } = l.contentRect;
|
|
54
|
-
o.value.width = a, o.value.height = c;
|
|
55
|
-
}
|
|
56
|
-
}, 100);
|
|
57
|
-
e = new ResizeObserver(i), e.observe(r.value);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
rulerConfig: o
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
C as useRuler
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=useRuler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRuler.js","sources":["../../../../../../src/components/form-designer/form-widget/bi/useRuler.ts"],"sourcesContent":["import { debounce } from 'lodash-es';\nimport { Ref, ref } from 'vue';\nimport { SketchRulerProps } from 'vue3-sketch-ruler';\n\nexport function useRuler() {\n const scale = ref(0.5);\n const rulerConfig = ref<SketchRulerProps>({\n lines: { h: [], v: [] }, //不能直接写{}不然删除有问题\n width: 1920,\n height: 1080,\n canvasWidth: 1920,\n canvasHeight: 1080,\n isShowReferLine: true,\n showRuler: true,\n gridRatio: 1,\n thick: 22,\n panzoomOption: {\n canvas: true,\n maxScale: 3,\n miniScale: 0.3,\n disablePan: false,\n disableZoom: false,\n contain: 'none'\n },\n shadow: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n palette: {\n bgColor: '#f5f5f5',\n longfgColor: '#BABBBC',\n // @ts-ignore\n shortfgColor: '#C8CDD0',\n fontColor: '#7D8694',\n shadowColor: '#E8E8E8',\n lineColor: '#51d6a9',\n borderColor: '#DADADC',\n cornerActiveColor: '#fff',\n fontSize: 12\n }\n });\n\n let resizeObserver: ResizeObserver | null = null;\n\n const onResizeObserver = (containerRef: Ref<HTMLElement | null>) => {\n if (containerRef.value) {\n const handleResize = debounce((entries: ResizeObserverEntry[]) => {\n for (const entry of entries) {\n const { width, height } = entry.contentRect;\n rulerConfig.value.width = width;\n rulerConfig.value.height = height;\n }\n }, 100);\n resizeObserver = new ResizeObserver(handleResize);\n resizeObserver.observe(containerRef.value);\n }\n };\n\n const disconnectObserver = () => {\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n\n return {\n scale,\n disconnectObserver,\n resizeObserver,\n onResizeObserver,\n rulerConfig\n };\n}\n"],"names":["useRuler","scale","ref","rulerConfig","resizeObserver","containerRef","handleResize","debounce","entries","entry","width","height"],"mappings":";;AAIO,SAASA,IAAW;AACvB,QAAMC,IAAQC,EAAI,GAAG,GACfC,IAAcD,EAAsB;AAAA,IACtC,OAAO,EAAE,GAAG,IAAI,GAAG,CAAA,EAA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p, createElementVNode as i, createVNode as g, createTextVNode as u, toDisplayString as f } from "vue";
|
|
2
|
-
import { SvgIcon as _ } from "tmgc2-share";
|
|
3
|
-
import { useI18n as h } from "../../../../utils/i18n.js";
|
|
4
|
-
import v from "../../../../lib/vuedraggable/src/vuedraggable.js";
|
|
5
|
-
import { useDesigner as k } from "../../../../hooks/useDesigner.js";
|
|
6
|
-
const y = ["title", "onDblclick"], V = /* @__PURE__ */ c({
|
|
7
|
-
name: "PanelItemDrag",
|
|
8
|
-
__name: "PanelItemDrag",
|
|
9
|
-
props: {
|
|
10
|
-
items: {}
|
|
11
|
-
},
|
|
12
|
-
setup(C) {
|
|
13
|
-
const { i18n2t: l } = h(), { designer: o } = k(), s = (e) => o.value.copyWidget(e), a = (e) => o.value.checkWidgetMove(e), r = (e) => {
|
|
14
|
-
o.value.addWidget(e);
|
|
15
|
-
};
|
|
16
|
-
return (e, D) => (d(), m(n(v), {
|
|
17
|
-
tag: "ul",
|
|
18
|
-
list: e.items,
|
|
19
|
-
"item-key": "key",
|
|
20
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
21
|
-
clone: s,
|
|
22
|
-
"ghost-class": "ghost",
|
|
23
|
-
sort: !1,
|
|
24
|
-
move: a
|
|
25
|
-
}, {
|
|
26
|
-
item: p(({ element: t }) => [
|
|
27
|
-
i("li", {
|
|
28
|
-
class: "container-widget-item",
|
|
29
|
-
title: t.displayName,
|
|
30
|
-
onDblclick: (b) => r(t)
|
|
31
|
-
}, [
|
|
32
|
-
i("span", null, [
|
|
33
|
-
g(n(_), {
|
|
34
|
-
"icon-class": "icon-" + t.icon,
|
|
35
|
-
class: "color-svg-icon"
|
|
36
|
-
}, null, 8, ["icon-class"]),
|
|
37
|
-
u(" " + f(n(l)(
|
|
38
|
-
`designer.widgetLabel.${t.type}`,
|
|
39
|
-
`extension.widgetLabel.${t.type}`
|
|
40
|
-
)), 1)
|
|
41
|
-
])
|
|
42
|
-
], 40, y)
|
|
43
|
-
]),
|
|
44
|
-
_: 1
|
|
45
|
-
}, 8, ["list"]));
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
V as default
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=PanelItemDrag.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PanelItemDrag.vue.js","sources":["../../../../../../src/components/form-designer/setting-panel/panel/PanelItemDrag.vue"],"sourcesContent":["<template>\n <draggable\n tag=\"ul\"\n :list=\"items\"\n item-key=\"key\"\n :group=\"{ name: 'dragGroup', pull: 'clone', put: false }\"\n :clone=\"handleContainerWidgetClone\"\n ghost-class=\"ghost\"\n :sort=\"false\"\n :move=\"checkContainerMove\"\n >\n <template #item=\"{ element: ctn }\">\n <li\n class=\"container-widget-item\"\n :title=\"ctn.displayName\"\n @dblclick=\"handleAddWidget(ctn)\"\n >\n <span>\n <svg-icon :icon-class=\"'icon-' + ctn.icon\" class=\"color-svg-icon\" />\n {{\n i18n2t(\n `designer.widgetLabel.${ctn.type}`,\n `extension.widgetLabel.${ctn.type}`\n )\n }}\n </span>\n </li>\n </template>\n </draggable>\n</template>\n<script lang=\"ts\" setup>\n import { SvgIcon } from 'tmgc2-share';\n import { useI18n } from '@/utils/i18n';\n import Draggable from '@/lib/vuedraggable/src/vuedraggable';\n import { Widget } from '@/types/schema';\n import { useDesigner } from '../../../../hooks/useDesigner';\n defineOptions({\n name: 'PanelItemDrag'\n });\n\n const { i18n2t } = useI18n();\n const { designer } = useDesigner();\n\n const props = defineProps<{\n items: any[];\n }>();\n\n const handleContainerWidgetClone = (origin: Widget) => {\n return designer.value.copyWidget(origin);\n };\n\n const checkContainerMove = evt => {\n return designer.value.checkWidgetMove(evt);\n };\n\n const handleAddWidget = ctn => {\n designer.value.addWidget(ctn);\n };\n</script>\n"],"names":["i18n2t","useI18n","designer","useDesigner","handleContainerWidgetClone","origin","checkContainerMove","evt","handleAddWidget","ctn","_createBlock","_unref","Draggable","items","_withCtx","_createElementVNode","$event","_createVNode","SvgIcon","_createTextVNode"],"mappings":";;;;;;;;;;;;AAwCI,UAAM,EAAE,QAAAA,EAAA,IAAWC,EAAA,GACb,EAAE,UAAAC,EAAA,IAAaC,EAAA,GAMfC,IAA6B,CAACC,MACzBH,EAAS,MAAM,WAAWG,CAAM,GAGrCC,IAAqB,CAAAC,MAChBL,EAAS,MAAM,gBAAgBK,CAAG,GAGvCC,IAAkB,CAAAC,MAAO;AAC3B,MAAAP,EAAS,MAAM,UAAUO,CAAG;AAAA,IAChC;2BAxDAC,EA2BYC,EAAAC,CAAA,GAAA;AAAA,MA1BR,KAAI;AAAA,MACH,MAAMC,EAAAA;AAAAA,MACP,YAAS;AAAA,MACR,OAAO,EAAA,MAAA,aAAA,MAAA,SAAA,KAAA,GAAA;AAAA,MACP,OAAOT;AAAA,MACR,eAAY;AAAA,MACX,MAAM;AAAA,MACN,MAAME;AAAA,IAAA;MAEI,MAAIQ,EACX,CAcK,EAAA,SAfmBL,QAAG;AAAA,QAC3BM,EAcK,MAAA;AAAA,UAbD,OAAM;AAAA,UACL,OAAON,EAAI;AAAA,UACX,YAAQ,CAAAO,MAAER,EAAgBC,CAAG;AAAA,QAAA;UAE9BM,EAQO,QAAA,MAAA;AAAA,YAPHE,EAAoEN,EAAAO,CAAA,GAAA;AAAA,cAAzD,cAAU,UAAYT,EAAI;AAAA,cAAM,OAAM;AAAA,YAAA;YAAmBU,EAAA,QAEhER,EAAAX,CAAA;AAAA,cAA4D,wBAAAS,EAAI,IAAI;AAAA,cAAyD,yBAAAA,EAAI,IAAI;AAAA,YAAA;;;;;;;;"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, createBlock as m, openBlock as d, unref as n, withCtx as p, createElementVNode as i, createVNode as g, createTextVNode as u, toDisplayString as f } from "vue";
|
|
2
|
-
import { SvgIcon as _ } from "tmgc2-share";
|
|
3
|
-
import { useI18n as h } from "../../../../utils/i18n.js";
|
|
4
|
-
import v from "../../../../lib/vuedraggable/src/vuedraggable.js";
|
|
5
|
-
import { useDesigner as k } from "../../../../hooks/useDesigner.js";
|
|
6
|
-
const y = ["title", "onDblclick"], B = /* @__PURE__ */ c({
|
|
7
|
-
name: "PanelItemDrag",
|
|
8
|
-
__name: "PanelItemDragForBI",
|
|
9
|
-
props: {
|
|
10
|
-
items: {}
|
|
11
|
-
},
|
|
12
|
-
setup(C) {
|
|
13
|
-
const { i18n2t: l } = h(), { designer: o } = k(), r = (e) => o.value.copyWidget(e), s = (e) => o.value.checkWidgetMove(e), a = (e) => {
|
|
14
|
-
o.value.addWidget(e);
|
|
15
|
-
};
|
|
16
|
-
return (e, D) => (d(), m(n(v), {
|
|
17
|
-
tag: "ul",
|
|
18
|
-
list: e.items,
|
|
19
|
-
"item-key": "key",
|
|
20
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
21
|
-
clone: r,
|
|
22
|
-
"ghost-class": "ghost",
|
|
23
|
-
sort: !1,
|
|
24
|
-
move: s
|
|
25
|
-
}, {
|
|
26
|
-
item: p(({ element: t }) => [
|
|
27
|
-
i("li", {
|
|
28
|
-
class: "container-widget-item",
|
|
29
|
-
title: t.displayName,
|
|
30
|
-
onDblclick: (b) => a(t)
|
|
31
|
-
}, [
|
|
32
|
-
i("span", null, [
|
|
33
|
-
g(n(_), {
|
|
34
|
-
"icon-class": "icon-" + t.icon,
|
|
35
|
-
class: "color-svg-icon"
|
|
36
|
-
}, null, 8, ["icon-class"]),
|
|
37
|
-
u(" " + f(n(l)(
|
|
38
|
-
`designer.widgetLabel.${t.type}`,
|
|
39
|
-
`extension.widgetLabel.${t.type}`
|
|
40
|
-
)), 1)
|
|
41
|
-
])
|
|
42
|
-
], 40, y)
|
|
43
|
-
]),
|
|
44
|
-
_: 1
|
|
45
|
-
}, 8, ["list"]));
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
B as default
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=PanelItemDragForBI.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PanelItemDragForBI.vue.js","sources":["../../../../../../src/components/form-designer/setting-panel/panel/PanelItemDragForBI.vue"],"sourcesContent":["<template>\n <draggable\n tag=\"ul\"\n :list=\"items\"\n item-key=\"key\"\n :group=\"{ name: 'dragGroup', pull: 'clone', put: false }\"\n :clone=\"handleContainerWidgetClone\"\n ghost-class=\"ghost\"\n :sort=\"false\"\n :move=\"checkContainerMove\"\n >\n <template #item=\"{ element: ctn }\">\n <li\n class=\"container-widget-item\"\n :title=\"ctn.displayName\"\n @dblclick=\"handleAddWidget(ctn)\"\n >\n <span>\n <svg-icon :icon-class=\"'icon-' + ctn.icon\" class=\"color-svg-icon\" />\n {{\n i18n2t(\n `designer.widgetLabel.${ctn.type}`,\n `extension.widgetLabel.${ctn.type}`\n )\n }}\n </span>\n </li>\n </template>\n </draggable>\n</template>\n<script lang=\"ts\" setup>\n import { SvgIcon } from 'tmgc2-share';\n import { useI18n } from '@/utils/i18n';\n import Draggable from '@/lib/vuedraggable/src/vuedraggable';\n import { Widget } from '@/types/schema';\n import { useDesigner } from '../../../../hooks/useDesigner';\n defineOptions({\n name: 'PanelItemDrag'\n });\n\n const { i18n2t } = useI18n();\n const { designer } = useDesigner();\n\n const props = defineProps<{\n items: any[];\n }>();\n\n const handleContainerWidgetClone = (origin: Widget) => {\n return designer.value.copyWidget(origin);\n };\n\n const checkContainerMove = evt => {\n return designer.value.checkWidgetMove(evt);\n };\n\n const handleAddWidget = ctn => {\n designer.value.addWidget(ctn);\n };\n</script>\n\n<style lang=\"scss\" scoped></style>\n"],"names":["i18n2t","useI18n","designer","useDesigner","handleContainerWidgetClone","origin","checkContainerMove","evt","handleAddWidget","ctn","_createBlock","_unref","Draggable","items","_withCtx","_createElementVNode","$event","_createVNode","SvgIcon","_createTextVNode"],"mappings":";;;;;;;;;;;;AAwCI,UAAM,EAAE,QAAAA,EAAA,IAAWC,EAAA,GACb,EAAE,UAAAC,EAAA,IAAaC,EAAA,GAMfC,IAA6B,CAACC,MACzBH,EAAS,MAAM,WAAWG,CAAM,GAGrCC,IAAqB,CAAAC,MAChBL,EAAS,MAAM,gBAAgBK,CAAG,GAGvCC,IAAkB,CAAAC,MAAO;AAC3B,MAAAP,EAAS,MAAM,UAAUO,CAAG;AAAA,IAChC;2BAxDAC,EA2BYC,EAAAC,CAAA,GAAA;AAAA,MA1BR,KAAI;AAAA,MACH,MAAMC,EAAAA;AAAAA,MACP,YAAS;AAAA,MACR,OAAO,EAAA,MAAA,aAAA,MAAA,SAAA,KAAA,GAAA;AAAA,MACP,OAAOT;AAAA,MACR,eAAY;AAAA,MACX,MAAM;AAAA,MACN,MAAME;AAAA,IAAA;MAEI,MAAIQ,EACX,CAcK,EAAA,SAfmBL,QAAG;AAAA,QAC3BM,EAcK,MAAA;AAAA,UAbD,OAAM;AAAA,UACL,OAAON,EAAI;AAAA,UACX,YAAQ,CAAAO,MAAER,EAAgBC,CAAG;AAAA,QAAA;UAE9BM,EAQO,QAAA,MAAA;AAAA,YAPHE,EAAoEN,EAAAO,CAAA,GAAA;AAAA,cAAzD,cAAU,UAAYT,EAAI;AAAA,cAAM,OAAM;AAAA,YAAA;YAAmBU,EAAA,QAEhER,EAAAX,CAAA;AAAA,cAA4D,wBAAAS,EAAI,IAAI;AAAA,cAAyD,yBAAAA,EAAI,IAAI;AAAA,YAAA;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PanelItemDragForBI.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dsEnabled-editor.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, mergeModels as E, useModel as M, resolveComponent as d, createElementBlock as k, openBlock as l, Fragment as v, createVNode as i, createBlock as m, createCommentVNode as p, unref as t, withCtx as a, createTextVNode as h, toDisplayString as y } from "vue";
|
|
2
|
-
import { useI18n as C } from "../../../../utils/i18n.js";
|
|
3
|
-
import { EditorTypeEnum as w } from "../../../../constants/EditorTypeEnum.js";
|
|
4
|
-
import B from "../../../http-editor/index.vue.js";
|
|
5
|
-
import { useEmitter as x } from "../../../../utils/useEmitter.js";
|
|
6
|
-
const I = /* @__PURE__ */ _({
|
|
7
|
-
name: w.dsEnabledEditor,
|
|
8
|
-
inheritAttrs: !1,
|
|
9
|
-
__name: "dsEnabled-editor",
|
|
10
|
-
props: /* @__PURE__ */ E({
|
|
11
|
-
selectedWidget: {}
|
|
12
|
-
}, {
|
|
13
|
-
optionModel: {
|
|
14
|
-
type: Object,
|
|
15
|
-
required: !0,
|
|
16
|
-
default: () => ({ showPagination: Boolean, pagination: {} })
|
|
17
|
-
},
|
|
18
|
-
optionModelModifiers: {}
|
|
19
|
-
}),
|
|
20
|
-
emits: ["update:optionModel"],
|
|
21
|
-
setup(c) {
|
|
22
|
-
const e = M(c, "optionModel"), { i18nt: o } = C(), { onChangeEditEventHandler: u } = x();
|
|
23
|
-
return (f, n) => {
|
|
24
|
-
const g = d("a-switch"), r = d("a-form-item"), b = d("a-button");
|
|
25
|
-
return l(), k(v, null, [
|
|
26
|
-
i(r, {
|
|
27
|
-
label: t(o)("designer.setting.dsEnabled")
|
|
28
|
-
}, {
|
|
29
|
-
default: a(() => [
|
|
30
|
-
i(g, {
|
|
31
|
-
checked: e.value.dsEnabled,
|
|
32
|
-
"onUpdate:checked": n[0] || (n[0] = (s) => e.value.dsEnabled = s)
|
|
33
|
-
}, null, 8, ["checked"])
|
|
34
|
-
]),
|
|
35
|
-
_: 1
|
|
36
|
-
}, 8, ["label"]),
|
|
37
|
-
e.value.dsEnabled ? p("", !0) : (l(), m(r, {
|
|
38
|
-
key: 0,
|
|
39
|
-
label: t(o)("designer.setting.tableDataEdit")
|
|
40
|
-
}, {
|
|
41
|
-
default: a(() => [
|
|
42
|
-
i(b, {
|
|
43
|
-
type: "primary",
|
|
44
|
-
shape: "round",
|
|
45
|
-
onClick: n[1] || (n[1] = (s) => t(u)({
|
|
46
|
-
attr: "dataSource",
|
|
47
|
-
mode: "json"
|
|
48
|
-
}))
|
|
49
|
-
}, {
|
|
50
|
-
default: a(() => [
|
|
51
|
-
h(y(t(o)("designer.setting.editAction")), 1)
|
|
52
|
-
]),
|
|
53
|
-
_: 1
|
|
54
|
-
})
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, ["label"])),
|
|
58
|
-
e.value.dsEnabled ? (l(), m(B, {
|
|
59
|
-
key: 1,
|
|
60
|
-
label: t(o)("designer.setting.editAPIConfig"),
|
|
61
|
-
"selected-widget": f.selectedWidget,
|
|
62
|
-
optionModel: e.value
|
|
63
|
-
}, null, 8, ["label", "selected-widget", "optionModel"])) : p("", !0)
|
|
64
|
-
], 64);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
export {
|
|
69
|
-
I as default
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=dsEnabled-editor.vue2.js.map
|
package/src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue2.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dsEnabled-editor.vue2.js","sources":["../../../../../../src/components/form-designer/setting-panel/property-editor/dsEnabled-editor.vue"],"sourcesContent":["<template>\n <a-form-item :label=\"i18nt('designer.setting.dsEnabled')\">\n <a-switch v-model:checked=\"optionModel.dsEnabled\" />\n </a-form-item>\n <a-form-item v-if=\"!optionModel.dsEnabled\" :label=\"i18nt('designer.setting.tableDataEdit')\">\n <a-button\n type=\"primary\"\n shape=\"round\"\n @click=\"\n onChangeEditEventHandler({\n attr: 'dataSource',\n mode: 'json'\n })\n \"\n >\n {{ i18nt('designer.setting.editAction') }}\n </a-button>\n </a-form-item>\n\n <HttpEditor\n :label=\"i18nt('designer.setting.editAPIConfig')\"\n v-if=\"!!optionModel.dsEnabled\"\n :selected-widget=\"selectedWidget\"\n :optionModel=\"optionModel\"\n />\n</template>\n\n<script lang=\"ts\" setup>\n import { useI18n } from '@/utils/i18n';\n import { EditorTypeEnum } from '@/constants/EditorTypeEnum';\n import HttpEditor from '@/components/http-editor/index.vue';\n import { type EditorPros } from '@/components/form-designer/setting-panel/property-editor/useEditor';\n import { useDesigner } from '@/hooks/useDesigner';\n import { useEmitter } from '@/utils/useEmitter';\n\n defineOptions({\n name: EditorTypeEnum.dsEnabledEditor,\n inheritAttrs: false\n });\n const { selectedWidget } = defineProps<EditorPros>();\n const optionModel = defineModel('optionModel', {\n type: Object,\n required: true,\n default: () => ({ showPagination: Boolean, pagination: {} })\n });\n\n const { i18nt } = useI18n();\n\n const { onChangeEditEventHandler } = useEmitter();\n</script>\n"],"names":["optionModel","_useModel","__props","i18nt","useI18n","onChangeEditEventHandler","useEmitter","_createVNode","_component_a_form_item","_unref","_component_a_switch","_cache","$event","_createBlock","_component_a_button","HttpEditor","selectedWidget"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCI,UAAMA,IAAcC,EAAWC,GAAC,aAI/B,GAEK,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZ,EAAE,0BAAAC,EAAA,IAA6BC,EAAA;;;;QA/CrCC,EAEcC,GAAA;AAAA,UAFA,OAAOC,EAAAN,CAAA,EAAK,4BAAA;AAAA,QAAA;qBACtB,MAAoD;AAAA,YAApDI,EAAoDG,GAAA;AAAA,cAAlC,SAASV,EAAA,MAAY;AAAA,cAAZ,oBAAAW,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAZ,EAAA,MAAY,YAASY;AAAA,YAAA;;;;QAEhCZ,EAAA,MAAY,8BAAhCa,EAacL,GAAA;AAAA;UAb8B,OAAOC,EAAAN,CAAA,EAAK,gCAAA;AAAA,QAAA;qBACpD,MAWW;AAAA,YAXXI,EAWWO,GAAA;AAAA,cAVP,MAAK;AAAA,cACL,OAAM;AAAA,cACL,SAAKH,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAmBH,EAAAJ,CAAA,EAAwB;AAAA;;;;yBAOjD,MAA0C;AAAA,oBAAvCI,EAAAN,CAAA,EAAK,6BAAA,CAAA,GAAA,CAAA;AAAA,cAAA;;;;;;QAMJH,EAAA,MAAY,kBAFxBa,EAKEE,GAAA;AAAA;UAJG,OAAON,EAAAN,CAAA,EAAK,gCAAA;AAAA,UAEZ,mBAAiBa,EAAAA;AAAAA,UACjB,aAAahB,EAAA;AAAA,QAAA;;;;;"}
|