@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,1096 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="epx-page-designer-setting-style" v-if="load">
|
|
3
|
+
<!-- 源码编辑 -->
|
|
4
|
+
<el-popover
|
|
5
|
+
ref="cssEditorPopover"
|
|
6
|
+
placement="bottom"
|
|
7
|
+
width="400"
|
|
8
|
+
trigger="click"
|
|
9
|
+
@before-enter="showCssEditor=true"
|
|
10
|
+
@after-leave="showCssEditor=false"
|
|
11
|
+
>
|
|
12
|
+
<template v-slot:reference><div class="epx-page-designer-setting-style__custom-btn">
|
|
13
|
+
<i class="epx-icon-yangshi"></i>
|
|
14
|
+
<span>自定义样式</span>
|
|
15
|
+
</div></template>
|
|
16
|
+
<css-editor v-if="showCssEditor" :value="css" @change="changeCss"></css-editor>
|
|
17
|
+
</el-popover>
|
|
18
|
+
<!-- hover -->
|
|
19
|
+
<div class="epx-page-designer-setting-style__item--alone">
|
|
20
|
+
<label class="epx-page-designer-setting-style__label" for="">状态</label>
|
|
21
|
+
<el-select v-model="mouseStatus" size="small" >
|
|
22
|
+
<el-option label="默认状态" value="default"></el-option>
|
|
23
|
+
<el-option label="悬浮状态" value="hover"></el-option>
|
|
24
|
+
</el-select>
|
|
25
|
+
</div>
|
|
26
|
+
<!-- 宽度 -->
|
|
27
|
+
<div class="epx-page-designer-setting-style__item--alone">
|
|
28
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('width')}}</label>
|
|
29
|
+
<el-input class="epx-page-designer-setting-style__number-with-unit" size="small" :model-value="clearSuffix(style['width'])" @update:model-value="v=>changePx('width', v, unit('width'))">
|
|
30
|
+
<template v-slot:append><el-select class="epx-page-designer-setting-style__unit" :model-value="unit('width')" @update:model-value="v=>changePx('width', style['width'], v)" size="small" placeholder="-">
|
|
31
|
+
<el-option label="px" value="px"></el-option>
|
|
32
|
+
<el-option label="%" value="%"></el-option>
|
|
33
|
+
<el-option label="auto" value="auto"></el-option>
|
|
34
|
+
</el-select></template>
|
|
35
|
+
</el-input>
|
|
36
|
+
<!-- <el-input-number controls-position="right" ></el-input-number> -->
|
|
37
|
+
</div>
|
|
38
|
+
<!-- 高度 -->
|
|
39
|
+
<div class="epx-page-designer-setting-style__item--alone">
|
|
40
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('height')}}</label>
|
|
41
|
+
<el-input class="epx-page-designer-setting-style__number-with-unit" size="small" :model-value="clearSuffix(style['height'])" @update:model-value="v=>changePx('height', v, unit('height'))">
|
|
42
|
+
<template v-slot:append><el-select class="epx-page-designer-setting-style__unit" :model-value="unit('height')" @update:model-value="v=>changePx('height', style['height'], v)" size="small" placeholder="-">
|
|
43
|
+
<el-option label="px" value="px"></el-option>
|
|
44
|
+
<el-option label="%" value="%"></el-option>
|
|
45
|
+
<el-option label="auto" value="auto"></el-option>
|
|
46
|
+
</el-select></template>
|
|
47
|
+
</el-input>
|
|
48
|
+
</div>
|
|
49
|
+
<!-- 布局 -->
|
|
50
|
+
<div :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold': unfold.display }">
|
|
51
|
+
<div class="epx-page-designer-setting-style__header">
|
|
52
|
+
<span>
|
|
53
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold['display'] = !unfold.display"></i>
|
|
54
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('layout')}}</label>
|
|
55
|
+
</span>
|
|
56
|
+
<el-radio-group class="epx-page-designer-setting-style__radio-button-group" v-model="style['display']" size="default">
|
|
57
|
+
<el-radio-button label="block" value="block">
|
|
58
|
+
<el-tooltip effect="dark" content="块级元素,独占一行">
|
|
59
|
+
<i class="epx-icon-bolck"></i>
|
|
60
|
+
</el-tooltip>
|
|
61
|
+
</el-radio-button>
|
|
62
|
+
<el-radio-button label="inline-block" value="inline-block">
|
|
63
|
+
<el-tooltip effect="dark" content="行内块元素,不独占一行">
|
|
64
|
+
<i class="epx-icon-inline-bolck"></i>
|
|
65
|
+
</el-tooltip>
|
|
66
|
+
</el-radio-button>
|
|
67
|
+
<el-radio-button label="inline" value="inline">
|
|
68
|
+
<el-tooltip effect="dark" content="内联元素,不独占一行,宽度为内容宽度不可设置">
|
|
69
|
+
<i class="epx-icon-inline"></i>
|
|
70
|
+
</el-tooltip>
|
|
71
|
+
</el-radio-button>
|
|
72
|
+
<el-radio-button label="flex" value="flex">
|
|
73
|
+
<el-tooltip effect="dark" content="弹性盒子,可设置子元素内部排列方式">
|
|
74
|
+
<i class="epx-icon-flex"></i>
|
|
75
|
+
</el-tooltip>
|
|
76
|
+
</el-radio-button>
|
|
77
|
+
</el-radio-group>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="epx-page-designer-setting-style__content" v-if="style['display']==='flex'">
|
|
80
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
81
|
+
<label class="epx-page-designer-setting-style__label" for="">方向</label>
|
|
82
|
+
<el-radio-group class="epx-page-designer-setting-style__radio-button-group" v-model="style['flex-direction']" size="small">
|
|
83
|
+
<el-radio-button :label="item.value" :value="item.value" v-for="item in this.flexDirectionList" :key="item.value">
|
|
84
|
+
<el-tooltip effect="dark" :content="item.tip" placement="top">
|
|
85
|
+
<i :class="item.icon" :style="{transform: `rotateY(${item.rotateY || 0}) rotateX(${item.rotateX || 0})`}"></i>
|
|
86
|
+
</el-tooltip>
|
|
87
|
+
</el-radio-button>
|
|
88
|
+
</el-radio-group>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
91
|
+
<label class="epx-page-designer-setting-style__label" for="">{{['column', 'column-reverse'].includes(style['flex-direction']) ?'垂直': '水平'}}</label>
|
|
92
|
+
<el-radio-group class="epx-page-designer-setting-style__radio-button-group" v-model="style['justify-content']" size="small">
|
|
93
|
+
<el-radio-button :label="item.value" :value="item.value" v-for="item in this.flexJustifyList" :key="item.value">
|
|
94
|
+
<el-tooltip effect="dark" :content="item.tip" placement="top">
|
|
95
|
+
<i :class="item.icon"></i>
|
|
96
|
+
</el-tooltip>
|
|
97
|
+
</el-radio-button>
|
|
98
|
+
</el-radio-group>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
101
|
+
<label class="epx-page-designer-setting-style__label" for="">{{['column', 'column-reverse'].includes(style['flex-direction']) ?'水平': '垂直'}}</label>
|
|
102
|
+
<el-radio-group class="epx-page-designer-setting-style__radio-button-group" v-model="style['align-items']" size="small">
|
|
103
|
+
<el-radio-button :label="item.value" :value="item.value" v-for="item in this.flexAlignList" :key="item.value">
|
|
104
|
+
<el-tooltip effect="dark" :content="item.tip" placement="top">
|
|
105
|
+
<i :class="item.icon"></i>
|
|
106
|
+
</el-tooltip>
|
|
107
|
+
</el-radio-button>
|
|
108
|
+
</el-radio-group>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<!-- 内外边距 -->
|
|
113
|
+
<div v-for="item in [{ label: $t('margin'), value: 'margin' }, { label: $t('padding'), value: 'padding' }]" :key="item.value" :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold':unfold[item.value] }" >
|
|
114
|
+
<div class="epx-page-designer-setting-style__header">
|
|
115
|
+
<span>
|
|
116
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold[item.value] = !unfold[item.value]"></i>
|
|
117
|
+
<label class="epx-page-designer-setting-style__label" for="">{{item.label}}</label>
|
|
118
|
+
</span>
|
|
119
|
+
<el-select class="selection" size="small" v-model="style[item.value]" :placeholder="$t('default')">
|
|
120
|
+
<el-option
|
|
121
|
+
v-for="item in space"
|
|
122
|
+
:key="item.value"
|
|
123
|
+
:label="item.label"
|
|
124
|
+
:value="item.value">
|
|
125
|
+
</el-option>
|
|
126
|
+
<el-input class="epx-page-designer-setting-style__number-with-unit" size="small" :model-value="clearSuffix(style[item.value])" @update:model-value="v=>changePx(item.value, v, unit(item.value))">
|
|
127
|
+
<template v-slot:append><el-select class="epx-page-designer-setting-style__unit" :model-value="unit(item.value)" @update:model-value="v=>changePx(item.value, style[item.value], v)" size="small" placeholder="-">
|
|
128
|
+
<el-option label="px" value="px"></el-option>
|
|
129
|
+
<el-option label="%" value="%"></el-option>
|
|
130
|
+
<el-option label="auto" value="auto"></el-option>
|
|
131
|
+
</el-select></template>
|
|
132
|
+
</el-input>
|
|
133
|
+
<!-- <el-input-number class="epx-page-designer-setting-style__space-input" size="small" :model-value="clearSuffix(style[item.value])" controls-position="right" @change="v=>changePx(item.value, v)"></el-input-number> -->
|
|
134
|
+
</el-select>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="epx-page-designer-setting-style__content">
|
|
137
|
+
<div class="epx-page-designer-setting-style__subitem" v-for="subItem in [{label: $t('top margin'), value: '-top'}, {label: $t('right margin'), value: '-right'}, {label: $t('bottom margin'), value: '-bottom'},{label: $t('left margin'), value: '-left'}]" :key="subItem.value">
|
|
138
|
+
<label class="epx-page-designer-setting-style__label" for="">{{subItem.label}}</label>
|
|
139
|
+
<el-select class="selection" size="small" v-model="style[item.value + subItem.value]" :placeholder="$t('default')">
|
|
140
|
+
<el-option
|
|
141
|
+
v-for="item in space"
|
|
142
|
+
:key="item.value"
|
|
143
|
+
:label="item.label"
|
|
144
|
+
:value="item.value">
|
|
145
|
+
</el-option>
|
|
146
|
+
<el-input class="epx-page-designer-setting-style__number-with-unit" size="small" :model-value="clearSuffix(style[item.value+ subItem.value])" @update:model-value="v=>changePx(item.value + subItem.value, v, unit(item.value + subItem.value))">
|
|
147
|
+
<template v-slot:append><el-select class="epx-page-designer-setting-style__unit" :model-value="unit(item.value + subItem.value)" @update:model-value="v=>changePx(item.value + subItem.value, style[item.value + subItem.value], v)" size="small" placeholder="-">
|
|
148
|
+
<el-option label="px" value="px"></el-option>
|
|
149
|
+
<el-option label="%" value="%"></el-option>
|
|
150
|
+
<el-option label="auto" value="auto"></el-option>
|
|
151
|
+
</el-select></template>
|
|
152
|
+
</el-input>
|
|
153
|
+
</el-select>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
<!-- 文字 -->
|
|
158
|
+
<div :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold':unfold.text }">
|
|
159
|
+
<div class="epx-page-designer-setting-style__header">
|
|
160
|
+
<span>
|
|
161
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold['text'] = !unfold.text"></i>
|
|
162
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('word')}}</label>
|
|
163
|
+
</span>
|
|
164
|
+
<el-select class="selection" size="small" v-model="style.text" :placeholder="$t('default')">
|
|
165
|
+
<el-option
|
|
166
|
+
v-for="item in textOption"
|
|
167
|
+
:key="item.value"
|
|
168
|
+
:label="item.label"
|
|
169
|
+
:value="item.value">
|
|
170
|
+
</el-option>
|
|
171
|
+
</el-select>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="epx-page-designer-setting-style__content">
|
|
174
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
175
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('word size')}}</label>
|
|
176
|
+
<el-input-number size="small" :model-value="toNumber(clearSuffix(style['font-size']))" controls-position="right" @change="v=>(style['font-size'] = v+'px')"></el-input-number>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
179
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('row height')}}</label>
|
|
180
|
+
<el-input-number size="small" :model-value="toNumber(clearSuffix(style['line-height']))" controls-position="right" @change="v=>(style['line-height'] = v+'px')"></el-input-number>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
183
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('text direction')}}</label>
|
|
184
|
+
<el-radio-group v-model="style['text-align']" size="default">
|
|
185
|
+
<el-radio-button label="left" value="left">
|
|
186
|
+
<i class="epx-icon-left"></i>
|
|
187
|
+
</el-radio-button>
|
|
188
|
+
<el-radio-button label="center" value="center">
|
|
189
|
+
<i class="epx-icon-center"></i>
|
|
190
|
+
</el-radio-button>
|
|
191
|
+
<el-radio-button label="right" value="right">
|
|
192
|
+
<i class="epx-icon-right"></i>
|
|
193
|
+
</el-radio-button>
|
|
194
|
+
</el-radio-group>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
197
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('word again')}}</label>
|
|
198
|
+
<el-select class="selection" size="small" v-model="style['font-weight']" :placeholder="$t('default')">
|
|
199
|
+
<el-option
|
|
200
|
+
v-for="item in fontWeightOption"
|
|
201
|
+
:key="item.value"
|
|
202
|
+
:label="item.label"
|
|
203
|
+
:value="item.value">
|
|
204
|
+
</el-option>
|
|
205
|
+
</el-select>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
208
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('font color')}}</label>
|
|
209
|
+
<el-color-picker
|
|
210
|
+
v-model="style.color"
|
|
211
|
+
show-alpha
|
|
212
|
+
:predefine="predefineColors">
|
|
213
|
+
</el-color-picker>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
<!-- 背景 -->
|
|
218
|
+
<div :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold':unfold.background }">
|
|
219
|
+
<div class="epx-page-designer-setting-style__header">
|
|
220
|
+
<span>
|
|
221
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold['background'] = !unfold.background"></i>
|
|
222
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('background')}}</label>
|
|
223
|
+
</span>
|
|
224
|
+
</div>
|
|
225
|
+
<div class="epx-page-designer-setting-style__content">
|
|
226
|
+
<epx-visual-config-background
|
|
227
|
+
v-model="style"
|
|
228
|
+
@input="updateStyle"
|
|
229
|
+
definingNameType="kebab-case"
|
|
230
|
+
></epx-visual-config-background>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
<!-- 边框 -->
|
|
234
|
+
<div :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold':unfold.border }">
|
|
235
|
+
<div class="epx-page-designer-setting-style__header">
|
|
236
|
+
<span>
|
|
237
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold['border'] = !unfold.border"></i>
|
|
238
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('border')}}</label>
|
|
239
|
+
</span>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="epx-page-designer-setting-style__content">
|
|
242
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
243
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('linear')}}</label>
|
|
244
|
+
<el-select class="selection" size="small" v-model="style['border-style']" :placeholder="$t('not')">
|
|
245
|
+
<el-option
|
|
246
|
+
v-for="item in borderStyleOption"
|
|
247
|
+
:key="item.value"
|
|
248
|
+
:label="item.label"
|
|
249
|
+
:value="item.value">
|
|
250
|
+
</el-option>
|
|
251
|
+
</el-select>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
254
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('width')}}</label>
|
|
255
|
+
<el-input class="epx-page-designer-setting-style__input-number--small" size="small" :model-value="clearSuffix(style['border-width'])" @update:model-value="v=>changePx('border-width', v, 'px')"></el-input>
|
|
256
|
+
<el-radio-group class="epx-page-designer-setting-style__border-width-radio" v-model="borderWidthType" size="small">
|
|
257
|
+
<el-radio-button label="same" value="same">
|
|
258
|
+
<i class="epx-icon-border"></i>
|
|
259
|
+
</el-radio-button>
|
|
260
|
+
<el-radio-button label="diff" value="diff">
|
|
261
|
+
<i class="epx-icon-xuxian"></i>
|
|
262
|
+
</el-radio-button>
|
|
263
|
+
</el-radio-group>
|
|
264
|
+
<div class="epx-page-designer-setting-style__border-position" v-if="borderWidthType==='diff'">
|
|
265
|
+
<div class="epx-page-designer-setting-style__border-position-item" v-for="item in borderWidthPositionList" :key="item.value">
|
|
266
|
+
<el-input-number :model-value="clearSuffix(borderWidthPosition[item.value])" :controls="false" :min="0" size="small" @change="v=>changeBorderWidthPosition(item.value, v)"></el-input-number>
|
|
267
|
+
{{item.label}}
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
272
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('color')}}</label>
|
|
273
|
+
<el-color-picker
|
|
274
|
+
v-model="style['border-color']"
|
|
275
|
+
show-alpha
|
|
276
|
+
:predefine="predefineColors">
|
|
277
|
+
</el-color-picker>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
280
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('filleted corner')}}</label>
|
|
281
|
+
<el-input-number size="small" :model-value="clearSuffix(style['border-radius'])" controls-position="right" @change="v=>(style['border-radius'] = v+'px')"></el-input-number>
|
|
282
|
+
<el-radio-group class="epx-page-designer-setting-style__border-width-radio" v-model="borderRadiusType" size="small">
|
|
283
|
+
<el-radio-button label="same" value="same">
|
|
284
|
+
<i class="epx-icon-border"></i>
|
|
285
|
+
</el-radio-button>
|
|
286
|
+
<el-radio-button label="diff" value="diff">
|
|
287
|
+
<i class="epx-icon-xuxian"></i>
|
|
288
|
+
</el-radio-button>
|
|
289
|
+
</el-radio-group>
|
|
290
|
+
<div class="epx-page-designer-setting-style__border-position" v-if="borderRadiusType==='diff'">
|
|
291
|
+
<div class="epx-page-designer-setting-style__border-position-item" v-for="item in borderRadiusPositionList" :key="item.value">
|
|
292
|
+
<el-input-number :model-value="clearSuffix(borderRadiusPosition[item.value])" :controls="false" :min="0" size="small" @change="v=>changeBorderRadiusPosition(item.value, v)"></el-input-number>
|
|
293
|
+
{{item.label}}
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
<!-- 阴影 -->
|
|
300
|
+
<div :class="{'epx-page-designer-setting-style__item': true, 'epx-page-designer-setting-style__item--unfold':unfold.shadow }">
|
|
301
|
+
<div class="epx-page-designer-setting-style__header">
|
|
302
|
+
<span>
|
|
303
|
+
<i class="epx-page-designer-setting-style__fold-icon el-icon-caret-right" @click="unfold['shadow'] = !unfold.shadow"></i>
|
|
304
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('shadow')}}</label>
|
|
305
|
+
</span>
|
|
306
|
+
</div>
|
|
307
|
+
<div class="epx-page-designer-setting-style__content">
|
|
308
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
309
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('level of the shadow')}}</label>
|
|
310
|
+
<el-input-number size="small" :model-value="clearSuffix(style.hShadow)" controls-position="right" @change="v=>(style['hShadow'] = v+'px')"></el-input-number>
|
|
311
|
+
</div>
|
|
312
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
313
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('vertical shadow')}}</label>
|
|
314
|
+
<el-input-number size="small" :model-value="clearSuffix(style.vShadow)" controls-position="right" @change="v=>(style['vShadow'] = v+'px')"></el-input-number>
|
|
315
|
+
</div>
|
|
316
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
317
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('fuzzy distance')}}</label>
|
|
318
|
+
<el-input-number size="small" :model-value="clearSuffix(style.shadowBlur)" controls-position="right" @change="v=>(style['shadowBlur'] = v+'px')"></el-input-number>
|
|
319
|
+
</div>
|
|
320
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
321
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('size of the shadow')}}</label>
|
|
322
|
+
<el-input-number size="small" :model-value="clearSuffix(style.shadowSpread)" controls-position="right" @change="v=>(style['shadowSpread'] = v+'px')"></el-input-number>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="epx-page-designer-setting-style__subitem">
|
|
325
|
+
<label class="epx-page-designer-setting-style__label" for="">{{$t('shadow color')}}</label>
|
|
326
|
+
<el-color-picker
|
|
327
|
+
v-model="style.shadowColor"
|
|
328
|
+
show-alpha
|
|
329
|
+
:predefine="predefineColors">
|
|
330
|
+
</el-color-picker>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</template>
|
|
336
|
+
|
|
337
|
+
<script>
|
|
338
|
+
import CssEditor from './css-editor/CssEditor.vue'
|
|
339
|
+
import Background from '@epxing/designer/src/visual/config/Background.vue'
|
|
340
|
+
|
|
341
|
+
export default {
|
|
342
|
+
name: 'epx-page-designer-setting-style',
|
|
343
|
+
components: {
|
|
344
|
+
CssEditor,
|
|
345
|
+
[Background.name]: Background
|
|
346
|
+
},
|
|
347
|
+
props: {
|
|
348
|
+
designer: {
|
|
349
|
+
type: Object
|
|
350
|
+
},
|
|
351
|
+
value: String,
|
|
352
|
+
inlineStyle: Boolean
|
|
353
|
+
},
|
|
354
|
+
data () {
|
|
355
|
+
return {
|
|
356
|
+
load: true,
|
|
357
|
+
defaultStyle: {}, // 默认状态样式
|
|
358
|
+
hoverStyle: {}, // 悬浮状态样式
|
|
359
|
+
mouseStatus: 'default',
|
|
360
|
+
unfold: {
|
|
361
|
+
display: true
|
|
362
|
+
},
|
|
363
|
+
space: [
|
|
364
|
+
{ label: '超大', value: '24px' },
|
|
365
|
+
{ label: '大', value: '16px' },
|
|
366
|
+
{ label: '中', value: '12px' },
|
|
367
|
+
{ label: '小', value: '4px' },
|
|
368
|
+
{ label: '无', value: '0px' },
|
|
369
|
+
{ label: '默认', value: 'default' },
|
|
370
|
+
{ label: '自定义', value: 'custom' }
|
|
371
|
+
],
|
|
372
|
+
showCssEditor: false,
|
|
373
|
+
borderWidthType: 'same',
|
|
374
|
+
borderRadiusType: 'same'
|
|
375
|
+
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
computed: {
|
|
379
|
+
type () {
|
|
380
|
+
if (this.designer.selectedWidget) return 'widget'
|
|
381
|
+
return 'page'
|
|
382
|
+
},
|
|
383
|
+
style: {
|
|
384
|
+
get () {
|
|
385
|
+
if (this.mouseStatus === 'hover') {
|
|
386
|
+
return this.hoverStyle
|
|
387
|
+
} else {
|
|
388
|
+
return this.defaultStyle
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
set (v) {
|
|
392
|
+
this.updateStyle(v)
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
clearSuffix () {
|
|
397
|
+
return (v = '') => {
|
|
398
|
+
const value = v === 'auto' ? 'auto' : typeof v === 'string' ? v.replace(/(px|%)/, '') : v
|
|
399
|
+
return value
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
toNumber () {
|
|
403
|
+
return v => Number(v) || 0
|
|
404
|
+
},
|
|
405
|
+
isSameMargin () {
|
|
406
|
+
const { 'margin-top': marginTop, 'margin-right': marginRight, 'margin-bottom': marginBottom, 'margin-left': marginLeft } = this.style
|
|
407
|
+
return marginTop === marginRight && marginTop === marginBottom && marginTop === marginLeft
|
|
408
|
+
},
|
|
409
|
+
isSamePadding () {
|
|
410
|
+
const { 'padding-top': paddingTop, 'padding-right': paddingRight, 'padding-bottom': paddingBottom, 'padding-left': paddingLeft } = this.style
|
|
411
|
+
return paddingTop === paddingRight && paddingTop === paddingBottom && paddingTop === paddingLeft
|
|
412
|
+
},
|
|
413
|
+
shadow () {
|
|
414
|
+
const { hShadow, vShadow, shadowBlur, shadowSpread, shadowColor } = this.style
|
|
415
|
+
return `${hShadow} ${vShadow} ${shadowBlur} ${shadowSpread} ${shadowColor}`
|
|
416
|
+
},
|
|
417
|
+
css () {
|
|
418
|
+
if (this.inlineStyle) {
|
|
419
|
+
return this.value || ':current {\r\n\r\n}'
|
|
420
|
+
}
|
|
421
|
+
const { css = ':current {\r\n\r\n}' } = this.designer.selectedWidget || this.designer.pageConfig
|
|
422
|
+
return css
|
|
423
|
+
},
|
|
424
|
+
unit () {
|
|
425
|
+
return item => {
|
|
426
|
+
const value = this.style[item]
|
|
427
|
+
if (value === 'auto') {
|
|
428
|
+
return ''
|
|
429
|
+
} else if (value) {
|
|
430
|
+
return value.replace(/[-\d]+/, '')
|
|
431
|
+
} else {
|
|
432
|
+
return 'px'
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
borderWidthPosition: {
|
|
437
|
+
get () {
|
|
438
|
+
const positionMap = {}
|
|
439
|
+
this.borderWidthPositionList.map(item => {
|
|
440
|
+
let borderPositionWidth = this.style[`border-${item.value}-width`]
|
|
441
|
+
if (!borderPositionWidth) {
|
|
442
|
+
const border = this.style[`border-${item.value}`] || this.style.border
|
|
443
|
+
if (border) {
|
|
444
|
+
borderPositionWidth = border.split(' ')[0]
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
positionMap[item.value] = borderPositionWidth || this.style['border-width'] || 0
|
|
449
|
+
})
|
|
450
|
+
return positionMap
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
borderRadiusPosition: {
|
|
454
|
+
get () {
|
|
455
|
+
const positionMap = {}
|
|
456
|
+
this.borderRadiusPositionList.map(item => {
|
|
457
|
+
let borderRadiusPosition = this.style[`border-${item.value}-radius`]
|
|
458
|
+
if (!borderRadiusPosition) {
|
|
459
|
+
const borderRadius = this.style['border-radius']
|
|
460
|
+
if (borderRadius) {
|
|
461
|
+
const borderRadiusArr = borderRadius.split(' ')
|
|
462
|
+
let index = 0
|
|
463
|
+
if (borderRadiusArr.length === 2) {
|
|
464
|
+
index = item.index % 2
|
|
465
|
+
} else if (borderRadiusArr.length === 4) {
|
|
466
|
+
index = item.index
|
|
467
|
+
}
|
|
468
|
+
borderRadiusPosition = borderRadiusArr[index]
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
positionMap[item.value] = borderRadiusPosition || 0
|
|
473
|
+
})
|
|
474
|
+
return positionMap
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
watch: {
|
|
479
|
+
'designer.selectedWidget' (v) {
|
|
480
|
+
if (this.$refs.codeEditorPopover) this.$refs.codeEditorPopover.hide()
|
|
481
|
+
this.showCssEditor = false
|
|
482
|
+
this.cssToStyle()
|
|
483
|
+
this.load = false
|
|
484
|
+
this.$nextTick(() => {
|
|
485
|
+
this.load = true
|
|
486
|
+
})
|
|
487
|
+
},
|
|
488
|
+
'css' (v) {
|
|
489
|
+
|
|
490
|
+
},
|
|
491
|
+
style: {
|
|
492
|
+
handler (v = {}) {
|
|
493
|
+
if (this.timer) {
|
|
494
|
+
clearTimeout(this.timer)
|
|
495
|
+
}
|
|
496
|
+
this.timer = setTimeout(() => {
|
|
497
|
+
this.updateCss()
|
|
498
|
+
clearTimeout(this.timer)
|
|
499
|
+
}, 200)
|
|
500
|
+
},
|
|
501
|
+
deep: true
|
|
502
|
+
},
|
|
503
|
+
'style.margin' (v) {
|
|
504
|
+
if (v && v !== 'custom') {
|
|
505
|
+
['-top', '-right', '-bottom', '-left'].forEach(item => {
|
|
506
|
+
this.style['margin' + item] = v
|
|
507
|
+
})
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
'style.padding' (v) {
|
|
511
|
+
if (v && v !== 'custom') {
|
|
512
|
+
['-top', '-right', '-bottom', '-left'].forEach(item => {
|
|
513
|
+
this.style['padding' + item] = v
|
|
514
|
+
})
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
'style.text' (v) {
|
|
518
|
+
// 获取选项对应style
|
|
519
|
+
const option = this.textOption.find(item => item.value === v)
|
|
520
|
+
if (option && option.style) {
|
|
521
|
+
for (const key in option.style) {
|
|
522
|
+
this.style[key] = option.style[key]
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
isSameMargin (v) {
|
|
527
|
+
if (v) {
|
|
528
|
+
this.style.margin = this.style.marginTop || this.style.margin
|
|
529
|
+
} else {
|
|
530
|
+
this.style.margin = 'custom'
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
isSamePadding (v) {
|
|
534
|
+
if (v) {
|
|
535
|
+
this.style.padding = this.style.paddingTop || this.style.padding
|
|
536
|
+
} else {
|
|
537
|
+
this.style.padding = 'custom'
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
methods: {
|
|
542
|
+
updateStyle (v) {
|
|
543
|
+
if (this.mouseStatus === 'hover') {
|
|
544
|
+
this.hoverStyle = v
|
|
545
|
+
} else {
|
|
546
|
+
this.defaultStyle = v
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
getOption () {
|
|
550
|
+
const textOption = [
|
|
551
|
+
{
|
|
552
|
+
label: this.$t('Translation of the title'),
|
|
553
|
+
value: 'h1',
|
|
554
|
+
style: {
|
|
555
|
+
'font-size': '20px',
|
|
556
|
+
'font-weight': '700',
|
|
557
|
+
'line-height': '32px'
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
label: this.$t('SubTitle'),
|
|
562
|
+
value: 'h2',
|
|
563
|
+
style: {
|
|
564
|
+
'font-size': '16px',
|
|
565
|
+
'font-weight': '700',
|
|
566
|
+
'line-height': '24px'
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
label: this.$t('main body'),
|
|
571
|
+
value: 'default',
|
|
572
|
+
style: {
|
|
573
|
+
'font-size': '14px',
|
|
574
|
+
'line-height': '20px'
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
label: this.$t('auxiliary words'),
|
|
579
|
+
value: 'second',
|
|
580
|
+
style: {
|
|
581
|
+
'font-size': '12px',
|
|
582
|
+
color: '#666',
|
|
583
|
+
'line-height': '16px'
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
label: this.$t('user-defined'),
|
|
588
|
+
value: 'custom'
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
this.textOption = textOption
|
|
592
|
+
this.predefineColors = ['#ff4500', '#ff8c00', '#ffd700', '#90ee90']
|
|
593
|
+
this.fontWeightOption = [
|
|
594
|
+
{
|
|
595
|
+
label: this.$t('overstriking'),
|
|
596
|
+
value: '700'
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
label: this.$t('thin'),
|
|
600
|
+
value: '400'
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
label: this.$t('default'),
|
|
604
|
+
value: '500'
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
this.borderStyleOption = [
|
|
608
|
+
{
|
|
609
|
+
label: this.$t('full line'),
|
|
610
|
+
value: 'solid'
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
label: this.$t('dotted line'),
|
|
614
|
+
value: 'dashed'
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
label: this.$t('stipple line'),
|
|
618
|
+
value: 'dotted'
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
label: this.$t('not'),
|
|
622
|
+
value: 'none'
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
this.borderWidthPositionList = [{
|
|
626
|
+
label: '上',
|
|
627
|
+
value: 'top'
|
|
628
|
+
}, {
|
|
629
|
+
label: '右',
|
|
630
|
+
value: 'right'
|
|
631
|
+
}, {
|
|
632
|
+
label: '下',
|
|
633
|
+
value: 'bottom'
|
|
634
|
+
}, {
|
|
635
|
+
label: '左',
|
|
636
|
+
value: 'left'
|
|
637
|
+
}]
|
|
638
|
+
this.borderRadiusPositionList = [{
|
|
639
|
+
label: '左上',
|
|
640
|
+
value: 'top-left',
|
|
641
|
+
index: 0
|
|
642
|
+
}, {
|
|
643
|
+
label: '右上',
|
|
644
|
+
value: 'top-right',
|
|
645
|
+
index: 1
|
|
646
|
+
}, {
|
|
647
|
+
label: '右下',
|
|
648
|
+
value: 'bottom-right',
|
|
649
|
+
index: 2
|
|
650
|
+
}, {
|
|
651
|
+
label: '左下',
|
|
652
|
+
value: 'bottom-left',
|
|
653
|
+
index: 3
|
|
654
|
+
}]
|
|
655
|
+
this.flexDirectionList = [{
|
|
656
|
+
icon: 'epx-icon-fangxiang1',
|
|
657
|
+
value: 'row',
|
|
658
|
+
tip: '水平'
|
|
659
|
+
}, {
|
|
660
|
+
icon: 'epx-icon-fangxiang2',
|
|
661
|
+
value: 'column',
|
|
662
|
+
tip: '垂直'
|
|
663
|
+
}, {
|
|
664
|
+
icon: 'epx-icon-fangxiang1',
|
|
665
|
+
value: 'row-reverse',
|
|
666
|
+
rotateY: '180deg',
|
|
667
|
+
tip: '水平逆序'
|
|
668
|
+
}, {
|
|
669
|
+
icon: 'epx-icon-fangxiang2',
|
|
670
|
+
value: 'column-reverse',
|
|
671
|
+
rotateX: '180deg',
|
|
672
|
+
tip: '垂直逆序'
|
|
673
|
+
}]
|
|
674
|
+
this.flexJustifyList = [{
|
|
675
|
+
icon: 'epx-icon-left1',
|
|
676
|
+
value: 'flex-start',
|
|
677
|
+
tip: '起点对齐'
|
|
678
|
+
}, {
|
|
679
|
+
icon: 'epx-icon-justify-center',
|
|
680
|
+
value: 'center',
|
|
681
|
+
tip: '居中'
|
|
682
|
+
}, {
|
|
683
|
+
icon: 'epx-icon-right1',
|
|
684
|
+
value: 'flex-end',
|
|
685
|
+
tip: '终点对齐'
|
|
686
|
+
}, {
|
|
687
|
+
icon: 'epx-icon-fangxiang2',
|
|
688
|
+
value: 'space-around',
|
|
689
|
+
tip: '均匀排列'
|
|
690
|
+
}, {
|
|
691
|
+
icon: 'epx-icon-space-between',
|
|
692
|
+
value: 'space-between',
|
|
693
|
+
tip: '两侧对齐'
|
|
694
|
+
}]
|
|
695
|
+
this.flexAlignList = [
|
|
696
|
+
{
|
|
697
|
+
icon: 'epx-icon-top',
|
|
698
|
+
value: 'flex-start',
|
|
699
|
+
tip: '起点对齐'
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
icon: 'epx-icon-align-center',
|
|
703
|
+
value: 'center',
|
|
704
|
+
tip: '居中'
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
icon: 'epx-icon-end',
|
|
708
|
+
value: 'flex-end',
|
|
709
|
+
tip: '终点对齐'
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
changePx (key, v, unit = 'px') {
|
|
714
|
+
if ((unit || v) === 'auto') {
|
|
715
|
+
this.style[key] = unit
|
|
716
|
+
} else {
|
|
717
|
+
const formatV = !Number.isNaN(parseFloat(v)) ? parseFloat(v) + unit : ''
|
|
718
|
+
if (formatV || v === '-') {
|
|
719
|
+
this.style[key] = formatV || v + unit
|
|
720
|
+
} else {
|
|
721
|
+
delete this.style[key]
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
changeBorderWidthPosition (key, v) {
|
|
726
|
+
this.style[`border-${key}-width`] = v + 'px'
|
|
727
|
+
},
|
|
728
|
+
changeBorderRadiusPosition (key, v) {
|
|
729
|
+
const borderRadiusPosition = {
|
|
730
|
+
...this.borderRadiusPosition,
|
|
731
|
+
[key]: v + 'px'
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const same = Object.values(borderRadiusPosition).every(item => item === v + 'px')
|
|
735
|
+
if (same) {
|
|
736
|
+
this.style['border-radius'] = v + 'px'
|
|
737
|
+
} else if (borderRadiusPosition['top-left'] === borderRadiusPosition['bottom-right'] && borderRadiusPosition['top-right'] === borderRadiusPosition['bottom-left']) {
|
|
738
|
+
this.style['border-radius'] = `${borderRadiusPosition['top-left']} ${borderRadiusPosition['top-right']}`
|
|
739
|
+
} else {
|
|
740
|
+
this.style['border-radius'] = `${borderRadiusPosition['top-left']} ${borderRadiusPosition['top-right']} ${borderRadiusPosition['bottom-right']} ${borderRadiusPosition['bottom-left']}`
|
|
741
|
+
}
|
|
742
|
+
for (const key in borderRadiusPosition) {
|
|
743
|
+
delete this.style[`border-${key}-radius`]
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
updateCss () {
|
|
747
|
+
if (!this.initStyle) return
|
|
748
|
+
|
|
749
|
+
const {
|
|
750
|
+
margin, 'margin-top': marginTop, 'margin-right': marginRight, 'margin-bottom': marginBottom, 'margin-left': marginLeft,
|
|
751
|
+
padding, 'padding-top': paddingTop, 'padding-right': paddingRight, 'padding-bottom': paddingBottom, 'padding-left': paddingLeft,
|
|
752
|
+
hShadow = 0, vShadow = 0, shadowBlur = 0, shadowSpread = 0, shadowColor,
|
|
753
|
+
text,
|
|
754
|
+
...otherStyle
|
|
755
|
+
} = this.style
|
|
756
|
+
const style = {
|
|
757
|
+
...otherStyle
|
|
758
|
+
}
|
|
759
|
+
if (hShadow || vShadow || shadowBlur) {
|
|
760
|
+
style.boxShadow = `${hShadow} ${vShadow} ${shadowBlur} ${shadowSpread} ${shadowColor}`
|
|
761
|
+
}
|
|
762
|
+
if (margin !== 'default') {
|
|
763
|
+
if (!this.isSameMargin) {
|
|
764
|
+
if (![marginTop, marginRight, marginBottom, marginLeft].includes('default') && ![marginTop, marginRight, marginBottom, marginLeft].includes(undefined)) {
|
|
765
|
+
style.margin = `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`
|
|
766
|
+
} else {
|
|
767
|
+
if (marginTop && marginTop !== 'default') style.marginTop = marginTop
|
|
768
|
+
if (marginRight && marginRight !== 'default') style.marginRight = marginRight
|
|
769
|
+
if (marginBottom && marginBottom !== 'default') style.marginBottom = marginBottom
|
|
770
|
+
if (marginLeft && marginLeft !== 'default') style.marginLeft = marginLeft
|
|
771
|
+
}
|
|
772
|
+
} else if (margin) {
|
|
773
|
+
style.margin = margin
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
if (padding) {
|
|
777
|
+
if (!this.isSamePadding) {
|
|
778
|
+
if (![paddingTop, paddingRight, paddingBottom, paddingLeft].includes('default') && ![paddingTop, paddingRight, paddingBottom, paddingLeft].includes(undefined)) {
|
|
779
|
+
style.padding = `${paddingTop} ${paddingRight} ${paddingBottom} ${paddingLeft}`
|
|
780
|
+
} else {
|
|
781
|
+
if (paddingTop && paddingTop !== 'default') style.paddingTop = paddingTop
|
|
782
|
+
if (paddingRight && paddingRight !== 'default') style.paddingRight = paddingRight
|
|
783
|
+
if (paddingBottom && paddingBottom !== 'default') style.paddingBottom = paddingBottom
|
|
784
|
+
if (paddingLeft && paddingLeft !== 'default') style.paddingLeft = paddingLeft
|
|
785
|
+
}
|
|
786
|
+
} else {
|
|
787
|
+
style.padding = padding
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
for (const key in style) {
|
|
792
|
+
if (!style[key]) delete style[key]
|
|
793
|
+
}
|
|
794
|
+
if (this.$_.isEqual(style, this.oldStyle)) return
|
|
795
|
+
this.oldStyle = { ...style }
|
|
796
|
+
const css = this.styleToCss(style)
|
|
797
|
+
// 更新css
|
|
798
|
+
if (this.inlineStyle) {
|
|
799
|
+
this.$emit('input', css)
|
|
800
|
+
} else if (this.type === 'page') {
|
|
801
|
+
this.designer.updatePageConfig({ css: css })
|
|
802
|
+
} else {
|
|
803
|
+
this.designer.updateWidget(this.designer.selectedWidget.id, { css: css })
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
cssToStyle () {
|
|
807
|
+
// 将css转为style
|
|
808
|
+
let style = {}
|
|
809
|
+
let hoverStyle = {}
|
|
810
|
+
const css = this.css || ''
|
|
811
|
+
if (css) {
|
|
812
|
+
const cssObject = this.cssToObject(css)
|
|
813
|
+
style = cssObject[':current']
|
|
814
|
+
if (cssObject[':current:hover']) hoverStyle = cssObject[':current:hover']
|
|
815
|
+
}
|
|
816
|
+
const formatStyle = (style) => {
|
|
817
|
+
const { margin, padding, 'box-shadow': boxShadow, ...otherStyle } = style
|
|
818
|
+
const componentStyle = {}
|
|
819
|
+
for (const key in style) {
|
|
820
|
+
const value = style[key]
|
|
821
|
+
if (key === 'box-shadow') {
|
|
822
|
+
if (value) {
|
|
823
|
+
const shadowColor = value.split('rgb')[1]
|
|
824
|
+
const shadowArr = value.split(/\s+/)
|
|
825
|
+
componentStyle.hShadow = shadowArr[0] || 0
|
|
826
|
+
componentStyle.vShadow = shadowArr[1] || 0
|
|
827
|
+
componentStyle.shadowBlur = shadowArr[2] || 0
|
|
828
|
+
componentStyle.shadowSpread = shadowArr[3] || 0
|
|
829
|
+
componentStyle.shadowColor = shadowColor ? 'rgb' + shadowColor : ''
|
|
830
|
+
}
|
|
831
|
+
} else if (key === 'margin') {
|
|
832
|
+
if (value) {
|
|
833
|
+
const arr = value.split(' ')
|
|
834
|
+
if (arr.length === 2) {
|
|
835
|
+
componentStyle.margin = 'custom'
|
|
836
|
+
componentStyle['margin-top'] = arr[0]
|
|
837
|
+
componentStyle['margin-right'] = arr[1]
|
|
838
|
+
componentStyle['margin-bottom'] = arr[0]
|
|
839
|
+
componentStyle['margin-left'] = arr[1]
|
|
840
|
+
} else if (arr.length === 3) {
|
|
841
|
+
componentStyle.margin = 'custom'
|
|
842
|
+
componentStyle['margin-top'] = arr[0]
|
|
843
|
+
componentStyle['margin-right'] = arr[1]
|
|
844
|
+
componentStyle['margin-bottom'] = arr[2]
|
|
845
|
+
componentStyle['margin-left'] = arr[1]
|
|
846
|
+
} else if (arr.length === 4) {
|
|
847
|
+
componentStyle.margin = 'custom'
|
|
848
|
+
componentStyle['margin-top'] = arr[0]
|
|
849
|
+
componentStyle['margin-right'] = arr[1]
|
|
850
|
+
componentStyle['margin-bottom'] = arr[2]
|
|
851
|
+
componentStyle['margin-left'] = arr[3]
|
|
852
|
+
} else {
|
|
853
|
+
componentStyle.margin = margin
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
} else if (key === 'padding') {
|
|
857
|
+
if (value) {
|
|
858
|
+
const arr = value.split(' ')
|
|
859
|
+
if (arr.length === 2) {
|
|
860
|
+
componentStyle.padding = 'custom'
|
|
861
|
+
componentStyle['padding-top'] = arr[0]
|
|
862
|
+
componentStyle['padding-right'] = arr[1]
|
|
863
|
+
componentStyle['padding-bottom'] = arr[0]
|
|
864
|
+
componentStyle['padding-left'] = arr[1]
|
|
865
|
+
} else if (arr.length === 3) {
|
|
866
|
+
componentStyle.padding = 'custom'
|
|
867
|
+
componentStyle['padding-top'] = arr[0]
|
|
868
|
+
componentStyle['padding-right'] = arr[1]
|
|
869
|
+
componentStyle['padding-bottom'] = arr[2]
|
|
870
|
+
componentStyle['padding-left'] = arr[1]
|
|
871
|
+
} else if (arr.length === 4) {
|
|
872
|
+
componentStyle.padding = 'custom'
|
|
873
|
+
componentStyle['padding-top'] = arr[0]
|
|
874
|
+
componentStyle['padding-right'] = arr[1]
|
|
875
|
+
componentStyle['padding-bottom'] = arr[2]
|
|
876
|
+
componentStyle['padding-left'] = arr[3]
|
|
877
|
+
} else {
|
|
878
|
+
componentStyle.padding = padding
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
return { ...componentStyle, ...otherStyle }
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
this.defaultStyle = formatStyle(style)
|
|
887
|
+
this.hoverStyle = formatStyle(hoverStyle)
|
|
888
|
+
this.$nextTick(() => {
|
|
889
|
+
this.borderWidthType = Object.values(this.borderWidthPosition).every(item => item === this.borderWidthPosition.top) ? 'same' : 'diff'
|
|
890
|
+
this.borderRadiusType = Object.values(this.borderRadiusPosition).every(item => item === this.borderRadiusPosition['top-left']) ? 'same' : 'diff'
|
|
891
|
+
this.initStyle = true
|
|
892
|
+
})
|
|
893
|
+
},
|
|
894
|
+
cssToObject (css) {
|
|
895
|
+
const cssObject = {}
|
|
896
|
+
const regExp = /[\w-_.:#\s]+{[\w\s-.:;,()#%/]+}/g
|
|
897
|
+
const classList = css.match(regExp)
|
|
898
|
+
classList.forEach(item => {
|
|
899
|
+
const className = item.split('{')[0].trim()
|
|
900
|
+
const classContent = item.split('{')[1].split('}')[0]
|
|
901
|
+
var style = {}
|
|
902
|
+
const rules = classContent.split(';')
|
|
903
|
+
|
|
904
|
+
rules.forEach(rule => {
|
|
905
|
+
try {
|
|
906
|
+
var pair = rule.split(':')
|
|
907
|
+
var property = pair[0].trim()
|
|
908
|
+
var value = pair[1].trim()
|
|
909
|
+
if (property && value) {
|
|
910
|
+
style[property] = value
|
|
911
|
+
}
|
|
912
|
+
} catch (error) {
|
|
913
|
+
|
|
914
|
+
}
|
|
915
|
+
})
|
|
916
|
+
cssObject[className] = style
|
|
917
|
+
})
|
|
918
|
+
return cssObject
|
|
919
|
+
},
|
|
920
|
+
styleToCss (style) {
|
|
921
|
+
let str = (this.mouseStatus === 'hover' ? ':current:hover' : ':current') + ' {'
|
|
922
|
+
for (const key in style) {
|
|
923
|
+
const kebabCase = key.replace(/([A-Z])/g, $1 => {
|
|
924
|
+
return '-' + $1.toLocaleLowerCase()
|
|
925
|
+
})
|
|
926
|
+
// eslint-disable-next-line no-useless-escape
|
|
927
|
+
str += `\r\n ${kebabCase}: ${style[key]};`
|
|
928
|
+
}
|
|
929
|
+
str += '\r\n}'
|
|
930
|
+
const regExp = this.mouseStatus === 'hover' ? /[\s]*:current:hover\s*{[\w\s-:;.,()%#!/]+}/ : /[\s]*:current\s*{[\w\s-:;.,()#%!/]+}/
|
|
931
|
+
const css = this.css || ''
|
|
932
|
+
if (css.match(regExp)) {
|
|
933
|
+
return css.replace(regExp, this.mouseStatus === 'hover' ? '\r\n' + str : str)
|
|
934
|
+
} else {
|
|
935
|
+
return css + '\r\n' + str
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
|
|
939
|
+
changeCss (v) {
|
|
940
|
+
if (this.inlineStyle) {
|
|
941
|
+
this.$emit('input', v)
|
|
942
|
+
} else if (this.type === 'page') {
|
|
943
|
+
this.designer.updatePageConfig({ css: v })
|
|
944
|
+
} else {
|
|
945
|
+
this.designer.updateWidget(this.designer.selectedWidget.id, { css: v })
|
|
946
|
+
}
|
|
947
|
+
this.cssToStyle()
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
created () {
|
|
951
|
+
this.getOption()
|
|
952
|
+
// 初始化css
|
|
953
|
+
this.cssToStyle()
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
</script>
|
|
957
|
+
|
|
958
|
+
<style lang="scss">
|
|
959
|
+
@include b(page-designer-setting-style) {
|
|
960
|
+
padding: 10px;
|
|
961
|
+
|
|
962
|
+
:deep(.el-select),
|
|
963
|
+
:deep(.el-input-number),
|
|
964
|
+
:deep(.el-input) {
|
|
965
|
+
width: 190px;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
@include e(custom-btn) {
|
|
969
|
+
background: #F5F7FA;
|
|
970
|
+
@include font_color_primary;
|
|
971
|
+
text-align: center;
|
|
972
|
+
line-height: 32px;
|
|
973
|
+
border-radius: var(--border-radius);
|
|
974
|
+
cursor: pointer;
|
|
975
|
+
&:hover {
|
|
976
|
+
background: #F5F5F5;
|
|
977
|
+
}
|
|
978
|
+
i {
|
|
979
|
+
margin-right: 4px;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
@include e(header) {
|
|
983
|
+
display: flex;
|
|
984
|
+
align-items: center;
|
|
985
|
+
margin: 10px 0 ;
|
|
986
|
+
padding-right: 10px;
|
|
987
|
+
}
|
|
988
|
+
@include e(fold-icon) {
|
|
989
|
+
color: rgba(0,0,0,.65);
|
|
990
|
+
font-size: var(--epx-font-size-l);
|
|
991
|
+
margin-left: 8px;
|
|
992
|
+
margin-right: 4px;
|
|
993
|
+
}
|
|
994
|
+
@include e(label) {
|
|
995
|
+
display: inline-block;
|
|
996
|
+
color: #666;
|
|
997
|
+
width: 90px;
|
|
998
|
+
}
|
|
999
|
+
@include e(unit) {
|
|
1000
|
+
.el-input__inner {
|
|
1001
|
+
padding:0 10px;
|
|
1002
|
+
}
|
|
1003
|
+
.el-input__suffix {
|
|
1004
|
+
display: none;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
@include e(radio-button-group) {
|
|
1008
|
+
.el-radio-button--medium {
|
|
1009
|
+
.el-radio-button__inner {
|
|
1010
|
+
padding: 7px 16px;
|
|
1011
|
+
font-size: 16px;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
.el-radio-button--small {
|
|
1015
|
+
.el-radio-button__inner {
|
|
1016
|
+
padding: 6px 10px;
|
|
1017
|
+
font-size: 16px;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
@include e(number-with-unit) {
|
|
1022
|
+
.el-input__inner {
|
|
1023
|
+
text-align: center;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
@include e(content) {
|
|
1027
|
+
display: none;
|
|
1028
|
+
background: #F5F7FA;
|
|
1029
|
+
overflow: hidden;
|
|
1030
|
+
padding: 0 10px 0 28px;
|
|
1031
|
+
}
|
|
1032
|
+
@include e(item) {
|
|
1033
|
+
@include m(unfold) {
|
|
1034
|
+
@include e(fold-icon) {
|
|
1035
|
+
transform: rotate(90deg);
|
|
1036
|
+
}
|
|
1037
|
+
@include e(content) {
|
|
1038
|
+
display: block;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
@include m(alone) {
|
|
1042
|
+
display: flex;
|
|
1043
|
+
align-items: center;
|
|
1044
|
+
margin: 10px 24px 10px 28px;
|
|
1045
|
+
.el-input {
|
|
1046
|
+
flex: 1;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
@include e(subitem) {
|
|
1051
|
+
display: flex;
|
|
1052
|
+
align-items: center;
|
|
1053
|
+
flex-wrap: wrap;
|
|
1054
|
+
margin: 10px 0;
|
|
1055
|
+
}
|
|
1056
|
+
@include e(input-number--small) {
|
|
1057
|
+
width: 130px;
|
|
1058
|
+
.el-input__inner {
|
|
1059
|
+
text-align: center;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
@include e(upload) {
|
|
1063
|
+
.el-icon-upload {
|
|
1064
|
+
line-height: 36px;
|
|
1065
|
+
cursor: pointer;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
@include e(space-input) {
|
|
1069
|
+
width: 100%;
|
|
1070
|
+
margin-top: 10px;
|
|
1071
|
+
}
|
|
1072
|
+
@include e(border-width-radio) {
|
|
1073
|
+
margin-left: 4px;
|
|
1074
|
+
.el-radio-button__inner {
|
|
1075
|
+
padding: 8px 10px;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
@include e(border-position) {
|
|
1079
|
+
display: flex;
|
|
1080
|
+
padding-left: 90px;
|
|
1081
|
+
}
|
|
1082
|
+
@include e(border-position-item) {
|
|
1083
|
+
flex: 1;
|
|
1084
|
+
text-align: center;
|
|
1085
|
+
margin: 10px 3px 0;
|
|
1086
|
+
color: #aaa;
|
|
1087
|
+
.el-input-number {
|
|
1088
|
+
display: block;
|
|
1089
|
+
width: 100%;
|
|
1090
|
+
.el-input__inner {
|
|
1091
|
+
padding:0 10px;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
</style>
|