From c49bdf75b7d5dd9b082ebf4ea977d783424b8573 Mon Sep 17 00:00:00 2001 From: wxc <1873917459@qq.com> Date: Wed, 28 Aug 2024 19:15:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=B4=E9=91=AB=E5=9F=8E=2013790856510?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 41 +++++++++++++++++++++++++++++++++++++ package.json | 1 + src/components/TodoItem.vue | 28 +++++++++++++++++-------- src/components/TodoList.vue | 18 ++++++++-------- src/pages/index.vue | 28 +++++++++++++++++-------- 5 files changed, 89 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 460c379..72e6928 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "@dcloudio/vite-plugin-uni": "3.0.0-4020420240722002", "@vue/runtime-core": "^3.4.21", "@vue/tsconfig": "^0.1.3", + "sass": "^1.77.8", "typescript": "^4.9.4", "vite": "5.2.8", "vue-tsc": "^1.0.24" @@ -6749,6 +6750,12 @@ } ] }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "devOptional": true + }, "node_modules/import-local": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", @@ -10366,6 +10373,23 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/sass": { + "version": "1.77.8", + "resolved": "https://registry.npmmirror.com/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", + "devOptional": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", @@ -16711,6 +16735,12 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, + "immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "devOptional": true + }, "import-local": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", @@ -19409,6 +19439,17 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "sass": { + "version": "1.77.8", + "resolved": "https://registry.npmmirror.com/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", + "devOptional": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, "sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", diff --git a/package.json b/package.json index 87623f2..34acb41 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "@dcloudio/vite-plugin-uni": "3.0.0-4020420240722002", "@vue/runtime-core": "^3.4.21", "@vue/tsconfig": "^0.1.3", + "sass": "^1.77.8", "typescript": "^4.9.4", "vite": "5.2.8", "vue-tsc": "^1.0.24" diff --git a/src/components/TodoItem.vue b/src/components/TodoItem.vue index 924601c..7191860 100644 --- a/src/components/TodoItem.vue +++ b/src/components/TodoItem.vue @@ -1,20 +1,22 @@ diff --git a/src/components/TodoList.vue b/src/components/TodoList.vue index dc0b036..318eeb8 100644 --- a/src/components/TodoList.vue +++ b/src/components/TodoList.vue @@ -4,27 +4,27 @@ v-for="(todo, index) in props.todos" :key="todo.text" :todo="todo" + v-show="!todo.completed" @toggle="() => toggleHandler(index)" /> - + diff --git a/src/pages/index.vue b/src/pages/index.vue index a2f3de7..fde57c2 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -10,22 +10,32 @@