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. c++题目:数迷

    c++题目:数迷 题目 [题目描述] 给出含有N×N个格子的正方形表格,要求每个格子都填上一个个位数(范围1-N),使得每行.每列以及同一斜线上的数字都不同.部分格子已经填好数字.求满足题意的方案数. ...

  2. 【Devexpress】pivotGridControl设置不显示展开折叠按钮

    只需要设置.效果看图二

  3. Promise基础知识

    Promise 1.Promise的前置小知识 进程(厂房) 程序的运行环境 线程(工人) 线程是实际进行运算的东西 同步 通常情况代码都是自上向下一行一行执行的 前边的代码不执行后边的代码也不会执行 ...

  4. java中的动态绑定机制

    本文主要讲述java中的动态绑定机制. 老韩ppt关于动态绑定机制: 示例代码如下: public class DynamicBinding { public static void main(Str ...

  5. css images图片铺满 不变型 以及头像裁剪 属性

    一,图片的引入 background:url(img_flwr.gif); background-repeat:no-repeat; //平铺 二,图片的大小不不变形 background-size: ...

  6. PRIx64:uint64_t类型输出为十六进制格式

    #include <stdio.h> #include <stdint.h> #include <inttypes.h> int main(void) { uint ...

  7. 这可能是Feign调用可重试的最佳方案了

    前言 在我们公司里,不同的服务之间通过Feign进行远程调用,但是,我们在尝试使调用可重试时遇到了一个小问题,Feign框架本身可以配置的自己的重试机制,但是它是一刀切的方式,所有的调用都是同样的机制 ...

  8. NET-SynchronizationContext

    title: .NET SynchronizationContext date: 2022-12-06 09:38:53 tags: - .NET 前言 最近在看CAP的源码,经常能看到Configu ...

  9. 遗传算法 Genetic Algorithms

    遗传算法 Genetic Algorithms 遗传算法是一种"adaptive heuristic search algorithm"(自适应启发式搜索算法),虽不明.但觉厉.其 ...

  10. 04-Sed操作参数

    1 Sed操作参数 1.1 s--替换 s表示替换(substitute)文件内的字符串. [address1],[address2]s/pattern/replacement/[flag] # s/ ...