{"id":343,"date":"2024-10-23T22:49:45","date_gmt":"2024-10-23T14:49:45","guid":{"rendered":"https:\/\/eve2333.top\/?p=343"},"modified":"2024-10-23T22:50:52","modified_gmt":"2024-10-23T14:50:52","slug":"vue-part-7","status":"publish","type":"post","link":"https:\/\/eve2333.top\/?p=343","title":{"rendered":"Vue part-7"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">To Do List\u6848\u4f8b<\/h1>\n\n\n\n<h5 class=\"wp-block-heading\">MyFooter.vue<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n  &lt;!--\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362-->\n  &lt;div class=\"todo-footer\" v-show=\"total\">\n    &lt;label>\n      &lt;!--\u8fd9\u91cc\u4e5f\u53ef\u7528v-model\u6765\u66ff\u4ee3\uff0c\u6b64\u65f6\u4e0d\u9700\u8981\u8ba1\u7b97\u5c5e\u6027\u4e86-->\n&lt;!--      &lt;input type=\"checkbox\" :checked=\"isAll\" @change=\"checkAll\"\/>-->\n      &lt;input type=\"checkbox\" v-model=\"isAll\"\/>\n    &lt;\/label>\n    &lt;span>\n       &lt;span>\u5df2\u5b8c\u6210{{ doneTotal }}&lt;\/span> \/ \u5168\u90e8{{total}}\n    &lt;\/span>\n    &lt;button class=\"btn btn-danger\" @click=\"clearAll\">\u6e05\u9664\u5df2\u5b8c\u6210\u4efb\u52a1&lt;\/button>\n  &lt;\/div>\n&lt;\/template>\n&lt;script>\nexport default {\n  name: \"MyFooter\",\n  props: &#91;'todos', 'checkAllTodo', 'clearAllDoneTodo'],\n  computed:{\n    total(){\n      return this.todos.length;\n    },\n    doneTotal(){\n      return this.todos.reduce((todoTotal, todo) => {\n        \/\/\u9690\u58eb\u7c7b\u578b\u8f6c\u6362\n        return todoTotal + todo.done;\n      }, 0);\n      \/\/ return this.todos.filter(todo => todo.done).length;\n    },\n    isAll:{\n      get(){\n        return this.total === this.doneTotal &amp;&amp; this.doneTotal > 0; \/\/\u8ba1\u7b97\u5c5e\u6027\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u7684\u8ba1\u7b97\u5c5e\u6027\u63a5\u7740\u8fdb\u884c\u8ba1\u7b97\u5f97\u5230\u7ed3\u679c\n      },\n      set(value){\n        \/\/value\u6ce8\u610f\u8981\u4e48\u4e3atrue\uff0c\u8981\u4e48\u4e3afalse\uff0c\u56e0\u4e3a\u4f60\u662f\u628a\u5b83\u5e94\u7528\u5728\u4e86checkbox\u4e0a\n        this.checkAllTodo(value);\n      }\n    }\n  },\n  methods:{\n    \/\/ checkAll(e){\n    \/\/   \/\/ console.log(e.target.checked); \/\/\u5224\u65ad\u8fd9\u4e2acheckbox\u5230\u5e95\u662f\u4e0d\u662f\u5168\u9009 true\u5168\u9009 false\u5168\u4e0d\u9009\n    \/\/   this.checkAllTodo(e.target.checked);\n    \/\/ }\n    clearAll(){\n       this.clearAllDoneTodo();\n    }\n  }\n}\n&lt;\/script>\n\n&lt;style scoped>\n\/*footer*\/\n.todo-footer {\n  height: 40px;\n  line-height: 40px;\n  padding-left: 6px;\n  margin-top: 5px;\n}\n\n.todo-footer label {\n  display: inline-block;\n  margin-right: 20px;\n  cursor: pointer;\n}\n\n.todo-footer label input {\n  position: relative;\n  top: -1px;\n  vertical-align: middle;\n  margin-right: 5px;\n}\n\n.todo-footer button {\n  float: right;\n  margin-top: 5px;\n}\n&lt;\/style><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">MyHeader.vue<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n  &lt;div class=\"todo-header\">\n    &lt;input type=\"text\" placeholder=\"\u8bf7\u8f93\u5165\u4f60\u7684\u4efb\u52a1\u540d\u79f0\uff0c\u6309\u56de\u8f66\u952e\u786e\u8ba4\" v-model=\"title\" @keyup.enter=\"add\"\/>\n  &lt;\/div>\n&lt;\/template>\n\n&lt;script>\nimport { nanoid } from 'nanoid';\nexport default {\n  \/\/\u6ce8\u610f\u4e0d\u7ba1\u662f\u4f60\u5199\u7684data\u4e5f\u8fd8\u8fd8\u662fmethods\u4e5f\u597d\uff0c\u751a\u81f3\u662fcomputed\u8ba1\u7b97\u5c5e\u6027\u4e5f\u597d\u90fd\u4f1a\u51fa\u73b0\u5728\u7ec4\u4ef6\u4e8b\u4f8b\u5bf9\u8c61vc\u8eab\u4e0a\n  \/\/\u5c5e\u6027\u503c\u4e0d\u80fd\u91cd\u540d\n  name: \"MyHeader\",\n  data(){\n    return {\n      title: ''\n    }\n  },\n  methods:{\n    add(){\n      \/\/\u5c06\u7528\u6237\u7684\u8f93\u5165\u5305\u88c5\u6210\u4e00\u4e2atodo\u5bf9\u8c61\n      console.log(this.title)\n      if(!this.title.trim()) {\/\/\u8fd9\u4e2a\u5224\u65ad\u7684\u610f\u601d\u5c31\u662f\uff0c\u5982\u679c\u8f93\u5165\u6846\u4e3a\u7a7a\uff0c\u5c31\u8df3\u51fa\u8fd9\u4e2a\u51fd\u6570\uff0c\u4e3a\u4ec0\u4e48\u8981\u53d6\u53cd\uff1f\u56e0\u4e3a\u5b57\u7b26\u4e32\u8f6c\u4e3a\u5e03\u5c14\u503c\u5c31\u662ffalse\uff0c\u6240\u4ee5\u5f97\u53d6\u53cd\u4e3atrue\uff0c\u8df3\u51fa\u51fd\u6570\u3002\n\/\/\u610f\u601d\u5c31\u662f\u5982\u679c\u4f20\u8fc7\u6765\u7684todo\u7684title\u4e5f\u5c31\u662f\u8f93\u5165\u7684\u503c\u4e3a\u7a7a\u7684\u8bdd\uff0c\u5c31return\u8df3\u51fa\u51fd\u6570\u4e86\n        alert('\u4ee3\u529e\u4e8b\u9879\u4e0d\u80fd\u4e3a\u7a7a')\n        return; \/\/\u8f93\u5165\u7684\u4ee3\u529e\u4e8b\u9879\u4e3a\u7a7a\u5219\u4e0d\u8d70\u4e0b\u9762\u6d41\u7a0b\n      }\n      const todoObj = {\n        id: nanoid(),\/\/\u7b80\u5355\u7684\u5e93\uff0c\u6bd4uuid\u5feb\u548c\u8f7b\u4fbf\u5f88\u591a\n        title: this.title,\n        done:false\n      }\/\/\u8fd9\u662f\u5144\u5f1f\u7ec4\u4ef6\uff0c\u4e0d\u662f\u7236\u5b50\u7ec4\u4ef6\uff0c\u4f20\u6570\u636e\u5931\u8d25\uff0cheader\u548clist\u4e0d\u4e92\u901a\n      \/\/props\u4e00\u822c\u662f\u5355\u5411\u901a\u4fe1\uff0c\u5373\u7236\u4f20\u5b50\uff0c\u5b98\u65b9\u4e0d\u5efa\u8bae\u5b50\u4f20\u7236\uff0c\u4f1a\u5bfc\u81f4\u6570\u636e\u6d41\u5411\u96be\u4ee5\u7406\u89e3\u3002\n      \/\/\n      \/\/ console.log(todoObj);\n      this.addTodo(todoObj)\n      this.title = '';\n    }\n  },\n  props:&#91;'addTodo'],\n}\n&lt;\/script>\n\n&lt;style scoped>\n\/*header*\/\n.todo-header input {\n  width: 560px;\n  height: 28px;\n  font-size: 14px;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  padding: 4px 7px;\n}\n\n.todo-header input:focus {\n  outline: none;\n  border-color: rgba(82, 168, 236, 0.8);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\n}\n&lt;\/style><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Item.vue<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n  &lt;li>\n    &lt;label>\n&lt;!--      \u8fd9\u91cc\u52fe\u9009\u548c\u53d6\u6d88\u52fe\u9009\u53ef\u4ee5\u4f7f\u7528change\u548cclick\u4f5c\u4e3a\u4e8b\u4ef6\u5904\u7406-->\n      &lt;input type=\"checkbox\" :checked=\"todo.done\" @change=\"handleCheck(todo.id)\"\/>\n      &lt;!--v-model\u6570\u636e\u7684\u53cc\u5411\u7ed1\u5b9a\uff0ccheckbox\u4f7f\u7528v-model\u6765\u53cc\u5411\u7ed1\u5b9a\u5176\u662f\u5426\u88ab\u52fe\u9009,\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u6548\u679c\u4f46\u4e0d\u63a8\u8350(\u56e0\u4e3a\u5176\u5b9e\u4fee\u6539\u4e86props\u4e2d\u7684\u6570\u636e)-->\n      &lt;!--\u8fd9\u91cc\u4fee\u6539\u4e86\u4eceList\u4fee\u6539\u8fc7\u6765\u7684props,\u8fd9\u91cc\u7684\u4e0d\u5141\u8bb8\u6539\u662f\u6d45\u5c42\u6b21\uff0c\u5c31\u662f\u5982\u679cprops\u662f\u4e00\u4e2a\u5bf9\u8c61\u5219\u8fd9\u4e2a\u4fee\u6539\u8fd9\u4e2a\u5bf9\u8c61\u7684\u67d0\u4e00\u4e2a\u5c5e\u6027vue\u662f\u653e\u884c\u7684-->\n      &lt;!-- &lt;input type=\"checkbox\" v-model=\"todo.done\"\/>-->\n      &lt;!-- \u8fd9\u91cc\u65f6props\u4f20\u5165\u7684\u6570\u636e\uff0c\u4e0d\u5b9c\u4f7f\u7528v-model\uff0c\u56e0\u4e3a\u4e0d\u5141\u8bb8\u5728\u5b50\u7ec4\u4ef6\u4e2d\u4fee\u6539\u7236\u7ec4\u4ef6\u7684\u6570\u636e -->\n        &lt;span>{{  todo.title }}&lt;\/span>\n    &lt;!--@change \u539f\u578b \u662fjs\u91cc\u9762\u7684onchange \u5f53input\u8868\u5355value\u53d1\u751f\u6539\u53d8\u89e6\u53d1\u4e8b\u4ef6-->\n    &lt;\/label>\n    &lt;button class=\"btn btn-danger\" @click=\"handleDelete(todo.id)\">\u5220\u9664&lt;\/button>\n  &lt;\/li>\n&lt;\/template>\n\n&lt;script>\nexport default {\n  name: \"Item\",\n  \/\/\u58f0\u660e\u63a5\u6536todo\n  props: &#91;'todo', 'checkTodo', 'deleteTodo'],\n  methods:{\n    handleCheck(id){\n      this.checkTodo(id);\n    },\n    handleDelete(id){\n      if(confirm(`\u786e\u5b9a\u5220\u9664\u7f16\u53f7\u4e3a${id}\u7684todo\u5417`)){\n        \/\/ console.log(id);\n        this.deleteTodo(id);\n      }\n    }\n  }\n}\n&lt;\/script>\n\n&lt;style scoped>\n\/*item*\/\nli {\n  list-style: none;\n  height: 36px;\n  line-height: 36px;\n  padding: 0 5px;\n  border-bottom: 1px solid #ddd;\n}\n\nli label {\n  float: left;\n  cursor: pointer;\n}\n\nli label li input {\n  vertical-align: middle;\n  margin-right: 6px;\n  position: relative;\n  top: -1px;\n}\n\nli button {\n  float: right;\n  display: none;\n  margin-top: 3px;\n}\n\nli:before {\n  content: initial;\n}\n\nli:last-child {\n  border-bottom: none;\n}\n\nli:hover{\n  background: #ddd;\n}\n\nli:hover button{\n  display: block;\n}\n&lt;\/style><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">List.vue<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template&gt;\n  &lt;ul class=\"todo-main\"&gt;\n    &lt;Item\n        v-for=\"todoObj in todos\"\n        :key=\"todoObj.id\"\n        :todo=\"todoObj\"\n        :checkTodo=\"checkTodo\"\n        :deleteTodo=\"deleteTodo\"\n    \/&gt;\n  &lt;\/ul&gt;\n&lt;\/template&gt;\n\n&lt;script&gt;\nimport Item from \"@\/components\/Item\";\n\nexport default {\n  name: \"List\",\n  components: {\n    Item,\n  },\n  props:&#91;'todos', 'checkTodo', 'deleteTodo']\n}\n&lt;\/script&gt;\n\n&lt;style scoped&gt;\n\/*main*\/\n.todo-main {\n  margin-left: 0;\n  border: 1px solid #ddd;\n  border-radius: 2px;\n  padding: 0px;\n}\n\n.todo-empty {\n  height: 40px;\n  line-height: 40px;\n  border: 1px solid #ddd;\n  border-radius: 2px;\n  padding-left: 5px;\n  margin-top: 10px;\n}\n&lt;\/style&gt;\n<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">App.vue<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n  &lt;div id=\"root\">\n    &lt;div class=\"todo-container\">\n      &lt;div class=\"todo-wrap\">\n        &lt;MyHeader :addTodo=\"addTodo\"\/>\n        &lt;List\n            :todos=\"todos\"\n            :checkTodo=\"checkTodo\"\n            :deleteTodo=\"deleteTodo\"\n        \/>\n        &lt;MyFooter\n            :todos=\"todos\"\n            :checkAllTodo=\"checkAllTodo\"\n            :clearAllDoneTodo=\"clearAllDoneTodo\"\n        \/>\n      &lt;\/div>\n    &lt;\/div>\n  &lt;\/div>\n&lt;\/template>\n\n&lt;script>\nimport MyHeader from \"@\/components\/MyHeader\";\nimport List from \"@\/components\/List\";\nimport MyFooter from '@\/components\/MyFooter';\nexport default {\n  name: \"App\",\n  components:{\n    List,\n    MyFooter,\n    MyHeader\n  },\n  data() {\n    return {\n      todos: &#91;\n        {id: '001', title: '\u5403\u996d', done: false},\n        {id: '002', title: \"\u7761\u89c9\", done: true},\n        {id: '003', title: '\u6253\u4ee3\u7801', done: false}\n      ]\n    }\n  },\n  methods:{\n    \/\/\u6dfb\u52a0\u7684todo\n    addTodo(todo){\n      console.log('\u6211\u662fapp\u7ec4\u4ef6\uff0c\u6211\u6536\u5230\u4e86\u6570\u636e');\n      this.todos.unshift(todo);\n    },\n    checkTodo(id){\n      const todo = this.todos.find(todo => todo.id === id);\n      todo.done = !todo.done;\n    },\n    deleteTodo(id){\n      this.todos = this.todos.filter(todo => todo.id !== id);\n    },\n    checkAllTodo(done){\n      this.todos.forEach(todo => todo.done = done);\n    },\n    clearAllDoneTodo(){\n      this.todos = this.todos.filter(todo => !todo.done)\n    }\n  }\n}\n&lt;\/script>\n\n&lt;style>\n\/*base*\/\nbody {\n  background: #fff;\n}\n\n.btn {\n  display: inline-block;\n  padding: 4px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  line-height: 20px;\n  text-align: center;\n  vertical-align: middle;\n  cursor: pointer;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  border-radius: 4px;\n}\n\n.btn-danger {\n  color: #fff;\n  background-color: #da4f49;\n  border: 1px solid #bd362f;\n}\n\n.btn-danger:hover {\n  color: #fff;\n  background-color: #bd362f;\n}\n\n.btn:focus {\n  outline: none;\n}\n\n.todo-container {\n  width: 600px;\n  margin: 0 auto;\n}\n.todo-container .todo-wrap {\n  padding: 10px;\n  border: 1px solid #ddd;\n  border-radius: 5px;\n}\n\/*\u522b\u4eba\u7684\u9879\u76ee\u53ef\u4e0d\u8fd9\u4e48\u8fd9\u4e48\u5199\uff0cCSS\u5199\u5230\u540e\u9762\uff0c\u53d1\u73b0\u524d\u9762\u7684\u53ef\u80fd\u8981\u52a0\u70b9\u4ec0\u4e48\u76f4\u63a5\u540e\u9762\u8865\u4e86\uff0c\u771f\u662f\u79bb\u4e86\u5927\u8c31*\/\n&lt;\/style><\/code><\/pre>\n\n\n\n<p>\u5168\u90fd\u52fe\u9009\u4e86\u6709\u53ef\u80fd\u662fMyList\u91cc\u9762\u7684done\u540e\u9762\u5199\u6210\u4e86\u5b57\u7b26\u4e32\uff0c\uff0c\u628a\u5355\u5f15\u53f7\u6216\u8005\u53cc\u5f15\u53f7\u53bb\u6389\u5c31\u884c\u4e86<\/p>\n\n\n\n<p>\u56e0\u4e3a\u4f60\u4eectodoList\u91cc\u9762\u662f\u201ctrue\u201d\u800c\u4e0d\u662ftrue\uff0cdone \u8981\u5199\u5e03\u5c14\u503c\uff0c\u4e0d\u8981\u5199\u5b57\u7b26\u4e32<\/p>\n\n\n\n<p>\u7236\u7ec4\u4ef6\u5b9a\u4e49\u51fd\u6570\uff0c\u5b50\u7ec4\u4ef6\u8c03\u7528\u51fd\u6570\u4f20\u9012\u53c2\u6570\u3002\u5b50\u7ec4\u4ef6\u5b9a\u4e49\u5c5e\u6027\u53c2\u6570\u5217\u8868\uff0c\u7236\u7ec4\u4ef6\u8c03\u7528\u5b50\u6807\u7b7e\u5c5e\u6027\u4f20\u53c2\u3002\u8fd9\u91cc\u7684this\u8fd8\u662fheader\uff0c\u53ea\u4e0d\u8fc7header\u548capp\u91cc\u7684received\u65b9\u6cd5\u5f15\u7528\u5730\u5740\u76f8\u540c\uff0c\u4f60\u5728header\u91cc\u9762\u8c03\u7528\u4e86\uff0c\u4e5f\u76f8\u5f53\u4e8e\u5728app\u4e2d\u8c03\u7528\u4e86<\/p>\n\n\n\n<p>\u8fd9\u91ccthis\u90fd\u662f \u5b9e\u4f8b\u5bf9\u8c61vc &nbsp;\u51fd\u6570\u662f\u5730\u5740\u503c \u4e0d\u662f\u4f20\u8fdb\u6765\u4e2a\u5168\u65b0\u7684\u5bf9\u8c61\uff0c\u5728js\u4e2d\uff0c\u51fd\u6570\u4e5f\u662f\u5bf9\u8c61\uff0c\u4f20\u51fd\u6570\u672c\u8eab\u5b9e\u9645\u4e0a\u662f\u5f15\u7528\u4f20\u9012\uff0c\u610f\u601d\u4ed6\u4eec\u4e24\u7528\u7684\u662f\u540c\u4e00\u5757\u5185\u5b58\u7a7a\u95f4\uff0c\u4e00\u65b9\u4fee\u6539\uff0c\u53e6\u4e00\u65b9\u4e5f\u4f1a\u6539\u53d8<\/p>\n\n\n\n<p>header\u91cc\u5e76\u6ca1\u6709\u4fee\u6539\u4efb\u4f55\u503c,\u53ea\u662f\u4f20\u4e86\u4e2a\u53c2\u6570\u56deapp\uff0capp\u90a3\u4e2athis\u624d\u771f\u6b63\u4fee\u6539\u4e86vc\u4e0a\u7684\u6570\u636e<\/p>\n\n\n\n<p><a href=\"https:\/\/www.bilibili.com\/video\/BV1Zy4y1K7SH?t=1385.6&amp;p=72\" target=\"_blank\"  rel=\"nofollow\" >072_\u5c1a\u7845\u8c37Vue\u6280\u672f_TodoList\u6848\u4f8b_\u6dfb\u52a0_\u54d4\u54e9\u54d4\u54e9_bilibili<\/a>&nbsp;\u8fd95\u5206\u949f\u5f88\u597d<\/p>\n\n\n\n<p>\u5173\u4e8eaddtodo\uff0c\u8fd9\u91cc\u662f\u6309\u4e0b\u56de\u8f66\u540e\u8c03\u7528\u7684add\u65b9\u6cd5\u4e0eAPP\u4f20\u8fc7\u6765\u7684add\u65b9\u6cd5\u91cd\u540d\u4e86<br> \u200b<img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"269\" class=\"wp-image-344\" style=\"width: 450px;\" src=\"https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694900-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224806.png\" alt=\"\" srcset=\"https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694900-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224806.png 921w, https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694900-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224806-300x179.png 300w, https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694900-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224806-768x459.png 768w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u52fe\u9009<\/h3>\n\n\n\n<p>\u662f\u975e\u5e38\u91cd\u8981\uff0cVue\u5c06\u9875\u9762\u62c6\u5206\u6210\u5404\u79cd\u7ec4\u4ef6\uff0c\u7ec4\u4ef6\u95f4\u5c31\u5f97\u901a\u4fe1\u62ff\u6570\u636e\uff0c\u5982\u679c\u4e0d\u7528Vue\uff0c\u5c31\u4e00\u4e2a\u9875\u9762\uff0c\u6570\u636e\u90fd\u5728\u4e00\u8d77\u90a3\u8fd8\u7528\u5565\u901a\u4fe1\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"512\" src=\"https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694944-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224857.png\" alt=\"\" class=\"wp-image-345\" style=\"width:277px;height:auto\" srcset=\"https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694944-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224857.png 596w, https:\/\/eve2333.top\/wp-content\/uploads\/2024\/10\/1729694944-\u5c4f\u5e55\u622a\u56fe-2024-10-23-224857-300x258.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/figure>\n\n\n\n<p>@change=\"todoObj.done=!todoObj.done\" \u5c31\u53ef\u4ee5\u4e86<\/p>\n\n\n\n<p>v-model\u5e95\u5c42\u5c31\u662f\u76d1\u542cchecked \u7ed1\u5b9achange&nbsp;<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To Do List\u6848\u4f8b MyFooter.vue MyHeader.vue Item.vue List.vue App.vue  &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2],"tags":[12,11,10],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-2","tag-js","tag-vue","tag-10"],"_links":{"self":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=343"}],"version-history":[{"count":0,"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts\/343\/revisions"}],"wp:attachment":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}