Browse Source

master

master
邓宏 3 years ago
parent
commit
1f572f5858
  1. 9
      src/App.vue
  2. 1
      src/view/home.vue

9
src/App.vue

@ -18,13 +18,4 @@
provide("router", useRouter())
provide("route", useRoute())
var event=inject("event")
window._e=event
function eventDemo(){
setTimeout(()=>{
event.emit("home",323)
eventDemo()
},5000)
}
eventDemo()
</script>

1
src/view/home.vue

@ -29,6 +29,5 @@ import {dInput} from 'black-knight/lib/components'
onMounted(()=>{
onUnmounted(event.on("home",data=>{console.log(data,'=======event----------home--1111--')}))
onUnmounted(event.on("home",data=>{console.log(data,'=======event----------home--2222--')}))
})
</script>
Loading…
Cancel
Save