# ccallproject **Repository Path**: chen-zx/ccallproject ## Basic Information - **Project Name**: ccallproject - **Description**: 使用git上传提交数据。使用各种技术做项目测试 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-13 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ccproject > A Vue.js project ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 1.用vue写一个响应式网站 2.pc端:重置样式,导入element-ui框架 (1)导入normalize.css,并在index.html里引用,文件需放在static目录下。若安装的normalize.sass等预编译样式可以放在assets文件夹下用相对路径引入。 (2)可在main.js里用import "nomalize.css"的方式导入。若报错,可先去package.json里查看是否安装了nomalize.css,css-loader,vue-loader。安装了则执行npm install。没安装则安装。 (3)npm run build打包时若发现打包后的文件index.html打开报404,则去配置文件中将build 里的assetsPublicPath的"/"修改为"./"。 (4)npm i element-ui -S 安装element-ui,在main.js中通过import ElementUI from 'element-ui'和import 'element-ui/lib/theme-chalk/index.css'导入,并使用Vue.use(ElementUI)使用 (5)npm i -S(--save)将写入dependencies对象中(上线环境);npm i -D(--save-dev)将写入devDependencies对象中(开发环境) (6)想要根据ip在手机端访问,可将配置文件下的localhost修改为'0.0.0.0'。 3.vue-cli构建的项目启动默认地址为localhost:8080/#/。去掉/#/需要在router/index.js里添加mode: 'history',即可以使用路由的history模式 4.git上传项目到码云(https://blog.csdn.net/j755ing/article/details/82857353) vue + element-ui制作官网参考http://www.cnblogs.com/taylorchen/p/6083099.html 5.Login组件(登录) ---由账号,密码组成(有提示)。 ---利用form表单制作 --- vue-router钩子函数会先调用全局钩子函数,再调用局部钩子函数 6.Main组件 (主要页面) 7.stylus(css预处理器) |——安装:npm install stylus stylus-loader -D |——组件中引用styl文件,需要使用相对路径。文件上需添加lang="stylus"