ace-component
Version:
ace-components for ewms
81 lines (70 loc) • 1.79 kB
text/typescript
import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core';
({
selector: 'app-date-picker-page',
templateUrl: './date-picker-page.component.html',
styleUrls: ['./date-picker-page.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class DatePickerPageComponent implements OnInit {
('datePicker') datePicker;
constructor() { }
ngOnInit() {
}
thead = ['属性', '说明', '类型', 'default'];
tableValue = [
{
name: 'ViewChild(xx).value',
text: '对应的datePicker的值',
type: 'string',
default: ` - `
},
{
name: 'max',
text: '最大时间 (格式:2017-09-21)',
type: 'string',
default: ` - `
},
{
name: 'min',
text: '最小时间 (格式:2017-09-21)',
type: 'string',
default: ` - `
},
{
name: 'placeholder',
text: 'datepciker的placeholder',
type: 'string',
default: ` Select a min date `
},
{
name: 'mode',
text: 'datepciker的模式(暂时只支持两种),daytime(可以选择时分),day(最小到日)',
type: 'string',
default: ` daytime `
},
];
eventHd = ['事件','说明','返回值']
eventValue = [
{
name:"onchange",
text:"选择了日期后触发",
cb:"返回的值为时间"
}
];
getKeys(item: any) {
return [item.name, item.text, item.type, item.default]
}
getEventKeys(item: any) {
return [item.name, item.text, item.cb]
}
private onchangeValue = "";
showChange(value){
this.onchangeValue = value;
};
fkbug(e){
console.log('what?');
// setTimeout(()=>{
// this.datePicker.datePicker.inputElementValue='2017-09-01'
// },2000)
}
}