@xfu0401/form-generator 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/.eslintrc.js +0 -48
- package/@xfu0401/form-generator/package.json +0 -62
- package/LICENSE +0 -127
- package/README.md +0 -268
- package/babel.config.js +0 -22
- package/public/favicon.ico +0 -0
- package/public/img/show/PixPin_2024-07-17_16-25-59.gif +0 -0
- package/public/img/show/PixPin_2024-07-17_16-33-51.png +0 -0
- package/public/img/show/file.png +0 -0
- package/public/img/show/image.png +0 -0
- package/public/img/show/pc/347/253/257/346/270/262/346/237/223.png +0 -0
- package/public/img/show/pc/347/253/257/350/257/246/346/203/205.png +0 -0
- package/public/img/show//344/272/213/344/273/266.png +0 -0
- package/public/img/show//345/205/250/345/261/200/344/272/213/344/273/266.png +0 -0
- package/public/img/show//345/205/250/345/261/200/346/240/267/345/274/217.png +0 -0
- package/public/img/show//346/240/267/345/274/217/345/261/236/346/200/247.png +0 -0
- package/public/img/show//347/247/273/345/212/250/347/253/257/346/270/262/346/237/223.png +0 -0
- package/public/img/show//347/247/273/345/212/250/347/253/257/350/257/246/346/203/205.png +0 -0
- package/public/img/show//347/274/226/350/276/221/345/231/2502.png +0 -0
- package/public/img/show//347/274/226/350/276/221/345/231/2503.png +0 -0
- package/public/img/show//347/274/226/350/276/221/345/231/2504.png +0 -0
- package/public/img/temp//344/270/273/344/273/216/350/241/250/345/215/225.jpg +0 -0
- package/public/img/temp//345/210/206/347/273/204/350/241/250/345/215/225.jpg +0 -0
- package/public/img/temp//345/215/225/345/210/227/350/241/250/345/215/225.jpg +0 -0
- package/public/img/temp//345/233/272/345/256/232/350/241/250/346/240/274/350/241/250/345/215/225.jpg +0 -0
- package/public/img/temp//345/244/232/345/210/227/350/241/250/345/215/225.jpg +0 -0
- package/public/img/temp//346/240/207/347/255/276/351/241/265/350/241/250/345/215/225.jpg +0 -0
- package/public/index.html +0 -25
- package/public/static/js/config.js +0 -2
- package/src/App.vue +0 -18
- package/src/api/data.js +0 -52
- package/src/components/Layout/Layout.vue +0 -28
- package/src/components/Layout/LeftMenu.vue +0 -46
- package/src/components/SvgIcon/index.vue +0 -43
- package/src/components/code/Code.vue +0 -98
- package/src/components/common/FGDialog.vue +0 -100
- package/src/components/editor/CodeDialog.vue +0 -68
- package/src/components/editor/CodeEditor.vue +0 -191
- package/src/components/editor/CodeJson.vue +0 -130
- package/src/components/editor/CssEditor.vue +0 -84
- package/src/components/editor/EventEditor.vue +0 -84
- package/src/components/editor/JsonDialog.vue +0 -55
- package/src/components/editor/JsonEditor.vue +0 -58
- package/src/components/editor/components/EditorLeft.vue +0 -138
- package/src/components/fileComs/ExportExcel.vue +0 -49
- package/src/components/fileComs/ExportJson.vue +0 -52
- package/src/components/fileComs/ImportExcel.vue +0 -96
- package/src/components/fileComs/ImportJson.vue +0 -65
- package/src/components/formGenerator/components/formExport.vue +0 -52
- package/src/components/formGenerator/components/formGeneratorAttrField.vue +0 -1113
- package/src/components/formGenerator/components/formGeneratorAttrForm.vue +0 -98
- package/src/components/formGenerator/components/formGeneratorCom.vue +0 -108
- package/src/components/formGenerator/components/formGeneratorOutline.vue +0 -159
- package/src/components/formGenerator/components/formGeneratorTemp.vue +0 -77
- package/src/components/formGenerator/components/formImport.vue +0 -62
- package/src/components/formGenerator/components/formPreview.vue +0 -102
- package/src/components/formGenerator/configComponents/DataConfig.vue +0 -156
- package/src/components/formGenerator/configComponents/DataDialog.vue +0 -188
- package/src/components/formGenerator/configComponents/EventConfig.vue +0 -56
- package/src/components/formGenerator/configComponents/PageConfig.vue +0 -55
- package/src/components/formGenerator/configComponents/RegConfig.vue +0 -105
- package/src/components/formGenerator/configComponents/ShadowConfig.vue +0 -95
- package/src/components/formGenerator/configComponents/SpaceConfig.vue +0 -187
- package/src/components/formGenerator/configComponents/StyleConfig.vue +0 -258
- package/src/components/formGenerator/configComponents/TableConfig.vue +0 -75
- package/src/components/formGenerator/configComponents/TableHead.vue +0 -141
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formButton.vue +0 -25
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formDivider.vue +0 -49
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formHtml.vue +0 -37
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formLink.vue +0 -26
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formNotice.vue +0 -118
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formRemark.vue +0 -29
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formSwipe.vue +0 -39
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formTable.vue +0 -130
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formTableExport.vue +0 -311
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formTag.vue +0 -30
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formText.vue +0 -27
- package/src/components/formGenerator/formComponents/pcComponents/assistComs/formTree.vue +0 -47
- package/src/components/formGenerator/formComponents/pcComponents/components/emptyTips.vue +0 -24
- package/src/components/formGenerator/formComponents/pcComponents/components/esignDialog.vue +0 -86
- package/src/components/formGenerator/formComponents/pcComponents/components/filesShow.vue +0 -121
- package/src/components/formGenerator/formComponents/pcComponents/components/imageShow.vue +0 -148
- package/src/components/formGenerator/formComponents/pcComponents/components/nameShow.vue +0 -54
- package/src/components/formGenerator/formComponents/pcComponents/components/tableOptions.vue +0 -56
- package/src/components/formGenerator/formComponents/pcComponents/components/tableStyle.vue +0 -58
- package/src/components/formGenerator/formComponents/pcComponents/components/userPicker.vue +0 -440
- package/src/components/formGenerator/formComponents/pcComponents/inputComs/formAutocomplete.vue +0 -79
- package/src/components/formGenerator/formComponents/pcComponents/inputComs/formInput.vue +0 -56
- package/src/components/formGenerator/formComponents/pcComponents/inputComs/formInputNumber.vue +0 -51
- package/src/components/formGenerator/formComponents/pcComponents/inputComs/formRichText.vue +0 -138
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formCard.vue +0 -35
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formCollapse.vue +0 -79
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formRowContainer.vue +0 -337
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formSteps.vue +0 -90
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formSub.vue +0 -219
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formTableContainer.vue +0 -277
- package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formTabsContainer.vue +0 -65
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formCascader.vue +0 -62
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formCheckboxGroup.vue +0 -70
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formColorPicker.vue +0 -39
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formDatePicker.vue +0 -43
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formDaterangePicker.vue +0 -40
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formImage.vue +0 -235
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formOrgPicker.vue +0 -131
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formRadioGroup.vue +0 -59
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formRate.vue +0 -50
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSelect.vue +0 -62
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSelectHis.vue +0 -66
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSelectProject.vue +0 -62
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSignature.vue +0 -98
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSlider.vue +0 -46
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formSwitch.vue +0 -37
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formTimePicker.vue +0 -41
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formTimerangePicker.vue +0 -40
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formUpload.vue +0 -253
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formUploadTemp.vue +0 -82
- package/src/components/formGenerator/formComponents/pcComponents/selectComs/formUserPicker.vue +0 -142
- package/src/components/formGenerator/formComponents/pcForm.vue +0 -155
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formButton.vue +0 -36
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formDivider.vue +0 -41
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formHtml.vue +0 -37
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formLink.vue +0 -49
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formNotice.vue +0 -43
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formRemark.vue +0 -39
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formSwipe.vue +0 -34
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formTable.vue +0 -132
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formTableExport.vue +0 -268
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formTag.vue +0 -147
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formText.vue +0 -27
- package/src/components/formGenerator/formComponents/phoneComponents/assistComs/formTree.vue +0 -21
- package/src/components/formGenerator/formComponents/phoneComponents/components/cascaderPicker.vue +0 -81
- package/src/components/formGenerator/formComponents/phoneComponents/components/datePicker.vue +0 -101
- package/src/components/formGenerator/formComponents/phoneComponents/components/esignDialog.vue +0 -156
- package/src/components/formGenerator/formComponents/phoneComponents/components/filesShow.vue +0 -128
- package/src/components/formGenerator/formComponents/phoneComponents/components/imageShow.vue +0 -123
- package/src/components/formGenerator/formComponents/phoneComponents/components/nameShow.vue +0 -84
- package/src/components/formGenerator/formComponents/phoneComponents/components/orgPicker.vue +0 -343
- package/src/components/formGenerator/formComponents/phoneComponents/components/tableShow.vue +0 -149
- package/src/components/formGenerator/formComponents/phoneComponents/components/textShow.vue +0 -25
- package/src/components/formGenerator/formComponents/phoneComponents/components/timePicker.vue +0 -90
- package/src/components/formGenerator/formComponents/phoneComponents/inputComs/formAutocomplete.vue +0 -163
- package/src/components/formGenerator/formComponents/phoneComponents/inputComs/formInput.vue +0 -111
- package/src/components/formGenerator/formComponents/phoneComponents/inputComs/formInputNumber.vue +0 -65
- package/src/components/formGenerator/formComponents/phoneComponents/inputComs/formRichText.vue +0 -147
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formCard.vue +0 -59
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formCollapse.vue +0 -71
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formRowContainer.vue +0 -94
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formSteps.vue +0 -112
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formSub.vue +0 -130
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formTableContainer.vue +0 -93
- package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formTabsContainer.vue +0 -64
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formCascader.vue +0 -210
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formCheckboxGroup.vue +0 -86
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formColorPicker.vue +0 -63
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formDatePicker.vue +0 -100
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formDateRangePicker.vue +0 -136
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formImage.vue +0 -278
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formOrgPicker.vue +0 -107
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formRadioGroup.vue +0 -93
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formRate.vue +0 -85
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSelect.vue +0 -138
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSelectHis.vue +0 -142
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSelectProject.vue +0 -138
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSignature.vue +0 -108
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSlider.vue +0 -79
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formSwitch.vue +0 -88
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formTimePicker.vue +0 -112
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formTimeRangePicker.vue +0 -155
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formUpload.vue +0 -310
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formUploadTemp.vue +0 -81
- package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formUserPicker.vue +0 -114
- package/src/components/formGenerator/formComponents/phoneForm.vue +0 -134
- package/src/components/formGenerator/formGenerator.vue +0 -401
- package/src/components/formGenerator/styles/generator.scss +0 -271
- package/src/components/formGenerator/styles/index.scss +0 -136
- package/src/components/formGenerator/styles/left-coms.scss +0 -57
- package/src/components/formGenerator/styles/phone.scss +0 -269
- package/src/components/formGenerator/styles/theme.scss +0 -5
- package/src/components/formGenerator/utils/attribute.js +0 -107
- package/src/components/formGenerator/utils/comMixins.js +0 -148
- package/src/components/formGenerator/utils/component.js +0 -26
- package/src/components/formGenerator/utils/config.js +0 -1730
- package/src/components/formGenerator/utils/event.js +0 -82
- package/src/components/formGenerator/utils/formEvent.js +0 -43
- package/src/components/formGenerator/utils/index.js +0 -666
- package/src/components/formGenerator/utils/rules.js +0 -17
- package/src/components/formGenerator/utils/style.js +0 -75
- package/src/components/formGenerator/utils/table.js +0 -317
- package/src/components/formGenerator/utils/temps.js +0 -15303
- package/src/components/huComponents/FGBreadNav.vue +0 -86
- package/src/components/huComponents/FGCheckCell.vue +0 -107
- package/src/components/huComponents/FGCheckList.vue +0 -318
- package/src/components/huComponents/FGCheckPopUp.vue +0 -164
- package/src/components/huComponents/FGIconsDialog.vue +0 -124
- package/src/components/huComponents/FGNameImg.vue +0 -147
- package/src/components/huComponents/FGOptions.vue +0 -118
- package/src/components/huComponents/FGSelect.vue +0 -46
- package/src/components/huComponents/FGTreeNode.vue +0 -103
- package/src/components/huComponents/FGTreeNodeDialog.vue +0 -89
- package/src/components/huComponents/InputColor.vue +0 -117
- package/src/components/huComponents/InputNumber.vue +0 -78
- package/src/components/huComponents/LayoutTree.vue +0 -67
- package/src/components/huComponents/MenuButton.vue +0 -57
- package/src/components/index.js +0 -14
- package/src/icons/index.js +0 -10
- package/src/icons/svg/active.svg +0 -1
- package/src/icons/svg/addSold.svg +0 -1
- package/src/icons/svg/analyse.svg +0 -1
- package/src/icons/svg/button.svg +0 -1
- package/src/icons/svg/card.svg +0 -1
- package/src/icons/svg/cascader.svg +0 -1
- package/src/icons/svg/checkbox.svg +0 -1
- package/src/icons/svg/collapse.svg +0 -1
- package/src/icons/svg/color.svg +0 -1
- package/src/icons/svg/component.svg +0 -1
- package/src/icons/svg/date-range.svg +0 -1
- package/src/icons/svg/date.svg +0 -1
- package/src/icons/svg/default-dept.svg +0 -9
- package/src/icons/svg/default-role.svg +0 -5
- package/src/icons/svg/default-user.svg +0 -16
- package/src/icons/svg/dept.svg +0 -1
- package/src/icons/svg/divider.svg +0 -1
- package/src/icons/svg/ellipsis.svg +0 -2
- package/src/icons/svg/html.svg +0 -1
- package/src/icons/svg/image.svg +0 -1
- package/src/icons/svg/input.svg +0 -1
- package/src/icons/svg/link.svg +0 -1
- package/src/icons/svg/mp4.svg +0 -19
- package/src/icons/svg/notice.svg +0 -1
- package/src/icons/svg/noview.svg +0 -1
- package/src/icons/svg/number.svg +0 -1
- package/src/icons/svg/password.svg +0 -1
- package/src/icons/svg/pdf.svg +0 -18
- package/src/icons/svg/person.svg +0 -1
- package/src/icons/svg/png.svg +0 -18
- package/src/icons/svg/ppt.svg +0 -19
- package/src/icons/svg/process.svg +0 -1
- package/src/icons/svg/radio.svg +0 -1
- package/src/icons/svg/rate.svg +0 -1
- package/src/icons/svg/remark.svg +0 -1
- package/src/icons/svg/rich-text.svg +0 -1
- package/src/icons/svg/row.svg +0 -1
- package/src/icons/svg/select.svg +0 -1
- package/src/icons/svg/signature.svg +0 -1
- package/src/icons/svg/slider.svg +0 -1
- package/src/icons/svg/steps.svg +0 -1
- package/src/icons/svg/sub.svg +0 -1
- package/src/icons/svg/swipe.svg +0 -1
- package/src/icons/svg/switch.svg +0 -1
- package/src/icons/svg/table-edit.svg +0 -1
- package/src/icons/svg/table.svg +0 -1
- package/src/icons/svg/table2.svg +0 -1
- package/src/icons/svg/table3.svg +0 -1
- package/src/icons/svg/tabs.svg +0 -1
- package/src/icons/svg/tag.svg +0 -1
- package/src/icons/svg/text.svg +0 -1
- package/src/icons/svg/textarea.svg +0 -1
- package/src/icons/svg/time-range.svg +0 -1
- package/src/icons/svg/time.svg +0 -1
- package/src/icons/svg/tree.svg +0 -1
- package/src/icons/svg/unknow.svg +0 -20
- package/src/icons/svg/upload.svg +0 -1
- package/src/icons/svg/view.svg +0 -1
- package/src/icons/svg/word.svg +0 -20
- package/src/icons/svg/xlsx.svg +0 -18
- package/src/icons/svg/zip.svg +0 -20
- package/src/images/phone_bg.png +0 -0
- package/src/main.js +0 -26
- package/src/package/FGDesigner.vue +0 -114
- package/src/package/FGPcForm.vue +0 -100
- package/src/package/FGPcShow.vue +0 -69
- package/src/package/FGPhoneForm.vue +0 -106
- package/src/package/FGPhoneShow.vue +0 -69
- package/src/package/common/init.js +0 -23
- package/src/package/common/initPc.js +0 -26
- package/src/package/common/initPhone.js +0 -28
- package/src/package/common/mixins.js +0 -57
- package/src/package/index.js +0 -40
- package/src/plugins/richEditor/richEditorPc.vue +0 -478
- package/src/plugins/richEditor/richEditorPhone.vue +0 -520
- package/src/plugins/voiceTxtarea/voiceTxtarea.vue +0 -115
- package/src/router.js +0 -111
- package/src/store/index.js +0 -14
- package/src/store/modules/app.js +0 -54
- package/src/store/modules/user.js +0 -23
- package/src/style/color.scss +0 -10
- package/src/style/main.scss +0 -78
- package/src/utils/comsData.js +0 -279
- package/src/utils/defaultValue.js +0 -2288
- package/src/utils/drawingDefalut.js +0 -2749
- package/src/utils/iconData.js +0 -283
- package/src/utils/index.js +0 -6
- package/src/utils/progress.js +0 -96
- package/src/utils/request.js +0 -41
- package/src/views/coms/components/Attributes.vue +0 -28
- package/src/views/coms/components/ELink.vue +0 -23
- package/src/views/coms/components/Events.vue +0 -20
- package/src/views/coms/components/Example.vue +0 -42
- package/src/views/coms/components/Methods.vue +0 -20
- package/src/views/coms/components/VLink.vue +0 -23
- package/src/views/coms/comsDesiger.vue +0 -224
- package/src/views/coms/comsFormPc.vue +0 -76
- package/src/views/coms/comsFormPhone.vue +0 -103
- package/src/views/coms/comsShowPc.vue +0 -56
- package/src/views/coms/comsShowPhone.vue +0 -89
- package/src/views/config/components/configCell.vue +0 -111
- package/src/views/config/config.vue +0 -84
- package/src/views/demo/demo.vue +0 -235
- package/src/views/demo/demo2.vue +0 -131
- package/src/views/demo/table.js +0 -321
- package/src/views/document/index.vue +0 -140
- package/src/views/form/create.vue +0 -44
- package/vue.config.js +0 -72
- /package/{@xfu0401/form-generator/demo.html → demo.html} +0 -0
- /package/{@xfu0401/form-generator/form-generator.common.js → form-generator.common.js} +0 -0
- /package/{@xfu0401/form-generator/form-generator.common.js.map → form-generator.common.js.map} +0 -0
- /package/{@xfu0401/form-generator/form-generator.css → form-generator.css} +0 -0
- /package/{@xfu0401/form-generator/form-generator.umd.js → form-generator.umd.js} +0 -0
- /package/{@xfu0401/form-generator/form-generator.umd.js.map → form-generator.umd.js.map} +0 -0
- /package/{@xfu0401/form-generator/form-generator.umd.min.js → form-generator.umd.min.js} +0 -0
- /package/{@xfu0401/form-generator/form-generator.umd.min.js.map → form-generator.umd.min.js.map} +0 -0
- /package/{@xfu0401/form-generator/static → static}/fonts/element-icons.535877f5.woff +0 -0
- /package/{@xfu0401/form-generator/static → static}/fonts/element-icons.732389de.ttf +0 -0
- /package/{@xfu0401/form-generator/static → static}/img/phone_bg.7ead1463.png +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Fg-sub">
|
|
3
|
-
<!-- <span>{{$attrs.__config__.componentName}}</span> -->
|
|
4
|
-
<div class="Fg-sub-item" v-if="$attrs.isEdit" style="margin-bottom:0" :style="newStyle">
|
|
5
|
-
<form-row-container
|
|
6
|
-
:list.sync="list[0].children"
|
|
7
|
-
:font="newStyle.font"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
:border="false"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
<template v-else>
|
|
13
|
-
<div v-if="$attrs.subType=='form'">
|
|
14
|
-
<div class="Fg-sub-item" v-for="(item,i) in formLists" :key="i" :style="newStyle">
|
|
15
|
-
<div class="Fg-sub-item--top">
|
|
16
|
-
第{{i+1}}项
|
|
17
|
-
<i
|
|
18
|
-
class="el-icon-close"
|
|
19
|
-
@click="handleDelete(i)"
|
|
20
|
-
v-if="!$attrs.onlyShow && formLists.length>1"
|
|
21
|
-
></i>
|
|
22
|
-
</div>
|
|
23
|
-
<form-row-container
|
|
24
|
-
:list.sync="item.children"
|
|
25
|
-
:font="newStyle.font"
|
|
26
|
-
v-bind="$attrs"
|
|
27
|
-
:border="false"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div v-if="$attrs.subType=='table'">
|
|
32
|
-
<el-table
|
|
33
|
-
:header-cell-style="{background:'#f5f7fa'}"
|
|
34
|
-
:data="formLists"
|
|
35
|
-
style="width: 100%"
|
|
36
|
-
v-bind="$attrs"
|
|
37
|
-
border
|
|
38
|
-
:style="newStyle"
|
|
39
|
-
>
|
|
40
|
-
<el-table-column type="index" :index="indexMethod"></el-table-column>
|
|
41
|
-
<template v-for="(item,i) in labels">
|
|
42
|
-
<el-table-column
|
|
43
|
-
:label="item.label"
|
|
44
|
-
:key="i"
|
|
45
|
-
align="center"
|
|
46
|
-
v-if="!item.isHide || $attrs.isEdit"
|
|
47
|
-
>
|
|
48
|
-
<template slot-scope="scope">
|
|
49
|
-
<component
|
|
50
|
-
v-if="['layout','assist'].includes(scope.row.children[i].__config__.tagType)"
|
|
51
|
-
:is="scope.row.children[i].__config__.tag"
|
|
52
|
-
v-model="scope.row.children[i].__config__.defaultValue"
|
|
53
|
-
v-bind="{...$attrs,...$utils.toCamelCase($utils.deepClone(scope.row.children[i]))}"
|
|
54
|
-
:formConf="$attrs.formConf"
|
|
55
|
-
:isEdit="$attrs.isEdit"
|
|
56
|
-
:list.sync="scope.row.children[i].children"
|
|
57
|
-
:disabled="scope.row.children[i].disabled || $attrs.formConf.disabled"
|
|
58
|
-
:font="newStyle.font"
|
|
59
|
-
:onlyShow="onlyShowFun(scope.row.children[i])"
|
|
60
|
-
/>
|
|
61
|
-
<el-form-item
|
|
62
|
-
v-else
|
|
63
|
-
label-width="0px"
|
|
64
|
-
:required="scope.row.children[i].__config__.required && !scope.row.children[i].disabled && !scope.row.children[i].readonly && !onlyShowFun(scope.row.children[i])"
|
|
65
|
-
:rules="$utils.formRules({...scope.row.children[i],onlyShow:onlyShowFun(scope.row.children[i])})"
|
|
66
|
-
:prop="scope.row.children[i].__vModel__"
|
|
67
|
-
>
|
|
68
|
-
<component
|
|
69
|
-
:is="scope.row.children[i].__config__.tag"
|
|
70
|
-
v-model="scope.row.children[i].__config__.defaultValue"
|
|
71
|
-
v-bind="{...$attrs,...$utils.toCamelCase($utils.deepClone(scope.row.children[i]))}"
|
|
72
|
-
:formConf="$attrs.formConf"
|
|
73
|
-
:isEdit="$attrs.isEdit"
|
|
74
|
-
:list.sync="scope.row.children[i].children"
|
|
75
|
-
:disabled="scope.row.children[i].disabled || $attrs.formConf.disabled"
|
|
76
|
-
:onlyShow="onlyShowFun(scope.row.children[i])"
|
|
77
|
-
:font="newStyle.font"
|
|
78
|
-
/>
|
|
79
|
-
</el-form-item>
|
|
80
|
-
</template>
|
|
81
|
-
</el-table-column>
|
|
82
|
-
</template>
|
|
83
|
-
<el-table-column v-if="!$attrs.onlyShow" label="操作" align="center" width="150px">
|
|
84
|
-
<template slot-scope="scope">
|
|
85
|
-
<el-button
|
|
86
|
-
size="mini"
|
|
87
|
-
type="danger"
|
|
88
|
-
:disabled="formLists.length<=1"
|
|
89
|
-
@click="handleDelete(scope.$index)"
|
|
90
|
-
>删除</el-button>
|
|
91
|
-
</template>
|
|
92
|
-
</el-table-column>
|
|
93
|
-
</el-table>
|
|
94
|
-
</div>
|
|
95
|
-
<el-button
|
|
96
|
-
v-if="!$attrs.onlyShow"
|
|
97
|
-
icon="el-icon-plus"
|
|
98
|
-
style="margin-top:10px"
|
|
99
|
-
@click="handleAdd"
|
|
100
|
-
size="small"
|
|
101
|
-
:disabled="formLists.length==$attrs.maxSize"
|
|
102
|
-
>添加数据</el-button>
|
|
103
|
-
</template>
|
|
104
|
-
</div>
|
|
105
|
-
</template>
|
|
106
|
-
|
|
107
|
-
<script>
|
|
108
|
-
import { handleEvent } from "../../../utils";
|
|
109
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
110
|
-
export default {
|
|
111
|
-
mixins: [comMixin],
|
|
112
|
-
name: "form-sub",
|
|
113
|
-
props: {
|
|
114
|
-
value: {
|
|
115
|
-
type: [String, Number],
|
|
116
|
-
default: "",
|
|
117
|
-
},
|
|
118
|
-
list: {
|
|
119
|
-
type: Array,
|
|
120
|
-
default: () => [],
|
|
121
|
-
},
|
|
122
|
-
type: {
|
|
123
|
-
type: String,
|
|
124
|
-
default: "",
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
data() {
|
|
128
|
-
return {
|
|
129
|
-
formLists: this.list.slice(1, this.list.length),
|
|
130
|
-
};
|
|
131
|
-
},
|
|
132
|
-
computed: {
|
|
133
|
-
labels() {
|
|
134
|
-
return this.list[0]?.children.map((item) => {
|
|
135
|
-
return {
|
|
136
|
-
label: item.__config__.label,
|
|
137
|
-
isHide: item.isHide,
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
mounted() {
|
|
143
|
-
if (this.list.length <= 1 && !this.$attrs.isEdit) {
|
|
144
|
-
this.handleAdd();
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
methods: {
|
|
148
|
-
handleEvent,
|
|
149
|
-
indexMethod(index) {
|
|
150
|
-
return index + 1;
|
|
151
|
-
},
|
|
152
|
-
onlyShowFun(item) {
|
|
153
|
-
return this.$attrs.onlyShow || item?.onlyShow;
|
|
154
|
-
},
|
|
155
|
-
handleAdd() {
|
|
156
|
-
const newItem = this.list[0]?.children.map((item) => {
|
|
157
|
-
return this.$utils.createFormItem(this.$utils.deepClone(item));
|
|
158
|
-
});
|
|
159
|
-
this.formLists.push({
|
|
160
|
-
// label: `第${this.formLists.length + 1}项`,
|
|
161
|
-
value: this.$utils.getUuiKey(),
|
|
162
|
-
children: newItem,
|
|
163
|
-
});
|
|
164
|
-
},
|
|
165
|
-
handleDelete(i) {
|
|
166
|
-
this.formLists.splice(i, 1);
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
watch: {
|
|
170
|
-
formLists: {
|
|
171
|
-
immediate: true,
|
|
172
|
-
deep: true,
|
|
173
|
-
handler(newValue) {
|
|
174
|
-
if (newValue && this.list.length) {
|
|
175
|
-
const list = [this.list[0]].concat(newValue);
|
|
176
|
-
this.$emit("update:list", list);
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
</script>
|
|
183
|
-
|
|
184
|
-
<style lang="scss" >
|
|
185
|
-
@import "../../../styles/generator.scss";
|
|
186
|
-
@import "@/style/color";
|
|
187
|
-
|
|
188
|
-
.Fg-sub {
|
|
189
|
-
.Fg-sub-item {
|
|
190
|
-
padding: 5px;
|
|
191
|
-
margin-bottom: 10px;
|
|
192
|
-
border-left: 3px solid #409eff !important;
|
|
193
|
-
border-radius: 5px;
|
|
194
|
-
background: #fafafa;
|
|
195
|
-
font-size: 14px;
|
|
196
|
-
color: $gray-7;
|
|
197
|
-
overflow: auto;
|
|
198
|
-
.Fg-sub-item--top {
|
|
199
|
-
position: relative;
|
|
200
|
-
padding: 10px 40px;
|
|
201
|
-
text-align: right;
|
|
202
|
-
.el-icon-close {
|
|
203
|
-
position: absolute;
|
|
204
|
-
top: 13px;
|
|
205
|
-
right: 10px;
|
|
206
|
-
z-index: 1;
|
|
207
|
-
cursor: pointer;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
.el-table {
|
|
212
|
-
.cell {
|
|
213
|
-
> .el-form-item {
|
|
214
|
-
margin-bottom: 0;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
</style>
|
package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formTableContainer.vue
DELETED
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Fg-table-container" :style="newStyle">
|
|
3
|
-
<table
|
|
4
|
-
:id="id"
|
|
5
|
-
:border="$attrs.borderWidth"
|
|
6
|
-
:cellpadding="0"
|
|
7
|
-
:cellspacing="0"
|
|
8
|
-
:align="$attrs.tableAlign"
|
|
9
|
-
:style="{borderColor:$attrs.borderColor}"
|
|
10
|
-
>
|
|
11
|
-
<tr v-for="(tr,rIndex) in list" :key="rIndex">
|
|
12
|
-
<template v-for="(td,dIndex) in tr.children">
|
|
13
|
-
<!-- <td
|
|
14
|
-
class="Fg-tips"
|
|
15
|
-
v-if="td && td.colspan && td.rowspan"
|
|
16
|
-
:key="dIndex"
|
|
17
|
-
:colspan="td.colspan"
|
|
18
|
-
:rowspan="td.rowspan"
|
|
19
|
-
:id="td.id"
|
|
20
|
-
:style="{ width: td.width + '%',...td.style ,borderWidth:$attrs.borderWidth+'px',borderColor:$attrs.borderColor}"
|
|
21
|
-
@click.stop="handleClick(td.id)"
|
|
22
|
-
>-->
|
|
23
|
-
<td
|
|
24
|
-
class="Fg-tips"
|
|
25
|
-
v-if="td && td.colspan && td.rowspan"
|
|
26
|
-
:key="dIndex"
|
|
27
|
-
:colspan="td.colspan"
|
|
28
|
-
:rowspan="td.rowspan"
|
|
29
|
-
:id="td.id"
|
|
30
|
-
:style="{ width:100/tr.children.length+'%',...td.style ,borderWidth:$attrs.borderWidth+'px',borderColor:$attrs.borderColor}"
|
|
31
|
-
@click.stop="handleClick(td.id)"
|
|
32
|
-
>
|
|
33
|
-
<div
|
|
34
|
-
:class="activeId==td.id && $attrs.isEdit?'Fg-active Fg-td-active':''"
|
|
35
|
-
:style="{'--cellpadding':$attrs.cellpadding * 2+'px',padding:$attrs.cellpadding+'px'}"
|
|
36
|
-
>
|
|
37
|
-
<!-- {{td.width}} -->
|
|
38
|
-
<form-row-container
|
|
39
|
-
height="100%"
|
|
40
|
-
:list.sync="td.children"
|
|
41
|
-
v-bind="$attrs"
|
|
42
|
-
:border="false"
|
|
43
|
-
:font="newStyle.font"
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
<template v-if="$attrs.isEdit && activeId==td.id">
|
|
47
|
-
<!-- <MenuButton
|
|
48
|
-
v-if="dIndex+td.colspan!==tr.children.length"
|
|
49
|
-
icon="el-icon-rank"
|
|
50
|
-
class="Fg-table-move"
|
|
51
|
-
@click="dragStart($event, dIndex,rIndex)"
|
|
52
|
-
/>-->
|
|
53
|
-
|
|
54
|
-
<div class="Fg-table-options">
|
|
55
|
-
<!-- <TableStyle v-model="td.style" /> -->
|
|
56
|
-
<TableOptions
|
|
57
|
-
:list="list"
|
|
58
|
-
:rIndex="rIndex"
|
|
59
|
-
:dIndex="dIndex"
|
|
60
|
-
@command="handleSelect($event,list,rIndex,dIndex)"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</template>
|
|
64
|
-
</td>
|
|
65
|
-
</template>
|
|
66
|
-
</tr>
|
|
67
|
-
</table>
|
|
68
|
-
<div v-if="dragging" class="Fg-resize-guide" :style="{ left: guideLeft + 'px' }"></div>
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
|
|
72
|
-
<script>
|
|
73
|
-
import { deepClone, toCamelCase } from "../../../utils/index";
|
|
74
|
-
import * as table from "../../../utils/table";
|
|
75
|
-
import { getLeftTd, getRightTd } from "../../../utils/table";
|
|
76
|
-
import store from "@/store";
|
|
77
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
78
|
-
import TableOptions from "../components/tableOptions";
|
|
79
|
-
export default {
|
|
80
|
-
mixins: [comMixin],
|
|
81
|
-
name: "form-table-container",
|
|
82
|
-
components: {
|
|
83
|
-
TableOptions,
|
|
84
|
-
},
|
|
85
|
-
props: {
|
|
86
|
-
list: {
|
|
87
|
-
type: Array,
|
|
88
|
-
default: () => [],
|
|
89
|
-
},
|
|
90
|
-
scale: {
|
|
91
|
-
type: Object,
|
|
92
|
-
default: () => {},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
data() {
|
|
96
|
-
return {
|
|
97
|
-
deepClone,
|
|
98
|
-
toCamelCase,
|
|
99
|
-
id: this.$attrs.__config__.formId,
|
|
100
|
-
dragging: null,
|
|
101
|
-
guideLeft: 0, // 引导线距离左侧窗口的距离
|
|
102
|
-
};
|
|
103
|
-
},
|
|
104
|
-
computed: {
|
|
105
|
-
activeId() {
|
|
106
|
-
return store.state.app.activeId;
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
methods: {
|
|
110
|
-
handleSelect(value, list, rIndex, dIndex) {
|
|
111
|
-
table[value](list, rIndex, dIndex);
|
|
112
|
-
this.isInput = true;
|
|
113
|
-
},
|
|
114
|
-
handleClick(key) {
|
|
115
|
-
// 只有在表单编辑器模式下才执行后续逻辑
|
|
116
|
-
if (!this.$attrs.isEdit) return;
|
|
117
|
-
store.commit("SET_ACTIVEID", key);
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
// 开始移动
|
|
121
|
-
dragStart(event, dIndex, rIndex) {
|
|
122
|
-
if (this.dragging) return (this.dragging = null);
|
|
123
|
-
this.setWidth();
|
|
124
|
-
const { td } = getLeftTd(this.list, rIndex, dIndex);
|
|
125
|
-
// const tdEl = document.getElementById(td.id);
|
|
126
|
-
// // 只有在边界时允许移动
|
|
127
|
-
// if (tdEl.getBoundingClientRect().right - event.clientX > 6) return;
|
|
128
|
-
this.dragging = {
|
|
129
|
-
column: dIndex - 1 + td.colspan,
|
|
130
|
-
startX: event.clientX, // 点击处距离左侧窗口距离
|
|
131
|
-
moveWidth: 0, // 移动的距离
|
|
132
|
-
};
|
|
133
|
-
this.guideLeft = event.clientX; // 引导线的位置
|
|
134
|
-
document.addEventListener("mousemove", this.drag);
|
|
135
|
-
document.addEventListener("mouseup", this.dragEnd);
|
|
136
|
-
},
|
|
137
|
-
// 正在移动
|
|
138
|
-
drag(event) {
|
|
139
|
-
if (!this.dragging) return;
|
|
140
|
-
this.guideLeft = event.clientX;
|
|
141
|
-
// 移动的距离
|
|
142
|
-
this.dragging.moveWidth = this.guideLeft - this.dragging.startX;
|
|
143
|
-
},
|
|
144
|
-
// 移动结束
|
|
145
|
-
dragEnd() {
|
|
146
|
-
const table = document.getElementById(this.id);
|
|
147
|
-
// 整个表格的宽度
|
|
148
|
-
const tableWidth = table.getBoundingClientRect().width;
|
|
149
|
-
// 移动的宽度 / 表格宽度 = 移动的百分比
|
|
150
|
-
const percent = (this.dragging.moveWidth / tableWidth) * 100;
|
|
151
|
-
this.list.forEach((tr, rIndex) => {
|
|
152
|
-
const { td, index } = getLeftTd(
|
|
153
|
-
this.list,
|
|
154
|
-
rIndex,
|
|
155
|
-
this.dragging.column
|
|
156
|
-
);
|
|
157
|
-
const { td: td2 } = getRightTd(
|
|
158
|
-
this.list,
|
|
159
|
-
rIndex,
|
|
160
|
-
this.dragging.column + 1
|
|
161
|
-
);
|
|
162
|
-
if (td && td2 && index - 1 + td.colspan == this.dragging.column) {
|
|
163
|
-
// 相邻两个表格的整体宽度
|
|
164
|
-
td.width += percent;
|
|
165
|
-
td2.width -= percent;
|
|
166
|
-
// const width = td.width + percent;
|
|
167
|
-
// const width2 = td2.width - percent;
|
|
168
|
-
// const minWidth = (200 / tableWidth) * 100;
|
|
169
|
-
// if (width > minWidth && width2 > minWidth) {
|
|
170
|
-
// td.width = width;
|
|
171
|
-
// td2.width = width2;
|
|
172
|
-
// }
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
// 移动结束
|
|
176
|
-
this.dragging = null;
|
|
177
|
-
document.removeEventListener("mousemove", this.drag);
|
|
178
|
-
document.removeEventListener("mouseup", this.dragEnd);
|
|
179
|
-
},
|
|
180
|
-
// 获取正式单元格列宽比例
|
|
181
|
-
setWidth() {
|
|
182
|
-
const table = document.getElementById(this.id);
|
|
183
|
-
// 整个表格的宽度
|
|
184
|
-
const tableWidth = table.getBoundingClientRect().width;
|
|
185
|
-
this.list.forEach((tr) => {
|
|
186
|
-
tr.children.forEach((td) => {
|
|
187
|
-
if (td) {
|
|
188
|
-
const tdEl = document.getElementById(td.id);
|
|
189
|
-
const tdWidth = tdEl.getBoundingClientRect().width;
|
|
190
|
-
td.width = (tdWidth / tableWidth) * 100;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
};
|
|
197
|
-
</script>
|
|
198
|
-
|
|
199
|
-
<style lang="scss" >
|
|
200
|
-
@import "../../../styles/generator.scss";
|
|
201
|
-
.Fg-table-container {
|
|
202
|
-
width: 100%;
|
|
203
|
-
overflow-x: auto;
|
|
204
|
-
// margin-bottom: 22px;
|
|
205
|
-
> table {
|
|
206
|
-
height: 100%;
|
|
207
|
-
width: 100%;
|
|
208
|
-
// border: 1px solid #ebeef5;
|
|
209
|
-
border-style: solid;
|
|
210
|
-
border-color: #ebeef5;
|
|
211
|
-
border-collapse: collapse; /* 折叠边框,使其看起来更整洁 */
|
|
212
|
-
position: relative;
|
|
213
|
-
table-layout: fixed;
|
|
214
|
-
|
|
215
|
-
td {
|
|
216
|
-
position: relative;
|
|
217
|
-
// overflow-x: auto;
|
|
218
|
-
border: 1px solid #ebeef5;
|
|
219
|
-
border-style: solid !important;
|
|
220
|
-
.Fg-form-item {
|
|
221
|
-
overflow: auto;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.Fg-table-options {
|
|
226
|
-
position: absolute;
|
|
227
|
-
right: 1px;
|
|
228
|
-
bottom: 1px;
|
|
229
|
-
z-index: 1;
|
|
230
|
-
|
|
231
|
-
> div {
|
|
232
|
-
& + div {
|
|
233
|
-
margin-left: 10px;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
.Fg-table-move {
|
|
238
|
-
position: absolute;
|
|
239
|
-
right: -10px;
|
|
240
|
-
// bottom: 34px;
|
|
241
|
-
top: 50%;
|
|
242
|
-
transform: translateY(-10px);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.form-row-container {
|
|
246
|
-
.Fg-form-draggable {
|
|
247
|
-
> .Fg-form-item:last-child {
|
|
248
|
-
> .el-form-item {
|
|
249
|
-
margin-bottom: 0;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.Fg-resize-guide {
|
|
258
|
-
position: fixed;
|
|
259
|
-
border-left: 1px dashed #000;
|
|
260
|
-
height: 100%;
|
|
261
|
-
top: 0;
|
|
262
|
-
z-index: 1000;
|
|
263
|
-
}
|
|
264
|
-
.Fg-resize-box {
|
|
265
|
-
position: fixed;
|
|
266
|
-
left: 0;
|
|
267
|
-
right: 0;
|
|
268
|
-
bottom: 0;
|
|
269
|
-
top: 0;
|
|
270
|
-
z-index: 1;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.Fg-active.Fg-td-active {
|
|
274
|
-
height: calc(100% - var(--cellpadding) - 2px);
|
|
275
|
-
}
|
|
276
|
-
</style>
|
|
277
|
-
|
package/src/components/formGenerator/formComponents/pcComponents/layoutComs/formTabsContainer.vue
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-tabs class="Fg-tabs-container" :type="type" :value="activeName" :style="newStyle">
|
|
3
|
-
<el-tab-pane
|
|
4
|
-
class="Fg-tips"
|
|
5
|
-
v-for="item in list"
|
|
6
|
-
:key="item.value"
|
|
7
|
-
:label="item.label"
|
|
8
|
-
:name="item.value"
|
|
9
|
-
>
|
|
10
|
-
<span slot="label" :style="newStyle.font">{{item.label}}</span>
|
|
11
|
-
<form-row-container
|
|
12
|
-
:list.sync="item.children"
|
|
13
|
-
:font="newStyle.font"
|
|
14
|
-
v-bind="$attrs"
|
|
15
|
-
:border="false"
|
|
16
|
-
/>
|
|
17
|
-
</el-tab-pane>
|
|
18
|
-
</el-tabs>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import { deepClone, toCamelCase } from "../../../utils/index";
|
|
23
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
24
|
-
export default {
|
|
25
|
-
mixins: [comMixin],
|
|
26
|
-
name: "form-tabs-container",
|
|
27
|
-
props: {
|
|
28
|
-
value: {
|
|
29
|
-
type: [String, Number],
|
|
30
|
-
default: "",
|
|
31
|
-
},
|
|
32
|
-
list: {
|
|
33
|
-
type: Array,
|
|
34
|
-
default: () => [],
|
|
35
|
-
},
|
|
36
|
-
type: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "",
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
data() {
|
|
42
|
-
return {
|
|
43
|
-
activeName: this.value || this.list[0]?.value,
|
|
44
|
-
deepClone,
|
|
45
|
-
toCamelCase,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
watch: {
|
|
50
|
-
value(newValue) {
|
|
51
|
-
this.activeName = newValue;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<style lang="scss" >
|
|
58
|
-
@import "../../../styles/generator.scss";
|
|
59
|
-
.Fg-tabs-container {
|
|
60
|
-
.el-tabs__content {
|
|
61
|
-
height: calc(100% - 44px);
|
|
62
|
-
overflow: auto;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
</style>
|
package/src/components/formGenerator/formComponents/pcComponents/selectComs/formCascader.vue
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :style="newStyle">
|
|
3
|
-
<span v-if="$attrs.onlyShow">{{getCascaderText($attrs)}}</span>
|
|
4
|
-
<el-cascader
|
|
5
|
-
style="width:100%"
|
|
6
|
-
v-else
|
|
7
|
-
v-model="formValue"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
@blur="onBlur"
|
|
10
|
-
@focus="onFocus"
|
|
11
|
-
@clear="onClear"
|
|
12
|
-
@change="$emit('validate',$event)"
|
|
13
|
-
:options="resData"
|
|
14
|
-
:props="{...dataObj.props,multiple:$attrs.multiple,checkStrictly:$attrs.checkStrictly}"
|
|
15
|
-
></el-cascader>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import { treeToArray } from "../../../utils";
|
|
21
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
22
|
-
export default {
|
|
23
|
-
mixins: [comMixin],
|
|
24
|
-
name: "form-cascader",
|
|
25
|
-
model: {
|
|
26
|
-
prop: "value", // 绑定的值,通过父组件传递
|
|
27
|
-
event: "update",
|
|
28
|
-
},
|
|
29
|
-
props: ["value"],
|
|
30
|
-
computed: {
|
|
31
|
-
formValue: {
|
|
32
|
-
get() {
|
|
33
|
-
return this.value;
|
|
34
|
-
},
|
|
35
|
-
set(val) {
|
|
36
|
-
this.$emit("update", val);
|
|
37
|
-
this.onChange(val);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
methods: {
|
|
42
|
-
// 根据级联的值获取级联的显示文本
|
|
43
|
-
getCascaderText(formItem) {
|
|
44
|
-
const props = this.dataObj.props;
|
|
45
|
-
const formValue = this.value;
|
|
46
|
-
const options = treeToArray(this.resData, props.children);
|
|
47
|
-
let path = [];
|
|
48
|
-
formValue?.forEach((value) => {
|
|
49
|
-
const active = options.find((item) => item[props.value] == value);
|
|
50
|
-
if (active) path.push(active[props.label]);
|
|
51
|
-
});
|
|
52
|
-
// 间隔符
|
|
53
|
-
const separator = formItem.separator;
|
|
54
|
-
// 是否展示全路径
|
|
55
|
-
const showAllLevels = formItem["showAllLevels"];
|
|
56
|
-
return showAllLevels ? path.join(separator) : path[path.length - 1];
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style lang="scss" scoped></style>
|
package/src/components/formGenerator/formComponents/pcComponents/selectComs/formCheckboxGroup.vue
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :style="newStyle">
|
|
3
|
-
<span v-if="$attrs.onlyShow">{{getOptionsText(value,resData,props)}}</span>
|
|
4
|
-
<el-checkbox-group
|
|
5
|
-
v-else
|
|
6
|
-
v-model="formValue"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
:min="$attrs.min||0"
|
|
9
|
-
:max="$attrs.max!==null?$attrs.max:resData.length"
|
|
10
|
-
>
|
|
11
|
-
<template v-if="$attrs.__config__.optionType == 'button'">
|
|
12
|
-
<el-checkbox-button
|
|
13
|
-
v-for="item in resData"
|
|
14
|
-
:key="item[props.value]"
|
|
15
|
-
:label="item[props.value]"
|
|
16
|
-
:value="item[props.value]"
|
|
17
|
-
:disabled="item.disabled"
|
|
18
|
-
:border="$attrs.__config__.border"
|
|
19
|
-
>{{ item[props.label] }}</el-checkbox-button>
|
|
20
|
-
</template>
|
|
21
|
-
<template v-else>
|
|
22
|
-
<el-checkbox
|
|
23
|
-
v-for="item in resData"
|
|
24
|
-
:key="item[props.value]"
|
|
25
|
-
:label="item[props.value]"
|
|
26
|
-
:value="item[props.value]"
|
|
27
|
-
:disabled="item.disabled"
|
|
28
|
-
:border="$attrs.__config__.border"
|
|
29
|
-
>{{ item[props.label] }}</el-checkbox>
|
|
30
|
-
</template>
|
|
31
|
-
</el-checkbox-group>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import { getOptionsText } from "../../../utils";
|
|
37
|
-
|
|
38
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
39
|
-
export default {
|
|
40
|
-
mixins: [comMixin],
|
|
41
|
-
name: "form-checkbox-group",
|
|
42
|
-
model: {
|
|
43
|
-
prop: "value", // 绑定的值,通过父组件传递
|
|
44
|
-
event: "update",
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
value: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: "",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
formValue: {
|
|
54
|
-
get() {
|
|
55
|
-
return this.value ? this.value.split(",") : [];
|
|
56
|
-
},
|
|
57
|
-
set(val) {
|
|
58
|
-
const value = val ? val.join(",") : "";
|
|
59
|
-
this.$emit("update", value);
|
|
60
|
-
this.onChange(value);
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
getOptionsText,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style lang="scss" scoped></style>
|