zhangmrit / ruoyi-ant Goto Github PK
View Code? Open in Web Editor NEWruoyi-cloud前端工程,使用ant design vue框架
Home Page: http://ruoyi.ant.zmrit.com
License: MIT License
ruoyi-cloud前端工程,使用ant design vue框架
Home Page: http://ruoyi.ant.zmrit.com
License: MIT License
二级菜单点击失效,我搞了一晚上了,求助!!!
我在项目里写了一个商城公共头,并没有使用后台的东西,后台也没有引用我的东西。
这些都不是关键,关键是我按照代码规范写了一个api,
import { getShopUserInfo, getAllCount } from '@/api/shopCommon'
这样导入之后代码可以运行,没有报错,也能从后台拿到数据。
但是这行代码却影响到了后台的二级菜单,点击失效。
一级菜单却没有失效,点击可以显示内容。
我百思不得其解,路由从头看了个遍,也没有看出个头头来。
详细代码如下 略有删减,以便检查
import { userInfo, allCount } from '@/api/shop/common'
export default {
name: 'GlobalHeader',
methods: {
async getUserInfo () {
await userInfo().then(res => {
const location = res.data.loginIp
const name = res.data.userName
const depart = res.data.deptName
this.location = location
this.name = name
this.depart = depart
})
},
async refreshAllCount () {
await allCount().then(res=>{
const myselectCount = res.data.myselectCount
const myRecomCount = res.data.myRecomCount
const myOrderFormCount = res.data.myOrderFormCount
const mySubscribeCount = res.data.mySubscribeCount
this.myselectCount = myselectCount
this.myRecomCount = myRecomCount
this.myOrderFormCount = myOrderFormCount
this.mySubscribeCount = mySubscribeCount
})
}
}
}
import GlobalHeader from './GlobalHeader'
export default GlobalHeader
import { shopAxios } from '@/utils/request'
const api = {
userInfo:"/shop/index/loginUserInfo",
allCount:'/shop/index/allCount'
}
export function userInfo(){
return shopAxios({
url:api.userInfo,
method:'get'
})
}
export function allCount(){
return shopAxios({
url:api.allCount,
method:'get'
})
}
版本库地址:待...
Question
How to use component s-table
paging
Describe the solution you'd like
A clear and concise description of what you want to happen.
Additional context
Add any other context or screenshots about the feature request here.
如题
Describe the bug (描述 Bug)
添加完动态路由后,next方法匹配不到路由会白屏不会匹配到*跳转404
To Reproduce (重现步骤)
Steps to reproduce the behavior:
1、登录跳转push一个不存在的路由
2、接着就会白屏
Code Here
原作者代码
if (to.path === redirect) {
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
next({ ...to, replace: true });
} else {
// 跳转到目的路由
next({ path: redirect });
}
更改后代码
router.push({path:redirect})
Expected behavior(你期待的是什么?)
A clear and concise description of what you expected to happen.
期待作者能解释一下next方法和push方法的区别
如果不想要原本的页面,应该怎么删掉呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.