# fyp-demo **Repository Path**: gkzhb/fyp-demo ## Basic Information - **Project Name**: fyp-demo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-20 - **Last Updated**: 2021-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # fyp-demo-web 前端使用 [vue.js](https://cn.vuejs.org/v2/guide/) 框架,网上先找点简单的入门教程了解项目结构 使用 [vuetify.js](https://vuetifyjs.com/en/components/alerts/) 作为 UI 库,链接为官方文档 网络请求使用 [axios](https://github.com/axios/axios) js 语法去了解下 es6 代码在 `src` 目录中,根目录中主要是配置文件,`src/App.vue` 编写了网页内容,在这个页面中使用了 `src/components/HelloWorld.vue` 这个组件。`src/plugins/axios.js` 文件里 `axios.defaults.baseURL` 定义了前端发出网络请求的基地址,如果不设置会默认使用前端网页自己的地址作为基地址。使用 flask 服务器同时提供前端网页(网页放在 `static` 目录下)和后端 API 的时候需要使用默认设置,即不要定义这个变量。 ## Project setup 安装 node.js 依赖包 ``` yarn install ``` ### Compiles and hot-reloads for development 编译代码,运行 debug 服务器,写代码 debug 的时候一直开着不要关 ``` yarn serve ``` 编译完成后会显示 debug 服务器地址,修改代码后服务器会自动更新网页内容 ### Compiles and minifies for production 构建目标代码到 dist 目录里,将里面的内容放到 flask 项目 `static` 目录里 ``` yarn build ``` ### Lints and fixes files ``` yarn lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).