Render SVG images with "?path" in an <img> tag
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.
显示
- app/assets/javascripts/ci/runner/admin_new_runner/index.js 1 个添加, 6 个删除app/assets/javascripts/ci/runner/admin_new_runner/index.js
- app/assets/javascripts/ci/runner/components/runner_platforms_radio_group.vue 15 个添加, 4 个删除...pts/ci/runner/components/runner_platforms_radio_group.vue
- app/views/admin/runners/new.html.haml 1 个添加, 5 个删除app/views/admin/runners/new.html.haml
- config/webpack.config.js 13 个添加, 1 个删除config/webpack.config.js
- jest.config.base.js 1 个添加, 0 个删除jest.config.base.js
- spec/frontend/ci/runner/components/runner_platforms_radio_group_spec.js 3 个添加, 3 个删除...ci/runner/components/runner_platforms_radio_group_spec.js
加载中
想要评论请 注册 或 登录