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,112 @@
|
|
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 ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled" :readonly="field.options.readonly"
|
7
|
+
:size="field.options.size" class="hide-spin-button"
|
8
|
+
:type="inputType"
|
9
|
+
:show-password="field.options.showPassword"
|
10
|
+
:placeholder="field.options.placeholder"
|
11
|
+
:clearable="field.options.clearable"
|
12
|
+
:minlength="field.options.minLength" :maxlength="field.options.maxLength"
|
13
|
+
:show-word-limit="field.options.showWordLimit"
|
14
|
+
:prefix-icon="field.options.prefixIcon" :suffix-icon="field.options.suffixIcon"
|
15
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent" @input="handleInputCustomEvent"
|
16
|
+
@change="handleChangeEvent">
|
17
|
+
<el-button slot="append" v-if="field.options.appendButton" :disabled="field.options.disabled || field.options.appendButtonDisabled"
|
18
|
+
:class="field.options.buttonIcon" @click.native="emitAppendButtonClick"></el-button>
|
19
|
+
</el-input>
|
20
|
+
</form-item-wrapper>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<script>
|
24
|
+
import FormItemWrapper from './form-item-wrapper'
|
25
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
26
|
+
import i18n, {translate} from "@/utils/i18n";
|
27
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
28
|
+
|
29
|
+
export default {
|
30
|
+
name: "input-widget",
|
31
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
32
|
+
mixins: [emitter, fieldMixin, i18n],
|
33
|
+
props: {
|
34
|
+
field: Object,
|
35
|
+
parentWidget: Object,
|
36
|
+
parentList: Array,
|
37
|
+
indexOfParentList: Number,
|
38
|
+
designer: Object,
|
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
|
+
},
|
59
|
+
components: {
|
60
|
+
FormItemWrapper,
|
61
|
+
},
|
62
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
63
|
+
data() {
|
64
|
+
return {
|
65
|
+
oldFieldValue: null, //field组件change之前的值
|
66
|
+
fieldModel: null,
|
67
|
+
rules: [],
|
68
|
+
}
|
69
|
+
},
|
70
|
+
computed: {
|
71
|
+
inputType() {
|
72
|
+
if (this.field.options.type === 'number') {
|
73
|
+
return 'text' //当input的type设置为number时,如果输入非数字字符,则v-model拿到的值为空字符串,无法实现输入校验!故屏蔽之!!
|
74
|
+
}
|
75
|
+
|
76
|
+
return this.field.options.type
|
77
|
+
},
|
78
|
+
|
79
|
+
},
|
80
|
+
beforeCreate() {
|
81
|
+
/* 这里不能访问方法和属性!! */
|
82
|
+
},
|
83
|
+
|
84
|
+
created() {
|
85
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
86
|
+
需要在父组件created中初始化!! */
|
87
|
+
this.initFieldModel()
|
88
|
+
this.registerToRefList()
|
89
|
+
this.initEventHandler()
|
90
|
+
this.buildFieldRules()
|
91
|
+
|
92
|
+
this.handleOnCreated()
|
93
|
+
},
|
94
|
+
|
95
|
+
mounted() {
|
96
|
+
this.handleOnMounted()
|
97
|
+
},
|
98
|
+
|
99
|
+
beforeDestroy() {
|
100
|
+
this.unregisterFromRefList()
|
101
|
+
},
|
102
|
+
|
103
|
+
methods: {
|
104
|
+
|
105
|
+
}
|
106
|
+
}
|
107
|
+
</script>
|
108
|
+
|
109
|
+
<style lang="scss" scoped>
|
110
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
111
|
+
|
112
|
+
</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-input-number ref="fieldEditor" v-model="fieldModel" class="full-width-input"
|
6
|
+
:disabled="field.options.disabled"
|
7
|
+
:size="field.options.size" :controls-position="field.options.controlsPosition"
|
8
|
+
:placeholder="field.options.placeholder"
|
9
|
+
:min="field.options.min" :max="field.options.max"
|
10
|
+
:precision="field.options.precision" :step="field.options.step"
|
11
|
+
@focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
|
12
|
+
@change="handleChangeEvent">
|
13
|
+
</el-input-number>
|
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: "number-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,226 @@
|
|
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-upload增加:name="field.options.name"后,会导致又拍云上传失败!故删除之!! -->
|
6
|
+
<el-upload ref="fieldEditor" :disabled="field.options.disabled"
|
7
|
+
:action="field.options.uploadURL" :headers="uploadHeaders" :data="uploadData"
|
8
|
+
:with-credentials="field.options.withCredentials"
|
9
|
+
:multiple="field.options.multipleSelect" :file-list="fileList" :show-file-list="field.options.showFileList"
|
10
|
+
list-type="picture-card" :class="{'hideUploadDiv': uploadBtnHidden}"
|
11
|
+
:limit="field.options.limit" :on-exceed="handlePictureExceed"
|
12
|
+
:before-upload="beforePictureUpload"
|
13
|
+
:on-success="handlePictureUpload" :on-error="handelUploadError" :on-remove="handlePictureRemove">
|
14
|
+
<div slot="tip" class="el-upload__tip"
|
15
|
+
v-if="!!field.options.uploadTip">{{field.options.uploadTip}}</div>
|
16
|
+
<i class="el-icon-plus avatar-uploader-icon"></i>
|
17
|
+
</el-upload>
|
18
|
+
</form-item-wrapper>
|
19
|
+
</template>
|
20
|
+
|
21
|
+
<script>
|
22
|
+
import FormItemWrapper from './form-item-wrapper'
|
23
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
24
|
+
import i18n, {translate} from "@/utils/i18n";
|
25
|
+
import {deepClone} from "@/utils/util";
|
26
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
27
|
+
|
28
|
+
export default {
|
29
|
+
name: "picture-upload-widget",
|
30
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
31
|
+
mixins: [emitter, fieldMixin, i18n],
|
32
|
+
props: {
|
33
|
+
field: Object,
|
34
|
+
parentWidget: Object,
|
35
|
+
parentList: Array,
|
36
|
+
indexOfParentList: Number,
|
37
|
+
designer: Object,
|
38
|
+
|
39
|
+
designState: {
|
40
|
+
type: Boolean,
|
41
|
+
default: false
|
42
|
+
},
|
43
|
+
|
44
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
45
|
+
type: Number,
|
46
|
+
default: -1
|
47
|
+
},
|
48
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
49
|
+
type: Number,
|
50
|
+
default: -1
|
51
|
+
},
|
52
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
53
|
+
type: String,
|
54
|
+
default: ''
|
55
|
+
},
|
56
|
+
|
57
|
+
},
|
58
|
+
components: {
|
59
|
+
FormItemWrapper,
|
60
|
+
},
|
61
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
62
|
+
data() {
|
63
|
+
return {
|
64
|
+
oldFieldValue: null, //field组件change之前的值
|
65
|
+
fieldModel: null,
|
66
|
+
rules: [],
|
67
|
+
|
68
|
+
uploadHeaders: {},
|
69
|
+
uploadData: {
|
70
|
+
key: '', //七牛云上传文件名
|
71
|
+
//token: '', //七牛云上传token
|
72
|
+
|
73
|
+
//policy: '', //又拍云上传policy
|
74
|
+
//authorization: '', //又拍云上传签名
|
75
|
+
},
|
76
|
+
fileList: [], //上传文件列表
|
77
|
+
uploadBtnHidden: false,
|
78
|
+
|
79
|
+
// styleVariables: {
|
80
|
+
// '--select-file-action': selectFileText,
|
81
|
+
// },
|
82
|
+
}
|
83
|
+
},
|
84
|
+
computed: {
|
85
|
+
|
86
|
+
},
|
87
|
+
beforeCreate() {
|
88
|
+
/* 这里不能访问方法和属性!! */
|
89
|
+
},
|
90
|
+
|
91
|
+
created() {
|
92
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
93
|
+
需要在父组件created中初始化!! */
|
94
|
+
this.initFieldModel()
|
95
|
+
this.registerToRefList()
|
96
|
+
this.initEventHandler()
|
97
|
+
this.buildFieldRules()
|
98
|
+
|
99
|
+
this.handleOnCreated()
|
100
|
+
},
|
101
|
+
|
102
|
+
mounted() {
|
103
|
+
this.handleOnMounted()
|
104
|
+
},
|
105
|
+
|
106
|
+
beforeDestroy() {
|
107
|
+
this.unregisterFromRefList()
|
108
|
+
},
|
109
|
+
|
110
|
+
methods: {
|
111
|
+
handlePictureExceed() {
|
112
|
+
let uploadLimit = this.field.options.limit /* 此行不能注释,下一行ES6模板字符串需要用到!! */
|
113
|
+
this.$message.warning(eval('`' + this.i18nt('render.hint.uploadExceed') + '`'));
|
114
|
+
},
|
115
|
+
|
116
|
+
updateUploadFieldModelAndEmitDataChange(fileList) {
|
117
|
+
let oldValue = deepClone(this.fieldModel)
|
118
|
+
this.fieldModel = deepClone(fileList)
|
119
|
+
this.syncUpdateFormModel(this.fieldModel)
|
120
|
+
this.emitFieldDataChange(this.fieldModel, oldValue)
|
121
|
+
},
|
122
|
+
|
123
|
+
beforePictureUpload(file) {
|
124
|
+
let fileTypeCheckResult = false
|
125
|
+
if (!!this.field.options && !!this.field.options.fileTypes) {
|
126
|
+
let uploadFileTypes = this.field.options.fileTypes
|
127
|
+
if (uploadFileTypes.length > 0) {
|
128
|
+
fileTypeCheckResult = uploadFileTypes.some( (ft) => {
|
129
|
+
return file.type === 'image/' + ft
|
130
|
+
})
|
131
|
+
}
|
132
|
+
}
|
133
|
+
if (!fileTypeCheckResult) {
|
134
|
+
this.$message.error(this.i18nt('render.hint.unsupportedFileType') + file.type)
|
135
|
+
return false;
|
136
|
+
}
|
137
|
+
|
138
|
+
let fileSizeCheckResult = false
|
139
|
+
let uploadFileMaxSize = 5 //5MB
|
140
|
+
if (!!this.field.options && !!this.field.options.fileMaxSize) {
|
141
|
+
uploadFileMaxSize = this.field.options.fileMaxSize
|
142
|
+
}
|
143
|
+
fileSizeCheckResult = file.size / 1024 / 1024 <= uploadFileMaxSize
|
144
|
+
if (!fileSizeCheckResult) {
|
145
|
+
this.$message.error(this.$('render.hint.fileSizeExceed') + uploadFileMaxSize + 'MB')
|
146
|
+
return false;
|
147
|
+
}
|
148
|
+
|
149
|
+
this.uploadData.key = file.name
|
150
|
+
return this.handleOnBeforeUpload(file)
|
151
|
+
},
|
152
|
+
|
153
|
+
handleOnBeforeUpload(file) {
|
154
|
+
if (!!this.field.options.onBeforeUpload) {
|
155
|
+
let bfFunc = new Function('file', this.field.options.onBeforeUpload)
|
156
|
+
let result = bfFunc.call(this, file)
|
157
|
+
if (typeof result === 'boolean') {
|
158
|
+
return result
|
159
|
+
} else {
|
160
|
+
return true
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
return true
|
165
|
+
},
|
166
|
+
|
167
|
+
handlePictureUpload(res, file, fileList) {
|
168
|
+
if (!!this.field.options.onUploadSuccess) {
|
169
|
+
let customFn = new Function('result', 'file', 'fileList', this.field.options.onUploadSuccess)
|
170
|
+
customFn.call(this, res, file, fileList)
|
171
|
+
} else {
|
172
|
+
if (file.status === 'success') {
|
173
|
+
//this.fileList.push(file) /* 上传过程中,this.fileList是只读的,不能修改赋值!! */
|
174
|
+
this.updateUploadFieldModelAndEmitDataChange(fileList)
|
175
|
+
|
176
|
+
this.uploadBtnHidden = fileList.length >= this.field.options.limit
|
177
|
+
}
|
178
|
+
}
|
179
|
+
},
|
180
|
+
|
181
|
+
handlePictureRemove(file, fileList) {
|
182
|
+
this.fileList = fileList
|
183
|
+
this.updateUploadFieldModelAndEmitDataChange(fileList)
|
184
|
+
|
185
|
+
this.uploadBtnHidden = fileList.length >= this.field.options.limit
|
186
|
+
},
|
187
|
+
|
188
|
+
handelUploadError(err, file, fileList) {
|
189
|
+
if (!!this.field.options.onUploadError) {
|
190
|
+
let customFn = new Function('error', 'file', 'fileList', this.field.options.onUploadError)
|
191
|
+
customFn.call(this, err, file, fileList)
|
192
|
+
} else {
|
193
|
+
this.$message({
|
194
|
+
message: this.i18nt('render.hint.uploadError') + err,
|
195
|
+
duration: 3000,
|
196
|
+
type: 'error',
|
197
|
+
})
|
198
|
+
}
|
199
|
+
},
|
200
|
+
|
201
|
+
}
|
202
|
+
}
|
203
|
+
</script>
|
204
|
+
|
205
|
+
<style lang="scss" scoped>
|
206
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
207
|
+
|
208
|
+
.full-width-input {
|
209
|
+
width: 100% !important;
|
210
|
+
}
|
211
|
+
|
212
|
+
.hideUploadDiv {
|
213
|
+
::v-deep div.el-upload--picture-card { /* 隐藏最后的图片上传按钮 */
|
214
|
+
display: none;
|
215
|
+
}
|
216
|
+
|
217
|
+
::v-deep div.el-upload--text { /* 隐藏最后的文件上传按钮 */
|
218
|
+
display: none;
|
219
|
+
}
|
220
|
+
|
221
|
+
::v-deep div.el-upload__tip { /* 隐藏最后的文件上传按钮提示 */
|
222
|
+
display: none;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
</style>
|
@@ -0,0 +1,105 @@
|
|
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-radio-group ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled" :size="field.options.size"
|
7
|
+
@change="handleChangeEvent">
|
8
|
+
<template v-if="!!field.options.buttonStyle">
|
9
|
+
<el-radio-button v-for="(item, index) in field.options.optionItems" :key="index" :label="item.value"
|
10
|
+
:disabled="item.disabled" :border="field.options.border"
|
11
|
+
:style="{display: field.options.displayStyle}">{{item.label}}</el-radio-button>
|
12
|
+
</template>
|
13
|
+
<template v-else>
|
14
|
+
<el-radio v-for="(item, index) in field.options.optionItems" :key="index" :label="item.value"
|
15
|
+
:disabled="item.disabled" :border="field.options.border"
|
16
|
+
:style="{display: field.options.displayStyle}">{{item.label}}</el-radio>
|
17
|
+
</template>
|
18
|
+
</el-radio-group>
|
19
|
+
</form-item-wrapper>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
import FormItemWrapper from './form-item-wrapper'
|
24
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
25
|
+
import i18n, {translate} from "@/utils/i18n";
|
26
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
27
|
+
|
28
|
+
export default {
|
29
|
+
name: "radio-widget",
|
30
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
31
|
+
mixins: [emitter, fieldMixin, i18n],
|
32
|
+
props: {
|
33
|
+
field: Object,
|
34
|
+
parentWidget: Object,
|
35
|
+
parentList: Array,
|
36
|
+
indexOfParentList: Number,
|
37
|
+
designer: Object,
|
38
|
+
|
39
|
+
designState: {
|
40
|
+
type: Boolean,
|
41
|
+
default: false
|
42
|
+
},
|
43
|
+
|
44
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
45
|
+
type: Number,
|
46
|
+
default: -1
|
47
|
+
},
|
48
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
49
|
+
type: Number,
|
50
|
+
default: -1
|
51
|
+
},
|
52
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
53
|
+
type: String,
|
54
|
+
default: ''
|
55
|
+
},
|
56
|
+
|
57
|
+
},
|
58
|
+
components: {
|
59
|
+
FormItemWrapper,
|
60
|
+
},
|
61
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
62
|
+
data() {
|
63
|
+
return {
|
64
|
+
oldFieldValue: null, //field组件change之前的值
|
65
|
+
fieldModel: null,
|
66
|
+
rules: [],
|
67
|
+
}
|
68
|
+
},
|
69
|
+
computed: {
|
70
|
+
|
71
|
+
},
|
72
|
+
beforeCreate() {
|
73
|
+
/* 这里不能访问方法和属性!! */
|
74
|
+
},
|
75
|
+
|
76
|
+
created() {
|
77
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
78
|
+
需要在父组件created中初始化!! */
|
79
|
+
this.initOptionItems()
|
80
|
+
this.initFieldModel()
|
81
|
+
this.registerToRefList()
|
82
|
+
this.initEventHandler()
|
83
|
+
this.buildFieldRules()
|
84
|
+
|
85
|
+
this.handleOnCreated()
|
86
|
+
},
|
87
|
+
|
88
|
+
mounted() {
|
89
|
+
this.handleOnMounted()
|
90
|
+
},
|
91
|
+
|
92
|
+
beforeDestroy() {
|
93
|
+
this.unregisterFromRefList()
|
94
|
+
},
|
95
|
+
|
96
|
+
methods: {
|
97
|
+
|
98
|
+
}
|
99
|
+
}
|
100
|
+
</script>
|
101
|
+
|
102
|
+
<style lang="scss" scoped>
|
103
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
104
|
+
|
105
|
+
</style>
|
@@ -0,0 +1,102 @@
|
|
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-rate ref="fieldEditor" v-model="fieldModel"
|
6
|
+
:disabled="field.options.disabled"
|
7
|
+
:max="field.options.max"
|
8
|
+
:low-threshold="field.options.lowThreshold" :high-threshold="field.options.highThreshold"
|
9
|
+
:allow-half="field.options.allowHalf"
|
10
|
+
:show-text="field.options.showText" :show-score="field.options.showScore"
|
11
|
+
@change="handleChangeEvent">
|
12
|
+
</el-rate>
|
13
|
+
</form-item-wrapper>
|
14
|
+
</template>
|
15
|
+
|
16
|
+
<script>
|
17
|
+
import FormItemWrapper from './form-item-wrapper'
|
18
|
+
import emitter from 'element-ui/lib/mixins/emitter'
|
19
|
+
import i18n, {translate} from "@/utils/i18n";
|
20
|
+
import fieldMixin from "@/components/form-designer/form-widget/field-widget/fieldMixin";
|
21
|
+
|
22
|
+
export default {
|
23
|
+
name: "rate-widget",
|
24
|
+
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
25
|
+
mixins: [emitter, fieldMixin, i18n],
|
26
|
+
props: {
|
27
|
+
field: Object,
|
28
|
+
parentWidget: Object,
|
29
|
+
parentList: Array,
|
30
|
+
indexOfParentList: Number,
|
31
|
+
designer: Object,
|
32
|
+
|
33
|
+
designState: {
|
34
|
+
type: Boolean,
|
35
|
+
default: false
|
36
|
+
},
|
37
|
+
|
38
|
+
subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
|
39
|
+
type: Number,
|
40
|
+
default: -1
|
41
|
+
},
|
42
|
+
subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
|
43
|
+
type: Number,
|
44
|
+
default: -1
|
45
|
+
},
|
46
|
+
subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
|
47
|
+
type: String,
|
48
|
+
default: ''
|
49
|
+
},
|
50
|
+
|
51
|
+
},
|
52
|
+
components: {
|
53
|
+
FormItemWrapper,
|
54
|
+
},
|
55
|
+
inject: ['refList', 'formConfig', 'globalOptionData', 'globalModel'],
|
56
|
+
data() {
|
57
|
+
return {
|
58
|
+
oldFieldValue: null, //field组件change之前的值
|
59
|
+
fieldModel: null,
|
60
|
+
rules: [],
|
61
|
+
}
|
62
|
+
},
|
63
|
+
computed: {
|
64
|
+
|
65
|
+
},
|
66
|
+
beforeCreate() {
|
67
|
+
/* 这里不能访问方法和属性!! */
|
68
|
+
},
|
69
|
+
|
70
|
+
created() {
|
71
|
+
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
72
|
+
需要在父组件created中初始化!! */
|
73
|
+
this.initFieldModel()
|
74
|
+
this.registerToRefList()
|
75
|
+
this.initEventHandler()
|
76
|
+
this.buildFieldRules()
|
77
|
+
|
78
|
+
this.handleOnCreated()
|
79
|
+
},
|
80
|
+
|
81
|
+
mounted() {
|
82
|
+
this.handleOnMounted()
|
83
|
+
},
|
84
|
+
|
85
|
+
beforeDestroy() {
|
86
|
+
this.unregisterFromRefList()
|
87
|
+
},
|
88
|
+
|
89
|
+
methods: {
|
90
|
+
|
91
|
+
}
|
92
|
+
}
|
93
|
+
</script>
|
94
|
+
|
95
|
+
<style lang="scss" scoped>
|
96
|
+
@import "../../../../styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
|
97
|
+
|
98
|
+
.full-width-input {
|
99
|
+
width: 100% !important;
|
100
|
+
}
|
101
|
+
|
102
|
+
</style>
|