随笔分类 -  Vue

上一页 1 ··· 3 4 5 6 7 8 下一页
摘要:Starter app: https://github.com/alexjoverm/Vue-Typescript-Starter Writing Vue components as plain objects has very limited capabilities for TypeScript 阅读全文
posted @ 2017-09-11 20:58 Zhentiw 阅读(513) 评论(0) 推荐(0)
摘要:In large applications, dividing the application into smaller chunks is often times necessary. In this lesson, we will look at how vue loads async comp 阅读全文
posted @ 2017-07-26 16:10 Zhentiw 阅读(311) 评论(0) 推荐(0)
摘要:You often use the same data in different ways across pages. This lesson walks you through setting up multiple pages, retrieving the same data, then di 阅读全文
posted @ 2017-07-25 21:25 Zhentiw 阅读(268) 评论(0) 推荐(0)
摘要:You can conditionally add classes to Vue.js templates using v-bind:class. This will help display the status of a todo as you add a Vuex action to patc 阅读全文
posted @ 2017-07-25 21:16 Zhentiw 阅读(412) 评论(0) 推荐(0)
摘要:You'll begin to notice as you build out your actions in Vuex, many of them will look quite similar. Creating a remove action looks almost the same as 阅读全文
posted @ 2017-07-25 21:07 Zhentiw 阅读(333) 评论(0) 推荐(0)
摘要:The default behavior of submitting an HTML form is to reload the page. You can use the Vue.js @submit.prevent syntax to avoid that behavior. Then wire 阅读全文
posted @ 2017-07-25 20:58 Zhentiw 阅读(1021) 评论(0) 推荐(0)
摘要:You can isolate parts of templates you want to re-use into components, but you can also reuse those components across pages using layouts. This lesson 阅读全文
posted @ 2017-07-25 20:33 Zhentiw 阅读(382) 评论(0) 推荐(0)
摘要:Because Nuxt renders pages on the server, you should use the nuxt-link components to navigate between pages. Each time a page loads, you can check if 阅读全文
posted @ 2017-07-24 20:12 Zhentiw 阅读(440) 评论(0) 推荐(0)
摘要:In a server-rendered application, if you attempt to load data before the page renders and the data fails to load, your application will not run unless 阅读全文
posted @ 2017-07-24 19:47 Zhentiw 阅读(296) 评论(0) 推荐(0)
摘要:You add array of todos to the store simply by adding them to the state defined in your store/index.js file. You can access the array of todos using ma 阅读全文
posted @ 2017-07-24 18:10 Zhentiw 阅读(239) 评论(0) 推荐(0)
摘要:You can easily add CSS libraries to Nuxt using yarn or npm to install them, then simply adding them to the nuxt.config.js so they're included in each 阅读全文
posted @ 2017-07-24 17:57 Zhentiw 阅读(289) 评论(0) 推荐(0)
摘要:You commit changes to state in Vuex using defined mutations. You can easily access these state mutations in your template using mapMutations. This les 阅读全文
posted @ 2017-07-24 15:59 Zhentiw 阅读(338) 评论(0) 推荐(0)
摘要:Install: Init project: Run: Create a index.js file inside store folder: Display the counter inside pages/index.vue: mapState: return a state tree obje 阅读全文
posted @ 2017-07-24 15:33 Zhentiw 阅读(221) 评论(0) 推荐(0)
摘要:How do we set up a simple app with its own routes with their own components in Vue? Install: Define routers: Navgiation: 阅读全文
posted @ 2017-02-06 19:30 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:You can dynamically switch between components in a template by using the reserved <component> element and dynamically bind to its is attribute. By usi 阅读全文
posted @ 2017-01-24 16:49 Zhentiw 阅读(529) 评论(0) 推荐(0)
摘要:By building components, you can extend basic HTML elements and reuse encapsulated code. Most options that are passed into a Vue constructor can be pas 阅读全文
posted @ 2017-01-24 16:28 Zhentiw 阅读(512) 评论(0) 推荐(0)
摘要:You can use v-if and v-else to display content based on assertions on your data. Similarly, v-show can be used to render the content, but hide it with 阅读全文
posted @ 2017-01-24 15:50 Zhentiw 阅读(1302) 评论(0) 推荐(0)
摘要:Use v-bind:class and v-bind:style to compute html classes and inline styles from component data. Vue.js will automatically add vendor prefixes when us 阅读全文
posted @ 2017-01-22 05:14 Zhentiw 阅读(267) 评论(0) 推荐(0)
摘要:Use watchers to keep an eye on your data. Watchers are methods that are invoked when the specified attribute changes. They are useful when you want to 阅读全文
posted @ 2017-01-20 19:49 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:You can add computed properties to a component to calculate a property on the fly. The benefit of this over invoking a method is that computed propert 阅读全文
posted @ 2017-01-20 19:48 Zhentiw 阅读(587) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 下一页