[2絕對插圖-0 $ {單擊? Translate-X-0: - Translate-X-Full} 變換Z-400 H-SCREEN W-1/4 BG-BLUE-300""'
您可能會遇到問題。使用模板文字實現此目的的正確方法是:相反,選擇完整的類名稱如下:
(https://stackoverflow.com/questions/40787489/correct-way-way-to-handle-conditional-sendringal-sendling-in-react)
(https://reactjs.org/docs/jsx-in-depth.html#embedding-expressions-in-jsx)className=" absolute inset-0 ${click ? translate-x-0 : -translate-x-full } transform z-400 h-screen w-1/4 bg-blue-300 "[Template Literals - mdn](https://developer.mozilla.org/en-us/docs/web/javascript/reference/reference/template_literals)
(https://tailwindcss.com/docs/optimizing-for-production#writing-purgable-html)
免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。
Copyright© 2022 湘ICP备2022001581号-3