Vue83 引入elementUI

ops/2024/10/22 15:39:46/

笔记

  • 安装插件
    在这里插入图片描述
  • 安装按需引入插件
    在这里插入图片描述

代码

在这里插入图片描述### App.vue

<template><div><button>原生的按钮</button><input type="text"><atguigu-row><atguigu-button>默认按钮</atguigu-button><atguigu-button type="primary">主要按钮</atguigu-button><atguigu-button type="success">成功按钮</atguigu-button><atguigu-button type="info">信息按钮</atguigu-button><atguigu-button type="warning">警告按钮</atguigu-button><atguigu-button type="danger">危险按钮</atguigu-button></atguigu-row><atguigu-date-pickertype="date"placeholder="选择日期"></atguigu-date-picker><atguigu-row><atguigu-button icon="el-icon-search" circle></atguigu-button><atguigu-button type="primary" icon="el-icon-s-check" circle></atguigu-button><atguigu-button type="success" icon="el-icon-check" circle></atguigu-button><atguigu-button type="info" icon="el-icon-message" circle></atguigu-button><atguigu-button type="warning" icon="el-icon-star-off" circle></atguigu-button><atguigu-button type="danger" icon="el-icon-delete" circle></atguigu-button></atguigu-row></div>
</template><script>javascript">export default {name:'App',}
</script>

main.js

javascript">//引入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),
})

babel.config.js

javascript">module.exports = {presets: ['@vue/cli-plugin-babel/preset',["@babel/preset-env", { "modules": false }],],plugins:[["component",{"libraryName": "element-ui","styleLibraryName": "theme-chalk"}]]
}

在这里插入图片描述vue脚手架升级,已经不存在 .babelrc 文件,改为babel.config.js文件

运行

在这里插入图片描述


http://www.ppmy.cn/ops/124161.html

相关文章

2024 最新网络安全自学路线,内容涵盖 3 - 5 年技能提升

一、引言 在当今数字化高速发展的时代&#xff0c;网络安全已成为国家、企业和个人都无法忽视的关键领域。随着网络攻击手段的不断升级和多样化&#xff0c;对网络安全专业人才的需求也日益增长。对于有志于进入网络安全领域或希望提升自身网络安全技能的人来说&#xff0c;制…

k8s1.27部署ingress 1.11.2

k8s1.27部署ingress 1.11.2 要求&#xff1a; 1、使用主机网络。 2、多节点部署&#xff0c;以来标签&#xff1a;isingressistrue ingress1.11.2支持版本 官方参考链接&#xff1a; https://github.com/kubernetes/ingress-nginx/ 官网yaml https://raw.githubuserconten…

基于PHP的校园二手书交易管理系统

有需要请加文章底部Q哦 可远程调试 基于PHP的校园二手书交易管理系统 一 介绍 此二手书交易管理系统基于原生PHP开发&#xff0c;数据库mysql&#xff0c;前端bootstrap。系统角色分为用户和管理员。 技术栈&#xff1a;phpmysqlbootstrapphpstudyvscode 二 功能 用户 1 注…

启动hadoop后没有 NodeManager和 ResourceManager

跟着黑马网课学下去时发现我的hadoop启动后没有NodeManager和ResourceManager 找到日志的路径 我在/export/server/hadoop/etc/hadoop/hadoop-env.sh文件里配置了日志存放的路径 这里找到你的日志路径&#xff0c;每个人的习惯和看的教程不同&#xff0c;日志放的地方大概率也…

【SpringBoot详细教程】-10-SpringBoot整合swagger【持续更新】

&#x1f33f; Swagger2构建Restful API 文档 &#x1f341; Swagger简介 由于SpringBoot能够快速开发、便捷部署等特性&#xff0c;相信有很⼤⼀部分SpringBoot的⽤户会⽤来构建 RESTful API。⽽我们构建RESTfulAPI的⽬的通常都是由于多终端的原因&#xff0c;这些终端会共⽤…

【EXCEL数据处理】000022 案例 保姆级教程,附多个操作案例。EXCEL邮件合并工具

前言&#xff1a;哈喽&#xff0c;大家好&#xff0c;今天给大家分享一篇文章&#xff01;创作不易&#xff0c;如果能帮助到大家或者给大家一些灵感和启发&#xff0c;欢迎收藏关注哦 &#x1f495; 目录 【EXCEL数据处理】000022 案例 保姆级教程&#xff0c;附多个操作案例。…

win10装机 vs+qt+cuda

1.QT QT插件 Index of /official_releases/vsaddin QT软件 Index of /archive/qt 2. vs vs2019 Visual Studio 2019 生成号和发布日期 | Microsoft Learn vs2022 Visual Studio 2022 IDE - 适用于软件开发人员的编程工具 3.cuda https://developer.nvidia.com/cuda-1…

数据结构-LRU缓存(C语言实现)

遇到困难&#xff0c;不必慌张&#xff0c;正是成长的时候&#xff0c;耐心一点&#xff01; 目录 前言一、题目介绍二、实现过程2.1 实现原理2.2 实现思路2.2.1 双向链表2.2.2 散列表 2.3 代码实现2.3.1 结构定义2.3.2 双向链表操作实现2.3.3 实现散列表的操作2.3.4 内存释放代…