Skip to content
代码片段 群组 项目
  • Miguel Rincon's avatar
    9325c01f
    Render SVG images with "?path" in an <img> tag · 9325c01f
    Miguel Rincon 创作于
    Previously we always loaded all the svg files using the raw-loader
    which fetches the entire svg body to add it inline inside an our HTML.
    This a very flexible way to load them that has the advantage of allowing our client side code to manipulate the SVGs (such as adding styles).
    
    However, this requires us to use v-safe-html to place the SVG inside
    our markup, and makes SVG images work differently from other like PNG
    and JPG.
    
    This MR has our SVGs loaded as before by default, but allows us to
    opt-in by adding a ?path query at the end of the import so it can be
    loaded as any old image.
    9325c01f
    历史
    Render SVG images with "?path" in an <img> tag
    Miguel Rincon 创作于
    Previously we always loaded all the svg files using the raw-loader
    which fetches the entire svg body to add it inline inside an our HTML.
    This a very flexible way to load them that has the advantage of allowing our client side code to manipulate the SVGs (such as adding styles).
    
    However, this requires us to use v-safe-html to place the SVG inside
    our markup, and makes SVG images work differently from other like PNG
    and JPG.
    
    This MR has our SVGs loaded as before by default, but allows us to
    opt-in by adding a ?path query at the end of the import so it can be
    loaded as any old image.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。