Element Alert警告的具體使用方法
更新時間:2020年07月27日 09:43:57 作者:ForeverJPB.
這篇文章主要介紹了Element Alert警告的具體使用方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
組件—警告
基本用法
<template> <el-alert title="成功提示的文案" type="success"> </el-alert> <el-alert title="消息提示的文案" type="info"> </el-alert> <el-alert title="警告提示的文案" type="warning"> </el-alert> <el-alert title="錯誤提示的文案" type="error"> </el-alert> </template>
主題
<template> <el-alert title="成功提示的文案" type="success" effect="dark"> </el-alert> <el-alert title="消息提示的文案" type="info" effect="dark"> </el-alert> <el-alert title="警告提示的文案" type="warning" effect="dark"> </el-alert> <el-alert title="錯誤提示的文案" type="error" effect="dark"> </el-alert> </template>
自定義關閉按鈕
<template> <el-alert title="不可關閉的 alert" type="success" :closable="false"> </el-alert> <el-alert title="自定義 close-text" type="info" close-text="知道了"> </el-alert> <el-alert title="設置了回調(diào)的 alert" type="warning" @close="hello"> </el-alert> </template> <script> export default { methods: { hello() { alert('Hello World!'); } } } </script>
帶有 icon
<template> <el-alert title="不可關閉的 alert" type="success" :closable="false"> </el-alert> <el-alert title="自定義 close-text" type="info" close-text="知道了"> </el-alert> <el-alert title="設置了回調(diào)的 alert" type="warning" @close="hello"> </el-alert> </template> <script> export default { methods: { hello() { alert('Hello World!'); } } } </script>
文字居中
<template> <el-alert title="不可關閉的 alert" type="success" :closable="false"> </el-alert> <el-alert title="自定義 close-text" type="info" close-text="知道了"> </el-alert> <el-alert title="設置了回調(diào)的 alert" type="warning" @close="hello"> </el-alert> </template> <script> export default { methods: { hello() { alert('Hello World!'); } } } </script>
帶有輔助性文字介紹
<template> <el-alert title="帶輔助性文字介紹" type="success" description="這是一句繞口令:黑灰化肥會揮發(fā)發(fā)灰黑化肥揮發(fā);灰黑化肥會揮發(fā)發(fā)黑灰化肥發(fā)揮。 黑灰化肥會揮發(fā)發(fā)灰黑化肥黑灰揮發(fā)化為灰……"> </el-alert> </template>
帶有 icon 和輔助性文字介紹
<template> <el-alert title="成功提示的文案" type="success" description="文字說明文字說明文字說明文字說明文字說明文字說明" show-icon> </el-alert> <el-alert title="消息提示的文案" type="info" description="文字說明文字說明文字說明文字說明文字說明文字說明" show-icon> </el-alert> <el-alert title="警告提示的文案" type="warning" description="文字說明文字說明文字說明文字說明文字說明文字說明" show-icon> </el-alert> <el-alert title="錯誤提示的文案" type="error" description="文字說明文字說明文字說明文字說明文字說明文字說明" show-icon> </el-alert> </template>
Attributes
Slot
Events
到此這篇關于Element Alert警告的具體使用方法的文章就介紹到這了,更多相關Element Alert警告內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
VUE如何實現(xiàn)點擊文字添加顏色(動態(tài)修改class)
這篇文章主要介紹了VUE如何實現(xiàn)點擊文字添加顏色(動態(tài)修改class),具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-11-11vue中axios利用blob實現(xiàn)文件瀏覽器下載方式
這篇文章主要介紹了vue中axios利用blob實現(xiàn)文件瀏覽器下載方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-05-05vuecli+AXdownload下載組件封裝?+css3下載懸浮球動畫效果
當觸發(fā)下載功能的時候,會觸發(fā)一個下載動畫,下載懸浮球會自動彈出,并且閃爍提示有新的下載任務直到下載任務完場提示,接下來通過本文介紹vuecli+AXdownload下載組件封裝?+css3下載懸浮球動畫效果,需要的朋友可以參考下2024-05-05vue 地區(qū)選擇器v-distpicker的常用功能
這篇文章主要介紹了vue 地區(qū)選擇器v-distpicker的常用功能,本文給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-07-07Vue 解決在element中使用$notify在提示信息中換行問題
這篇文章主要介紹了Vue 解決在element中使用$notify在提示信息中換行問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-11-11