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>
自定義關(guān)閉按鈕

<template>
<el-alert
title="不可關(guān)閉的 alert"
type="success"
:closable="false">
</el-alert>
<el-alert
title="自定義 close-text"
type="info"
close-text="知道了">
</el-alert>
<el-alert
title="設(shè)置了回調(diào)的 alert"
type="warning"
@close="hello">
</el-alert>
</template>
<script>
export default {
methods: {
hello() {
alert('Hello World!');
}
}
}
</script>
帶有 icon

<template>
<el-alert
title="不可關(guān)閉的 alert"
type="success"
:closable="false">
</el-alert>
<el-alert
title="自定義 close-text"
type="info"
close-text="知道了">
</el-alert>
<el-alert
title="設(shè)置了回調(diào)的 alert"
type="warning"
@close="hello">
</el-alert>
</template>
<script>
export default {
methods: {
hello() {
alert('Hello World!');
}
}
}
</script>
文字居中

<template>
<el-alert
title="不可關(guān)閉的 alert"
type="success"
:closable="false">
</el-alert>
<el-alert
title="自定義 close-text"
type="info"
close-text="知道了">
</el-alert>
<el-alert
title="設(shè)置了回調(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

到此這篇關(guān)于Element Alert警告的具體使用方法的文章就介紹到這了,更多相關(guān)Element Alert警告內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
一個(gè)Vue視頻媒體多段裁剪組件的實(shí)現(xiàn)示例
這篇文章主要介紹了一個(gè)Vue媒體多段裁剪組件的實(shí)現(xiàn)示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-08-08
關(guān)于elementUi表格合并行數(shù)據(jù)并展示序號
這篇文章主要介紹了關(guān)于elementUi表格合并行數(shù)據(jù)并展示序號,通過給table傳入span-method方法可以實(shí)現(xiàn)合并行或列,方法的參數(shù)是一個(gè)對象,感興趣的朋友可以學(xué)習(xí)一下2023-04-04
前端vue+element使用SM4國密加密解密的詳細(xì)實(shí)例
國密即國家密碼局認(rèn)定的國產(chǎn)密碼算法,主要有SM1,SM2,SM3,SM4,下面這篇文章主要給大家介紹了關(guān)于前端vue+element使用SM4國密加密解密的相關(guān)資料,需要的朋友可以參考下2023-03-03
vue 使用自定義指令實(shí)現(xiàn)表單校驗(yàn)的方法
今天小編就為大家分享一篇vue 使用自定義指令實(shí)現(xiàn)表單校驗(yàn)的方法,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-08-08
基于vue框架手寫一個(gè)notify插件實(shí)現(xiàn)通知功能的方法
這篇文章主要介紹了基于vue框架手寫一個(gè)notify插件實(shí)現(xiàn)通知功能的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-03-03

