meixioacomponent 0.1.0 → 0.1.3
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/lib/demo.html +4 -4
- package/lib/{meixicomponent.common.js → meixioacomponent.common.js} +481 -69
- package/lib/meixioacomponent.common.js.map +1 -0
- package/lib/{meixicomponent.css → meixioacomponent.css} +1 -1
- package/lib/{meixicomponent.umd.js → meixioacomponent.umd.js} +483 -71
- package/lib/meixioacomponent.umd.js.map +1 -0
- package/lib/meixioacomponent.umd.min.js +20 -0
- package/lib/meixioacomponent.umd.min.js.map +1 -0
- package/package.json +2 -2
- package/packages/components/base/baseTimeTypeSelect/base_time_type_select.vue +3 -3
- package/packages/components/dynamicmount/dynamicMount.vue +3 -4
- package/packages/components/dynamicmount/index.js +3 -3
- package/packages/components/index.js +12 -0
- package/packages/components/proForm/proForm/pro_form_item.vue +2 -3
- package/packages/config/componentConfig.js +25 -0
- package/packages/config/selectStore/SelectStore.js +5 -3
- package/packages/config/selectStore/UseSelectStoreClass.js +9 -3
- package/packages/config/storeModule/selectStore.js +24 -0
- package/packages/config/use/useFixedHeader.js +2 -1
- package/lib/meixicomponent.common.js.map +0 -1
- package/lib/meixicomponent.umd.js.map +0 -1
- package/lib/meixicomponent.umd.min.js +0 -20
- package/lib/meixicomponent.umd.min.js.map +0 -1
- package/packages/config/selectStore/testSelectStore.js +0 -40
- package/packages/config/use/UseSelectStore.js +0 -2
- package/src/assets/logo.png +0 -0
- package/src/main.js +0 -9
- package/src/router/index.js +0 -29
- package/src/store/index.js +0 -15
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meixioacomponent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "YuRi",
|
|
6
6
|
"main": "lib/meixioacomponent.umd.min.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"serve": "vue-cli-service serve",
|
|
9
|
-
"lib": "vue-cli-service build --target lib --name
|
|
9
|
+
"lib": "vue-cli-service build --target lib --name meixioacomponent --dest lib packages/components/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^0.27.2",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
>
|
|
49
49
|
</el-date-picker>
|
|
50
50
|
</div>
|
|
51
|
-
<
|
|
51
|
+
<baseButtonHandle
|
|
52
52
|
:config="handleConfig"
|
|
53
53
|
class="button-handle-wrap"
|
|
54
|
-
></
|
|
54
|
+
></baseButtonHandle>
|
|
55
55
|
</div>
|
|
56
56
|
</template>
|
|
57
57
|
<div
|
|
@@ -110,7 +110,7 @@ export default {
|
|
|
110
110
|
value: {},
|
|
111
111
|
},
|
|
112
112
|
components: {
|
|
113
|
-
|
|
113
|
+
baseButtonHandle,
|
|
114
114
|
},
|
|
115
115
|
computed: {
|
|
116
116
|
module: {
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
6
|
import Vue from "vue";
|
|
7
|
-
import
|
|
8
|
-
import router from "../../router";
|
|
7
|
+
import componentConfig from "../../config/componentConfig";
|
|
9
8
|
export default {
|
|
10
9
|
name: "dynamicMount",
|
|
11
10
|
data() {
|
|
@@ -54,9 +53,9 @@ export default {
|
|
|
54
53
|
propsData: {
|
|
55
54
|
...this.componentProps,
|
|
56
55
|
},
|
|
57
|
-
store: store,
|
|
56
|
+
store: componentConfig.store,
|
|
58
57
|
parent: this,
|
|
59
|
-
router: router,
|
|
58
|
+
router: componentConfig.router,
|
|
60
59
|
});
|
|
61
60
|
this.registerListen();
|
|
62
61
|
this.$children.push(this.componentMounted);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
-
import store from "../../store/index";
|
|
3
2
|
import dynamicMountComponent from "./dynamicMount.vue";
|
|
3
|
+
import componentConfig from "../../config/componentConfig";
|
|
4
4
|
const ComponentInsertConstructor = Vue.extend(dynamicMountComponent);
|
|
5
5
|
|
|
6
6
|
//使用方法
|
|
@@ -11,8 +11,8 @@ const ComponentInsertConstructor = Vue.extend(dynamicMountComponent);
|
|
|
11
11
|
// });
|
|
12
12
|
|
|
13
13
|
const Insert = (options) => {
|
|
14
|
-
|
|
15
|
-
let id =
|
|
14
|
+
componentConfig.setDynamicId();
|
|
15
|
+
let id = componentConfig.dynamicId;
|
|
16
16
|
const componentInsertConstructor = new ComponentInsertConstructor();
|
|
17
17
|
componentInsertConstructor.vm = componentInsertConstructor.$mount();
|
|
18
18
|
componentInsertConstructor.dom = componentInsertConstructor.vm.$el;
|
|
@@ -30,6 +30,13 @@ import baseDialogForm from "./proForm/dialogForm/dialogFormIndex";
|
|
|
30
30
|
import baseForm from "./proForm/proForm/index";
|
|
31
31
|
import baseFormWrap from "./proForm/proFormWrap/index";
|
|
32
32
|
import baseProTable from "./proPageTable/index";
|
|
33
|
+
// js 文件相关
|
|
34
|
+
import DynamicMount from "./dynamicmount/index.js";
|
|
35
|
+
import componentConfig from "../config/componentConfig";
|
|
36
|
+
import SelectStore from "../config/selectStore/SelectStore";
|
|
37
|
+
//
|
|
38
|
+
import useImg from "../config/use/UseImg";
|
|
39
|
+
import useFixedHeader from "../config/use/useFixedHeader";
|
|
33
40
|
|
|
34
41
|
const meixicomponents = [
|
|
35
42
|
baseAnchor,
|
|
@@ -70,6 +77,7 @@ const install = (Vue) => {
|
|
|
70
77
|
meixicomponents.forEach((component) => {
|
|
71
78
|
Vue.component(component.name, component);
|
|
72
79
|
});
|
|
80
|
+
Vue.use(DynamicMount);
|
|
73
81
|
};
|
|
74
82
|
|
|
75
83
|
if (typeof window !== "undefined" && window.Vue) {
|
|
@@ -78,6 +86,7 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
|
78
86
|
|
|
79
87
|
export default {
|
|
80
88
|
install,
|
|
89
|
+
componentConfig,
|
|
81
90
|
meixicomponents,
|
|
82
91
|
baseAnchor,
|
|
83
92
|
baseAppendix,
|
|
@@ -111,4 +120,7 @@ export default {
|
|
|
111
120
|
baseForm,
|
|
112
121
|
baseFormWrap,
|
|
113
122
|
baseProTable,
|
|
123
|
+
SelectStore,
|
|
124
|
+
useImg,
|
|
125
|
+
useFixedHeader,
|
|
114
126
|
};
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
<script>
|
|
187
187
|
import { FilterTime } from "../../../utils/utils";
|
|
188
188
|
//
|
|
189
|
-
import
|
|
189
|
+
import componentConfig from "../../../config/componentConfig";
|
|
190
190
|
export default {
|
|
191
191
|
data() {
|
|
192
192
|
return {
|
|
@@ -218,8 +218,7 @@ export default {
|
|
|
218
218
|
return this.selectStore.getLoading();
|
|
219
219
|
},
|
|
220
220
|
selectStore() {
|
|
221
|
-
|
|
222
|
-
return UseSelectStore.getStore(this.$props.config.useStore);
|
|
221
|
+
return componentConfig.selectStore.getStore(this.$props.config.useStore);
|
|
223
222
|
},
|
|
224
223
|
|
|
225
224
|
selectData() {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// import UseSelectStoreClass from "./selectStore/UseSelectStoreClass";
|
|
2
|
+
import selectStore from "./storeModule/selectStore";
|
|
3
|
+
const componentConfig = {
|
|
4
|
+
store: null,
|
|
5
|
+
router: null,
|
|
6
|
+
dynamicId: 0,
|
|
7
|
+
selectStore: null,
|
|
8
|
+
|
|
9
|
+
setDynamicId: () => {
|
|
10
|
+
componentConfig.dynamicId += 1;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
initConfig: (_store, _router) => {
|
|
14
|
+
// 动态注册vuex modules
|
|
15
|
+
_store.registerModule("selectStore", selectStore);
|
|
16
|
+
// 注册vuex里面selectStore管理类
|
|
17
|
+
_store.commit("selectStore/CREATE_SELECTSTORE");
|
|
18
|
+
componentConfig.store = _store;
|
|
19
|
+
componentConfig.router = _router;
|
|
20
|
+
componentConfig.selectStore =
|
|
21
|
+
componentConfig.store.getters["selectStore/getSelectStore"];
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default componentConfig;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import componentConfig from "../componentConfig";
|
|
1
2
|
class SelectStore {
|
|
2
|
-
constructor(
|
|
3
|
+
constructor(params) {
|
|
3
4
|
this.data = [];
|
|
4
5
|
this.loading = false;
|
|
5
|
-
this.
|
|
6
|
+
this.name = params.name;
|
|
7
|
+
this.request = params.request;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
async loadData() {
|
|
9
11
|
this.loading = true;
|
|
10
12
|
let result = await this.request();
|
|
11
|
-
|
|
13
|
+
|
|
12
14
|
this.loading = false;
|
|
13
15
|
this.data = result;
|
|
14
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
class UseSelectStoreClass {
|
|
2
2
|
constructor() {
|
|
3
|
+
this.storeClassList = {};
|
|
3
4
|
this.storeList = [];
|
|
4
5
|
}
|
|
5
6
|
hasStore(store) {
|
|
@@ -9,13 +10,12 @@ class UseSelectStoreClass {
|
|
|
9
10
|
return index;
|
|
10
11
|
}
|
|
11
12
|
getStore(store) {
|
|
12
|
-
console.log(store);
|
|
13
13
|
let flag = this.hasStore(store);
|
|
14
14
|
if (flag == -1) {
|
|
15
|
-
let value =
|
|
15
|
+
let value = this.storeClassList[`${store}`];
|
|
16
16
|
let obj = {
|
|
17
17
|
key: `${store}`,
|
|
18
|
-
value: value
|
|
18
|
+
value: value,
|
|
19
19
|
};
|
|
20
20
|
this.storeList.push(obj);
|
|
21
21
|
return obj.value;
|
|
@@ -23,5 +23,11 @@ class UseSelectStoreClass {
|
|
|
23
23
|
|
|
24
24
|
return this.storeList[flag].value;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
registerStore(params) {
|
|
28
|
+
console.log(params);
|
|
29
|
+
this.storeClassList[`${params.name}`] = params.class;
|
|
30
|
+
console.log(this.storeClassList);
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
33
|
export default UseSelectStoreClass;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import UseSelectStoreClass from "../selectStore/UseSelectStoreClass";
|
|
2
|
+
|
|
3
|
+
const selectStore = {
|
|
4
|
+
namespaced: true,
|
|
5
|
+
state: {
|
|
6
|
+
selectStore: null,
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
getters: {
|
|
10
|
+
getSelectStore(state) {
|
|
11
|
+
return state.selectStore;
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
mutations: {
|
|
16
|
+
CREATE_SELECTSTORE: (state) => {
|
|
17
|
+
state.selectStore = new UseSelectStoreClass();
|
|
18
|
+
console.log("注册成功");
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
actions: {},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default selectStore;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import DynamicMount from "../../components/dynamicmount/DynamicMount";
|
|
3
|
+
import baseFixedHeader from "../../components/base/baseFixedHeader/baseFixedHeader.vue";
|
|
3
4
|
|
|
4
5
|
class UseFixedHeader {
|
|
5
6
|
constructor() {
|