2016-12-02 125 views
0

有沒有辦法在初始加載時替換加載微調器gif?替換初始加載微調器

enter image description here

我想有一個定製我的應用程序。

+0

這只是一個主題中的圖像。看看主題文檔。 https://vaadin.com/docs/-/part/framework/themes/themes-overview.html –

回答

1

這是一個gif包含在主題中,是的,你可以很容易地取代它。該微調的GIF圖像在.v-app-loading::before CSS規則(以及至少在VALO主題)定義的,你其實可以覆蓋它,例如這樣:

比方說,我們要使用GIF ring.gif作爲一個微調imange這GIF被放置在img目錄下的主題中。這就是所謂的「mytheme.scss」你的主題主要SCSS

@import "../valo/valo"; 
// import other scss files here 

// do valo variables customization here 

@mixin mytheme { 
    @include valo; 
    // include other scss mixins here 

    // customized spinner 
    .v-app-loading::before { 
    width: 36px; 
    height: 36px; 
    background: url(img/ring.gif) no-repeat 50%; 
    } 
} 

放置.v-app-loading::before@include valo;後,這一點很重要,否則將無法正常工作......

更多關於此主題化:https://vaadin.com/docs/-/part/framework/themes/themes-overview.html

+0

感謝您的詳細回覆! – fakataha