Skip to content

Commit

Permalink
Merge pull request NG-ZORRO#9 from wanchang1121/master
Browse files Browse the repository at this point in the history
修改样式 & 文档API
  • Loading branch information
giscafer authored Mar 1, 2018
2 parents 1e555f4 + 29756ec commit f4dabd0
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 80 deletions.
18 changes: 0 additions & 18 deletions src/custom-components/city-select/city-select.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,6 @@
text-align: center;
}

.input {
position: relative;
i {
position: absolute;
width: 25px;
height: 25px;
background: url("/assets/images/login/delete.gif") no-repeat center;
right: 10px;
top: 11px;
cursor: pointer;
}
.hide-pass {
top: 13px !important;
right: 10px;
background: url("/assets/images/login/hide.gif") no-repeat center;
}
}

.ant-select-selection__choice__remove {
font-style: normal;
vertical-align: baseline;
Expand Down
2 changes: 1 addition & 1 deletion src/custom-components/city-select/city-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class CitySelectComponent implements OnInit, AfterViewInit, ControlValueA
@Input()
maxNum: number | null = 3;
@Input()
placeholder: string = '';
placeholder: string = '请选择地区';

@Input() set width(v) {
const width = parseInt(v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {NzMessageService} from '../../../../index.showcase';
styles: []
})
export class CitySelectDemoBasicComponent implements OnInit {
value: any ='440106000000';
value: any ;

ngOnInit() {

Expand Down
136 changes: 76 additions & 60 deletions src/showcase/custom-demo/city-select/city-select-demo.html
Original file line number Diff line number Diff line change
@@ -1,65 +1,81 @@
<article>
<section class="markdown"><h1>city-select 省市区选择</h1>
<section class="markdown">
<h2 id="何时使用"><span>如何使用</span>
<a class="anchor">#</a>
</h2>
<p>点击输入框,显示地址,然后选择</p>
</section>
<h2>代码演示<i class="code-box-expand-trigger anticon anticon-appstore" title="展开全部代码"></i></h2>
<section class="markdown"><h1>city-select 省市区选择</h1>
<section class="markdown">
<h2 id="何时使用"><span>如何使用</span>
<a class="anchor">#</a>
</h2>
<p>点击输入框,显示地址,然后选择</p>
</section>
<div nz-row [nzGutter]="8">
<div nz-col [nzSpan]="12">
<nz-code-box [nzTitle]="'基本使用'" id="city-select-demo-basic" [nzCode]="CitySelectDemoBasicCode">
<city-select-demo-basic demo></city-select-demo-basic>
<div intro>
<p>基本使用。</p>
</div>
</nz-code-box>
<h2>代码演示<i class="code-box-expand-trigger anticon anticon-appstore" title="展开全部代码"></i></h2>
</section>
<div nz-row [nzGutter]="8">
<div nz-col [nzSpan]="12">
<nz-code-box [nzTitle]="'基本使用'" id="city-select-demo-basic" [nzCode]="CitySelectDemoBasicCode">
<city-select-demo-basic demo></city-select-demo-basic>
<div intro>
<p>基本使用。</p>
</div>
</nz-code-box>
</div>
<section class="markdown api-container">
<h2 id="API"><span>API</span>
<!-- <a class="anchor">#</a> -->
</h2>
<h3 id="Select props"><span>city-select</span>
<!-- <a class="anchor">#</a> -->
</h3>
<table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
<th>类型</th>
<th>默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td>ngModel</td>
<td>指定当前选中的条目,支持双向绑定</td>
<td>
Array(多选)/String/Object(单选)
</td>
<td></td>
</tr>
<tr>
<td>placeholder</td>
<td>输入框默认提示</td>
<td>
String
</td>
<td>请选择品名</td>
</tr>
<tr>
<td>maxNum</td>
<td>限制选择数量</td>
<td>
String
</td>
<td>3</td>
</tr>
</tbody>
</table>
</section>
</div>
<section class="markdown api-container">
<h2 id="API"><span>API</span>
<!-- <a class="anchor">#</a> -->
</h2>
<h3 id="Select props"><span>city-select</span>
<!-- <a class="anchor">#</a> -->
</h3>
<table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
<th>类型</th>
<th>默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td>ngModel</td>
<td>指定当前选中的条目,支持双向绑定</td>
<td>
Array(code)
</td>
<td></td>
</tr>
<tr>
<td>onChange</td>
<td>值改变事件</td>
<td>
EventEmitter
</td>
<td></td>
</tr>
<tr>
<td>placeholder</td>
<td>输入框默认提示</td>
<td>
String
</td>
<td>请选择地区</td>
</tr>
<tr>
<td>maxNum</td>
<td>限制选择数量</td>
<td>
String
</td>
<td>3</td>
</tr>
<tr>
<td>width</td>
<td>输入框宽度,支持百分比和像素</td>
<td>
String
</td>
<td>190px</td>
</tr>
</tbody>
</table>
</section>
</article>

0 comments on commit f4dabd0

Please sign in to comment.