2015-04-12 59 views
0

當使用Grunticon時,我需要幫助使數據grunticon嵌入選項有效。 我認爲所有設置都正確 - 確實grunticon工作正常,除了當我嘗試使用嵌入數據grunticon嵌入我的標記中的圖標。它只是不會工作。Grunticon嵌入式不起作用

如何判斷我做錯了什麼?沒有控制檯日誌錯誤!

+0

您是否找到解決方案? –

+0

是的,我正在使用「data-grunticon-embed」作爲一個類:| – alemur

+0

有沒有這方面的更新?我也有同樣的問題。 –

回答

0

要啓用grunticon SVG embeding:

  1. 添加enhanceSVG: true到grunticon選項裏面gruntfile.js
  2. 替換grunticon.loader代碼在你<script>標籤與新 - 加入enhanceSVG: true選項
  3. 後產生

    grunticon.svgLoadedCallback添加到您的grunticon調用中,如下所示:

    grunticon(["icons.data.svg.css", "icons.data.png.css", 
    "icons.fallback.css"], grunticon.svgLoadedCallback); 
    

進一步的解釋你可以在這裏找到:https://github.com/filamentgroup/grunticon在「版本2.0不存在 - 這是什麼新的!」部分