ElementUI&Vant ui

基于Vue的一套桌面端的组件库,提前封装好的UI模版,方便开发者快速搭建一个网站前端界面。

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

先创建vue工程,然后再elemntui

安装ElementUI

1.安装vue环境

2.执行vue ui

vue -V
vue ui

1点击小房子

2.创建vue的项目

3.设置项目存放路径

4.点击按钮

5.输入工程名称---git

6.手动配置项目

  • Babel
  • Router
  • Vuex
  • history

7.等待项目创建成功

8.给项目安装ElementUI插件

9.搜索elementUI--完成安装

10.启动项目

11.导入到idea里面

npm run serve

ElementUI图标

提供了一套常用的图标集合

<i class="el-icon-edit"></i>

el-icon-iconName 官方定义的图标名称:直接官网查找对应的使用即可

ElementUI按钮

是ElementUI提供的常用组件

 <el-button>默认按钮</el-button>

可以使用type、plain、round、circle属性对按钮进行修饰

type设置按钮的样式:

 <el-button>默认按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="success">成功按钮</el-button>
<el-button type="info">信息按钮</el-button>
<el-button type="warning">警告按钮</el-button>
<el-button type="danger">危险按钮</el-button>

plain减弱背景颜色

  <el-button plain>朴素按钮</el-button>
<el-button type="primary" plain>主要按钮</el-button>
<el-button type="success" plain>成功按钮</el-button>
<el-button type="info" plain>信息按钮</el-button>
<el-button type="warning" plain>警告按钮</el-button>
<el-button type="danger" plain>危险按钮</el-button>

round:按钮设置圆角

<el-button round>圆角按钮</el-button>
<el-button type="primary" round>主要按钮</el-button>
<el-button type="success" round>成功按钮</el-button>
<el-button type="info" round>信息按钮</el-button>
<el-button type="warning" round>警告按钮</el-button>
<el-button type="danger" round>危险按钮</el-button>

circle将按钮设置成圆形:

 <el-button round>圆角按钮</el-button>
<el-button type="primary" round>主要按钮</el-button>
<el-button type="success" round>成功按钮</el-button>
<el-button type="info" round>信息按钮</el-button>
<el-button type="warning" round>警告按钮</el-button>
<el-button type="danger" round>危险按钮</el-button>

添加icon属性:

 <el-button icon="el-icon-search" circle></el-button>
<el-button type="primary" icon="el-icon-edit" circle></el-button>
<el-button type="success" icon="el-icon-check" circle></el-button>
<el-button type="info" icon="el-icon-message" circle></el-button>
<el-button type="warning" icon="el-icon-star-off" circle></el-button>
<el-button type="danger" icon="el-icon-delete" circle></el-button>

disabled:设置按钮的使用状态

loading属性设置加载中的效果:

<template>
<div>
<el-button type="danger" icon="el-icon-delete" circle @click="tset":loading="loading"></el-button>
</div>
</template> <script>
export default {
name: "Test",
methods:{
tset(){
this.loading=true;
setTimeout(()=>{
this.loading=false
},3000)
}
},
data(){
return{
loading:false
}
}
}
</script> <style scoped> </style>

size属性设置按钮的大小:

medium small mini

ElementUI超链接

Link:文字超链接

el-link
   <el-link href="https://www.baidu.com" target="_blank">Element</el-link>

disable:设置超链接不可用

underline:设置下划线

        <el-link href="https://www.baidu.com" target="_blank" :underline="underline">Element</el-link>
<script>
export default {
name: "Test",
methods:{
tset(){
this.loading=true;
setTimeout(()=>{
this.loading=false
},3000)
}
},
data(){
return{
loading:false,
underline:false
}
}
}
</script>

设置图标:

  <el-link href="https://www.baidu.com" target="_blank" :underline="underline" icon="el-icon-user-solid">Element</el-link>

ElementUI单选框

使用:

el-radion

使用:数据绑定

v-model:

@change=""绑定切换的事件

<template>
<div>
<el-radio v-model="radio" label="1" @change="change">备选项</el-radio>
<el-radio v-model="radio" label="2" @change="change">备选项</el-radio>
</div>
</template> <script>
export default {
name: "Test",
methods:{
change(){
console.log("选项的序号是"+this.radio)
}
},
data(){
return{
loading:false,
underline:false,
radio:"2"
}
}
}
</script> <style scoped> </style>

