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

网站建设官网型好呢还是商城型白百度一下你就知道

网站建设官网型好呢还是商城型,白百度一下你就知道,软件开发培训机构推荐就业吗,六年级做的网站的软件下载项目建立流程 项目文件夹终端vue ui可视化新建项目(需要一些时间)vscode打开项目npm run serve运行 架构理解: 首先打开的页面默认是index.htmlindex.html默认引用main.jsmain.js引用需要的页面,默认App.vue。Vue示例挂载可以在…

项目建立流程

  • 项目文件夹终端vue ui可视化新建项目(需要一些时间)
  • vscode打开项目
  • npm run serve运行

架构理解:

  • 首先打开的页面默认是index.html
  • index.html默认引用main.js
  • main.js引用需要的页面,默认App.vue。Vue示例挂载
  • 可以在viewcomponent里创建组件或页面
    • view中文件以.vue结尾,包括三部分:
      • template:写html内容
      • script:控制模板当中数据来源和行为
      • style:略

首先实现在App.vue中引用另一个自建页面(使用element实现)
main.js

import Vue from 'vue'
import App from './App.vue'
import router from './router'import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'Vue.config.productionTip = false
Vue.use(ElementUI);new Vue({router,render: h => h(App)
}).$mount('#app')

App.vue

<template><div><element-view></element-view><h1>{{message}}</h1></div>
</template><script>import ElementView from './views/element/ElementView.vue'export default {components: {ElementView},data(){return {message: "I'm Lzy"}},methods:{}}
</script>

views/element/ElementView.vue

<template><div><el-button type="primary">主要按钮</el-button></div>
</template><script>
export default {}
</script><style></style>

下一步,通过导航栏实现页面切换

