我想在高亮局导出选项中隐藏默认按钮("导出"和"打印").
您可以在http://jsfiddle.net/fXHB5/3496/ 进行演示,此链接中有3个按钮1.自定义按钮2.导出按钮3.打印按钮.
在这种情况下,我想只显示第一个按钮并隐藏"导出按钮"和"打印按钮"
我正在尝试使用https://www.npmjs.com/package/json-server作为模拟后端,我能够匹配 get 的 URL,但如何为 POST 调用返回一些模拟响应。
就像创建用户 URL 一样
URL - http://localhost:4000/user
Method - POST
Request Data - {name:"abc", "address":"sample address"}
expected response -
httpStats Code - 200,
Response Data - {"message":"user-created", "user-id":"sample-user-id"}
Run Code Online (Sandbox Code Playgroud)
在某些情况下,我还想发送自定义 http 代码,例如 500,423,404,401 等,具体取决于某些数据。
最大的问题是我的代码没有返回任何 POST 响应,它只在 JSON 中插入记录
我在立即调用函数表达式(IIFE)中编写函数.
(function(){
"use strict";
function EventService(){
//MASTER CLASS
}
EventService.prototype.eventObj = function(){
var ES = getEvwentMapping();
return EventService;
};
EventService.prototype.popup = function(){
eventService.eventObj.createPopup();
};
EventService.prototype.drilldown = function(){
eventService.eventObj.createDrilldown();
};
})();
eventService();
Run Code Online (Sandbox Code Playgroud)
这里我收到错误,因为eventService()未定义.
javascript ×3
highcharts ×1
highstock ×1
jquery ×1
json-server ×1
mocking ×1
node.js ×1
prototype ×1