当前位置: 首页 > news >正文

山西省住房建设厅网站下载报名工具小程序官网

山西省住房建设厅网站下载,报名工具小程序官网,新冠最新消息实时数据,广西建设工程质量安全监督总站网站目录 引出创建vue-cli前端工程vue-cli是什么自动构建创建vue-cli项目选择Vue的版本号 手动安装进行选择创建成功 手动创建router版多了一个router 运行测试bug解决 Vue项目结构main.jspackage.jsonvue.config.js Vue项目初步hello案例 总结 引出 1.vue-cli是啥#xff0c;创建… 目录 引出创建vue-cli前端工程vue-cli是什么自动构建创建vue-cli项目选择Vue的版本号 手动安装进行选择创建成功 手动创建router版多了一个router 运行测试bug解决 Vue项目结构main.jspackage.jsonvue.config.js Vue项目初步hello案例 总结 引出 1.vue-cli是啥创建项目的方式 2.vue项目目录结构以及项目初步 创建vue-cli前端工程 vue-cli是什么 Vue CLI 是一个基于 Vue.js 进行快速开发的完整系统。Vue CLI 致力于将 Vue 生态中的工具基础标准化。它确保了各种构建工具能够基于智能的默认配置即可平稳衔接这样你可以专注在撰写应用上而不必花好几天去纠结配置的问题。 自动构建 vue create vue-hello2 创建vue-cli项目 选择Vue的版本号 手动安装 进行选择 2.0版本 选择第一个 模板保存 创建成功 手动创建router版 多了一个router 运行测试 npm run serve bug解决 如果出现Error: error digital envelope routines::unsupported在命令行输入 SET NODE_OPTIONS--openssl-legacy-providerVue项目结构 文件作用 main.js src/main.js是入口文件主要作用是初始化vue实例并使用需要的插件 在main.js文件中定义了一个vue对象,其中el为实例提供挂载元素 运行的流程 package.json {name: hello-worldx, //项目名称version: 0.1.0, //项目包版本 「主版本号. 次版本号. 修订号」private: true, //防止我们意外地将私有库发布到 npm 服务器。scripts: { //scripts 是 package.json 中内置的脚本入口serve: vue-cli-service serve,build: vue-cli-service build},dependencies: { //生产环境中所必须的依赖包,将来可以通过这里的配置 下载依赖 dependencies 参与编译和打包core-js: ^3.8.3,register-service-worker: ^1.7.2,vue: ^2.6.14},devDependencies: { //开发阶段需要的依赖包,不参与打包vue/cli-plugin-babel: ~5.0.0,vue/cli-plugin-pwa: ~5.0.0,vue/cli-service: ~5.0.0,less: ^4.0.0,less-loader: ^8.0.0,vue-template-compiler: ^2.6.14},browserslist: [ //告知支持哪些浏览器及版本。 1%,last 2 versions,not dead] }vue.config.js 如果修改启动的服务端口可以修改vue.config.js文件 module.exports { devServer:{open:true,port:8099} }Vue项目初步 hello案例 import Vue from vue import VueRouter from vue-router import HomeView from ../views/HomeView.vue import Move from ../components/Move.vue const Login () import(../components/Login.vue) const Comdy () import(../components/Comdy.vue) const Action () import(../components/Action.vue) const GoodsIndex () import(../components/GoodsIndex.vue) const GoodsList () import(../components/GoodsList.vue)Vue.use(VueRouter)const routes [{path: /,name: home,component: Login},{path:/goodsIndex,component: GoodsIndex,children:[{path:/, component: GoodsList},{path:/goodsList,name: goodsList,component: GoodsList},]},{path: /about,name: about,// route level code-splitting// this generates a separate chunk (about.[hash].js) for this route// which is lazy-loaded when the route is visited.component: () import(/* webpackChunkName: about */ ../views/AboutView.vue)},{//导入组件的方法懒加载没有点击到对应组件路由就不会加载到Vue内存中//好处可以节省内存资源//应用场景改组件页面简单或者访问量不多的比如注册页面//系统首页不适合做懒加载// const Login () import(../components/Login.vue)path:/login,component: Login},//嵌套路由{path:/move,component: Move,//使用children实现嵌套路由children: [{path:/,component: Action},{path:/action,component: Action},{path:/comdy,component: Comdy},],} ]const router new VueRouter({routes })export default router 默认登陆页面 登陆成功后跳转 templatediv classloginh1登陆页面/h1form账号input typetext name/账号input typetext name/input type button value登陆 clicklogin//form/div /templatescript export default {methods:{//声明式路由跳转router-link//编程式路由跳转this.$router.push()login(){this.$router.push({path:/goodsIndex})}}}/scriptstyle/style总结 1.vue-cli是啥创建项目的方式 2.vue项目目录结构以及项目初步
http://www.pierceye.com/news/32995/

相关文章:

  • 上海备案证查询网站查询系统能下载各种应用的软件
  • 全球快速建站工具个人网站怎么做联盟推广
  • 深圳做英文网站的公司wordpress 连接微博专业版
  • 如何自己买域做网站crm系统客户管理系统
  • 网站建设业务前景做微商哪个网站有客源
  • 灵犀科技 高端网站建设网页微博怎么保存视频
  • 比较冷门的视频网站做搬运网站策划书 范文
  • 网站开发下载功能如何实现百度登录首页
  • 手机网站404页面用按键精灵做网站
  • cd网站建设建设免费手机网站
  • 网站做淘客网站备案流程2016
  • 窦各庄网站建设网络推广和网络营销的区别
  • 简单班级网站模板超值的扬中网站建设
  • 怎么样建立学校网站网站开发模式有哪些
  • 做公众号需要网站做网站做本地服务器吗
  • 网站租用服务器网站设计制作有哪些原因
  • 网站建设的相关新闻做网站项目收获
  • 哪建设网站中铁建设集团有限公司华南分公司
  • 做网站属软件什么专业wordpress编辑器没了
  • 网站方案书产品软文怎么写
  • uzi视频网站谁做的做网站一般多少钱
  • 橙色网站logo 配色企业运营管理名词解释
  • 网站开发技术考试试卷货运网站建设
  • ppt模板免费网页企业网站seo点击软件
  • 好听好记的网站域名洛阳霞光企业网站建设公司
  • 邢台做网站推广的地方2015军考网站建设
  • 网站建设企业如何为公司建设宁波外贸公司为什么这么多
  • 自建网站如何被百度收录仿站工具教程
  • 江苏省建设资格注册中心网站哪个网站做的系统好
  • 建设网站能挣钱吗做礼品的网站