资料下载网
首页 计算机 考试教辅
vue3 Documentation中文教程 pdf电子书免费下载
首页 > 计算机 > javascript > vue3 Documentation中文教程 pdf电子书免费下载

《vue3 Documentation中文教程》pdf电子书免费下载


下载方式一:

百度网盘下载地址:https://pan.baidu.com/s/1DNfrwWSM7RtbYwvpXNuRJA
百度网盘密码:1111

下载方式二:

http://ziliaoshare.cn/Download/ac_123522_pd_vue3DocumentationZWJC.zip

 


vue3 Documentation中文教程

作者:empty

页数:655

出版社:empty

《vue3 Documentation中文教程》介绍

Vue js is built by design to be incrementally adoptable, This means that it can beintegrated into a project multiple ways depending on the requirements.There are three primary ways of adding Vue js to a project:1.Import it as a CDN package on the page2.Install it using n pm3.Use the official CLI to scaffold a project, which provides batteries-included buildsetups for a modern frontend workflow(e.g., hot-reload, lint-on-save, and muchmore)ReleaseNotesLatest version:an pmDetailed releasenotes for each version are available on Gi tHu bE.Vue DevtoolsCurrently in Beta-Vue x and Router integration is still WIPWhen using Vue, we recommend also installing the Vue Devtools C in your browserallowing you to inspect and debug your Vue applications in a more user-friendlyinterface.Get the Chrome Extension eGet the Firefox Add ongGet the standalone Electron appeFor prototyping or learning purposes, you can use the latest version with:For production, we recommend linking to a specific version number and build to avoidunexpected breakage from newer versions.n pm is the recommended installation method when building largescale applicationswith Vue.It pairs nicely with module bundle rs such as Web pack to r Rollup.Vuealso provides accompanying tools for authoring Single File ComponentsVue provides an official CLIc for quickly scaffolding ambi ious Single PageApplications.It provides batteries-included build setups for a modern frontendworkflow.It takes only a few minutes to get up and running with hot-reload, lint-on-save, and production-ready builds.See the Vue CLI docs B for more details.localhost 8083/guide nn stella tion, html

The CLl assumes prior knowledge of Node.js and the associated buildtools.Ifyou are new to Vue or front-end buildtools, we strongly suggest goingthrough the guide without any buildtools before using the CLI.For Vue 3, you should use Vue C LIv 4.5availableonnpmasvue/cli.To upgrade,you need to reinstall the latest version of g vue/cli globally:

Vite Bisa web development buildtool that allows for lightning fast serving of codedue its native ES Module import approach.Vue projects can quickly be setup with Vite by running the following commands inyour terminal.

In the dist/directory of then pm package l you will find many different builds ofVue.js.Here is an overview of which distfile should be used depending on the use-case.

vue.runtime.global.js contains only the runtime and requires templates to bepre-compiled during a build step..In lines all Vue core internal packages-i.e.it'sa single file with no dependencies onother files.This means you must import everything from this file and this file only toensure you are getting the same instance of code.·Contains hard-coded prod/dev branches, and the prod build is pre-mini fied.Usethe*, prod, js files for production.NoteGlobal builds are not UMD ebuilds.They are built as lIFEs and are onlymeant for direct use via c script src= ....vue(.runtime) .esm-browser(.prod) .js:·For usage via native ES modules imports(in browser via c script type= module >..Shares the same runtime compilation, dependency inlining and hard-codedprod/dev behavior with the global build.With a Bundlervue(.runtime) .esm-bundler.js:·For use with bundle rs like web pack, rollup and parcel..Leaves prod/dev branches with process.env.N DOE_ENV guards(must be replaced bybundler)·Does not ship mini fied builds(to be done together with the rest of the code afterbundling)

Evagdein5aarning:ThedocumentwascreatedwthSpire.PDFfRtaNElrivejsEvaze2aq5xWarning:ThedocumentwascreatedwithSpire.PDFfetaNEJrlvues·Imports dependencies(e.g.@vue/runtime-core, @vue/runtime-compiler)o Imported dependencies are also esm-bundler builds and will in turn import theirdependencies(e.g.@vue/runtime-core imports@vue/reactivity)。This means you can install/import these deps individually without ending up withdifferent instances of these dependencies, but you must make sure they allresolve to the same version.

vue.esm-bundler.js:includes the runtime compiler.Use this if you are using abundler but still want runtime template compilation(e.g.in-DOM templates ortemplates via inline JavaScript strings) .You will need to configure your bundlerto alias vue to this file.For Server-Side Renderingvue.cjs(.prod) .js:·For use in Node js server-side rendering via require() ..If you bundle your app with web pack with target:'node'and properly externalizevue, this is the build that will be loaded.The dev/prod files are pre-built, but the appropriate file is automatically requiredbased on process.env.NODE_ENV.

