@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
package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formSteps.vue
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Fg-pho-steps" :style="newStyle">
|
|
3
|
-
<van-steps :active="active" :active-color="blue">
|
|
4
|
-
<van-step v-for="item in list" :key="item.value" v-on="$listeners">
|
|
5
|
-
<span :style="newStyle.font">{{item.label}}</span>
|
|
6
|
-
</van-step>
|
|
7
|
-
</van-steps>
|
|
8
|
-
<div
|
|
9
|
-
class="Fg-pho-steps--content"
|
|
10
|
-
v-for="(item,i) in list"
|
|
11
|
-
:key="item.value"
|
|
12
|
-
v-show="i==active"
|
|
13
|
-
>
|
|
14
|
-
<phone-form-row-container :list.sync="item.children" :font="newStyle.font" v-bind="$attrs" />
|
|
15
|
-
</div>
|
|
16
|
-
<div class="Fg-pho-steps--button">
|
|
17
|
-
<van-button
|
|
18
|
-
type="info"
|
|
19
|
-
plain
|
|
20
|
-
block
|
|
21
|
-
round
|
|
22
|
-
v-show="active!==0"
|
|
23
|
-
size="small"
|
|
24
|
-
native-type="button"
|
|
25
|
-
@click.stop="pre"
|
|
26
|
-
>上一步</van-button>
|
|
27
|
-
<van-button
|
|
28
|
-
type="info"
|
|
29
|
-
block
|
|
30
|
-
round
|
|
31
|
-
plain
|
|
32
|
-
v-show="active!==list.length-1"
|
|
33
|
-
size="small"
|
|
34
|
-
native-type="button"
|
|
35
|
-
@click.stop="next"
|
|
36
|
-
>下一步</van-button>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script>
|
|
42
|
-
import { deepClone, toCamelCase } from "../../../utils/index";
|
|
43
|
-
import { blue } from "@/style/color.scss";
|
|
44
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
45
|
-
export default {
|
|
46
|
-
mixins: [comMixin],
|
|
47
|
-
name: "phone-form-steps",
|
|
48
|
-
props: {
|
|
49
|
-
value: {
|
|
50
|
-
type: [String, Number],
|
|
51
|
-
default: "",
|
|
52
|
-
},
|
|
53
|
-
list: {
|
|
54
|
-
type: Array,
|
|
55
|
-
default: () => [],
|
|
56
|
-
},
|
|
57
|
-
type: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: "",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
data() {
|
|
63
|
-
return {
|
|
64
|
-
active: 0,
|
|
65
|
-
deepClone,
|
|
66
|
-
toCamelCase,
|
|
67
|
-
blue,
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
methods: {
|
|
71
|
-
pre() {
|
|
72
|
-
this.active--;
|
|
73
|
-
},
|
|
74
|
-
next() {
|
|
75
|
-
this.active++;
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
watch: {
|
|
80
|
-
value: {
|
|
81
|
-
immediate: true,
|
|
82
|
-
deep: true,
|
|
83
|
-
handler(newValue) {
|
|
84
|
-
this.active = this.list.findIndex((item) => item.value == newValue);
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<style lang="scss" >
|
|
92
|
-
.Fg-pho-steps {
|
|
93
|
-
font-size: 14px;
|
|
94
|
-
// display: flex;
|
|
95
|
-
// flex-direction: column;
|
|
96
|
-
.Fg-pho-steps--button {
|
|
97
|
-
.van-button {
|
|
98
|
-
margin-top: 10px;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
.van-steps {
|
|
102
|
-
max-height: 60px;
|
|
103
|
-
}
|
|
104
|
-
.Fg-pho-steps--content {
|
|
105
|
-
height: calc(100% - 90px);
|
|
106
|
-
overflow: auto;
|
|
107
|
-
}
|
|
108
|
-
.van-step__circle-container {
|
|
109
|
-
background: transparent !important;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
</style>
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="Fg-sub" style="padding:10px 16px">
|
|
3
|
-
<!-- <span>{{$attrs.__config__.componentName}}</span> -->
|
|
4
|
-
<div>
|
|
5
|
-
<div class="Fg-sub-item" v-for="(item,i) in formLists" :key="i" :style="newStyle">
|
|
6
|
-
<div class="Fg-sub-item--top">
|
|
7
|
-
第{{i+1}}项
|
|
8
|
-
<i
|
|
9
|
-
class="el-icon-close"
|
|
10
|
-
@click="handleDelete(i)"
|
|
11
|
-
v-if="!$attrs.onlyShow && formLists.length>1"
|
|
12
|
-
></i>
|
|
13
|
-
</div>
|
|
14
|
-
<phone-form-row-container
|
|
15
|
-
:list.sync="item.children"
|
|
16
|
-
:formConf="$attrs"
|
|
17
|
-
:font="newStyle.font"
|
|
18
|
-
:onlyShow="$attrs.onlyShow"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<van-button
|
|
23
|
-
v-if="!$attrs.onlyShow"
|
|
24
|
-
icon="plus"
|
|
25
|
-
style="margin-top:10px"
|
|
26
|
-
native-type="button"
|
|
27
|
-
@click.stop="hadnleAdd"
|
|
28
|
-
size="small"
|
|
29
|
-
:disabled="formLists.length==$attrs.maxSize"
|
|
30
|
-
>添加数据</van-button>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
36
|
-
export default {
|
|
37
|
-
mixins: [comMixin],
|
|
38
|
-
name: "phone-form-sub",
|
|
39
|
-
props: {
|
|
40
|
-
value: {
|
|
41
|
-
type: [String, Number],
|
|
42
|
-
default: "",
|
|
43
|
-
},
|
|
44
|
-
list: {
|
|
45
|
-
type: Array,
|
|
46
|
-
default: () => [],
|
|
47
|
-
},
|
|
48
|
-
type: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: "",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
formLists: this.list.slice(1, this.list.length),
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
mounted() {
|
|
59
|
-
if (this.list.length <= 1) {
|
|
60
|
-
this.hadnleAdd();
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
methods: {
|
|
64
|
-
indexMethod(index) {
|
|
65
|
-
return index + 1;
|
|
66
|
-
},
|
|
67
|
-
onlyShowFun(item) {
|
|
68
|
-
return this.$attrs.onlyShow || item?.onlyShow;
|
|
69
|
-
},
|
|
70
|
-
hadnleAdd() {
|
|
71
|
-
const newItem = this.list[0]?.children.map((item) => {
|
|
72
|
-
return this.$utils.createFormItem(this.$utils.deepClone(item));
|
|
73
|
-
});
|
|
74
|
-
this.formLists.push({
|
|
75
|
-
value: this.$utils.getUuiKey(),
|
|
76
|
-
children: newItem,
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
handleDelete(i) {
|
|
80
|
-
this.formLists.splice(i, 1);
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
formLists: {
|
|
85
|
-
immediate: true,
|
|
86
|
-
deep: true,
|
|
87
|
-
handler(newValue) {
|
|
88
|
-
if (newValue && this.list.length) {
|
|
89
|
-
const list = [this.list[0]].concat(newValue);
|
|
90
|
-
this.$emit("update:list", list);
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<style lang="scss" >
|
|
99
|
-
@import "../../../styles/generator.scss";
|
|
100
|
-
@import "@/style/color";
|
|
101
|
-
|
|
102
|
-
.Fg-sub {
|
|
103
|
-
.Fg-sub-item {
|
|
104
|
-
padding: 5px;
|
|
105
|
-
margin-bottom: 10px;
|
|
106
|
-
border-left: 3px solid #409eff !important;
|
|
107
|
-
border-radius: 5px;
|
|
108
|
-
background: #fafafa;
|
|
109
|
-
font-size: 14px;
|
|
110
|
-
overflow: auto;
|
|
111
|
-
color: $gray-7;
|
|
112
|
-
.van-cell {
|
|
113
|
-
background-color: transparent;
|
|
114
|
-
}
|
|
115
|
-
.Fg-sub-item--top {
|
|
116
|
-
position: relative;
|
|
117
|
-
padding: 10px 40px;
|
|
118
|
-
text-align: right;
|
|
119
|
-
|
|
120
|
-
.el-icon-close {
|
|
121
|
-
position: absolute;
|
|
122
|
-
top: 13px;
|
|
123
|
-
right: 10px;
|
|
124
|
-
z-index: 1;
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
</style>
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="pho-form-table-container" :style="newStyle">
|
|
3
|
-
<table border="1" cellpadding="0" cellspacing="0" align="center">
|
|
4
|
-
<tr v-for="(tr,rIndex) in list" :key="rIndex">
|
|
5
|
-
<template v-for="(td,dIndex) in tr.children">
|
|
6
|
-
<td
|
|
7
|
-
v-if="td && td.colspan && td.rowspan"
|
|
8
|
-
:key="dIndex"
|
|
9
|
-
:colspan="td.colspan"
|
|
10
|
-
:rowspan="td.rowspan"
|
|
11
|
-
:style="{ width:100/tr.children.length+'%',...td.style ,borderWidth:$attrs.borderWidth+'px',borderColor:$attrs.borderColor,padding:$attrs.cellpadding+'px'}"
|
|
12
|
-
>
|
|
13
|
-
<phone-form-row-container
|
|
14
|
-
:font="newStyle.font"
|
|
15
|
-
:list.sync="td.children"
|
|
16
|
-
v-bind="$attrs"
|
|
17
|
-
/>
|
|
18
|
-
</td>
|
|
19
|
-
</template>
|
|
20
|
-
</tr>
|
|
21
|
-
</table>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import draggable from "vuedraggable";
|
|
27
|
-
import { deepClone, toCamelCase } from "../../../utils/index";
|
|
28
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
29
|
-
export default {
|
|
30
|
-
mixins: [comMixin],
|
|
31
|
-
name: "phone-form-table-container",
|
|
32
|
-
components: {
|
|
33
|
-
draggable,
|
|
34
|
-
},
|
|
35
|
-
props: {
|
|
36
|
-
// 当前选中表单
|
|
37
|
-
currentData: {
|
|
38
|
-
type: Object,
|
|
39
|
-
default: () => {},
|
|
40
|
-
},
|
|
41
|
-
height: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "",
|
|
44
|
-
},
|
|
45
|
-
list: {
|
|
46
|
-
type: Array,
|
|
47
|
-
default: () => [],
|
|
48
|
-
},
|
|
49
|
-
scale: {
|
|
50
|
-
type: Object,
|
|
51
|
-
default: () => {},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
activeData: {},
|
|
57
|
-
deepClone,
|
|
58
|
-
toCamelCase,
|
|
59
|
-
rows: [],
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
mounted() {},
|
|
63
|
-
watch: {},
|
|
64
|
-
methods: {},
|
|
65
|
-
};
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
|
-
<style lang="scss" >
|
|
69
|
-
@import "../../../styles/generator.scss";
|
|
70
|
-
.pho-form-table-container {
|
|
71
|
-
padding: 10px 16px;
|
|
72
|
-
overflow-x: auto;
|
|
73
|
-
table {
|
|
74
|
-
width: 100%;
|
|
75
|
-
border: 1px solid #ebeef5;
|
|
76
|
-
border-width: 0;
|
|
77
|
-
border-collapse: collapse; /* 折叠边框,使其看起来更整洁 */
|
|
78
|
-
}
|
|
79
|
-
th,
|
|
80
|
-
td {
|
|
81
|
-
border: 1px solid #ebeef5;
|
|
82
|
-
}
|
|
83
|
-
td {
|
|
84
|
-
// height: 60px;
|
|
85
|
-
min-width: 100px;
|
|
86
|
-
}
|
|
87
|
-
.pho-form-item:last-child {
|
|
88
|
-
&::before {
|
|
89
|
-
display: none;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
</style>
|
package/src/components/formGenerator/formComponents/phoneComponents/layoutComs/formTabsContainer.vue
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="pho-form-item">
|
|
3
|
-
<van-tabs class="pho-tabs" :type="defaultType" v-model="activeName" :style="newStyle">
|
|
4
|
-
<van-tab v-for="item in list" :key="item.value" :title="item.label" :name="item.value">
|
|
5
|
-
<span slot="title" :style="newStyle.font">{{item.label}}</span>
|
|
6
|
-
<phone-form-row-container :list.sync="item.children" :font="newStyle.font" v-bind="$attrs" />
|
|
7
|
-
</van-tab>
|
|
8
|
-
</van-tabs>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { deepClone, toCamelCase } from "../../../utils/index";
|
|
14
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
15
|
-
export default {
|
|
16
|
-
mixins: [comMixin],
|
|
17
|
-
name: "phone-form-tabs-container",
|
|
18
|
-
props: {
|
|
19
|
-
value: {
|
|
20
|
-
type: [String, Number],
|
|
21
|
-
default: "",
|
|
22
|
-
},
|
|
23
|
-
list: {
|
|
24
|
-
type: Array,
|
|
25
|
-
default: () => [],
|
|
26
|
-
},
|
|
27
|
-
type: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
data() {
|
|
33
|
-
return {
|
|
34
|
-
activeName: this.value || this.list[0]?.value,
|
|
35
|
-
deepClone,
|
|
36
|
-
toCamelCase,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
computed: {
|
|
40
|
-
defaultType() {
|
|
41
|
-
if (this.type == "card" || this.type == "border-card") return "card";
|
|
42
|
-
return "line";
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
watch: {
|
|
46
|
-
value(newValue) {
|
|
47
|
-
this.activeName = newValue;
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style lang="scss" >
|
|
54
|
-
@import "../../../styles/generator.scss";
|
|
55
|
-
.pho-tabs {
|
|
56
|
-
.van-tabs__nav {
|
|
57
|
-
background-color: transparent;
|
|
58
|
-
}
|
|
59
|
-
.van-tabs__content {
|
|
60
|
-
height: calc(100% - 44px);
|
|
61
|
-
overflow: auto;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
</style>
|
package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formCascader.vue
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 级联选择器 -->
|
|
3
|
-
<div class="pho-form-item" :style="newStyle">
|
|
4
|
-
<!-- {{checked}} -->
|
|
5
|
-
<van-field
|
|
6
|
-
:value="cascaderText"
|
|
7
|
-
:label="showLabel ? $attrs.label : ''"
|
|
8
|
-
:name="$attrs.__vModel__"
|
|
9
|
-
:required="$attrs.required"
|
|
10
|
-
:rules="$attrs.rules"
|
|
11
|
-
:placeholder="$attrs.placeholder"
|
|
12
|
-
input-align="right"
|
|
13
|
-
:disabled="$attrs.disabled"
|
|
14
|
-
:is-link="!isTop"
|
|
15
|
-
readonly
|
|
16
|
-
:clickable="!$attrs.onlyShow"
|
|
17
|
-
@click="handleClick"
|
|
18
|
-
>
|
|
19
|
-
<span v-if="showLabel" slot="label" :style="newStyle.font">{{$attrs.label}}</span>
|
|
20
|
-
<template #right-icon v-if="clearable">
|
|
21
|
-
<div @click.stop="onClear">
|
|
22
|
-
<van-icon name="clear" />
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
</van-field>
|
|
26
|
-
<!-- <CascaderPicker
|
|
27
|
-
v-model="formValue"
|
|
28
|
-
:options="resData"
|
|
29
|
-
:multiple="multiple"
|
|
30
|
-
:field-names="fieldNames"
|
|
31
|
-
:checkStrictly="checkStrictly"
|
|
32
|
-
/>-->
|
|
33
|
-
<van-popup v-model="show" round position="bottom" get-container="body">
|
|
34
|
-
<van-cascader
|
|
35
|
-
v-model="formValue"
|
|
36
|
-
v-bind="$attrs"
|
|
37
|
-
:options="resData"
|
|
38
|
-
:field-names="fieldNames"
|
|
39
|
-
active-color="#478df4"
|
|
40
|
-
@close="show = false"
|
|
41
|
-
@change="handleChange"
|
|
42
|
-
@finish="handleConfirm"
|
|
43
|
-
/>
|
|
44
|
-
<!-- 多选 -->
|
|
45
|
-
<!-- <van-checkbox-group v-if="multiple" :value="checked" shape="square" @change="handleCheck">
|
|
46
|
-
<van-cascader
|
|
47
|
-
v-model="formValue"
|
|
48
|
-
v-bind="$attrs"
|
|
49
|
-
:options="resData"
|
|
50
|
-
:field-names="fieldNames"
|
|
51
|
-
active-color="#478df4"
|
|
52
|
-
@close="show = false"
|
|
53
|
-
@change="handleChange"
|
|
54
|
-
@finish="handleConfirm"
|
|
55
|
-
>
|
|
56
|
-
<template #option="{option,selected}">
|
|
57
|
-
<div @click.stop style="width:28px">
|
|
58
|
-
<van-checkbox :name="option[props.value]" />
|
|
59
|
-
</div>
|
|
60
|
-
<span style="width:100%">{{option[props.label]}}</span>
|
|
61
|
-
</template>
|
|
62
|
-
</van-cascader>
|
|
63
|
-
</van-checkbox-group>
|
|
64
|
-
<van-radio-group v-model="checked" v-else>
|
|
65
|
-
<van-cascader
|
|
66
|
-
v-model="formValue"
|
|
67
|
-
v-bind="$attrs"
|
|
68
|
-
:options="resData"
|
|
69
|
-
:field-names="fieldNames"
|
|
70
|
-
active-color="#478df4"
|
|
71
|
-
@close="show = false"
|
|
72
|
-
@change="handleChange"
|
|
73
|
-
@finish="handleConfirm"
|
|
74
|
-
>
|
|
75
|
-
<template #option="{option,selected}">
|
|
76
|
-
<div @click.stop style="width:28px">
|
|
77
|
-
<van-radio :name="option[props.value]" />
|
|
78
|
-
</div>
|
|
79
|
-
<span style="width:100%">{{option[props.label]}}</span>
|
|
80
|
-
</template>
|
|
81
|
-
</van-cascader>
|
|
82
|
-
</van-radio-group>-->
|
|
83
|
-
</van-popup>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script>
|
|
88
|
-
import { getPathById } from "../../../utils/index";
|
|
89
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
90
|
-
import CascaderPicker from "../components/cascaderPicker.vue";
|
|
91
|
-
export default {
|
|
92
|
-
mixins: [comMixin],
|
|
93
|
-
name: "phone-form-cascader",
|
|
94
|
-
components: {
|
|
95
|
-
CascaderPicker,
|
|
96
|
-
},
|
|
97
|
-
model: {
|
|
98
|
-
prop: "value", // 绑定的值,通过父组件传递
|
|
99
|
-
event: "update",
|
|
100
|
-
},
|
|
101
|
-
props: {
|
|
102
|
-
value: {
|
|
103
|
-
default: "",
|
|
104
|
-
},
|
|
105
|
-
// 是否为上下布局
|
|
106
|
-
isTop: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false,
|
|
109
|
-
},
|
|
110
|
-
// 是否展示标题
|
|
111
|
-
showLabel: {
|
|
112
|
-
type: Boolean,
|
|
113
|
-
default: true,
|
|
114
|
-
},
|
|
115
|
-
// 是否多选
|
|
116
|
-
multiple: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
default: false,
|
|
119
|
-
},
|
|
120
|
-
// 是否选择任意一级
|
|
121
|
-
checkStrictly: {
|
|
122
|
-
type: Boolean,
|
|
123
|
-
default: false,
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
data() {
|
|
127
|
-
return {
|
|
128
|
-
formValue: "",
|
|
129
|
-
show: false,
|
|
130
|
-
checked: [],
|
|
131
|
-
};
|
|
132
|
-
},
|
|
133
|
-
computed: {
|
|
134
|
-
// 自定义 options 结构中的字段 object { text: 'text', value: 'value', children: 'children' }
|
|
135
|
-
fieldNames() {
|
|
136
|
-
const props = this.dataObj.props;
|
|
137
|
-
return {
|
|
138
|
-
text: props.label || "text",
|
|
139
|
-
value: props.value || "value",
|
|
140
|
-
children: props.children || "children",
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
// 选中后显示的文字
|
|
144
|
-
cascaderText() {
|
|
145
|
-
let text = "";
|
|
146
|
-
if (this.formValue && this.resData.length) {
|
|
147
|
-
// 显示的文字
|
|
148
|
-
const path =
|
|
149
|
-
getPathById(this.resData, this.formValue, this.fieldNames)?.map(
|
|
150
|
-
(it) => it[this.fieldNames.text]
|
|
151
|
-
) || [];
|
|
152
|
-
// 间隔符
|
|
153
|
-
const separator = this.$attrs.separator;
|
|
154
|
-
// 是否展示全路径
|
|
155
|
-
const showAllLevels = this.$attrs.showAllLevels;
|
|
156
|
-
text = showAllLevels ? path.join(separator) : path[path.length - 1];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return text;
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
watch: {
|
|
163
|
-
value: {
|
|
164
|
-
immediate: true,
|
|
165
|
-
deep: true,
|
|
166
|
-
handler(newValue) {
|
|
167
|
-
this.formValue = "";
|
|
168
|
-
if (newValue && newValue.length) {
|
|
169
|
-
this.formValue = newValue[newValue.length - 1];
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
methods: {
|
|
176
|
-
// 多选/单选
|
|
177
|
-
handleCheck(val) {
|
|
178
|
-
console.log("val", val);
|
|
179
|
-
// if (!this.multiple) {
|
|
180
|
-
// this.checked = val.length ? [val[val.length - 1]] : [];
|
|
181
|
-
// }
|
|
182
|
-
},
|
|
183
|
-
handleClick() {
|
|
184
|
-
if (this.$attrs.disabled || this.$attrs.readonly || this.$attrs.onlyShow)
|
|
185
|
-
return;
|
|
186
|
-
this.show = true;
|
|
187
|
-
},
|
|
188
|
-
handleChange() {
|
|
189
|
-
// 获取选中节点的全路径
|
|
190
|
-
const path =
|
|
191
|
-
getPathById(this.resData, this.formValue, this.fieldNames)?.map(
|
|
192
|
-
(it) => it[this.fieldNames.value]
|
|
193
|
-
) || [];
|
|
194
|
-
this.$emit("update", path);
|
|
195
|
-
this.$emit("change", path);
|
|
196
|
-
this.onChange(path);
|
|
197
|
-
},
|
|
198
|
-
handleConfirm() {
|
|
199
|
-
this.handleChange();
|
|
200
|
-
this.show = false;
|
|
201
|
-
},
|
|
202
|
-
onClear() {
|
|
203
|
-
this.$emit("update", "");
|
|
204
|
-
this.$emit("clear");
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
};
|
|
208
|
-
</script>
|
|
209
|
-
|
|
210
|
-
<style lang="scss" scoped></style>
|
package/src/components/formGenerator/formComponents/phoneComponents/selectComs/formCheckboxGroup.vue
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 多选框组 -->
|
|
3
|
-
<div
|
|
4
|
-
class="pho-form-item pho-form-flex"
|
|
5
|
-
:style="{...newStyle,flexDirection:$attrs.isTop ? 'column' : ''}"
|
|
6
|
-
>
|
|
7
|
-
<van-field
|
|
8
|
-
class="form-input-hidden"
|
|
9
|
-
v-bind="$attrs"
|
|
10
|
-
:value="value"
|
|
11
|
-
:label="showLabel ? $attrs.label : ''"
|
|
12
|
-
:name="$attrs.__vModel__"
|
|
13
|
-
:placeholder="$attrs.placeholder"
|
|
14
|
-
input-align="right"
|
|
15
|
-
>
|
|
16
|
-
<span v-if="showLabel" slot="label" :style="newStyle.font">{{$attrs.label}}</span>
|
|
17
|
-
</van-field>
|
|
18
|
-
<TextShow v-if="$attrs.onlyShow" :value="$utils.getOptionsText(value,resData,props)" />
|
|
19
|
-
<van-checkbox-group
|
|
20
|
-
v-else
|
|
21
|
-
class="right-box"
|
|
22
|
-
v-model="formValue"
|
|
23
|
-
direction="horizontal"
|
|
24
|
-
v-bind="$attrs"
|
|
25
|
-
@change="handleChange"
|
|
26
|
-
>
|
|
27
|
-
<van-checkbox
|
|
28
|
-
v-for="item in resData"
|
|
29
|
-
:key="item[props.value]"
|
|
30
|
-
:name="item[props.value]"
|
|
31
|
-
:icon-size="16"
|
|
32
|
-
shape="square"
|
|
33
|
-
style="margin-bottom: 5px"
|
|
34
|
-
>{{ item[props.label] }}</van-checkbox>
|
|
35
|
-
</van-checkbox-group>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
import { comMixin } from "../../../utils/comMixins";
|
|
41
|
-
import TextShow from "../components/textShow.vue";
|
|
42
|
-
export default {
|
|
43
|
-
components: { TextShow },
|
|
44
|
-
mixins: [comMixin],
|
|
45
|
-
name: "phone-form-checkbox-group",
|
|
46
|
-
model: {
|
|
47
|
-
prop: "value", // 绑定的值,通过父组件传递
|
|
48
|
-
event: "update",
|
|
49
|
-
},
|
|
50
|
-
props: {
|
|
51
|
-
value: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "",
|
|
54
|
-
},
|
|
55
|
-
// 是否展示标题
|
|
56
|
-
showLabel: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: true,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
data() {
|
|
62
|
-
return {
|
|
63
|
-
formValue: [],
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
watch: {
|
|
67
|
-
value: {
|
|
68
|
-
immediate: true,
|
|
69
|
-
deep: true,
|
|
70
|
-
handler(newValue) {
|
|
71
|
-
this.formValue = this.value ? this.value.split(",") : [];
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
handleChange(value) {
|
|
77
|
-
const newValue = value ? value.join(",") : "";
|
|
78
|
-
this.$emit("update", newValue);
|
|
79
|
-
this.$emit("change", newValue);
|
|
80
|
-
this.onChange(newValue);
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<style lang="scss" scoped></style>
|