随笔分类 - Vue
摘要:Mutations perform synchronous modifications to the state, but when it comes to make an asynchronous operation, they become useless. Actions are a high
阅读全文
只有注册用户登录后才能阅读该文。
只有注册用户登录后才能阅读该文。
摘要:A Vuex store centralizes the state of your app, making it easy to reason about your state flow. In this lesson we’ll see how we can create a Vuex stor
阅读全文
摘要:Using Object Oriented Programming, OOP, style allows us to apply Inversion of Control, IoC, and more patterns. An IoC container helps decoupling depen
阅读全文
摘要:Aspect Oriented Programming, AOP, allows to reuse logic across an entire app in a very neat way, decoupling it from the business logic. Kaop-ts bring
阅读全文
摘要:Vue watchers allow to perform async updates as a side effect of a property change. This lesson shows you how you can watch properties on your class ba
阅读全文
摘要:Vue models, v-model, allow us to use two-way data binding, which is useful in some cases such as forms. This lesson shows how to use it by creating a
阅读全文
摘要:Components can specify requirements for its props, such as the types you’ve already seen. If a requirement isn’t met, Vue will warn you in the browser
阅读全文
摘要:Vue provide some shortcut methods: @mousemove.stop is comparable to e.stopPropogation() @mousemove.prevent this is like e.preventDefault() @submit.pre
阅读全文
摘要:This lesson shows how you can extend and reuse logic in Vue components using TypeScript inheritance. It will take you through extending a component, i
阅读全文
摘要:Components with slots can expose their data by passing it into the slot and exposing the data using slot-scope in the template. This approach allows y
阅读全文
摘要:You can dynamically switch between components in a template by using the reserved <component> element and dynamically bind to its is attribute. By usi
阅读全文
摘要:Because async components are not bundled with your app, they need to be loaded when requested. This means that your network could be slow, go down, or
阅读全文
摘要:Vue provides a straight-forward syntax for loading components at runtime to help shave off initial bundle size. You simply define a function that retu
阅读全文
摘要:A common scenario is to present different components based on the state of the application. Dynamic components in Vue make this simple by providing a
阅读全文
摘要:Render functions open up a world of customization and control by using pure JavaScript rather than Vue's templating language. When you need to pull of
阅读全文
摘要:Vue's functional components are small and flexible enough to be declared inside of .vue file next to the main component. This allows you to mix jsx an
阅读全文
摘要:Declaring templates and elements inside of templates works great for most scenarios. Sometimes you need a bit more control over what your component wi
阅读全文
摘要:Functional templates allow you to create components consisting of only the template tag and exposing the props passed into the template with the props
阅读全文