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,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-image :previewSrcList="previewList" v-bind="$props"></el-image>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: "EdImage",
|
|
8
|
+
props: {
|
|
9
|
+
src: String,
|
|
10
|
+
fit: String,
|
|
11
|
+
alt: String,
|
|
12
|
+
preview: {type: Boolean, default: false},
|
|
13
|
+
referrerPolicy: String,
|
|
14
|
+
lazy: Boolean,
|
|
15
|
+
scrollContainer: {},
|
|
16
|
+
previewSrcList: {type: Array, default: () => []},
|
|
17
|
+
zIndex: {type: Number, default: 2000},
|
|
18
|
+
initialIndex: Number
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
previewList() {
|
|
22
|
+
if (this.preview && this.previewSrcList.length === 0) {
|
|
23
|
+
return [this.src]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
// medium / small / mini
|
|
3
|
+
size: {type: String, default: 'small'},
|
|
4
|
+
|
|
5
|
+
// 是否禁用
|
|
6
|
+
disabled: {type: Boolean, default: false},
|
|
7
|
+
|
|
8
|
+
// 值
|
|
9
|
+
value: {type: Array, default: () => []},
|
|
10
|
+
|
|
11
|
+
// 输入类型 img / link / text
|
|
12
|
+
type: {type: String, default: "text"},
|
|
13
|
+
|
|
14
|
+
// 描述
|
|
15
|
+
placeholder: {type: String, default: ""},
|
|
16
|
+
target: {type: String, default: ""},
|
|
17
|
+
|
|
18
|
+
// 最大数量限制
|
|
19
|
+
limit: {type: [String, Number]},
|
|
20
|
+
|
|
21
|
+
// 是否单个输入框
|
|
22
|
+
alone: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ed-input--array">
|
|
3
|
+
<!-- 初始添加 -->
|
|
4
|
+
<el-button v-if="validateNull(value)" :disabled="disabled" :size="size" circle icon="el-icon-plus" type="primary"
|
|
5
|
+
@click="add"></el-button>
|
|
6
|
+
|
|
7
|
+
<!-- 内容层 -->
|
|
8
|
+
<div v-for="(item,index) in value" :key="index" class="array-item">
|
|
9
|
+
<div class="array-item-input">
|
|
10
|
+
<el-tooltip :disabled="(!isImg && !isLink) || validateNull(item)" placement="bottom">
|
|
11
|
+
<div slot="content">
|
|
12
|
+
<component :is="isMediaType(item)" v-if="isImg" :src="item" controls="controls" style="width: 200px"
|
|
13
|
+
@click="openImg(index)"></component>
|
|
14
|
+
|
|
15
|
+
<el-link v-else-if="isLink" :href="item" :target="target" type="primary">{{ item }}</el-link>
|
|
16
|
+
</div>
|
|
17
|
+
<el-input v-model="value[index]" :disabled="disabled" :placeholder="placeholder" :size="size"
|
|
18
|
+
@blur="emitValue"></el-input>
|
|
19
|
+
</el-tooltip>
|
|
20
|
+
|
|
21
|
+
<!-- 新增/删除 -->
|
|
22
|
+
<template v-if="!(disabled || alone)">
|
|
23
|
+
<el-button v-if="!isLimit" :disabled="disabled" :size="size" circle icon="el-icon-plus" type="primary"
|
|
24
|
+
@click="add(index)"></el-button>
|
|
25
|
+
<el-button :disabled="disabled" :size="size" circle icon="el-icon-minus" type="danger"
|
|
26
|
+
@click="remove(index)"></el-button>
|
|
27
|
+
</template>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import {isMediaType, validateNull} from "../../../tools/utils";
|
|
36
|
+
import Props from "./Props"
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: "EdInputArray",
|
|
40
|
+
props: Props,
|
|
41
|
+
computed: {
|
|
42
|
+
isLimit() {
|
|
43
|
+
if (validateNull(this.limit)) return false
|
|
44
|
+
else if (this.textLen >= this.limit) return true
|
|
45
|
+
return false
|
|
46
|
+
},
|
|
47
|
+
textLen() {
|
|
48
|
+
return this.value.length
|
|
49
|
+
},
|
|
50
|
+
isImg() {
|
|
51
|
+
return this.type === 'img'
|
|
52
|
+
},
|
|
53
|
+
isLink() {
|
|
54
|
+
return this.type === 'link'
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
isMediaType,
|
|
59
|
+
validateNull,
|
|
60
|
+
// 新增
|
|
61
|
+
add(index) {
|
|
62
|
+
this.value.splice(index + 1, 0, '');
|
|
63
|
+
},
|
|
64
|
+
// 删除
|
|
65
|
+
remove(index) {
|
|
66
|
+
this.value.splice(index, 1)
|
|
67
|
+
},
|
|
68
|
+
// 打开
|
|
69
|
+
openImg() {
|
|
70
|
+
},
|
|
71
|
+
emitValue() {
|
|
72
|
+
// this.$emit('input', value)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style lang="scss" scoped>
|
|
79
|
+
.ed-input--array {
|
|
80
|
+
|
|
81
|
+
.array-item {
|
|
82
|
+
margin-bottom: 5px;
|
|
83
|
+
|
|
84
|
+
.array-item-input {
|
|
85
|
+
display: flex;
|
|
86
|
+
|
|
87
|
+
.el-input {
|
|
88
|
+
flex: auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.el-button {
|
|
92
|
+
margin-left: 5px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="customClass" class="ed-input-color">
|
|
3
|
+
<el-input v-model="colorValue" :clearable="clearable" :disabled="disabled"
|
|
4
|
+
:placeholder="placeholder" :prefix-icon="prefixIcon" :readonly="readonly" :size="size"
|
|
5
|
+
:suffix-icon="suffixIcon">
|
|
6
|
+
<template slot="append">
|
|
7
|
+
<el-color-picker v-model="colorValue"
|
|
8
|
+
:color-format="colorFormat"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
:popper-class="popperClass"
|
|
11
|
+
:predefine="predefine"
|
|
12
|
+
:show-alpha="showAlpha"
|
|
13
|
+
:size="size"
|
|
14
|
+
@activeChange="activeChange"
|
|
15
|
+
@change="handleChange"></el-color-picker>
|
|
16
|
+
</template>
|
|
17
|
+
</el-input>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: "EdInputColor",
|
|
24
|
+
props: {
|
|
25
|
+
// 值
|
|
26
|
+
value: {type: String},
|
|
27
|
+
// 自定义class 类名
|
|
28
|
+
customClass: {type: String},
|
|
29
|
+
// 输入框头部图标
|
|
30
|
+
prefixIcon: {type: String},
|
|
31
|
+
// 输入框尾部图标
|
|
32
|
+
suffixIcon: {type: String},
|
|
33
|
+
// 输入框占位文本
|
|
34
|
+
placeholder: {type: String},
|
|
35
|
+
// 是否禁用
|
|
36
|
+
disabled: {type: Boolean, default: false},
|
|
37
|
+
// 输入框尺寸
|
|
38
|
+
size: {type: String, default: 'small'},
|
|
39
|
+
// 原生属性,是否只读
|
|
40
|
+
readonly: {type: Boolean, default: false},
|
|
41
|
+
// 是否可清空
|
|
42
|
+
clearable: {type: Boolean, default: false},
|
|
43
|
+
// ColorPicker 下拉框的类名
|
|
44
|
+
popperClass: {type: String},
|
|
45
|
+
// 预定义颜色
|
|
46
|
+
predefine: {type: Array},
|
|
47
|
+
// 写入 v-model 的颜色的格式 hsl / hsv / hex / rgb
|
|
48
|
+
colorFormat: {type: String, default: 'hex'},
|
|
49
|
+
// 是否支持透明度选择
|
|
50
|
+
showAlpha: {type: Boolean, default: false},
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
colorValue: this.value
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
handleChange(e) {
|
|
59
|
+
this.$emit("input", e)
|
|
60
|
+
this.$emit("change", e)
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
activeChange(e) {
|
|
64
|
+
this.$emit("activeChange", e)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
@import "../../../style/index";
|
|
72
|
+
|
|
73
|
+
.ed-input-color {
|
|
74
|
+
::v-deep {
|
|
75
|
+
.el-color-picker {
|
|
76
|
+
display: block;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-input v-model="value" placeholder="请选择坐标" readonly @focus="handlerFocus"/>
|
|
4
|
+
|
|
5
|
+
<!-- 地图弹窗 -->
|
|
6
|
+
<ed-dialog ref="elsDialog" :close-on-click-modal="false" :closeOnPressEscape="false" :title="title"
|
|
7
|
+
:visible="visible"
|
|
8
|
+
width="65vw" @close="handlerClose" @ok="handlerOk">
|
|
9
|
+
<!-- 查询表单 -->
|
|
10
|
+
<ed-form ref="elsForm" :inline="true" v-model="formData" :form-desc="formDesc">
|
|
11
|
+
<template v-slot:form-btn>
|
|
12
|
+
<el-button icon="el-icon-search" type="primary" @click="handlerSearch">搜索</el-button>
|
|
13
|
+
<el-button icon="el-icon-delete" @click="handlerClear">清空</el-button>
|
|
14
|
+
</template>
|
|
15
|
+
</ed-form>
|
|
16
|
+
|
|
17
|
+
<!-- 地图渲染 -->
|
|
18
|
+
<div class="gao-de-map">
|
|
19
|
+
<div id="gao-de-map"></div>
|
|
20
|
+
<div v-show="showPlaceSearch" id="map__result"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</ed-dialog>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import AMapLoader from "@amap/amap-jsapi-loader";
|
|
28
|
+
|
|
29
|
+
window._AMapSecurityConfig = {
|
|
30
|
+
securityJsCode: '0be9b3d556aa10ca3b722f97ce0b96c6' // 输入你的jscode
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 地图组件
|
|
34
|
+
*
|
|
35
|
+
* - 示例
|
|
36
|
+
*
|
|
37
|
+
* ```vue
|
|
38
|
+
* <ed-input-map v-model="elsFormData" :options="elsFormOptions">
|
|
39
|
+
* </ed-input-map>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* [](./EdInputMap.md ':include')
|
|
43
|
+
*/
|
|
44
|
+
export default {
|
|
45
|
+
name: "EdInputMap",
|
|
46
|
+
props: {
|
|
47
|
+
//默认值
|
|
48
|
+
value: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
//标题
|
|
53
|
+
title: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "坐标选择器"
|
|
56
|
+
},
|
|
57
|
+
//选项
|
|
58
|
+
options: {
|
|
59
|
+
type: Object
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
visible: false,
|
|
66
|
+
map: null, // 地图
|
|
67
|
+
placeSearch: null, // //构造地点查询类
|
|
68
|
+
showPlaceSearch: false, // 是否显示搜索结果
|
|
69
|
+
auto: null, // 搜索框自动完成类
|
|
70
|
+
startIcon: null, // 自定义标记图标属性
|
|
71
|
+
formDesc: [{
|
|
72
|
+
label: '地址',
|
|
73
|
+
prop: "address",
|
|
74
|
+
children: {tags: "el-input", attrs: {id: "mapInput", placeholder: `输入关键字选取地点`}}
|
|
75
|
+
}],
|
|
76
|
+
formData: {},
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
watch: {
|
|
80
|
+
options: {
|
|
81
|
+
handler(nVal, oVal) {
|
|
82
|
+
if (nVal) {
|
|
83
|
+
if (nVal.jsCode) {
|
|
84
|
+
// 该写法只推荐在开发阶段,如果在生产阶段建议采用反向代理
|
|
85
|
+
// 官网说明https://lbs.amap.com/api/javascript-api/guide/abc/prepare
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
deep: true,
|
|
91
|
+
immediate: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
/**
|
|
96
|
+
* @description 初始化地图
|
|
97
|
+
*/
|
|
98
|
+
initMap() {
|
|
99
|
+
console.log('initMap')
|
|
100
|
+
AMapLoader.load({
|
|
101
|
+
"key": this.options.key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
102
|
+
"version": "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
103
|
+
"plugins": ["AMap.AutoComplete", "AMap.PlaceSearch", "AMap.Geocoder"], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
104
|
+
|
|
105
|
+
}).then((AMap) => {
|
|
106
|
+
console.log(AMap)
|
|
107
|
+
// 初始化地图
|
|
108
|
+
this.map = new AMap.Map("gao-de-map", {
|
|
109
|
+
viewMode: "2D", // 是否为3D地图模式
|
|
110
|
+
zoom: 18, // 初始化地图级别
|
|
111
|
+
willReadFrequently: true,
|
|
112
|
+
resizeEnable: true
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// 关键字查询
|
|
116
|
+
this.searchMap();
|
|
117
|
+
|
|
118
|
+
// 配置标记点
|
|
119
|
+
this.initMarker()
|
|
120
|
+
|
|
121
|
+
// 监听鼠标点击事件
|
|
122
|
+
this.map.on("click", this.clickMapHandler);
|
|
123
|
+
}).catch(err => {
|
|
124
|
+
console.log(err)
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
// 配置搜索框及搜索结果
|
|
129
|
+
searchMap() {
|
|
130
|
+
// 搜索框自动完成类
|
|
131
|
+
this.auto = new AMap.AutoComplete({
|
|
132
|
+
input: "mapInput", // 使用联想输入的input的id
|
|
133
|
+
});
|
|
134
|
+
//构造地点查询类
|
|
135
|
+
this.placeSearch = new AMap.PlaceSearch({
|
|
136
|
+
pageSize: 10, // 单页显示结果条数
|
|
137
|
+
pageIndex: 1, // 页码
|
|
138
|
+
map: this.map,
|
|
139
|
+
panel: "map__result", // 结果列表将在此容器中进行展示。
|
|
140
|
+
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
|
|
141
|
+
extensions: 'base' //返回基本地址信息
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// 当选中某条搜索记录时触发
|
|
145
|
+
this.auto.on("select", this.selectSite);
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
// 配置标记点
|
|
149
|
+
initMarker() {
|
|
150
|
+
if (Object.prototype.hasOwnProperty.call(this.options, 'icons')) {
|
|
151
|
+
const icons = this.options.icons
|
|
152
|
+
|
|
153
|
+
//创建marker图标的大小和图片路径
|
|
154
|
+
this.startIcon = new AMap.Icon({
|
|
155
|
+
// 图标尺寸
|
|
156
|
+
size: new AMap.Size(icons.size, icons.size),
|
|
157
|
+
// 图标的取图地址
|
|
158
|
+
image: icons.image,
|
|
159
|
+
// 图标所用图片大小
|
|
160
|
+
imageSize: new AMap.Size(icons.imageSize, icons.imageSize),
|
|
161
|
+
// 图标取图偏移量
|
|
162
|
+
imageOffset: new AMap.Pixel(icons.imageOffset[0], icons.imageOffset[1])
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
// 实例化点标记
|
|
168
|
+
setMapMarker(position) {
|
|
169
|
+
this.marker = new AMap.Marker({
|
|
170
|
+
icon: this.startIcon,
|
|
171
|
+
map: this.map,
|
|
172
|
+
position: position,
|
|
173
|
+
offset: new AMap.Pixel(-5, -30),
|
|
174
|
+
});
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
// 地图点击事件
|
|
178
|
+
clickMapHandler(e) {
|
|
179
|
+
console.log(e)
|
|
180
|
+
if (this.marker) {
|
|
181
|
+
this.marker.setMap(null);
|
|
182
|
+
this.marker = null;
|
|
183
|
+
}
|
|
184
|
+
this.setMapMarker([e.lnglat.lng, e.lnglat.lat])
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
//当选中某条搜索记录时触发
|
|
188
|
+
selectSite(e) {
|
|
189
|
+
console.log(e)
|
|
190
|
+
},
|
|
191
|
+
// 确认
|
|
192
|
+
handlerOk() {
|
|
193
|
+
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
// 获取焦点时,打开弹窗
|
|
197
|
+
handlerFocus() {
|
|
198
|
+
this.visible = true
|
|
199
|
+
this.$nextTick(() => {
|
|
200
|
+
this.initMap()
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
// 关闭
|
|
205
|
+
handlerClose() {
|
|
206
|
+
this.visible = false
|
|
207
|
+
},
|
|
208
|
+
// 清空
|
|
209
|
+
handlerClear() {
|
|
210
|
+
},
|
|
211
|
+
// 搜索
|
|
212
|
+
handlerSearch() {
|
|
213
|
+
this.placeSearch.search(this.formData.address, (status, res) => {
|
|
214
|
+
if (status === 'complete') {
|
|
215
|
+
console.log(status)
|
|
216
|
+
console.log(res)
|
|
217
|
+
this.showPlaceSearch = true
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
</script>
|
|
224
|
+
|
|
225
|
+
<style lang="scss" scoped>
|
|
226
|
+
@import "../../../style/index";
|
|
227
|
+
.gao-de-map {
|
|
228
|
+
height: 50vh;
|
|
229
|
+
position: relative;
|
|
230
|
+
|
|
231
|
+
#gao-de-map {
|
|
232
|
+
height: 100%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
#map__result {
|
|
236
|
+
position: absolute;
|
|
237
|
+
background-color: white;
|
|
238
|
+
height: 100%;
|
|
239
|
+
overflow-y: auto;
|
|
240
|
+
top: 0;
|
|
241
|
+
right: 0;
|
|
242
|
+
width: 280px;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <EdInputPop v-model="value"></EdInputPop>
|
|
3
|
+
* @description input 放大输入
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import EdInputPop from './src/EdInputPop.vue';
|
|
7
|
+
|
|
8
|
+
/* istanbul ignore next */
|
|
9
|
+
EdInputPop.install = function (Vue) {
|
|
10
|
+
Vue.component(EdInputPop.name, EdInputPop)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default EdInputPop;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-popover ref="popover" v-model="visible" v-bind="bindProps()" @show="handlerShow" @hide="handlerHide">
|
|
4
|
+
<!-- content -->
|
|
5
|
+
<template v-slot:default>
|
|
6
|
+
<div class="el-popover-title">
|
|
7
|
+
<span>{{ content }}</span>
|
|
8
|
+
<i class="el-icon-close" title="关闭"></i>
|
|
9
|
+
</div>
|
|
10
|
+
<el-input ref="textarea" :disabled="disabled" :style="{ height: height + 'px' }" v-model="inputContent"
|
|
11
|
+
type="textarea" :size="size"
|
|
12
|
+
@blur="popBlur" @input="handleInputChange"/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<!-- reference -->
|
|
16
|
+
<el-input slot="reference" :disabled="disabled" v-model="inputContent" :placeholder="placeholder" :size="size"
|
|
17
|
+
@change="handleInputChange">
|
|
18
|
+
<i slot="suffix" class="el-input__icon el-icon-full-screen" @click.stop="pop"></i>
|
|
19
|
+
</el-input>
|
|
20
|
+
</el-popover>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import props, { PopverProps } from './Props'
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 支持放大输入的输入框
|
|
30
|
+
*
|
|
31
|
+
* - 示例
|
|
32
|
+
*
|
|
33
|
+
* ```vue
|
|
34
|
+
* <ed-input-pop ref="elsInputPop" :title="title" :value="value" @change="handlerChange">
|
|
35
|
+
* </ed-input-pop>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* [](./EdInputPopProps.md ':include')
|
|
39
|
+
*
|
|
40
|
+
* [](./EdInputPopverProps.md ':include')
|
|
41
|
+
*/
|
|
42
|
+
export default {
|
|
43
|
+
name: "EdInputPop",
|
|
44
|
+
props: props,
|
|
45
|
+
model: {
|
|
46
|
+
prop: 'value',
|
|
47
|
+
event: 'change'
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
visible: false,
|
|
52
|
+
inputContent: ''
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
value: {
|
|
57
|
+
immediate: true,
|
|
58
|
+
handler: function () {
|
|
59
|
+
if (this.value && this.value.length > 0) {
|
|
60
|
+
this.inputContent = this.value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
/**
|
|
67
|
+
* 绑定属性
|
|
68
|
+
* @private
|
|
69
|
+
* @returns {any}
|
|
70
|
+
*/
|
|
71
|
+
bindProps() {
|
|
72
|
+
let props = Object.assign({}, this.$attrs, this.$props)
|
|
73
|
+
Object.keys(PopverProps).map(key => {
|
|
74
|
+
if (!Object.prototype.hasOwnProperty.call(props, key)) {
|
|
75
|
+
delete props[key]
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
return props
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* 输入框内容改变时触发
|
|
82
|
+
* @param event
|
|
83
|
+
*/
|
|
84
|
+
handleInputChange(event) {
|
|
85
|
+
/**
|
|
86
|
+
* 调用父组件的change事件
|
|
87
|
+
*/
|
|
88
|
+
this.$emit('change', event)
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* 弹出放大的输入界面
|
|
92
|
+
*/
|
|
93
|
+
pop() {
|
|
94
|
+
this.visible = true
|
|
95
|
+
this.$nextTick(() => {
|
|
96
|
+
this.$refs.textarea.focus()
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* 关闭放大的输入界面
|
|
101
|
+
*/
|
|
102
|
+
popBlur() {
|
|
103
|
+
this.visible = false
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @name handlerShow
|
|
108
|
+
* @description 弹出框显示时触发
|
|
109
|
+
*/
|
|
110
|
+
handlerShow(){
|
|
111
|
+
this.$emit('show')
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @name handlerHide
|
|
116
|
+
* @description 隐藏时触发
|
|
117
|
+
*/
|
|
118
|
+
handlerHide(){
|
|
119
|
+
this.$emit('hide')
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style lang="scss" scoped>
|
|
126
|
+
@import "../../../style/index";
|
|
127
|
+
|
|
128
|
+
::v-deep {
|
|
129
|
+
|
|
130
|
+
.el-textarea__inner {
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 0;
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.el-popover-title {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
align-items: center;
|
|
141
|
+
padding-bottom: 5px;
|
|
142
|
+
margin-bottom: 5px;
|
|
143
|
+
}
|
|
144
|
+
</style>
|