mirror of
https://gitee.com/WeBank/fes.js.git
synced 2024-12-01 19:27:47 +08:00
fix: 优化svg不能去掉fill等属性
This commit is contained in:
parent
46f28d6c76
commit
77d2b09121
@ -1,38 +1,38 @@
|
||||
{
|
||||
"name": "@fesjs/plugin-icon",
|
||||
"version": "3.0.0",
|
||||
"description": "@fesjs/plugin-icon",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"lib",
|
||||
"types.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
|
||||
"directory": "packages/fes-plugin-icon"
|
||||
},
|
||||
"keywords": [
|
||||
"fes"
|
||||
],
|
||||
"author": "qlin",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/WeBankFinTech/fes.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fesjs/fes": "^3.0.0",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"dependencies": {
|
||||
"svgo": "^3.0.2"
|
||||
},
|
||||
"typings": "./types.d.ts"
|
||||
"name": "@fesjs/plugin-icon",
|
||||
"version": "3.0.0",
|
||||
"description": "@fesjs/plugin-icon",
|
||||
"author": "qlin",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
|
||||
"directory": "packages/fes-plugin-icon"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/WeBankFinTech/fes.js/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"fes"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"lib",
|
||||
"types.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fesjs/fes": "^3.0.0",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"dependencies": {
|
||||
"svgo": "^3.0.2"
|
||||
},
|
||||
"typings": "./types.d.ts"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { extname, basename } from 'path';
|
||||
import { statSync, readFileSync } from 'fs';
|
||||
import { basename, extname } from 'node:path';
|
||||
import { readFileSync, statSync } from 'node:fs';
|
||||
import { optimize } from 'svgo';
|
||||
|
||||
const presetDefault = [
|
||||
@ -15,7 +15,7 @@ const presetDefault = [
|
||||
{
|
||||
name: 'removeAttrs',
|
||||
params: {
|
||||
attrs: '(fill|stroke|class)',
|
||||
attrs: '(class)',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { computed } from 'vue';
|
||||
// eslint-disable-next-line
|
||||
|
||||
import icons from '../icons';
|
||||
|
||||
const noop = () => {};
|
||||
function noop() {}
|
||||
|
||||
export default {
|
||||
name: 'FesIcon',
|
||||
@ -19,9 +19,9 @@ export default {
|
||||
const svgStyle = computed(() =>
|
||||
props.rotate
|
||||
? {
|
||||
msTransform: `rotate(${props.rotate}deg)`,
|
||||
transform: `rotate(${props.rotate}deg)`,
|
||||
}
|
||||
msTransform: `rotate(${props.rotate}deg)`,
|
||||
transform: `rotate(${props.rotate}deg)`,
|
||||
}
|
||||
: null,
|
||||
);
|
||||
const svgCls = computed(() => ({
|
||||
|
@ -29,6 +29,7 @@
|
||||
&[tabindex] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&--spin {
|
||||
display: inline-block;
|
||||
animation: loadingCircle 1s infinite linear;
|
||||
@ -46,5 +47,5 @@
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user