欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

mint-ui如何自定義messageBox樣式

 更新時(shí)間:2023年05月16日 14:40:05   作者:laishaojiang  
這篇文章主要介紹了mint-ui如何自定義messageBox樣式問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

mint-ui自定義messageBox樣式

mint-ui MessageBox官網(wǎng)文檔:

http://mint-ui.github.io/docs/#/zh-cn2/message-box

  • API:

  • 里面并沒(méi)有提供自定義的樣式api

里面的內(nèi)容是默認(rèn)居中顯示的,如果我們想改變里面的樣式,比如自定義顏色,字體大小該怎么改的。

  • 可以這樣:
const html = `
        <div style="text-align:left;font-size:20px">
          內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容內(nèi)容<span style="color:red">我紅了</span>
        </div>
      `
 MessageBox ({
   title: '標(biāo)題',
   message: html,
   confirmButtonText: '我知道了'
 })
  • 結(jié)果如下

mint UI messagebox用法

this.$messagebox({
? ? ? ? ? title: '溫馨提示',
? ? ? ? ? message: '訂單支付成功',
? ? ? ? ? showCancelButton: true,
? ? ? ? ? confirmButtonText:"繼續(xù)購(gòu)物",
? ? ? ? ? cancelButtonText:"查看訂單"
? ? ? ? }).then(action => {
? ? ? ? ? if(action == 'confirm'){
? ? ? ? ? ? console.log('繼續(xù)購(gòu)物')
? ? ? ? ? }else{
? ? ? ? ? ? console.log('查看訂單')
? ? ? ? ? }
? ? ? })

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論