Element ui&图标、按钮、超链接、单选框的更多相关文章

  1. element ui 手动关闭$notify弹框

    1.需求: 当用户点击 “点击下载” 后,文件导出这个弹框主动消失. 2.解决方案: 如下图所示 (需要注意的是这里的关闭是 点击弹框任意处就会关闭,如果想实现我的需求需要判断一下即可)

  2. vue基于 element ui 的按钮点击节流

    vue的按钮点击节流 场景: 1.在实际使用中,当我们填写表单,点击按钮提交的时候,当接口没返回之前,迅速的点击几次,就会造成多次提交. 2.获取验证码,不频繁的获取. 3.弹幕不能频繁的发 基于这几 ...

  3. element UI 饿了么 UI 分页 按钮不显示的问题

    https://blog.csdn.net/sinat_37255207/article/details/88914235 一个很坑的 深坑  element UI 的 按钮 不显示的深坑 <e ...

  4. PyQt4单选框QCheckBox

    PyQt4中的部件 部件是构建应用程序的基础元素.PyQt4工具包拥有大量的种类繁多的部件.比如:按钮,单选框,滑块,列表框等任何程序员在完成其工作时需要的部件. QCheckBox单选框 单选框具有 ...

  5. [SAP ABAP开发技术总结]选择屏幕——按钮、单选复选框

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  6. Vue + Element UI 实现权限管理系统 前端篇(十一):第三方图标库

    使用第三方图标库 用过Elment的同鞋都知道,Element UI提供的字体图符少之又少,实在是不够用啊,幸好现在有不少丰富的第三方图标库可用,引入也不会很麻烦. Font Awesome Font ...

  7. Vue + Element UI 实现权限管理系统(第三方图标库)

    使用第三方图标库 用过Elment的同鞋都知道,Element UI提供的字体图符少之又少,实在是不够用啊,幸好现在有不少丰富的第三方图标库可用,引入也不会很麻烦. Font Awesome Font ...

  8. element ui 的Notification通知如何加 a 标签和按钮,并弹多个

    前言:工作中需要在页面右下角弹出很多个提醒框,提醒框上有一个可点击的a标签,并有一个按钮,同时还需要一次性关闭所有的弹出框.转载请注明出处:https://www.cnblogs.com/yuxiao ...

  9. vue2.0+Element UI 实现动态表单(点击按钮增删一排输入框)

    对于动态增减表单项,Element UI 官方文档表单那一节已经介绍得很清楚了,我之前没有看见,绕了很多弯路,这里针对点击按钮增删一排输入框的问题做一个总结. 效果图如下 存在一排必填的姓名与手机号, ...

  10. Bootstrap 表单和图片 (内联表单,表单合组,水平排列,复选框和单选框,下拉列表,校验状态,添加额外的图标,控制尺寸,图片)

    一.表单 基本格式 注:只有正确设置了输入框的 type 类型,才能被赋予正确的样式. 支持的输入框控件 包括:text.password.datetime.datetime-local.date.m ...

随机推荐

  1. 【云原生 · Kubernetes】部署zookeeper

    个人名片: 因为云计算成为了监控工程师‍ 个人博客:念舒_C.ying CSDN主页️:念舒_C.ying 部署zookeeper 1.1 zookeeper概述 1.2 ZooKeeper服务中操作 ...

  2. Python: 你所不知道的星号 * 用法

    以下内容为本人的学习笔记,如需要转载,请声明原文链接微信公众号「englyf」https://mp.weixin.qq.com/s/FHyosiG_tegF5NRUEs7UdA 本文大概 1193 个 ...

  3. tostring、(string)和 String.valueOf()

    上周遇到一个问题,只怪自己平时没注意这个细节,从数据库取数据在map集合里,取出该值是我用了.tostring的方法,一次在当取出数据为空时代码报java.lang.NullPointerExcept ...

  4. 软件开发架构、构架趋势、OSI七层协议

    目录 软件开发架构 构架总结 网络编程前戏 OSI七层协议简介 OSI七层协议值之物理连接层 OSI七层协议之数据链层 网络相关专业名词 OSI七层协议之网络层 IP协议: IP地址特征: IP地址分 ...

  5. 单例模式及pickle序列化模块

    内容回顾 目录 内容回顾 单列模式实现的多种方式 pickle序列化模块 根据类名或对象名如何获取到类的字符串名 选课系统需求分析 功能提炼 选课系统架构设计 选课系统目录搭建 单列模式实现的多种方式 ...

  6. pytest --maxfail=num 运行指令

    ----maxfail=num 表示用例失败总数等于num 时停止运行 注意点:---maxfail=num中间不要存在空格

  7. ssm——mybatis整理

    目录 1.mybatis框架概述 2.直接使用jdbc连接数据库带来的问题 3.mybatis连接池 3.1.mybatis连接池yml配置 3.2.mybatis连接池xml配置 4.一个简单的my ...

  8. java注解基础知识整理

    目录 1.注解的定义 1.1.定义一个注解 1.2.注解的使用 2.JDK内置注解 2.1.java.lang包下的注释类型 2.2.元注解 2.3.Deprecated注解 3.在注解中定义属性 3 ...

  9. Python启动HTTP服务进行文件传输

    有时候局域网共享个东西不方便,尤其在服务器上的时候,总不能先下载下来,再上传上去吧,于是经常在这台机器用python起个http服务,然后去另一台机器直接访问,一来二去,妥试不爽,特进行一下分离 py ...

  10. vivo 服务端监控体系建设实践

    作者:vivo 互联网服务器团队- Chen Ningning 本文根据"2022 vivo开发者大会"现场演讲内容整理而成. 经过几年的平台建设,vivo监控平台产品矩阵日趋完善 ...