NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
~~~ //定义组件 index.json { "component": true, "usingComponents": {} } ~~~ ~~~ //index.js Component({ /** * 组件的属性列表 */ properties: { src:{ type:Boolean } }, data: { // type:false }, methods: { handleClick(){ var src = this.properties.src; console.log(src); console.log(this.data); } } }) ~~~ ~~~ //在要引用组件的文件中的json中配置 { "usingComponents":{ "v-success":"/components/success/index" } } ~~~