首页 > 其他分享 >Html使用Vue3+ElementPlus(图标 ElMessage)

Html使用Vue3+ElementPlus(图标 ElMessage)

时间:2023-06-19 21:22:41浏览次数:38  
标签:ElementPlus const app component ElementPlusIconsVue Html Vue3 ElMessage

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <script src="/static/js/vue.global.js"></script>
    <link rel="stylesheet" href="/static/[email protected]/dist/index.css" />
    <script src="/static/[email protected]/dist/index.full.js"></script>
    <script src="/static/js/jquery-2.2.4.js"></script>
    <script src="/static/[email protected]/dist/index.iife.min.js"></script>
</head>
<body>
<div id="app" v-cloak>
    <div v-loading.fullscreen.lock="fullscreenLoading"></div>
</div>

<script>
    const { createApp, reactive, toRefs, ref, onMounted } = Vue;
    const app = createApp({
        setup() {
            //弹窗编辑
            const fullscreenLoading = ref(false);
            onMounted(() => {
				//可查看ElementPlus所有方法
                console.log({ElementPlus})
				ElementPlus.ElMessage({
					message: '警告',
					type: 'warning'
				});
            });
            //end
            return {
                fullscreenLoading
            };
        }
    });
	//使用图标
    app.component('Search',ElementPlusIconsVue.Search)
    app.component('Edit',ElementPlusIconsVue.Edit)
    app.component('Promotion',ElementPlusIconsVue.Promotion)
	//引入ElementPlus
    app.use(ElementPlus);
    app.mount("#app");
</script>
</body>
</html>

标签:ElementPlus,const,app,component,ElementPlusIconsVue,Html,Vue3,ElMessage
From: https://www.cnblogs.com/douyuanjun/p/17492214.html

相关文章

  • 记录--Vue3 封装 ECharts 通用组件
    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助按需导入的配置文件配置文件这里就不再赘述,内容都是一样的,主打一个随用随取,按需导入。import*asechartsfrom"echarts/core";//引入用到的图表import{LineChart,typeLineSeriesOption}from"echarts/......
  • 安全巡检 python HTML报告
    1.报表模板#catxunjian_table.html[root@yinliao-yanshireport_jinja2]#catxunjian_table.html<html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"><title>insightreport</title><......
  • Vue3中computed的用法
    Vue3中computed的用法computed又被称作计算属性,用于动态的根据某个值或某些值的变化,来产生对应的变化,computed具有缓存性,当无关值变化时,不会引起computed声明值的变化。产生一个新的变量并挂载到vue实例上去。一、computed简写形式<template><div><div>姓:<inputtype="te......
  • vue3 + i18n
    vue3+i18n安装:npminstallvue-i18nyarnaddvue-i18nmain.js如果在一个模块系统中使用它,你必须通过Vue.use()明确地安装vue-i18n:import{createApp}from'vue'importAppfrom'./App.vue'importElementPlusfrom'element-plus'import'element......
  • 谈谈Vue3中的ref和reactive
    谈谈Vue3中的ref和reactiveref和reactive是什么?ref和reactive是Vue3中用来实现数据响应式的API一般情况下,ref定义基本数据类型,reactive定义引用数据类型(我喜欢用它来定义对象,不用它定义数组,原因后面讲)我理解的ref本质上是reactive的再封装二、先聊reactivereactive定义引用数据......
  • vite+vue3项目中使用 lottie 动画,如何在 template 中直接使用本地 json 文件路径
    安装lottie-webyarnaddlottie-web封装 lottie组件<template><divref="animation":style="{width,height}"></div></template><script>import{defineComponent,ref,onMounted}from'vue'......
  • HTML实体编码用法介绍
    https://www.python100.com/html/5CF93176RGIS.html一、HTML实体编码是什么HTML实体编码是一种将特殊字符或符号转换为HTML代码的方法。由于HTML中一些字符具有特殊含义,因此使用特殊的代码表示这些字符可以避免与HTML标签发生冲突,保证页面正常显示。例如,"<"符号在HTML中表示开......
  • Vue3 - 实现文本复制粘贴功能
    1.安装库并导入npmivue-clipboard3--save2.在需要的前端文件中导入importclipboard3from'vue-clipboard3'html结构如下<template><divclass="hello"><inputtype="text"v-model="text"><button@cli......
  • css+html案例
    css+html案例 <!DOCTYPEhtml><htmllang="en"><head>  <metacharset="UTF-8">  <metahttp-equiv="X-UA-Compatible"content="IE=edge">  <metaname="viewport"content=&quo......
  • 一文看完Vue3的渲染过程
    Vue3官网中有下面这样一张图,基本展现出了Vue3的渲染原理:本文会从源码角度来草率的看一下Vue3的运行全流程,旨在加深对上图的理解,从下面这个很简单的使用示例开始:import{createApp,ref}from"vue";createApp({template:`<divclass="card"><butt......