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,122 @@
|
|
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
|
+
<vue-editor ref="fieldEditor" v-model="fieldModel" :editor-toolbar="customToolbar"
|
6
|
+
:disabled="field.options.disabled" :placeholder="field.options.placeholder"
|
7
|
+
@text-change="handleRichEditorChangeEvent"
|
8
|
+
@focus="handleRichEditorFocusEvent" @blur="handleRichEditorBlurEvent">
|
9
|
+
</vue-editor>
|
10
|
+
</form-item-wrapper>
|
11
|
+
</template>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
import FormItemWrapper from './form-item-wrapper'
|
15
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
16
|
+
import i18n, {translate} from "@/utils/i18n";
|
17
|
+
import {deepClone} from "@/utils/util";
|
18
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
19
|
+
|
20
|
+
export default {
|
21
|
+
name: "rich-editor-widget",
|
22
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
23
|
+
mixins: [emitter, fieldMixin, i18n],
|
24
|
+
props: {
|
25
|
+
field: Object,
|
26
|
+
parentWidget: Object,
|
27
|
+
parentList: Array,
|
28
|
+
indexOfParentList: Number,
|
29
|
+
designer: Object,
|
30
|
+
|
31
|
+
designState: {
|
32
|
+
type: Boolean,
|
33
|
+
default: false
|
34
|
+
},
|
35
|
+
|
36
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
37
|
+
type: Number,
|
38
|
+
default: -1
|
39
|
+
},
|
40
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
41
|
+
type: Number,
|
42
|
+
default: -1
|
43
|
+
},
|
44
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
45
|
+
type: String,
|
46
|
+
default: ''
|
47
|
+
},
|
48
|
+
|
49
|
+
},
|
50
|
+
components: {
|
51
|
+
FormItemWrapper,
|
52
|
+
|
53
|
+
VueEditor: resolve => { //懒加载!!
|
54
|
+
require(['vue2-editor'], ({VueEditor}) => resolve(VueEditor))
|
55
|
+
}
|
56
|
+
},
|
57
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
58
|
+
data() {
|
59
|
+
return {
|
60
|
+
oldFieldValue: null, //field组件change之前的值
|
61
|
+
fieldModel: null,
|
62
|
+
rules: [],
|
63
|
+
|
64
|
+
customToolbar: [], //富文本编辑器自定义工具栏
|
65
|
+
valueChangedFlag: false, //vue2-editor数据值是否改变标志
|
66
|
+
}
|
67
|
+
},
|
68
|
+
computed: {
|
69
|
+
|
70
|
+
},
|
71
|
+
beforeCreate() {
|
72
|
+
/* 这里不能访问方法和属性!! */
|
73
|
+
},
|
74
|
+
|
75
|
+
created() {
|
76
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
77
|
+
需要在父组件created中初始化!! */
|
78
|
+
this.initFieldModel()
|
79
|
+
this.registerToRefList()
|
80
|
+
this.initEventHandler()
|
81
|
+
this.buildFieldRules()
|
82
|
+
|
83
|
+
this.handleOnCreated()
|
84
|
+
},
|
85
|
+
|
86
|
+
mounted() {
|
87
|
+
this.handleOnMounted()
|
88
|
+
},
|
89
|
+
|
90
|
+
beforeDestroy() {
|
91
|
+
this.unregisterFromRefList()
|
92
|
+
},
|
93
|
+
|
94
|
+
methods: {
|
95
|
+
handleRichEditorChangeEvent() {
|
96
|
+
this.valueChangedFlag = true
|
97
|
+
this.syncUpdateFormModel(this.fieldModel)
|
98
|
+
},
|
99
|
+
|
100
|
+
handleRichEditorFocusEvent() {
|
101
|
+
this.oldFieldValue = deepClone(this.fieldModel)
|
102
|
+
},
|
103
|
+
|
104
|
+
handleRichEditorBlurEvent() {
|
105
|
+
if (this.valueChangedFlag) {
|
106
|
+
this.emitFieldDataChange(this.fieldModel, this.oldFieldValue)
|
107
|
+
this.valueChangedFlag = false
|
108
|
+
}
|
109
|
+
},
|
110
|
+
|
111
|
+
}
|
112
|
+
}
|
113
|
+
</script>
|
114
|
+
|
115
|
+
<style lang="scss" scoped>
|
116
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
117
|
+
|
118
|
+
.full-width-input {
|
119
|
+
width: 100% !important;
|
120
|
+
}
|
121
|
+
|
122
|
+
</style>
|
@@ -0,0 +1,115 @@
|
|
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-select ref="fieldEditor" v-model="fieldModel" class="full-width-input"
|
6
|
+
:disabled="field.options.disabled"
|
7
|
+
:size="field.options.size"
|
8
|
+
:clearable="field.options.clearable"
|
9
|
+
:filterable="field.options.filterable"
|
10
|
+
:allow-create="field.options.allowCreate"
|
11
|
+
:default-first-option="allowDefaultFirstOption"
|
12
|
+
:automatic-dropdown="field.options.automaticDropdown"
|
13
|
+
:multiple="field.options.multiple" :multiple-limit="field.options.multipleLimit"
|
14
|
+
:placeholder="field.options.placeholder || i18nt('render.hint.selectPlaceholder')"
|
15
|
+
:remote="this.field.options.remote" :remote-method="remoteQuery"
|
16
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
17
|
+
@change="handleChangeEvent">
|
18
|
+
<el-option v-for="item in field.options.optionItems" :key="item.value" :label="item.label"
|
19
|
+
:value="item.value" :disabled="item.disabled">
|
20
|
+
</el-option>
|
21
|
+
</el-select>
|
22
|
+
</form-item-wrapper>
|
23
|
+
</template>
|
24
|
+
|
25
|
+
<script>
|
26
|
+
import FormItemWrapper from './form-item-wrapper'
|
27
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
28
|
+
import i18n, {translate} from "@/utils/i18n";
|
29
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
30
|
+
|
31
|
+
export default {
|
32
|
+
name: "select-widget",
|
33
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
34
|
+
mixins: [emitter, fieldMixin, i18n],
|
35
|
+
props: {
|
36
|
+
field: Object,
|
37
|
+
parentWidget: Object,
|
38
|
+
parentList: Array,
|
39
|
+
indexOfParentList: Number,
|
40
|
+
designer: Object,
|
41
|
+
|
42
|
+
designState: {
|
43
|
+
type: Boolean,
|
44
|
+
default: false
|
45
|
+
},
|
46
|
+
|
47
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
48
|
+
type: Number,
|
49
|
+
default: -1
|
50
|
+
},
|
51
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
52
|
+
type: Number,
|
53
|
+
default: -1
|
54
|
+
},
|
55
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
56
|
+
type: String,
|
57
|
+
default: ''
|
58
|
+
},
|
59
|
+
|
60
|
+
},
|
61
|
+
components: {
|
62
|
+
FormItemWrapper,
|
63
|
+
},
|
64
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
65
|
+
data() {
|
66
|
+
return {
|
67
|
+
oldFieldValue: null, //field组件change之前的值
|
68
|
+
fieldModel: null,
|
69
|
+
rules: [],
|
70
|
+
}
|
71
|
+
},
|
72
|
+
computed: {
|
73
|
+
allowDefaultFirstOption() {
|
74
|
+
return (!!this.field.options.filterable && !!this.field.options.allowCreate)
|
75
|
+
},
|
76
|
+
|
77
|
+
},
|
78
|
+
beforeCreate() {
|
79
|
+
/* 这里不能访问方法和属性!! */
|
80
|
+
},
|
81
|
+
|
82
|
+
created() {
|
83
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
84
|
+
需要在父组件created中初始化!! */
|
85
|
+
this.initOptionItems()
|
86
|
+
this.initFieldModel()
|
87
|
+
this.registerToRefList()
|
88
|
+
this.initEventHandler()
|
89
|
+
this.buildFieldRules()
|
90
|
+
|
91
|
+
this.handleOnCreated()
|
92
|
+
},
|
93
|
+
|
94
|
+
mounted() {
|
95
|
+
this.handleOnMounted()
|
96
|
+
},
|
97
|
+
|
98
|
+
beforeDestroy() {
|
99
|
+
this.unregisterFromRefList()
|
100
|
+
},
|
101
|
+
|
102
|
+
methods: {
|
103
|
+
|
104
|
+
}
|
105
|
+
}
|
106
|
+
</script>
|
107
|
+
|
108
|
+
<style lang="scss" scoped>
|
109
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
110
|
+
|
111
|
+
.full-width-input {
|
112
|
+
width: 100% !important;
|
113
|
+
}
|
114
|
+
|
115
|
+
</style>
|
@@ -0,0 +1,100 @@
|
|
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-slider ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled" :show-stops="field.options.showStops"
|
7
|
+
:min="field.options.min" :max="field.options.max" :step="field.options.step"
|
8
|
+
:range="field.options.range" :vertical="field.options.vertical"
|
9
|
+
@change="handleChangeEvent">
|
10
|
+
</el-slider>
|
11
|
+
</form-item-wrapper>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script>
|
15
|
+
import FormItemWrapper from './form-item-wrapper'
|
16
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
17
|
+
import i18n, {translate} from "@/utils/i18n";
|
18
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
19
|
+
|
20
|
+
export default {
|
21
|
+
name: "slider-widget",
|
22
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
23
|
+
mixins: [emitter, fieldMixin, i18n],
|
24
|
+
props: {
|
25
|
+
field: Object,
|
26
|
+
parentWidget: Object,
|
27
|
+
parentList: Array,
|
28
|
+
indexOfParentList: Number,
|
29
|
+
designer: Object,
|
30
|
+
|
31
|
+
designState: {
|
32
|
+
type: Boolean,
|
33
|
+
default: false
|
34
|
+
},
|
35
|
+
|
36
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
37
|
+
type: Number,
|
38
|
+
default: -1
|
39
|
+
},
|
40
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
41
|
+
type: Number,
|
42
|
+
default: -1
|
43
|
+
},
|
44
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
45
|
+
type: String,
|
46
|
+
default: ''
|
47
|
+
},
|
48
|
+
|
49
|
+
},
|
50
|
+
components: {
|
51
|
+
FormItemWrapper,
|
52
|
+
},
|
53
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
54
|
+
data() {
|
55
|
+
return {
|
56
|
+
oldFieldValue: null, //field组件change之前的值
|
57
|
+
fieldModel: null,
|
58
|
+
rules: [],
|
59
|
+
}
|
60
|
+
},
|
61
|
+
computed: {
|
62
|
+
|
63
|
+
},
|
64
|
+
beforeCreate() {
|
65
|
+
/* 这里不能访问方法和属性!! */
|
66
|
+
},
|
67
|
+
|
68
|
+
created() {
|
69
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
70
|
+
需要在父组件created中初始化!! */
|
71
|
+
this.initFieldModel()
|
72
|
+
this.registerToRefList()
|
73
|
+
this.initEventHandler()
|
74
|
+
this.buildFieldRules()
|
75
|
+
|
76
|
+
this.handleOnCreated()
|
77
|
+
},
|
78
|
+
|
79
|
+
mounted() {
|
80
|
+
this.handleOnMounted()
|
81
|
+
},
|
82
|
+
|
83
|
+
beforeDestroy() {
|
84
|
+
this.unregisterFromRefList()
|
85
|
+
},
|
86
|
+
|
87
|
+
methods: {
|
88
|
+
|
89
|
+
}
|
90
|
+
}
|
91
|
+
</script>
|
92
|
+
|
93
|
+
<style lang="scss" scoped>
|
94
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
95
|
+
|
96
|
+
.full-width-input {
|
97
|
+
width: 100% !important;
|
98
|
+
}
|
99
|
+
|
100
|
+
</style>
|
@@ -0,0 +1,189 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="field-wrapper" :class="{'design-time-bottom-margin': !!this.designer}">
|
3
|
+
<div class="static-content-item" v-show="!field.options.hidden || (designState === true)"
|
4
|
+
:class="[selected ? 'selected' : '', customClass]" @click.stop="selectField(field)">
|
5
|
+
<slot></slot>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<template v-if="!!this.designer">
|
9
|
+
<div class="field-action" v-if="designer.selectedId === field.id">
|
10
|
+
<i class="el-icon-back" :title="i18nt('designer.hint.selectParentWidget')" @click.stop="selectParentWidget(field)"></i>
|
11
|
+
<i class="el-icon-top" v-if="!!parentList && (parentList.length > 1)" :title="i18nt('designer.hint.moveUpWidget')"
|
12
|
+
@click.stop="moveUpWidget(field)"></i>
|
13
|
+
<i class="el-icon-bottom" v-if="!!parentList && (parentList.length > 1)" :title="i18nt('designer.hint.moveDownWidget')"
|
14
|
+
@click.stop="moveDownWidget(field)"></i>
|
15
|
+
<i class="el-icon-delete" :title="i18nt('designer.hint.remove')" @click.stop="removeFieldWidget"></i>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="drag-handler background-opacity" v-if="designer.selectedId === field.id">
|
19
|
+
<i class="el-icon-rank" :title="i18nt('designer.hint.dragHandler')"></i>
|
20
|
+
<i>{{i18n2t(`designer.widgetLabel.${field.type}`, `extension.widgetLabel.${field.type}`)}}</i>
|
21
|
+
<i v-if="field.options.hidden === true" class="iconfont icon-hide"></i>
|
22
|
+
</div>
|
23
|
+
</template>
|
24
|
+
</div>
|
25
|
+
</template>
|
26
|
+
|
27
|
+
<script>
|
28
|
+
import i18n from "@/utils/i18n";
|
29
|
+
|
30
|
+
export default {
|
31
|
+
name: "static-content-wrapper",
|
32
|
+
mixins: [i18n],
|
33
|
+
props: {
|
34
|
+
field: Object,
|
35
|
+
designer: Object,
|
36
|
+
parentWidget: Object,
|
37
|
+
parentList: Array,
|
38
|
+
indexOfParentList: Number,
|
39
|
+
|
40
|
+
designState: {
|
41
|
+
type: Boolean,
|
42
|
+
default: false
|
43
|
+
},
|
44
|
+
|
45
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
46
|
+
type: Number,
|
47
|
+
default: -1
|
48
|
+
},
|
49
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
50
|
+
type: Number,
|
51
|
+
default: -1
|
52
|
+
},
|
53
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
54
|
+
type: String,
|
55
|
+
default: ''
|
56
|
+
},
|
57
|
+
},
|
58
|
+
computed: {
|
59
|
+
selected() {
|
60
|
+
return !!this.designer && this.field.id === this.designer.selectedId
|
61
|
+
},
|
62
|
+
|
63
|
+
customClass() {
|
64
|
+
return !!this.field.options.customClass ? this.field.options.customClass.join(' ') : ''
|
65
|
+
},
|
66
|
+
|
67
|
+
},
|
68
|
+
methods: {
|
69
|
+
|
70
|
+
selectField(field) {
|
71
|
+
if (!!this.designer) {
|
72
|
+
this.designer.setSelected(field)
|
73
|
+
this.designer.emitEvent('field-selected', this.parentWidget) //发送选中组件的父组件对象
|
74
|
+
}
|
75
|
+
},
|
76
|
+
|
77
|
+
selectParentWidget() {
|
78
|
+
if (this.parentWidget) {
|
79
|
+
this.designer.setSelected(this.parentWidget)
|
80
|
+
} else {
|
81
|
+
this.designer.clearSelected()
|
82
|
+
}
|
83
|
+
},
|
84
|
+
|
85
|
+
moveUpWidget() {
|
86
|
+
this.designer.moveUpWidget(this.parentList, this.indexOfParentList)
|
87
|
+
this.designer.emitHistoryChange()
|
88
|
+
},
|
89
|
+
|
90
|
+
moveDownWidget() {
|
91
|
+
this.designer.moveDownWidget(this.parentList, this.indexOfParentList)
|
92
|
+
this.designer.emitHistoryChange()
|
93
|
+
},
|
94
|
+
|
95
|
+
removeFieldWidget() {
|
96
|
+
if (!!this.parentList) {
|
97
|
+
let nextSelected = null
|
98
|
+
if (this.parentList.length === 1) {
|
99
|
+
if (!!this.parentWidget) {
|
100
|
+
nextSelected = this.parentWidget
|
101
|
+
}
|
102
|
+
} else if (this.parentList.length === (1 + this.indexOfParentList)) {
|
103
|
+
nextSelected = this.parentList[this.indexOfParentList - 1]
|
104
|
+
} else {
|
105
|
+
nextSelected = this.parentList[this.indexOfParentList + 1]
|
106
|
+
}
|
107
|
+
|
108
|
+
this.$nextTick(() => {
|
109
|
+
this.parentList.splice(this.indexOfParentList, 1)
|
110
|
+
//if (!!nextSelected) {
|
111
|
+
this.designer.setSelected(nextSelected)
|
112
|
+
//}
|
113
|
+
|
114
|
+
this.designer.emitHistoryChange()
|
115
|
+
})
|
116
|
+
}
|
117
|
+
},
|
118
|
+
|
119
|
+
}
|
120
|
+
}
|
121
|
+
</script>
|
122
|
+
|
123
|
+
<style lang="scss" scoped>
|
124
|
+
@import "../../../../styles/global.scss";
|
125
|
+
|
126
|
+
.design-time-bottom-margin {
|
127
|
+
margin-bottom: 5px;
|
128
|
+
}
|
129
|
+
|
130
|
+
.field-wrapper {
|
131
|
+
position: relative;
|
132
|
+
|
133
|
+
.field-action{
|
134
|
+
position: absolute;
|
135
|
+
//bottom: -24px;
|
136
|
+
bottom: 0;
|
137
|
+
right: -2px;
|
138
|
+
height: 22px;
|
139
|
+
line-height: 22px;
|
140
|
+
background: $--color-primary;
|
141
|
+
z-index: 9;
|
142
|
+
|
143
|
+
i {
|
144
|
+
font-size: 14px;
|
145
|
+
color: #fff;
|
146
|
+
margin: 0 5px;
|
147
|
+
cursor: pointer;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
.drag-handler {
|
152
|
+
position: absolute;
|
153
|
+
top: 0;
|
154
|
+
//bottom: -22px; /* 拖拽手柄位于组件下方,有时无法正常拖动,原因未明?? */
|
155
|
+
left: -1px;
|
156
|
+
height: 20px;
|
157
|
+
line-height: 20px;
|
158
|
+
//background: $--color-primary;
|
159
|
+
z-index: 9;
|
160
|
+
|
161
|
+
i {
|
162
|
+
font-size: 12px;
|
163
|
+
font-style: normal;
|
164
|
+
color: #fff;
|
165
|
+
margin: 4px;
|
166
|
+
cursor: move;
|
167
|
+
}
|
168
|
+
|
169
|
+
&:hover {
|
170
|
+
//opacity: 1;
|
171
|
+
background: $--color-primary;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
.static-content-item {
|
177
|
+
min-height: 20px;
|
178
|
+
display: flex; /* 垂直居中 */
|
179
|
+
align-items: center; /* 垂直居中 */
|
180
|
+
|
181
|
+
::v-deep .el-divider--horizontal {
|
182
|
+
margin: 0;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.el-form-item.selected, .static-content-item.selected {
|
187
|
+
outline: 2px solid $--color-primary;
|
188
|
+
}
|
189
|
+
</style>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<template>
|
2
|
+
<static-content-wrapper :designer="designer" :field="field" :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
|
+
<div ref="fieldEditor">{{field.options.textContent}}</div>
|
6
|
+
</static-content-wrapper>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
import StaticContentWrapper from './static-content-wrapper'
|
11
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
12
|
+
import i18n, {translate} from "@/utils/i18n";
|
13
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
14
|
+
|
15
|
+
export default {
|
16
|
+
name: "static-text-widget",
|
17
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
18
|
+
mixins: [emitter, fieldMixin, i18n],
|
19
|
+
props: {
|
20
|
+
field: Object,
|
21
|
+
parentWidget: Object,
|
22
|
+
parentList: Array,
|
23
|
+
indexOfParentList: Number,
|
24
|
+
designer: Object,
|
25
|
+
|
26
|
+
designState: {
|
27
|
+
type: Boolean,
|
28
|
+
default: false
|
29
|
+
},
|
30
|
+
|
31
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
32
|
+
type: Number,
|
33
|
+
default: -1
|
34
|
+
},
|
35
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
36
|
+
type: Number,
|
37
|
+
default: -1
|
38
|
+
},
|
39
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
40
|
+
type: String,
|
41
|
+
default: ''
|
42
|
+
},
|
43
|
+
|
44
|
+
},
|
45
|
+
components: {
|
46
|
+
StaticContentWrapper,
|
47
|
+
},
|
48
|
+
computed: {
|
49
|
+
|
50
|
+
},
|
51
|
+
beforeCreate() {
|
52
|
+
/* 这里不能访问方法和属性!! */
|
53
|
+
},
|
54
|
+
|
55
|
+
created() {
|
56
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
57
|
+
需要在父组件created中初始化!! */
|
58
|
+
this.registerToRefList()
|
59
|
+
this.initEventHandler()
|
60
|
+
|
61
|
+
this.handleOnCreated()
|
62
|
+
},
|
63
|
+
|
64
|
+
mounted() {
|
65
|
+
this.handleOnMounted()
|
66
|
+
},
|
67
|
+
|
68
|
+
beforeDestroy() {
|
69
|
+
this.unregisterFromRefList()
|
70
|
+
},
|
71
|
+
|
72
|
+
methods: {
|
73
|
+
|
74
|
+
}
|
75
|
+
|
76
|
+
}
|
77
|
+
</script>
|
78
|
+
|
79
|
+
<style lang="scss" scoped>
|
80
|
+
@import "../../../../styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
81
|
+
|
82
|
+
</style>
|