diff --git a/.vscode/settings.json b/.vscode/settings.json index fd86b7f7..e1a21666 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,6 @@ { "files.exclude": { - "dist": true, - "node_modules": true + "dist": true }, "todo-tree.expanded": false } \ No newline at end of file diff --git a/src/assets/style/fixed/tree-view.scss b/src/assets/style/fixed/tree-view.scss new file mode 100644 index 00000000..4057c3e5 --- /dev/null +++ b/src/assets/style/fixed/tree-view.scss @@ -0,0 +1,5 @@ +.tree-view-wrapper.tree-view-small { + .tree-view-item { + font-size: 10px; + } +} \ No newline at end of file diff --git a/src/assets/style/public-class.scss b/src/assets/style/public-class.scss index 08cbc340..69e93d71 100644 --- a/src/assets/style/public-class.scss +++ b/src/assets/style/public-class.scss @@ -10,6 +10,8 @@ @import '~@/assets/style/fixed/vue-splitpane.scss'; // 补丁 vue-grid-layout @import '~@/assets/style/fixed/vue-grid-layout.scss'; +// 补丁 tree-view +@import '~@/assets/style/fixed/tree-view.scss'; // 动画 @import '~@/assets/style/animate/vue-transition.scss'; diff --git a/src/libs/db.js b/src/libs/db.js index 914d9498..79c896b4 100644 --- a/src/libs/db.js +++ b/src/libs/db.js @@ -5,11 +5,17 @@ import { version } from '../../package' const adapter = new LocalStorage(`d2admin-${version}`) const db = low(adapter) +console.group('db') +console.log(`db.get('themeActiveName').value()`, db.get('themeActiveName').value()) +console.log(`db.get('pageOpenedList').value()`, db.get('pageOpenedList').value()) +console.log(`db.get('userInfo').value()`, db.get('userInfo').value()) +console.groupEnd() + +// 初始化数据库 db.defaults({ themeActiveName: [], pageOpenedList: [], userInfo: [] -}) - .write() +}).write() export default db diff --git a/src/main.js b/src/main.js index 0d3b5f81..210aed45 100644 --- a/src/main.js +++ b/src/main.js @@ -86,7 +86,6 @@ new Vue({ * 处理路由 得到每一级的路由设置 */ getAllTagFromRoutes () { - // 所有加载在主框架内的页面 const pool = [] const push = function (routes) { routes.forEach(route => { @@ -99,7 +98,7 @@ new Vue({ }) } push(frameInRoutes) - this.$store.commit('d2adminTagPoolSet', pool) + this.$store.commit('d2adminpagePoolSet', pool) } } }).$mount('#app') diff --git a/src/menu/modules/demo-playground.js b/src/menu/modules/demo-playground.js index bcc5130e..b5478361 100644 --- a/src/menu/modules/demo-playground.js +++ b/src/menu/modules/demo-playground.js @@ -27,14 +27,14 @@ export default { title: '全局状态管理', icon: 'bolt', children: [ - { path: `${pre}store/sys`, title: '系统状态' } + { path: `${pre}store/sys`, title: '系统状态', icon: 'microchip' }, + { path: `${pre}store/ua`, title: '浏览器信息', icon: 'info-circle' }, + { path: `${pre}store/gray`, title: '灰度模式', icon: 'eye' } ] }, { path: `${pre}theme`, title: '主题', icon: 'flask' }, { path: `${pre}fullscreen`, title: '全屏', icon: 'arrows-alt' }, - { path: `${pre}gray`, title: '灰度模式', icon: 'eye' }, { path: `${pre}db`, title: '数据持久化', icon: 'database' }, - { path: `${pre}env`, title: '环境信息', icon: 'microchip' }, - { path: `${pre}ua`, title: '浏览器信息', icon: 'info-circle' } + { path: `${pre}env`, title: '环境信息', icon: 'exclamation-circle' } ])('/demo/playground/') } diff --git a/src/mock/login/index.js b/src/mock/login/index.js index dfbf1f9b..99222985 100644 --- a/src/mock/login/index.js +++ b/src/mock/login/index.js @@ -4,7 +4,7 @@ const userDB = [ { username: 'admin', password: 'admin', - uuid: 'test-user-uuid', + uuid: 'admin-uuid', name: '管理员' }, { diff --git a/src/pages/demo/playground/gray/index.vue b/src/pages/demo/playground/store/gray/index.vue similarity index 100% rename from src/pages/demo/playground/gray/index.vue rename to src/pages/demo/playground/store/gray/index.vue diff --git a/src/pages/demo/playground/store/sys/index.vue b/src/pages/demo/playground/store/sys/index.vue index ff58daf9..fd6ab188 100644 --- a/src/pages/demo/playground/store/sys/index.vue +++ b/src/pages/demo/playground/store/sys/index.vue @@ -7,7 +7,7 @@
- +
@@ -15,7 +15,7 @@
- +
@@ -44,26 +44,38 @@ -
+
{{themeActiveName}}
- + + + +
+ +
+
+
+ -
- +
+
+ + + {{pageCurrent}} + - +
- {{pageCurrent}} +
@@ -71,7 +83,7 @@
- +
@@ -79,14 +91,14 @@
- +
- +
@@ -97,6 +109,7 @@ import { mapState, mapGetters } from 'vuex' export default { computed: { ...mapState({ + userInfo: state => state.d2admin.userInfo, version: state => state.d2admin.version, releasesLatest: state => state.d2admin.releasesLatest, releasesUpdate: state => state.d2admin.releasesUpdate, @@ -105,9 +118,12 @@ export default { isFullScreen: state => state.d2admin.isFullScreen, isGrayMode: state => state.d2admin.isGrayMode, isMenuAsideCollapse: state => state.d2admin.isMenuAsideCollapse, + themeList: state => state.d2admin.themeList, themeActiveName: state => state.d2admin.themeActiveName, + pagePool: state => state.d2admin.pagePool, pageOpenedList: state => state.d2admin.pageOpenedList, - pageCurrent: state => state.d2admin.pageCurrent + pageCurrent: state => state.d2admin.pageCurrent, + ua: state => state.d2admin.ua }), ...mapGetters([ 'themeActiveSetting', diff --git a/src/pages/demo/playground/ua/index.vue b/src/pages/demo/playground/store/ua/index.vue similarity index 100% rename from src/pages/demo/playground/ua/index.vue rename to src/pages/demo/playground/store/ua/index.vue diff --git a/src/router/routes.js.REMOVED.git-id b/src/router/routes.js.REMOVED.git-id index 9440f484..8679bde8 100644 --- a/src/router/routes.js.REMOVED.git-id +++ b/src/router/routes.js.REMOVED.git-id @@ -1 +1 @@ -6cc11bb2f370fd4b3c2020cfe54720d7d8c43d3f \ No newline at end of file +c4d49155f38baacfd5717ec2b3eb78e27bfde9c5 \ No newline at end of file diff --git a/src/store/modules/d2admin.js.REMOVED.git-id b/src/store/modules/d2admin.js.REMOVED.git-id index 5de8720c..28995a67 100644 --- a/src/store/modules/d2admin.js.REMOVED.git-id +++ b/src/store/modules/d2admin.js.REMOVED.git-id @@ -1 +1 @@ -173a9f3d33cddfa88c52a85e30ddbdaa8d3ebd49 \ No newline at end of file +a90ea1c26136a74ab078f2212cd396b2dfe12c13 \ No newline at end of file