We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue.runtime.esm.js?c320:3049 TypeError: Cannot read properties of undefined (reading '$') at VueComponent.icon (Icon.vue?539a:78:1)
对应的代码: icon() { let xml = require(!xml-loader!../../src/svg/${this.name}.svg); const t = xml.svg.$.viewBox.split(' '); // 这里报错,xml存在,但xml.svg undefine ,xml.svg.$ 自然也undefine console.info(src/svg/${this.name}.svg has been loaded); return { width: t[2], height: t[3], paths: convert.SVGtoArray(xml.svg) } },
!xml-loader!../../src/svg/${this.name}.svg
src/svg/${this.name}.svg has been loaded
我的代码:已正常 npm install vue-svg-icon --save-dev
The text was updated successfully, but these errors were encountered:
No branches or pull requests
vue.runtime.esm.js?c320:3049 TypeError: Cannot read properties of undefined (reading '$')
at VueComponent.icon (Icon.vue?539a:78:1)
对应的代码:
icon() {
let xml = require(
!xml-loader!../../src/svg/${this.name}.svg
);const t = xml.svg.$.viewBox.split(' ');
// 这里报错,xml存在,但xml.svg undefine ,xml.svg.$ 自然也undefine
console.info(
src/svg/${this.name}.svg has been loaded
);return {
width: t[2],
height: t[3],
paths: convert.SVGtoArray(xml.svg)
}
},
我的代码:已正常 npm install vue-svg-icon --save-dev
The text was updated successfully, but these errors were encountered: