比较超前的试验性框架,基于vite2新一代脚手架搭建...
目前vue3生态还在逐步建立中...vue2.x项目不建议直接升级vue3.
域名&服务器已过期...暂时没法访问,抱歉
-
npm run dev
-
npm run build
-
npm run report
-
TS(JS) + template + vue-class-component(option-api) (传统官方推荐写法,保留template)
-
TSX + Composition API
import { defineComponent } from 'vue';
import {RouterLink, RouterView} from 'vue-router';
import './style/main.scss'
export default defineComponent({
name: 'App',
setup() {
return () => (
<>
<div id="nav">
<RouterLink to="/">Home</RouterLink> |
<RouterLink to="/about">About</RouterLink>
</div>
<RouterView/>
</>
);
}
});
- TSX(JSX) + Render
export default {
data(){},
methods:{},
computed:{},
render(){
return (
<div>TSX + Render</div>
)
}
}
- 等等...大家根据自己编程喜好进行选择.
...
Vue3: React最佳实践 (逃)