forked from mengyxu/noob-components
7 changed files with 1870 additions and 5953 deletions
@ -1,3 +1,4 @@
@@ -1,3 +1,4 @@
|
||||
NODE_ENV="preview" |
||||
# VUE_APP_BASE_URL="http://172.16.16.120:8080" |
||||
VUE_APP_BASE_URL="http://10.100.0.108:8082" |
||||
# VUE_APP_BASE_URL="http://10.100.0.108:8082" |
||||
VUE_APP_BASE_URL="http://localhost:80" |
||||
|
||||
@ -1,47 +1,62 @@
@@ -1,47 +1,62 @@
|
||||
<template> |
||||
<!-- <Index :menus="menus" @updatePwd="pwd => console.log(pwd)" :checkUser="false" username="超级管理员" |
||||
mode="horizontal"> |
||||
</Index> --> |
||||
<ZhuBeiDong :menus="menus" :checkUser="false" username="超级管理员"> |
||||
</ZhuBeiDong> |
||||
<Index |
||||
@updatePwd="updatePwd" |
||||
@logout="logout" |
||||
:langAble="false" |
||||
:styleAble="true" |
||||
center="" |
||||
:username="state.user.name" |
||||
> |
||||
</Index> |
||||
</template> |
||||
|
||||
<script lang="ts" setup> |
||||
import { reactive, onMounted, ref } from "vue"; |
||||
import { useStore } from "vuex"; |
||||
import { Index, ZhuBeiDong, Views } from "noob-mengyxu"; |
||||
|
||||
const store = useStore(); |
||||
const { buff, dictionary, config, permission, role, user, status, log } = Views.menus; |
||||
const menus = [ |
||||
{ |
||||
i18n: "menu.home", path: "home", icon: "HomeFilled" |
||||
}, |
||||
{ |
||||
i18n: "menu.operator", path: "operator", icon: "Platform", children: [ |
||||
buff, dictionary, config, permission, role, user, status, log |
||||
] |
||||
}, |
||||
{ |
||||
i18n: "menu.base", path: "base", icon: "House", children: [ |
||||
{ i18n: "menu.table", path: "table", icon: "List" }, |
||||
{ i18n: "menu.form", path: "form", icon: "Postcard" }, |
||||
] |
||||
}, |
||||
{ |
||||
i18n: "menu.tool", path: "tool", icon: "Tools", children: [ |
||||
{ i18n: "menu.terminal", path: "terminal", icon: "Platform" }, |
||||
{ i18n: "menu.color", path: "color", icon: "MagicStick" }, |
||||
] |
||||
} |
||||
] |
||||
// const menus = null; |
||||
|
||||
onMounted(() => { }); |
||||
import { Index, Element, Http } from "noob-mengyxu"; |
||||
const { showMessage } = Element; |
||||
import md5 from "js-md5"; |
||||
import { useI18n } from "vue3-i18n"; |
||||
const { t } = useI18n(); |
||||
const { commit, dispatch, state } = useStore(); |
||||
// const logo = ref("/logo.png"); |
||||
|
||||
const updatePwd = (pwd) => { |
||||
if (state.user.password != md5(pwd.old)) { |
||||
showMessage("error", "旧密码不正确"); |
||||
return; |
||||
} |
||||
state.user.password = md5(pwd.new); |
||||
}; |
||||
|
||||
const logout = () => { |
||||
dispatch("logout"); |
||||
}; |
||||
|
||||
onMounted(() => { |
||||
dispatch("getMenus"); |
||||
document.title = t("title"); |
||||
}); |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
// ::v-deep .no-padding .el-dialog__body { |
||||
// background-color: black; |
||||
// }</style> |
||||
|
||||
/* Force selection colors to work globally */ |
||||
*::selection { |
||||
background-color: #3367d1 !important; |
||||
color: #fff !important; |
||||
} |
||||
|
||||
*::-moz-selection { |
||||
background-color: #3367d1 !important; |
||||
color: #fff !important; |
||||
} |
||||
|
||||
.el-dialog { |
||||
background-color: rgba($color: #e6e8eb, $alpha: 1) !important; |
||||
} |
||||
|
||||
.el-select-dropdown { |
||||
background-color: rgba($color: #e6e8eb, $alpha: 1) !important; |
||||
} |
||||
</style> |
||||
|
||||
Loading…
Reference in new issue