diff --git a/css/notepad.css b/css/notepad.css index e6aeea7..1d3ee52 100644 --- a/css/notepad.css +++ b/css/notepad.css @@ -17,12 +17,11 @@ height: 50px; } -.row .title { +.title { font-size: 18px; color: black; line-height: 42px; - position: absolute; - left: 10px; + padding-left: 5px; } [v-cloak] { @@ -31,15 +30,18 @@ .left { float: left; + margin-left: 5px; } .right { float: right; - display: block; + margin-left: 5px; } -.right > div { - display: inline; +.small_title, +.created_time, +.updated_time { + font-size: 0.9rem; } .operation { @@ -52,21 +54,8 @@ .edit { background: yellowgreen; - opacity: 0.5; } .delete { background: red; - opacity: 0.5; -} - -.upper { - width: 100%; -} - -.lower { - font-size: 0.8rem; - position: absolute; - bottom: 0px; - width: 100%; } \ No newline at end of file diff --git a/js/notepad.js b/js/notepad.js index bb1af5a..d0b97ed 100644 --- a/js/notepad.js +++ b/js/notepad.js @@ -24,8 +24,11 @@ app = new Vue({ confirmDelete(index){ console.log("删除", this.noteData[index]) window.location.reload() + }, + edit(index){ + console.log("编辑", this.noteData[index]) + window.location.reload() } - }, mounted() { setTimeout(()=>{document.getElementById("app").visibility = "visible";}, 1000) diff --git a/templete/notepad.html b/templete/notepad.html index 3dda126..970e96a 100644 --- a/templete/notepad.html +++ b/templete/notepad.html @@ -6,6 +6,7 @@ 记事本 + @@ -19,24 +20,22 @@
-
-
{{each.name}}
-
编辑
+
+
{{each.name}}
+
创建时间:{{each.created_at}}
+
更改时间:{{each.updated_at}}
-
-
你确定要删除么?
-
取消
+
+
你确定要删除么?
+
{{each.name}}
-
-
-
创建时间:{{each.created_at}}
-
更改时间:{{each.updated_at}}
-
-
删除
+
+
编辑
+
删除
-
-
{{each.name}}
-
确认
+
+
确认
+
取消
@@ -45,6 +44,11 @@ + + + + +