skhj-variant 2.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/package.iml +12 -0
- package/README.md +180 -0
- package/babel.config.js +5 -0
- package/dist/build/css/app.9b74af27.css +1 -0
- package/dist/build/css/chunk-vendors.a16c4353.css +1 -0
- package/dist/build/favicon.ico +0 -0
- package/dist/build/fonts/element-icons.535877f5.woff +0 -0
- package/dist/build/fonts/element-icons.732389de.ttf +0 -0
- package/dist/build/img/t1.21b2c158.png +0 -0
- package/dist/build/img/t2.6991670f.png +0 -0
- package/dist/build/img/t3.49724600.png +0 -0
- package/dist/build/img/t4.4acb1808.png +0 -0
- package/dist/build/img/t5.e5e1948c.png +0 -0
- package/dist/build/img/t6.40836551.png +0 -0
- package/dist/build/img/t7.94cf1cc9.png +0 -0
- package/dist/build/img/t8.9291e9c1.png +0 -0
- package/dist/build/index.html +1 -0
- package/dist/build/js/app.dbcf7751.js +1 -0
- package/dist/build/js/chunk-1d66e3dd.7d669272.js +23 -0
- package/dist/build/js/chunk-vendors.be32fc27.js +24 -0
- package/dist/build/report.html +53 -0
- package/dist/lib/VFormDesigner.common-report.html +53 -0
- package/dist/lib/VFormDesigner.common.1.js +14583 -0
- package/dist/lib/VFormDesigner.common.1.js.map +1 -0
- package/dist/lib/VFormDesigner.common.js +71232 -0
- package/dist/lib/VFormDesigner.common.js.map +1 -0
- package/dist/lib/VFormDesigner.css +1 -0
- package/dist/lib/VFormDesigner.umd-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.1.js +14583 -0
- package/dist/lib/VFormDesigner.umd.1.js.map +1 -0
- package/dist/lib/VFormDesigner.umd.js +71242 -0
- package/dist/lib/VFormDesigner.umd.js.map +1 -0
- package/dist/lib/VFormDesigner.umd.min-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.min.1.js +23 -0
- package/dist/lib/VFormDesigner.umd.min.js +19 -0
- package/dist/lib/demo.html +10 -0
- package/dist/lib/img/t1.21b2c158.png +0 -0
- package/dist/lib/img/t2.6991670f.png +0 -0
- package/dist/lib/img/t3.49724600.png +0 -0
- package/dist/lib/img/t4.4acb1808.png +0 -0
- package/dist/lib/img/t5.e5e1948c.png +0 -0
- package/dist/lib/img/t6.40836551.png +0 -0
- package/dist/lib/img/t7.94cf1cc9.png +0 -0
- package/dist/lib/img/t8.9291e9c1.png +0 -0
- package/dist/lib-render/VFormRender.common-report.html +53 -0
- package/dist/lib-render/VFormRender.common.1.js +14583 -0
- package/dist/lib-render/VFormRender.common.1.js.map +1 -0
- package/dist/lib-render/VFormRender.common.js +32421 -0
- package/dist/lib-render/VFormRender.common.js.map +1 -0
- package/dist/lib-render/VFormRender.css +1 -0
- package/dist/lib-render/VFormRender.umd-report.html +53 -0
- package/dist/lib-render/VFormRender.umd.1.js +14583 -0
- package/dist/lib-render/VFormRender.umd.1.js.map +1 -0
- package/dist/lib-render/VFormRender.umd.js +32431 -0
- package/dist/lib-render/VFormRender.umd.js.map +1 -0
- package/dist/lib-render/VFormRender.umd.min-report.html +53 -0
- package/dist/lib-render/VFormRender.umd.min.1.js +23 -0
- package/dist/lib-render/VFormRender.umd.min.js +15 -0
- package/dist/lib-render/demo.html +10 -0
- package/index_template/index_dev.html +19 -0
- package/index_template/index_prod.html +28 -0
- package/index_template/vform_demo.gif +0 -0
- package/install-render.js +29 -0
- package/install.js +41 -0
- package/jsconfig.json +10 -0
- package/license.txt +8 -0
- package/package.json +58 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +28 -0
- package/src/App.vue +22 -0
- package/src/assets/ft-images/t1.png +0 -0
- package/src/assets/ft-images/t2.png +0 -0
- package/src/assets/ft-images/t3.png +0 -0
- package/src/assets/ft-images/t4.png +0 -0
- package/src/assets/ft-images/t5.png +0 -0
- package/src/assets/ft-images/t6.png +0 -0
- package/src/assets/ft-images/t7.png +0 -0
- package/src/assets/ft-images/t8.png +0 -0
- package/src/assets/style.scss +92 -0
- package/src/assets/vform-logo.png +0 -0
- package/src/components/code-editor/index.vue +130 -0
- package/src/components/form-designer/designer.js +926 -0
- package/src/components/form-designer/form-widget/container-widget/container-wrapper.vue +107 -0
- package/src/components/form-designer/form-widget/container-widget/containerMixin.js +85 -0
- package/src/components/form-designer/form-widget/container-widget/grid-col-widget.vue +310 -0
- package/src/components/form-designer/form-widget/container-widget/grid-widget.vue +89 -0
- package/src/components/form-designer/form-widget/container-widget/index.js +24 -0
- package/src/components/form-designer/form-widget/container-widget/tab-widget.vue +119 -0
- package/src/components/form-designer/form-widget/container-widget/table-cell-widget.vue +341 -0
- package/src/components/form-designer/form-widget/container-widget/table-widget.vue +111 -0
- package/src/components/form-designer/form-widget/field-widget/button-widget.vue +87 -0
- package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue +104 -0
- package/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue +105 -0
- package/src/components/form-designer/form-widget/field-widget/color-widget.vue +99 -0
- package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue +104 -0
- package/src/components/form-designer/form-widget/field-widget/date-widget.vue +103 -0
- package/src/components/form-designer/form-widget/field-widget/divider-widget.vue +83 -0
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +535 -0
- package/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue +271 -0
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue +331 -0
- package/src/components/form-designer/form-widget/field-widget/html-text-widget.vue +82 -0
- package/src/components/form-designer/form-widget/field-widget/index.js +10 -0
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue +112 -0
- package/src/components/form-designer/form-widget/field-widget/number-widget.vue +103 -0
- package/src/components/form-designer/form-widget/field-widget/picture-upload-widget.vue +226 -0
- package/src/components/form-designer/form-widget/field-widget/radio-widget.vue +105 -0
- package/src/components/form-designer/form-widget/field-widget/rate-widget.vue +102 -0
- package/src/components/form-designer/form-widget/field-widget/rich-editor-widget.vue +122 -0
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue +115 -0
- package/src/components/form-designer/form-widget/field-widget/slider-widget.vue +100 -0
- package/src/components/form-designer/form-widget/field-widget/static-content-wrapper.vue +189 -0
- package/src/components/form-designer/form-widget/field-widget/static-text-widget.vue +82 -0
- package/src/components/form-designer/form-widget/field-widget/switch-widget.vue +101 -0
- package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue +99 -0
- package/src/components/form-designer/form-widget/field-widget/time-range-widget.vue +104 -0
- package/src/components/form-designer/form-widget/field-widget/time-widget.vue +103 -0
- package/src/components/form-designer/form-widget/index.vue +260 -0
- package/src/components/form-designer/index.vue +448 -0
- package/src/components/form-designer/setting-panel/form-setting.vue +324 -0
- package/src/components/form-designer/setting-panel/index.vue +328 -0
- package/src/components/form-designer/setting-panel/option-items-setting.vue +234 -0
- package/src/components/form-designer/setting-panel/property-editor/allowCreate-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/appendButton-editor.vue +28 -0
- package/src/components/form-designer/setting-panel/property-editor/appendButtonDisabled-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/automaticDropdown-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/border-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/buttonStyle-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/clearable-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/columnWidth-editor.vue +40 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +28 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +81 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-responsive-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +48 -0
- package/src/components/form-designer/setting-panel/property-editor/container-sub-form/showBlankRow-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/container-sub-form/showRowNumber-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/container-sub-form/sub-form-labelAlign-editor.vue +36 -0
- package/src/components/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -0
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/customClass-editor.vue +40 -0
- package/src/components/form-designer/setting-panel/property-editor/defaultValue-editor.vue +25 -0
- package/src/components/form-designer/setting-panel/property-editor/disabled-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue +26 -0
- package/src/components/form-designer/setting-panel/property-editor/editable-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +12 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onBeforeUpload-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onBlur-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onChange-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue +31 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onFocus-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onInput-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onMounted-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onRemoteQuery-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowAdd-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowChange-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowDelete-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowInsert-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onUploadError-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onUploadSuccess-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +32 -0
- package/src/components/form-designer/setting-panel/property-editor/field-button/circle-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-button/plain-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-button/round-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-color/color-defaultValue-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +26 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +27 -0
- package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +26 -0
- package/src/components/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +27 -0
- package/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -0
- package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +27 -0
- package/src/components/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +43 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/allowHalf-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +26 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +25 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/showScore-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-rate/showText-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-slider/range-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-slider/showStops-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-slider/vertical-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/activeColor-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/inactiveColor-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/switch-defaultValue-editor.vue +25 -0
- package/src/components/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +27 -0
- package/src/components/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +27 -0
- package/src/components/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/filterable-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/index.js +10 -0
- package/src/components/form-designer/setting-panel/property-editor/label-editor.vue +30 -0
- package/src/components/form-designer/setting-panel/property-editor/labelAlign-editor.vue +42 -0
- package/src/components/form-designer/setting-panel/property-editor/labelHidden-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +28 -0
- package/src/components/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +37 -0
- package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/labelWidth-editor.vue +25 -0
- package/src/components/form-designer/setting-panel/property-editor/limit-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/max-editor.vue +39 -0
- package/src/components/form-designer/setting-panel/property-editor/maxLength-editor.vue +40 -0
- package/src/components/form-designer/setting-panel/property-editor/min-editor.vue +40 -0
- package/src/components/form-designer/setting-panel/property-editor/minLength-editor.vue +41 -0
- package/src/components/form-designer/setting-panel/property-editor/multiple-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/multipleSelect-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/name-editor.vue +80 -0
- package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue +28 -0
- package/src/components/form-designer/setting-panel/property-editor/placeholder-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/precision-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/propertyMixin.js +47 -0
- package/src/components/form-designer/setting-panel/property-editor/readonly-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/remote-editor.vue +25 -0
- package/src/components/form-designer/setting-panel/property-editor/required-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/rows-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/showFileList-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/showPassword-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/showWordLimit-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/size-editor.vue +38 -0
- package/src/components/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/step-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/type-editor.vue +33 -0
- package/src/components/form-designer/setting-panel/property-editor/uploadTip-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/uploadURL-editor.vue +28 -0
- package/src/components/form-designer/setting-panel/property-editor/validation-editor.vue +48 -0
- package/src/components/form-designer/setting-panel/property-editor/validationHint-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor/withCredentials-editor.vue +23 -0
- package/src/components/form-designer/setting-panel/property-editor-factory.js +173 -0
- package/src/components/form-designer/setting-panel/propertyRegister.js +198 -0
- package/src/components/form-designer/toolbar-panel/index.vue +1070 -0
- package/src/components/form-designer/widget-panel/index.vue +530 -0
- package/src/components/form-designer/widget-panel/templatesConfig.js +58 -0
- package/src/components/form-designer/widget-panel/widgetsConfig.js +966 -0
- package/src/components/form-render/container-item/container-item-wrapper.vue +34 -0
- package/src/components/form-render/container-item/containerItemMixin.js +136 -0
- package/src/components/form-render/container-item/grid-col-item.vue +115 -0
- package/src/components/form-render/container-item/grid-item.vue +54 -0
- package/src/components/form-render/container-item/index.js +24 -0
- package/src/components/form-render/container-item/sub-form-item.vue +405 -0
- package/src/components/form-render/container-item/tab-item.vue +89 -0
- package/src/components/form-render/container-item/table-cell-item.vue +61 -0
- package/src/components/form-render/container-item/table-item.vue +65 -0
- package/src/components/form-render/index.vue +712 -0
- package/src/components/form-render/refMixin.js +22 -0
- package/src/components/svg-icon/index.vue +49 -0
- package/src/components/v-table/index.vue +106 -0
- package/src/extension/extension-helper.js +23 -0
- package/src/extension/extension-loader.js +112 -0
- package/src/extension/samples/alert/alert-widget.vue +72 -0
- package/src/extension/samples/card/card-item.vue +90 -0
- package/src/extension/samples/card/card-widget.vue +119 -0
- package/src/extension/samples/extension-schema.js +36 -0
- package/src/extension/samples/extension-sfc-generator.js +50 -0
- package/src/iconfont/iconfont.css +29 -0
- package/src/iconfont/iconfont.eot +0 -0
- package/src/iconfont/iconfont.js +1 -0
- package/src/iconfont/iconfont.json +37 -0
- package/src/iconfont/iconfont.svg +35 -0
- package/src/iconfont/iconfont.ttf +0 -0
- package/src/iconfont/iconfont.woff +0 -0
- package/src/iconfont/iconfont.woff2 +0 -0
- package/src/icons/index.js +9 -0
- package/src/icons/svg/alert.svg +1 -0
- package/src/icons/svg/button.svg +1 -0
- package/src/icons/svg/card.svg +1 -0
- package/src/icons/svg/cascader-field.svg +1 -0
- package/src/icons/svg/checkbox-field.svg +1 -0
- package/src/icons/svg/color-field.svg +1 -0
- package/src/icons/svg/custom-component.svg +1 -0
- package/src/icons/svg/data-table.svg +1 -0
- package/src/icons/svg/date-field.svg +1 -0
- package/src/icons/svg/date-range-field.svg +1 -0
- package/src/icons/svg/divider.svg +1 -0
- package/src/icons/svg/document.svg +1 -0
- package/src/icons/svg/drag.svg +1 -0
- package/src/icons/svg/file-upload-field.svg +1 -0
- package/src/icons/svg/github.svg +1 -0
- package/src/icons/svg/grid.svg +1 -0
- package/src/icons/svg/html-text.svg +1 -0
- package/src/icons/svg/node-tree.svg +1 -0
- package/src/icons/svg/number-field.svg +1 -0
- package/src/icons/svg/picture-upload-field.svg +1 -0
- package/src/icons/svg/radio-field.svg +1 -0
- package/src/icons/svg/rate-field.svg +1 -0
- package/src/icons/svg/redo.svg +1 -0
- package/src/icons/svg/rich-editor-field.svg +1 -0
- package/src/icons/svg/section.svg +1 -0
- package/src/icons/svg/select-field.svg +1 -0
- package/src/icons/svg/slider-field.svg +1 -0
- package/src/icons/svg/slot-component.svg +1 -0
- package/src/icons/svg/static-text.svg +1 -0
- package/src/icons/svg/sub-form.svg +1 -0
- package/src/icons/svg/switch-field.svg +1 -0
- package/src/icons/svg/tab.svg +1 -0
- package/src/icons/svg/table.svg +1 -0
- package/src/icons/svg/text-field.svg +1 -0
- package/src/icons/svg/textarea-field.svg +1 -0
- package/src/icons/svg/time-field.svg +1 -0
- package/src/icons/svg/time-range-field.svg +1 -0
- package/src/icons/svg/undo.svg +1 -0
- package/src/icons/svg/vue-sfc.svg +1 -0
- package/src/index.js +41 -0
- package/src/lang/en-US.js +321 -0
- package/src/lang/en-US_extension.js +26 -0
- package/src/lang/en-US_render.js +38 -0
- package/src/lang/zh-CN.js +321 -0
- package/src/lang/zh-CN_extension.js +26 -0
- package/src/lang/zh-CN_render.js +38 -0
- package/src/main.js +29 -0
- package/src/styles/global.scss +103 -0
- package/src/styles/index.scss +15 -0
- package/src/utils/beautifierLoader.js +77 -0
- package/src/utils/code-generator.js +91 -0
- package/src/utils/config.js +19 -0
- package/src/utils/debug-console.js +7 -0
- package/src/utils/directive.js +74 -0
- package/src/utils/i18n.js +70 -0
- package/src/utils/sfc-generator.js +583 -0
- package/src/utils/util.js +232 -0
- package/src/utils/validators.js +127 -0
- package/src/utils/vue2js-generator.js +144 -0
- package/src/utils/vue3js-generator.js +70 -0
- package/vue.config.js +92 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
<template>
|
2
|
+
<form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
5
|
+
<el-switch ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled"
|
7
|
+
:active-text="field.options.activeText" :inactive-text="field.options.inactiveText"
|
8
|
+
:active-color="field.options.activeColor" :inactive-color="field.options.inactiveColor"
|
9
|
+
:width="field.options.switchWidth"
|
10
|
+
@change="handleChangeEvent">
|
11
|
+
</el-switch>
|
12
|
+
</form-item-wrapper>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
import FormItemWrapper from './form-item-wrapper'
|
17
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
18
|
+
import i18n, {translate} from "@/utils/i18n";
|
19
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
20
|
+
|
21
|
+
export default {
|
22
|
+
name: "switch-widget",
|
23
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
24
|
+
mixins: [emitter, fieldMixin, i18n],
|
25
|
+
props: {
|
26
|
+
field: Object,
|
27
|
+
parentWidget: Object,
|
28
|
+
parentList: Array,
|
29
|
+
indexOfParentList: Number,
|
30
|
+
designer: Object,
|
31
|
+
|
32
|
+
designState: {
|
33
|
+
type: Boolean,
|
34
|
+
default: false
|
35
|
+
},
|
36
|
+
|
37
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
38
|
+
type: Number,
|
39
|
+
default: -1
|
40
|
+
},
|
41
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
42
|
+
type: Number,
|
43
|
+
default: -1
|
44
|
+
},
|
45
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
46
|
+
type: String,
|
47
|
+
default: ''
|
48
|
+
},
|
49
|
+
|
50
|
+
},
|
51
|
+
components: {
|
52
|
+
FormItemWrapper,
|
53
|
+
},
|
54
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
55
|
+
data() {
|
56
|
+
return {
|
57
|
+
oldFieldValue: null, //field组件change之前的值
|
58
|
+
fieldModel: null,
|
59
|
+
rules: [],
|
60
|
+
}
|
61
|
+
},
|
62
|
+
computed: {
|
63
|
+
|
64
|
+
},
|
65
|
+
beforeCreate() {
|
66
|
+
/* 这里不能访问方法和属性!! */
|
67
|
+
},
|
68
|
+
|
69
|
+
created() {
|
70
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
71
|
+
需要在父组件created中初始化!! */
|
72
|
+
this.initFieldModel()
|
73
|
+
this.registerToRefList()
|
74
|
+
this.initEventHandler()
|
75
|
+
this.buildFieldRules()
|
76
|
+
|
77
|
+
this.handleOnCreated()
|
78
|
+
},
|
79
|
+
|
80
|
+
mounted() {
|
81
|
+
this.handleOnMounted()
|
82
|
+
},
|
83
|
+
|
84
|
+
beforeDestroy() {
|
85
|
+
this.unregisterFromRefList()
|
86
|
+
},
|
87
|
+
|
88
|
+
methods: {
|
89
|
+
|
90
|
+
}
|
91
|
+
}
|
92
|
+
</script>
|
93
|
+
|
94
|
+
<style lang="scss" scoped>
|
95
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
96
|
+
|
97
|
+
.full-width-input {
|
98
|
+
width: 100% !important;
|
99
|
+
}
|
100
|
+
|
101
|
+
</style>
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<template>
|
2
|
+
<form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
5
|
+
<el-input type="textarea" ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled" :readonly="field.options.readonly"
|
7
|
+
:size="field.options.size"
|
8
|
+
:placeholder="field.options.placeholder" :rows="field.options.rows"
|
9
|
+
:minlength="field.options.minLength" :maxlength="field.options.maxLength"
|
10
|
+
:show-word-limit="field.options.showWordLimit"
|
11
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent" @input="handleInputCustomEvent"
|
12
|
+
@change="handleChangeEvent">
|
13
|
+
</el-input>
|
14
|
+
</form-item-wrapper>
|
15
|
+
</template>
|
16
|
+
|
17
|
+
<script>
|
18
|
+
import FormItemWrapper from './form-item-wrapper'
|
19
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
20
|
+
import i18n, {translate} from "@/utils/i18n";
|
21
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
22
|
+
|
23
|
+
export default {
|
24
|
+
name: "textarea-widget",
|
25
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
26
|
+
mixins: [emitter, fieldMixin, i18n],
|
27
|
+
props: {
|
28
|
+
field: Object,
|
29
|
+
parentWidget: Object,
|
30
|
+
parentList: Array,
|
31
|
+
indexOfParentList: Number,
|
32
|
+
designer: Object,
|
33
|
+
|
34
|
+
designState: {
|
35
|
+
type: Boolean,
|
36
|
+
default: false
|
37
|
+
},
|
38
|
+
|
39
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
40
|
+
type: Number,
|
41
|
+
default: -1
|
42
|
+
},
|
43
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
44
|
+
type: Number,
|
45
|
+
default: -1
|
46
|
+
},
|
47
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
48
|
+
type: String,
|
49
|
+
default: ''
|
50
|
+
},
|
51
|
+
|
52
|
+
},
|
53
|
+
components: {
|
54
|
+
FormItemWrapper,
|
55
|
+
},
|
56
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
57
|
+
data() {
|
58
|
+
return {
|
59
|
+
oldFieldValue: null, //field组件change之前的值
|
60
|
+
fieldModel: null,
|
61
|
+
rules: [],
|
62
|
+
}
|
63
|
+
},
|
64
|
+
computed: {
|
65
|
+
|
66
|
+
},
|
67
|
+
beforeCreate() {
|
68
|
+
/* 这里不能访问方法和属性!! */
|
69
|
+
},
|
70
|
+
|
71
|
+
created() {
|
72
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
73
|
+
需要在父组件created中初始化!! */
|
74
|
+
this.initFieldModel()
|
75
|
+
this.registerToRefList()
|
76
|
+
this.initEventHandler()
|
77
|
+
this.buildFieldRules()
|
78
|
+
|
79
|
+
this.handleOnCreated()
|
80
|
+
},
|
81
|
+
|
82
|
+
mounted() {
|
83
|
+
this.handleOnMounted()
|
84
|
+
},
|
85
|
+
|
86
|
+
beforeDestroy() {
|
87
|
+
this.unregisterFromRefList()
|
88
|
+
},
|
89
|
+
|
90
|
+
methods: {
|
91
|
+
|
92
|
+
}
|
93
|
+
}
|
94
|
+
</script>
|
95
|
+
|
96
|
+
<style lang="scss" scoped>
|
97
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
98
|
+
|
99
|
+
</style>
|
@@ -0,0 +1,104 @@
|
|
1
|
+
<template>
|
2
|
+
<form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
5
|
+
<el-time-picker ref="fieldEditor" is-range v-model="fieldModel" class="full-width-input"
|
6
|
+
:disabled="field.options.disabled" :readonly="field.options.readonly"
|
7
|
+
:size="field.options.size"
|
8
|
+
:clearable="field.options.clearable" :editable="field.options.editable"
|
9
|
+
:format="field.options.format" value-format="HH:mm:ss"
|
10
|
+
:start-placeholder="field.options.startPlaceholder || i18nt('render.hint.startTimePlaceholder')"
|
11
|
+
:end-placeholder="field.options.endPlaceholder || i18nt('render.hint.endTimePlaceholder')"
|
12
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
13
|
+
@change="handleChangeEvent">
|
14
|
+
</el-time-picker>
|
15
|
+
</form-item-wrapper>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
import FormItemWrapper from './form-item-wrapper'
|
20
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
21
|
+
import i18n, {translate} from "@/utils/i18n";
|
22
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
23
|
+
|
24
|
+
export default {
|
25
|
+
name: "time-range-widget",
|
26
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
27
|
+
mixins: [emitter, fieldMixin, i18n],
|
28
|
+
props: {
|
29
|
+
field: Object,
|
30
|
+
parentWidget: Object,
|
31
|
+
parentList: Array,
|
32
|
+
indexOfParentList: Number,
|
33
|
+
designer: Object,
|
34
|
+
|
35
|
+
designState: {
|
36
|
+
type: Boolean,
|
37
|
+
default: false
|
38
|
+
},
|
39
|
+
|
40
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
41
|
+
type: Number,
|
42
|
+
default: -1
|
43
|
+
},
|
44
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
45
|
+
type: Number,
|
46
|
+
default: -1
|
47
|
+
},
|
48
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
49
|
+
type: String,
|
50
|
+
default: ''
|
51
|
+
},
|
52
|
+
|
53
|
+
},
|
54
|
+
components: {
|
55
|
+
FormItemWrapper,
|
56
|
+
},
|
57
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
58
|
+
data() {
|
59
|
+
return {
|
60
|
+
oldFieldValue: null, //field组件change之前的值
|
61
|
+
fieldModel: null,
|
62
|
+
rules: [],
|
63
|
+
}
|
64
|
+
},
|
65
|
+
computed: {
|
66
|
+
|
67
|
+
},
|
68
|
+
beforeCreate() {
|
69
|
+
/* 这里不能访问方法和属性!! */
|
70
|
+
},
|
71
|
+
|
72
|
+
created() {
|
73
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
74
|
+
需要在父组件created中初始化!! */
|
75
|
+
this.initFieldModel()
|
76
|
+
this.registerToRefList()
|
77
|
+
this.initEventHandler()
|
78
|
+
this.buildFieldRules()
|
79
|
+
|
80
|
+
this.handleOnCreated()
|
81
|
+
},
|
82
|
+
|
83
|
+
mounted() {
|
84
|
+
this.handleOnMounted()
|
85
|
+
},
|
86
|
+
|
87
|
+
beforeDestroy() {
|
88
|
+
this.unregisterFromRefList()
|
89
|
+
},
|
90
|
+
|
91
|
+
methods: {
|
92
|
+
|
93
|
+
}
|
94
|
+
}
|
95
|
+
</script>
|
96
|
+
|
97
|
+
<style lang="scss" scoped>
|
98
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
99
|
+
|
100
|
+
.full-width-input {
|
101
|
+
width: 100% !important;
|
102
|
+
}
|
103
|
+
|
104
|
+
</style>
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<template>
|
2
|
+
<form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
|
3
|
+
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
|
+
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex" :sub-form-row-id="subFormRowId">
|
5
|
+
<el-time-picker ref="fieldEditor" v-model="fieldModel" class="full-width-input"
|
6
|
+
:disabled="field.options.disabled" :readonly="field.options.readonly"
|
7
|
+
:size="field.options.size"
|
8
|
+
:clearable="field.options.clearable" :editable="field.options.editable"
|
9
|
+
:format="field.options.format" value-format="HH:mm:ss"
|
10
|
+
:placeholder="field.options.placeholder || i18nt('render.hint.timePlaceholder')"
|
11
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
12
|
+
@change="handleChangeEvent">
|
13
|
+
</el-time-picker>
|
14
|
+
</form-item-wrapper>
|
15
|
+
</template>
|
16
|
+
|
17
|
+
<script>
|
18
|
+
import FormItemWrapper from './form-item-wrapper'
|
19
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
20
|
+
import i18n, {translate} from "@/utils/i18n";
|
21
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
22
|
+
|
23
|
+
export default {
|
24
|
+
name: "time-widget",
|
25
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
26
|
+
mixins: [emitter, fieldMixin, i18n],
|
27
|
+
props: {
|
28
|
+
field: Object,
|
29
|
+
parentWidget: Object,
|
30
|
+
parentList: Array,
|
31
|
+
indexOfParentList: Number,
|
32
|
+
designer: Object,
|
33
|
+
|
34
|
+
designState: {
|
35
|
+
type: Boolean,
|
36
|
+
default: false
|
37
|
+
},
|
38
|
+
|
39
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
40
|
+
type: Number,
|
41
|
+
default: -1
|
42
|
+
},
|
43
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
44
|
+
type: Number,
|
45
|
+
default: -1
|
46
|
+
},
|
47
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
48
|
+
type: String,
|
49
|
+
default: ''
|
50
|
+
},
|
51
|
+
|
52
|
+
},
|
53
|
+
components: {
|
54
|
+
FormItemWrapper,
|
55
|
+
},
|
56
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
57
|
+
data() {
|
58
|
+
return {
|
59
|
+
oldFieldValue: null, //field组件change之前的值
|
60
|
+
fieldModel: null,
|
61
|
+
rules: [],
|
62
|
+
}
|
63
|
+
},
|
64
|
+
computed: {
|
65
|
+
|
66
|
+
},
|
67
|
+
beforeCreate() {
|
68
|
+
/* 这里不能访问方法和属性!! */
|
69
|
+
},
|
70
|
+
|
71
|
+
created() {
|
72
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
73
|
+
需要在父组件created中初始化!! */
|
74
|
+
this.initFieldModel()
|
75
|
+
this.registerToRefList()
|
76
|
+
this.initEventHandler()
|
77
|
+
this.buildFieldRules()
|
78
|
+
|
79
|
+
this.handleOnCreated()
|
80
|
+
},
|
81
|
+
|
82
|
+
mounted() {
|
83
|
+
this.handleOnMounted()
|
84
|
+
},
|
85
|
+
|
86
|
+
beforeDestroy() {
|
87
|
+
this.unregisterFromRefList()
|
88
|
+
},
|
89
|
+
|
90
|
+
methods: {
|
91
|
+
|
92
|
+
}
|
93
|
+
}
|
94
|
+
</script>
|
95
|
+
|
96
|
+
<style lang="scss" scoped>
|
97
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
98
|
+
|
99
|
+
.full-width-input {
|
100
|
+
width: 100% !important;
|
101
|
+
}
|
102
|
+
|
103
|
+
</style>
|
@@ -0,0 +1,260 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="form-widget-container">
|
3
|
+
|
4
|
+
<el-form class="full-height-width widget-form" :label-position="labelPosition"
|
5
|
+
:class="[customClass, layoutType + '-layout']" :size="size" :validate-on-rule-change="false">
|
6
|
+
|
7
|
+
<div v-if="designer.widgetList.length === 0" class="no-widget-hint">{{i18nt('designer.noWidgetHint')}}</div>
|
8
|
+
|
9
|
+
<draggable :list="designer.widgetList" v-bind="{group:'dragGroup', ghostClass: 'ghost',animation: 300}"
|
10
|
+
handle=".drag-handler" @end="onDragEnd" @add="onDragAdd" @update="onDragUpdate" :move="checkMove">
|
11
|
+
<transition-group name="fade" tag="div" class="form-widget-list">
|
12
|
+
<template v-for="(widget, index) in designer.widgetList">
|
13
|
+
<template v-if="'container' === widget.category">
|
14
|
+
<component :is="getWidgetName(widget)" :widget="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
15
|
+
:index-of-parent-list="index" :parent-widget="null"></component>
|
16
|
+
</template>
|
17
|
+
<template v-else>
|
18
|
+
<component :is="getWidgetName(widget)" :field="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
19
|
+
:index-of-parent-list="index" :parent-widget="null" :design-state="true"></component>
|
20
|
+
</template>
|
21
|
+
</template>
|
22
|
+
</transition-group>
|
23
|
+
</draggable>
|
24
|
+
|
25
|
+
</el-form>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
import Draggable from 'vuedraggable'
|
32
|
+
import '@/components/form-designer/form-widget/container-widget/index'
|
33
|
+
import FieldComponents from '@/components/form-designer/form-widget/field-widget/index'
|
34
|
+
import i18n from "@/utils/i18n"
|
35
|
+
|
36
|
+
export default {
|
37
|
+
name: "VFormWidget",
|
38
|
+
componentName: "VFormWidget",
|
39
|
+
mixins: [i18n],
|
40
|
+
components: {
|
41
|
+
Draggable,
|
42
|
+
|
43
|
+
...FieldComponents,
|
44
|
+
},
|
45
|
+
props: {
|
46
|
+
designer: Object,
|
47
|
+
formConfig: Object,
|
48
|
+
optionData: { //prop传入的选项数据
|
49
|
+
type: Object,
|
50
|
+
default: () => {}
|
51
|
+
},
|
52
|
+
},
|
53
|
+
provide() {
|
54
|
+
return {
|
55
|
+
refList: this.widgetRefList,
|
56
|
+
formConfig: this.formConfig,
|
57
|
+
globalOptionData: this.optionData,
|
58
|
+
getOptionData: () => this.optionData,
|
59
|
+
globalModel: {
|
60
|
+
formModel: this.formModel,
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
inject: ['getDesignerConfig'],
|
65
|
+
data() {
|
66
|
+
return {
|
67
|
+
formModel: {},
|
68
|
+
widgetRefList: {},
|
69
|
+
}
|
70
|
+
},
|
71
|
+
computed: {
|
72
|
+
labelPosition() {
|
73
|
+
if (!!this.designer.formConfig && !!this.designer.formConfig.labelPosition) {
|
74
|
+
return this.designer.formConfig.labelPosition
|
75
|
+
}
|
76
|
+
|
77
|
+
return 'left'
|
78
|
+
},
|
79
|
+
|
80
|
+
size() {
|
81
|
+
if (!!this.designer.formConfig && !!this.designer.formConfig.size) {
|
82
|
+
return this.designer.formConfig.size
|
83
|
+
}
|
84
|
+
|
85
|
+
return 'medium'
|
86
|
+
},
|
87
|
+
|
88
|
+
customClass() {
|
89
|
+
return this.designer.formConfig.customClass || ''
|
90
|
+
},
|
91
|
+
|
92
|
+
layoutType() {
|
93
|
+
return this.designer.getLayoutType()
|
94
|
+
},
|
95
|
+
|
96
|
+
},
|
97
|
+
watch: {
|
98
|
+
'designer.widgetList': {
|
99
|
+
deep: true,
|
100
|
+
handler(val) {
|
101
|
+
//
|
102
|
+
}
|
103
|
+
},
|
104
|
+
|
105
|
+
'designer.formConfig': {
|
106
|
+
deep: true,
|
107
|
+
handler(val) {
|
108
|
+
//
|
109
|
+
}
|
110
|
+
},
|
111
|
+
|
112
|
+
},
|
113
|
+
created() {
|
114
|
+
this.designer.initDesigner();
|
115
|
+
this.designer.loadPresetCssCode( this.getDesignerConfig().presetCssCode )
|
116
|
+
},
|
117
|
+
mounted() {
|
118
|
+
this.disableFirefoxDefaultDrop() /* 禁用Firefox默认拖拽搜索功能!! */
|
119
|
+
this.designer.registerFormWidget(this)
|
120
|
+
},
|
121
|
+
methods: {
|
122
|
+
getWidgetName(widget) {
|
123
|
+
return widget.type + '-widget'
|
124
|
+
},
|
125
|
+
|
126
|
+
disableFirefoxDefaultDrop() {
|
127
|
+
let isFirefox = (navigator.userAgent.toLowerCase().indexOf("firefox") !== -1)
|
128
|
+
if (isFirefox) {
|
129
|
+
document.body.ondrop = function (event) {
|
130
|
+
event.stopPropagation();
|
131
|
+
event.preventDefault();
|
132
|
+
}
|
133
|
+
}
|
134
|
+
},
|
135
|
+
|
136
|
+
onDragEnd(evt) {
|
137
|
+
//console.log('drag end000', evt)
|
138
|
+
},
|
139
|
+
|
140
|
+
onDragAdd(evt) {
|
141
|
+
const newIndex = evt.newIndex
|
142
|
+
if (!!this.designer.widgetList[newIndex]) {
|
143
|
+
this.designer.setSelected( this.designer.widgetList[newIndex] )
|
144
|
+
}
|
145
|
+
|
146
|
+
this.designer.emitHistoryChange()
|
147
|
+
},
|
148
|
+
|
149
|
+
onDragUpdate() { /* 在VueDraggable内拖拽组件发生位置变化时会触发update,未发生组件位置变化不会触发!! */
|
150
|
+
this.designer.emitHistoryChange()
|
151
|
+
},
|
152
|
+
|
153
|
+
checkMove(evt) {
|
154
|
+
return this.designer.checkWidgetMove(evt)
|
155
|
+
},
|
156
|
+
|
157
|
+
getFormData() {
|
158
|
+
return this.formModel
|
159
|
+
},
|
160
|
+
|
161
|
+
getWidgetRef(widgetName, showError) {
|
162
|
+
let foundRef = this.widgetRefList[widgetName]
|
163
|
+
if (!foundRef && !!showError) {
|
164
|
+
this.$message.error(this.i18nt('designer.hint.refNotFound') + widgetName)
|
165
|
+
}
|
166
|
+
return foundRef
|
167
|
+
},
|
168
|
+
|
169
|
+
}
|
170
|
+
}
|
171
|
+
</script>
|
172
|
+
|
173
|
+
<style lang="scss" scoped>
|
174
|
+
.container-scroll-bar {
|
175
|
+
|
176
|
+
::v-deep .el-scrollbar__wrap, ::v-deep .el-scrollbar__view {
|
177
|
+
overflow-x: hidden;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
.form-widget-container {
|
182
|
+
padding: 10px;
|
183
|
+
background: #f1f2f3;
|
184
|
+
|
185
|
+
overflow-x: hidden;
|
186
|
+
overflow-y: auto;
|
187
|
+
|
188
|
+
.el-form.full-height-width {
|
189
|
+
/*
|
190
|
+
margin: 0 auto;
|
191
|
+
width: 420px;
|
192
|
+
border-radius: 15px;
|
193
|
+
//border-width: 10px;
|
194
|
+
box-shadow: 0 0 1px 10px #495060;
|
195
|
+
*/
|
196
|
+
|
197
|
+
height: 100%;
|
198
|
+
padding: 3px;
|
199
|
+
background: #ffffff;
|
200
|
+
|
201
|
+
.no-widget-hint {
|
202
|
+
position: absolute;
|
203
|
+
left: 0;
|
204
|
+
right: 0;
|
205
|
+
top: 0;
|
206
|
+
bottom: 0;
|
207
|
+
height: 100%;
|
208
|
+
display: flex;
|
209
|
+
align-items: center;
|
210
|
+
justify-content: center;
|
211
|
+
text-align: center;
|
212
|
+
font-size: 18px;
|
213
|
+
color: #999999;
|
214
|
+
}
|
215
|
+
|
216
|
+
.form-widget-list {
|
217
|
+
min-height: calc(100vh - 56px - 68px);
|
218
|
+
padding: 3px;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
.el-form.PC-layout {
|
223
|
+
//
|
224
|
+
}
|
225
|
+
|
226
|
+
.el-form.Pad-layout {
|
227
|
+
margin: 0 auto;
|
228
|
+
max-width: 960px;
|
229
|
+
border-radius: 15px;
|
230
|
+
box-shadow: 0 0 1px 10px #495060;
|
231
|
+
}
|
232
|
+
|
233
|
+
.el-form.H5-layout {
|
234
|
+
margin: 0 auto;
|
235
|
+
width: 420px;
|
236
|
+
border-radius: 15px;
|
237
|
+
//border-width: 10px;
|
238
|
+
box-shadow: 0 0 1px 10px #495060;
|
239
|
+
}
|
240
|
+
|
241
|
+
.el-form.widget-form ::v-deep .el-row {
|
242
|
+
padding: 2px;
|
243
|
+
border: 1px dashed rgba(170, 170, 170, 0.75);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
.grid-cell {
|
248
|
+
min-height: 30px;
|
249
|
+
border-right: 1px dotted #cccccc;
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
.fade-enter-active, .fade-leave-active {
|
254
|
+
transition: opacity .5s;
|
255
|
+
}
|
256
|
+
|
257
|
+
.fade-enter, .fade-leave-to {
|
258
|
+
opacity: 0;
|
259
|
+
}
|
260
|
+
</style>
|