Commit d6436262cba5ffa5fafe3d7c215f2ca938133ff2

Authored by Imshann
1 parent 45883b16

feat(Col): 新增offset属性

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