@epxing/designer 0.0.0-stage → 5.3.0-beta.2
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/API.md +160 -0
- package/README.md +45 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/preload-helper.js +88 -0
- package/dist/assets/default-icon-2193FMjv.png +0 -0
- package/dist/assets/technology_bg-oWIS2awO.jpg +0 -0
- package/dist/assets/theme_black-Ctdygcr4.png +0 -0
- package/dist/assets/theme_technology-DJk-2e7g.png +0 -0
- package/dist/assets/theme_white-uMQ6JYml.png +0 -0
- package/dist/src/assets/images/dashboard/theme_black.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_technology.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_white.png.js +4 -0
- package/dist/src/assets/images/default-icon.png.js +4 -0
- package/dist/src/index.js +53 -0
- package/dist/src/page-designer/PageConfigPreview.js +102 -0
- package/dist/src/page-designer/PageDesigner.js +844 -0
- package/dist/src/page-designer/designer.js +1120 -0
- package/dist/src/page-designer/index.js +52 -0
- package/dist/src/page-designer/mixins/dragSourceMixin.js +95 -0
- package/dist/src/page-designer/page-variable-panel/JsonEditor.js +106 -0
- package/dist/src/page-designer/page-variable-panel/PageVariablePanel.js +939 -0
- package/dist/src/page-designer/page-variable-panel/index.js +7 -0
- package/dist/src/page-designer/page-variable-panel/jsonlint.js +230 -0
- package/dist/src/page-designer/previews/add-form/Preview.js +8 -0
- package/dist/src/page-designer/previews/add-form/Preview.vue.js +328 -0
- package/dist/src/page-designer/previews/add-form-item/Preview.js +194 -0
- package/dist/src/page-designer/previews/button/Preview.js +30 -0
- package/dist/src/page-designer/previews/card/Preview.js +87 -0
- package/dist/src/page-designer/previews/carousel/CarouselItemPreview.js +33 -0
- package/dist/src/page-designer/previews/carousel/Preview.js +61 -0
- package/dist/src/page-designer/previews/collapse/CollapseItemPreview.js +118 -0
- package/dist/src/page-designer/previews/collapse/Preview.js +35 -0
- package/dist/src/page-designer/previews/dropdown/Preview.js +68 -0
- package/dist/src/page-designer/previews/entity-list/Preview.js +522 -0
- package/dist/src/page-designer/previews/entity-sub-list/Preview.js +352 -0
- package/dist/src/page-designer/previews/entity-virtual-list/Preview.js +11 -0
- package/dist/src/page-designer/previews/form-field/preview/Checkbox.js +91 -0
- package/dist/src/page-designer/previews/form-field/preview/Date.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Input.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/InputNumber.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/Object.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Radio.js +146 -0
- package/dist/src/page-designer/previews/form-field/preview/Select.js +78 -0
- package/dist/src/page-designer/previews/form-field/preview/Textarea.js +78 -0
- package/dist/src/page-designer/previews/grid/Preview.js +139 -0
- package/dist/src/page-designer/previews/html/Preview.js +18 -0
- package/dist/src/page-designer/previews/icon/Preview.js +20 -0
- package/dist/src/page-designer/previews/image/Preview.js +36 -0
- package/dist/src/page-designer/previews/index.js +74 -0
- package/dist/src/page-designer/previews/layout/ColumnPreview.js +47 -0
- package/dist/src/page-designer/previews/layout/Preview.js +110 -0
- package/dist/src/page-designer/previews/num/Preview.js +132 -0
- package/dist/src/page-designer/previews/page-tabs/Preview.js +75 -0
- package/dist/src/page-designer/previews/step/Preview.js +207 -0
- package/dist/src/page-designer/previews/tabs/Preview.js +95 -0
- package/dist/src/page-designer/previews/tabs/tab-pane/Preview.js +33 -0
- package/dist/src/page-designer/previews/text/Preview.js +38 -0
- package/dist/src/page-designer/previews/text-editor/Preview.js +23 -0
- package/dist/src/page-designer/previews/video/Preview.js +10 -0
- package/dist/src/page-designer/setting-panel/Advance.js +281 -0
- package/dist/src/page-designer/setting-panel/CodeEditor.js +94 -0
- package/dist/src/page-designer/setting-panel/Property.js +165 -0
- package/dist/src/page-designer/setting-panel/Setting.js +296 -0
- package/dist/src/page-designer/setting-panel/Style.js +1591 -0
- package/dist/src/page-designer/setting-panel/css-editor/CssEditor.js +98 -0
- package/dist/src/page-designer/setting-panel/css-editor/css-hint.js +84 -0
- package/dist/src/page-designer/setting-panel/index.js +11 -0
- package/dist/src/page-designer/template-attribute-panel/TemplateAttributePanel.js +487 -0
- package/dist/src/page-designer/template-attribute-panel/index.js +5 -0
- package/dist/src/page-designer/template-library/Library.js +219 -0
- package/dist/src/page-designer/template-library/index.js +5 -0
- package/dist/src/page-designer/widget-library/Base.js +170 -0
- package/dist/src/page-designer/widget-library/Library.js +213 -0
- package/dist/src/page-designer/widget-library/index.js +7 -0
- package/dist/src/page-designer/widget-preview/Container.js +80 -0
- package/dist/src/page-designer/widget-preview/DragGhost.js +54 -0
- package/dist/src/page-designer/widget-preview/DropZoneOverlay.js +42 -0
- package/dist/src/page-designer/widget-preview/HoverOverlay.js +61 -0
- package/dist/src/page-designer/widget-preview/Mixin.js +260 -0
- package/dist/src/page-designer/widget-preview/Placeholder.js +28 -0
- package/dist/src/page-designer/widget-preview/Preview.js +277 -0
- package/dist/src/page-designer/widget-preview/PreviewItem.js +83 -0
- package/dist/src/page-designer/widget-preview/SelectedOverlay.js +332 -0
- package/dist/src/page-designer/widget-preview/Template.js +66 -0
- package/dist/src/page-designer/widget-preview/WidgetWrapper.js +170 -0
- package/dist/src/page-designer/widget-preview/directive.js +159 -0
- package/dist/src/page-designer/widget-preview/dropPosition.js +50 -0
- package/dist/src/page-designer/widget-preview/index.js +23 -0
- package/dist/src/page-designer/widget-preview/overlayPositionMixin.js +87 -0
- package/dist/src/page-designer/widget-preview/resolvePreviewName.js +32 -0
- package/dist/src/page-designer/widget-tree/Item.js +580 -0
- package/dist/src/page-designer/widget-tree/Tree.js +855 -0
- package/dist/src/page-designer/widget-tree/index.js +7 -0
- package/dist/src/visual/AddForm.js +172 -0
- package/dist/src/visual/AddFormItem.js +480 -0
- package/dist/src/visual/AppIndex.js +243 -0
- package/dist/src/visual/ApplyForm.js +135 -0
- package/dist/src/visual/AttributeList.js +344 -0
- package/dist/src/visual/BasePage.js +77 -0
- package/dist/src/visual/Button.js +5 -0
- package/dist/src/visual/Button.vue.js +89 -0
- package/dist/src/visual/CardNum.js +74 -0
- package/dist/src/visual/CategoryList.js +569 -0
- package/dist/src/visual/Chart.js +27 -0
- package/dist/src/visual/ChartNew.js +5 -0
- package/dist/src/visual/ChartNew.vue.js +54 -0
- package/dist/src/visual/CheckForm.js +110 -0
- package/dist/src/visual/ClientList.js +41 -0
- package/dist/src/visual/CodeManage.js +113 -0
- package/dist/src/visual/Component.js +6 -0
- package/dist/src/visual/Component.vue.js +1332 -0
- package/dist/src/visual/ComponentList.js +280 -0
- package/dist/src/visual/Config.js +8 -0
- package/dist/src/visual/Config.vue.js +862 -0
- package/dist/src/visual/ConfigItem.js +8 -0
- package/dist/src/visual/ConfigItem.vue.js +192 -0
- package/dist/src/visual/ConfigSelectItems.js +8 -0
- package/dist/src/visual/ConfigSelectItems.vue.js +260 -0
- package/dist/src/visual/CreatePage.js +389 -0
- package/dist/src/visual/DashboardDiv.js +58 -0
- package/dist/src/visual/DashboardTabs.js +9 -0
- package/dist/src/visual/DashboardTabs.vue.js +127 -0
- package/dist/src/visual/DashboardWidget.js +5 -0
- package/dist/src/visual/DashboardWidget.vue.js +62 -0
- package/dist/src/visual/DblogList.js +82 -0
- package/dist/src/visual/EntityAddPage.js +49 -0
- package/dist/src/visual/EntityApplyPage.js +54 -0
- package/dist/src/visual/EntityCardList.js +455 -0
- package/dist/src/visual/EntityCheckPage.js +66 -0
- package/dist/src/visual/EntityFindPage.js +45 -0
- package/dist/src/visual/EntityList.js +6 -0
- package/dist/src/visual/EntityList.vue.js +1221 -0
- package/dist/src/visual/EntityListPage.js +43 -0
- package/dist/src/visual/EntityNoSubmitSubList.js +267 -0
- package/dist/src/visual/EntityRightSubList.js +29 -0
- package/dist/src/visual/EntitySubAdd.js +10 -0
- package/dist/src/visual/EntitySubGridItem.js +66 -0
- package/dist/src/visual/EntitySubList.js +434 -0
- package/dist/src/visual/EntityTreeFindPage.js +32 -0
- package/dist/src/visual/EntityTreeManage.js +49 -0
- package/dist/src/visual/EntityTreePage.js +42 -0
- package/dist/src/visual/ExcelPreview.js +10 -0
- package/dist/src/visual/FormField.js +5 -0
- package/dist/src/visual/FormField.vue.js +121 -0
- package/dist/src/visual/HeaderNew.js +161 -0
- package/dist/src/visual/Html.js +8 -0
- package/dist/src/visual/Html.vue.js +109 -0
- package/dist/src/visual/Import.js +53 -0
- package/dist/src/visual/InterfaceSubList.js +21 -0
- package/dist/src/visual/ListFirst.js +704 -0
- package/dist/src/visual/MEntityAddPage.js +66 -0
- package/dist/src/visual/MEntityList.js +485 -0
- package/dist/src/visual/MEntityListPage.js +40 -0
- package/dist/src/visual/MEntitySubList.js +237 -0
- package/dist/src/visual/MetaList.js +23 -0
- package/dist/src/visual/ModuleIndexPage.js +67 -0
- package/dist/src/visual/ModuleList.js +47 -0
- package/dist/src/visual/NavAddForm.js +173 -0
- package/dist/src/visual/NavFormCatalogItem.js +44 -0
- package/dist/src/visual/NumItem.js +70 -0
- package/dist/src/visual/NumStatistic.js +6 -0
- package/dist/src/visual/NumStatistic.vue.js +81 -0
- package/dist/src/visual/OrgChart.js +107 -0
- package/dist/src/visual/PageCatalog.js +27 -0
- package/dist/src/visual/PageConfig.js +223 -0
- package/dist/src/visual/PageTabs.js +49 -0
- package/dist/src/visual/Progress.js +40 -0
- package/dist/src/visual/ProgressItem.js +44 -0
- package/dist/src/visual/SystemManager.js +77 -0
- package/dist/src/visual/Title.js +45 -0
- package/dist/src/visual/TodoList.js +14 -0
- package/dist/src/visual/UserFormItem.js +41 -0
- package/dist/src/visual/UserManage.js +35 -0
- package/dist/src/visual/chart/CircularPie.js +9 -0
- package/dist/src/visual/chart/Column.js +70 -0
- package/dist/src/visual/chart/HoriColumn.js +9 -0
- package/dist/src/visual/chart/Line.js +9 -0
- package/dist/src/visual/chart/Pie.js +9 -0
- package/dist/src/visual/config/Background.js +526 -0
- package/dist/src/visual/config/Chart.js +154 -0
- package/dist/src/visual/config/Checkbox.js +63 -0
- package/dist/src/visual/config/Color.js +41 -0
- package/dist/src/visual/config/DesignReport.js +24 -0
- package/dist/src/visual/config/Event.js +304 -0
- package/dist/src/visual/config/Field.js +520 -0
- package/dist/src/visual/config/Font.js +202 -0
- package/dist/src/visual/config/FormItem.js +23 -0
- package/dist/src/visual/config/Function.js +114 -0
- package/dist/src/visual/config/Html.js +111 -0
- package/dist/src/visual/config/Image.js +102 -0
- package/dist/src/visual/config/Input.js +177 -0
- package/dist/src/visual/config/Input.vue.js +479 -0
- package/dist/src/visual/config/LazyDialog.js +41 -0
- package/dist/src/visual/config/List.js +65 -0
- package/dist/src/visual/config/ListField.js +2080 -0
- package/dist/src/visual/config/MField.js +733 -0
- package/dist/src/visual/config/Number.js +37 -0
- package/dist/src/visual/config/Object.js +168 -0
- package/dist/src/visual/config/Operate.js +1109 -0
- package/dist/src/visual/config/OperateItem.js +1186 -0
- package/dist/src/visual/config/Options.js +8 -0
- package/dist/src/visual/config/Options.vue.js +278 -0
- package/dist/src/visual/config/OrderField.js +505 -0
- package/dist/src/visual/config/Page.js +76 -0
- package/dist/src/visual/config/Params.js +353 -0
- package/dist/src/visual/config/Radio.js +127 -0
- package/dist/src/visual/config/Row.js +104 -0
- package/dist/src/visual/config/Scope.js +350 -0
- package/dist/src/visual/config/Select.js +95 -0
- package/dist/src/visual/config/Switch.js +37 -0
- package/dist/src/visual/config/Textarea.js +175 -0
- package/dist/src/visual/config/Textarea.vue.js +507 -0
- package/dist/src/visual/config/Tree.js +138 -0
- package/dist/src/visual/config/remote-cache.js +30 -0
- package/dist/src/visual/config/show-condition.js +20 -0
- package/dist/src/visual/config/variable-sources.js +27 -0
- package/dist/src/visual/config/wait-ref.js +19 -0
- package/dist/src/visual/config-page/ComponentLibrary.js +170 -0
- package/dist/src/visual/config-page/ComponentLibraryDialog.js +250 -0
- package/dist/src/visual/config-page/ComponentList.js +9 -0
- package/dist/src/visual/config-page/ComponentList.vue.js +292 -0
- package/dist/src/visual/config-page/ComponentPreview.js +8 -0
- package/dist/src/visual/config-page/ComponentPreview.vue.js +151 -0
- package/dist/src/visual/config-page/ConfigOption.js +13 -0
- package/dist/src/visual/config-page/ConfigPanel.js +302 -0
- package/dist/src/visual/config-page/Dashboard.js +2160 -0
- package/dist/src/visual/config-page/DashboardDesign.js +606 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.js +6 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.vue.js +292 -0
- package/dist/src/visual/config-page/DashboardMobile.js +1115 -0
- package/dist/src/visual/config-page/DashboardSetting.js +86 -0
- package/dist/src/visual/config-page/PagePreview.js +8 -0
- package/dist/src/visual/config-page/PagePreview.vue.js +72 -0
- package/dist/src/visual/config-page/StyleConfig.js +979 -0
- package/dist/src/visual/config-page/VisualConfigPage.js +645 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Background.js +180 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Border.js +314 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Font.js +192 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Index.js +545 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Shadow.js +174 -0
- package/dist/src/visual/config-page/index.js +90 -0
- package/dist/src/visual/index.js +151 -0
- package/dist/src/visual/mixins/innerGridMixin.js +122 -0
- package/dist/src/visual/search/Filter.js +49 -0
- package/dist/src/visual/step/Index.js +8 -0
- package/dist/src/visual/step/Index.vue.js +485 -0
- package/dist/src/visual/step/Item.js +139 -0
- package/dist/src/visual/widgets/CardFormItemVisual.js +45 -0
- package/dist/src/visual/widgets/CarouselVisual.js +8 -0
- package/dist/src/visual/widgets/CarouselVisual.vue.js +303 -0
- package/dist/src/visual/widgets/CollapseVisual.js +8 -0
- package/dist/src/visual/widgets/CollapseVisual.vue.js +202 -0
- package/dist/src/visual/widgets/DropdownVisual.js +8 -0
- package/dist/src/visual/widgets/DropdownVisual.vue.js +955 -0
- package/dist/src/visual/widgets/LayoutConfig.js +8 -0
- package/dist/src/visual/widgets/LayoutConfig.vue.js +168 -0
- package/dist/src/visual/widgets/ListVisual.js +349 -0
- package/dist/src/visual/widgets/MEntityListFindVisual.js +76 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.js +5 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.vue.js +45 -0
- package/dist/src/visual/widgets/TabsConfig.js +8 -0
- package/dist/src/visual/widgets/TabsConfig.vue.js +343 -0
- package/dist/style.css +9907 -0
- package/package.json +104 -3
- package/src/index.js +27 -0
- package/src/page-designer/PageConfigPreview.vue +103 -0
- package/src/page-designer/PageDesigner.vue +1017 -0
- package/src/page-designer/designer.js +1299 -0
- package/src/page-designer/index.js +38 -0
- package/src/page-designer/mixins/dragSourceMixin.js +113 -0
- package/src/page-designer/page-variable-panel/JsonEditor.vue +109 -0
- package/src/page-designer/page-variable-panel/PageVariablePanel.vue +781 -0
- package/src/page-designer/page-variable-panel/index.js +6 -0
- package/src/page-designer/page-variable-panel/jsonlint.js +2 -0
- package/src/page-designer/previews/add-form/Preview.vue +331 -0
- package/src/page-designer/previews/add-form-item/Preview.vue +167 -0
- package/src/page-designer/previews/button/Preview.vue +27 -0
- package/src/page-designer/previews/card/Preview.vue +78 -0
- package/src/page-designer/previews/carousel/CarouselItemPreview.vue +32 -0
- package/src/page-designer/previews/carousel/Preview.vue +36 -0
- package/src/page-designer/previews/collapse/CollapseItemPreview.vue +136 -0
- package/src/page-designer/previews/collapse/Preview.vue +28 -0
- package/src/page-designer/previews/dropdown/Preview.vue +21 -0
- package/src/page-designer/previews/entity-list/Preview.vue +382 -0
- package/src/page-designer/previews/entity-sub-list/Preview.vue +283 -0
- package/src/page-designer/previews/entity-virtual-list/Preview.vue +14 -0
- package/src/page-designer/previews/form-field/preview/Checkbox.vue +57 -0
- package/src/page-designer/previews/form-field/preview/Date.vue +56 -0
- package/src/page-designer/previews/form-field/preview/Input.vue +53 -0
- package/src/page-designer/previews/form-field/preview/InputNumber.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Object.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Radio.vue +69 -0
- package/src/page-designer/previews/form-field/preview/Select.vue +55 -0
- package/src/page-designer/previews/form-field/preview/Textarea.vue +57 -0
- package/src/page-designer/previews/grid/Preview.vue +156 -0
- package/src/page-designer/previews/html/Preview.vue +11 -0
- package/src/page-designer/previews/icon/Preview.vue +12 -0
- package/src/page-designer/previews/image/Preview.vue +37 -0
- package/src/page-designer/previews/index.js +74 -0
- package/src/page-designer/previews/layout/ColumnPreview.vue +89 -0
- package/src/page-designer/previews/layout/Preview.vue +96 -0
- package/src/page-designer/previews/num/Preview.vue +100 -0
- package/src/page-designer/previews/page-tabs/Preview.vue +53 -0
- package/src/page-designer/previews/step/Preview.vue +190 -0
- package/src/page-designer/previews/tabs/Preview.vue +66 -0
- package/src/page-designer/previews/tabs/tab-pane/Preview.vue +32 -0
- package/src/page-designer/previews/text/Preview.vue +26 -0
- package/src/page-designer/previews/text-editor/Preview.vue +14 -0
- package/src/page-designer/previews/video/Preview.vue +9 -0
- package/src/page-designer/setting-panel/Advance.vue +175 -0
- package/src/page-designer/setting-panel/CodeEditor.vue +88 -0
- package/src/page-designer/setting-panel/Property.vue +163 -0
- package/src/page-designer/setting-panel/Setting.vue +271 -0
- package/src/page-designer/setting-panel/Style.vue +1096 -0
- package/src/page-designer/setting-panel/css-editor/CssEditor.vue +93 -0
- package/src/page-designer/setting-panel/css-editor/css-hint.js +58 -0
- package/src/page-designer/setting-panel/index.js +10 -0
- package/src/page-designer/template-attribute-panel/TemplateAttributePanel.vue +383 -0
- package/src/page-designer/template-attribute-panel/index.js +2 -0
- package/src/page-designer/template-library/Library.vue +153 -0
- package/src/page-designer/template-library/index.js +4 -0
- package/src/page-designer/widget-library/Base.vue +156 -0
- package/src/page-designer/widget-library/Library.vue +282 -0
- package/src/page-designer/widget-library/index.js +6 -0
- package/src/page-designer/widget-preview/Container.vue +89 -0
- package/src/page-designer/widget-preview/DragGhost.vue +83 -0
- package/src/page-designer/widget-preview/DropZoneOverlay.vue +51 -0
- package/src/page-designer/widget-preview/HoverOverlay.vue +85 -0
- package/src/page-designer/widget-preview/Mixin.js +285 -0
- package/src/page-designer/widget-preview/Placeholder.vue +22 -0
- package/src/page-designer/widget-preview/Preview.vue +322 -0
- package/src/page-designer/widget-preview/PreviewItem.vue +162 -0
- package/src/page-designer/widget-preview/SelectedOverlay.vue +340 -0
- package/src/page-designer/widget-preview/Template.vue +77 -0
- package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -0
- package/src/page-designer/widget-preview/directive.js +258 -0
- package/src/page-designer/widget-preview/dropPosition.js +51 -0
- package/src/page-designer/widget-preview/index.js +23 -0
- package/src/page-designer/widget-preview/overlayPositionMixin.js +88 -0
- package/src/page-designer/widget-preview/resolvePreviewName.js +33 -0
- package/src/page-designer/widget-tree/Item.vue +719 -0
- package/src/page-designer/widget-tree/Tree.vue +995 -0
- package/src/page-designer/widget-tree/index.js +6 -0
- package/src/visual/AddForm.vue +172 -0
- package/src/visual/AddFormItem.vue +482 -0
- package/src/visual/AppIndex.vue +245 -0
- package/src/visual/ApplyForm.vue +140 -0
- package/src/visual/AttributeList.vue +344 -0
- package/src/visual/BasePage.vue +76 -0
- package/src/visual/Button.vue +80 -0
- package/src/visual/CardNum.vue +73 -0
- package/src/visual/CategoryList.vue +563 -0
- package/src/visual/Chart.vue +29 -0
- package/src/visual/ChartNew.vue +49 -0
- package/src/visual/CheckForm.vue +106 -0
- package/src/visual/ClientList.vue +42 -0
- package/src/visual/CodeManage.vue +116 -0
- package/src/visual/Component.vue +1342 -0
- package/src/visual/ComponentList.vue +280 -0
- package/src/visual/Config.vue +881 -0
- package/src/visual/ConfigItem.vue +218 -0
- package/src/visual/ConfigSelectItems.vue +445 -0
- package/src/visual/CreatePage.vue +389 -0
- package/src/visual/DashboardDiv.vue +197 -0
- package/src/visual/DashboardTabs.vue +118 -0
- package/src/visual/DashboardWidget.vue +55 -0
- package/src/visual/DblogList.vue +84 -0
- package/src/visual/EntityAddPage.vue +52 -0
- package/src/visual/EntityApplyPage.vue +57 -0
- package/src/visual/EntityCardList.vue +449 -0
- package/src/visual/EntityCheckPage.vue +69 -0
- package/src/visual/EntityFindPage.vue +55 -0
- package/src/visual/EntityList.vue +838 -0
- package/src/visual/EntityListPage.vue +97 -0
- package/src/visual/EntityNoSubmitSubList.vue +273 -0
- package/src/visual/EntityRightSubList.vue +32 -0
- package/src/visual/EntitySubAdd.vue +11 -0
- package/src/visual/EntitySubGridItem.vue +67 -0
- package/src/visual/EntitySubList.vue +440 -0
- package/src/visual/EntityTreeFindPage.vue +36 -0
- package/src/visual/EntityTreeManage.vue +50 -0
- package/src/visual/EntityTreePage.vue +45 -0
- package/src/visual/ExcelPreview.vue +11 -0
- package/src/visual/FormField.vue +113 -0
- package/src/visual/HeaderNew.vue +176 -0
- package/src/visual/Html.vue +104 -0
- package/src/visual/Import.vue +55 -0
- package/src/visual/InterfaceSubList.vue +23 -0
- package/src/visual/ListFirst.vue +614 -0
- package/src/visual/MEntityAddPage.vue +71 -0
- package/src/visual/MEntityList.vue +488 -0
- package/src/visual/MEntityListPage.vue +46 -0
- package/src/visual/MEntitySubList.vue +237 -0
- package/src/visual/MetaList.vue +24 -0
- package/src/visual/ModuleIndexPage.vue +70 -0
- package/src/visual/ModuleList.vue +46 -0
- package/src/visual/NavAddForm.vue +177 -0
- package/src/visual/NavFormCatalogItem.vue +47 -0
- package/src/visual/NumItem.vue +69 -0
- package/src/visual/NumStatistic.vue +242 -0
- package/src/visual/OrgChart.vue +113 -0
- package/src/visual/PageCatalog.vue +26 -0
- package/src/visual/PageConfig.vue +278 -0
- package/src/visual/PageTabs.vue +55 -0
- package/src/visual/Progress.vue +39 -0
- package/src/visual/ProgressItem.vue +43 -0
- package/src/visual/SystemManager.vue +80 -0
- package/src/visual/Title.vue +44 -0
- package/src/visual/TodoList.vue +18 -0
- package/src/visual/UserFormItem.vue +49 -0
- package/src/visual/UserManage.vue +36 -0
- package/src/visual/chart/CircularPie.vue +7 -0
- package/src/visual/chart/Column.vue +73 -0
- package/src/visual/chart/HoriColumn.vue +7 -0
- package/src/visual/chart/Line.vue +7 -0
- package/src/visual/chart/Pie.vue +7 -0
- package/src/visual/config/Background.vue +398 -0
- package/src/visual/config/Chart.vue +139 -0
- package/src/visual/config/Checkbox.vue +64 -0
- package/src/visual/config/Color.vue +40 -0
- package/src/visual/config/DesignReport.vue +20 -0
- package/src/visual/config/Event.vue +220 -0
- package/src/visual/config/Field.vue +597 -0
- package/src/visual/config/Font.vue +149 -0
- package/src/visual/config/FormItem.vue +25 -0
- package/src/visual/config/Function.vue +78 -0
- package/src/visual/config/Html.vue +98 -0
- package/src/visual/config/Image.vue +132 -0
- package/src/visual/config/Input.vue +712 -0
- package/src/visual/config/LazyDialog.vue +44 -0
- package/src/visual/config/List.vue +68 -0
- package/src/visual/config/ListField.vue +1714 -0
- package/src/visual/config/MField.vue +601 -0
- package/src/visual/config/Number.vue +41 -0
- package/src/visual/config/Object.vue +177 -0
- package/src/visual/config/Operate.vue +1083 -0
- package/src/visual/config/OperateItem.vue +917 -0
- package/src/visual/config/Options.vue +330 -0
- package/src/visual/config/OrderField.vue +587 -0
- package/src/visual/config/Page.vue +45 -0
- package/src/visual/config/Params.vue +228 -0
- package/src/visual/config/Radio.vue +93 -0
- package/src/visual/config/Row.vue +78 -0
- package/src/visual/config/Scope.vue +363 -0
- package/src/visual/config/Select.vue +93 -0
- package/src/visual/config/Switch.vue +36 -0
- package/src/visual/config/Textarea.vue +754 -0
- package/src/visual/config/Tree.vue +135 -0
- package/src/visual/config/remote-cache.js +35 -0
- package/src/visual/config/show-condition.js +21 -0
- package/src/visual/config/variable-sources.js +27 -0
- package/src/visual/config/wait-ref.js +17 -0
- package/src/visual/config-page/ComponentLibrary.vue +220 -0
- package/src/visual/config-page/ComponentLibraryDialog.vue +262 -0
- package/src/visual/config-page/ComponentList.vue +580 -0
- package/src/visual/config-page/ComponentPreview.vue +206 -0
- package/src/visual/config-page/ConfigOption.vue +16 -0
- package/src/visual/config-page/ConfigPanel.vue +301 -0
- package/src/visual/config-page/Dashboard.vue +2331 -0
- package/src/visual/config-page/DashboardDesign.vue +656 -0
- package/src/visual/config-page/DashboardGlobalConfig.vue +158 -0
- package/src/visual/config-page/DashboardMobile.vue +1118 -0
- package/src/visual/config-page/DashboardSetting.vue +47 -0
- package/src/visual/config-page/PagePreview.vue +105 -0
- package/src/visual/config-page/StyleConfig.vue +656 -0
- package/src/visual/config-page/VisualConfigPage.vue +746 -0
- package/src/visual/config-page/dashboard-theme-setting/Background.vue +98 -0
- package/src/visual/config-page/dashboard-theme-setting/Border.vue +185 -0
- package/src/visual/config-page/dashboard-theme-setting/Font.vue +101 -0
- package/src/visual/config-page/dashboard-theme-setting/Index.vue +471 -0
- package/src/visual/config-page/dashboard-theme-setting/Shadow.vue +102 -0
- package/src/visual/config-page/index.js +93 -0
- package/src/visual/index.js +23 -0
- package/src/visual/mixins/innerGridMixin.js +128 -0
- package/src/visual/search/Filter.vue +50 -0
- package/src/visual/step/Index.vue +361 -0
- package/src/visual/step/Item.vue +140 -0
- package/src/visual/widgets/CardFormItemVisual.vue +46 -0
- package/src/visual/widgets/CarouselVisual.vue +291 -0
- package/src/visual/widgets/CollapseVisual.vue +203 -0
- package/src/visual/widgets/DropdownVisual.vue +541 -0
- package/src/visual/widgets/LayoutConfig.vue +186 -0
- package/src/visual/widgets/ListVisual.vue +349 -0
- package/src/visual/widgets/MEntityListFindVisual.vue +77 -0
- package/src/visual/widgets/ProcessFormItemVisual.vue +58 -0
- package/src/visual/widgets/TabsConfig.vue +266 -0
- package/types/index.d.ts +22 -0
- package/types/page-designer.d.ts +3 -0
- package/types/visual-component.d.ts +1 -0
- package/types/visual-entity-list.d.ts +1 -0
- package/types/visual-entity-sub-list.d.ts +1 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
import util from "@epxing/core/src/runtime-utils/util";
|
|
3
|
+
import TemplatePreview from "./Template.js";
|
|
4
|
+
import widgetDesignerDirective from "./directive.js";
|
|
5
|
+
import { resolvePreviewName } from "./resolvePreviewName.js";
|
|
6
|
+
import { createDropCache, insertIndex, clearDropCache, insertLineRect } from "./dropPosition.js";
|
|
7
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, Fragment, renderList, createBlock, withDirectives, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
|
+
function appendCss(id, css) {
|
|
11
|
+
const formatCss = css.replace(/:current/g, ".css_" + id).replace(/url\s*\(([\w+-/.\s]+)\)/g, (str, $1) => {
|
|
12
|
+
return `url(${util.getFileUrl($1)})`;
|
|
13
|
+
});
|
|
14
|
+
const element = document.getElementById("style_" + id);
|
|
15
|
+
if (element) {
|
|
16
|
+
element.textContent = formatCss;
|
|
17
|
+
} else {
|
|
18
|
+
const style = document.createElement("style");
|
|
19
|
+
style.id = "style_" + id;
|
|
20
|
+
style.textContent = formatCss;
|
|
21
|
+
style.setAttribute("type", "text/css");
|
|
22
|
+
document.head.appendChild(style);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function removeCss(id) {
|
|
26
|
+
const element = document.getElementById("style_" + id);
|
|
27
|
+
if (element) document.head.removeChild(element);
|
|
28
|
+
}
|
|
29
|
+
const _sfc_main = {
|
|
30
|
+
name: "epx-page-designer-widget-preview",
|
|
31
|
+
// T33:原为 module-level `Vue.directive('widget-designer', …)`(Vue3 无全局 Vue.directive)。
|
|
32
|
+
// 改成**局部注册** —— 最干净:不依赖 app 单例,也不会有「指令重复注册」的 dev 告警。
|
|
33
|
+
directives: { "widget-designer": widgetDesignerDirective },
|
|
34
|
+
data() {
|
|
35
|
+
return {};
|
|
36
|
+
},
|
|
37
|
+
components: {
|
|
38
|
+
TemplatePreview
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
designer: Object,
|
|
42
|
+
pageRelationList: Array
|
|
43
|
+
},
|
|
44
|
+
// emits: ['widget-click', 'widget-hover'],
|
|
45
|
+
computed: {
|
|
46
|
+
isContainer() {
|
|
47
|
+
return (v) => {
|
|
48
|
+
const widgetInfo = this.designer.getWidgetByType(v.code) || {};
|
|
49
|
+
return widgetInfo.CONTAINER === "1";
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
widgetInfo() {
|
|
53
|
+
return (v) => {
|
|
54
|
+
return this.designer.getWidgetByType(v.code) || {};
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
// 预览组件名解析统一走 resolvePreviewName(命中项有缓存)
|
|
58
|
+
getWidgetName() {
|
|
59
|
+
return (widget) => resolvePreviewName(this.designer, widget);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
watch: {
|
|
63
|
+
"designer.pageConfig.css"(v) {
|
|
64
|
+
appendCss(this.designer.page.pageId, v);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
// 根画布拖拽进入:重新测量一次根列表的 children,之后的 dragover 复用缓存
|
|
69
|
+
onRootDragEnter(e) {
|
|
70
|
+
if (this._rootDragLeaveTimer) {
|
|
71
|
+
clearTimeout(this._rootDragLeaveTimer);
|
|
72
|
+
this._rootDragLeaveTimer = null;
|
|
73
|
+
}
|
|
74
|
+
if (!this.isDraggingFromLibrary(e)) return;
|
|
75
|
+
if (!this._dropCache) this._dropCache = createDropCache();
|
|
76
|
+
clearDropCache(this._dropCache);
|
|
77
|
+
this.designer.setDragOverTarget({ type: "root", widgetId: null });
|
|
78
|
+
this.designer.setDragOverTargetElement(this.$refs.rootDropZone);
|
|
79
|
+
this.designer.setPreviewDragTarget({ widgetId: null, position: "root" });
|
|
80
|
+
},
|
|
81
|
+
// 根画布拖拽悬停:只记坐标 + 允许放置;插入位置的计算与状态更新合并到下一帧
|
|
82
|
+
onRootDragOver(e) {
|
|
83
|
+
if (!this.isDraggingFromLibrary(e)) return;
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
e.dataTransfer.dropEffect = this.designer.dragState.dragSource === "preview" ? "move" : "copy";
|
|
86
|
+
this._dragClientX = e.clientX;
|
|
87
|
+
this._dragClientY = e.clientY;
|
|
88
|
+
if (this._dragFrame) return;
|
|
89
|
+
this._dragFrame = requestAnimationFrame(() => {
|
|
90
|
+
this._dragFrame = null;
|
|
91
|
+
if (!this.designer.dragState.isDragging) return;
|
|
92
|
+
this.designer.updateDragGhostPosition(this._dragClientX, this._dragClientY);
|
|
93
|
+
const listEl = this.$el.querySelector(".epx-page-designer-widget-preview__draggable");
|
|
94
|
+
if (!this._dropCache) this._dropCache = createDropCache();
|
|
95
|
+
const lineRect = insertLineRect(this._dropCache, listEl, this._dragClientY);
|
|
96
|
+
if (lineRect) this.designer.setDragInsertLine(lineRect);
|
|
97
|
+
this.designer.setPreviewDragTarget({ widgetId: null, index: insertIndex(this._dropCache, listEl, this._dragClientY), position: "root" });
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
onRootDragLeave(e) {
|
|
101
|
+
if (this._rootDragLeaveTimer) {
|
|
102
|
+
clearTimeout(this._rootDragLeaveTimer);
|
|
103
|
+
}
|
|
104
|
+
this._rootDragLeaveTimer = setTimeout(() => {
|
|
105
|
+
if (!this.$refs.rootDropZone || !this.$refs.rootDropZone.contains(e.relatedTarget)) {
|
|
106
|
+
this.designer.clearDragOverTarget();
|
|
107
|
+
this.designer.clearDragInsertLine();
|
|
108
|
+
this.designer.clearPreviewDragTarget();
|
|
109
|
+
if (this._dropCache) clearDropCache(this._dropCache);
|
|
110
|
+
}
|
|
111
|
+
this._rootDragLeaveTimer = null;
|
|
112
|
+
}, 50);
|
|
113
|
+
},
|
|
114
|
+
isDraggingFromLibrary(e) {
|
|
115
|
+
return e.dataTransfer && e.dataTransfer.types && e.dataTransfer.types.includes("text/plain");
|
|
116
|
+
},
|
|
117
|
+
onRootDrop(e) {
|
|
118
|
+
e.preventDefault();
|
|
119
|
+
if (this._rootDragLeaveTimer) {
|
|
120
|
+
clearTimeout(this._rootDragLeaveTimer);
|
|
121
|
+
this._rootDragLeaveTimer = null;
|
|
122
|
+
}
|
|
123
|
+
this.designer.clearDragOverTarget();
|
|
124
|
+
this.designer.clearDragInsertLine();
|
|
125
|
+
this.designer.clearPreviewDragTarget();
|
|
126
|
+
const listEl = this.$el.querySelector(".epx-page-designer-widget-preview__draggable");
|
|
127
|
+
if (!this._dropCache) this._dropCache = createDropCache();
|
|
128
|
+
const index = insertIndex(this._dropCache, listEl, e.clientY);
|
|
129
|
+
clearDropCache(this._dropCache);
|
|
130
|
+
this.designer.handleDrop({ dataTransfer: e.dataTransfer, target: { type: "root", widgetId: null, index } });
|
|
131
|
+
},
|
|
132
|
+
splitTemplate() {
|
|
133
|
+
const { CONTENT } = this.widgetInfo;
|
|
134
|
+
if (CONTENT) {
|
|
135
|
+
const config = JSON.parse(CONTENT);
|
|
136
|
+
const { id } = this.designer.selectedWidget;
|
|
137
|
+
const { items, itemConfigs, JS: templateJs } = config;
|
|
138
|
+
const formatConfig = (arr) => {
|
|
139
|
+
arr.forEach((compItem) => {
|
|
140
|
+
const oldId = compItem.id;
|
|
141
|
+
const newId = compItem.contentType + "_" + this.$util.genId();
|
|
142
|
+
if (itemConfigs[oldId]) {
|
|
143
|
+
itemConfigs[newId] = itemConfigs[oldId];
|
|
144
|
+
delete itemConfigs[oldId];
|
|
145
|
+
}
|
|
146
|
+
compItem.id = newId;
|
|
147
|
+
if (compItem.items) {
|
|
148
|
+
formatConfig(compItem.items);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
formatConfig(items);
|
|
153
|
+
const findWidgetPos = (arr, parent) => {
|
|
154
|
+
for (let i = 0; i < arr.length; i++) {
|
|
155
|
+
const item = arr[i];
|
|
156
|
+
if (item.id === id) {
|
|
157
|
+
return { parent, index: i };
|
|
158
|
+
} else if (item.items) {
|
|
159
|
+
const child = findWidgetPos(item.items, item);
|
|
160
|
+
if (child) return child;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const widgetPos = findWidgetPos(this.designer.widgetList, null);
|
|
165
|
+
if (widgetPos) {
|
|
166
|
+
const { parent, index } = widgetPos;
|
|
167
|
+
if (parent) {
|
|
168
|
+
parent.items.splice(index, 1, ...items);
|
|
169
|
+
} else {
|
|
170
|
+
this.designer.widgetList.splice(index, 1, ...items);
|
|
171
|
+
}
|
|
172
|
+
this.designer.mergeWidgetConfig(itemConfigs);
|
|
173
|
+
delete this.designer.widgetConfig[id];
|
|
174
|
+
if (templateJs) {
|
|
175
|
+
let { JS = "" } = this.designer.pageConfig;
|
|
176
|
+
const result = JS.match(/export\sfunction\s(\w+)/g);
|
|
177
|
+
const events = [];
|
|
178
|
+
if (result) {
|
|
179
|
+
result.forEach((item) => {
|
|
180
|
+
events.push(item.replace(/export\sfunction\s/, ""));
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
const templateJsResult = templateJs.split(/export\s+function\s+/);
|
|
184
|
+
templateJsResult.forEach((item) => {
|
|
185
|
+
const funtionStr = item.replace(/\/\*(\n|.)+?\*\/[\n\s]+$/, "");
|
|
186
|
+
if (funtionStr.replace(/[\n\s]+/g, "").length > 0) {
|
|
187
|
+
const funtionName = funtionStr.split(/\s+\(/)[0];
|
|
188
|
+
if (![...new Set(events)].includes(funtionName)) {
|
|
189
|
+
JS += "export function " + funtionStr.replace(/^\w+/, funtionName);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
this.designer.updatePageConfig({ JS });
|
|
194
|
+
}
|
|
195
|
+
this.designer.setSelected(items[0]);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
onDragUpdate() {
|
|
200
|
+
},
|
|
201
|
+
checkMove() {
|
|
202
|
+
},
|
|
203
|
+
handleWidgetClick(data) {
|
|
204
|
+
this.$emit("widget-click", data);
|
|
205
|
+
},
|
|
206
|
+
handleWidgetHover(widgetId) {
|
|
207
|
+
this.$emit("widget-hover", widgetId);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
created() {
|
|
211
|
+
const { css } = this.designer.pageConfig;
|
|
212
|
+
if (css) {
|
|
213
|
+
appendCss(this.designer.page.pageId, css);
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
unmounted() {
|
|
217
|
+
removeCss(this.designer.page.pageId);
|
|
218
|
+
if (this._rootDragLeaveTimer) {
|
|
219
|
+
clearTimeout(this._rootDragLeaveTimer);
|
|
220
|
+
this._rootDragLeaveTimer = null;
|
|
221
|
+
}
|
|
222
|
+
if (this._dragFrame) {
|
|
223
|
+
cancelAnimationFrame(this._dragFrame);
|
|
224
|
+
this._dragFrame = null;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const _hoisted_1 = { class: "epx-page-designer-widget-preview__draggable epx-page-designer-widget-preview__draggable-list el-row" };
|
|
229
|
+
const _hoisted_2 = {
|
|
230
|
+
key: 0,
|
|
231
|
+
class: "epx-page-designer-widget-preview__no-widget"
|
|
232
|
+
};
|
|
233
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
234
|
+
const _component_template_preview = resolveComponent("template-preview");
|
|
235
|
+
const _directive_widget_designer = resolveDirective("widget-designer");
|
|
236
|
+
return openBlock(), createElementBlock("div", {
|
|
237
|
+
class: normalizeClass(["epx-page-designer-widget-preview", "css_" + $props.designer.page.pageId])
|
|
238
|
+
}, [
|
|
239
|
+
createElementVNode("div", {
|
|
240
|
+
ref: "rootDropZone",
|
|
241
|
+
class: "epx-page-designer-widget-preview__drop-zone",
|
|
242
|
+
onDragenter: _cache[0] || (_cache[0] = (...args) => $options.onRootDragEnter && $options.onRootDragEnter(...args)),
|
|
243
|
+
onDragover: _cache[1] || (_cache[1] = withModifiers((...args) => $options.onRootDragOver && $options.onRootDragOver(...args), ["prevent"])),
|
|
244
|
+
onDragleave: _cache[2] || (_cache[2] = (...args) => $options.onRootDragLeave && $options.onRootDragLeave(...args)),
|
|
245
|
+
onDrop: _cache[3] || (_cache[3] = withModifiers((...args) => $options.onRootDrop && $options.onRootDrop(...args), ["prevent"]))
|
|
246
|
+
}, [
|
|
247
|
+
createElementVNode("div", _hoisted_1, [
|
|
248
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($props.designer.widgetList, (widget) => {
|
|
249
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
250
|
+
key: widget.id
|
|
251
|
+
}, [
|
|
252
|
+
widget.type === "template" ? (openBlock(), createBlock(_component_template_preview, {
|
|
253
|
+
key: 0,
|
|
254
|
+
widget,
|
|
255
|
+
designer: $props.designer,
|
|
256
|
+
"parent-widget": null,
|
|
257
|
+
pageRelationList: $props.pageRelationList
|
|
258
|
+
}, null, 8, ["widget", "designer", "pageRelationList"])) : withDirectives((openBlock(), createBlock(resolveDynamicComponent($options.getWidgetName(widget)), {
|
|
259
|
+
key: widget.id,
|
|
260
|
+
widget,
|
|
261
|
+
designer: $props.designer,
|
|
262
|
+
"parent-widget": null,
|
|
263
|
+
pageRelationList: $props.pageRelationList
|
|
264
|
+
}, null, 8, ["widget", "designer", "pageRelationList"])), [
|
|
265
|
+
[_directive_widget_designer, { widget, designer: $props.designer, parentWidget: null, templateInfo: null }]
|
|
266
|
+
])
|
|
267
|
+
], 64);
|
|
268
|
+
}), 128)),
|
|
269
|
+
$props.designer.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_2, "拖拽组件到这里")) : createCommentVNode("", true)
|
|
270
|
+
])
|
|
271
|
+
], 544)
|
|
272
|
+
], 2);
|
|
273
|
+
}
|
|
274
|
+
const WidgetPreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
275
|
+
export {
|
|
276
|
+
WidgetPreview as default
|
|
277
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
import widgetDesignerDirective from "./directive.js";
|
|
3
|
+
import { resolvePreviewName } from "./resolvePreviewName.js";
|
|
4
|
+
import TemplatePreview from "./Template.js";
|
|
5
|
+
import { resolveComponent, resolveDirective, withDirectives, openBlock, createBlock, resolveDynamicComponent, mergeProps } from "vue";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
|
+
const _sfc_main = {
|
|
9
|
+
name: "epx-page-designer-widget-preview-item",
|
|
10
|
+
directives: { "widget-designer": widgetDesignerDirective },
|
|
11
|
+
components: {
|
|
12
|
+
TemplatePreview
|
|
13
|
+
},
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
inject: {
|
|
16
|
+
templateInfo: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
provide() {
|
|
22
|
+
return {
|
|
23
|
+
templateInfo: this.templateInfo
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
designer: {
|
|
28
|
+
type: Object,
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
parentWidget: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
35
|
+
widget: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
pageRelationList: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => []
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
widgetInfo() {
|
|
46
|
+
if (!this.widget || !this.designer) return {};
|
|
47
|
+
return this.designer.getWidgetByType(this.widget.contentType, this.widget.type) || {};
|
|
48
|
+
},
|
|
49
|
+
isContainer() {
|
|
50
|
+
return this.widgetInfo.CONTAINER === "1";
|
|
51
|
+
},
|
|
52
|
+
// 预览组件名解析统一走 resolvePreviewName(命中项有缓存)
|
|
53
|
+
widgetName() {
|
|
54
|
+
return resolvePreviewName(this.designer, this.widget);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
59
|
+
const _component_template_preview = resolveComponent("template-preview");
|
|
60
|
+
const _directive_widget_designer = resolveDirective("widget-designer");
|
|
61
|
+
return $props.widget.type === "template" ? withDirectives((openBlock(), createBlock(_component_template_preview, {
|
|
62
|
+
key: "template" + $props.widget.id,
|
|
63
|
+
widget: $props.widget,
|
|
64
|
+
designer: $props.designer,
|
|
65
|
+
"parent-widget": $props.parentWidget,
|
|
66
|
+
pageRelationList: $props.pageRelationList
|
|
67
|
+
}, null, 8, ["widget", "designer", "parent-widget", "pageRelationList"])), [
|
|
68
|
+
[_directive_widget_designer, { widget: $props.widget, designer: $props.designer, parentWidget: $props.parentWidget, templateInfo: $options.templateInfo }]
|
|
69
|
+
]) : withDirectives((openBlock(), createBlock(resolveDynamicComponent($options.widgetName), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
70
|
+
key: $props.widget.id,
|
|
71
|
+
widget: $props.widget,
|
|
72
|
+
designer: $props.designer,
|
|
73
|
+
"parent-widget": $props.parentWidget,
|
|
74
|
+
templateInfo: $options.templateInfo,
|
|
75
|
+
pageRelationList: $props.pageRelationList
|
|
76
|
+
}), null, 16, ["widget", "designer", "parent-widget", "templateInfo", "pageRelationList"])), [
|
|
77
|
+
[_directive_widget_designer, { widget: $props.widget, designer: $props.designer, parentWidget: $props.parentWidget }]
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
const WidgetPreviewItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
81
|
+
export {
|
|
82
|
+
WidgetPreviewItem as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
import { getWidgetChildren } from "../designer.js";
|
|
3
|
+
import overlayPositionMixin from "./overlayPositionMixin.js";
|
|
4
|
+
import { resolveComponent, openBlock, createElementBlock, withModifiers, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const _sfc_main = {
|
|
8
|
+
name: "epx-page-designer-selected-overlay",
|
|
9
|
+
// 定位改为事件驱动(见 overlayPositionMixin),不再每帧 rAF 轮询
|
|
10
|
+
mixins: [overlayPositionMixin],
|
|
11
|
+
props: {
|
|
12
|
+
designer: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
widget: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
20
|
+
targetElement: {
|
|
21
|
+
type: HTMLElement,
|
|
22
|
+
default: null
|
|
23
|
+
},
|
|
24
|
+
visible: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
parentWidget: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: null
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
isCovered: false,
|
|
36
|
+
showTemplateModal: false,
|
|
37
|
+
template: {}
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
widgetInfo() {
|
|
42
|
+
if (!this.widget) return {};
|
|
43
|
+
return this.designer.getWidgetByType(this.widget.contentType, this.widget.type) || {};
|
|
44
|
+
},
|
|
45
|
+
clientConfig() {
|
|
46
|
+
return this.$store.state.config.clientConfig || {};
|
|
47
|
+
},
|
|
48
|
+
canAddContainer() {
|
|
49
|
+
if (!this.widget) return false;
|
|
50
|
+
const widgetInfo = this.widgetInfo;
|
|
51
|
+
return widgetInfo.CONTAINER === "1" && this.designer.mode !== "template";
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
watch: {
|
|
55
|
+
widget() {
|
|
56
|
+
this.scheduleOverlayUpdate();
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
copyWidget() {
|
|
61
|
+
if (!this.widget) return;
|
|
62
|
+
const parentWidget = this.designer.findParentWidget(this.widget.id);
|
|
63
|
+
this.designer.copyWidget(this.widget, parentWidget);
|
|
64
|
+
},
|
|
65
|
+
deleteComponent() {
|
|
66
|
+
if (!this.widget) return;
|
|
67
|
+
this.$confirm("确认删除该组件?", "提示", {
|
|
68
|
+
confirmButtonText: "确定",
|
|
69
|
+
cancelButtonText: "取消",
|
|
70
|
+
type: "warning"
|
|
71
|
+
}).then(() => {
|
|
72
|
+
const parentWidget = this.designer.findParentWidget(this.widget.id);
|
|
73
|
+
this.designer.deleteWidget(this.widget, parentWidget);
|
|
74
|
+
}).catch(() => {
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
addContainer() {
|
|
78
|
+
if (!this.widget || !this.canAddContainer) return;
|
|
79
|
+
const containerWidget = this.designer.allWidgets.find((w) => w.CODE === "layout" && w.CONTAINER === "1");
|
|
80
|
+
if (containerWidget) {
|
|
81
|
+
this.designer.addWidgetByInfo(containerWidget, this.widget);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
openTemplateDialog() {
|
|
85
|
+
this.showTemplateModal = true;
|
|
86
|
+
this.template = {
|
|
87
|
+
NAME: "",
|
|
88
|
+
LEVEL: "03"
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
getTemplateContent() {
|
|
92
|
+
const eventNameMap = {};
|
|
93
|
+
const widgetIds = [this.widget.id];
|
|
94
|
+
const events = [];
|
|
95
|
+
const widgetConfigs = {};
|
|
96
|
+
const js = this.designer.pageConfig.JS;
|
|
97
|
+
let widgetJs = "";
|
|
98
|
+
const getAllWidgetIds = (widgets) => {
|
|
99
|
+
if (!widgets) return;
|
|
100
|
+
for (const item of widgets) {
|
|
101
|
+
widgetIds.push(item.id);
|
|
102
|
+
getAllWidgetIds(getWidgetChildren(item));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
getAllWidgetIds(getWidgetChildren(this.widget));
|
|
106
|
+
for (const widgetId of widgetIds) {
|
|
107
|
+
if (this.designer.widgetConfig[widgetId]) {
|
|
108
|
+
const config = this.$_.cloneDeep(this.designer.widgetConfig[widgetId]);
|
|
109
|
+
widgetConfigs[widgetId] = config;
|
|
110
|
+
if (config.componentEvents) {
|
|
111
|
+
for (const key in config.componentEvents) {
|
|
112
|
+
const arr = config.componentEvents[key];
|
|
113
|
+
events.push(...arr);
|
|
114
|
+
config.componentEvents[key] = arr.map((item) => {
|
|
115
|
+
const newEventName = `${item}_${this.$util.genId()}`;
|
|
116
|
+
eventNameMap[item] = newEventName;
|
|
117
|
+
return newEventName;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (config.fields) {
|
|
122
|
+
for (const field of config.fields) {
|
|
123
|
+
if (field.events) {
|
|
124
|
+
for (const key in field.events) {
|
|
125
|
+
const arr = field.events[key];
|
|
126
|
+
events.push(...arr);
|
|
127
|
+
field.events[key] = arr.map((item) => {
|
|
128
|
+
const newEventName = `${item}_${this.$util.genId()}`;
|
|
129
|
+
eventNameMap[item] = newEventName;
|
|
130
|
+
return newEventName;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (js) {
|
|
139
|
+
const result = js.split(/export\s+function\s+/);
|
|
140
|
+
result.forEach((item) => {
|
|
141
|
+
const funtionStr = item.replace(/\/\*(\n|.)+?\*\/[\n\s]+$/, "");
|
|
142
|
+
if (funtionStr.replace(/[\n\s]+/g, "").length > 0) {
|
|
143
|
+
const funtionName = funtionStr.split(/\s+\(/)[0];
|
|
144
|
+
if ([...new Set(events)].includes(funtionName)) {
|
|
145
|
+
widgetJs += "export function " + funtionStr.replace(/^\w+/, eventNameMap[funtionName]);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
version: this.designer.version,
|
|
152
|
+
items: [this.widget],
|
|
153
|
+
itemConfigs: widgetConfigs,
|
|
154
|
+
JS: widgetJs
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
saveAsTemplate() {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
const content = this.getTemplateContent();
|
|
160
|
+
if (!this.template.ID) {
|
|
161
|
+
this.$message.error("请输入模板编号");
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (!this.template.NAME) {
|
|
165
|
+
this.$message.error("请输入模板名称");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const CLIENT = ((_a = this.$store.state.config.clientConfig) == null ? void 0 : _a.ID) || this.CLIENT;
|
|
169
|
+
const SYSTEM = ((_b = this.$store.state.config.systemConfig) == null ? void 0 : _b.ID) || this.SYSTEM;
|
|
170
|
+
const params = {
|
|
171
|
+
"bean.CLIENT": CLIENT,
|
|
172
|
+
"bean.SYSTEM": SYSTEM,
|
|
173
|
+
"bean.ID": this.template.ID,
|
|
174
|
+
"bean.NAME": this.template.NAME,
|
|
175
|
+
"bean.TYPE": "01",
|
|
176
|
+
"bean.LEVEL": this.template.LEVEL,
|
|
177
|
+
"bean.PICTURE": this.template.PICTURE,
|
|
178
|
+
"bean.CONTENT": JSON.stringify(content)
|
|
179
|
+
};
|
|
180
|
+
this.$http.save({
|
|
181
|
+
entityId: "FM_TEMPLATE",
|
|
182
|
+
...params
|
|
183
|
+
}).then(() => {
|
|
184
|
+
this.$message.success("保存成功");
|
|
185
|
+
this.showTemplateModal = false;
|
|
186
|
+
}).catch((err) => {
|
|
187
|
+
this.$message.error(err.message);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const _hoisted_1 = { class: "epx-page-designer-selected-overlay__header" };
|
|
193
|
+
const _hoisted_2 = { class: "epx-page-designer-selected-overlay__label" };
|
|
194
|
+
const _hoisted_3 = { class: "epx-page-designer-selected-overlay__header-right" };
|
|
195
|
+
const _hoisted_4 = { class: "epx-page-designer-selected-overlay__operates" };
|
|
196
|
+
const _hoisted_5 = { class: "epx-page-designer__template-form-item" };
|
|
197
|
+
const _hoisted_6 = { class: "epx-page-designer__template-form-item" };
|
|
198
|
+
const _hoisted_7 = { class: "epx-page-designer__template-form-item" };
|
|
199
|
+
const _hoisted_8 = {
|
|
200
|
+
key: 0,
|
|
201
|
+
class: "epx-page-designer__template-form-item"
|
|
202
|
+
};
|
|
203
|
+
const _hoisted_9 = { class: "dialog-footer" };
|
|
204
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
205
|
+
const _component_el_input = resolveComponent("el-input");
|
|
206
|
+
const _component_epx_photo = resolveComponent("epx-photo");
|
|
207
|
+
const _component_el_radio = resolveComponent("el-radio");
|
|
208
|
+
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
209
|
+
const _component_el_button = resolveComponent("el-button");
|
|
210
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
211
|
+
return $props.visible && $props.targetElement && $props.widget ? (openBlock(), createElementBlock("div", {
|
|
212
|
+
key: 0,
|
|
213
|
+
ref: "overlay",
|
|
214
|
+
class: "epx-page-designer-selected-overlay",
|
|
215
|
+
style: normalizeStyle(_ctx.overlayStyle),
|
|
216
|
+
onClick: _cache[9] || (_cache[9] = withModifiers(() => {
|
|
217
|
+
}, ["stop"]))
|
|
218
|
+
}, [
|
|
219
|
+
createElementVNode("div", _hoisted_1, [
|
|
220
|
+
createElementVNode("div", _hoisted_2, toDisplayString($options.widgetInfo.TITLE || $options.widgetInfo.NAME), 1),
|
|
221
|
+
createElementVNode("div", _hoisted_3, [
|
|
222
|
+
createElementVNode("div", _hoisted_4, [
|
|
223
|
+
$props.designer.mode !== "template" && $props.widget.type !== "template" ? (openBlock(), createElementBlock("span", {
|
|
224
|
+
key: 0,
|
|
225
|
+
class: "epx-page-designer-selected-overlay__operate-item",
|
|
226
|
+
onClick: _cache[0] || (_cache[0] = (...args) => $options.openTemplateDialog && $options.openTemplateDialog(...args))
|
|
227
|
+
}, " 保存为模板 ")) : createCommentVNode("", true),
|
|
228
|
+
createElementVNode("span", {
|
|
229
|
+
class: "epx-page-designer-selected-overlay__operate-item",
|
|
230
|
+
onClick: _cache[1] || (_cache[1] = (...args) => $options.copyWidget && $options.copyWidget(...args))
|
|
231
|
+
}, " 复制 "),
|
|
232
|
+
createElementVNode("span", {
|
|
233
|
+
class: "epx-page-designer-selected-overlay__operate-close",
|
|
234
|
+
onClick: _cache[2] || (_cache[2] = (...args) => $options.deleteComponent && $options.deleteComponent(...args))
|
|
235
|
+
}, [..._cache[10] || (_cache[10] = [
|
|
236
|
+
createElementVNode("i", { class: "el-icon-close" }, null, -1)
|
|
237
|
+
])])
|
|
238
|
+
])
|
|
239
|
+
])
|
|
240
|
+
]),
|
|
241
|
+
createVNode(_component_el_dialog, {
|
|
242
|
+
title: "保存模板",
|
|
243
|
+
"model-value": !!$data.showTemplateModal,
|
|
244
|
+
width: "520px",
|
|
245
|
+
"append-to-body": "",
|
|
246
|
+
"destroy-on-close": "",
|
|
247
|
+
onClose: _cache[8] || (_cache[8] = ($event) => $data.showTemplateModal = false)
|
|
248
|
+
}, {
|
|
249
|
+
footer: withCtx(() => [
|
|
250
|
+
createElementVNode("div", _hoisted_9, [
|
|
251
|
+
createVNode(_component_el_button, {
|
|
252
|
+
onClick: _cache[7] || (_cache[7] = ($event) => $data.showTemplateModal = false)
|
|
253
|
+
}, {
|
|
254
|
+
default: withCtx(() => [..._cache[17] || (_cache[17] = [
|
|
255
|
+
createTextVNode("取 消", -1)
|
|
256
|
+
])]),
|
|
257
|
+
_: 1
|
|
258
|
+
}),
|
|
259
|
+
createVNode(_component_el_button, {
|
|
260
|
+
type: "primary",
|
|
261
|
+
onClick: $options.saveAsTemplate
|
|
262
|
+
}, {
|
|
263
|
+
default: withCtx(() => [..._cache[18] || (_cache[18] = [
|
|
264
|
+
createTextVNode("确 定", -1)
|
|
265
|
+
])]),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 8, ["onClick"])
|
|
268
|
+
])
|
|
269
|
+
]),
|
|
270
|
+
default: withCtx(() => [
|
|
271
|
+
createElementVNode("div", _hoisted_5, [
|
|
272
|
+
_cache[11] || (_cache[11] = createElementVNode("label", { for: "" }, "模板编号:", -1)),
|
|
273
|
+
createVNode(_component_el_input, {
|
|
274
|
+
size: "default",
|
|
275
|
+
modelValue: $data.template.ID,
|
|
276
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.template.ID = $event)
|
|
277
|
+
}, null, 8, ["modelValue"])
|
|
278
|
+
]),
|
|
279
|
+
createElementVNode("div", _hoisted_6, [
|
|
280
|
+
_cache[12] || (_cache[12] = createElementVNode("label", { for: "" }, "模板名称:", -1)),
|
|
281
|
+
createVNode(_component_el_input, {
|
|
282
|
+
size: "default",
|
|
283
|
+
modelValue: $data.template.NAME,
|
|
284
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.template.NAME = $event)
|
|
285
|
+
}, null, 8, ["modelValue"])
|
|
286
|
+
]),
|
|
287
|
+
createElementVNode("div", _hoisted_7, [
|
|
288
|
+
_cache[13] || (_cache[13] = createElementVNode("label", { for: "" }, "缩略图:", -1)),
|
|
289
|
+
createVNode(_component_epx_photo, {
|
|
290
|
+
modelValue: $data.template.PICTURE,
|
|
291
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.template.PICTURE = $event),
|
|
292
|
+
fieldConfigs: { attriName: "PICTURE", attriLabel: "缩略图", state: "EDIT" }
|
|
293
|
+
}, null, 8, ["modelValue"])
|
|
294
|
+
]),
|
|
295
|
+
$options.clientConfig.CODE === "frame" ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
296
|
+
_cache[16] || (_cache[16] = createElementVNode("label", { for: "" }, "应用级别:", -1)),
|
|
297
|
+
createVNode(_component_el_radio_group, {
|
|
298
|
+
modelValue: $data.template.LEVEL,
|
|
299
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.template.LEVEL = $event)
|
|
300
|
+
}, {
|
|
301
|
+
default: withCtx(() => [
|
|
302
|
+
createVNode(_component_el_radio, {
|
|
303
|
+
label: "01",
|
|
304
|
+
value: "01"
|
|
305
|
+
}, {
|
|
306
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [
|
|
307
|
+
createTextVNode("平台级", -1)
|
|
308
|
+
])]),
|
|
309
|
+
_: 1
|
|
310
|
+
}),
|
|
311
|
+
createVNode(_component_el_radio, {
|
|
312
|
+
label: "03",
|
|
313
|
+
value: "03"
|
|
314
|
+
}, {
|
|
315
|
+
default: withCtx(() => [..._cache[15] || (_cache[15] = [
|
|
316
|
+
createTextVNode("系统级", -1)
|
|
317
|
+
])]),
|
|
318
|
+
_: 1
|
|
319
|
+
})
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
}, 8, ["modelValue"])
|
|
323
|
+
])) : createCommentVNode("", true)
|
|
324
|
+
]),
|
|
325
|
+
_: 1
|
|
326
|
+
}, 8, ["model-value"])
|
|
327
|
+
], 4)) : createCommentVNode("", true);
|
|
328
|
+
}
|
|
329
|
+
const SelectedOverlay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4bb8f90f"]]);
|
|
330
|
+
export {
|
|
331
|
+
SelectedOverlay as default
|
|
332
|
+
};
|