simple-frame-unit 1.0.2
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/.env.dev +14 -0
- package/CHANGELOG.md +9 -0
- package/README.md +24 -0
- package/dist/ed-frame-vue.common.1.js +11046 -0
- package/dist/ed-frame-vue.common.1.js.map +1 -0
- package/dist/ed-frame-vue.common.2.js +1715 -0
- package/dist/ed-frame-vue.common.2.js.map +1 -0
- package/dist/ed-frame-vue.common.js +53427 -0
- package/dist/ed-frame-vue.common.js.map +1 -0
- package/dist/ed-frame-vue.umd.1.js +11046 -0
- package/dist/ed-frame-vue.umd.1.js.map +1 -0
- package/dist/ed-frame-vue.umd.2.js +1715 -0
- package/dist/ed-frame-vue.umd.2.js.map +1 -0
- package/dist/ed-frame-vue.umd.js +53437 -0
- package/dist/ed-frame-vue.umd.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.1.js +17 -0
- package/dist/ed-frame-vue.umd.min.1.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.2.js +4 -0
- package/dist/ed-frame-vue.umd.min.2.js.map +1 -0
- package/dist/ed-frame-vue.umd.min.js +470 -0
- package/dist/ed-frame-vue.umd.min.js.map +1 -0
- package/import.easydata.js +46 -0
- package/lib/CHANGELOG.md +18 -0
- package/lib/README.md +27 -0
- package/lib/api/ds/index.js +124 -0
- package/lib/api/easyData.js +90 -0
- package/lib/api/easyform/easyForm.js +32 -0
- package/lib/api/index.js +61 -0
- package/lib/api/interface/index.js +32 -0
- package/lib/api/system.js +20 -0
- package/lib/index.js +80 -0
- package/lib/packages/BasicTemplate/EasyDataTemplate.vue +189 -0
- package/lib/packages/BasicTemplate/Props.js +64 -0
- package/lib/packages/BasicTemplate/components/TemplateComp.vue +263 -0
- package/lib/packages/BasicTemplate/components/TemplateViews.vue +292 -0
- package/lib/packages/BasicTemplate/hooks/business.js +74 -0
- package/lib/packages/BasicTemplate/hooks/getFormData.js +89 -0
- package/lib/packages/BasicTemplate/hooks/queryFormData.js +194 -0
- package/lib/packages/BasicTemplate/hooks/submitForm.js +53 -0
- package/lib/packages/BasicTemplate/hooks/useEmits.js +15 -0
- package/lib/packages/BasicTemplate/hooks/validate.js +42 -0
- package/lib/packages/EasyDataForm/EasyDataForm.vue +597 -0
- package/lib/packages/EasyDataForm/Props.js +22 -0
- package/lib/packages/EasyDataForm/components/FormItem.vue +228 -0
- package/lib/packages/EasyDataForm/hooks/useChosePopup.js +85 -0
- package/lib/packages/EasyDataForm/hooks/useEmits.js +19 -0
- package/lib/packages/EasyDataForm/hooks/useForm.js +169 -0
- package/lib/packages/EasyDataForm/hooks/useUpload.js +168 -0
- package/lib/packages/EasyDataList/EasyDataList.vue +348 -0
- package/lib/packages/EasyDataList/Props.js +116 -0
- package/lib/packages/EasyDataList/components/BasicModal.vue +150 -0
- package/lib/packages/EasyDataList/components/FormAction.vue +63 -0
- package/lib/packages/EasyDataList/hooks/useEmits.js +30 -0
- package/lib/packages/EasyDataList/hooks/useForm.js +62 -0
- package/lib/packages/EasyDataList/hooks/useTable.js +314 -0
- package/lib/packages/EasyDataTable/EasyDataTable.vue +233 -0
- package/lib/packages/EasyDataView/EasyDataView.vue +105 -0
- package/lib/packages/EdRichPreview/index.js +32 -0
- package/lib/packages/EdRichText/index.vue +167 -0
- package/lib/packages/EdRichText/replaceUrl.js +49 -0
- package/lib/packages/components/FileView.vue +97 -0
- package/lib/packages/index.js +11 -0
- package/lib/packages/mixins/EasyDataMixins.js +133 -0
- package/lib/packages/mixins/useTable.jsx +130 -0
- package/lib/pages/DataSource/index.js +8 -0
- package/lib/pages/DataSource/src/components/ControlViews/BaseProps.js +103 -0
- package/lib/pages/DataSource/src/components/ControlViews/control.js +1089 -0
- package/lib/pages/DataSource/src/components/ControlViews/index.vue +301 -0
- package/lib/pages/DataSource/src/components/TableOperationModal.vue +225 -0
- package/lib/pages/DataSource/src/components/TablePropsModal.vue +367 -0
- package/lib/pages/DataSource/src/components/ViewPropsModal.vue +737 -0
- package/lib/pages/DataSource/src/components/modal/ChooseDict.vue +119 -0
- package/lib/pages/DataSource/src/hooks/useTable.js +138 -0
- package/lib/pages/DataSource/src/index.vue +431 -0
- package/lib/pages/Interface/index.js +8 -0
- package/lib/pages/Interface/src/components/InterfaceCall.vue +73 -0
- package/lib/pages/Interface/src/components/InterfaceDepend.vue +299 -0
- package/lib/pages/Interface/src/components/InterfaceFee.vue +131 -0
- package/lib/pages/Interface/src/components/InterfaceMessage.vue +878 -0
- package/lib/pages/Interface/src/components/InterfaceMock.vue +203 -0
- package/lib/pages/Interface/src/components/InterfaceParam.vue +308 -0
- package/lib/pages/Interface/src/components/InterfaceRepeat.vue +281 -0
- package/lib/pages/Interface/src/components/InterfaceVariable.vue +31 -0
- package/lib/pages/Interface/src/index.vue +216 -0
- package/lib/pages/Template/index.js +8 -0
- package/lib/pages/Template/src/components/DefineModal.vue +524 -0
- package/lib/pages/Template/src/components/TemplatePreview.vue +109 -0
- package/lib/pages/Template/src/components/model/AddDialog.vue +60 -0
- package/lib/pages/Template/src/components/model/TemplatePreview2.vue +101 -0
- package/lib/pages/Template/src/hooks/index.js +3 -0
- package/lib/pages/Template/src/hooks/useEmits.js +64 -0
- package/lib/pages/Template/src/index.vue +124 -0
- package/lib/popup/index.js +8 -0
- package/lib/popup/src/DataSourceChoose.vue +44 -0
- package/lib/popup/src/DataSourceViewIdChoose.vue +67 -0
- package/lib/popup/src/DictChoose.vue +104 -0
- package/lib/popup/src/InterfaceChoose.vue +46 -0
- package/lib/popup/src/OrgChoose.vue +121 -0
- package/lib/popup/src/RoleChoose.vue +101 -0
- package/lib/popup/src/TemplateChoose.vue +43 -0
- package/lib/popup/src/UserChoose.vue +161 -0
- package/lib/popup//347/273/204/344/273/266/345/274/200/345/217/221/350/247/204/350/214/203.md +25 -0
- package/lib/style/custom.scss +126 -0
- package/lib/style/deep.scss +109 -0
- package/lib/style/index.scss +4 -0
- package/lib/utils/MapLoader.js +48 -0
- package/lib/utils/dateUtils.js +58 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/setting.js +25 -0
- package/lib/utils/sortable/index.js +3784 -0
- package/lib/utils/useBusiness.js +212 -0
- package/lib/utils/utils.js +588 -0
- package/package.json +77 -0
- package/src/App.vue +12 -0
- package/src/assets/Vue.png +0 -0
- package/src/assets/avatar.png +0 -0
- package/src/assets/images/bg.png +0 -0
- package/src/assets/images/logo-bills.png +0 -0
- package/src/assets/images/pic.png +0 -0
- package/src/assets/images/weplus-logo.png +0 -0
- package/src/assets/marker.png +0 -0
- package/src/assets/styles/common.scss +359 -0
- package/src/assets/styles/ele-docs.css +3278 -0
- package/src/assets/styles/fonts/icomoon.eot +0 -0
- package/src/assets/styles/fonts/icomoon.svg +14 -0
- package/src/assets/styles/fonts/icomoon.ttf +0 -0
- package/src/assets/styles/fonts/icomoon.woff +0 -0
- package/src/assets/styles/fonts/style.css +39 -0
- package/src/assets/styles/higtlightEle.css +84 -0
- package/src/assets/svg/code.svg +7 -0
- package/src/assets/svg/password.svg +1 -0
- package/src/components/Popups/DiyCompDictChoose.vue +112 -0
- package/src/components/Popups/index.js +28 -0
- package/src/components/ed-base-vue/global/variable.js +8 -0
- package/src/components/ed-base-vue/index.js +81 -0
- package/src/components/ed-base-vue/package/EdCard/index.js +7 -0
- package/src/components/ed-base-vue/package/EdCard/src/index.vue +87 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/AceConfig.js +71 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Editor.vue +137 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Toolbar.vue +68 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/index.vue +119 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/webpack-resolver.js +51 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/Toolbar.vue +57 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/config.js +64 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/index.vue +309 -0
- package/src/components/ed-base-vue/package/EdCodeEditor/src/EdCodeEditor.vue +238 -0
- package/src/components/ed-base-vue/package/EdDate/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDate/src/index.js +50 -0
- package/src/components/ed-base-vue/package/EdDescriptions/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptions.vue +46 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptionsItem.js +20 -0
- package/src/components/ed-base-vue/package/EdDescriptions/src/Props.js +20 -0
- package/src/components/ed-base-vue/package/EdDialog/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDialog/src/EdDialog.vue +138 -0
- package/src/components/ed-base-vue/package/EdDialog/src/Props.js +91 -0
- package/src/components/ed-base-vue/package/EdDialog/src/components/DialogFooter.vue +42 -0
- package/src/components/ed-base-vue/package/EdDialog/src/components/DialogWrapper.vue +53 -0
- package/src/components/ed-base-vue/package/EdDrawer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/DrawerFooter.vue +41 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/EdDrawer.vue +150 -0
- package/src/components/ed-base-vue/package/EdDrawer/src/props.js +71 -0
- package/src/components/ed-base-vue/package/EdFlow/index.js +8 -0
- package/src/components/ed-base-vue/package/EdFlow/src/EdFlowItem.vue +733 -0
- package/src/components/ed-base-vue/package/EdFlow/src/index.vue +148 -0
- package/src/components/ed-base-vue/package/EdForm/index.js +8 -0
- package/src/components/ed-base-vue/package/EdForm/src/EdForm.vue +172 -0
- package/src/components/ed-base-vue/package/EdForm/src/Props.js +33 -0
- package/src/components/ed-base-vue/package/EdForm/src/components/EdFormItem.vue +34 -0
- package/src/components/ed-base-vue/package/EdIcons/index.js +8 -0
- package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons.js +406 -0
- package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons1.js +830 -0
- package/src/components/ed-base-vue/package/EdIcons/src/index.vue +13 -0
- package/src/components/ed-base-vue/package/EdImage/index.js +8 -0
- package/src/components/ed-base-vue/package/EdImage/src/index.vue +28 -0
- package/src/components/ed-base-vue/package/EdInputArray/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputArray/src/Props.js +26 -0
- package/src/components/ed-base-vue/package/EdInputArray/src/index.vue +97 -0
- package/src/components/ed-base-vue/package/EdInputColor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputColor/src/InputColor.vue +81 -0
- package/src/components/ed-base-vue/package/EdInputMap/index.js +9 -0
- package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMap.vue +246 -0
- package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMapProps.js +6 -0
- package/src/components/ed-base-vue/package/EdInputPop/index.js +13 -0
- package/src/components/ed-base-vue/package/EdInputPop/src/EdInputPop.vue +144 -0
- package/src/components/ed-base-vue/package/EdInputPop/src/Props.js +48 -0
- package/src/components/ed-base-vue/package/EdInputTable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdInputTable/src/EdInputTable.vue +368 -0
- package/src/components/ed-base-vue/package/EdInputTable/src/Fetch.js +40 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/index.js +13 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/EdJsonEditor.vue +198 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/img/jsoneditor-icons.svg +749 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/jsoneditor.css +2031 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/plus.svg +1 -0
- package/src/components/ed-base-vue/package/EdJsonEditor/src/hooks.js +63 -0
- package/src/components/ed-base-vue/package/EdJsonViewer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdJsonViewer/src/EdJsonViewer.vue +44 -0
- package/src/components/ed-base-vue/package/EdLable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdLable/src/index.vue +34 -0
- package/src/components/ed-base-vue/package/EdLink/index.js +8 -0
- package/src/components/ed-base-vue/package/EdLink/src/index.vue +43 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/index.js +15 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/EdMarkEditor.vue +368 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/extra-function.js +538 -0
- package/src/components/ed-base-vue/package/EdMarkEditor/src/highlight.js +95 -0
- package/src/components/ed-base-vue/package/EdTable/index.js +8 -0
- package/src/components/ed-base-vue/package/EdTable/src/EdTable.vue +240 -0
- package/src/components/ed-base-vue/package/EdTable/src/Props.js +97 -0
- package/src/components/ed-base-vue/package/EdTable/src/components/TableColumnItem.js +24 -0
- package/src/components/ed-base-vue/package/EdTable/src/components/TablePagination.vue +73 -0
- package/src/components/ed-base-vue/package/EdTableEditor/index.js +8 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/EdTableEditor.vue +282 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/Props.js +107 -0
- package/src/components/ed-base-vue/package/EdTableEditor/src/hooks/validate.js +90 -0
- package/src/components/ed-base-vue/package/EdUpload/index.js +8 -0
- package/src/components/ed-base-vue/package/EdUpload/src/Props.js +90 -0
- package/src/components/ed-base-vue/package/EdUpload/src/index.vue +88 -0
- package/src/components/ed-base-vue/package/EdViewer/index.js +8 -0
- package/src/components/ed-base-vue/package/EdViewer/src/EdViewer.vue +310 -0
- package/src/components/ed-base-vue/package/EdWangEditor/index.js +14 -0
- package/src/components/ed-base-vue/package/EdWangEditor/src/EdWangEditor.vue +127 -0
- package/src/components/ed-base-vue/package/ExtendSlot.js +12 -0
- package/src/components/ed-base-vue/package/OptionSlot.js +65 -0
- package/src/components/ed-base-vue/plugin/Message/index.js +2 -0
- package/src/components/ed-base-vue/plugin/Message/src/main.js +91 -0
- package/src/components/ed-base-vue/plugin/Message/src/main.vue +253 -0
- package/src/components/ed-base-vue/plugin/print/index.js +156 -0
- package/src/components/ed-base-vue/plugin/sortable/index.js +3784 -0
- package/src/components/ed-base-vue/style/custom.scss +107 -0
- package/src/components/ed-base-vue/style/deep.scss +100 -0
- package/src/components/ed-base-vue/style/index.scss +4 -0
- package/src/components/ed-base-vue/tools/date-format.js +315 -0
- package/src/components/ed-base-vue/tools/utils.js +124 -0
- package/src/layouts/components/AppMain.vue +17 -0
- package/src/layouts/components/Header.vue +256 -0
- package/src/layouts/components/Logo.vue +56 -0
- package/src/layouts/components/Navbar.vue +169 -0
- package/src/layouts/components/SideBar.vue +107 -0
- package/src/layouts/components/index.js +5 -0
- package/src/layouts/index.vue +57 -0
- package/src/main.js +42 -0
- package/src/request/config.js +6 -0
- package/src/request/index.js +85 -0
- package/src/request/request.js +147 -0
- package/src/router/index.js +65 -0
- package/src/router/modules/baseRouter.js +43 -0
- package/src/router/modules/easydata.js +49 -0
- package/src/views/base/BaseRichPreview.vue +23 -0
- package/src/views/base/BaseRichText.vue +28 -0
- package/src/views/base/EdFormView.vue +54 -0
- package/src/views/base/EdTable.vue +98 -0
- package/src/views/base/inputTable.vue +103 -0
- package/src/views/easydata/Interface.vue +3 -0
- package/src/views/easydata/dataSource.vue +13 -0
- package/src/views/easydata/dataSourceView.vue +71 -0
- package/src/views/easydata/templateDemo.vue +89 -0
- package/src/views/easydata/templateInfo.vue +13 -0
- package/src/views/index.vue +17 -0
- package/src/views/login.vue +208 -0
- package/src/views/redirect.vue +15 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.ed-drag--cursor_move {
|
|
2
|
+
cursor: move;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.es-form--action {
|
|
6
|
+
width: 100%;
|
|
7
|
+
padding-bottom: 20px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.el-dropdown-link {
|
|
11
|
+
color: #409EFF;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.es-dialog--operate {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
align-items: center;
|
|
20
|
+
div:last-child{
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: flex-end;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding-right: 20px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.es-box-card {
|
|
29
|
+
.es-box-card--header {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
align-items: center;
|
|
33
|
+
|
|
34
|
+
div:last-child, .es-card-header-operate{
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: flex-end;
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.view-list-card.active {
|
|
42
|
+
background-color: rgb(225, 243, 216);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.es-box-card--top {
|
|
47
|
+
margin-top: 10px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
.es-row, .es-row--col{
|
|
52
|
+
height: 100%;
|
|
53
|
+
.es-box-card {
|
|
54
|
+
height: 100% ;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
// ed-upload-list__item
|
|
60
|
+
.ed-upload-list__item {
|
|
61
|
+
transition: all .5s cubic-bezier(.55, 0, .1, 1);
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
color: #606266;
|
|
64
|
+
line-height: 1.8;
|
|
65
|
+
margin-top: 5px;
|
|
66
|
+
position: relative;
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
width: 100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 0 5px;
|
|
73
|
+
|
|
74
|
+
&:hover {
|
|
75
|
+
background-color: #f5f7fa;
|
|
76
|
+
|
|
77
|
+
.el-icon-circle-close {
|
|
78
|
+
opacity: 1
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ed-upload-list__item-name {
|
|
83
|
+
color: #606266;
|
|
84
|
+
display: block;
|
|
85
|
+
margin-right: 40px;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
padding-left: 4px;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
transition: color .3s;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
width: 100%;
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
color: #409eff;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ed-upload-list__item-extra {
|
|
100
|
+
margin-right: 5px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.el-icon-circle-close {
|
|
104
|
+
color: #606266;
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vue样式穿透 ::v-deep
|
|
3
|
+
* 修改element样式
|
|
4
|
+
*/
|
|
5
|
+
::v-deep {
|
|
6
|
+
|
|
7
|
+
// el-card 默认样式修改
|
|
8
|
+
.el-card {
|
|
9
|
+
.el-card__header {
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
padding: 10px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.el-card.is-never-shadow {
|
|
16
|
+
.el-card__header {
|
|
17
|
+
opacity: 0.5;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// el-drawer 默认样式修改
|
|
22
|
+
.ed-drawer {
|
|
23
|
+
.el-drawer__header {
|
|
24
|
+
position: relative;
|
|
25
|
+
padding: 16px 24px;
|
|
26
|
+
border-bottom: 1px solid #e8e8e8;
|
|
27
|
+
border-radius: 4px 4px 0 0;
|
|
28
|
+
color: rgba(0, 0, 0, .85);
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
font-size: 18px;
|
|
31
|
+
margin-bottom: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.el-drawer__body {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
padding: 0;
|
|
39
|
+
|
|
40
|
+
.ed-drawer__content {
|
|
41
|
+
padding: 15px;
|
|
42
|
+
flex: 1;
|
|
43
|
+
overflow: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ed-drawer__footer {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
align-items: center;
|
|
50
|
+
border-top: 1px solid #e8e8e8;
|
|
51
|
+
padding: 0 16px;
|
|
52
|
+
background: #fff;
|
|
53
|
+
border-radius: 0 0 2px 2px;
|
|
54
|
+
width: 100%;
|
|
55
|
+
|
|
56
|
+
.el-button {
|
|
57
|
+
width: 100px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.el-button:last-child {
|
|
61
|
+
margin-left: 30px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ed-dialog {
|
|
68
|
+
.el-dialog__header {
|
|
69
|
+
position: relative;
|
|
70
|
+
padding: 16px 24px;
|
|
71
|
+
border-bottom: 1px solid #e8e8e8;
|
|
72
|
+
border-radius: 4px 4px 0 0;
|
|
73
|
+
color: rgba(0, 0, 0, .85);
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
font-size: 18px;
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.el-dialog__body {
|
|
80
|
+
flex: 1;
|
|
81
|
+
padding: 0
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.el-dialog__footer {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: flex-end;
|
|
87
|
+
align-items: center;
|
|
88
|
+
border-top: 1px solid #e8e8e8;
|
|
89
|
+
padding: 0;
|
|
90
|
+
background: #fff;
|
|
91
|
+
border-radius: 0 0 2px 2px;
|
|
92
|
+
width: 100%;
|
|
93
|
+
|
|
94
|
+
.el-button {
|
|
95
|
+
width: 100px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
// yyyy-MM-dd hh:mm:ss.SSS 所有支持的类型
|
|
2
|
+
function pad(str, length = 2) {
|
|
3
|
+
str += ''
|
|
4
|
+
while (str.length < length) {
|
|
5
|
+
str = '0' + str
|
|
6
|
+
}
|
|
7
|
+
return str.slice(-length)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const parser = {
|
|
11
|
+
yyyy: (dateObj) => {
|
|
12
|
+
return pad(dateObj.year, 4)
|
|
13
|
+
},
|
|
14
|
+
yy: (dateObj) => {
|
|
15
|
+
return pad(dateObj.year)
|
|
16
|
+
},
|
|
17
|
+
MM: (dateObj) => {
|
|
18
|
+
return pad(dateObj.month)
|
|
19
|
+
},
|
|
20
|
+
M: (dateObj) => {
|
|
21
|
+
return dateObj.month
|
|
22
|
+
},
|
|
23
|
+
dd: (dateObj) => {
|
|
24
|
+
return pad(dateObj.day)
|
|
25
|
+
},
|
|
26
|
+
d: (dateObj) => {
|
|
27
|
+
return dateObj.day
|
|
28
|
+
},
|
|
29
|
+
hh: (dateObj) => {
|
|
30
|
+
return pad(dateObj.hour)
|
|
31
|
+
},
|
|
32
|
+
h: (dateObj) => {
|
|
33
|
+
return dateObj.hour
|
|
34
|
+
},
|
|
35
|
+
mm: (dateObj) => {
|
|
36
|
+
return pad(dateObj.minute)
|
|
37
|
+
},
|
|
38
|
+
m: (dateObj) => {
|
|
39
|
+
return dateObj.minute
|
|
40
|
+
},
|
|
41
|
+
ss: (dateObj) => {
|
|
42
|
+
return pad(dateObj.second)
|
|
43
|
+
},
|
|
44
|
+
s: (dateObj) => {
|
|
45
|
+
return dateObj.second
|
|
46
|
+
},
|
|
47
|
+
SSS: (dateObj) => {
|
|
48
|
+
return pad(dateObj.millisecond, 3)
|
|
49
|
+
},
|
|
50
|
+
S: (dateObj) => {
|
|
51
|
+
return dateObj.millisecond
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 这都n年了iOS依然不认识2020-12-12,需要转换为2020/12/12
|
|
56
|
+
export function getDate(time) {
|
|
57
|
+
if (time instanceof Date) {
|
|
58
|
+
return time
|
|
59
|
+
}
|
|
60
|
+
switch (typeof time) {
|
|
61
|
+
case 'string': {
|
|
62
|
+
// 2020-12-12T12:12:12.000Z、2020-12-12T12:12:12.000
|
|
63
|
+
if (time.indexOf('T') > -1) {
|
|
64
|
+
return new Date(time)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ios时间格式转换
|
|
68
|
+
if (time.includes('-')) {
|
|
69
|
+
return new Date(time.replace(/-/g, '/'))
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// yyyyMMdd
|
|
73
|
+
if (isNumeric(time) && isDate(time)) {
|
|
74
|
+
return parse(time)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 时间戳
|
|
78
|
+
if (isNumeric(time) && /^\d{10}$|^\d{13}$/.test(time)) {
|
|
79
|
+
let t = time.length === 10 ? time * 1000 : Number(time)
|
|
80
|
+
return new Date(t)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
default:
|
|
84
|
+
return new Date(time)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function formatDate(date, format = 'yyyy/MM/dd hh:mm:ss') {
|
|
89
|
+
if (!date && date !== 0) {
|
|
90
|
+
return ''
|
|
91
|
+
}
|
|
92
|
+
date = getDate(date)
|
|
93
|
+
const dateObj = {
|
|
94
|
+
year: date.getFullYear(),
|
|
95
|
+
month: date.getMonth() + 1,
|
|
96
|
+
day: date.getDate(),
|
|
97
|
+
hour: date.getHours(),
|
|
98
|
+
minute: date.getMinutes(),
|
|
99
|
+
second: date.getSeconds(),
|
|
100
|
+
millisecond: date.getMilliseconds()
|
|
101
|
+
}
|
|
102
|
+
const tokenRegExp = /yyyy|yy|MM|M|dd|d|hh|h|mm|m|ss|s|SSS|SS|S/
|
|
103
|
+
let flag = true
|
|
104
|
+
let result = format
|
|
105
|
+
while (flag) {
|
|
106
|
+
flag = false
|
|
107
|
+
result = result.replace(tokenRegExp, function (matched) {
|
|
108
|
+
flag = true
|
|
109
|
+
return parser[matched](dateObj)
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
return result
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function friendlyDate(time, {locale = 'zh', threshold = [60000, 3600000], format = 'yyyy/MM/dd hh:mm:ss'}) {
|
|
116
|
+
if (!time && time !== 0) {
|
|
117
|
+
return ''
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (time === '-') {
|
|
121
|
+
time = new Date().getTime()
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const localeText = {
|
|
125
|
+
zh: {
|
|
126
|
+
year: '年',
|
|
127
|
+
month: '月',
|
|
128
|
+
day: '天',
|
|
129
|
+
hour: '小时',
|
|
130
|
+
minute: '分钟',
|
|
131
|
+
second: '秒',
|
|
132
|
+
ago: '前',
|
|
133
|
+
later: '后',
|
|
134
|
+
justNow: '刚刚',
|
|
135
|
+
soon: '马上',
|
|
136
|
+
template: '{num}{unit}{suffix}'
|
|
137
|
+
},
|
|
138
|
+
en: {
|
|
139
|
+
year: 'year',
|
|
140
|
+
month: 'month',
|
|
141
|
+
day: 'day',
|
|
142
|
+
hour: 'hour',
|
|
143
|
+
minute: 'minute',
|
|
144
|
+
second: 'second',
|
|
145
|
+
ago: 'ago',
|
|
146
|
+
later: 'later',
|
|
147
|
+
justNow: 'just now',
|
|
148
|
+
soon: 'soon',
|
|
149
|
+
template: '{num} {unit} {suffix}'
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const text = localeText[locale] || localeText.zh
|
|
153
|
+
let date = getDate(time)
|
|
154
|
+
let ms = date.getTime() - Date.now()
|
|
155
|
+
let absMs = Math.abs(ms)
|
|
156
|
+
if (absMs < threshold[0]) {
|
|
157
|
+
return ms < 0 ? text.justNow : text.soon
|
|
158
|
+
}
|
|
159
|
+
if (absMs >= threshold[1]) {
|
|
160
|
+
return formatDate(date, format)
|
|
161
|
+
}
|
|
162
|
+
let num
|
|
163
|
+
let unit
|
|
164
|
+
let suffix = text.later
|
|
165
|
+
if (ms < 0) {
|
|
166
|
+
suffix = text.ago
|
|
167
|
+
ms = -ms
|
|
168
|
+
}
|
|
169
|
+
const seconds = Math.floor((ms) / 1000)
|
|
170
|
+
const minutes = Math.floor(seconds / 60)
|
|
171
|
+
const hours = Math.floor(minutes / 60)
|
|
172
|
+
const days = Math.floor(hours / 24)
|
|
173
|
+
const months = Math.floor(days / 30)
|
|
174
|
+
const years = Math.floor(months / 12)
|
|
175
|
+
switch (true) {
|
|
176
|
+
case years > 0:
|
|
177
|
+
num = years
|
|
178
|
+
unit = text.year
|
|
179
|
+
break
|
|
180
|
+
case months > 0:
|
|
181
|
+
num = months
|
|
182
|
+
unit = text.month
|
|
183
|
+
break
|
|
184
|
+
case days > 0:
|
|
185
|
+
num = days
|
|
186
|
+
unit = text.day
|
|
187
|
+
break
|
|
188
|
+
case hours > 0:
|
|
189
|
+
num = hours
|
|
190
|
+
unit = text.hour
|
|
191
|
+
break
|
|
192
|
+
case minutes > 0:
|
|
193
|
+
num = minutes
|
|
194
|
+
unit = text.minute
|
|
195
|
+
break
|
|
196
|
+
default:
|
|
197
|
+
num = seconds
|
|
198
|
+
unit = text.second
|
|
199
|
+
break
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (locale === 'en') {
|
|
203
|
+
if (num === 1) {
|
|
204
|
+
num = 'a'
|
|
205
|
+
} else {
|
|
206
|
+
unit += 's'
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return text.template.replace(/{\s*num\s*}/g, num + '').replace(/{\s*unit\s*}/g, unit).replace(/{\s*suffix\s*}/g,
|
|
211
|
+
suffix)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function getNowDate() {
|
|
215
|
+
let date = new Date()
|
|
216
|
+
let y = date.getFullYear()
|
|
217
|
+
let m = date.getMonth() + 1
|
|
218
|
+
let d = date.getDate()
|
|
219
|
+
m = m < 10 ? "0" + m : m
|
|
220
|
+
d = d < 10 ? "0" + d : d
|
|
221
|
+
return y + "" + m + "" + d
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function getFullYear(time) {
|
|
225
|
+
return getDate(time).getFullYear()
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function getMonth(time) {
|
|
229
|
+
return getDate(time).getMonth() + 1
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
export function getDay(time) {
|
|
234
|
+
return getDate(time).getDate()
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// 获取yyymmdd或者yyymm时间
|
|
238
|
+
export function parse(str) {
|
|
239
|
+
var y = str.substr(0, 4),
|
|
240
|
+
m = str.substr(4, 2) - 1,
|
|
241
|
+
d = str.substr(6, 2) ? str.substr(6, 2) : 1;
|
|
242
|
+
var D = new Date(y, m, d);
|
|
243
|
+
return (D.getFullYear() == y && D.getMonth() == m && D.getDate() == d) ? D : 'invalid date';
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// 判断字符串是否为6or8
|
|
247
|
+
export function isDate(sDate) {
|
|
248
|
+
if (!/^\d{6}$|^\d{8}$/.test(sDate)) {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
var year, month, day;
|
|
252
|
+
year = sDate.substring(0, 4);
|
|
253
|
+
month = sDate.substring(4, 6);
|
|
254
|
+
day = sDate.substring(6, 8);
|
|
255
|
+
var iaMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
256
|
+
if (year < 1700 || year > 2500) return false
|
|
257
|
+
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) iaMonthDays[1] = 29;
|
|
258
|
+
if (month < 1 || month > 12) return false
|
|
259
|
+
if (/^\d{8}$/.test(sDate) && (day < 1 || day > iaMonthDays[month - 1])) return false
|
|
260
|
+
return true
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// 判断字符串是否为数字
|
|
264
|
+
function isNumeric(str) {
|
|
265
|
+
return /^\d+$/.test(str);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
*
|
|
270
|
+
* @param {Date or String} date1 日期1
|
|
271
|
+
* @param {Date or String} date2 日期2
|
|
272
|
+
* @returns number
|
|
273
|
+
*/
|
|
274
|
+
export function monthNumber(date1, date2) {
|
|
275
|
+
const dateOne = getDate(date1);
|
|
276
|
+
const dateTwo = getDate(date2);
|
|
277
|
+
// 第一个日期的年和月
|
|
278
|
+
const yearOne = dateOne.getFullYear();
|
|
279
|
+
const monthOne = dateOne.getMonth() + 1;
|
|
280
|
+
// 第二个日期的年和月
|
|
281
|
+
const yearTwo = dateTwo.getFullYear();
|
|
282
|
+
const monthTwo = dateTwo.getMonth() + 1;
|
|
283
|
+
// 两个日期的月份数
|
|
284
|
+
const oneMonthNum = yearOne * 12 + monthOne;
|
|
285
|
+
const twoMonthNum = yearTwo * 12 + monthTwo;
|
|
286
|
+
return (yearTwo - yearOne) * 12 + (monthTwo - monthOne) + (yearTwo - yearOne + 1)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* 获取下一个月
|
|
292
|
+
*
|
|
293
|
+
* @date 格式为yyyy-mm-dd的日期,如:2014-01-25
|
|
294
|
+
*/
|
|
295
|
+
export function getNextMonth(date) {
|
|
296
|
+
const year = getDate(date).getFullYear(); //获取当前日期的年份
|
|
297
|
+
const month = getDate(date).getMonth() + 1; //获取当前日期的月份
|
|
298
|
+
const day = getDate(date).getDate(); //获取当前日期的日
|
|
299
|
+
let year2 = year;
|
|
300
|
+
let month2 = month + 1;
|
|
301
|
+
if (month2 === 13) {
|
|
302
|
+
year2 = year2 + 1;
|
|
303
|
+
month2 = 1;
|
|
304
|
+
}
|
|
305
|
+
let day2 = day;
|
|
306
|
+
let days2 = new Date(year2, month2, 0);
|
|
307
|
+
days2 = days2.getDate();
|
|
308
|
+
if (day2 > days2) {
|
|
309
|
+
day2 = days2;
|
|
310
|
+
}
|
|
311
|
+
if (month2 < 10) {
|
|
312
|
+
month2 = '0' + month2;
|
|
313
|
+
}
|
|
314
|
+
return getDate(year2 + '-' + month2 + '-' + day2);
|
|
315
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取变量数据类型,包括ES6 新类型Symbol
|
|
3
|
+
* @param n
|
|
4
|
+
* @returns {string}
|
|
5
|
+
*/
|
|
6
|
+
import {typeList} from "../global/variable";
|
|
7
|
+
|
|
8
|
+
export function getVarType(n) {
|
|
9
|
+
const typeStr = Object.prototype.toString.call(n);
|
|
10
|
+
let typeName = '';
|
|
11
|
+
switch (typeStr) {
|
|
12
|
+
case '[object String]':
|
|
13
|
+
typeName = 'string';
|
|
14
|
+
break;
|
|
15
|
+
case '[object Number]':
|
|
16
|
+
typeName = 'number';
|
|
17
|
+
break;
|
|
18
|
+
case '[object Boolean]':
|
|
19
|
+
typeName = 'boolean';
|
|
20
|
+
break;
|
|
21
|
+
case '[object Undefined]':
|
|
22
|
+
typeName = 'undefined';
|
|
23
|
+
break;
|
|
24
|
+
|
|
25
|
+
case '[object Object]':
|
|
26
|
+
typeName = 'object';
|
|
27
|
+
break;
|
|
28
|
+
case '[object Array]':
|
|
29
|
+
typeName = 'array';
|
|
30
|
+
break;
|
|
31
|
+
case '[object Null]':
|
|
32
|
+
typeName = 'null';
|
|
33
|
+
break;
|
|
34
|
+
case '[object RegExp]':
|
|
35
|
+
typeName = 'RegExp';
|
|
36
|
+
break;
|
|
37
|
+
|
|
38
|
+
case '[object Symbol]':
|
|
39
|
+
typeName = 'symbol';
|
|
40
|
+
break;
|
|
41
|
+
case '[object JSON]':
|
|
42
|
+
typeName = 'json';
|
|
43
|
+
break;
|
|
44
|
+
case '[object Math]':
|
|
45
|
+
typeName = 'math';
|
|
46
|
+
break;
|
|
47
|
+
|
|
48
|
+
default:
|
|
49
|
+
typeName = 'object';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return typeName;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @name isMediaType
|
|
57
|
+
* @param url
|
|
58
|
+
* @param type
|
|
59
|
+
* @return {string}
|
|
60
|
+
* @desc 根据文件类型返回dom元素
|
|
61
|
+
*/
|
|
62
|
+
export const isMediaType = (url, type) => {
|
|
63
|
+
if (validateNull(url)) return
|
|
64
|
+
if (typeList.audio.test(url) || type === 'audio') {
|
|
65
|
+
return 'audio'
|
|
66
|
+
} else if (typeList.video.test(url) || type === 'video') {
|
|
67
|
+
return 'video'
|
|
68
|
+
} else if (typeList.img.test(url) || type === 'img') {
|
|
69
|
+
return 'img'
|
|
70
|
+
} else if (typeList.iframe.test(url) || typeList.words.test(type)) {
|
|
71
|
+
return 'iframe'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 判断是否为空
|
|
77
|
+
*/
|
|
78
|
+
export function validateNull(val) {
|
|
79
|
+
if (val instanceof Date || typeof val === 'boolean' || typeof val === 'number') return false;
|
|
80
|
+
if (val instanceof Array) {
|
|
81
|
+
if (val.length === 0) return true;
|
|
82
|
+
} else if (val instanceof Object) {
|
|
83
|
+
for (var o in val) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
} else {
|
|
88
|
+
return val === 'null' ||
|
|
89
|
+
val == null ||
|
|
90
|
+
val === 'undefined' ||
|
|
91
|
+
val === undefined ||
|
|
92
|
+
val === '';
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 设置px像素
|
|
100
|
+
*/
|
|
101
|
+
export const setPx = (val, defval = '') => {
|
|
102
|
+
if (validateNull(val)) val = defval;
|
|
103
|
+
if (validateNull(val)) return '';
|
|
104
|
+
val = val + '';
|
|
105
|
+
if (val.indexOf('%') === -1) {
|
|
106
|
+
val = val + 'px';
|
|
107
|
+
}
|
|
108
|
+
return val;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 判断元素是否是 VNode对象
|
|
113
|
+
* @param _this
|
|
114
|
+
* @param node
|
|
115
|
+
* @return {boolean}
|
|
116
|
+
*/
|
|
117
|
+
export function isVNode(_this, node) {
|
|
118
|
+
// 获取 vnode 实例
|
|
119
|
+
const vnode = _this.$createElement('span', '')
|
|
120
|
+
// VNode 构造函数
|
|
121
|
+
const VNode = vnode.constructor;
|
|
122
|
+
// 所以通过 obj instanceof VNode 即可判断
|
|
123
|
+
return node instanceof VNode
|
|
124
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<transition mode="out-in" name="fade-transform">
|
|
3
|
+
<!-- <keep-alive>-->
|
|
4
|
+
<router-view/>
|
|
5
|
+
<!-- </keep-alive>-->
|
|
6
|
+
</transition>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: "AppMain"
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
|
|
17
|
+
</style>
|