refactor: permission (#357)

* refactor: permission

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* fix: 修复`mix`混合模式导航在生产环境左侧菜单一定机率不显示的问题

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update

* chore: update
This commit is contained in:
RealityBoy
2022-10-25 12:17:13 +08:00
committed by GitHub
parent cedc84d31a
commit 6ef4cf9fb6
47 changed files with 605 additions and 386 deletions

View File

@@ -0,0 +1,5 @@
import auth from "./src/auth";
const Auth = auth;
export { Auth };

View File

@@ -0,0 +1,20 @@
import { defineComponent, Fragment } from "vue";
import { hasAuth } from "/@/router/utils";
export default defineComponent({
name: "Auth",
props: {
value: {
type: undefined,
default: []
}
},
setup(props, { slots }) {
return () => {
if (!slots) return null;
return hasAuth(props.value) ? (
<Fragment>{slots.default?.()}</Fragment>
) : null;
};
}
});

View File

@@ -116,7 +116,8 @@ onMounted(() => {
:disabled="item.disabled"
:style="{
cursor: item.disabled === false ? 'pointer' : 'not-allowed',
color: item.disabled === false ? '' : '#00000040'
color: item.disabled === false ? '' : '#00000040',
background: 'transparent'
}"
@click="onControl(item, key)"
>

View File

@@ -92,8 +92,8 @@ onBeforeMount(() => {
// 获取模拟车辆信息
mapJson()
.then(({ info }) => {
let points: object = info.map(v => {
.then(({ data }) => {
let points: object = data.map(v => {
return {
lnglat: [v.lng, v.lat],
...v