另乙個問題是每次重新整理頁面是都會出現「正在切換主題」的全域性提示
如何去除「正在切換主題」的全域性提示呢?
方法很簡單:
我們來看看上節中updatetheme
方法的原始碼
import client from
'webpack-theme-color-replacer/client'
import generate from
'@ant-design/colors/lib/generate'
import
from
'ant-design-vue'
export
const themecolor =
)// colorpalette 變換得到顏色值
const colorpalettes =
generate
(color)
const rgb = client.varycolor.
tonum3
(color.
replace
('#',''
)).join
(','
)return lightens.
concat
(colorpalettes)
.concat
(rgb)},
changecolor
(newcolor)
` // while router is not `hash` mode, it needs absolute path}}
return client.changer.
changecolor
(options, promise)}}
export
const
updatetheme
= newprimarycolor =>)}
export
const
updatecolorweak
= colorweak =>
muldex定製主dex類
使用multidex時,想定製放入寫特定類的方法,在build.gradle afterevaluate each 表示當方法數越界時則生成多個dex檔案 我的沒有越界,貌似也生成了兩個 dx.additionalparameters multi dex 這個指定了listfile中的類 即main...
通過iview theme定製iView主題
iview 是一套基於 vue.js 的開源 ui 元件庫,主要服務於 pc 介面的中後台產品。專案搭建中,選用該元件庫時,可按如下方法設計個性化主題。npm i iview theme gnpm i iview進入.node modules iview src styles index.less檔...
python定製 python中定製類
1 python中 str 和repr 如果要把乙個類的例項變成 str,就需要實現特殊方法 str classperson object def init self,name,gender self.name name self.gender genderdef str self return p...