This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

完成日期选择组件的迁移;更新大量字体图标

old
宇天 2018-01-26 21:36:13 +08:00
parent ec43f4b87d
commit 65524423e8
8 changed files with 31 additions and 16 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -182,6 +182,9 @@
},
check: function(val) {
return Anot.type(val) === this.checkType
},
call: function() {
return this.toString()
}
}

View File

@ -237,10 +237,10 @@ export default Anot.component('datepicker', {
},
props: {
showTime: false, //对话框上显示时间
color: 'grey',
radius: 3,
format: '', // 日期显示格式
onCreated: Anot.PropsTypes.isFunction(),
onDateChange: Anot.PropsTypes.isFunction()
onDatePicked: Anot.PropsTypes.isFunction()
},
skip: ['max', 'min', 'last', 'timer'],
watch: {
@ -358,8 +358,8 @@ export default Anot.component('datepicker', {
onConfirm: function() {
this.updateTime()
this.close()
if (typeof this.props.onDateChange === 'function') {
this.props.onDateChange(this.value, this.last.pick)
if (typeof this.props.onDatePicked === 'function') {
this.props.onDatePicked(this.value, this.last.pick)
}
}
}

View File

@ -1,11 +1,16 @@
<div class="do-datepicker do-fn-noselect" :click="cancelBubble">
<label class="date-input">
<input
class="date-input"
class="input"
type="text"
:duplex="value"
:focus="onFocus"
:css="{'border-radius': props.radius}"
:attr-placeholder="props.placeholder || '请选择日期'"
:attr-disabled="disabled">
<i class="do-ui-font icon"></i>
</label>
<dl
class="calendar-box"

View File

@ -14,9 +14,16 @@
&:active {color:nth($cgr, 3);}
}
.date-input { display:block; width:100%; height:100%; padding:0 5px; line-height:18px; border:1px solid nth($cp, 1); @include ts();
.date-input {position:relative; display:block; width:100%; height:100%;
.input { width:100%; height:100%;padding:0 5px; line-height:18px; border:1px solid nth($cp, 1);color:nth($cgr, 1); @include ts();
&:focus { border-color:nth($ct, 1); }
&[disabled] {background:#f7f8fb;cursor:not-allowed;}
}
.icon {position:absolute;right:10px;top:4px;font-size:25px;color:nth($cp, 3);
&::after {content:"\e650"}
}
}
.calendar-box { position:absolute; left:0; top:100%; z-index:65534; width:267px; height:auto; min-height:60px;padding:10px;line-height:35px; border:1px solid #ddd; background:#fff; font-size:14px; color:nth($cgr, 1); text-align:center; box-shadow:0 1px 5px rgba(0, 0, 0, 0.1);

View File

@ -81,7 +81,7 @@ export default Anot.component('tree', {
},
componentDidMount: function() {
if (typeof this.props.onCreated === 'function') {
this.props.onCreated.call(null, this)
this.props.onCreated(this)
}
},
state: {
@ -132,7 +132,7 @@ export default Anot.component('tree', {
}
if (typeof onChecked === 'function') {
onChecked.call(this.$up, item, arr)
onChecked(item, arr)
}
},
onSelected: function(el) {