Compare commits

..

No commits in common. "ccdd94ed1aed908195d0f2e9bebbdbae987725e0" and "b0f9f4e48dd214a09d8295951e682a0f9b7577e5" have entirely different histories.

2 changed files with 204 additions and 188 deletions

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-10-21 16:39:27
* @LastEditors: Kane
* @LastEditTime: 2022-10-30 23:50:04
* @LastEditTime: 2022-10-23 15:26:59
* @FilePath: \car_dealer\css\todo-list\to-list.css
* @Description: 用于待办事项页面的css
*
@ -85,14 +85,9 @@ hr {
.todo_list::-webkit-scrollbar {
width: 0.75rem;
cursor: pointer;
/* height: 100px; */
}
.todo_list::-webkit-scrollbar-thumb {
cursor: pointer;
}
.todo_list:hover::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px var(--scrollbar-track-color);

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-10-21 16:36:51
* @LastEditors: Kane
* @LastEditTime: 2022-10-31 00:13:22
* @LastEditTime: 2022-10-25 14:21:00
* @FilePath: \car_dealer\vue\todo-list.html
* @Description:
*
@ -10,7 +10,6 @@
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
@ -37,7 +36,11 @@
<h1>{{title}}</h1>
<div class="border">
<div class="add_todo">
<input type="text" v-model="todo_text" placeholder="请输入待办事项" />
<input
type="text"
v-model="todo_text"
placeholder="请输入待办事项"
/>
<button type="button" @click="showMessageBox()">
添加
</button>
@ -45,10 +48,20 @@
<hr />
<div class="todo_list">
<div v-for="(item,index) in todo_list" :key="index">
<input type="checkbox" v-model="todo_list[index].selected" />
<input
type="checkbox"
v-model="todo_list[index].selected"
/>
<span v-show="!item.edit">{{item.todo_text}}</span>
<input type="text" v-show="item.edit" v-model="item.todo_text" />
<button type="button" v-on:click="editTodo(index,event)">
<input
type="text"
v-show="item.edit"
v-model="item.todo_text"
/>
<button
type="button"
v-on:click="editTodo(index,event)"
>
修改
</button>
<button type="button" @click="removeTodo(index)">
@ -71,7 +84,8 @@
title: "待办任务",
errorMessage: "奇怪的错误!",
todo_text: "",
todo_list: [{
todo_list: [
{
selected: false,
todo_text: "回家",
edit: false,
@ -194,12 +208,19 @@
const message = document.getElementById("message_border");
message.style["display"] = "none";
}
},
},
computed: {
buttonText(edit) {
return edit ? 修改 : 保存;
},
},
mounted() {
console.log("挂载完成!");
},
};
const vm = Vue.createApp(app);
vm.mount("#app");
</script>
</html>