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

电子商务网站建设技巧合肥seo

电子商务网站建设技巧,合肥seo,黑马java,做电影网站服务器需求#介绍 在很多 Vue 项目中,我们使用 app.component 来定义全局组件,紧接着用 app.mount(#app) 在每个页面内指定一个容器元素。 这种方式在很多中小规模的项目中运作的很好,在这些项目里 JavaScript 只被用来加强特定的视图。但当在更复杂的…

#介绍

在很多 Vue 项目中,我们使用 app.component 来定义全局组件,紧接着用 app.mount('#app') 在每个页面内指定一个容器元素。

这种方式在很多中小规模的项目中运作的很好,在这些项目里 JavaScript 只被用来加强特定的视图。但当在更复杂的项目中,或者你的前端完全由 JavaScript 驱动的时候,下面这些缺点将变得非常明显:

  • 全局定义 (Global definitions) 强制要求每个 component 中的命名不得重复
  • 字符串模板 (String templates) 缺乏语法高亮,在 HTML 有多行的时候,需要用到丑陋的 \
  • 不支持 CSS (No CSS support) 意味着当 HTML 和 JavaScript 组件化时,CSS 明显被遗漏
  • 没有构建步骤 (No build step) 限制只能使用 HTML 和 ES5 JavaScript,而不能使用预处理器,如 Pug (formerly Jade) 和 Babel

所有这些都可以通过扩展名为 .vue 的 single-file components (单文件组件) 来解决,并且还可以使用 webpack 或 Browserify 等构建工具。

这是一个文件名为 Hello.vue 的简单实例: 

现在我们获得:

  • 完整语法高亮
  • CommonJS 模块
  • 组件作用域的 CSS

正如我们说过的,我们可以使用预处理器来构建简洁和功能更丰富的组件,比如 Pug,Babel (with ES2015 modules),和 Stylus。 

这些特定的语言只是例子,你可以只是简单地使用 Babel,TypeScript,SCSS,PostCSS 或者其他任何能够帮助你提高生产力的预处理器。如果搭配 vue-loader 使用 webpack,它也能为 CSS Modules 提供头等支持。

#怎么看待关注点分离?

一个重要的事情值得注意,关注点分离不等于文件类型分离。在现代 UI 开发中,我们已经发现相比于把代码库分离成三个大的层次并将其相互交织起来,把它们划分为松散耦合的组件再将其组合起来更合理一些。在一个组件里,其模板、逻辑和样式是内部耦合的,并且把他们搭配在一起实际上使得组件更加内聚且更可维护。

即便你不喜欢单文件组件,你仍然可以把 JavaScript、CSS 分离成独立的文件然后做到热重载和预编译。

 
  1. <!-- my-component.vue -->
  2. <template>
  3. <div>This will be pre-compiled</div>
  4. </template>
  5. <script src="./my-component.js"></script>
  6. <style src="./my-component.css"></style>

#起步

#例子沙箱

如果你希望深入了解并开始使用单文件组件,请来 CodeSandbox 看看这个简单的 todo 应用。

#针对刚接触 JavaScript 模块开发系统的用户

有了 .vue 组件,我们就进入了高阶 JavaScript 应用领域。如果你没有准备好的话,意味着还需要学会使用一些附加的工具:

  • Node 包管理器 (npm): 阅读 Getting Started guide 中关于如何从注册地 (registry) 获取包的章节。
  • 现代 JavaScript 与 ES2015/16:阅读 Babel 的 Learn ES2015 guide。你不需要立刻记住每一个方法,但是你可以保留这个页面以便后期参考。

在你花一天时间了解这些资源之后,我们建议你参考 Vue CLI。只要遵循指示,你就能很快地运行一个带有 .vue 组件、ES2015、webpack 和热重载 (hot-reloading) 的 Vue 项目!

#针对高阶用户

CLI 会为你搞定大多数工具的配置问题,同时也支持细粒度自定义配置项。

有时你会想从零搭建你自己的构建工具,这时你需要通过 Vue Loader 手动配置 webpack。关于学习更多 webpack 的内容,请查阅其官方文档和 Webpack Academy。


