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,234 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="option-items-pane">
|
3
|
+
<el-radio-group v-if="(selectedWidget.type === 'radio') || ((selectedWidget.type === 'select') && !selectedWidget.options.multiple)"
|
4
|
+
v-model="optionModel.defaultValue" @change="emitDefaultValueChange">
|
5
|
+
<draggable tag="ul" :list="optionModel.optionItems"
|
6
|
+
v-bind="{group:'optionsGroup', ghostClass: 'ghost', handle: '.drag-option'}">
|
7
|
+
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
8
|
+
<el-radio :label="option.value">
|
9
|
+
<el-input v-model="option.value" size="mini" style="width: 100px"></el-input>
|
10
|
+
<el-input v-model="option.label" size="mini" style="width: 100px"></el-input>
|
11
|
+
<i class="iconfont icon-drag drag-option"></i>
|
12
|
+
<el-button circle plain size="mini" type="danger" @click="deleteOption(option, idx)"
|
13
|
+
icon="el-icon-minus" class="col-delete-button"></el-button>
|
14
|
+
</el-radio>
|
15
|
+
</li>
|
16
|
+
</draggable>
|
17
|
+
</el-radio-group>
|
18
|
+
<el-checkbox-group v-else-if="(selectedWidget.type === 'checkbox') || ((selectedWidget.type === 'select') && selectedWidget.options.multiple)"
|
19
|
+
v-model="optionModel.defaultValue" @change="emitDefaultValueChange">
|
20
|
+
<draggable tag="ul" :list="optionModel.optionItems"
|
21
|
+
v-bind="{group:'optionsGroup', ghostClass: 'ghost', handle: '.drag-option'}">
|
22
|
+
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
23
|
+
<el-checkbox :label="option.value">
|
24
|
+
<el-input v-model="option.value" size="mini" style="width: 100px"></el-input>
|
25
|
+
<el-input v-model="option.label" size="mini" style="width: 100px"></el-input>
|
26
|
+
<i class="iconfont icon-drag drag-option"></i>
|
27
|
+
<el-button circle plain size="mini" type="danger" @click="deleteOption(option, idx)"
|
28
|
+
icon="el-icon-minus" class="col-delete-button"></el-button>
|
29
|
+
</el-checkbox>
|
30
|
+
</li>
|
31
|
+
</draggable>
|
32
|
+
</el-checkbox-group>
|
33
|
+
<el-cascader v-else-if="(selectedWidget.type === 'cascader')"
|
34
|
+
v-model="optionModel.defaultValue" :options="optionModel.optionItems"
|
35
|
+
@change="emitDefaultValueChange"
|
36
|
+
:placeholder="i18nt('render.hint.selectPlaceholder')" style="width: 100%">
|
37
|
+
</el-cascader>
|
38
|
+
<div v-if="(selectedWidget.type === 'cascader')">
|
39
|
+
<el-button type="text" @click="importCascaderOptions">{{i18nt('designer.setting.importOptions')}}</el-button>
|
40
|
+
<el-button type="text" @click="resetDefault">{{i18nt('designer.setting.resetDefault')}}</el-button>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div v-if="(selectedWidget.type === 'radio') || (selectedWidget.type === 'checkbox') || (selectedWidget.type === 'select')">
|
44
|
+
<el-button type="text" @click="addOption">{{i18nt('designer.setting.addOption')}}</el-button>
|
45
|
+
<el-button type="text" @click="importOptions">{{i18nt('designer.setting.importOptions')}}</el-button>
|
46
|
+
<el-button type="text" @click="resetDefault">{{i18nt('designer.setting.resetDefault')}}</el-button>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<el-dialog :title="i18nt('designer.setting.importOptions')" :visible.sync="showImportDialogFlag"
|
50
|
+
v-if="showImportDialogFlag" :show-close="true" class="small-padding-dialog"
|
51
|
+
:close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true">
|
52
|
+
<el-form-item>
|
53
|
+
<el-input type="textarea" rows="10" v-model="optionLines"></el-input>
|
54
|
+
</el-form-item>
|
55
|
+
<div slot="footer" class="dialog-footer">
|
56
|
+
<el-button size="large" type="primary" @click="saveOptions">{{i18nt('designer.hint.confirm')}}</el-button>
|
57
|
+
<el-button size="large" type="" @click="showImportDialogFlag = false">{{i18nt('designer.hint.cancel')}}</el-button>
|
58
|
+
</div>
|
59
|
+
</el-dialog>
|
60
|
+
|
61
|
+
<el-dialog :title="i18nt('designer.setting.importOptions')" :visible.sync="showImportCascaderDialogFlag"
|
62
|
+
v-if="showImportCascaderDialogFlag" :show-close="true" class="small-padding-dialog"
|
63
|
+
:close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true">
|
64
|
+
<code-editor v-model="cascaderOptions" mode="json" :readonly="false"></code-editor>
|
65
|
+
<div slot="footer" class="dialog-footer">
|
66
|
+
<el-button size="large" type="primary" @click="saveCascaderOptions">{{i18nt('designer.hint.confirm')}}</el-button>
|
67
|
+
<el-button size="large" type="" @click="showImportCascaderDialogFlag = false">{{i18nt('designer.hint.cancel')}}</el-button>
|
68
|
+
</div>
|
69
|
+
</el-dialog>
|
70
|
+
</div>
|
71
|
+
</template>
|
72
|
+
|
73
|
+
<script>
|
74
|
+
import Draggable from 'vuedraggable'
|
75
|
+
import CodeEditor from '@/components/code-editor/index'
|
76
|
+
import i18n from "@/utils/i18n";
|
77
|
+
|
78
|
+
export default {
|
79
|
+
name: "OptionItemsSetting",
|
80
|
+
mixins: [i18n],
|
81
|
+
components: {
|
82
|
+
Draggable,
|
83
|
+
//CodeEditor: () => import('@/components/code-editor/index'),
|
84
|
+
CodeEditor,
|
85
|
+
},
|
86
|
+
props: {
|
87
|
+
designer: Object,
|
88
|
+
selectedWidget: Object,
|
89
|
+
},
|
90
|
+
data() {
|
91
|
+
return {
|
92
|
+
showImportDialogFlag: false,
|
93
|
+
optionLines: '',
|
94
|
+
|
95
|
+
cascaderOptions: '',
|
96
|
+
showImportCascaderDialogFlag: false,
|
97
|
+
|
98
|
+
//separator: '||',
|
99
|
+
separator: ',',
|
100
|
+
}
|
101
|
+
},
|
102
|
+
computed: {
|
103
|
+
optionModel() {
|
104
|
+
return this.selectedWidget.options
|
105
|
+
},
|
106
|
+
|
107
|
+
},
|
108
|
+
watch: {
|
109
|
+
'selectedWidget.options': {
|
110
|
+
deep: true,
|
111
|
+
handler(val) {
|
112
|
+
//console.log('888888', 'Options change!')
|
113
|
+
}
|
114
|
+
},
|
115
|
+
},
|
116
|
+
methods: {
|
117
|
+
emitDefaultValueChange() {
|
118
|
+
if (!!this.designer && !!this.designer.formWidget) {
|
119
|
+
let fieldWidget = this.designer.formWidget.getWidgetRef(this.selectedWidget.options.name)
|
120
|
+
if (!!fieldWidget && !!fieldWidget.refreshDefaultValue) {
|
121
|
+
fieldWidget.refreshDefaultValue()
|
122
|
+
}
|
123
|
+
}
|
124
|
+
},
|
125
|
+
|
126
|
+
deleteOption(option, index) {
|
127
|
+
this.optionModel.optionItems.splice(index, 1)
|
128
|
+
},
|
129
|
+
|
130
|
+
addOption() {
|
131
|
+
let newValue = this.optionModel.optionItems.length + 1
|
132
|
+
this.optionModel.optionItems.push({
|
133
|
+
value: newValue,
|
134
|
+
label: 'new option'
|
135
|
+
})
|
136
|
+
},
|
137
|
+
|
138
|
+
importOptions() {
|
139
|
+
this.optionLines = ''
|
140
|
+
if (this.optionModel.optionItems.length > 0) {
|
141
|
+
this.optionModel.optionItems.forEach((opt) => {
|
142
|
+
if (opt.value === opt.label) {
|
143
|
+
this.optionLines += opt.value + '\n'
|
144
|
+
} else {
|
145
|
+
this.optionLines += opt.value + this.separator + opt.label + '\n'
|
146
|
+
}
|
147
|
+
})
|
148
|
+
}
|
149
|
+
|
150
|
+
this.showImportDialogFlag = true
|
151
|
+
},
|
152
|
+
|
153
|
+
saveOptions() {
|
154
|
+
let lineArray = this.optionLines.split('\n')
|
155
|
+
//console.log('test', lineArray)
|
156
|
+
if (lineArray.length > 0) {
|
157
|
+
this.optionModel.optionItems = []
|
158
|
+
lineArray.forEach((optLine) => {
|
159
|
+
if (!!optLine && !!optLine.trim()) {
|
160
|
+
if (optLine.indexOf(this.separator) !== -1) {
|
161
|
+
this.optionModel.optionItems.push({
|
162
|
+
value: optLine.split(this.separator)[0],
|
163
|
+
label: optLine.split(this.separator)[1]
|
164
|
+
})
|
165
|
+
} else {
|
166
|
+
this.optionModel.optionItems.push({
|
167
|
+
value: optLine,
|
168
|
+
label: optLine
|
169
|
+
})
|
170
|
+
}
|
171
|
+
}
|
172
|
+
})
|
173
|
+
} else {
|
174
|
+
this.optionModel.optionItems = []
|
175
|
+
}
|
176
|
+
|
177
|
+
this.showImportDialogFlag = false
|
178
|
+
},
|
179
|
+
|
180
|
+
resetDefault() {
|
181
|
+
if ((this.selectedWidget.type === 'checkbox') ||
|
182
|
+
((this.selectedWidget.type === 'select') && this.selectedWidget.options.multiple)) {
|
183
|
+
this.optionModel.defaultValue = []
|
184
|
+
} else {
|
185
|
+
this.optionModel.defaultValue = ''
|
186
|
+
}
|
187
|
+
|
188
|
+
this.emitDefaultValueChange()
|
189
|
+
},
|
190
|
+
|
191
|
+
importCascaderOptions() {
|
192
|
+
this.cascaderOptions = JSON.stringify(this.optionModel.optionItems, null, ' ')
|
193
|
+
this.showImportCascaderDialogFlag = true
|
194
|
+
},
|
195
|
+
|
196
|
+
saveCascaderOptions() {
|
197
|
+
try {
|
198
|
+
let newOptions = JSON.parse(this.cascaderOptions)
|
199
|
+
this.optionModel.optionItems = newOptions
|
200
|
+
//TODO: 是否需要重置选项默认值??
|
201
|
+
|
202
|
+
this.showImportCascaderDialogFlag = false
|
203
|
+
} catch (ex) {
|
204
|
+
this.$message.error(this.i18nt('designer.hint.invalidOptionsData') + ex.message)
|
205
|
+
}
|
206
|
+
},
|
207
|
+
|
208
|
+
}
|
209
|
+
}
|
210
|
+
</script>
|
211
|
+
|
212
|
+
<style lang="scss" scoped>
|
213
|
+
.option-items-pane ul {
|
214
|
+
padding-inline-start: 6px;
|
215
|
+
padding-left: 6px; /* 重置IE11默认样式 */
|
216
|
+
}
|
217
|
+
|
218
|
+
li.ghost{
|
219
|
+
background: #fff;
|
220
|
+
border: 2px dotted $--color-primary;
|
221
|
+
}
|
222
|
+
|
223
|
+
.drag-option {
|
224
|
+
cursor: move;
|
225
|
+
}
|
226
|
+
|
227
|
+
.small-padding-dialog ::v-deep .el-dialog__body {
|
228
|
+
padding: 10px 15px;
|
229
|
+
}
|
230
|
+
|
231
|
+
.dialog-footer .el-button {
|
232
|
+
width: 100px;
|
233
|
+
}
|
234
|
+
</style>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.allowCreate')">
|
3
|
+
<el-checkbox v-model="optionModel.allowCreate"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "allowCreate-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<style scoped>
|
23
|
+
|
24
|
+
</style>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item label-width="0">
|
4
|
+
<el-divider class="custom-divider">{{i18nt('designer.setting.inputButton')}}</el-divider>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item :label="i18nt('designer.setting.appendButton')">
|
7
|
+
<el-checkbox v-model="optionModel.appendButton"></el-checkbox>
|
8
|
+
</el-form-item>
|
9
|
+
</div>
|
10
|
+
</template>
|
11
|
+
|
12
|
+
<script>
|
13
|
+
import i18n from "@/utils/i18n"
|
14
|
+
|
15
|
+
export default {
|
16
|
+
name: "appendButton-editor",
|
17
|
+
mixins: [i18n],
|
18
|
+
props: {
|
19
|
+
designer: Object,
|
20
|
+
selectedWidget: Object,
|
21
|
+
optionModel: Object,
|
22
|
+
},
|
23
|
+
}
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<style scoped>
|
27
|
+
|
28
|
+
</style>
|
package/src/components/form-designer/setting-panel/property-editor/appendButtonDisabled-editor.vue
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.appendButtonDisabled')">
|
3
|
+
<el-checkbox v-model="optionModel.appendButtonDisabled"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "appendButtonDisabled-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
package/src/components/form-designer/setting-panel/property-editor/automaticDropdown-editor.vue
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.automaticDropdown')">
|
3
|
+
<el-checkbox v-model="optionModel.automaticDropdown"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "automaticDropdown-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.border')">
|
3
|
+
<el-checkbox v-model="optionModel.border"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "border-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.appendButtonIcon')">
|
3
|
+
<el-input type="text" v-model="optionModel.buttonIcon"></el-input>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "buttonIcon-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.buttonStyle')">
|
3
|
+
<el-checkbox v-model="optionModel.buttonStyle"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "buttonStyle-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.clearable')">
|
3
|
+
<el-checkbox v-model="optionModel.clearable"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "clearable-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style scoped>
|
22
|
+
|
23
|
+
</style>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item :label="i18nt('designer.setting.widgetColumnWidth')" v-show="!!subFormChildWidgetFlag">
|
4
|
+
<el-input type="text" v-model="optionModel.columnWidth"></el-input>
|
5
|
+
</el-form-item>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
|
9
|
+
<script>
|
10
|
+
import i18n from "@/utils/i18n"
|
11
|
+
|
12
|
+
export default {
|
13
|
+
name: "columnWidth-editor",
|
14
|
+
mixins: [i18n],
|
15
|
+
props: {
|
16
|
+
designer: Object,
|
17
|
+
selectedWidget: Object,
|
18
|
+
optionModel: Object,
|
19
|
+
},
|
20
|
+
data() {
|
21
|
+
return {
|
22
|
+
//subFormChildWidgetFlag: false,
|
23
|
+
subFormChildWidgetFlag: true,
|
24
|
+
}
|
25
|
+
},
|
26
|
+
created() {
|
27
|
+
|
28
|
+
},
|
29
|
+
mounted() {
|
30
|
+
this.designer.handleEvent('field-selected', (parentWidget) => {
|
31
|
+
this.subFormChildWidgetFlag = !!parentWidget && (parentWidget.type === 'sub-form');
|
32
|
+
//console.log('subFormChildWidgetFlag', this.subFormChildWidgetFlag)
|
33
|
+
})
|
34
|
+
}
|
35
|
+
}
|
36
|
+
</script>
|
37
|
+
|
38
|
+
<style scoped>
|
39
|
+
|
40
|
+
</style>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item :label="i18nt('designer.setting.gridColHeight')">
|
4
|
+
<el-input type="number" v-model="optionModel.colHeight" @input.native="inputNumberHandler"
|
5
|
+
min="0" class="hide-spin-button"></el-input>
|
6
|
+
</el-form-item>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
import i18n from "@/utils/i18n"
|
12
|
+
import propertyMixin from "@/components/form-designer/setting-panel/property-editor/propertyMixin"
|
13
|
+
|
14
|
+
export default {
|
15
|
+
name: "colHeight-editor",
|
16
|
+
mixins: [i18n, propertyMixin],
|
17
|
+
props: {
|
18
|
+
designer: Object,
|
19
|
+
selectedWidget: Object,
|
20
|
+
optionModel: Object,
|
21
|
+
},
|
22
|
+
|
23
|
+
}
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<style scoped>
|
27
|
+
|
28
|
+
</style>
|
package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-form-item label-width="0">
|
4
|
+
<el-divider class="custom-divider">{{i18nt('designer.setting.columnSetting')}}</el-divider>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item :label="i18nt('designer.setting.gutter')">
|
7
|
+
<el-input-number v-model="optionModel.gutter" style="width: 100%"></el-input-number>
|
8
|
+
</el-form-item>
|
9
|
+
<el-form-item :label="i18nt('designer.setting.colsOfGrid')"></el-form-item>
|
10
|
+
<el-form-item label-width="0">
|
11
|
+
<li v-for="(colItem, colIdx) in selectedWidget.cols" :key="colIdx" class="col-item">
|
12
|
+
<span class="col-span-title">{{i18nt('designer.setting.colSpanTitle')}}{{colIdx + 1}}</span>
|
13
|
+
<el-input-number v-model.number="colItem.options.span" :min="1" :max="24"
|
14
|
+
@change="(newValue, oldValue) => spanChanged(selectedWidget, colItem, colIdx, newValue, oldValue)"
|
15
|
+
class="cell-span-input"></el-input-number>
|
16
|
+
<el-button circle plain size="mini" type="danger" @click="deleteCol(selectedWidget, colIdx)"
|
17
|
+
icon="el-icon-minus" class="col-delete-button"></el-button>
|
18
|
+
</li>
|
19
|
+
<div>
|
20
|
+
<el-button type="text" @click="addNewCol(selectedWidget)">{{i18nt('designer.setting.addColumn')}}</el-button>
|
21
|
+
</div>
|
22
|
+
</el-form-item>
|
23
|
+
</div>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
import i18n from "@/utils/i18n"
|
28
|
+
|
29
|
+
export default {
|
30
|
+
name: "gutter-editor",
|
31
|
+
mixins: [i18n],
|
32
|
+
props: {
|
33
|
+
designer: Object,
|
34
|
+
selectedWidget: Object,
|
35
|
+
optionModel: Object,
|
36
|
+
},
|
37
|
+
methods: {
|
38
|
+
spanChanged(curGrid) {
|
39
|
+
let spanSum = 0
|
40
|
+
curGrid.cols.forEach((colItem) => {
|
41
|
+
spanSum += colItem.options.span
|
42
|
+
})
|
43
|
+
if (spanSum > 24) {
|
44
|
+
//this.$message.info('列栅格之和超出24')
|
45
|
+
console.log('列栅格之和超出24')
|
46
|
+
//TODO: 语言字符串资源化
|
47
|
+
}
|
48
|
+
|
49
|
+
this.designer.saveCurrentHistoryStep()
|
50
|
+
},
|
51
|
+
|
52
|
+
deleteCol(curGrid, colIdx) {
|
53
|
+
this.designer.deleteColOfGrid(curGrid, colIdx)
|
54
|
+
this.designer.emitHistoryChange()
|
55
|
+
},
|
56
|
+
|
57
|
+
addNewCol(curGrid) {
|
58
|
+
this.designer.addNewColOfGrid(curGrid)
|
59
|
+
this.designer.emitHistoryChange()
|
60
|
+
},
|
61
|
+
|
62
|
+
}
|
63
|
+
}
|
64
|
+
</script>
|
65
|
+
|
66
|
+
<style lang="scss" scoped>
|
67
|
+
li.col-item {
|
68
|
+
list-style: none;
|
69
|
+
|
70
|
+
span.col-span-title {
|
71
|
+
display: inline-block;
|
72
|
+
font-size: 13px;
|
73
|
+
width: 120px;
|
74
|
+
}
|
75
|
+
|
76
|
+
.col-delete-button {
|
77
|
+
margin-left: 6px;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
</style>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.colOffsetTitle')">
|
3
|
+
<el-input-number v-model.number="optionModel.offset" :min="0" :max="24"
|
4
|
+
style="width: 100%"></el-input-number>
|
5
|
+
</el-form-item>
|
6
|
+
</template>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
import i18n from "@/utils/i18n";
|
10
|
+
|
11
|
+
export default {
|
12
|
+
name: "grid-col-offset-editor",
|
13
|
+
mixins: [i18n],
|
14
|
+
props: {
|
15
|
+
designer: Object,
|
16
|
+
selectedWidget: Object,
|
17
|
+
optionModel: Object,
|
18
|
+
},
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<style scoped>
|
23
|
+
|
24
|
+
</style>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.colPullTitle')">
|
3
|
+
<el-input-number v-model.number="optionModel.pull" :min="0" :max="24"
|
4
|
+
style="width: 100%"></el-input-number>
|
5
|
+
</el-form-item>
|
6
|
+
</template>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
import i18n from "@/utils/i18n";
|
10
|
+
|
11
|
+
export default {
|
12
|
+
name: "grid-col-pull-editor",
|
13
|
+
mixins: [i18n],
|
14
|
+
props: {
|
15
|
+
designer: Object,
|
16
|
+
selectedWidget: Object,
|
17
|
+
optionModel: Object,
|
18
|
+
},
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<style scoped>
|
23
|
+
|
24
|
+
</style>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.colPushTitle')">
|
3
|
+
<el-input-number v-model.number="optionModel.push" :min="0" :max="24"
|
4
|
+
style="width: 100%"></el-input-number>
|
5
|
+
</el-form-item>
|
6
|
+
</template>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
import i18n from "@/utils/i18n";
|
10
|
+
|
11
|
+
export default {
|
12
|
+
name: "grid-col-push-editor",
|
13
|
+
mixins: [i18n],
|
14
|
+
props: {
|
15
|
+
designer: Object,
|
16
|
+
selectedWidget: Object,
|
17
|
+
optionModel: Object,
|
18
|
+
},
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<style scoped>
|
23
|
+
|
24
|
+
</style>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<template>
|
2
|
+
<el-form-item :label="i18nt('designer.setting.responsive')">
|
3
|
+
<el-checkbox v-model="optionModel.responsive"></el-checkbox>
|
4
|
+
</el-form-item>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import i18n from "@/utils/i18n"
|
9
|
+
|
10
|
+
export default {
|
11
|
+
name: "grid-col-responsive-editor",
|
12
|
+
mixins: [i18n],
|
13
|
+
props: {
|
14
|
+
designer: Object,
|
15
|
+
selectedWidget: Object,
|
16
|
+
optionModel: Object,
|
17
|
+
},
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<style lang="scss" scoped>
|
22
|
+
|
23
|
+
</style>
|