Element引入和使用
2022-10-08 17:22:18
256
{{single.collect_count}}

1.使用webpack搭建好项目框架

2.进入mail.js 文件中

// 安装elementnpm i element-ui -S/* 引入element */import ElementUI from 'element-ui'import 'element-ui/lib/theme-chalk/index.css'/* 运用 ElementUI */Vue.use(ElementUI)

3.模板文件中开始使用

<el-button type="primary">主要按钮</el-button>

在这里插入图片描述

备注:下拉框出现一行出现

主要是因为原有的hello class被引入

备注:Vue.config.productionTip = false 作用是“阻止启动生产消息”
例如:
在这里插入图片描述
在这里插入图片描述

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}