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,448 @@
|
|
1
|
+
<!--
|
2
|
+
/**
|
3
|
+
* author: vformAdmin
|
4
|
+
* email: vdpadmin@163.com
|
5
|
+
* website: https://www.vform666.com
|
6
|
+
* date: 2021.08.18
|
7
|
+
* remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
|
8
|
+
*/
|
9
|
+
-->
|
10
|
+
|
11
|
+
<template>
|
12
|
+
<el-container class="main-container full-height">
|
13
|
+
<!-- <el-header class="main-header">
|
14
|
+
<div class="float-left main-title">
|
15
|
+
<img src="../../assets/vform-logo.png" @click="openHome">
|
16
|
+
<span class="bold">VForm</span> {{i18nt('application.productTitle')}} <span class="version-span">Ver {{vFormVersion}}</span></div>
|
17
|
+
<div class="float-right external-link">
|
18
|
+
<el-dropdown v-if="showLink('languageMenu')" @command="handleLanguageChanged">
|
19
|
+
<span class="el-dropdown-link">{{curLangName}}<i class="el-icon-arrow-down el-icon--right"></i></span>
|
20
|
+
<el-dropdown-menu slot="dropdown">
|
21
|
+
<el-dropdown-item command="zh-CN">{{i18nt('application.zh-CN')}}</el-dropdown-item>
|
22
|
+
<el-dropdown-item command="en-US">{{i18nt('application.en-US')}}</el-dropdown-item>
|
23
|
+
</el-dropdown-menu>
|
24
|
+
</el-dropdown>
|
25
|
+
<a v-if="showLink('externalLink')" href="javascript:void(0)" @click="(ev) => openUrl(ev, gitUrl)" target="_blank"><svg-icon icon-class="github" />{{i18nt('application.github')}}</a>
|
26
|
+
<a v-if="showLink('externalLink')" href="javascript:void(0)" @click="(ev) => openUrl(ev, docUrl)" target="_blank"><svg-icon icon-class="document" />{{i18nt('application.document')}}</a>
|
27
|
+
<a v-if="showLink('externalLink')" href="javascript:void(0)" @click="(ev) => openUrl(ev, chatUrl)" target="_blank">{{i18nt('application.qqGroup')}}</a>
|
28
|
+
<a v-if="showLink('externalLink')" href="javascript:void(0)" @click="(ev) => openUrl(ev, subScribeUrl)" target="_blank">
|
29
|
+
{{i18nt('application.subscription')}}<i class="el-icon-top-right"></i></a>
|
30
|
+
</div>
|
31
|
+
</el-header> -->
|
32
|
+
|
33
|
+
<el-container>
|
34
|
+
<el-aside class="side-panel">
|
35
|
+
<widget-panel :designer="designer" />
|
36
|
+
</el-aside>
|
37
|
+
|
38
|
+
<el-container class="center-layout-container">
|
39
|
+
<el-header class="toolbar-header">
|
40
|
+
<toolbar-panel
|
41
|
+
:designer="designer"
|
42
|
+
ref="toolbarRef"
|
43
|
+
v-bind="$attrs"
|
44
|
+
v-on="$listeners"
|
45
|
+
>
|
46
|
+
<template #toolButton
|
47
|
+
><slot name="customToolButtons"></slot
|
48
|
+
></template>
|
49
|
+
</toolbar-panel>
|
50
|
+
</el-header>
|
51
|
+
<el-main class="form-widget-main">
|
52
|
+
<el-scrollbar
|
53
|
+
class="container-scroll-bar"
|
54
|
+
:style="{ height: scrollerHeight }"
|
55
|
+
>
|
56
|
+
<v-form-widget
|
57
|
+
:designer="designer"
|
58
|
+
:form-config="designer.formConfig"
|
59
|
+
>
|
60
|
+
</v-form-widget>
|
61
|
+
</el-scrollbar>
|
62
|
+
</el-main>
|
63
|
+
</el-container>
|
64
|
+
|
65
|
+
<el-aside>
|
66
|
+
<setting-panel
|
67
|
+
:designer="designer"
|
68
|
+
:selected-widget="designer.selectedWidget"
|
69
|
+
:form-config="designer.formConfig"
|
70
|
+
/>
|
71
|
+
</el-aside>
|
72
|
+
</el-container>
|
73
|
+
</el-container>
|
74
|
+
</template>
|
75
|
+
|
76
|
+
<script>
|
77
|
+
import WidgetPanel from "./widget-panel/index";
|
78
|
+
import ToolbarPanel from "./toolbar-panel/index";
|
79
|
+
import SettingPanel from "./setting-panel/index";
|
80
|
+
import VFormWidget from "./form-widget/index";
|
81
|
+
import { createDesigner } from "@/components/form-designer/designer";
|
82
|
+
import { addWindowResizeHandler, deepClone, getQueryParam } from "@/utils/util";
|
83
|
+
import { MOCK_CASE_URL, VARIANT_FORM_VERSION } from "@/utils/config";
|
84
|
+
import i18n, { changeLocale } from "@/utils/i18n";
|
85
|
+
|
86
|
+
export default {
|
87
|
+
name: "VFormDesigner",
|
88
|
+
componentName: "VFormDesigner",
|
89
|
+
mixins: [i18n],
|
90
|
+
components: {
|
91
|
+
WidgetPanel,
|
92
|
+
ToolbarPanel,
|
93
|
+
SettingPanel,
|
94
|
+
VFormWidget,
|
95
|
+
},
|
96
|
+
props: {
|
97
|
+
/* 后端字段列表API */
|
98
|
+
fieldListApi: {
|
99
|
+
type: Object,
|
100
|
+
default: null,
|
101
|
+
},
|
102
|
+
|
103
|
+
/* 禁止显示的组件名称数组 */
|
104
|
+
bannedWidgets: {
|
105
|
+
type: Array,
|
106
|
+
default: () => [],
|
107
|
+
},
|
108
|
+
|
109
|
+
designerConfig: {
|
110
|
+
type: Object,
|
111
|
+
default: () => {
|
112
|
+
return {
|
113
|
+
languageMenu: false, //是否显示语言切换菜单
|
114
|
+
externalLink: false, //是否显示GitHub、文档等外部链接
|
115
|
+
formTemplates: false, //是否显示表单模板
|
116
|
+
containerTemplates: true, //是否显示容器
|
117
|
+
eventCollapse: true, //是否显示组件事件属性折叠面板
|
118
|
+
clearDesignerButton: true, //是否显示清空设计器按钮
|
119
|
+
previewFormButton: true, //是否显示预览表单按钮
|
120
|
+
importJsonButton: false, //是否显示导入JSON按钮
|
121
|
+
exportJsonButton: true, //是否显示导出JSON器按钮
|
122
|
+
exportCodeButton: false, //是否显示导出代码按钮
|
123
|
+
generateSFCButton: false, //是否显示生成SFC按钮
|
124
|
+
|
125
|
+
presetCssCode: "", //设计器预设CSS样式代码
|
126
|
+
};
|
127
|
+
},
|
128
|
+
},
|
129
|
+
},
|
130
|
+
|
131
|
+
data() {
|
132
|
+
return {
|
133
|
+
vFormVersion: VARIANT_FORM_VERSION,
|
134
|
+
curLangName: "",
|
135
|
+
|
136
|
+
vsCodeFlag: false,
|
137
|
+
caseName: "",
|
138
|
+
|
139
|
+
docUrl: "https://www.vform666.com/document.html",
|
140
|
+
gitUrl: "https://github.com/vform666/variant-form",
|
141
|
+
chatUrl: "https://www.vform666.com/chat-group.html",
|
142
|
+
subScribeUrl: "https://www.vform666.com/subscribe.html",
|
143
|
+
|
144
|
+
scrollerHeight: 0,
|
145
|
+
|
146
|
+
designer: createDesigner(this),
|
147
|
+
|
148
|
+
fieldList: [],
|
149
|
+
};
|
150
|
+
},
|
151
|
+
provide() {
|
152
|
+
return {
|
153
|
+
serverFieldList: this.fieldList,
|
154
|
+
getDesignerConfig: () => this.designerConfig,
|
155
|
+
getBannedWidgets: () => this.bannedWidgets,
|
156
|
+
};
|
157
|
+
},
|
158
|
+
created() {
|
159
|
+
this.vsCodeFlag = getQueryParam("vscode") == 1;
|
160
|
+
this.caseName = getQueryParam("case");
|
161
|
+
},
|
162
|
+
mounted() {
|
163
|
+
this.initLocale();
|
164
|
+
|
165
|
+
this.scrollerHeight = window.innerHeight - 56 - 36 + "px";
|
166
|
+
addWindowResizeHandler(() => {
|
167
|
+
this.$nextTick(() => {
|
168
|
+
this.scrollerHeight = window.innerHeight - 56 - 36 + "px";
|
169
|
+
});
|
170
|
+
});
|
171
|
+
|
172
|
+
this.loadCase();
|
173
|
+
|
174
|
+
this.loadFieldListFromServer();
|
175
|
+
},
|
176
|
+
methods: {
|
177
|
+
showLink(configName) {
|
178
|
+
if (this.designerConfig[configName] === undefined) {
|
179
|
+
return true;
|
180
|
+
}
|
181
|
+
|
182
|
+
return !!this.designerConfig[configName];
|
183
|
+
},
|
184
|
+
|
185
|
+
openHome() {
|
186
|
+
if (!!this.vsCodeFlag) {
|
187
|
+
const msgObj = {
|
188
|
+
cmd: "openUrl",
|
189
|
+
data: {
|
190
|
+
url: "https://www.vform666.com/",
|
191
|
+
},
|
192
|
+
};
|
193
|
+
window.parent.postMessage(msgObj, "*");
|
194
|
+
}
|
195
|
+
},
|
196
|
+
|
197
|
+
openUrl(event, url) {
|
198
|
+
if (!!this.vsCodeFlag) {
|
199
|
+
const msgObj = {
|
200
|
+
cmd: "openUrl",
|
201
|
+
data: {
|
202
|
+
url,
|
203
|
+
},
|
204
|
+
};
|
205
|
+
window.parent.postMessage(msgObj, "*");
|
206
|
+
} else {
|
207
|
+
let aDom = event.currentTarget;
|
208
|
+
aDom.href = url;
|
209
|
+
//window.open(url, '_blank') //直接打开新窗口,会被浏览器拦截
|
210
|
+
}
|
211
|
+
},
|
212
|
+
|
213
|
+
loadCase() {
|
214
|
+
if (!this.caseName) {
|
215
|
+
return;
|
216
|
+
}
|
217
|
+
|
218
|
+
axios
|
219
|
+
.get(MOCK_CASE_URL + this.caseName + ".txt")
|
220
|
+
.then((res) => {
|
221
|
+
if (!!res.data.code) {
|
222
|
+
this.$message.error(this.i18nt("designer.hint.sampleLoadedFail"));
|
223
|
+
return;
|
224
|
+
}
|
225
|
+
|
226
|
+
this.setFormJson(res.data);
|
227
|
+
this.$message.success(
|
228
|
+
this.i18nt("designer.hint.sampleLoadedSuccess")
|
229
|
+
);
|
230
|
+
})
|
231
|
+
.catch((error) => {
|
232
|
+
this.$message.error(
|
233
|
+
this.i18nt("designer.hint.sampleLoadedFail") + ":" + error
|
234
|
+
);
|
235
|
+
});
|
236
|
+
},
|
237
|
+
|
238
|
+
initLocale() {
|
239
|
+
let curLocale = localStorage.getItem("v_form_locale");
|
240
|
+
if (!!this.vsCodeFlag) {
|
241
|
+
curLocale = curLocale || "en-US";
|
242
|
+
} else {
|
243
|
+
curLocale = curLocale || "zh-CN";
|
244
|
+
}
|
245
|
+
this.curLangName = this.i18nt("application." + curLocale);
|
246
|
+
this.changeLanguage(curLocale);
|
247
|
+
},
|
248
|
+
|
249
|
+
loadFieldListFromServer() {
|
250
|
+
if (!this.fieldListApi) {
|
251
|
+
return;
|
252
|
+
}
|
253
|
+
|
254
|
+
axios
|
255
|
+
.get(this.fieldListApi.URL)
|
256
|
+
.then((res) => {
|
257
|
+
let labelKey = this.fieldListApi.labelKey || "label";
|
258
|
+
let nameKey = this.fieldListApi.nameKey || "name";
|
259
|
+
|
260
|
+
res.data.forEach((fieldItem) => {
|
261
|
+
this.fieldList.push({
|
262
|
+
label: fieldItem[labelKey],
|
263
|
+
name: fieldItem[nameKey],
|
264
|
+
});
|
265
|
+
});
|
266
|
+
})
|
267
|
+
.catch((error) => {
|
268
|
+
this.$message.error(error);
|
269
|
+
});
|
270
|
+
},
|
271
|
+
|
272
|
+
handleLanguageChanged(command) {
|
273
|
+
this.changeLanguage(command);
|
274
|
+
this.curLangName = this.i18nt("application." + command);
|
275
|
+
},
|
276
|
+
|
277
|
+
changeLanguage(langName) {
|
278
|
+
changeLocale(langName);
|
279
|
+
},
|
280
|
+
|
281
|
+
setFormJson(formJson) {
|
282
|
+
let modifiedFlag = false;
|
283
|
+
if (!!formJson) {
|
284
|
+
if (typeof formJson === "string") {
|
285
|
+
modifiedFlag = this.designer.loadFormJson(JSON.parse(formJson));
|
286
|
+
} else if (formJson.constructor === Object) {
|
287
|
+
modifiedFlag = this.designer.loadFormJson(formJson);
|
288
|
+
}
|
289
|
+
|
290
|
+
if (modifiedFlag) {
|
291
|
+
this.designer.emitHistoryChange();
|
292
|
+
}
|
293
|
+
}
|
294
|
+
},
|
295
|
+
|
296
|
+
getFormJson() {
|
297
|
+
return {
|
298
|
+
widgetList: deepClone(this.designer.widgetList),
|
299
|
+
formConfig: deepClone(this.designer.formConfig),
|
300
|
+
};
|
301
|
+
},
|
302
|
+
|
303
|
+
clearDesigner() {
|
304
|
+
this.$refs.toolbarRef.clearFormWidget();
|
305
|
+
},
|
306
|
+
|
307
|
+
/**
|
308
|
+
* 刷新表单设计器
|
309
|
+
*/
|
310
|
+
refreshDesigner() {
|
311
|
+
//this.designer.loadFormJson( this.getFormJson() ) //只有第一次调用生效??
|
312
|
+
|
313
|
+
let fJson = this.getFormJson();
|
314
|
+
this.designer.clearDesigner(true); //不触发历史记录变更
|
315
|
+
this.designer.loadFormJson(fJson);
|
316
|
+
},
|
317
|
+
|
318
|
+
/**
|
319
|
+
* 预览表单
|
320
|
+
*/
|
321
|
+
previewForm() {
|
322
|
+
this.$refs.toolbarRef.previewForm();
|
323
|
+
},
|
324
|
+
|
325
|
+
/**
|
326
|
+
* 导入表单JSON
|
327
|
+
*/
|
328
|
+
importJson() {
|
329
|
+
this.$refs.toolbarRef.importJson();
|
330
|
+
},
|
331
|
+
|
332
|
+
/**
|
333
|
+
* 导出表单JSON
|
334
|
+
*/
|
335
|
+
exportJson() {
|
336
|
+
this.$refs.toolbarRef.exportJson();
|
337
|
+
},
|
338
|
+
|
339
|
+
/**
|
340
|
+
* 导出Vue/HTML代码
|
341
|
+
*/
|
342
|
+
exportCode() {
|
343
|
+
this.$refs.toolbarRef.exportCode();
|
344
|
+
},
|
345
|
+
|
346
|
+
/**
|
347
|
+
* 生成SFC代码
|
348
|
+
*/
|
349
|
+
generateSFC() {
|
350
|
+
this.$refs.toolbarRef.generateSFC();
|
351
|
+
},
|
352
|
+
|
353
|
+
//TODO: 增加更多方法!!
|
354
|
+
},
|
355
|
+
};
|
356
|
+
</script>
|
357
|
+
|
358
|
+
<style lang="scss" scoped>
|
359
|
+
.el-container.full-height {
|
360
|
+
height: 100%;
|
361
|
+
overflow-y: hidden;
|
362
|
+
}
|
363
|
+
|
364
|
+
.el-container.center-layout-container {
|
365
|
+
min-width: 680px;
|
366
|
+
border-left: 2px dotted #ebeef5;
|
367
|
+
border-right: 2px dotted #ebeef5;
|
368
|
+
}
|
369
|
+
|
370
|
+
.el-header.main-header {
|
371
|
+
border-bottom: 2px dotted #ebeef5;
|
372
|
+
height: 48px !important;
|
373
|
+
line-height: 48px !important;
|
374
|
+
min-width: 800px;
|
375
|
+
}
|
376
|
+
|
377
|
+
div.main-title {
|
378
|
+
font-size: 18px;
|
379
|
+
color: #242424;
|
380
|
+
display: flex;
|
381
|
+
align-items: center;
|
382
|
+
justify-items: center;
|
383
|
+
|
384
|
+
img {
|
385
|
+
cursor: pointer;
|
386
|
+
width: 36px;
|
387
|
+
height: 36px;
|
388
|
+
}
|
389
|
+
|
390
|
+
span.bold {
|
391
|
+
font-size: 20px;
|
392
|
+
font-weight: bold;
|
393
|
+
margin: 0 6px 0 6px;
|
394
|
+
}
|
395
|
+
|
396
|
+
span.version-span {
|
397
|
+
font-size: 14px;
|
398
|
+
color: #101f1c;
|
399
|
+
margin-left: 6px;
|
400
|
+
}
|
401
|
+
}
|
402
|
+
|
403
|
+
.float-left {
|
404
|
+
float: left;
|
405
|
+
}
|
406
|
+
|
407
|
+
.float-right {
|
408
|
+
float: right;
|
409
|
+
}
|
410
|
+
|
411
|
+
.el-dropdown-link {
|
412
|
+
margin-right: 12px;
|
413
|
+
cursor: pointer;
|
414
|
+
}
|
415
|
+
|
416
|
+
div.external-link a {
|
417
|
+
font-size: 13px;
|
418
|
+
text-decoration: none;
|
419
|
+
margin-right: 10px;
|
420
|
+
color: #606266;
|
421
|
+
}
|
422
|
+
|
423
|
+
.el-header.toolbar-header {
|
424
|
+
font-size: 14px;
|
425
|
+
border-bottom: 1px dotted #cccccc;
|
426
|
+
height: 42px !important;
|
427
|
+
//line-height: 42px !important;
|
428
|
+
}
|
429
|
+
|
430
|
+
.el-aside.side-panel {
|
431
|
+
width: 260px !important;
|
432
|
+
overflow-y: hidden;
|
433
|
+
}
|
434
|
+
|
435
|
+
.el-main.form-widget-main {
|
436
|
+
padding: 0;
|
437
|
+
|
438
|
+
position: relative;
|
439
|
+
overflow-x: hidden;
|
440
|
+
}
|
441
|
+
|
442
|
+
.container-scroll-bar {
|
443
|
+
::v-deep .el-scrollbar__wrap,
|
444
|
+
::v-deep .el-scrollbar__view {
|
445
|
+
overflow-x: hidden;
|
446
|
+
}
|
447
|
+
}
|
448
|
+
</style>
|