涨知识了,Get请求居然支持Body。
说下关于问题我的理解吧。
1.支持,个人建议非必要不要这样用。
2.你请求失败应该是 axios不支持get传递body(我是后端这个回答来自于https://www.zhihu.com/questio...)
没有足够的数据
(゚∀゚ )
暂时没有任何数据
无敌炎龙铠甲 赞了回答 · 1月18日
涨知识了,Get请求居然支持Body。
说下关于问题我的理解吧。
1.支持,个人建议非必要不要这样用。
2.你请求失败应该是 axios不支持get传递body(我是后端这个回答来自于https://www.zhihu.com/questio...)
涨知识了,Get请求居然支持Body。说下关于问题我的理解吧。1.支持,个人建议非必要不要这样用。2.你请求失败应该是 axios不支持get传递body(我是后端这个回答来自于[链接])
关注 3 回答 3
无敌炎龙铠甲 赞了回答 · 1月18日
脱离源码的逼逼都是瞎扯淡,
首先看springmvc对于参数绑定,使用的是HandlerMethodArgumentResolver,接口两个方法
1:supportsParameter(支持解析的类型)
2:resolveArgument(参数解析逻辑)
json请求实现类则是RequestResponseBodyMethodProcessor,,很明显和get post无关;
脱离源码的逼逼都是瞎扯淡,首先看springmvc对于参数绑定,使用的是HandlerMethodArgumentResolver,接口两个方法1:supportsParameter(支持解析的类型)2:resolveArgument(参数解析逻辑)json请求实现类则是RequestResponseBodyMethodProcessor,,很明显和get p...
关注 3 回答 3
无敌炎龙铠甲 赞了回答 · 1月15日
An intersection type combines multiple types into one. This allows you to add together existing types to get a single type that has all the features you need. For example,Person & Serializable & Loggable
is aPerson
andSerializable
andLoggable
. That means an object of this type will have all members of all three types.
表示这个变量同时拥有所有类型所需要的成员,可以作为其中任何一个类型使用。
An intersection type combines multiple types into one. This allows you to add together existing types to get a single type that has all the features you need. For example, Person & Serializable & Loggable is a Person and Serializable and L...
关注 2 回答 1
无敌炎龙铠甲 提出了问题 · 1月14日
SpringBoot
后端,axios
前端发请求,但是不论把参数放在params还是data里,请求返回的都是400 Bad Request
.
上网查了一些资料,看到说@GetMapping
和@RequestBody
是互斥的,但是我用postman
却能成功传请求拿到返回值.
@GetMapping(value = "/view/tagtree")
public SingleNodeConsanguinity viewTagTree(@RequestBody TagLocateInfoBean tagLocateInfoBean, HttpServletRequest request) {
SingleNodeConsanguinity singleNodeConsanguinity = viewTagService.getConsanguinity(tagLocateInfoBean);
return singleNodeConsanguinity;
}
let param = new URLSearchParams();
param.append("type", "QFX");
param.append("sheetName", "获取数据");
param.append("tag", "");
param.append("bqId", "");
console.log(param);
axios.get("http://localhost:8080/qfx/demand/view/tagtree",
param
)
.then((res) => {
console.log(res);
})
.catch(err => {
console.log('出错了');
console.log(err);
});
@RequestBody
能用来接收get
请求的参数吗?SpringBoot后端,axios前端发请求,但是不论把参数放在params还是data里,请求返回的都是400 Bad Request.
关注 3 回答 3
无敌炎龙铠甲 赞了回答 · 2020-12-25
变成 block。然后宽高100%。
当然这个问题难道不应该考虑把事件绑定在外面的盒子上吗?
变成 block。然后宽高100%。当然这个问题难道不应该考虑把事件绑定在外面的盒子上吗?
关注 4 回答 2
无敌炎龙铠甲 赞了回答 · 2020-12-25
直接用css的after伪元素就可以,一般封装一个mixin
@mixin extend-click() {
//扩展点击区域
position: relative;
&:before {
content: "";
position: absolute;
top: -6px;
left: -6px;
right: -6px;
bottom: -6px;
}
}
直接用css的after伪元素就可以,一般封装一个mixin {代码...}
关注 4 回答 2
无敌炎龙铠甲 提出了问题 · 2020-12-22
想要给文字添加点击效果,但是和图里的一样,"-"的'受力面积'太小了,导致只能对准点击才有效,不太友好
点击圆框内任何地方都能触发文字的点击事件
所有线条都是通过svg画的, 文字'-'是text标签.
只给text标签绑定,不绑给circle.
有啥办法吗
drawCircle: function (startY, container, tag, hasChild) {
const self = this;
const tagMap = self.options.tagMap;
let svgContainer = container.firstChild;
if (!hasChild) {
let newPath = document.createElementNS("http://www.w3.org/2000/svg", "path");
newPath.setAttribute('stroke', 'black');
newPath.setAttribute('fill', 'transparent');
newPath.setAttribute('stroke-width', '1px');
newPath.setAttribute('d', `M 0 ${startY - container.offsetTop} h 50`)
svgContainer.appendChild(newPath);
}
let circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
circle.setAttribute('stroke', 'black');
circle.setAttribute('fill', 'white');
circle.setAttribute('stroke-width', '1px');
circle.setAttribute('cx', 50);
circle.setAttribute('cy', startY - container.offsetTop);
circle.setAttribute('r', '10px');
let text = document.createElementNS("http://www.w3.org/2000/svg", "text");
text.setAttribute('x', 50);
text.setAttribute('y', startY - container.offsetTop + 5);
text.setAttribute('text-anchor', 'middle');
text.setAttribute('fill', 'black');
text.setAttribute('class', 'black');
text.innerHTML = hasChild ? '-' : tagMap.get(tag).length
text.addEventListener("click", self.controlVisibilityOfChildren.bind(self, tag))
svgContainer.appendChild(circle);
svgContainer.appendChild(text);
},
原因想要给文字添加点击效果,但是和图里的一样,"-"的'受力面积'太小了,导致只能对准点击才有效,不太友好目标点击圆框内任何地方都能触发文字的点击事件前提所有线条都是通过svg画的, 文字'-'是text标签.只给text标签绑定,不绑给circle.有啥办法吗 {代码...}
关注 4 回答 2
查看全部 个人动态 →
(゚∀゚ )
暂时没有
(゚∀゚ )
暂时没有
注册于 2019-06-14
个人主页被 328 人浏览
推荐关注