提交 04afc9c5 编写于 作者: zcdtk's avatar zcdtk
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
width: 100%; width: 100%;
text-align: right; text-align: right;
ion-datetime{ ion-datetime{
padding-right: 36px; // padding-right: 36px;
--padding-end: 0;
} }
ion-icon{ ion-icon{
position: absolute; position: absolute;
...@@ -10,4 +11,10 @@ ...@@ -10,4 +11,10 @@
top: 42px; top: 42px;
z-index:2; z-index:2;
} }
} }
.picker-col {
padding-inline-start: 5px;
padding-inline-end: 0px;
}
\ No newline at end of file
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<div class="app-mobile-datetime-picker"> <div class="app-mobile-datetime-picker">
<ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon> <ion-icon v-if="curValue" name="close-circle-outline" @click="clear"></ion-icon>
<ion-datetime <ion-datetime
display-format="YYYY-MM-DD HH:mm:ss" :max="max"
:min="min"
display-format="YYYY-MM-DD hh:mm"
:value="value" :value="value"
:placeholder="placeholder" :placeholder="placeholder"
:disabled="disabled" :disabled="disabled"
...@@ -49,6 +51,21 @@ export default class AppDateTimePicker extends Vue { ...@@ -49,6 +51,21 @@ export default class AppDateTimePicker extends Vue {
*/ */
public curValue:any = this.value; public curValue:any = this.value;
/**
* 当前日期
* @type {*}
* @memberof MOBILEENTITY3Canlen
*/
protected currentDate:any = new Date().getFullYear();
/**
* 当前选中值
* @memberof AppDateTimePicker
*/
public min:any = this.currentDate - 100;
public max:any = this.currentDate + 100;
/** /**
* 是否禁用 * 是否禁用
* *
...@@ -84,6 +101,10 @@ export default class AppDateTimePicker extends Vue { ...@@ -84,6 +101,10 @@ export default class AppDateTimePicker extends Vue {
this.curValue = null; this.curValue = null;
this.$emit('change','') this.$emit('change','')
} }
created(){
console.log(this.currentDate);
}
} }
</script> </script>
<style lang="less"> <style lang="less">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册