mooho-base-admin-plus 2.0.16 → 2.0.17
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
package/src/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import plugins from './plugins';
|
|
|
21
21
|
|
|
22
22
|
// store
|
|
23
23
|
import store from './store';
|
|
24
|
+
import adminStore from './store/modules/admin';
|
|
24
25
|
|
|
25
26
|
// ViewUIPlus
|
|
26
27
|
import ViewUIPlus from 'view-ui-plus';
|
|
@@ -219,6 +220,7 @@ export {
|
|
|
219
220
|
pages,
|
|
220
221
|
App,
|
|
221
222
|
store,
|
|
223
|
+
adminStore,
|
|
222
224
|
i18n,
|
|
223
225
|
setting,
|
|
224
226
|
basicLayout,
|
package/test/main.js
CHANGED
|
@@ -3,9 +3,10 @@ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
import { createApp, h } from 'vue';
|
|
6
|
+
import { createStore } from 'vuex';
|
|
6
7
|
|
|
7
8
|
// 基础框架
|
|
8
|
-
import moohoBaseAdminPlus, { pages, App, basicLayout, createRouter, created, routeChanged } from '../src';
|
|
9
|
+
import moohoBaseAdminPlus, { pages, App, adminStore, basicLayout, createRouter, created, routeChanged } from '../src';
|
|
9
10
|
|
|
10
11
|
// 固定路由
|
|
11
12
|
import routes from './router/routes';
|
|
@@ -13,6 +14,9 @@ import routes from './router/routes';
|
|
|
13
14
|
// 自定义css
|
|
14
15
|
import './styles/css/custom.css';
|
|
15
16
|
|
|
17
|
+
// 自定义store
|
|
18
|
+
import cusotmStore from './store/custom';
|
|
19
|
+
|
|
16
20
|
// 环境模式
|
|
17
21
|
window.$mode = import.meta.env.MODE;
|
|
18
22
|
|
|
@@ -43,6 +47,15 @@ const app = createApp({
|
|
|
43
47
|
app.use(router);
|
|
44
48
|
app.use(moohoBaseAdminPlus);
|
|
45
49
|
|
|
50
|
+
adminStore.modules['custom'] = cusotmStore;
|
|
51
|
+
app.use(
|
|
52
|
+
createStore({
|
|
53
|
+
modules: {
|
|
54
|
+
admin: adminStore
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
|
|
46
59
|
//app.config.globalProperties.$pages = pages;
|
|
47
60
|
|
|
48
61
|
app.mount('#app');
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div class="i-layout-page-header">
|
|
4
|
-
<PageHeader
|
|
4
|
+
<PageHeader title="aaa" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
5
|
</div>
|
|
6
6
|
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
{{ test }}
|
|
7
8
|
<view-table ref="table" view-code="LogReport"></view-table>
|
|
8
9
|
</Card>
|
|
9
10
|
</div>
|
|
10
11
|
</template>
|
|
11
12
|
<script>
|
|
12
13
|
import { mixinPage } from '/src';
|
|
14
|
+
import { mapState, mapActions } from 'vuex';
|
|
13
15
|
|
|
14
16
|
export default {
|
|
15
17
|
name: 'test-logReport',
|
|
@@ -18,7 +20,9 @@
|
|
|
18
20
|
data() {
|
|
19
21
|
return {};
|
|
20
22
|
},
|
|
21
|
-
computed: {
|
|
23
|
+
computed: {
|
|
24
|
+
...mapState('admin/custom', ['test'])
|
|
25
|
+
},
|
|
22
26
|
created() {},
|
|
23
27
|
methods: {}
|
|
24
28
|
};
|