国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

'prop' wird ein Wert zugewiesen, aber nie verwendet no-unused-vars vue3
P粉810050669
P粉810050669 2023-08-25 17:00:46
0
1
735
<p>我在我的 vue 組件文件上使用.我的組件代碼:</p> <pre class="brush:php;toolbar:false;"><template> <router-link :to="{ name: routerName }" type="is-prim?r" class="inline-flex justify-center py-2 px-3 mb-3 border border-transparentshadow-sm text-smfont-mediumrounded-mdtext-whitebg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" Stroke="currentColor"> <path strict-linecap="round" Stroke-linejoin="rund" Strichbreite="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg>&nbsp;Abbrechen </router-link> </template> <Skript-Setup> const props = defineProps({ Routername: { Typ: Zeichenfolge, erforderlich: wahr } }) </script></pre> <p>但其返回eslint錯誤<code>'props'被賦值但從未使用過 no-unused-vars</code></p> <p>我已經(jīng)在我的 package.json 上添加了如下規(guī)則:</p> <pre class="brush:php;toolbar:false;">"extends": [ "plugin:vue/vue3-essential", "eslint:empfohlen" ], "parserOptions": { "parser": "@babel/eslint-parser" }, "Regeln": { "vue/script-setup-uses-vars": "Fehler", "vue/multi-word-component-names": "off" }</pre> <p>仍然錯誤.我的開發(fā)依賴:</p> <pre class="brush:php;toolbar:false;">"devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3" },</pre></p>
P粉810050669
P粉810050669

Antworte allen(1)
P粉298305266

您收到錯誤是因為(正如錯誤指出的那樣)您從不使用 props。您可以刪除 const props = 或(我建議)將 "no-unused-vars": "warn" 添加到 package.json 中的規(guī)則中。 p>

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage