PubSubJS">1.使用PubSubJS 1.使用PubSubJS1. 工具库: PubSubJS2. 下载: npm install pubsub-js --save3. 使用: 1) import PubSub from 'pubsub-js' //引入2) PubSub.subscribe('delete', function(msg,data){ }); //订阅3) PubSub.publish('delete', data) //发布消息