vuejs

  1. 2020年 11 大顶级 VueJS 开发工具
    1. computed vs watcher
  2. vuex
  3. vue-cli
    1. Vue CLI projects comes with support for PostCSS, CSS Modules and pre-processors including Sass, Less and Stylus

2020年 11 大顶级 VueJS 开发工具

nuxt.js bit-for-vue 7. Vuetify

  1. Vue Apollo
  2. Mocha

https://vuedose.tips/tips/dynamic-imports-in-vue-js-for-better-performance/

https://michaelnthiessen.com/force-re-render/

什么是dom模板?什么是字符串模板?两者有什么关系?
https://blog.csdn.net/zwt_guiji/article/details/81979299

computed vs watcher

computed for complex logic
watcher for async operation

Symbol

If you do not want the root element of a component to inherit attributes, you can set inheritAttrs: false in the component’s options.
With inheritAttrs: false and $attrs, you can manually decide which element you want to forward attributes to

Custom Events
Event Names
Customizing Component v-model
Binding Native Events to Components:
There may be times when you want to listen directly to a native event on the root element of a component. In these cases, you can use the .native modifier for v-on。
.sync Modifier

Dynamic & Async Components
keep-alive

Handling Edge Cases
$root $parent , $ref


Alternate Template Definitions

X-Templates


$forceUpdate

v-once

currentRoute: window.location.pathname

Use module scoping to keep private functions inaccessible from the outside. If that’s not possible, always use the $_ prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. Then to avoid conflicts with code by other authors, also include a named scope (e.g. $yourPluginName).

named Views

Note that Navigation Guards are not applied on the route that redirects, only on its target.

Passing Props to Route Components

Try to keep the props function stateless, as it’s only evaluated on route changes. Use a wrapper component if you need state to define the props, that way vue can react to state changes.

HTML5 History Mode

Note that beforeRouteEnter is the only guard that supports passing a callback to next.

vuex

The mapState Helper
https://vuex.vuejs.org/guide/state.html

mapState()
mapGetters()
…mapMutations()

Actions()
store.dispatch(‘increment’)

event.target.value

vue-cli

@vue/cli-service
The CLI Service is built on top of webpack and webpack-dev-server. It contains:
CLI Plugins and Presets

Each CLI plugin ships with a generator (which creates files) and a runtime plugin (which tweaks the core webpack config and injects commands).

If the URL starts with ., it’s interpreted as a relative module request and resolved based on the folder structure on your file system.

If the URL starts with ~, anything after it is interpreted as a module request. This means you can even reference assets inside node modules:

If the URL starts with @, it’s also interpreted as a module request.


where config BASE_URL???

data () {
return {
publicPath: process.env.BASE_URL
}
}

Vue CLI projects comes with support for PostCSS, CSS Modules and pre-processors including Sass, Less and Stylus

onFileChanged (event) {
const file = event.target.files[0]
},


--Write by Marcustar,关关雎鸠,在河之洲
目录
Download 相册