Closed yunyuyuan closed 1 year ago
Moi React dev switching to Vue😏. I think this feature could be useful and make Vue more robust. I have wanted to do this before. There is one current solution. Use JSX or Function components (h stuff) in the script
@tobychidi Not React, it’s Angular,TSX does not work well with nuxtjs in my tests
https://github.com/vuejs/core/discussions/6898 join discussions
@hminghe wow,心有灵犀属于是。closed because duplicate
I have wite a simple plugin to reuse template.
npm i unplugin-vue-reuse-template -D
// vite.config.ts
import vueReuseTemplate from 'unplugin-vue-reuse-template/vite'
import Vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [Vue(), vueReuseTemplate()],
})
What problem does this feature solve?
like this:
What does the proposed API look like?
That is better than make the
#menu
as a new.vue
file, and define someemit
andprops
to communicate