Commit d6436262cba5ffa5fafe3d7c215f2ca938133ff2

Authored by Imshann
1 parent 45883b16

feat(Col): 新增offset属性

build/..js deleted
build/BreadcrumbItem/BreadcrumbItem.html
1 <span> 1 <span>
2 - <span class="ant-breadcrumb-link" ng-transclude></span> 2 + <span class="ant-breadcrumb-link">
  3 + <a ng-href="{{href}}" target="_self" ng-transclude></a>
  4 + </span>
3 <span class="ant-breadcrumb-separator">/</span> 5 <span class="ant-breadcrumb-separator">/</span>
4 </span> 6 </span>
5 \ No newline at end of file 7 \ No newline at end of file
build/BreadcrumbItem/BreadcrumbItem.js
@@ -5,6 +5,9 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;antdBreadcrumbItem&quot;, function () { @@ -5,6 +5,9 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;antdBreadcrumbItem&quot;, function () {
5 restrict: "E", 5 restrict: "E",
6 transclude: true, 6 transclude: true,
7 replace: true, 7 replace: true,
  8 + scope: {
  9 + href: "@",
  10 + },
8 template: template, 11 template: template,
9 }; 12 };
10 }); 13 });
build/Col/Col.html
1 -<div ng-class="'ant-col'+(span?' ant-col-'+span:'')" ng-style="{paddingLeft:antdRow.state.gutterHalf+'px',paddingRight:antdRow.state.gutterHalf+'px'}" ng-transclude></div>  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +<div ng-class="'ant-col'+(span?' ant-col-'+span:'')+(offset?' ant-col-offset-'+offset:'')" ng-style="{paddingLeft:antdRow.state.gutterHalf+'px',paddingRight:antdRow.state.gutterHalf+'px'}" ng-transclude></div>
3 \ No newline at end of file 3 \ No newline at end of file
@@ -11,6 +11,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;antdCol&quot;, function (esNgAntd) { @@ -11,6 +11,7 @@ angular.module(&quot;esNgAntd&quot;).directive(&quot;antdCol&quot;, function (esNgAntd) {
11 replace: true, 11 replace: true,
12 scope: { 12 scope: {
13 span: "@", 13 span: "@",
  14 + offset: "@",
14 }, 15 },
15 template: template, 16 template: template,
16 controller: function ($scope, $element, $attrs) { 17 controller: function ($scope, $element, $attrs) {
build/Table/Table.html
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 </tr> 30 </tr>
31 </thead> 31 </thead>
32 <tbody class="ant-table-tbody"> 32 <tbody class="ant-table-tbody">
33 - <tr ng-repeat="(key, record) in state.dataSource track by record[state.rowKey]" class="ant-table-row"> 33 + <tr ng-repeat="(key, record) in state.dataSource track by record[state.rowKey]+'-'+$index" class="ant-table-row">
34 <td ng-if="rowSelection" class="ant-table-selection-column"> 34 <td ng-if="rowSelection" class="ant-table-selection-column">
35 <span> 35 <span>
36 <antd-checkbox checked="{{record.checked}}" disabled="{{record.disabled}}" on-change="handleSelect(event,$index)" /> 36 <antd-checkbox checked="{{record.checked}}" disabled="{{record.disabled}}" on-change="handleSelect(event,$index)" />
src/BreadcrumbItem/BreadcrumbItem.html
1 <span> 1 <span>
2 - <span className="ant-breadcrumb-link">{children}</span> 2 + <span className="ant-breadcrumb-link">
  3 + <a ng-href={href} target="_self">{children}</a>
  4 + </span>
3 <span className="ant-breadcrumb-separator">/</span> 5 <span className="ant-breadcrumb-separator">/</span>
4 </span> 6 </span>
5 \ No newline at end of file 7 \ No newline at end of file
src/BreadcrumbItem/BreadcrumbItem.js
1 import template from "./BreadcrumbItem.html"; 1 import template from "./BreadcrumbItem.html";
2 2
3 class BreadcrumbItem { 3 class BreadcrumbItem {
  4 + props = {
  5 + href: String,
  6 + };
4 template = template; 7 template = template;
5 -}  
6 \ No newline at end of file 8 \ No newline at end of file
  9 +}
1 -<div className={"ant-col"+(span?" ant-col-"+span: "")} style={{ paddingLeft: antdRow.state.gutterHalf + 'px', paddingRight: antdRow.state.gutterHalf + 'px' }}>{children}</div>  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +<div className={"ant-col"+(span?" ant-col-"+span: "")+(offset?" ant-col-offset-"+offset: "")} style={{ paddingLeft: antdRow.state.gutterHalf + 'px', paddingRight: antdRow.state.gutterHalf + 'px' }}>{children}</div>
3 \ No newline at end of file 3 \ No newline at end of file
@@ -10,6 +10,7 @@ class Col { @@ -10,6 +10,7 @@ class Col {
10 10
11 props = { 11 props = {
12 span: String, 12 span: String,
  13 + offset: String
13 }; 14 };
14 15
15 state = { 16 state = {
src/Table/Table.html
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 </thead> 34 </thead>
35 <tbody className="ant-table-tbody"> 35 <tbody className="ant-table-tbody">
36 {state.dataSource.map(function (record, key) { 36 {state.dataSource.map(function (record, key) {
37 - return <tr className="ant-table-row" key="record[state.rowKey]"> 37 + return <tr className="ant-table-row" key="record[state.rowKey]+'-'+$index">
38 {rowSelection && <td className="ant-table-selection-column"> 38 {rowSelection && <td className="ant-table-selection-column">
39 <span> 39 <span>
40 <antd-checkbox checked={record.checked} disabled={record.disabled} 40 <antd-checkbox checked={record.checked} disabled={record.disabled}
@@ -6,13 +6,13 @@ module.exports = { @@ -6,13 +6,13 @@ module.exports = {
6 entry: "./build/index.js", 6 entry: "./build/index.js",
7 output: { 7 output: {
8 // bpms 8 // bpms
9 - // path: "/Users/shann/Project/essa/bpms/bpms-webapp/src/main/webapp/lib/ng-antd", 9 + path: "/Users/shann/Project/essa/bpms/bpms-webapp/src/main/webapp/lib/ng-antd",
10 // boss 10 // boss
11 // path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd", 11 // path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd",
12 // mvo 12 // mvo
13 // path: "/Users/shann/Project/essa/mvo/mvo-webapp/public/browser-vendor/ng-antd", 13 // path: "/Users/shann/Project/essa/mvo/mvo-webapp/public/browser-vendor/ng-antd",
14 // local 14 // local
15 - path: path.resolve(__dirname, "dist"), 15 + // path: path.resolve(__dirname, "dist"),
16 filename: "ng-antd.js", 16 filename: "ng-antd.js",
17 }, 17 },
18 module: { 18 module: {