Element(1)概述

序言

packages

theme-chalk

在封装组件时,不知道到底需要一个什么样的标签组件。如果去加一堆的判断的话,代码量太大,但用render()函数来实现就很简单。

$slots

vue 中的const {XXX } =this 的作用效果

const { xxx } = this.state;
上面的写法是es6的写法,其实就相当于:
const xxx = this.state.xxx
const {comment,index,deleteComment} = this 
上面的这句话是一个简写,最终的含义相当于
const  comment = this.comment
const  index = this.index
const   deleteComment = this.deleteComment
this.$emit('click', e)

computed和watch的区别

计算属性是计算属性,侦听器watch是侦听器watch。

 
 

资料

https://element.eleme.cn/#/zh-CN/component/installation

https://github.com/ElemeFE/element

原文地址:https://www.cnblogs.com/cnki/p/14307188.html