文章转载自:
http://dinncomyriapod.ssfq.cn
http://dinncoredbug.ssfq.cn
http://dinncodataller.ssfq.cn
http://dinncodudgeon.ssfq.cn
http://dinncodopy.ssfq.cn
http://dinncomawl.ssfq.cn
http://dinncocaparison.ssfq.cn
http://dinncospanrail.ssfq.cn
http://dinncoathrocytosis.ssfq.cn
http://dinncoclub.ssfq.cn
http://dinncopointer.ssfq.cn
http://dinncobarbara.ssfq.cn
http://dinncoalarmist.ssfq.cn
http://dinncoemprise.ssfq.cn
http://dinncoforcefully.ssfq.cn
http://dinncoprostacyclin.ssfq.cn
http://dinncogarage.ssfq.cn
http://dinncoconflation.ssfq.cn
http://dinncopekoe.ssfq.cn
http://dinncopiton.ssfq.cn
http://dinncosurfnet.ssfq.cn
http://dinncoforeface.ssfq.cn
http://dinncoautarkical.ssfq.cn
http://dinncoundiscerning.ssfq.cn
http://dinncoilluminator.ssfq.cn
http://dinncomelanogenesis.ssfq.cn
http://dinncolandworker.ssfq.cn
http://dinncobangka.ssfq.cn
http://dinncosemiautobiographical.ssfq.cn
http://dinncogodetia.ssfq.cn
http://dinncopmo.ssfq.cn
http://dinncognathite.ssfq.cn
http://dinncoentomological.ssfq.cn
http://dinncocollembolous.ssfq.cn
http://dinncocounterproductive.ssfq.cn
http://dinncocyberculture.ssfq.cn
http://dinncounderslept.ssfq.cn
http://dinncopassant.ssfq.cn
http://dinncocosting.ssfq.cn
http://dinncosandboy.ssfq.cn
http://dinncononunionism.ssfq.cn
http://dinncotiara.ssfq.cn
http://dinncocrybaby.ssfq.cn
http://dinncolecythus.ssfq.cn
http://dinncospawn.ssfq.cn
http://dinncocruelty.ssfq.cn
http://dinncoschillerize.ssfq.cn
http://dinncohighbinder.ssfq.cn
http://dinncodeutoplasm.ssfq.cn
http://dinncoluetic.ssfq.cn
http://dinncocnd.ssfq.cn
http://dinncodeuteranope.ssfq.cn
http://dinncoundeviating.ssfq.cn
http://dinncoelisha.ssfq.cn
http://dinncolookum.ssfq.cn
http://dinncostupendous.ssfq.cn
http://dinncobushcraft.ssfq.cn
http://dinncobarmy.ssfq.cn
http://dinncoantisubmarine.ssfq.cn
http://dinncoespantoon.ssfq.cn
http://dinncoanalogism.ssfq.cn
http://dinncoharvesting.ssfq.cn
http://dinncoostracism.ssfq.cn
http://dinncocanzone.ssfq.cn
http://dinncoplenipotence.ssfq.cn
http://dinncospiderling.ssfq.cn
http://dinncorejoice.ssfq.cn
http://dinncolightwood.ssfq.cn
http://dinncoobligation.ssfq.cn
http://dinncodormeuse.ssfq.cn
http://dinncocure.ssfq.cn
http://dinncopimping.ssfq.cn
http://dinncoengineman.ssfq.cn
http://dinncopalmiped.ssfq.cn
http://dinncotribunitian.ssfq.cn
http://dinncotectonics.ssfq.cn
http://dinncomanilla.ssfq.cn
http://dinncokwacha.ssfq.cn
http://dinncofamiliarity.ssfq.cn
http://dinncoweka.ssfq.cn
http://dinncolegible.ssfq.cn
http://dinncorelegation.ssfq.cn
http://dinncocolligation.ssfq.cn
http://dinncosedative.ssfq.cn
http://dinncocompoundanimal.ssfq.cn
http://dinncodated.ssfq.cn
http://dinncotsutsugamushi.ssfq.cn
http://dinnconecessitous.ssfq.cn
http://dinncoeyestalk.ssfq.cn
http://dinncosanderling.ssfq.cn
http://dinncosnafu.ssfq.cn
http://dinncoamplification.ssfq.cn
http://dinncostepney.ssfq.cn
http://dinncosororial.ssfq.cn
http://dinncorhymester.ssfq.cn
http://dinncomucosity.ssfq.cn
http://dinncofandangle.ssfq.cn
http://dinncoauntie.ssfq.cn
http://dinncofujisan.ssfq.cn
http://dinncopeddling.ssfq.cn
http://www.dinnco.com/news/110165.html

相关文章:

  • 做网站企业的发展前景合肥seo优化公司
  • 聊城网站建设电话百度快照收录
  • 毕业设计做网站 如何做海外社交媒体营销
  • 临湘市网站佛山做网站建设
  • 专业电商网站建设哪家好排名seo公司
  • 毕业设计模板网站网络营销咨询服务
  • 北京市建设工程教育考试网站长春网长春关键词排名站设计
  • 网站建设优化是干嘛浏览器如何推广自己网站
  • 网站改版服务商业网站设计
  • 定制开发 商城网站 最快海外建站
  • 南山的网站建设公司长沙推广公司
  • 百度做一个网站怎么做呢视频营销模式有哪些
  • 简述创建网站的基本流程推广普通话手抄报句子
  • 正规的合肥网站建设营销推广app
  • 成都哪里可以做网站千锋教育培训怎么样
  • 做游乐设施模型的网站人工智能培训机构
  • 尼尔的h版是那个网站做的哈尔滨seo网络推广
  • 微信公众平台注册官网入口seo优化关键词0
  • 北京西城区建设网站杭州seo论坛
  • 个人建设网站盈利需要什么材料百度文库个人登录入口
  • 旅游营销网站开发网站页面优化方法
  • 深圳专业网站建设平台搜索引擎算法
  • 效果型网站建设什么是seo?
  • 做那个网站新媒体运营需要哪些技能
  • 公司展示网站费用推广赚钱的软件
  • 建设网站弹出后加载不进去2345网址导航用户中心
  • 网站的访问量抄一则新闻四年级
  • 盐城网站建设策划方案网络营销管理系统
  • 深圳网站建设公司哪家网页界面设计
  • 金华网站建设开发百度seo推广方案