meixioacomponent 0.3.71 → 0.3.74
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/meixioacomponent.common.js +1818 -331
- package/lib/meixioacomponent.umd.js +1818 -331
- package/lib/meixioacomponent.umd.min.js +21 -15
- package/package.json +1 -1
- package/packages/components/base/baseDialog/index.vue +36 -9
- package/packages/components/dialogCache/index.vue +93 -0
- package/packages/components/proForm/dialogForm/baseDialogForm.vue +61 -54
- package/packages/components/proForm/proForm/pro_form.vue +7 -2
- package/packages/components/proForm/proForm/pro_form_item.vue +10 -0
- package/packages/components/proPageTable/oa_pro-table-search.vue +5 -1
- package/packages/components/proPageTable/oa_pro_screen_item.vue +31 -30
- package/packages/config/componentConfig.js +42 -15
- package/packages/config/storeModule/dialogCacheStore.js +64 -0
- package/packages/config/storeModule/selectStore.js +0 -1
- package/src/App.vue +1 -2
- package/src/component/test.vue +6 -6
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import Vue from
|
|
2
|
-
import { useElementComponent } from
|
|
3
|
-
import selectStore from
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import { useElementComponent } from './useElement'
|
|
3
|
+
import selectStore from './storeModule/selectStore'
|
|
4
|
+
import dialogCacheStore from './storeModule/dialogCacheStore'
|
|
5
|
+
import dialogCacheWrap from '../components/dialogCache/index.vue'
|
|
4
6
|
const componentConfig = {
|
|
5
7
|
store: null,
|
|
6
8
|
router: null,
|
|
@@ -9,31 +11,56 @@ const componentConfig = {
|
|
|
9
11
|
uploadPrefix: null,
|
|
10
12
|
eventBus: new Vue(),
|
|
11
13
|
selectStore: null,
|
|
12
|
-
|
|
14
|
+
dialogCacheComponent: null,
|
|
15
|
+
uploadStoreList: ['meixidev'],
|
|
13
16
|
setDynamicId: () => {
|
|
14
|
-
componentConfig.dynamicId += 1
|
|
17
|
+
componentConfig.dynamicId += 1
|
|
15
18
|
},
|
|
16
19
|
|
|
17
20
|
setUploadPrefix: (url) => {
|
|
18
|
-
componentConfig.uploadPrefix = url
|
|
21
|
+
componentConfig.uploadPrefix = url
|
|
19
22
|
},
|
|
20
23
|
|
|
21
24
|
setUploadUrl: (storeType, uploadType) => {
|
|
22
|
-
componentConfig.uploadUrl = `${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload
|
|
25
|
+
componentConfig.uploadUrl = `${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload`
|
|
23
26
|
},
|
|
24
27
|
|
|
25
28
|
initConfig: (_store, _router) => {
|
|
26
29
|
// 注册element 组件
|
|
27
|
-
useElementComponent()
|
|
30
|
+
useElementComponent()
|
|
28
31
|
// 动态注册vuex modules
|
|
29
|
-
_store.registerModule(
|
|
32
|
+
_store.registerModule('selectStore', selectStore)
|
|
30
33
|
// 注册vuex里面selectStore管理类
|
|
31
|
-
_store.commit(
|
|
32
|
-
componentConfig.store = _store
|
|
33
|
-
componentConfig.router = _router
|
|
34
|
+
_store.commit('selectStore/CREATE_SELECTSTORE')
|
|
35
|
+
componentConfig.store = _store
|
|
36
|
+
componentConfig.router = _router
|
|
34
37
|
componentConfig.selectStore =
|
|
35
|
-
componentConfig.store.getters[
|
|
38
|
+
componentConfig.store.getters['selectStore/getSelectStore']
|
|
39
|
+
|
|
40
|
+
componentConfig.registerModuleOfCacheDialog(_store)
|
|
41
|
+
componentConfig.createDialogCacheWrap()
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
registerModuleOfCacheDialog: (_store) => {
|
|
45
|
+
_store.registerModule('dialogCacheStore', dialogCacheStore)
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
// 生成隐藏dialog的容器
|
|
49
|
+
createDialogCacheWrap: () => {
|
|
50
|
+
const component = Vue.extend(dialogCacheWrap)
|
|
51
|
+
|
|
52
|
+
componentConfig.dialogCacheComponent = new component({
|
|
53
|
+
store: componentConfig.store,
|
|
54
|
+
router: componentConfig.router,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
Vue.nextTick(() => {
|
|
58
|
+
const cacheWrap = document.createElement('div')
|
|
59
|
+
cacheWrap.setAttribute('class', 'cacheWrap')
|
|
60
|
+
document.body.appendChild(cacheWrap)
|
|
61
|
+
componentConfig.dialogCacheComponent.$mount(cacheWrap)
|
|
62
|
+
})
|
|
36
63
|
},
|
|
37
|
-
}
|
|
64
|
+
}
|
|
38
65
|
|
|
39
|
-
export default componentConfig
|
|
66
|
+
export default componentConfig
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const dialogCacheStore = {
|
|
2
|
+
namespaced: true,
|
|
3
|
+
state: {
|
|
4
|
+
cacheList: [],
|
|
5
|
+
renderShow: false,
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
getters: {
|
|
9
|
+
getCacheList(state) {
|
|
10
|
+
return state.cacheList
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
getRenderShow(state) {
|
|
14
|
+
return state.renderShow
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
mutations: {
|
|
19
|
+
PUSH_DIALOG_CACHE: (state, dialog) => {
|
|
20
|
+
state.cacheList.push(dialog)
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
CLOSE_DIALOG_CACHE: (state, index) => {
|
|
24
|
+
state.cacheList.splice(index, 1)
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
OPEN_DIALOG_CACHE: (state, index) => {
|
|
28
|
+
state.cacheList[index].showDialog()
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
SET_RENDER_SHOW: (state, flag) => {
|
|
32
|
+
state.renderShow = flag
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
actions: {
|
|
36
|
+
hasDialogCache({ commit, state }, dialog) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
resolve(
|
|
39
|
+
state.cacheList.findIndex((item) => {
|
|
40
|
+
return item == dialog
|
|
41
|
+
}),
|
|
42
|
+
)
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
pushCache({ commit, state, dispatch }, dialog) {
|
|
47
|
+
dispatch('hasDialogCache', dialog).then((res) => {
|
|
48
|
+
if (res <= -1) {
|
|
49
|
+
commit('PUSH_DIALOG_CACHE', dialog)
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
closeCache({ commit, state, dispatch }, dialog) {
|
|
55
|
+
dispatch('hasDialogCache', dialog).then((res) => {
|
|
56
|
+
if (res >= 0) {
|
|
57
|
+
commit('CLOSE_DIALOG_CACHE', res)
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default dialogCacheStore
|
package/src/App.vue
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div id="app">
|
|
3
3
|
<div style="height: 100vh;">
|
|
4
4
|
<test></test>
|
|
5
|
-
|
|
6
5
|
<!-- <base-upload-item
|
|
7
6
|
:fileType="`img`"
|
|
8
7
|
:cropper="true"
|
|
@@ -59,7 +58,7 @@ export default {
|
|
|
59
58
|
},
|
|
60
59
|
mounted() {
|
|
61
60
|
this.$nextTick(() => {
|
|
62
|
-
this.$refs.baseUploadItem.clickFile()
|
|
61
|
+
// this.$refs.baseUploadItem.clickFile()
|
|
63
62
|
})
|
|
64
63
|
},
|
|
65
64
|
methods: {
|
package/src/component/test.vue
CHANGED
|
@@ -311,7 +311,7 @@ export default {
|
|
|
311
311
|
}
|
|
312
312
|
</style> -->
|
|
313
313
|
|
|
314
|
-
|
|
314
|
+
<template>
|
|
315
315
|
<div class="page-table-wrap" ref="pageTableWrap" v-if="show">
|
|
316
316
|
<base-pro-table
|
|
317
317
|
:align="`left`"
|
|
@@ -364,9 +364,9 @@ export default {
|
|
|
364
364
|
<template v-slot:address="data">template-{{ data.scope }}</template>
|
|
365
365
|
</base-pro-table>
|
|
366
366
|
</div>
|
|
367
|
-
</template>
|
|
367
|
+
</template>
|
|
368
368
|
|
|
369
|
-
|
|
369
|
+
<script>
|
|
370
370
|
import tableTable from '../test'
|
|
371
371
|
import companyInfoConfig from '../config/CompanyInfoConfig'
|
|
372
372
|
import componentConfig from '../../packages/config/componentConfig'
|
|
@@ -555,7 +555,7 @@ export default {
|
|
|
555
555
|
height: 100%;
|
|
556
556
|
background: inherit;
|
|
557
557
|
}
|
|
558
|
-
</style>
|
|
558
|
+
</style>
|
|
559
559
|
|
|
560
560
|
<!-- 普通表单 -->
|
|
561
561
|
|
|
@@ -816,7 +816,7 @@ export default {
|
|
|
816
816
|
|
|
817
817
|
<style></style> -->
|
|
818
818
|
|
|
819
|
-
<template>
|
|
819
|
+
<!-- <template>
|
|
820
820
|
<base-form-wrap
|
|
821
821
|
:rowNumber="2"
|
|
822
822
|
:disables="disables"
|
|
@@ -876,4 +876,4 @@ export default {
|
|
|
876
876
|
}
|
|
877
877
|
</script>
|
|
878
878
|
|
|
879
|
-
<style lang="less" scoped></style>
|
|
879
|
+
<style lang="less" scoped></style> -->
|