2 Star 2 Fork 0

潘健华 / vue3-vite-app-frame-tsx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

vue3-vite-app-frame-tsx

介绍

  1. 创建模式: yarn create vite-app {pro-name}
  2. typeScript: yarn add typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-plugin-vue -D

tsx

vue-router

import { createApp } from 'vue'; 
import App from './App';
import './index.css'
import router from './router';

createApp(App).use(router).mount('#app');

vuex

import { createApp } from 'vue'; 
import App from './App';
import './index.css'
import router from './router';
import store from './store';

createApp(App).use(router).use(store).mount('#app');

nginx

  • vue路由history模式刷新会报404错误,所以搭配nginx里的try_files指令;
    try_files file ... uri 或 try_files file ... = code

  • 即: try_files $uri $uri/ /index.html;

location / {
    root   ../dist;
    index  index.html index.htm;
    try_files $uri $uri/ /index.html;   #匹配不到任何静态资源,跳到同一个index.html
}

less

declare module "*.less" {
  const less: any;
  export default less;
}

axios

  • yarn add axios

  • 数据请求:get,post,delect,put...; application/x-www-form-urlencoded,application/json

  • 上传文件: post ; multipart/form-data 文件二进制格式流

node服务端

aduio 音波

vite.config.ts

空文件

简介

探索vue3、tsx 展开 收起
TypeScript
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/PanJianHua/vue3-vite-app-frame-tsx.git
git@gitee.com:PanJianHua/vue3-vite-app-frame-tsx.git
PanJianHua
vue3-vite-app-frame-tsx
vue3-vite-app-frame-tsx
master

搜索帮助