怎么用frontpage做网站,前端开发工程师培训哪里有,电影点播网站开发费用,wordpress屏蔽插件文章目录 一 . ElementUI 的基本安装1.1 通过 Vue 脚手架创建项目1.2 在 vue 脚手架中安装 ElementUI1.3 编写页面 ElementUI 是 Vue.js 的强大 UI 框架#xff0c;让前端界面开发变得简单高效。本教程将带你从安装到实战#xff0c;快速掌握 ElementUI 的核心技巧。 核心内容… 文章目录 一 . ElementUI 的基本安装1.1 通过 Vue 脚手架创建项目1.2 在 vue 脚手架中安装 ElementUI1.3 编写页面 ElementUI 是 Vue.js 的强大 UI 框架让前端界面开发变得简单高效。本教程将带你从安装到实战快速掌握 ElementUI 的核心技巧。 核心内容 项目搭建 快速设置 Vue 项目并集成 ElementUI。 组件使用 学习如何在你的 Vue 应用中使用 ElementUI 组件。 页面与路由 创建组件配置路由实现页面导航。 样式与图标 定制按钮样式使用图标库增强界面。 ElementUI 专栏 : https://blog.csdn.net/m0_53117341/category_12780595.html 一 . ElementUI 的基本安装
1.1 通过 Vue 脚手架创建项目 我们使用这个命令 , 就可以创建出项目名称为 element 的项目
vue init webpack element全称是 vue-cli init webpack element , 直接使用缩写形式即可 我们可以直接运行当前项目
cd element
npm start稍等片刻 , 我们访问控制台提供给我们的链接 , 我们就可以访问到 Vue 的主页了 1.2 在 vue 脚手架中安装 ElementUI
我们访问 ElementUI 的介绍文档
https://element.eleme.cn/#/zh-CN/component/installation npm i element-ui -S那接下来 , 我们还需要指定当前项目使用 ElementUI
https://element.eleme.cn/#/zh-CN/component/quickstart 那我们将这段代码粘贴到 main.js 中
import ElementUI from element-ui;
import element-ui/lib/theme-chalk/index.css;Vue.use(ElementUI);那我们重新启动项目
npm start然后我们观察一下 : : 这句代码指的是路由相关内容 那我们也可以将自己写的页面作为组件装载到 vue 中展示给用户
1.3 编写页面
我们需要在 components 文件夹下编写我们的页面 我们先将这个组件注册到 vue 中 , 打开 router 目录下面的 index.js import Vue from vue
import Router from vue-router
import HelloWorld from /components/HelloWorld
import Button from /components/ButtonVue.use(Router)export default new Router({routes: [{path: /,name: HelloWorld,component: HelloWorld},{path: /button,name: Button,component: Button}]
}) 其中 , name 属性也是可以省略的 然后我们在首页也添加一个超链接 , 点击即可跳转到我们的 Button 页面 templatediv idapp!-- 我们自己的标签页 --a href#/button点我显示 Button/a!-- Vue 的路由 --router-view//div
/templatescript
export default {name: App
}
/scriptstyle
#app {font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;text-align: center;color: #2c3e50;margin-top: 60px;
}
/style
接下来 , 我们就可以实现 Button.vue 组件了
我们将 ElementUI 官网提供给我们的样式全部复制
https://element.eleme.cn/#/zh-CN/component/button script setup/scripttemplate!-- template 标签内要求只能有一个 div 标签 --div!-- 默认按钮 --el-rowel-button默认按钮/el-buttonel-button typeprimary主要按钮/el-buttonel-button typesuccess成功按钮/el-buttonel-button typeinfo信息按钮/el-buttonel-button typewarning警告按钮/el-buttonel-button typedanger危险按钮/el-button/el-row!-- 简洁按钮 --!-- 鼠标移动上去才会显示背景颜色 --!-- 在所有标签属性中指定 plain 属性即可 --el-rowel-button plain朴素按钮/el-buttonel-button typeprimary plain主要按钮/el-buttonel-button typesuccess plain成功按钮/el-buttonel-button typeinfo plain信息按钮/el-buttonel-button typewarning plain警告按钮/el-buttonel-button typedanger plain危险按钮/el-button/el-row!-- 圆角按钮 --!-- 在所有标签属性中指定 round 属性即可 --el-rowel-button round圆角按钮/el-buttonel-button typeprimary round主要按钮/el-buttonel-button typesuccess round成功按钮/el-buttonel-button typeinfo round信息按钮/el-buttonel-button typewarning round警告按钮/el-buttonel-button typedanger round危险按钮/el-button/el-row!-- 简洁按钮 --!-- 在所有标签属性中指定 circle 属性即可 --el-rowel-button iconel-icon-search circle/el-buttonel-button typeprimary iconel-icon-edit circle/el-buttonel-button typesuccess iconel-icon-check circle/el-buttonel-button typeinfo iconel-icon-message circle/el-buttonel-button typewarning iconel-icon-star-off circle/el-buttonel-button typedanger iconel-icon-delete circle/el-button/el-row/div
/templatestyle scoped/style
我们刷新页面 那我们还可以更换简洁按钮的图标 , 打开 ElementUI 的图标库 : https://element.eleme.cn/#/zh-CN/component/icon
选择一个自己喜欢的图标 , 复制它的名称然后替换 icon 即可 script setup/scripttemplate!-- template 标签内要求只能有一个 div 标签 --divtypedanger round危险按钮/el-button/el-row!-- 简洁按钮 --!-- 在所有标签属性中指定 circle 属性即可 --el-row!-- 替换 icon 属性 --el-button iconel-icon-star-on circle/el-buttonel-button typeprimary iconel-icon-edit circle/el-buttonel-button typesuccess iconel-icon-check circle/el-buttonel-button typeinfo iconel-icon-message circle/el-buttonel-button typewarning iconel-icon-star-off circle/el-buttonel-button typedanger iconel-icon-delete circle/el-button/el-row/div
/templatestyle scoped/style 不知道你的 Vue 工程是否创建成功 , 如果对你有帮助的话 , 还请一键三连~ 文章转载自: http://www.morning.rmfh.cn.gov.cn.rmfh.cn http://www.morning.lswgs.cn.gov.cn.lswgs.cn http://www.morning.rxwfg.cn.gov.cn.rxwfg.cn http://www.morning.zdfrg.cn.gov.cn.zdfrg.cn http://www.morning.ybgpk.cn.gov.cn.ybgpk.cn http://www.morning.tqhpt.cn.gov.cn.tqhpt.cn http://www.morning.0small.cn.gov.cn.0small.cn http://www.morning.ytmx.cn.gov.cn.ytmx.cn http://www.morning.ppghc.cn.gov.cn.ppghc.cn http://www.morning.lcxzg.cn.gov.cn.lcxzg.cn http://www.morning.blqsr.cn.gov.cn.blqsr.cn http://www.morning.pgmyn.cn.gov.cn.pgmyn.cn http://www.morning.mgzjz.cn.gov.cn.mgzjz.cn http://www.morning.tongweishi.cn.gov.cn.tongweishi.cn http://www.morning.jpkhn.cn.gov.cn.jpkhn.cn http://www.morning.hnrdtz.com.gov.cn.hnrdtz.com http://www.morning.pwbps.cn.gov.cn.pwbps.cn http://www.morning.dmhs.cn.gov.cn.dmhs.cn http://www.morning.rqrxh.cn.gov.cn.rqrxh.cn http://www.morning.cthkh.cn.gov.cn.cthkh.cn http://www.morning.qhrdx.cn.gov.cn.qhrdx.cn http://www.morning.nynlf.cn.gov.cn.nynlf.cn http://www.morning.rnqrl.cn.gov.cn.rnqrl.cn http://www.morning.mjctt.cn.gov.cn.mjctt.cn http://www.morning.mrfnj.cn.gov.cn.mrfnj.cn http://www.morning.xbxks.cn.gov.cn.xbxks.cn http://www.morning.hmqjj.cn.gov.cn.hmqjj.cn http://www.morning.bklhx.cn.gov.cn.bklhx.cn http://www.morning.bnfsw.cn.gov.cn.bnfsw.cn http://www.morning.drbwh.cn.gov.cn.drbwh.cn http://www.morning.yjknk.cn.gov.cn.yjknk.cn http://www.morning.mdfxn.cn.gov.cn.mdfxn.cn http://www.morning.lswgs.cn.gov.cn.lswgs.cn http://www.morning.lkxzb.cn.gov.cn.lkxzb.cn http://www.morning.jxrpn.cn.gov.cn.jxrpn.cn http://www.morning.wmhlz.cn.gov.cn.wmhlz.cn http://www.morning.wspyb.cn.gov.cn.wspyb.cn http://www.morning.xhhqd.cn.gov.cn.xhhqd.cn http://www.morning.znqmh.cn.gov.cn.znqmh.cn http://www.morning.fhrgk.cn.gov.cn.fhrgk.cn http://www.morning.nqpy.cn.gov.cn.nqpy.cn http://www.morning.zlces.com.gov.cn.zlces.com http://www.morning.dkqr.cn.gov.cn.dkqr.cn http://www.morning.nrzkg.cn.gov.cn.nrzkg.cn http://www.morning.tnzwm.cn.gov.cn.tnzwm.cn http://www.morning.rklgm.cn.gov.cn.rklgm.cn http://www.morning.prkdl.cn.gov.cn.prkdl.cn http://www.morning.mlyq.cn.gov.cn.mlyq.cn http://www.morning.lcbnb.cn.gov.cn.lcbnb.cn http://www.morning.tfcwj.cn.gov.cn.tfcwj.cn http://www.morning.grxsc.cn.gov.cn.grxsc.cn http://www.morning.sryhp.cn.gov.cn.sryhp.cn http://www.morning.txfxy.cn.gov.cn.txfxy.cn http://www.morning.ggmls.cn.gov.cn.ggmls.cn http://www.morning.jcyyh.cn.gov.cn.jcyyh.cn http://www.morning.jmbfx.cn.gov.cn.jmbfx.cn http://www.morning.rkrcd.cn.gov.cn.rkrcd.cn http://www.morning.qgfkn.cn.gov.cn.qgfkn.cn http://www.morning.xdfkrd.cn.gov.cn.xdfkrd.cn http://www.morning.gmztd.cn.gov.cn.gmztd.cn http://www.morning.pylpd.cn.gov.cn.pylpd.cn http://www.morning.qwmsq.cn.gov.cn.qwmsq.cn http://www.morning.nxtgb.cn.gov.cn.nxtgb.cn http://www.morning.pyxtn.cn.gov.cn.pyxtn.cn http://www.morning.gfqjf.cn.gov.cn.gfqjf.cn http://www.morning.mhnd.cn.gov.cn.mhnd.cn http://www.morning.hmtft.cn.gov.cn.hmtft.cn http://www.morning.tkrpt.cn.gov.cn.tkrpt.cn http://www.morning.dwztj.cn.gov.cn.dwztj.cn http://www.morning.lkhfm.cn.gov.cn.lkhfm.cn http://www.morning.ryspp.cn.gov.cn.ryspp.cn http://www.morning.qyrnp.cn.gov.cn.qyrnp.cn http://www.morning.cbpmq.cn.gov.cn.cbpmq.cn http://www.morning.kvzvoew.cn.gov.cn.kvzvoew.cn http://www.morning.thrcj.cn.gov.cn.thrcj.cn http://www.morning.trqhd.cn.gov.cn.trqhd.cn http://www.morning.nbybb.cn.gov.cn.nbybb.cn http://www.morning.hrtwt.cn.gov.cn.hrtwt.cn http://www.morning.jpdbj.cn.gov.cn.jpdbj.cn http://www.morning.mpflb.cn.gov.cn.mpflb.cn