/** * 列 */ import template from "./Col.html"; import style from "antd/lib/grid/style/index.css"; class Col { useModules = ["esNgAntd"]; props = { span: String, offset: String }; state = { className: ["ant-col"] }; template = template; constructor(antdRow) { esNgAntd.createStyle("ant-grid", style); $element[0].removeAttribute("ng-style"); $element[0].removeAttribute("ng-transclude"); $element[0].removeAttribute("ng-class"); $element[0].removeAttribute("span"); if (antdRow) { this.antdRow = antdRow.getContext(); } if (this.props.span) { this.state.className.push("ant-col-" + this.props.span); } // if (this.props.xs) { // this.state.className.push("col-xs-" + this.props.xs); // } // if (this.props.sm) { // this.state.className.push("col-sm-" + this.props.sm); // } // if (this.props.md) { // this.state.className.push("col-md-" + this.props.md); // } // if (this.props.lg) { // this.state.className.push("col-lg-" + this.props.lg); // } // this.state.className = this.state.className.join(" "); } }