Vue 使用Element Plus

1.官网安装 | Element PlusA Vue 3 based component library for designers and developersicon-default.png?t=N7T8https://element-plus.gitee.io/zh-CN/guide/installation.html#%E4%BD%BF%E7%94%A8%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8

npm install element-plus --save

2. 全局安装图标

npm install @element-plus/icons-vue

3. main.ts 使用 ElementPlus插件

import { createApp } from 'vue'import App from './App.vue'
//加入路由import router from './router/index';//导入storeimport store from './store/index'
//使用ElementPlus插件import ElementPlus from 'element-plus'//引用ElementPlus样式import 'element-plus/dist/index.css'import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app=createApp(App)//全局导入饿了么图标for (const [key, component] of Object.entries(ElementPlusIconsVue)) {    app.component(key, component)  }app.use(router)//并通过use,使用路由app.use(store)//使用ElementPlus插件app.use(ElementPlus)app.mount('#app')

import { createApp } from 'vue'
import App from './App.vue'

//加入路由
import router from './router/index';
//导入store
import store from './store/index'

//使用ElementPlus插件
import ElementPlus from 'element-plus'
//引用ElementPlus样式
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app=createApp(App)
//全局导入饿了么图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
app.use(router)
//并通过use,使用路由
app.use(store)
//使用ElementPlus插件
app.use(ElementPlus)
app.mount('#app')

4.正则表达式在线测试|菜鸟工具

正则表达式在线测试 | 菜鸟工具一、校验数字的表达式 数字:^[0-9]*$ n位的数字:^\d{n}$ 至少n位的数字:^\d{n,}$ m-n位的数字:^\d{m,n}$ 零和非零开头的数字:^(0|[1-9][0-9]*)$ 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$ 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})$ 正数、负数、和小数:^(\-|\+)?\d+(\.\..icon-default.png?t=N7T8https://www.jyshare.com/front-end/854/

  • 21
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bridge Fish

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值