[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-624155-105":3,"detail-sidebar-cat-1-en-105":81,"doc-detail-624155-en":126,"doc-similar-624155":156},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","learnvue-vue-3-cheatsheet-quick-vue-3-development-and-vue-template-syntax-guide","LearnVue-Vue-3-Cheatsheet - Quick Vue 3 Development and Vue Template Syntax Guide","","Vue 3 cheatsheet focused on practical developer workflows: creating an app with Vite (npm init v ite-app, npm install, npm run dev), core template syntax for interpolation and raw HTML, and the directive set used for conditional rendering, list rendering, event binding, and reactive updates. It also summarizes common event modifiers, data binding patterns, parent-child communication via props and emit, slots (basic, named, scoped), dynamic components with keep-alive, and Composition API essentials like setup(), lifecycle hooks, computed, watchEffect, and template refs.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/learnvue-vue-3-cheatsheet-quick-vue-3-development-and-vue-template-syntax-guide/624155/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/learnvue-vue-3-cheatsheet-quick-vue-3-development-and-vue-template-syntax-guide/624155.png","ImageObject",442,249,{"name":42,"@type":43},"CatatanPagi","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-12-02","2026-10-20",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",5,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How do you create and run a Vue 3 app using Vite?","Question",{"text":63,"@type":64},"Use npm init v ite-app \u003Cproject-name>, enter the project directory, run npm install, then start the dev server with npm run dev.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What are the key Vue 3 template syntax options in the cheatsheet?",{"text":68,"@type":64},"It covers text interpolation, inner HTML rendering via v-html, and the rule that templates can use JavaScript expressions but not statements.",{"name":70,"@type":61,"acceptedAnswer":71},"How does the cheatsheet handle event binding and event modifiers?",{"text":72,"@type":64},"It shows v-on/@ for clicking and passing the native event into a method, then lists modifiers like .stop, .once, .prevent, and .self.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},624155,1792473015,{"code":4,"msg":82,"data":83},"success",[84,88,93,98,103,108,113,118,122],{"id":85,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":86,"slug":87},11,90,"presentations",{"id":89,"doc_module":22,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},12,"Resumes",80,"resumes",{"id":94,"doc_module":22,"doc_module_name":25,"category_name":95,"show_sort_weight":96,"slug":97},14,"Invoices",70,"invoices",{"id":99,"doc_module":22,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},15,"Posters",60,"posters",{"id":104,"doc_module":22,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},16,"Social Media",50,"social-media",{"id":109,"doc_module":22,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},17,"Forms",40,"forms",{"id":114,"doc_module":22,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},18,"Letters",30,"letters",{"id":119,"doc_module":22,"doc_module_name":25,"category_name":120,"show_sort_weight":55,"slug":121},21,"Paper Templates","papers-templates",{"id":123,"doc_module":22,"doc_module_name":25,"category_name":124,"show_sort_weight":4,"slug":125},158,"General","general-158",{"code":4,"msg":82,"data":127},{"doc_id":79,"user_id":128,"nickname":42,"user_avatar":129,"doc_module":22,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":33,"language":135,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":12,"update_tm":80,"read_time":26,"preview_page_count":33,"preview_urls":139},962090894170,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","VUE 3 CHEATSHEET FOR DEVELOPERS  \nPut together by your friends at [learnvue.co](learnvue.co)  \nCREATING YOUR APP WITH VITE  \nQuick Vue3 development environment  \nnpm init v ite-app \u003Cproject-name> cd \u003Cproject-name>  \nnpm install  \nnpm run dev  \nTEMPLATE SYNTAX  \nText Interpolation Options  \n\u003C span> {{ msg }} \u003C/span>\u003C span v-text= 'msg ' >\u003C/span>  \nSetting Inner HTML  \n\u003C span v-html='rawHTML ' >\u003C/span>  \nCan use JS Expressions; NOT JS Statements  \n✅ \u003C span> {{ msg.reverse() }} \u003C/span>❌ \u003C span> {{ let msg = 'hi ' }} \u003C/span>  \nDIRECTIVES  \nv-if  \nv-else-if  \nv-else  \nv-show  \nv-text  \nv-html  \nv-for  \nv-on or @  \nv-bind or :  \nv-model  \nv-once  \nPuts el in DOM if true Like a usual conditional  \nLike a usual conditional Toggles display CSS value Sets the inner text  \nSets the inner HTML Loop through an array/obj Listens to DOM events Reactive updates attribute  \nTwo way data binding Sets val once; Never update  \nCONDITIONAL RENDERING  \nAdd/Remove Element from DOM w/ Boolean  \n\u003Cdiv v-if= 'date == today ' > . . .\u003C/div >  \n\u003Cdiv v-else-if= ' !done ' >   \u003C/div >  \n\u003Cdiv v-else>   \u003C/div >  \nToggles display CSS instead of editing DOM  \n\u003Cdiv v-show= 'date == today ' > . . .\u003C/div >  \nHANDLING EVENTS  \nCapture and event and call a method  \n\u003Cdiv v-on:click= 'count ' >Increase\u003C/div >  \n\u003C !- - SHORTHAND - - >  \n\u003Cdiv @click= 'count ' >Increase\u003C/div >  \nMethod is passed a Native DOM Cvent  \nconst count = (event) => { console.log([event.](event.target)[target](event.target))  \n}  \nEvent modiﬁers ( usage: v-on:click. stop)  \n.stop Stops event propagation  \n.once Can only trigger event once  \n.prevent Calls evt.preventDefault  \n.self Don 't send if target = child  \nLIST RENDERING  \nBasic Loop Over Array  \n\u003Cli v-for= ' item in items ' :key= ' item ' >{{ item }}  \n\u003C/li>  \nLoop and Track Index  \n\u003Cli v-for= ' (item , index) in items ' >  \n{{ index }} : {{ item }}\u003C/li>  \nVUE 3 CHEATSHEET FOR DEVELOPERS  \nPut together by your friends at [learnvue.co](learnvue.co)  \nLoop Values in Object  \n\u003Cli v-for= 'obj in objects ' >{{ obj }}  \n\u003C/li>  \nBINDING DATA  \nSimple Binding  \n\u003Cdiv v-bind :id= 'objectID ' > . . .\u003C/div >  \n\u003C !- - SHORTHAND - - >  \n\u003Cdiv :id= 'objectID ' > . . .\u003C/div >  \nTwo way binding with data and input  \n\u003Cinput v-model= 'email ' />  \nInput Modiﬁers  \n.lazy updates on change event  \n.trim removes extra whitespace  \nUse Objects to Bind Class/ Styles  \n\u003Cinput :class= ' {error: hasError} ' />  \n\u003Cinput :style= ' {margin: space+ \"px \" } ' />  \nBIND DATA BETWEEN CHILD & PARENT  \nUse v-bind to pass data from parent to child and emit a custom event to send data back.  \nIn Parent, Bind Data & Set Listener to Update  \n\u003Ccustom :msg= ' s ' @update= ' s = $event '/>  \nIn Child, Send Back Using emit (event, data)  \ncontext.emit( 'update ' , 'hello world ' )  \nSLOTS  \nSlots allow for content injection from a parent component to a child component.  \nBASIC SLOTS  \nChild Component ( MyButton.Vue)  \n\u003Cdiv >  \nHello World  \n\u003C slot>\u003C/slot>\u003C/div >  \nParent Component  \n\u003Cmy-button>  \nThis content will replace the slot  \n\u003C/my-button>  \nNAMED SLOTS  \nUseful when you have multiple s lots. If unnamed, name is 'default'.  \nChild Component ( MyButton.Vue)  \n\u003Cdiv >  \n\u003C slot name= 'top ' >\u003C/slot>  \n\u003C slot name= 'bottom ' >\u003C/slot>\u003C/div >  \nName S lots in the Parent Component  \n\u003Cmy-button>  \n\u003Ctemplate v-slot :top> // . . .  \n\u003C/template >  \n\u003Ctemplate v-slot :bottom> // . . .\u003C/template >  \n\u003C/my-button>  \nSCOPED SLOTS  \nGive parent component access to child data. Child Component ( MyButton.Vue)  \n\u003Cdiv >  \n\u003C slot v-bind :post='post ' >{{ post.title }}  \n\u003C/slot>\u003C/div >  \nVUE 3 CHEATSHEET FOR DEVELOPERS  \nPut together by your friends at [learnvue.co](learnvue.co)  \nParent Has Access to MyButton post data  \n\u003Cmy-button>  \n\u003Ctemplate v-slot :default= 'slotData ' >{{ [post](post.author }})[.author }}](post.author }})  \n\u003C/template >\u003C/my-button>  \nDYNAMIC COMPONENTS  \nChanges the rendered component- ﬁ nds a registered component with the given name.  \n\u003Ccomponent : is= 'componentName '/>  \nKEEP-A","cbCaiuEbfCvvZZBB","https://ap.wps.com/l/cbCaiuEbfCvvZZBB","pdf",111988,"English","# Creating your app with Vite\n# Template syntax\n# Directives\n# Conditional rendering\n# Handling events\n# List rendering\n# Binding data\n# Data between child & parent\n# Slots\n# Dynamic components\n# Keep-alive elements\n# Composition API\n# Lifecycle hooks\n# Global methods\n# Computed properties\n# watchEffect\n# Template refs","[{\"question\":\"How do you create and run a Vue 3 app using Vite?\",\"answer\":\"Use npm init v ite-app \\u003cproject-name\\u003e, enter the project directory, run npm install, then start the dev server with npm run dev.\"},{\"question\":\"What are the key Vue 3 template syntax options in the cheatsheet?\",\"answer\":\"It covers text interpolation, inner HTML rendering via v-html, and the rule that templates can use JavaScript expressions but not statements.\"},{\"question\":\"How does the cheatsheet handle event binding and event modifiers?\",\"answer\":\"It shows v-on/@ for clicking and passing the native event into a method, then lists modifiers like .stop, .once, .prevent, and .self.\"}]","LearnVue-Vue-3-Cheatsheet - Quick Vue 3 Development and Vue Template Syntax Guide | PDF",[140,144,148,152],{"page_no":22,"url":141,"width":142,"height":143},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/d2715bb1b2ab161f7fde6bc0adf8f1cb.webp",983,1272,{"page_no":26,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/17cb52d180a490ae53317540b93876b1.webp",982,1270,{"page_no":30,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/aa208e12d377a0737e96e893f0e41fb8.webp",981,1269,{"page_no":33,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/783010393fc737056485401e2af7c727.webp",980,1268,{"list":157,"token":228},[158,166,173,180,187,194,201,208,215,222],{"doc_id":159,"doc_title":160,"file_type":161,"home_preview_img_url":162,"slug":163,"view_count":164,"category_name":29,"create_tm":165},31405,"Free Corporate Strategy PPT Template for Modern Planning","pptx","https://hwc-ap.ag.wps.com/api/thumbnail/3_3e0ab0eade8f44638dc9670371d05328","free-corporate-strategy-ppt-template-for-modern-planning",211,1779442419,{"doc_id":167,"doc_title":168,"file_type":133,"home_preview_img_url":169,"slug":170,"view_count":171,"category_name":29,"create_tm":172},242589,"Internship Tracker Excel Template - Training and Application Tracking","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229894804553/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=BECAX5%2Fe%2B6n8BJhdVp%2FcTWUiGc0%3D","internship-tracker-excel-template-training-and-application-tracking",163,1789192497,{"doc_id":174,"doc_title":175,"file_type":161,"home_preview_img_url":176,"slug":177,"view_count":178,"category_name":29,"create_tm":179},31404,"Free Creative Art PPT Template for Abstract Presentations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229741044046/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=PRi0hYjQuuaNPyVDCaoSrsxbRKQ%3D","free-creative-art-ppt-template-for-abstract-presentations",157,1779442210,{"doc_id":181,"doc_title":182,"file_type":161,"home_preview_img_url":183,"slug":184,"view_count":185,"category_name":29,"create_tm":186},54,"Preschool Science Presentation Template","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229690104986/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=om1G5WEGWSUZILJeTqlrAS4jK7A%3D","preschool-science-presentation-template",135,1775819487,{"doc_id":188,"doc_title":189,"file_type":133,"home_preview_img_url":190,"slug":191,"view_count":192,"category_name":29,"create_tm":193},234838,"English for Professional Communication - Syllabus (UK5SECENG300)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229893003521/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=jQHEPne%2Bb3bTd8QwQjcXSUgmNR8%3D","english-for-professional-communication-syllabus-uk5seceng300",113,1789091627,{"doc_id":195,"doc_title":196,"file_type":133,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":29,"create_tm":200},236663,"Advanced Trauma Life Support - Student Course Manual - Tenth Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229893543663/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=m1BtMvtb1B0QlPf1MyPeYjCbVKY%3D","advanced-trauma-life-support-student-course-manual-tenth-edition",111,1789106924,{"doc_id":202,"doc_title":203,"file_type":161,"home_preview_img_url":204,"slug":205,"view_count":206,"category_name":29,"create_tm":207},31406,"Free Travel Journal PPT Template for Adventure Albums","https://hwc-ap.ag.wps.com/api/thumbnail/3_dfb7a808c36b429da443a5dc532dcd54","free-travel-journal-ppt-template-for-adventure-albums",108,1779442650,{"doc_id":209,"doc_title":210,"file_type":161,"home_preview_img_url":211,"slug":212,"view_count":213,"category_name":29,"create_tm":214},31412,"Free Vintage Exploration PPT Theme for Travel Logs","https://hwc-ap.ag.wps.com/api/thumbnail/3_a69d82db3b4745fcbce97e4a80718cea","free-vintage-exploration-ppt-theme-for-travel-logs",107,1779444206,{"doc_id":216,"doc_title":217,"file_type":133,"home_preview_img_url":218,"slug":219,"view_count":220,"category_name":29,"create_tm":221},18509,"Competitive Analysis: 3-Circle Sweet Spot PPT","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229708148846/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=rT6IYjEwxzKy%2BCtQHAwYqJvpo3k%3D","competitive-analysis-3-circle-sweet-spot-ppt",101,1777021960,{"doc_id":223,"doc_title":224,"file_type":133,"home_preview_img_url":225,"slug":226,"view_count":220,"category_name":29,"create_tm":227},18515,"Innovation Venn Diagram: 3-Circle PPT Template","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229707947834/last/442/249?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796528219&Signature=ai8o%2FzWy%2Bqn%2FVPjZkNf0FntdJxU%3D","innovation-venn-diagram-3-circle-ppt-template",1777022229,"eyJhbGciOiJFUzI1NiIsImtpZCI6IjQ1N2I3ZmM4LTI1OTktNDg0YS05ZTk3LWQxNDYxNmMzNjZiZiIsImtpbmQiOiJvcGVuIiwidHlwIjoiSldUIn0.eyJhaWQiOjg3OTYwOTUxNjU4MDMsImF0cCI6InNwIiwiYXRzIjoiYmw2cHZFSmtEIiwiYnVpIjp0cnVlLCJjaWQiOjAsImNsaSI6IkFLMjAyNjAzMDROTUFXQ0oiLCJjb2EiOjY0LCJleHAiOjE3OTY1MzA3MjgsImpzdCI6ZmFsc2UsInNwaSI6ODc5NjA5NTE2NTgwM30.uqlveaocoUwEsu3mGjaSelJOwkUtz3N_hI50w3UfXhPUI1gNKSlQsQaGgYrm5rX0gLGLbd-9Wq-IkKTJ94ztpw"]