When using vue-loader, templates inside‘.vue files are pre-compiled intoJavaScript at build time.You don't really need the compiler in the final bundle, and cantherefore use the runtime-only build

Already know Vue 2 and just want to learn about what's new in Vue 3?Checkout the Migration Guide!What is Vue.js?Vue(pronounced/v ju:/, like view) is a progressive framework for building userinterfaces.Unlike other monolithic frameworks, Vue is designed from the ground up tobe incrementally adoptable.The core library is focused on the view layer only, and iseasy to pickup and integrate with other libraries or existing projects.On the otherhand, Vue is also perfectly capable of powering sophisticated Single-PageApplications when used in combination with modern tooling and supporting librariesIf you'd like to learn more about Vue before diving in, we created a video walkingthrough the core principles and a sample project.GettingStartedThe easiest way to tryout Vue.js is using the HelloWorld example c.Feel free toopen it in another tab and follow along as we go through some basic examples.The Installation page provides more options of installing Vue.Note:We do notrecommend that beginners start with vue-cli, especially if you are not yet fam liarWatch a free video course on Vue Mastery

We have already created our very first Vue app!This looks pretty similar to renderinga string template, but Vue has done alot of work under the hood, The data and theDOM are now linked, and everything is now reactive.How do we know?Take a look atthe example below where counter property increments every second and you willsee how rendered DOM changes:

Here we'e encountering something new.The v-bind attribute you're seeing is calleda directive.Directives are prefixed with v-to indicate that they are special attributesprovided by Vue, and as you may have guessed, they apply special reactive behaviorto the rendered DOM.Here we are basically saying keep this element's titleattribute up-to-date with the message property on the current active instance. To let users interact with your app, we can use the v-on directive to attach eventconst Attribute Binding={data() {3return{

The component system is another important concept in Vue, because it'sanabstraction that allows us to build large-scale applications composed of small, self-contained, and often reusable components.If we think about it, almost any type ofapplication interface can be abstracted into a tree of components:In Vue, a component is essentially an instance with pre-defined options.Registering acomponent in Vue is straightforward:we create a component object as we did with

This is a contrived example, but we have managed to separate our app into twosmaller units, and the child is reasonably well-decoupled from the parent via the propsinterface.We can now further improve ourcomponent with moreIn a large application, it is necessary to divide the whole app into components to makedevelopment manageable.We will talk alot more about components later in the guide,but here'san(imaginary) example of what an app's template might look like withit's representing, so that its content can be dynamic.We also need to provide each component with a key ,which will be explained later.

You may have noticed that Vue components are very similar to Custom Elements,which are part of the Web Components Spec B, That's because Vue's componentsyntax is loosely modeled after the spec.For example, Vue components implementthe Slot API and the is special attribute.However, there area few key differences:1.The Web Components Spec has been finalized but is not natively implemented inevery browser.Safari 10.1+, Chrome 54+and Firefox 63+natively support webcomponents.In comparison, Vue components work consistently in all supportedbrowsers (IE 11 with compatibility build and above) .When needed, Vue componentscan also be wrapped inside a native custom element.2.Vue components provide important features that are not available in plain customelements, most notably cross-component dataflow, custom event communicationand buildtool integrations.Although Vue doesn't use custom elements internally, it has great interoperabilitywhen it comes to consuming or distributing as custom elements, Vue CLl alsosupports building Vue components that register themselves as native customelements.Ready for More?We've briefly introduced the most basic features of Vue.j score-the rest of this guidewill cover them and other advanced features with much finer details, so make sure toread through it all!

Every Vue application starts by creating a new application instance with thecreate App function:1const app=Vue.create App({/*options*/} )The application instance is used to register'globals'that can then be used bycomponents within that application.Well discuss that in detail later in the guide but asa quick example:Most of the methods exposed by the application instance return that same instance,The options passed to create App are used to configure the root component.Thatcomponent is used as the starting point for rendering when we mount the application.An application needs to be mounted into a DOMelement.For example, if we want tomount a Vue application into c divid- app“>

, we should pass#app:Unlike most of the application methods, mount does not return the application,Although not strictly associated with theM VVM pattern, Vue's design was partlyinspired by it.As a convention, we often use the variable vn(short for View Model) toWhile all the examples on this page only need a single component, most realapplications are organized into a tree of nested, reusable components.For example, aEach component wll have its own component instance, vm.For some components,such as To do Item, there wil likely be multiple instances rendered at anyone time.Allof the component instances in this application wil share the same applicationWell talkabout the component system in detail later.


《vue3 Documentation中文教程》目录

empty

计算机


python
AI人工智能
javascript
计算机网络/服务器
数据库技术
计算机F

考试教辅


考研考博
英语四六级

沪ICP备18046276号-5
上海秋旦网络科技中心:上海市奉贤区金大公路8218号1幢 联系电话:15618918379