当前位置: 首页 > news >正文

第 7 章:Vue UI 组件库

1. PC 端常用 UI 组件库

  • Element UI:https://element.eleme.cn
  • IView UI:https://www.iviewui.com

2. 移动端常用 UI 组件库

  • Vant:https://youzan.github.io/vant
  • Cube UI:https://didi.github.io/cube-ui
  • Mint UI:http://mint-ui.github.io

3. 组件的使用

  1. 按照官方文档,用命令安装
  2. 引入组件库
  3. 应用组件
  • 标签名可以自定义

4. 使用 Element UI 组件库 案例

4.1 main.js

//引入Vue
import Vue from 'vue'
//引入App
import App from './App.vue'//完整引入
//引入ElementUI组件库
// import ElementUI from 'element-ui';
//引入ElementUI全部样式
// import 'element-ui/lib/theme-chalk/index.css';//按需引入
import { Button,Row,DatePicker } from 'element-ui';//关闭Vue的生产提示
Vue.config.productionTip = false//应用ElementUI
// Vue.use(ElementUI);
Vue.component('atguigu-button', Button);
Vue.component('atguigu-row', Row);
Vue.component('atguigu-date-picker', DatePicker);//创建vm
new Vue({el:'#app',render: h => h(App),
})

4.2 App.vue

<template><div><button>原生的按钮</button><input type="text"><atguigu-row><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></atguigu-row><atguigu-date-pickertype="date"placeholder="选择日期"></atguigu-date-picker><atguigu-row><el-button icon="el-icon-search" circle></el-button><el-button type="primary" icon="el-icon-s-check" 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></atguigu-row></div>
</template><script>export default {name:'App',}
</script>
http://www.lryc.cn/news/465876.html

相关文章:

  • 【SQL】SQL用户管理和权限
  • STM32应用详解(5)USART串口初始化
  • 渗透实战 JS文件怎么利用
  • 啥是CTF?新手如何入门CTF?
  • 解决python多环境冲突问题
  • Aatrox-Bert-VITS2部署指南
  • 计算不停歇,百度沧海数据湖存储加速方案 2.0 设计和实践
  • vue2项目 实现上边两个下拉框,下边一个输入框 输入框内显示的值为[“第一个下拉框选中值“ -- “第二个下拉框选中的值“]
  • el-radio 点击报错 Element with focus: inputAncestor with aria-hidden....
  • 集成平台,互联互通平台,企业大数据平台建设方案,技术方案(Word原件 )
  • 宠物用品交易网站开发:SpringBoot技术详解
  • 解构OpenAI swarm:利用Cursor进行框架分析与示例运行
  • 基于springboot的秦皇岛旅游景点管理系统 设计与实现
  • uniapp展示本地swf格式文件,实现交互
  • ZYNQ:流水灯实验
  • StratoVirt中vCPU拓扑(SMP)配置与实现的深度解析
  • Xml 相关注解使用
  • 本地时间与时区时间转化(以Helpdesk和BPI Challenge 2012为例)
  • Golang | Leetcode Golang题解之第482题秘钥格式化
  • 代码随想录 -- 贪心 -- 无重叠区间
  • sql server xml
  • WPF中MVVM的应用举例
  • 编程题 7-24 约分最简分式【PAT】
  • 尚硅谷大数据Flink1.17实战教程-笔记04【Flink DataStream API】
  • MySQL常见优化策略
  • gyp ERR stack Error: Command failed: D:\python\python.EXE -c import sys; print
  • 代码随想录day6| 242.有效的字母异位词 、349. 两个数组的交集、 202. 快乐数 、 1. 两数之和
  • 《IDE 巧用法宝:使用技巧全解析与优质插件推荐》
  • 安全见闻---清风
  • Python爬虫:urllib_post请求百度翻译(06)