meixioacomponent 0.2.17 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meixioacomponent",
3
- "version": "0.2.17",
3
+ "version": "0.2.20",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -16,7 +16,6 @@
16
16
  "dayjs": "^1.11.3",
17
17
  "element-ui": "^2.15.6",
18
18
  "gulp": "^4.0.0",
19
- "js-md5": "^0.7.3",
20
19
  "register-service-worker": "^1.7.1",
21
20
  "vue": "^2.6.11",
22
21
  "vue-router": "^3.2.0",
@@ -29,6 +28,7 @@
29
28
  "@vue/cli-plugin-router": "~4.5.13",
30
29
  "@vue/cli-plugin-vuex": "~4.5.13",
31
30
  "@vue/cli-service": "~4.5.13",
31
+ "babel-plugin-component": "^1.1.1",
32
32
  "less": "^3.0.4",
33
33
  "less-loader": "^5.0.0",
34
34
  "vue-template-compiler": "^2.6.11"
@@ -92,7 +92,6 @@
92
92
  </template>
93
93
 
94
94
  <script>
95
- import { json } from "body-parser";
96
95
  import baseButtonHandleVue from "../baseButtonHandle/baseButtonHandle.vue";
97
96
  //
98
97
  import areaJson from "./area";
@@ -190,9 +189,7 @@ export default {
190
189
  },
191
190
  methods: {
192
191
  init() {
193
- //console.log("start");
194
192
  if (this.module && this.module instanceof Object) {
195
- //console.log("end");
196
193
  for (let i = 0; i < areaConfig.length; i++) {
197
194
  let item = areaConfig[i];
198
195
  let value = this.module[`${item.value}`];
@@ -377,6 +374,17 @@ export default {
377
374
  }
378
375
  },
379
376
  },
377
+ watch: {
378
+ module(newVal, oldVal) {
379
+ if (!newVal) {
380
+ this.areaValue=[];
381
+ return;
382
+ }
383
+ if (this.$parent.$options._componentTag == "el-form-item") {
384
+ this.init();
385
+ }
386
+ },
387
+ },
380
388
  };
381
389
  </script>
382
390
 
@@ -1,4 +1,5 @@
1
1
  import Vue from "vue";
2
+ import { useElementComponent } from "./useElement";
2
3
  import selectStore from "./storeModule/selectStore";
3
4
  const componentConfig = {
4
5
  store: null,
@@ -12,6 +13,8 @@ const componentConfig = {
12
13
  },
13
14
 
14
15
  initConfig: (_store, _router) => {
16
+ // 注册element 组件
17
+ useElementComponent();
15
18
  // 动态注册vuex modules
16
19
  _store.registerModule("selectStore", selectStore);
17
20
  // 注册vuex里面selectStore管理类
@@ -0,0 +1,122 @@
1
+ import Vue from "vue";
2
+ import {
3
+ Pagination,
4
+ Dialog,
5
+ Autocomplete,
6
+ Dropdown,
7
+ DropdownMenu,
8
+ DropdownItem,
9
+ Menu,
10
+ Submenu,
11
+ MenuItem,
12
+ MenuItemGroup,
13
+ Input,
14
+ InputNumber,
15
+ Radio,
16
+ RadioGroup,
17
+ RadioButton,
18
+ Checkbox,
19
+ CheckboxButton,
20
+ CheckboxGroup,
21
+ Switch,
22
+ Select,
23
+ Option,
24
+ OptionGroup,
25
+ Button,
26
+ Table,
27
+ TableColumn,
28
+ DatePicker,
29
+ TimeSelect,
30
+ TimePicker,
31
+ Popover,
32
+ Tooltip,
33
+ Breadcrumb,
34
+ BreadcrumbItem,
35
+ Form,
36
+ FormItem,
37
+ Tabs,
38
+ TabPane,
39
+ Tag,
40
+ Tree,
41
+ Alert,
42
+ Slider,
43
+ Spinner,
44
+ Badge,
45
+ Steps,
46
+ Step,
47
+ Cascader,
48
+ ColorPicker,
49
+ Transfer,
50
+ Calendar,
51
+ CascaderPanel,
52
+ Loading,
53
+ MessageBox,
54
+ Message,
55
+ Card,
56
+ Drawer,
57
+ } from "element-ui";
58
+
59
+ export const useElementComponent = () => {
60
+ let elementComponentList = [
61
+ Pagination,
62
+ Dialog,
63
+ Autocomplete,
64
+ Dropdown,
65
+ DropdownMenu,
66
+ DropdownItem,
67
+ Menu,
68
+ Submenu,
69
+ MenuItem,
70
+ MenuItemGroup,
71
+ Input,
72
+ InputNumber,
73
+ Radio,
74
+ RadioGroup,
75
+ RadioButton,
76
+ Checkbox,
77
+ CheckboxButton,
78
+ CheckboxGroup,
79
+ Switch,
80
+ Select,
81
+ Option,
82
+ OptionGroup,
83
+ Button,
84
+ Table,
85
+ TableColumn,
86
+ DatePicker,
87
+ TimeSelect,
88
+ TimePicker,
89
+ Popover,
90
+ Tooltip,
91
+ Breadcrumb,
92
+ BreadcrumbItem,
93
+ Form,
94
+ FormItem,
95
+ Tabs,
96
+ TabPane,
97
+ Tag,
98
+ Tree,
99
+ Alert,
100
+ Slider,
101
+ Spinner,
102
+ Badge,
103
+ Steps,
104
+ Step,
105
+ Cascader,
106
+ ColorPicker,
107
+ Transfer,
108
+ Calendar,
109
+ CascaderPanel,
110
+ Loading,
111
+ Card,
112
+ Drawer,
113
+ ];
114
+ elementComponentList.forEach((item) => {
115
+ Vue.use(item);
116
+ });
117
+ // 解决刷新自动调用这两个组件
118
+ Vue.prototype.$message = Message;
119
+ Vue.prototype.$messagebox = MessageBox;
120
+ // 通过函数调用messageBox的confirm方法
121
+ Vue.prototype.$confirm = MessageBox.confirm;
122
+ };
Binary file
Binary file
Binary file
@@ -1,3 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
3
- </svg>