Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vap

Package Overview
Dependencies
Maintainers
3
Versions
568
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vap - npm Package Compare versions

Comparing version 3.8.140 to 3.8.141

1

_common/ApiTable/index.js

@@ -162,3 +162,2 @@ "use strict";

};
console.log(props.pageSize);
_this.api = _this.props.query;

@@ -165,0 +164,0 @@ _this.rowKey = _this.props.rowKey || 'id';

2

_common/Table/ACTIONS.js

@@ -36,3 +36,3 @@ "use strict";

var title = React.createElement("span", null,
"\u786E\u5B9A\u8981\u5220\u9664",
"\u786E\u8BA4\u5220\u9664",
React.createElement("b", null, props.name),

@@ -39,0 +39,0 @@ "\u5417?");

@@ -24,3 +24,3 @@ import * as React from 'react';

private add;
private updateData;
updateData(data: any, pos?: number[]): Promise<void>;
private update;

@@ -27,0 +27,0 @@ private deleteNode;

@@ -339,7 +339,7 @@ "use strict";

};
ActionTree.prototype.updateData = function (data) {
ActionTree.prototype.updateData = function (data, pos) {
return __awaiter(this, void 0, void 0, function () {
var _a, api, objectName, _b, parentField, titleField, _c, tree, editIdx, root, title, resp, idx, rootPath, nodePath, node, treeData;
return __generator(this, function (_d) {
switch (_d.label) {
var _a, api, objectName, _b, parentField, titleField, tree, root, title, resp, idx, rootPath, nodePath, node, treeData;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:

@@ -349,4 +349,4 @@ this.setState({ showEdit: false });

_b = this.fields, parentField = _b.parentField, titleField = _b.titleField;
_c = this.state, tree = _c.tree, editIdx = _c.editIdx;
root = _.concat([], editIdx);
tree = this.state.tree;
root = _.concat([], (_.isArray(pos) && pos.length) ? pos : this.state.editIdx);
if (root.length <= 0) {

@@ -358,3 +358,3 @@ return [2 /*return*/];

case 1:
resp = _d.sent();
resp = _c.sent();
if (resp.code != '0') {

@@ -458,6 +458,6 @@ antd_1.message.error("".concat(objectName, "\u4FEE\u6539\u5931\u8D25 \uFF1A ").concat(resp.message));

if (rootPath) {
_.set(treeData, rootPath, utils_1.Model.del(_.get(treeData, rootPath), [node[keyField]], 'id'));
_.set(treeData, rootPath, utils_1.Model.del(_.get(treeData, rootPath), [node[keyField]], keyField));
}
else {
treeData = utils_1.Model.del(treeData, [node[keyField]], 'id');
treeData = utils_1.Model.del(treeData, [node[keyField]], keyField);
}

@@ -667,3 +667,3 @@ this.setState({ tree: treeData });

var _a = this, titleField = _a.fields.titleField, objectName = _a.actions.objectName, _b = _a.state, showAdd = _b.showAdd, showEdit = _b.showEdit, editObject = _b.editObject;
return React.createElement(UFormModal_1.UFormModal, { title: "添加" + objectName, visible: showAdd || showEdit, data: showEdit ? editObject : null, onCancel: function () { return _this.setState({ showAdd: false, showEdit: false }); }, onOk: function (data) {
return React.createElement(UFormModal_1.UFormModal, { title: showEdit ? '编辑' : '添加' + objectName, visible: showAdd || showEdit, data: showEdit ? editObject : null, onCancel: function () { return _this.setState({ showAdd: false, showEdit: false }); }, onOk: function (data) {
showEdit ? _this.updateData(data) : _this.add(data);

@@ -670,0 +670,0 @@ }, fields: this.props.formFields ? this.props.formFields : [

@@ -111,3 +111,3 @@ "use strict";

}
this.setState({ selectedKeys: selectedKeys }, function () { return _this.props.onSelect(selectedKeys[0], evt.selectedNodes[0].props.dataRef, parent); });
this.setState({ selectedKeys: selectedKeys }, function () { return _this.props.onSelect(selectedKeys[0], evt.selectedNodes[0].props.dataRef, parent, evt.selectedNodes[0].props.pos); });
};

@@ -114,0 +114,0 @@ BaseTree.prototype.componentDidUpdate = function (prevProps) {

@@ -48,4 +48,6 @@ /// <reference types="react" />

* 参数2 : 选中的对象,可能会返回空
* 参数3 : 选中对象的父节点
* 参数4 : 选中对象的位置
*/
onSelect?: (key: any, object?: any, parent?: any) => void;
onSelect?: (key: any, object?: any, parent?: any, pos?: any) => void;
/**

@@ -52,0 +54,0 @@ * 搜索关键字

{
"name": "vap",
"version": "3.8.140",
"version": "3.8.141",
"description": "vap - framework for webapps, support micro-service(base on vap-base) and single-web-application(base on vap-base)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -122,5 +122,7 @@ "use strict";

default_1.formatStarStr = function (value, beginNum, endNum) {
var leftNum = beginNum ? beginNum : 2;
var rightNum = endNum ? endNum : 2;
return value.substring(0, leftNum) + '***' + value.substring(value.length - rightNum, value.length);
var leftNum = _.isNumber(beginNum) ? beginNum : 2;
var rightNum = _.isNumber(endNum) ? endNum : 4;
var vLen = value.length;
var rNum = vLen - rightNum < 0 ? vLen : vLen - rightNum;
return value.substring(0, leftNum) + '***' + value.substring(rNum, vLen);
};

@@ -127,0 +129,0 @@ /**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc