UNPKG

@dcp-designable/components

Version:

公共组件及业务组件

76 lines 3.64 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); var react_1 = __importStar(require("react")); var icons_1 = require("@ant-design/icons"); var dcp_design_react_1 = require("dcp-design-react"); require("./index.less"); var RightArea = /** @class */ (function (_super) { __extends(RightArea, _super); function RightArea(props) { var _this = _super.call(this, props) || this; _this.deleteRow = function (param, index) { var tempData = _this.props.data; tempData.splice(index, 1); _this.props.onChecked(tempData); }; _this.state = { selData: [], }; console.log(_this.props); return _this; } RightArea.prototype.componentDidMount = function () { }; RightArea.prototype.render = function () { var _this = this; var selData = this.props.data; return (react_1.default.createElement("div", { className: "right-content" }, react_1.default.createElement("table", null, selData && selData.map(function (item, index) { return (react_1.default.createElement("tr", { key: index }, react_1.default.createElement("td", { className: "right-name" }, item.value), react_1.default.createElement("td", { className: "right-fun" }, react_1.default.createElement(dcp_design_react_1.DcpButton, { shape: "circle", icon: react_1.default.createElement(icons_1.MinusOutlined, null), size: "small", onClick: function () { return _this.deleteRow(item, index); } })))); })))); }; return RightArea; }(react_1.Component)); exports.default = RightArea; //# sourceMappingURL=RightArea.js.map