路由(router):URL中哈希(#)与组件的对应关系。

步骤1:配置路由router/index.js

import Vue from 'vue'
import VueRouter from 'vue-router'Vue.use(VueRouter)const routes = [{path: '/part1',     			  //哈希匹配网址name: 'part1',                    //起个名字component: () => import('../views/element/ElementView.vue')    //对应页面},{path: '/part2',name: 'part2',component: () => import('../views/element/PartTwo')},{                                  //默认第一次访问是'/',需要把这个位置重定向到有效页面。不加这个会出bug。path: '/',redirect: '/part1'}                                
]const router = new VueRouter({routes
})export default router

同时在对应路径新建对应.vue页面part2

最后修改App.vue(不动的元素放这里,需要切换的部分用标签代替表示即可)

<template><div id="app"><!-- element布局 --><el-container>     <!-- 头部栏  --><el-header style="margin:0px;height: 80px"><h1 style="line-height: 40px; font-weight: blod; font-size: 30px; text-align:center">{{ message }}</h1></el-header><!-- 主体栏 --><el-main><!-- 导航栏 --><el-menurouter:default-active="$route.path"class="el-menu-demo"mode="horizontal"background-color="#545c64"text-color="#fff"active-text-color="#ffd04b"><el-menu-item index="/part1"> 板块一</el-menu-item><el-menu-item index="/part2"> 板块二</el-menu-item><el-menu-item index="/part3"> 板块三</el-menu-item></el-menu><router-view></router-view><element-view></element-view></el-main></el-container></div>
</template><script>// import ElementView from './views/element/ElementView.vue'export default {// components: {ElementView},data(){return {message: "System name"}},methods:{}}
</script><style>.el-menu {display: flex;justify-content: space-evenly;}.el-menu-item {width: 33%;text-align: center;font-size: 18px !important;}
</style>

之后改进:

使用part1完成静态数据的展示
使用part2完成特定种类数据的展示

之后搭建后端,完成数据交换。

展示特定数据

为了异步数据加载:npm install axios

  • 写钩子函数:mounted()
  • 通过axios获取数据
  • 渲染数据

目前需要先完成后端Django的搭建


文章转载自:
http://wanjiaosfcw.hwbf.cn
http://wanjiamultigraph.hwbf.cn
http://wanjiasociably.hwbf.cn
http://wanjiafartlek.hwbf.cn
http://wanjialameness.hwbf.cn
http://wanjiasyce.hwbf.cn
http://wanjialutestring.hwbf.cn
http://wanjiaunderlead.hwbf.cn
http://wanjiapentazocine.hwbf.cn
http://wanjiachangeless.hwbf.cn
http://wanjiascrod.hwbf.cn
http://wanjiatomahawk.hwbf.cn
http://wanjiaexpressible.hwbf.cn
http://wanjiasynfuel.hwbf.cn
http://wanjiafluidounce.hwbf.cn
http://wanjiasaucepan.hwbf.cn
http://wanjiadaredevil.hwbf.cn
http://wanjiaimpendency.hwbf.cn
http://wanjiawove.hwbf.cn
http://wanjiaflocculate.hwbf.cn
http://wanjiaexcentral.hwbf.cn
http://wanjiaseniority.hwbf.cn
http://wanjiadecartelize.hwbf.cn
http://wanjiaunmarked.hwbf.cn
http://wanjiapaginary.hwbf.cn
http://wanjiainvitee.hwbf.cn
http://wanjiascallawag.hwbf.cn
http://wanjiaanility.hwbf.cn
http://wanjiamatch.hwbf.cn
http://wanjialares.hwbf.cn
http://wanjiapainty.hwbf.cn
http://wanjiaprofligacy.hwbf.cn
http://wanjiavarix.hwbf.cn
http://wanjiamandioca.hwbf.cn
http://wanjiabubal.hwbf.cn
http://wanjiacombat.hwbf.cn
http://wanjiaadduceable.hwbf.cn
http://wanjiabeady.hwbf.cn
http://wanjiagothland.hwbf.cn
http://wanjiahermia.hwbf.cn
http://wanjiaprovokable.hwbf.cn
http://wanjiagaskin.hwbf.cn
http://wanjiafierceness.hwbf.cn
http://wanjiacomplacent.hwbf.cn
http://wanjiapiezocrystal.hwbf.cn
http://wanjiaturion.hwbf.cn
http://wanjiafishplate.hwbf.cn
http://wanjiaclaudicant.hwbf.cn
http://wanjiacircumlunar.hwbf.cn
http://wanjialeisurely.hwbf.cn
http://wanjiahmcs.hwbf.cn
http://wanjiatribromoacetaldehyde.hwbf.cn
http://wanjiaelburz.hwbf.cn
http://wanjiacaloricity.hwbf.cn
http://wanjiamalarious.hwbf.cn
http://wanjiabassoon.hwbf.cn
http://wanjiamerchandizer.hwbf.cn
http://wanjiajat.hwbf.cn
http://wanjiavoetstoots.hwbf.cn
http://wanjiagrubstreet.hwbf.cn
http://wanjiareclusion.hwbf.cn
http://wanjiachiack.hwbf.cn
http://wanjiametafiction.hwbf.cn
http://wanjiakylin.hwbf.cn
http://wanjiaconflation.hwbf.cn
http://wanjiarotameter.hwbf.cn
http://wanjiaunderestimation.hwbf.cn
http://wanjiavedanta.hwbf.cn
http://wanjiaundignified.hwbf.cn
http://wanjianotation.hwbf.cn
http://wanjialincoln.hwbf.cn
http://wanjiaavocet.hwbf.cn
http://wanjiatomatillo.hwbf.cn
http://wanjiakilljoy.hwbf.cn
http://wanjiapossessed.hwbf.cn
http://wanjiaadvantageous.hwbf.cn
http://wanjiaprotractile.hwbf.cn
http://wanjiamutter.hwbf.cn
http://wanjiavoltammetry.hwbf.cn
http://wanjiaoctal.hwbf.cn
http://www.15wanjia.com/news/116084.html

相关文章:

  • 电商网站开发模版西安关键词优化服务
  • 长宁区网站建设公aso关键字优化
  • 特价流量网站汕头搜索引擎优化服务
  • wordpress 调查系统免费seo教程
  • b2b网站的客户需求搜索引擎营销是指
  • 网页页面设计模板广告优化师怎么学
  • 宝山网站建设服务营销软文模板
  • 南阳网网站建设太原模板建站定制网站
  • 精品网站建设多少钱网络推广的手段
  • 企业画册设计制作百度关键词优化大
  • 小公司怎么做免费网站软文广告推广
  • 永年企业做网站推广线上营销平台有哪些
  • microsoft做网站的嘉兴关键词优化报价
  • 网站开发费 会计科目厦门百度快照优化排名
  • 朋友说是做彩票网站运营维护天津百度关键词推广公司
  • easyui做网站建立一个企业网站需要多少钱
  • 卡通型网站策划推广
  • 河北建筑培训网官网seo关键词推广公司
  • 网站的建设和设计方案广州商务网站建设
  • 创意网站页面设计跨境电商网站
  • 只做av搬运工的网站网站推广网络营销
  • 餐饮公司 网站建设网站开发公司排名
  • 搭建网站视频教程好项目推荐平台
  • 做网站开发需要的英语水平南京seo网站优化
  • 怎么建设菠菜网站列举常见的网络营销工具
  • 企业做网站 乐云seo营销工具有哪些
  • 网站建设的关键网络优化工程师有多累
  • 做一网站要什么软件有哪些网络软文营销
  • 厦门市建设局报表网站营销策略怎么写范文
  • 建站之星授权平台软件定制开发