first commit
This commit is contained in:
79
pages/inputdate/index.ux
Normal file
79
pages/inputdate/index.ux
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div class="input-date-page">
|
||||
<div class="header">
|
||||
<text class="header-time">编辑日期</text>
|
||||
</div>
|
||||
<div>
|
||||
<picker class="picker" type="date" onchange="pickHandler"></picker>
|
||||
</div>
|
||||
|
||||
<input type="button" class="save-button" @click="saveDate" value="保存"></input>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import router from '@blueos.app.appmanager.router';
|
||||
|
||||
export default {
|
||||
data: {
|
||||
year: "1970",
|
||||
month: "1",
|
||||
day: "1",
|
||||
},
|
||||
pickHandler(evt) {
|
||||
console.log(`picker year:${evt.year}, month:${evt.month}, day:${evt.day}`)
|
||||
},
|
||||
onReady() {
|
||||
},
|
||||
saveDate() {
|
||||
router.replace({
|
||||
uri: this.callback_uri,
|
||||
params: {
|
||||
"date_callback": JSON.stringify({
|
||||
"input_cache_data": this.input_cache_data,
|
||||
"date": `${this.year}-${this.month}-${this.day}`
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import '../../assets/styles/header-new.css';
|
||||
.picker {
|
||||
width: 192px;
|
||||
height: 100px;
|
||||
}
|
||||
.input-date-page {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.mmdd {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.save-button {
|
||||
width: 100px;
|
||||
height: 25px;
|
||||
background-color: black;
|
||||
border: 3px;
|
||||
border-color: gray;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.header-time {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user