@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,136 +0,0 @@
|
|
|
1
|
-
@import "./generator.scss";
|
|
2
|
-
// body, html{
|
|
3
|
-
// margin: 0;
|
|
4
|
-
// padding: 0;
|
|
5
|
-
// background: #fff;
|
|
6
|
-
// -moz-osx-font-smoothing: grayscale;
|
|
7
|
-
// -webkit-font-smoothing: antialiased;
|
|
8
|
-
// text-rendering: optimizeLegibility;
|
|
9
|
-
// font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
|
|
10
|
-
// }
|
|
11
|
-
|
|
12
|
-
input, textarea{
|
|
13
|
-
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
|
|
14
|
-
}
|
|
15
|
-
.ul,.li {
|
|
16
|
-
list-style: none;
|
|
17
|
-
}
|
|
18
|
-
div,span {
|
|
19
|
-
word-break: break-all;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.form-dialog {
|
|
23
|
-
overflow: hidden !important;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
.el-dialog {
|
|
27
|
-
margin-top:5vh !important;
|
|
28
|
-
width: 650px;
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
.el-dialog__body {
|
|
32
|
-
padding: 20px 50px;
|
|
33
|
-
overflow-y: auto;
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
height: 85vh;
|
|
36
|
-
}
|
|
37
|
-
>.is-fullscreen {
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.Fg-dialog2 {
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
.el-dialog__body {
|
|
47
|
-
overflow-y: auto;
|
|
48
|
-
box-sizing: border-box;
|
|
49
|
-
height: 60vh;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 全局自定义组件添加遮罩
|
|
54
|
-
.form-components {
|
|
55
|
-
position: relative;
|
|
56
|
-
.form-readonly {
|
|
57
|
-
position: absolute;
|
|
58
|
-
left: 0;
|
|
59
|
-
right: 0;
|
|
60
|
-
top: 0;
|
|
61
|
-
bottom: 0;
|
|
62
|
-
z-index: 1;
|
|
63
|
-
}
|
|
64
|
-
.form-disabled {
|
|
65
|
-
position: absolute;
|
|
66
|
-
left: 0;
|
|
67
|
-
right: 0;
|
|
68
|
-
top: 0;
|
|
69
|
-
bottom: 0;
|
|
70
|
-
z-index: 1;
|
|
71
|
-
background-color: rgba($color: #F5F7FA, $alpha: 0.6);
|
|
72
|
-
border-color: #E4E7ED;
|
|
73
|
-
color: #C0C4CC;
|
|
74
|
-
cursor: not-allowed;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.mask-layer {
|
|
79
|
-
position: relative;
|
|
80
|
-
&:after {
|
|
81
|
-
content: '';
|
|
82
|
-
position: absolute;
|
|
83
|
-
// inset: 0; // google 64 版本不兼容
|
|
84
|
-
left: 0;
|
|
85
|
-
top: 0;
|
|
86
|
-
bottom: 0;
|
|
87
|
-
right: 0;
|
|
88
|
-
display: block !important;
|
|
89
|
-
z-index: 1;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.form-hover {
|
|
94
|
-
&::after {
|
|
95
|
-
content: "点击修改";
|
|
96
|
-
display: block;
|
|
97
|
-
position: absolute;
|
|
98
|
-
left: 0;
|
|
99
|
-
top: 0;
|
|
100
|
-
bottom: 0;
|
|
101
|
-
right: 0;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
color: #fff;
|
|
104
|
-
opacity: 0;
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
font-size: 14px;
|
|
109
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
110
|
-
transition: opacity 0.3s;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
.form-hover:hover {
|
|
114
|
-
&::after {
|
|
115
|
-
opacity: 1;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.form-signature-empty {
|
|
120
|
-
background-color: #fbfdff;
|
|
121
|
-
border: 1px dashed #c0ccda;
|
|
122
|
-
border-radius: 6px;
|
|
123
|
-
color: #8c939d;
|
|
124
|
-
width: 100%;
|
|
125
|
-
aspect-ratio: 8/3;
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
padding: 16px;
|
|
131
|
-
box-sizing: border-box;
|
|
132
|
-
&:hover {
|
|
133
|
-
border-color: $themeColor;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
@import "./generator.scss";
|
|
2
|
-
|
|
3
|
-
.Fg-coms-list {
|
|
4
|
-
padding: 8px;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
height: 100%;
|
|
7
|
-
.Fg-coms-item {
|
|
8
|
-
display: inline-block;
|
|
9
|
-
width: 48%;
|
|
10
|
-
margin: 1%;
|
|
11
|
-
transition: transform 0ms !important;
|
|
12
|
-
}
|
|
13
|
-
.el-collapse-item__content {
|
|
14
|
-
padding-bottom: 0;
|
|
15
|
-
}
|
|
16
|
-
border: 0px;
|
|
17
|
-
.el-collapse-item__wrap,
|
|
18
|
-
.el-collapse-item__header {
|
|
19
|
-
border: 0px;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
.Fg-coms-title {
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
color: #222;
|
|
25
|
-
margin: 6px 2px;
|
|
26
|
-
font-style: italic;
|
|
27
|
-
font-weight: bold;
|
|
28
|
-
.svg-icon {
|
|
29
|
-
color: #666;
|
|
30
|
-
font-size: 18px;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.Fg-coms-body {
|
|
35
|
-
padding: 0;
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 0;
|
|
38
|
-
padding: 8px 10px;
|
|
39
|
-
background: $selectedColor;
|
|
40
|
-
font-size: 12px;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
border: 1px dashed $selectedColor;
|
|
43
|
-
border-radius: 3px;
|
|
44
|
-
white-space: nowrap;
|
|
45
|
-
line-height: 20px;
|
|
46
|
-
.svg-icon {
|
|
47
|
-
color: #777;
|
|
48
|
-
font-size: 15px;
|
|
49
|
-
}
|
|
50
|
-
&:hover {
|
|
51
|
-
border: 1px dashed $themeColor;
|
|
52
|
-
color: $themeColor;
|
|
53
|
-
.svg-icon {
|
|
54
|
-
color: $themeColor;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
$gray-3: #ebedf0;
|
|
3
|
-
$gray-5: #c8c9cc;
|
|
4
|
-
$gray-6: #969799;
|
|
5
|
-
$gray-7: #646566;
|
|
6
|
-
$blue-1:#478df4;
|
|
7
|
-
$green:#07c160;
|
|
8
|
-
$orange:#ff976a;
|
|
9
|
-
$red:#ee0a24;
|
|
10
|
-
|
|
11
|
-
.pho-bg-primary {
|
|
12
|
-
background-color: $blue-1;
|
|
13
|
-
}
|
|
14
|
-
.pho-bg-success {
|
|
15
|
-
background-color: $green;
|
|
16
|
-
}
|
|
17
|
-
.pho-bg-warning {
|
|
18
|
-
background-color: $orange;
|
|
19
|
-
}
|
|
20
|
-
.pho-bg-danger {
|
|
21
|
-
background-color:$red;
|
|
22
|
-
}
|
|
23
|
-
.pho-bg-info {
|
|
24
|
-
background-color:$gray-6;
|
|
25
|
-
}
|
|
26
|
-
.pho-text-primary {
|
|
27
|
-
color: $blue-1;
|
|
28
|
-
}
|
|
29
|
-
.pho-text-success {
|
|
30
|
-
color: $green;
|
|
31
|
-
}
|
|
32
|
-
.pho-text-warning {
|
|
33
|
-
color: $orange;
|
|
34
|
-
}
|
|
35
|
-
.pho-text-danger {
|
|
36
|
-
color:$red;
|
|
37
|
-
}
|
|
38
|
-
.pho-text-info {
|
|
39
|
-
color:$gray-6;
|
|
40
|
-
}
|
|
41
|
-
.pho-border-primary {
|
|
42
|
-
border-color: $blue-1;
|
|
43
|
-
}
|
|
44
|
-
.pho-border-success {
|
|
45
|
-
border-color: $green;
|
|
46
|
-
}
|
|
47
|
-
.pho-border-warning {
|
|
48
|
-
border-color: $orange;
|
|
49
|
-
}
|
|
50
|
-
.pho-border-danger {
|
|
51
|
-
border-color:$red;
|
|
52
|
-
}
|
|
53
|
-
.pho-border-info {
|
|
54
|
-
border-color:$gray-6;
|
|
55
|
-
}
|
|
56
|
-
.van-gray5 {
|
|
57
|
-
color: $gray-5;
|
|
58
|
-
}
|
|
59
|
-
.van-gray6 {
|
|
60
|
-
color: $gray-6;
|
|
61
|
-
}
|
|
62
|
-
.blue {
|
|
63
|
-
color: $blue-1;
|
|
64
|
-
}
|
|
65
|
-
.Fg-phone {
|
|
66
|
-
.van-cell {
|
|
67
|
-
background: transparent;
|
|
68
|
-
}
|
|
69
|
-
font-size: 14px;
|
|
70
|
-
}
|
|
71
|
-
.pho-form-item {
|
|
72
|
-
position: relative;
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
.pho-form-item-title {
|
|
75
|
-
padding: 10px 16px 0 16px;
|
|
76
|
-
margin-bottom: 5px;
|
|
77
|
-
line-height: 24px;
|
|
78
|
-
color:$gray-7
|
|
79
|
-
}
|
|
80
|
-
.pho-form-item-cont {
|
|
81
|
-
padding: 0 16px 10px 16px;
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
.van-field--label-top ~ .right-box{
|
|
85
|
-
padding-top: 0;
|
|
86
|
-
}
|
|
87
|
-
.van-tabs__line,
|
|
88
|
-
.van-tabs__nav--card .van-tab.van-tab--active {
|
|
89
|
-
background-color: $blue-1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.van-tabs__nav--card .van-tab ,
|
|
93
|
-
.van-tabs__nav--card{
|
|
94
|
-
border-color: $blue-1;
|
|
95
|
-
}
|
|
96
|
-
.van-cascader__option--selected,
|
|
97
|
-
.van-tabs__nav--card .van-tab {
|
|
98
|
-
color: $blue-1;
|
|
99
|
-
}
|
|
100
|
-
.van-tabs__nav--card .van-tab.van-tab--active {
|
|
101
|
-
color: #fff;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.van-cell::after {
|
|
105
|
-
display: none;
|
|
106
|
-
}
|
|
107
|
-
&::before {
|
|
108
|
-
position: absolute;
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
content: ' ';
|
|
111
|
-
pointer-events: none;
|
|
112
|
-
right: 16px;
|
|
113
|
-
bottom: 0;
|
|
114
|
-
left: 16px;
|
|
115
|
-
border-bottom: 1px solid $gray-3;
|
|
116
|
-
-webkit-transform: scaleY(0.5);
|
|
117
|
-
transform: scaleY(0.5);
|
|
118
|
-
z-index: 1;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/* 自定义 单行表单 (label 为独立一行 输入框独立一行)*/
|
|
122
|
-
.van-field--label-top {
|
|
123
|
-
display: block;
|
|
124
|
-
text-align: left;
|
|
125
|
-
.van-field__label {
|
|
126
|
-
width: 100% !important;
|
|
127
|
-
padding: 0;
|
|
128
|
-
margin-bottom: 5px;
|
|
129
|
-
}
|
|
130
|
-
// // 输入元素 另起一行
|
|
131
|
-
.van-field__value {
|
|
132
|
-
display: block;
|
|
133
|
-
.van-field__control {
|
|
134
|
-
text-align: left;
|
|
135
|
-
justify-content: flex-start;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
>.van-icon-arrow {
|
|
139
|
-
display: none;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
.van-field__label--right,
|
|
143
|
-
.van-field__label--right,
|
|
144
|
-
.van-field__label--center {
|
|
145
|
-
text-align: left;
|
|
146
|
-
}
|
|
147
|
-
// van-field组件仅显示标题,隐藏van-field组件的输入框部分
|
|
148
|
-
.pho-form-onlylabel {
|
|
149
|
-
.van-field__value {
|
|
150
|
-
display: none;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
.van-cell__title {
|
|
154
|
-
color: $gray-7;
|
|
155
|
-
}
|
|
156
|
-
// 禁用样式
|
|
157
|
-
.form-cell--disabled,.van-field--disabled {
|
|
158
|
-
.van-cell__title {
|
|
159
|
-
color: $gray-5;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
.pho-form-cont{
|
|
163
|
-
padding: 0 16px;
|
|
164
|
-
padding-bottom: 10px;
|
|
165
|
-
}
|
|
166
|
-
.van-cell__right-icon {
|
|
167
|
-
line-height: 24px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.pho-form-flex {
|
|
173
|
-
display: flex;
|
|
174
|
-
justify-content: space-between;
|
|
175
|
-
.right-box {
|
|
176
|
-
color: #323233;
|
|
177
|
-
line-height: 20px;
|
|
178
|
-
padding: 10px 16px;
|
|
179
|
-
}
|
|
180
|
-
.right-box.center {
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: center;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
.pho-form-pad {
|
|
186
|
-
padding: 12px 16px;
|
|
187
|
-
}
|
|
188
|
-
.pho-pad-lr {
|
|
189
|
-
padding-left: 16px;
|
|
190
|
-
padding-right: 16px;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.form-range-picker {
|
|
194
|
-
display: flex;
|
|
195
|
-
justify-content: flex-end;
|
|
196
|
-
.startPlaceholder,.endPlaceholder {
|
|
197
|
-
cursor: pointer;
|
|
198
|
-
}
|
|
199
|
-
.rangeSeparator {
|
|
200
|
-
margin: 0 10px;
|
|
201
|
-
color: $gray-7;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
.date-range-cell {
|
|
207
|
-
.van-cell__value {
|
|
208
|
-
flex: 2;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
.form-input-hidden {
|
|
212
|
-
.van-field__control,.van-field__body {
|
|
213
|
-
visibility: hidden;
|
|
214
|
-
height: 0;
|
|
215
|
-
width: 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
width: auto;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.form-input-hidden.van-field--label-top {
|
|
222
|
-
padding-bottom: 0;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
.form-placeholder {
|
|
228
|
-
color: #c8c9cc;
|
|
229
|
-
}
|
|
230
|
-
.pho-disabled {
|
|
231
|
-
color: #c8c9cc;
|
|
232
|
-
position: relative;
|
|
233
|
-
&::after {
|
|
234
|
-
content: "";
|
|
235
|
-
position: absolute;
|
|
236
|
-
// inset: 0; // google 64 版本不兼容
|
|
237
|
-
left: 0;
|
|
238
|
-
top: 0;
|
|
239
|
-
bottom: 0;
|
|
240
|
-
right: 0;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.Fg-pho-mask-layer {
|
|
245
|
-
position: relative;
|
|
246
|
-
&:after {
|
|
247
|
-
content: '';
|
|
248
|
-
position: absolute;
|
|
249
|
-
top: 0;
|
|
250
|
-
bottom: 0;
|
|
251
|
-
left: 0;
|
|
252
|
-
right: 0;
|
|
253
|
-
z-index: 10;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.pho-empty {
|
|
258
|
-
width: 100%;
|
|
259
|
-
height: 40px;
|
|
260
|
-
position: relative;
|
|
261
|
-
display: flex;
|
|
262
|
-
align-items: center;
|
|
263
|
-
justify-content: center;
|
|
264
|
-
background-color: $gray-3;
|
|
265
|
-
color: $gray-6;
|
|
266
|
-
}
|
|
267
|
-
.van-dialog__confirm, .van-dialog__confirm:active {
|
|
268
|
-
color: $blue-1;
|
|
269
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// 组件属性相关的数据
|
|
2
|
-
export const dateTimeFormat = {
|
|
3
|
-
date: "yyyy-MM-dd",
|
|
4
|
-
week: "yyyy 第 WW 周",
|
|
5
|
-
month: "yyyy-MM",
|
|
6
|
-
year: "yyyy",
|
|
7
|
-
datetime: "yyyy-MM-dd HH:mm:ss",
|
|
8
|
-
daterange: "yyyy-MM-dd",
|
|
9
|
-
monthrange: "yyyy-MM",
|
|
10
|
-
datetimerange: "yyyy-MM-dd HH:mm:ss"
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const dateTypeOptions = [
|
|
14
|
-
{
|
|
15
|
-
label: "日(date)",
|
|
16
|
-
value: "date"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "周(week)",
|
|
20
|
-
value: "week"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: "月(month)",
|
|
24
|
-
value: "month"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "年(year)",
|
|
28
|
-
value: "year"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "日期时间(datetime)",
|
|
32
|
-
value: "datetime"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
export const dateRangeTypeOptions = [
|
|
37
|
-
{
|
|
38
|
-
label: "日期范围(daterange)",
|
|
39
|
-
value: "daterange"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: "月范围(monthrange)",
|
|
43
|
-
value: "monthrange"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "日期时间范围(datetimerange)",
|
|
47
|
-
value: "datetimerange"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
export const colorFormatOptions = [
|
|
52
|
-
{
|
|
53
|
-
label: "hex",
|
|
54
|
-
value: "hex"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: "rgb",
|
|
58
|
-
value: "rgb"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "rgba",
|
|
62
|
-
value: "rgba"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "hsv",
|
|
66
|
-
value: "hsv"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: "hsl",
|
|
70
|
-
value: "hsl"
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
|
|
74
|
-
export const justifyOptions = [
|
|
75
|
-
{
|
|
76
|
-
label: "start",
|
|
77
|
-
value: "start"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: "end",
|
|
81
|
-
value: "end"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: "center",
|
|
85
|
-
value: "center"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
label: "space-around",
|
|
89
|
-
value: "space-around"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: "space-between",
|
|
93
|
-
value: "space-between"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
// 文件类型
|
|
97
|
-
export const fileTypeOptions = [
|
|
98
|
-
{ label: '图片文件', value: 'image/*' },
|
|
99
|
-
{ label: '视频文件', value: 'video/*' },
|
|
100
|
-
{ label: '音频文件', value: 'audio/*' },
|
|
101
|
-
{ label: '压缩文件', value: '.rar,.zip' },
|
|
102
|
-
{ label: 'excel', value: '.xls,.xlsx' },
|
|
103
|
-
{ label: 'word', value: '.doc,.docx' },
|
|
104
|
-
{ label: 'pdf', value: '.pdf' },
|
|
105
|
-
]
|
|
106
|
-
|
|
107
|
-
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { requestUrl } from "@/api/data";
|
|
2
|
-
import { deepClone, handleEvent, handleStyle, } from "./index"
|
|
3
|
-
import store from "@/store"
|
|
4
|
-
export const comMixin = {
|
|
5
|
-
props: {
|
|
6
|
-
styleObj: {
|
|
7
|
-
type: Object,
|
|
8
|
-
default: () => { }
|
|
9
|
-
},
|
|
10
|
-
// 父级字体样式
|
|
11
|
-
font: {
|
|
12
|
-
type: Object,
|
|
13
|
-
default: () => { }
|
|
14
|
-
},
|
|
15
|
-
// 用于保存接口相关数据
|
|
16
|
-
dataObj: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => { }
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return { resData: [], loading: false };
|
|
23
|
-
},
|
|
24
|
-
computed: {
|
|
25
|
-
dataType() {
|
|
26
|
-
return this.dataObj?.type;
|
|
27
|
-
},
|
|
28
|
-
dataValue() {
|
|
29
|
-
return this.dataObj?.value;
|
|
30
|
-
},
|
|
31
|
-
newStyle() {
|
|
32
|
-
return handleStyle(this.styleObj, this.font)
|
|
33
|
-
},
|
|
34
|
-
attrs() {
|
|
35
|
-
const attrs = deepClone(this.$attrs)
|
|
36
|
-
delete attrs.styleObj // 需要删除attrs中的样式属性,避免传给子级
|
|
37
|
-
return attrs
|
|
38
|
-
},
|
|
39
|
-
clearable() {
|
|
40
|
-
return this.$attrs.clearable && this.value && !this.$attrs.onlyShow && !this.$attrs.disabled && !this.$attrs.readonly
|
|
41
|
-
},
|
|
42
|
-
props() {
|
|
43
|
-
return this.dataObj?.props || {}
|
|
44
|
-
},
|
|
45
|
-
refresh() {
|
|
46
|
-
return store.state.app.refresh
|
|
47
|
-
},
|
|
48
|
-
activeId() {
|
|
49
|
-
return store.state.app.activeId
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
created() {
|
|
53
|
-
handleEvent('onCreated', "", this.$attrs, this)
|
|
54
|
-
},
|
|
55
|
-
mounted() {
|
|
56
|
-
handleEvent('onMounted', "", this.$attrs, this)
|
|
57
|
-
this.init()
|
|
58
|
-
},
|
|
59
|
-
watch: {
|
|
60
|
-
refresh() {
|
|
61
|
-
if (this.activeId == this.attrs?.__config__?.formId && this.$attrs.isEdit) {
|
|
62
|
-
this.init()
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
// 点击事件
|
|
68
|
-
onClick() {
|
|
69
|
-
handleEvent('onClick', "", this.$attrs, this)
|
|
70
|
-
},
|
|
71
|
-
// 在 Input 失去焦点时触发
|
|
72
|
-
onBlur(value) {
|
|
73
|
-
handleEvent('onBlur', value, this.$attrs, this)
|
|
74
|
-
},
|
|
75
|
-
// 在 Input 获得焦点时触发
|
|
76
|
-
onFocus(value) {
|
|
77
|
-
handleEvent('onFocus', value, this.$attrs, this)
|
|
78
|
-
},
|
|
79
|
-
// 在 Input 值改变时触发
|
|
80
|
-
onInput(value) {
|
|
81
|
-
this.$emit('input', value)
|
|
82
|
-
handleEvent('onInput', value, this.$attrs, this)
|
|
83
|
-
},
|
|
84
|
-
// 点击清空按钮时触发
|
|
85
|
-
onClear(value) {
|
|
86
|
-
handleEvent('onClear', value, this.$attrs, this)
|
|
87
|
-
},
|
|
88
|
-
// 绑定值或选中项变化时触发
|
|
89
|
-
onChange(value) {
|
|
90
|
-
handleEvent('onChange', value, this.$attrs, this)
|
|
91
|
-
},
|
|
92
|
-
// 点击确认按钮时触发
|
|
93
|
-
onConfirm(value) {
|
|
94
|
-
handleEvent('onConfirm', value, this.$attrs, this)
|
|
95
|
-
},
|
|
96
|
-
init() {
|
|
97
|
-
|
|
98
|
-
if (!this.dataType) return
|
|
99
|
-
this.resData = [];
|
|
100
|
-
this.loading = true;
|
|
101
|
-
if (this.dataType == "static") {
|
|
102
|
-
this.resData = this.dataObj.value;
|
|
103
|
-
this.handleSuccess(this.resData)
|
|
104
|
-
this.$nextTick(() => {
|
|
105
|
-
this.loading = false;
|
|
106
|
-
})
|
|
107
|
-
} else if (this.dataType == "dynamic") {
|
|
108
|
-
this.loadData();
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
loadData(data) {
|
|
112
|
-
// 请求参数
|
|
113
|
-
const requestData = deepClone({ ...this.dataObj.request, ...data })
|
|
114
|
-
this.loading = true;
|
|
115
|
-
requestUrl(this.dataObj.url, this.dataObj.method, requestData, this.dataObj.reDataType)
|
|
116
|
-
.then(
|
|
117
|
-
(res) => {
|
|
118
|
-
this.resData = res.result;
|
|
119
|
-
if (this.dataObj.response) {
|
|
120
|
-
const func = new Function("response", this.dataObj.response);
|
|
121
|
-
func(res.result)
|
|
122
|
-
// 加载成功
|
|
123
|
-
this.handleSuccess(res.result)
|
|
124
|
-
}
|
|
125
|
-
this.loading = false;
|
|
126
|
-
}
|
|
127
|
-
).catch((err) => {
|
|
128
|
-
// 加载失败
|
|
129
|
-
this.handleError(err)
|
|
130
|
-
if (this.dataObj.error) {
|
|
131
|
-
const func = new Function("error", this.dataObj.error);
|
|
132
|
-
func(err);
|
|
133
|
-
}
|
|
134
|
-
this.loading = false;
|
|
135
|
-
});
|
|
136
|
-
},
|
|
137
|
-
// 对数据进行处理
|
|
138
|
-
handleSuccess(res) { },
|
|
139
|
-
handleError(err) { },
|
|
140
|
-
// 刷新
|
|
141
|
-
handleRefresh() {
|
|
142
|
-
this.loading = true
|
|
143
|
-
this.$nextTick(() => {
|
|
144
|
-
this.loading = false
|
|
145
|
-
})
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
};
|