May 29, 2021 Article blog
In this organization's complex interface problem, Vue and React can be said to be very much the same: everything is a component. We can make any example into a component.
var Example = Vue.extend({
template: '<div>{{ message }}</div>',
data: function () {
return {
message: 'Hello Vue.js!'
}
}
})
// 将该组件注册为 <example> 标签
Vue.component('example', Example)
By componentizing, we can use it in other component templates:
<example></example>
Components can also set up other components and eventually form a tree structure representing the UI view, and for effective dynamic composition between components, Vue can:
That's all the Vue .js componentization that the editor brings you.