记事本预写,待接口

This commit is contained in:
2019-09-09 15:16:41 +08:00
parent a47fe12f41
commit f99d8b857b
5 changed files with 178 additions and 852 deletions

33
js/notepad.js Normal file
View File

@ -0,0 +1,33 @@
mui.plusReady(function(){
// some ajax
})
app = new Vue({
el: '#app',
data() {
return {
noteData: [
{id: 1, name: '这是一个名字', created_at: "2019-07-06 18:00:01", updated_at: "2019-07-06 18:00:09"},
{id: 2, name: '这是二个名字', created_at: "2019-07-06 19:00:01", updated_at: "2019-07-06 20:00:09"},
]
}
},
created() {
console.log("Vue")
},
methods: {
triggerDelete(index) {
this.$set(this.noteData[index], 'currentDelete', true)
},
cancelDelete(index){
this.$set(this.noteData[index], 'currentDelete', false)
},
confirmDelete(index){
console.log("删除", this.noteData[index])
window.location.reload()
}
},
mounted() {
setTimeout(()=>{document.getElementById("app").visibility = "visible";}, 1000)
}
})