forked from mengyxu/noob-components
7 changed files with 1870 additions and 5953 deletions
@ -1,3 +1,4 @@ |
|||||||
NODE_ENV="preview" |
NODE_ENV="preview" |
||||||
# VUE_APP_BASE_URL="http://172.16.16.120:8080" |
# 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 @@ |
|||||||
<template> |
<template> |
||||||
<!-- <Index :menus="menus" @updatePwd="pwd => console.log(pwd)" :checkUser="false" username="超级管理员" |
<Index |
||||||
mode="horizontal"> |
@updatePwd="updatePwd" |
||||||
</Index> --> |
@logout="logout" |
||||||
<ZhuBeiDong :menus="menus" :checkUser="false" username="超级管理员"> |
:langAble="false" |
||||||
</ZhuBeiDong> |
:styleAble="true" |
||||||
|
center="" |
||||||
|
:username="state.user.name" |
||||||
|
> |
||||||
|
</Index> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script lang="ts" setup> |
<script lang="ts" setup> |
||||||
import { reactive, onMounted, ref } from "vue"; |
import { reactive, onMounted, ref } from "vue"; |
||||||
import { useStore } from "vuex"; |
import { useStore } from "vuex"; |
||||||
import { Index, ZhuBeiDong, Views } from "noob-mengyxu"; |
import { Index, Element, Http } from "noob-mengyxu"; |
||||||
|
const { showMessage } = Element; |
||||||
const store = useStore(); |
import md5 from "js-md5"; |
||||||
const { buff, dictionary, config, permission, role, user, status, log } = Views.menus; |
import { useI18n } from "vue3-i18n"; |
||||||
const menus = [ |
const { t } = useI18n(); |
||||||
{ |
const { commit, dispatch, state } = useStore(); |
||||||
i18n: "menu.home", path: "home", icon: "HomeFilled" |
// const logo = ref("/logo.png"); |
||||||
}, |
|
||||||
{ |
|
||||||
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(() => { }); |
|
||||||
|
|
||||||
|
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> |
</script> |
||||||
|
|
||||||
<style lang="scss"> |
<style lang="scss"> |
||||||
// ::v-deep .no-padding .el-dialog__body { |
|
||||||
// background-color: black; |
/* Force selection colors to work globally */ |
||||||
// }</style> |
*::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