Comparing version 1.2.2 to 1.2.3
@@ -37,11 +37,2 @@ import { ModalProps } from 'antd/lib/modal/Modal'; | ||
}; | ||
onChange?: { | ||
Function(txt: string): void; | ||
}; | ||
onFocus?: { | ||
Function(txt: string): void; | ||
}; | ||
onBlur?: { | ||
Function(txt: string): void; | ||
}; | ||
} | ||
@@ -48,0 +39,0 @@ export interface FromModalProps extends ModalProps { |
@@ -24,3 +24,3 @@ /// <reference types="react" /> | ||
edit(record: any): void; | ||
renderColumns(text: any, record: any, column: Column<T>): any; | ||
renderColumns(text: any, record: any, column: Column<T>, render: any): any; | ||
doDel(record: any): void; | ||
@@ -27,0 +27,0 @@ buildEditColumn(): Column<T>[]; |
@@ -152,5 +152,8 @@ "use strict"; | ||
}; | ||
ListModal.prototype.renderColumns = function (text, record, column) { | ||
ListModal.prototype.renderColumns = function (text, record, column, render) { | ||
var _this = this; | ||
if (column.readonly && this.mode == interface_1.MODE.EDIT) { | ||
if (column.readonly) { | ||
if (render) { | ||
return render(text); | ||
} | ||
if (column.options) { | ||
@@ -160,8 +163,6 @@ var val = _.find(column.options, { value: text + '' }); | ||
} | ||
else { | ||
return text; | ||
} | ||
return text; | ||
} | ||
if (column.options) { | ||
if (record._edit) { | ||
if (record && record._edit) { | ||
if (column.options) { | ||
if (column.type == 'switch') { | ||
@@ -177,10 +178,12 @@ var checked = !(text == (column.options[1].value + '')); | ||
} | ||
else { | ||
var val = _.find(column.options, { value: text + '' }); | ||
return val ? val.name : '未知'; | ||
} | ||
return React.createElement(antd_1.Input, { size: "small", style: { padding: 0, height: 22 }, defaultValue: text, onChange: function (e) { return _this.editObject[column.dataIndex] = e.target.value; } }); | ||
} | ||
else { | ||
return record._edit ? React.createElement(antd_1.Input, { size: "small", style: { padding: 0, height: 22 }, defaultValue: text, onChange: function (e) { return _this.editObject[column.dataIndex] = e.target.value; } }) : text; | ||
if (render) { | ||
return render(text); | ||
} | ||
if (column.options) { | ||
var val = _.find(column.options, { value: text + '' }); | ||
return val ? val.name : '未知'; | ||
} | ||
return text; | ||
}; | ||
@@ -203,3 +206,6 @@ ListModal.prototype.doDel = function (record) { | ||
columns.map(function (column) { | ||
column.render = function (text, record) { return _this.renderColumns(text === undefined ? (column.options ? column.options[0].value + '' : '') : text + '', record, column); }; | ||
var render = column.render; | ||
// @ts-ignore | ||
// column.orginRender = column.render; | ||
column.render = function (text, record) { return _this.renderColumns(text === undefined ? (column.options ? column.options[0].value + '' : '') : text + '', record, column, render); }; | ||
}); | ||
@@ -206,0 +212,0 @@ return columns; |
@@ -16,2 +16,6 @@ import { ModalProps } from 'antd/lib/modal/Modal'; | ||
show: boolean; | ||
/** | ||
* 查询地址 | ||
* | ||
*/ | ||
query: string; | ||
@@ -18,0 +22,0 @@ add?: string; |
@@ -38,3 +38,2 @@ /** | ||
export { Progress } from 'antd'; | ||
export { Radio } from 'antd'; | ||
export { Rate } from 'antd'; | ||
@@ -83,1 +82,4 @@ export { Select } from 'antd'; | ||
export declare function HEIGHT(...height: number[]): string; | ||
export { default as DropDownPanel } from './DropDown'; | ||
import { VRadio } from './Page/Radio'; | ||
export { VRadio as Radio }; |
@@ -75,38 +75,37 @@ "use strict"; | ||
exports.Progress = antd_34.Progress; | ||
// export { Radio } from 'antd'; | ||
var antd_35 = require("antd"); | ||
exports.Radio = antd_35.Radio; | ||
exports.Rate = antd_35.Rate; | ||
var antd_36 = require("antd"); | ||
exports.Rate = antd_36.Rate; | ||
exports.Select = antd_36.Select; | ||
var antd_37 = require("antd"); | ||
exports.Select = antd_37.Select; | ||
exports.Slider = antd_37.Slider; | ||
var antd_38 = require("antd"); | ||
exports.Slider = antd_38.Slider; | ||
exports.Spin = antd_38.Spin; | ||
var antd_39 = require("antd"); | ||
exports.Spin = antd_39.Spin; | ||
exports.Steps = antd_39.Steps; | ||
var antd_40 = require("antd"); | ||
exports.Steps = antd_40.Steps; | ||
exports.Switch = antd_40.Switch; | ||
var antd_41 = require("antd"); | ||
exports.Switch = antd_41.Switch; | ||
exports.Transfer = antd_41.Transfer; | ||
var antd_42 = require("antd"); | ||
exports.Transfer = antd_42.Transfer; | ||
exports.Tree = antd_42.Tree; | ||
var antd_43 = require("antd"); | ||
exports.Tree = antd_43.Tree; | ||
exports.TreeSelect = antd_43.TreeSelect; | ||
var antd_44 = require("antd"); | ||
exports.TreeSelect = antd_44.TreeSelect; | ||
exports.Tabs = antd_44.Tabs; | ||
var antd_45 = require("antd"); | ||
exports.Tabs = antd_45.Tabs; | ||
exports.Tag = antd_45.Tag; | ||
var antd_46 = require("antd"); | ||
exports.Tag = antd_46.Tag; | ||
exports.TimePicker = antd_46.TimePicker; | ||
var antd_47 = require("antd"); | ||
exports.TimePicker = antd_47.TimePicker; | ||
exports.Timeline = antd_47.Timeline; | ||
var antd_48 = require("antd"); | ||
exports.Timeline = antd_48.Timeline; | ||
exports.Tooltip = antd_48.Tooltip; | ||
var antd_49 = require("antd"); | ||
exports.Tooltip = antd_49.Tooltip; | ||
exports.Mention = antd_49.Mention; | ||
var antd_50 = require("antd"); | ||
exports.Mention = antd_50.Mention; | ||
exports.Upload = antd_50.Upload; | ||
var antd_51 = require("antd"); | ||
exports.Upload = antd_51.Upload; | ||
var antd_52 = require("antd"); | ||
exports.version = antd_52.version; | ||
exports.version = antd_51.version; | ||
/** | ||
@@ -153,6 +152,8 @@ * Row 被重写 | ||
exports.HEIGHT = HEIGHT; | ||
var DropDown_1 = require("./DropDown"); | ||
exports.DropDownPanel = DropDown_1.default; | ||
// //Radio | ||
// import {VapRadio,Button,Group} from './Page/Radio'; | ||
// VapRadio.Button = Button; | ||
// VapRadio.Group = Group; | ||
// export { VapRadio as Radio }; | ||
var Radio_1 = require("./Page/Radio"); | ||
exports.Radio = Radio_1.VRadio; | ||
Radio_1.VRadio.Button = Radio_1.VButton; | ||
Radio_1.VRadio.Group = Radio_1.VGroup; |
@@ -5,8 +5,8 @@ /// <reference types="react" /> | ||
import RadioButton from 'antd/lib/radio/radioButton'; | ||
export declare class Button extends RadioButton { | ||
export declare class VButton extends RadioButton { | ||
} | ||
export declare class Group extends RadioGroup { | ||
export declare class VGroup extends RadioGroup { | ||
render(): JSX.Element; | ||
} | ||
export declare class VapRadio extends Radio { | ||
export declare class VRadio extends Radio { | ||
} |
@@ -26,16 +26,16 @@ "use strict"; | ||
var radioButton_1 = require("antd/lib/radio/radioButton"); | ||
var Button = /** @class */ (function (_super) { | ||
__extends(Button, _super); | ||
function Button() { | ||
var VButton = /** @class */ (function (_super) { | ||
__extends(VButton, _super); | ||
function VButton() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return Button; | ||
return VButton; | ||
}(radioButton_1.default)); | ||
exports.Button = Button; | ||
var Group = /** @class */ (function (_super) { | ||
__extends(Group, _super); | ||
function Group() { | ||
exports.VButton = VButton; | ||
var VGroup = /** @class */ (function (_super) { | ||
__extends(VGroup, _super); | ||
function VGroup() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
Group.prototype.render = function () { | ||
VGroup.prototype.render = function () { | ||
var param = _.assign({}, this.props); | ||
@@ -50,12 +50,12 @@ if (_.has(param, 'className')) { | ||
}; | ||
return Group; | ||
return VGroup; | ||
}(group_1.default)); | ||
exports.Group = Group; | ||
var VapRadio = /** @class */ (function (_super) { | ||
__extends(VapRadio, _super); | ||
function VapRadio() { | ||
exports.VGroup = VGroup; | ||
var VRadio = /** @class */ (function (_super) { | ||
__extends(VRadio, _super); | ||
function VRadio() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return VapRadio; | ||
return VRadio; | ||
}(antd_1.Radio)); | ||
exports.VapRadio = VapRadio; | ||
exports.VRadio = VRadio; |
{ | ||
"name": "vap", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "vap", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
/// <reference types="react" /> | ||
declare const _default: { | ||
timeChange: (date: any) => string; | ||
Status: (value: string | number, map: any) => JSX.Element; | ||
@@ -4,0 +5,0 @@ Map: (map: any, key: string, def?: string) => string; |
@@ -6,2 +6,7 @@ "use strict"; | ||
exports.default = { | ||
//时间戳转化为年月日 | ||
timeChange: function (date) { | ||
var da = new Date(date); | ||
return da.getFullYear() + '-' + da.getMonth() + '-' + da.getDate(); | ||
}, | ||
Status: function (value, map) { | ||
@@ -8,0 +13,0 @@ return React.createElement("div", null); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139895
75
3608