[{"data":1,"prerenderedAt":361},["ShallowReactive",2],{"content:\u002Funi-typed\u002Fother\u002Ffaq":3,"section:uni-typed":341},{"id":4,"title":5,"aside":6,"authors":7,"badges":8,"banner":7,"body":17,"breadcrumb":6,"collapse":333,"description":7,"editLink":6,"extension":334,"fullpage":333,"header":7,"icon":335,"main":7,"meta":336,"navBadges":7,"navTruncate":333,"navigation":7,"path":337,"prevNext":6,"seo":338,"stem":339,"toc":6,"__hash__":340},"content\u002Funi-typed\u002F2.other\u002F1.faq.md","常见问题",true,null,[9,13],{"value":10,"to":11,"target":12},"npm","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@uni-helper\u002Funi-types","_blank",{"value":14,"icon":15,"to":16,"target":12},"source","lucide:code","https:\u002F\u002Fgithub.com\u002Funi-helper\u002Funi-typed",{"type":18,"value":19,"toc":320},"minimark",[20,25,37,44,47,50,155,159,164,179,186,190,199,205,209,218,222,235,288,295,309,314,317],[21,22,24],"h2",{"id":23},"我项目里类型报错怎么办","我项目里类型报错，怎么办？",[26,27,28,29,36],"p",{},"Volar、TypeScript、Vue 等开源项目的目标是与开放标准（即 W3C Web 标准、ECMA 规范等）保持一致，这意味着它们对小程序、uni-app 等非开放标准支持度较低。你可以在 ",[30,31,35],"a",{"href":32,"rel":33},"https:\u002F\u002Fgithub.com\u002Fvueuse\u002Fvueuse\u002Fpull\u002F1073",[34],"nofollow","vueuse\u002Fvueuse#1073"," 了解这一观点。",[26,38,39,43],{},[40,41,42],"code",{},"@uni-helper\u002Funi-typed"," 项目严重依赖 Volar、TypeScript 和 Vue，因此更新其中任一依赖后，编辑器或 IDE 可能无法正常提示部分元素的的 TypeScript 类型（本身是 HTML 自带但被占用的元素，如 SVG 相关元素 view、image、text、输入框元素 input 等），我们强烈建议锁定依赖版本以避免类似问题。",[26,45,46],{},"如果你遇到了类似的问题，请先回退并锁定版本，并在 QQ 群内反馈、微信群内反馈、提交 ISSUE 或 PR，我们将尽快处理，非常感谢你的帮助！🙏",[26,48,49],{},"截至 2024-10-17，经实测确定，以下版本组合可正常实现类型提示。",[51,52,53,66],"table",{},[54,55,56],"thead",{},[57,58,59,63],"tr",{},[60,61,62],"th",{},"依赖",[60,64,65],{},"版本",[67,68,69,78,86,94,102,110,117,124,131,137,143,149],"tbody",{},[57,70,71,75],{},[72,73,74],"td",{},"Volar",[72,76,77],{},"v2.0.28、v2.1.2、v2.1.4、v2.1.6",[57,79,80,83],{},[72,81,82],{},"TypeScript",[72,84,85],{},"v5.5.4",[57,87,88,91],{},[72,89,90],{},"Vue",[72,92,93],{},"v3.4.38",[57,95,96,99],{},[72,97,98],{},"@dcloudio\u002F*",[72,100,101],{},"v3.0.0-4020420240722002、v3.0.0-4020920240930001",[57,103,104,107],{},[72,105,106],{},"@uni-helper\u002Funi-app-types",[72,108,109],{},"latest",[57,111,112,115],{},[72,113,114],{},"@uni-helper\u002Funi-cloud-types",[72,116,109],{},[57,118,119,122],{},[72,120,121],{},"@uni-helper\u002Funi-ui-types",[72,123,109],{},[57,125,126,129],{},[72,127,128],{},"@uni-helper\u002Funi-types",[72,130,109],{},[57,132,133,135],{},[72,134,106],{},[72,136,109],{},[57,138,139,141],{},[72,140,114],{},[72,142,109],{},[57,144,145,147],{},[72,146,121],{},[72,148,109],{},[57,150,151,153],{},[72,152,128],{},[72,154,109],{},[21,156,158],{"id":157},"如何确认-volar-版本","如何确认 Volar 版本？",[160,161,163],"h3",{"id":162},"vsc","VSC",[26,165,166,167,172,173,178],{},"在 VSC 中打开 Extensions -> Vue - Official，可以看到 Volar 版本。如果正在使用 v2.0.21 或以下版本，请使用 ",[30,168,171],{"href":169,"rel":170},"https:\u002F\u002Fgithub.com\u002Funi-helper\u002Funi-app-types",[34],"@uni-helper\u002Funi-app-types v0.5"," 和 ",[30,174,177],{"href":175,"rel":176},"https:\u002F\u002Fgithub.com\u002Funi-helper\u002Funi-ui-types",[34],"@uni-helper\u002Funi-ui-types v0.5"," 以获取类型支持。",[26,180,181],{},[182,183],"img",{"alt":184,"src":185},"vsc-extension","uni-typed\u002Fvsc-extension.jpg",[160,187,189],{"id":188},"webstorm","WebStorm",[26,191,192,193,172,196,178],{},"在 WebStorm 中打开一个 Vue 项目，然后打开 Settings -> Languages & Frameworks -> TypeScript -> Vue，可以看到 Volar 版本。如果正在使用 @vue\u002Flanguage-server v2.0.21 或以下版本，请使用 ",[30,194,171],{"href":169,"rel":195},[34],[30,197,177],{"href":175,"rel":198},[34],[26,200,201],{},[182,202],{"alt":203,"src":204},"webstorm-settings","uni-typed\u002Fwebstorm-settings.jpg",[160,206,208],{"id":207},"zed","Zed",[26,210,211,212,172,215,178],{},"截至 v0.149.3，Zed 锁定 @vue\u002Flanguage-server 为 v1.8，请使用 ",[30,213,171],{"href":169,"rel":214},[34],[30,216,177],{"href":175,"rel":217},[34],[21,219,221],{"id":220},"vue-2-支持情况","Vue 2 支持情况",[26,223,224,225,230,231,234],{},"如果你正在使用 Vue 2 且需要组件 TypeScript 类型支持，请参考以下版本组合，这是最后已知可用的版本组合。请使用 ",[30,226,229],{"href":227,"rel":228},"https:\u002F\u002Fcdn.jsdelivr.net\u002Fgh\u002Funi-helper\u002Funi-typed\u002Fassets\u002FVue.volar-2.0.21.vsix",[34],"Volar v2.0.21","、Vue v2.6.14、",[30,232,177],{"href":175,"rel":233},[34]," 和 TypeScript v5.4.5，这是最后已知可用的版本组合。",[51,236,237,245],{},[54,238,239],{},[57,240,241,243],{},[60,242,62],{},[60,244,65],{},[67,246,247,254,261,268,275,282],{},[57,248,249,251],{},[72,250,74],{},[72,252,253],{},"v2.0.21",[57,255,256,258],{},[72,257,82],{},[72,259,260],{},"v5.4.5",[57,262,263,265],{},[72,264,90],{},[72,266,267],{},"v2.6.14",[57,269,270,272],{},[72,271,98],{},[72,273,274],{},"2.0.2-4020420240722003",[57,276,277,279],{},[72,278,106],{},[72,280,281],{},"v0.5.13",[57,283,284,286],{},[72,285,121],{},[72,287,281],{},[289,290,292],"alert",{"type":291},"warning",[26,293,294],{},"uni-app 不支持 Vue v2.7。",[26,296,297,298,172,303,308],{},"如果你正在使用 Vue 2 但无需组件 TypeScript 类型支持，请使用 ",[30,299,302],{"href":300,"rel":301},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fvetur",[34],"Vetur",[30,304,307],{"href":305,"rel":306},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@dcloudio\u002Funi-helper-json",[34],"@dcloudio\u002Funi-helper-json","。",[289,310,311],{},[26,312,313],{},"Volar 和 Vetur 不可共存，请只启用其中一个。",[21,315,316],{"id":316},"类型与文档冲突",[26,318,319],{},"类型与官方文档的冲突之处，请以官方文档为准，并在 QQ 群内反馈、微信群内反馈、提交 ISSUE 或 PR，我们将尽快处理，非常感谢你的帮助！🙏",{"title":321,"searchDepth":322,"depth":322,"links":323},"",2,[324,325,331,332],{"id":23,"depth":322,"text":24},{"id":157,"depth":322,"text":158,"children":326},[327,329,330],{"id":162,"depth":328,"text":163},3,{"id":188,"depth":328,"text":189},{"id":207,"depth":328,"text":208},{"id":220,"depth":322,"text":221},{"id":316,"depth":322,"text":316},false,"md","qlementine-icons:faq-16",{},"\u002Funi-typed\u002Fother\u002Ffaq",{"title":5,"description":7},"uni-typed\u002F2.other\u002F1.faq","-qiHw2V5weTM6dbWtO640MAb5OL6CqdqBxG4VuadXvA",{"id":342,"title":343,"aside":6,"authors":7,"badges":7,"banner":7,"body":7,"breadcrumb":6,"collapse":333,"description":7,"editLink":6,"extension":344,"fullpage":333,"header":7,"icon":7,"main":7,"meta":345,"navBadges":7,"navTruncate":333,"navigation":346,"path":348,"prevNext":6,"seo":349,"stem":350,"toc":351,"__hash__":360},"content\u002Funi-typed\u002F_dir.yml","uni-typed","yml",{},{"redirect":347},"\u002Funi-typed\u002Fguide\u002Fgetting-started","\u002Funi-typed\u002F_dir",{"title":343},"uni-typed\u002F_dir",{"links":352},[353,356],{"title":354,"icon":355,"to":16,"target":12},"点亮星星","lucide:star",{"title":357,"icon":358,"to":359,"target":12},"反馈问题","lucide:github","https:\u002F\u002Fgithub.com\u002Funi-helper\u002Funi-typed\u002Fissues","u0oOcOxlYp0jpYo-g6kr8lGeXPSYVZVU43CULoyPgLI",1795165269692]