Comments (2)
你好。刚刚我试了下引入iview weapp(原生组件)。引入成功。我说下引入方式:
1、给对应页面的mainjs 最下面增加如下代码:是页面对应的mainjs不是最外层mainjs
export default {
config: {
"usingComponents": {
"i-button": "../../../static/button/index"
}
}
}
2、把组件copy到static下。
3、页面使用
<i-button type="primary">这是一个按钮</i-button>
from mpvue-cnode.
👍,感谢@jaxQin,确实是这样的问题,原生的组件不应该再被编译,我把组件copy到static下就好了。我使用的是mpvue-entry这个库,避免写重复的main.js。参考 ithome-lite
from mpvue-cnode.
Related Issues (12)
- ReferenceError: __w is not defined
- 构建时报错:(node:4396) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 20): Error: No parser and no file path given, couldn't infer a parser. \ building for production... HOT 2
- 关于用户身份问题
- 报错:“No parser and no filepath given, using 'babylon' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.”是什么错误? HOT 2
- ERROR in ./src/main.js Module build failed: D:\cnode\mpvue-cnode-master\node_modules\mpvue-loader\lib\mp-compiler\util.js:154 }); HOT 2
- 自定义事件的写法 HOT 1
- 本地浏览器打开error
- dist文件为什么打不开 HOT 1
- 编译出错Error: ENOENT:no such file or derictory,open 'E:\\xxxx\\dist\\game.json'
- npm run bulid 报错 HOT 1
- Module build failed: Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpvue-cnode.