fix: svg图标颜色闪烁问题

environments/test/deployments/1
saatana 4 years ago
parent 1a193821d1
commit 6d0ac338e6

@ -38,6 +38,7 @@
const symbolId = computed(() => `#icon-${props.name}`); const symbolId = computed(() => `#icon-${props.name}`);
// //
const size = computed(() => (Number.isNaN(new Number(props.size).valueOf()) ? props.size : props.size + 'px')); const size = computed(() => (Number.isNaN(new Number(props.size).valueOf()) ? props.size : props.size + 'px'));
const color = computed(() => props.color);
// remixelement-plus // remixelement-plus
const isRemix = computed(() => !Object.keys(icons).includes(props.name)); const isRemix = computed(() => !Object.keys(icons).includes(props.name));
</script> </script>
@ -51,6 +52,6 @@
svg.x-icon { svg.x-icon {
width: v-bind(size); width: v-bind(size);
height: v-bind(size); height: v-bind(size);
fill: v-bind(size); fill: v-bind(color);
} }
</style> </style>

Loading…
Cancel
Save