You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
440 B
26 lines
440 B
<template> |
|
<Demo @hello="showHelloMsg" msg="你好" user="Roger"> |
|
<template v-slot:slot1> |
|
<span>Roger</span> |
|
</template> |
|
</Demo> |
|
</template> |
|
|
|
<script> |
|
import {reactive} from "vue"; |
|
import Demo from "@/components/demo.vue"; |
|
|
|
export default { |
|
name: 'App', |
|
components: {Demo}, |
|
setup(){ |
|
function showHelloMsg(value) { |
|
alert(`showHelloMsg:${value}`) |
|
} |
|
|
|
return { |
|
showHelloMsg |
|
} |
|
} |
|
} |
|
</script>
|
|
|