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.
Files changed (260) hide show
  1. package/.env.dev +14 -0
  2. package/CHANGELOG.md +9 -0
  3. package/README.md +24 -0
  4. package/dist/ed-frame-vue.common.1.js +11046 -0
  5. package/dist/ed-frame-vue.common.1.js.map +1 -0
  6. package/dist/ed-frame-vue.common.2.js +1715 -0
  7. package/dist/ed-frame-vue.common.2.js.map +1 -0
  8. package/dist/ed-frame-vue.common.js +53427 -0
  9. package/dist/ed-frame-vue.common.js.map +1 -0
  10. package/dist/ed-frame-vue.umd.1.js +11046 -0
  11. package/dist/ed-frame-vue.umd.1.js.map +1 -0
  12. package/dist/ed-frame-vue.umd.2.js +1715 -0
  13. package/dist/ed-frame-vue.umd.2.js.map +1 -0
  14. package/dist/ed-frame-vue.umd.js +53437 -0
  15. package/dist/ed-frame-vue.umd.js.map +1 -0
  16. package/dist/ed-frame-vue.umd.min.1.js +17 -0
  17. package/dist/ed-frame-vue.umd.min.1.js.map +1 -0
  18. package/dist/ed-frame-vue.umd.min.2.js +4 -0
  19. package/dist/ed-frame-vue.umd.min.2.js.map +1 -0
  20. package/dist/ed-frame-vue.umd.min.js +470 -0
  21. package/dist/ed-frame-vue.umd.min.js.map +1 -0
  22. package/import.easydata.js +46 -0
  23. package/lib/CHANGELOG.md +18 -0
  24. package/lib/README.md +27 -0
  25. package/lib/api/ds/index.js +124 -0
  26. package/lib/api/easyData.js +90 -0
  27. package/lib/api/easyform/easyForm.js +32 -0
  28. package/lib/api/index.js +61 -0
  29. package/lib/api/interface/index.js +32 -0
  30. package/lib/api/system.js +20 -0
  31. package/lib/index.js +80 -0
  32. package/lib/packages/BasicTemplate/EasyDataTemplate.vue +189 -0
  33. package/lib/packages/BasicTemplate/Props.js +64 -0
  34. package/lib/packages/BasicTemplate/components/TemplateComp.vue +263 -0
  35. package/lib/packages/BasicTemplate/components/TemplateViews.vue +292 -0
  36. package/lib/packages/BasicTemplate/hooks/business.js +74 -0
  37. package/lib/packages/BasicTemplate/hooks/getFormData.js +89 -0
  38. package/lib/packages/BasicTemplate/hooks/queryFormData.js +194 -0
  39. package/lib/packages/BasicTemplate/hooks/submitForm.js +53 -0
  40. package/lib/packages/BasicTemplate/hooks/useEmits.js +15 -0
  41. package/lib/packages/BasicTemplate/hooks/validate.js +42 -0
  42. package/lib/packages/EasyDataForm/EasyDataForm.vue +597 -0
  43. package/lib/packages/EasyDataForm/Props.js +22 -0
  44. package/lib/packages/EasyDataForm/components/FormItem.vue +228 -0
  45. package/lib/packages/EasyDataForm/hooks/useChosePopup.js +85 -0
  46. package/lib/packages/EasyDataForm/hooks/useEmits.js +19 -0
  47. package/lib/packages/EasyDataForm/hooks/useForm.js +169 -0
  48. package/lib/packages/EasyDataForm/hooks/useUpload.js +168 -0
  49. package/lib/packages/EasyDataList/EasyDataList.vue +348 -0
  50. package/lib/packages/EasyDataList/Props.js +116 -0
  51. package/lib/packages/EasyDataList/components/BasicModal.vue +150 -0
  52. package/lib/packages/EasyDataList/components/FormAction.vue +63 -0
  53. package/lib/packages/EasyDataList/hooks/useEmits.js +30 -0
  54. package/lib/packages/EasyDataList/hooks/useForm.js +62 -0
  55. package/lib/packages/EasyDataList/hooks/useTable.js +314 -0
  56. package/lib/packages/EasyDataTable/EasyDataTable.vue +233 -0
  57. package/lib/packages/EasyDataView/EasyDataView.vue +105 -0
  58. package/lib/packages/EdRichPreview/index.js +32 -0
  59. package/lib/packages/EdRichText/index.vue +167 -0
  60. package/lib/packages/EdRichText/replaceUrl.js +49 -0
  61. package/lib/packages/components/FileView.vue +97 -0
  62. package/lib/packages/index.js +11 -0
  63. package/lib/packages/mixins/EasyDataMixins.js +133 -0
  64. package/lib/packages/mixins/useTable.jsx +130 -0
  65. package/lib/pages/DataSource/index.js +8 -0
  66. package/lib/pages/DataSource/src/components/ControlViews/BaseProps.js +103 -0
  67. package/lib/pages/DataSource/src/components/ControlViews/control.js +1089 -0
  68. package/lib/pages/DataSource/src/components/ControlViews/index.vue +301 -0
  69. package/lib/pages/DataSource/src/components/TableOperationModal.vue +225 -0
  70. package/lib/pages/DataSource/src/components/TablePropsModal.vue +367 -0
  71. package/lib/pages/DataSource/src/components/ViewPropsModal.vue +737 -0
  72. package/lib/pages/DataSource/src/components/modal/ChooseDict.vue +119 -0
  73. package/lib/pages/DataSource/src/hooks/useTable.js +138 -0
  74. package/lib/pages/DataSource/src/index.vue +431 -0
  75. package/lib/pages/Interface/index.js +8 -0
  76. package/lib/pages/Interface/src/components/InterfaceCall.vue +73 -0
  77. package/lib/pages/Interface/src/components/InterfaceDepend.vue +299 -0
  78. package/lib/pages/Interface/src/components/InterfaceFee.vue +131 -0
  79. package/lib/pages/Interface/src/components/InterfaceMessage.vue +878 -0
  80. package/lib/pages/Interface/src/components/InterfaceMock.vue +203 -0
  81. package/lib/pages/Interface/src/components/InterfaceParam.vue +308 -0
  82. package/lib/pages/Interface/src/components/InterfaceRepeat.vue +281 -0
  83. package/lib/pages/Interface/src/components/InterfaceVariable.vue +31 -0
  84. package/lib/pages/Interface/src/index.vue +216 -0
  85. package/lib/pages/Template/index.js +8 -0
  86. package/lib/pages/Template/src/components/DefineModal.vue +524 -0
  87. package/lib/pages/Template/src/components/TemplatePreview.vue +109 -0
  88. package/lib/pages/Template/src/components/model/AddDialog.vue +60 -0
  89. package/lib/pages/Template/src/components/model/TemplatePreview2.vue +101 -0
  90. package/lib/pages/Template/src/hooks/index.js +3 -0
  91. package/lib/pages/Template/src/hooks/useEmits.js +64 -0
  92. package/lib/pages/Template/src/index.vue +124 -0
  93. package/lib/popup/index.js +8 -0
  94. package/lib/popup/src/DataSourceChoose.vue +44 -0
  95. package/lib/popup/src/DataSourceViewIdChoose.vue +67 -0
  96. package/lib/popup/src/DictChoose.vue +104 -0
  97. package/lib/popup/src/InterfaceChoose.vue +46 -0
  98. package/lib/popup/src/OrgChoose.vue +121 -0
  99. package/lib/popup/src/RoleChoose.vue +101 -0
  100. package/lib/popup/src/TemplateChoose.vue +43 -0
  101. package/lib/popup/src/UserChoose.vue +161 -0
  102. package/lib/popup//347/273/204/344/273/266/345/274/200/345/217/221/350/247/204/350/214/203.md +25 -0
  103. package/lib/style/custom.scss +126 -0
  104. package/lib/style/deep.scss +109 -0
  105. package/lib/style/index.scss +4 -0
  106. package/lib/utils/MapLoader.js +48 -0
  107. package/lib/utils/dateUtils.js +58 -0
  108. package/lib/utils/index.js +8 -0
  109. package/lib/utils/setting.js +25 -0
  110. package/lib/utils/sortable/index.js +3784 -0
  111. package/lib/utils/useBusiness.js +212 -0
  112. package/lib/utils/utils.js +588 -0
  113. package/package.json +77 -0
  114. package/src/App.vue +12 -0
  115. package/src/assets/Vue.png +0 -0
  116. package/src/assets/avatar.png +0 -0
  117. package/src/assets/images/bg.png +0 -0
  118. package/src/assets/images/logo-bills.png +0 -0
  119. package/src/assets/images/pic.png +0 -0
  120. package/src/assets/images/weplus-logo.png +0 -0
  121. package/src/assets/marker.png +0 -0
  122. package/src/assets/styles/common.scss +359 -0
  123. package/src/assets/styles/ele-docs.css +3278 -0
  124. package/src/assets/styles/fonts/icomoon.eot +0 -0
  125. package/src/assets/styles/fonts/icomoon.svg +14 -0
  126. package/src/assets/styles/fonts/icomoon.ttf +0 -0
  127. package/src/assets/styles/fonts/icomoon.woff +0 -0
  128. package/src/assets/styles/fonts/style.css +39 -0
  129. package/src/assets/styles/higtlightEle.css +84 -0
  130. package/src/assets/svg/code.svg +7 -0
  131. package/src/assets/svg/password.svg +1 -0
  132. package/src/components/Popups/DiyCompDictChoose.vue +112 -0
  133. package/src/components/Popups/index.js +28 -0
  134. package/src/components/ed-base-vue/global/variable.js +8 -0
  135. package/src/components/ed-base-vue/index.js +81 -0
  136. package/src/components/ed-base-vue/package/EdCard/index.js +7 -0
  137. package/src/components/ed-base-vue/package/EdCard/src/index.vue +87 -0
  138. package/src/components/ed-base-vue/package/EdCodeEditor/index.js +8 -0
  139. package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/AceConfig.js +71 -0
  140. package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Editor.vue +137 -0
  141. package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/Toolbar.vue +68 -0
  142. package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/index.vue +119 -0
  143. package/src/components/ed-base-vue/package/EdCodeEditor/src/AceEditor/webpack-resolver.js +51 -0
  144. package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/Toolbar.vue +57 -0
  145. package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/config.js +64 -0
  146. package/src/components/ed-base-vue/package/EdCodeEditor/src/Codemirror/index.vue +309 -0
  147. package/src/components/ed-base-vue/package/EdCodeEditor/src/EdCodeEditor.vue +238 -0
  148. package/src/components/ed-base-vue/package/EdDate/index.js +8 -0
  149. package/src/components/ed-base-vue/package/EdDate/src/index.js +50 -0
  150. package/src/components/ed-base-vue/package/EdDescriptions/index.js +8 -0
  151. package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptions.vue +46 -0
  152. package/src/components/ed-base-vue/package/EdDescriptions/src/EdDescriptionsItem.js +20 -0
  153. package/src/components/ed-base-vue/package/EdDescriptions/src/Props.js +20 -0
  154. package/src/components/ed-base-vue/package/EdDialog/index.js +8 -0
  155. package/src/components/ed-base-vue/package/EdDialog/src/EdDialog.vue +138 -0
  156. package/src/components/ed-base-vue/package/EdDialog/src/Props.js +91 -0
  157. package/src/components/ed-base-vue/package/EdDialog/src/components/DialogFooter.vue +42 -0
  158. package/src/components/ed-base-vue/package/EdDialog/src/components/DialogWrapper.vue +53 -0
  159. package/src/components/ed-base-vue/package/EdDrawer/index.js +8 -0
  160. package/src/components/ed-base-vue/package/EdDrawer/src/DrawerFooter.vue +41 -0
  161. package/src/components/ed-base-vue/package/EdDrawer/src/EdDrawer.vue +150 -0
  162. package/src/components/ed-base-vue/package/EdDrawer/src/props.js +71 -0
  163. package/src/components/ed-base-vue/package/EdFlow/index.js +8 -0
  164. package/src/components/ed-base-vue/package/EdFlow/src/EdFlowItem.vue +733 -0
  165. package/src/components/ed-base-vue/package/EdFlow/src/index.vue +148 -0
  166. package/src/components/ed-base-vue/package/EdForm/index.js +8 -0
  167. package/src/components/ed-base-vue/package/EdForm/src/EdForm.vue +172 -0
  168. package/src/components/ed-base-vue/package/EdForm/src/Props.js +33 -0
  169. package/src/components/ed-base-vue/package/EdForm/src/components/EdFormItem.vue +34 -0
  170. package/src/components/ed-base-vue/package/EdIcons/index.js +8 -0
  171. package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons.js +406 -0
  172. package/src/components/ed-base-vue/package/EdIcons/src/hooks/Icons1.js +830 -0
  173. package/src/components/ed-base-vue/package/EdIcons/src/index.vue +13 -0
  174. package/src/components/ed-base-vue/package/EdImage/index.js +8 -0
  175. package/src/components/ed-base-vue/package/EdImage/src/index.vue +28 -0
  176. package/src/components/ed-base-vue/package/EdInputArray/index.js +8 -0
  177. package/src/components/ed-base-vue/package/EdInputArray/src/Props.js +26 -0
  178. package/src/components/ed-base-vue/package/EdInputArray/src/index.vue +97 -0
  179. package/src/components/ed-base-vue/package/EdInputColor/index.js +8 -0
  180. package/src/components/ed-base-vue/package/EdInputColor/src/InputColor.vue +81 -0
  181. package/src/components/ed-base-vue/package/EdInputMap/index.js +9 -0
  182. package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMap.vue +246 -0
  183. package/src/components/ed-base-vue/package/EdInputMap/src/EdInputMapProps.js +6 -0
  184. package/src/components/ed-base-vue/package/EdInputPop/index.js +13 -0
  185. package/src/components/ed-base-vue/package/EdInputPop/src/EdInputPop.vue +144 -0
  186. package/src/components/ed-base-vue/package/EdInputPop/src/Props.js +48 -0
  187. package/src/components/ed-base-vue/package/EdInputTable/index.js +8 -0
  188. package/src/components/ed-base-vue/package/EdInputTable/src/EdInputTable.vue +368 -0
  189. package/src/components/ed-base-vue/package/EdInputTable/src/Fetch.js +40 -0
  190. package/src/components/ed-base-vue/package/EdJsonEditor/index.js +13 -0
  191. package/src/components/ed-base-vue/package/EdJsonEditor/src/EdJsonEditor.vue +198 -0
  192. package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/img/jsoneditor-icons.svg +749 -0
  193. package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/jsoneditor.css +2031 -0
  194. package/src/components/ed-base-vue/package/EdJsonEditor/src/assets/plus.svg +1 -0
  195. package/src/components/ed-base-vue/package/EdJsonEditor/src/hooks.js +63 -0
  196. package/src/components/ed-base-vue/package/EdJsonViewer/index.js +8 -0
  197. package/src/components/ed-base-vue/package/EdJsonViewer/src/EdJsonViewer.vue +44 -0
  198. package/src/components/ed-base-vue/package/EdLable/index.js +8 -0
  199. package/src/components/ed-base-vue/package/EdLable/src/index.vue +34 -0
  200. package/src/components/ed-base-vue/package/EdLink/index.js +8 -0
  201. package/src/components/ed-base-vue/package/EdLink/src/index.vue +43 -0
  202. package/src/components/ed-base-vue/package/EdMarkEditor/index.js +15 -0
  203. package/src/components/ed-base-vue/package/EdMarkEditor/src/EdMarkEditor.vue +368 -0
  204. package/src/components/ed-base-vue/package/EdMarkEditor/src/extra-function.js +538 -0
  205. package/src/components/ed-base-vue/package/EdMarkEditor/src/highlight.js +95 -0
  206. package/src/components/ed-base-vue/package/EdTable/index.js +8 -0
  207. package/src/components/ed-base-vue/package/EdTable/src/EdTable.vue +240 -0
  208. package/src/components/ed-base-vue/package/EdTable/src/Props.js +97 -0
  209. package/src/components/ed-base-vue/package/EdTable/src/components/TableColumnItem.js +24 -0
  210. package/src/components/ed-base-vue/package/EdTable/src/components/TablePagination.vue +73 -0
  211. package/src/components/ed-base-vue/package/EdTableEditor/index.js +8 -0
  212. package/src/components/ed-base-vue/package/EdTableEditor/src/EdTableEditor.vue +282 -0
  213. package/src/components/ed-base-vue/package/EdTableEditor/src/Props.js +107 -0
  214. package/src/components/ed-base-vue/package/EdTableEditor/src/hooks/validate.js +90 -0
  215. package/src/components/ed-base-vue/package/EdUpload/index.js +8 -0
  216. package/src/components/ed-base-vue/package/EdUpload/src/Props.js +90 -0
  217. package/src/components/ed-base-vue/package/EdUpload/src/index.vue +88 -0
  218. package/src/components/ed-base-vue/package/EdViewer/index.js +8 -0
  219. package/src/components/ed-base-vue/package/EdViewer/src/EdViewer.vue +310 -0
  220. package/src/components/ed-base-vue/package/EdWangEditor/index.js +14 -0
  221. package/src/components/ed-base-vue/package/EdWangEditor/src/EdWangEditor.vue +127 -0
  222. package/src/components/ed-base-vue/package/ExtendSlot.js +12 -0
  223. package/src/components/ed-base-vue/package/OptionSlot.js +65 -0
  224. package/src/components/ed-base-vue/plugin/Message/index.js +2 -0
  225. package/src/components/ed-base-vue/plugin/Message/src/main.js +91 -0
  226. package/src/components/ed-base-vue/plugin/Message/src/main.vue +253 -0
  227. package/src/components/ed-base-vue/plugin/print/index.js +156 -0
  228. package/src/components/ed-base-vue/plugin/sortable/index.js +3784 -0
  229. package/src/components/ed-base-vue/style/custom.scss +107 -0
  230. package/src/components/ed-base-vue/style/deep.scss +100 -0
  231. package/src/components/ed-base-vue/style/index.scss +4 -0
  232. package/src/components/ed-base-vue/tools/date-format.js +315 -0
  233. package/src/components/ed-base-vue/tools/utils.js +124 -0
  234. package/src/layouts/components/AppMain.vue +17 -0
  235. package/src/layouts/components/Header.vue +256 -0
  236. package/src/layouts/components/Logo.vue +56 -0
  237. package/src/layouts/components/Navbar.vue +169 -0
  238. package/src/layouts/components/SideBar.vue +107 -0
  239. package/src/layouts/components/index.js +5 -0
  240. package/src/layouts/index.vue +57 -0
  241. package/src/main.js +42 -0
  242. package/src/request/config.js +6 -0
  243. package/src/request/index.js +85 -0
  244. package/src/request/request.js +147 -0
  245. package/src/router/index.js +65 -0
  246. package/src/router/modules/baseRouter.js +43 -0
  247. package/src/router/modules/easydata.js +49 -0
  248. package/src/views/base/BaseRichPreview.vue +23 -0
  249. package/src/views/base/BaseRichText.vue +28 -0
  250. package/src/views/base/EdFormView.vue +54 -0
  251. package/src/views/base/EdTable.vue +98 -0
  252. package/src/views/base/inputTable.vue +103 -0
  253. package/src/views/easydata/Interface.vue +3 -0
  254. package/src/views/easydata/dataSource.vue +13 -0
  255. package/src/views/easydata/dataSourceView.vue +71 -0
  256. package/src/views/easydata/templateDemo.vue +89 -0
  257. package/src/views/easydata/templateInfo.vue +13 -0
  258. package/src/views/index.vue +17 -0
  259. package/src/views/login.vue +208 -0
  260. package/src/views/redirect.vue +15 -0
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "EdIcons"
8
+ }
9
+ </script>
10
+
11
+ <style scoped>
12
+
13
+ </style>
@@ -0,0 +1,8 @@
1
+ import EdImage from "./src/index.vue";
2
+
3
+ /* istanbul ignore next */
4
+ EdImage.install = function (Vue) {
5
+ Vue.component(EdImage.name, EdImage)
6
+ }
7
+
8
+ export default EdImage
@@ -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,8 @@
1
+ import EdInputArray from "./src/index.vue";
2
+
3
+ /* istanbul ignore next */
4
+ EdInputArray.install = function (Vue) {
5
+ Vue.component(EdInputArray.name, EdInputArray)
6
+ }
7
+
8
+ export default EdInputArray
@@ -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,8 @@
1
+ import InputColor from './src/InputColor.vue'
2
+
3
+ /* istanbul ignore next */
4
+ InputColor.install = function (Vue) {
5
+ Vue.component(InputColor.name, InputColor)
6
+ }
7
+
8
+ export default InputColor
@@ -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,9 @@
1
+ // Map坐标选择器
2
+ import EdInputMap from './src/EdInputMap.vue';
3
+
4
+ /* istanbul ignore next */
5
+ EdInputMap.install = function (Vue) {
6
+ Vue.component(EdInputMap.name, EdInputMap)
7
+ }
8
+
9
+ export default EdInputMap;
@@ -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,6 @@
1
+ /**
2
+ * EdInputMap组件属性
3
+ */
4
+ export default {
5
+
6
+ }
@@ -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>