[{"data":1,"prerenderedAt":307},["ShallowReactive",2],{"content-/guide/code-optimization":3,"related-guide":275},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"keywords":10,"author":11,"date":12,"category":13,"image":14,"body":15,"_type":269,"_id":270,"_source":271,"_file":272,"_stem":273,"_extension":274},"/guide/code-optimization","guide",false,"","代码优化","优化生成代码的性能和质量","代码优化, 性能优化, 重构, HTMLPAGE","HTMLPAGE","2025-11-27","开发","/content-images/guide/guide.jpg",{"type":16,"children":17,"toc":256},"root",[18,25,31,38,45,70,76,99,105,128,134,157,163,186,192,215,221,243,247],{"type":19,"tag":20,"props":21,"children":22},"element","h1",{"id":8},[23],{"type":24,"value":8},"text",{"type":19,"tag":26,"props":27,"children":28},"p",{},[29],{"type":24,"value":30},"学习如何优化生成的代码以提升性能。",{"type":19,"tag":32,"props":33,"children":35},"h2",{"id":34},"优化方向",[36],{"type":24,"value":37},"📌 优化方向",{"type":19,"tag":39,"props":40,"children":42},"h3",{"id":41},"_1-文件优化",[43],{"type":24,"value":44},"1. 文件优化",{"type":19,"tag":46,"props":47,"children":48},"ul",{},[49,55,60,65],{"type":19,"tag":50,"props":51,"children":52},"li",{},[53],{"type":24,"value":54},"缩小代码",{"type":19,"tag":50,"props":56,"children":57},{},[58],{"type":24,"value":59},"删除注释",{"type":19,"tag":50,"props":61,"children":62},{},[63],{"type":24,"value":64},"合并文件",{"type":19,"tag":50,"props":66,"children":67},{},[68],{"type":24,"value":69},"压缩图片",{"type":19,"tag":39,"props":71,"children":73},{"id":72},"_2-运行优化",[74],{"type":24,"value":75},"2. 运行优化",{"type":19,"tag":46,"props":77,"children":78},{},[79,84,89,94],{"type":19,"tag":50,"props":80,"children":81},{},[82],{"type":24,"value":83},"减少重排",{"type":19,"tag":50,"props":85,"children":86},{},[87],{"type":24,"value":88},"减少重绘",{"type":19,"tag":50,"props":90,"children":91},{},[92],{"type":24,"value":93},"事件委托",{"type":19,"tag":50,"props":95,"children":96},{},[97],{"type":24,"value":98},"缓存管理",{"type":19,"tag":39,"props":100,"children":102},{"id":101},"_3-加载优化",[103],{"type":24,"value":104},"3. 加载优化",{"type":19,"tag":46,"props":106,"children":107},{},[108,113,118,123],{"type":19,"tag":50,"props":109,"children":110},{},[111],{"type":24,"value":112},"懒加载",{"type":19,"tag":50,"props":114,"children":115},{},[116],{"type":24,"value":117},"预加载",{"type":19,"tag":50,"props":119,"children":120},{},[121],{"type":24,"value":122},"分割代码",{"type":19,"tag":50,"props":124,"children":125},{},[126],{"type":24,"value":127},"CDN 加速",{"type":19,"tag":39,"props":129,"children":131},{"id":130},"_4-结构优化",[132],{"type":24,"value":133},"4. 结构优化",{"type":19,"tag":46,"props":135,"children":136},{},[137,142,147,152],{"type":19,"tag":50,"props":138,"children":139},{},[140],{"type":24,"value":141},"模块化",{"type":19,"tag":50,"props":143,"children":144},{},[145],{"type":24,"value":146},"消除冗余",{"type":19,"tag":50,"props":148,"children":149},{},[150],{"type":24,"value":151},"改进算法",{"type":19,"tag":50,"props":153,"children":154},{},[155],{"type":24,"value":156},"优化逻辑",{"type":19,"tag":32,"props":158,"children":160},{"id":159},"优化工具",[161],{"type":24,"value":162},"🎯 优化工具",{"type":19,"tag":46,"props":164,"children":165},{},[166,171,176,181],{"type":19,"tag":50,"props":167,"children":168},{},[169],{"type":24,"value":170},"Lighthouse",{"type":19,"tag":50,"props":172,"children":173},{},[174],{"type":24,"value":175},"WebPageTest",{"type":19,"tag":50,"props":177,"children":178},{},[179],{"type":24,"value":180},"GTmetrix",{"type":19,"tag":50,"props":182,"children":183},{},[184],{"type":24,"value":185},"浏览器DevTools",{"type":19,"tag":32,"props":187,"children":189},{"id":188},"优化建议",[190],{"type":24,"value":191},"💡 优化建议",{"type":19,"tag":46,"props":193,"children":194},{},[195,200,205,210],{"type":19,"tag":50,"props":196,"children":197},{},[198],{"type":24,"value":199},"测试优化效果",{"type":19,"tag":50,"props":201,"children":202},{},[203],{"type":24,"value":204},"平衡可维护性",{"type":19,"tag":50,"props":206,"children":207},{},[208],{"type":24,"value":209},"关注用户体验",{"type":19,"tag":50,"props":211,"children":212},{},[213],{"type":24,"value":214},"定期检查",{"type":19,"tag":32,"props":216,"children":218},{"id":217},"相关资源",[219],{"type":24,"value":220},"🔗 相关资源",{"type":19,"tag":46,"props":222,"children":223},{},[224,234],{"type":19,"tag":50,"props":225,"children":226},{},[227],{"type":19,"tag":228,"props":229,"children":231},"a",{"href":230},"/guide/performance-optimization.md",[232],{"type":24,"value":233},"性能优化",{"type":19,"tag":50,"props":235,"children":236},{},[237],{"type":19,"tag":228,"props":238,"children":240},{"href":239},"/guide/performance-tips.md",[241],{"type":24,"value":242},"性能提示",{"type":19,"tag":244,"props":245,"children":246},"hr",{},[],{"type":19,"tag":26,"props":248,"children":249},{},[250],{"type":19,"tag":251,"props":252,"children":253},"em",{},[254],{"type":24,"value":255},"代码优化是提升用户体验的重要工作。",{"title":7,"searchDepth":257,"depth":257,"links":258},3,[259,266,267,268],{"id":34,"depth":260,"text":37,"children":261},2,[262,263,264,265],{"id":41,"depth":257,"text":44},{"id":72,"depth":257,"text":75},{"id":101,"depth":257,"text":104},{"id":130,"depth":257,"text":133},{"id":159,"depth":260,"text":162},{"id":188,"depth":260,"text":191},{"id":217,"depth":260,"text":220},"markdown","content:guide:code-optimization.md","content","guide/code-optimization.md","guide/code-optimization","md",[276,288,299],{"_path":277,"_dir":278,"_draft":6,"_partial":6,"_locale":7,"title":279,"description":280,"keywords":281,"author":11,"date":282,"category":283,"image":284,"_type":269,"_id":285,"_source":271,"_file":286,"_stem":287,"_extension":274},"/blog/accessibility-guidelines","blog","无障碍设计指南","WCAG 标准和无障碍设计最佳实践","无障碍设计指南, Blog, HTMLPAGE","2025-11-26","待分类","/content-images/blog/blog.jpg","content:blog:accessibility-guidelines.md","blog/accessibility-guidelines.md","blog/accessibility-guidelines",{"_path":289,"_dir":278,"_draft":6,"_partial":6,"_locale":7,"title":290,"description":291,"keywords":292,"author":293,"date":294,"category":295,"image":284,"_type":269,"_id":296,"_source":271,"_file":297,"_stem":298,"_extension":274},"/blog/accessible-ux-research-guide","无障碍用户研究完全指南：从规划到实施的每一步","深入了解如何进行包容性的用户体验研究，确保残障用户的声音被听见，让产品真正为所有人而设计","用户研究, 无障碍设计, 包容设计, UX研究, 残障用户, 无障碍访问","HTMLPAGE 内容团队","2025-12-01","无障碍与设计","content:blog:accessible-ux-research-guide.md","blog/accessible-ux-research-guide.md","blog/accessible-ux-research-guide",{"_path":300,"_dir":278,"_draft":6,"_partial":6,"_locale":7,"title":301,"description":302,"keywords":303,"author":11,"date":282,"category":283,"image":284,"_type":269,"_id":304,"_source":271,"_file":305,"_stem":306,"_extension":274},"/blog/react-hooks-guide","React Hooks 实战指南","深入理解 React Hooks，包括 useState、useEffect、自定义 Hooks 等","React Hooks 实战指南, Blog, HTMLPAGE","content:blog:react-hooks-guide.md","blog/react-hooks-guide.md","blog/react-hooks-guide",1774945279051]