CompOne 如何运行 CompTwo 中的“test”功能?
CompOne.svelte
<script>
import {test} from './CompTwo.svelte'
</script>
<!-- Some style and HTML tags for this component -->
Run Code Online (Sandbox Code Playgroud)
CompTwo.svelte
<script>
export const test = () => { console.log('testing function') }
</script>
<!-- Some style and HTML tags for this component -->
Run Code Online (Sandbox Code Playgroud)