parent
84dbf885ee
commit
049aa1e894
@ -0,0 +1,31 @@ |
|||||||
|
var mock=require('../../public/javascripts/mock') |
||||||
|
module.exports= { |
||||||
|
//**通用右键菜单接口
|
||||||
|
addContextMenu:function (router,prefix, label) |
||||||
|
{ |
||||||
|
router.post(`/${prefix}/:y/addEmpty`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`${label}插入第${+req.params.y + 1}空白行成功`)) |
||||||
|
}) |
||||||
|
|
||||||
|
router.post(`/${prefix}/:y/copy`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`拷贝${+req.params.y + 1}行${label}并插入到下一行成功`)) |
||||||
|
}) |
||||||
|
|
||||||
|
router.delete(`/${prefix}/:y/del`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`删除第${+req.params.y + 1}行${label}成功`)) |
||||||
|
}) |
||||||
|
|
||||||
|
router.delete(`/${prefix}/:y/clean`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`清空第${+req.params.y + 1}行${label}成功`)) |
||||||
|
}) |
||||||
|
|
||||||
|
router.patch(`/${prefix}/:y/up`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`${label}第${+req.params.y + 1}行跟第${+req.params.y}行交换位置`)) |
||||||
|
}) |
||||||
|
|
||||||
|
router.patch(`/${prefix}/:y/down`, function (req, res, next) { |
||||||
|
return res.json(mock.ok(`${label}第${+req.params.y + 1}行跟第${+req.params.y + 2}行交换位置`)) |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
|
|
Loading…
Reference in new issue