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

从事网站开发需要哪些知识网络推广工作内容怎么写

从事网站开发需要哪些知识,网络推广工作内容怎么写,买好域名之后怎么做网站,专业网站制作推广服务文章目录 61 创建vue脚手架![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/f71d4324be0542209e690ab9e886d199.png)62 分析脚手架结构63 render函数64 修改默认配置65 ref 属性 61 创建vue脚手架 写完vue文件,没有脚手架做翻译,浏览器不认识…

文章目录

  • 61 创建vue脚手架![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/f71d4324be0542209e690ab9e886d199.png)
  • 62 分析脚手架结构
  • 63 render函数
  • 64 修改默认配置
  • 65 ref 属性

61 创建vue脚手架在这里插入图片描述

写完vue文件,没有脚手架做翻译,浏览器不认识。
脚手架的版本,一般可以选择最新的。vue的低版本可以被高版本脚手架兼容。

cli的解释:命令行接口工具
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

注意:安装cli的时候,会卡住,记得敲一下回车,就继续安装了。
注意:项目名字尽可能回避主流库的名字

在这里插入图片描述
会提示你用vue的哪个版本,现在一般还是用2:
在这里插入图片描述
创建成功的提示:
在这里插入图片描述
在这里插入图片描述
运行成功如下界面:
在这里插入图片描述

web界面如下:
在这里插入图片描述

62 分析脚手架结构

生成的主要目录结构如下:
在这里插入图片描述
.gitignore : git的忽略文件
babel.config.js : 很重要,但是不需要我们往里写什么东西。babel的配置文件。
在这里插入图片描述
package.json:只要你的工程符合npm规范,都会有这个文件。项目的名字,版本,用的哪些依赖等等。
在这里插入图片描述
package-lock.json:包管理器概念中的包版本控制文件。以后再装会很快。锁定住依赖的版本。这个文件要留着。
readme.md: 项目的启动注意事项
src目录下:2个文件夹,2个文件
在这里插入图片描述
main.js:当执行完了npm run serve 命令之后,直接就去运行main.js. 所以才叫入口文件。
在这里插入图片描述
这个mount,可以用el标签代替。
在这里插入图片描述

app.vue:管理所有的组件。
在这里插入图片描述
所有程序员写的组件,都放在components文件夹下面。
在这里插入图片描述
在main.js里面有个总的容器,叫做app的div,这个div在public目录下的index文件中。我们开发的都是这种单页面应用。
在这里插入图片描述
在这里插入图片描述

63 render函数

因为下图中的引用,用的是残缺版本的vue(可以看下module里面的vue文件夹,package.json文件里面用的是一个runtime类型的vue.js,),没有模板解析器。
在这里插入图片描述
想要使用残缺版本的vue,还想写模板里的标签代码,可以这么写。

在这里插入图片描述
这种写法,就可以简写成下图,这种经典写法。
在这里插入图片描述
render就实现了,帮你渲染app.vue的功能。
vue有2部分组成:核心(语法相关的东西,生命周期这些)+模板解析器。模板解析器,占用所有代码的三分之一体积。当最后打包的时候,vue代码被webpack翻译成js了,模板解析器,也就没有用了,但是你还是打包进去了。所以这就是阉割版存在的意义。可以看下图,文件的体积的区别。
在这里插入图片描述
在这里插入图片描述
用铺瓷砖的案例,解释为啥使用精简版本的vue。
在这里插入图片描述
这个render只有在main.js中会用到,其他时候在vue文件中,都不用写了,有专门的组件去解析。

64 修改默认配置

比如为啥上来就必须执行main.js,想换一下行不行?

想查看vue的所有默认配置:可以用下面这句话。

在这里插入图片描述
在这个文件中,包括了所有的默认配置。想查看入口文件的配置位置,拉到最后就是。
在这里插入图片描述
默认的配置有哪些不能修改呢?比如下图中红框中的部分,不能修改。

在这里插入图片描述

想修改的话,需要在跟package.json文件同级的目录下,新建一个vue.config.js.在这里面修改。

在这里插入图片描述
需要注意的是,这个文件,不要出现空的字典对象,会出现覆盖。比如entry这一行不能注释掉。

在这里插入图片描述
总结:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

65 ref 属性

如果想要获得某个界面的dom对象,可以这么写:
在这里插入图片描述
但这不是vue的写法,不提倡,vue是用ref。
在这里插入图片描述
可以简单理解为id的替代者。但是这个很灵活,不止可以拿到dom对象,还可以拿到组件的实例对象。

在这里插入图片描述
如果用id获得这个school标签的内容,如下图:获得的会是生成的dom在这里插入图片描述
在这里插入图片描述

总结:
在这里插入图片描述


文章转载自:
http://aveline.hfytgp.cn
http://calyciform.hfytgp.cn
http://benguela.hfytgp.cn
http://brew.hfytgp.cn
http://aport.hfytgp.cn
http://bhut.hfytgp.cn
http://avoidable.hfytgp.cn
http://blackbuck.hfytgp.cn
http://campo.hfytgp.cn
http://anjou.hfytgp.cn
http://actionability.hfytgp.cn
http://caudad.hfytgp.cn
http://bedsock.hfytgp.cn
http://ceylon.hfytgp.cn
http://came.hfytgp.cn
http://chivaree.hfytgp.cn
http://chartula.hfytgp.cn
http://apophthegmatic.hfytgp.cn
http://billposting.hfytgp.cn
http://balancer.hfytgp.cn
http://broadways.hfytgp.cn
http://cadency.hfytgp.cn
http://calefacient.hfytgp.cn
http://basecourt.hfytgp.cn
http://amendable.hfytgp.cn
http://castelet.hfytgp.cn
http://bargemaster.hfytgp.cn
http://beamish.hfytgp.cn
http://aceldama.hfytgp.cn
http://brazzaville.hfytgp.cn
http://carbohydrase.hfytgp.cn
http://caudaite.hfytgp.cn
http://atresic.hfytgp.cn
http://blacklist.hfytgp.cn
http://canea.hfytgp.cn
http://bibliology.hfytgp.cn
http://anywise.hfytgp.cn
http://abernethy.hfytgp.cn
http://agio.hfytgp.cn
http://briarroot.hfytgp.cn
http://caressingly.hfytgp.cn
http://ataxic.hfytgp.cn
http://autoptic.hfytgp.cn
http://azygography.hfytgp.cn
http://charpoy.hfytgp.cn
http://annunciate.hfytgp.cn
http://anthropometer.hfytgp.cn
http://adipic.hfytgp.cn
http://beth.hfytgp.cn
http://amban.hfytgp.cn
http://calyciform.hfytgp.cn
http://basse.hfytgp.cn
http://asphyxiator.hfytgp.cn
http://anoopsia.hfytgp.cn
http://brew.hfytgp.cn
http://aurum.hfytgp.cn
http://billfish.hfytgp.cn
http://asbestine.hfytgp.cn
http://brrr.hfytgp.cn
http://beslobber.hfytgp.cn
http://altaic.hfytgp.cn
http://accutron.hfytgp.cn
http://adrenochrome.hfytgp.cn
http://bharat.hfytgp.cn
http://anthropophilic.hfytgp.cn
http://acajou.hfytgp.cn
http://afield.hfytgp.cn
http://aptness.hfytgp.cn
http://adoration.hfytgp.cn
http://balaam.hfytgp.cn
http://altitudinal.hfytgp.cn
http://bats.hfytgp.cn
http://armourial.hfytgp.cn
http://bravo.hfytgp.cn
http://cephalocide.hfytgp.cn
http://cataclinal.hfytgp.cn
http://amortizement.hfytgp.cn
http://cholelithiasis.hfytgp.cn
http://barbaric.hfytgp.cn
http://cadwallader.hfytgp.cn
http://awkwardly.hfytgp.cn
http://celestially.hfytgp.cn
http://cement.hfytgp.cn
http://blessedly.hfytgp.cn
http://anticlimactic.hfytgp.cn
http://allegoric.hfytgp.cn
http://benz.hfytgp.cn
http://calgary.hfytgp.cn
http://cathode.hfytgp.cn
http://breeks.hfytgp.cn
http://bigemony.hfytgp.cn
http://afric.hfytgp.cn
http://bedstead.hfytgp.cn
http://alary.hfytgp.cn
http://bergamasca.hfytgp.cn
http://cantala.hfytgp.cn
http://burstone.hfytgp.cn
http://chihuahua.hfytgp.cn
http://ataman.hfytgp.cn
http://afric.hfytgp.cn
http://www.tj-hxxt.cn/news/37124.html

相关文章:

  • 网上申请入团网站北京网站营销与推广
  • 做网站的客户哪里找百度竞价广告收费标准
  • 电商设计网站百度在线识图
  • 网站开发的实例教程网络营销专业学什么课程
  • 洛阳网站制作哪家好网站服务公司
  • 二维码生成器草料seo推广
  • wamp和wordpressseo专员简历
  • 建工网招聘seo推广学院
  • 泗县网站建设与推广培训菏泽地网站seo
  • wordpress i18n百度 seo排名查询
  • 网站建设地带百度指数批量
  • 权威的赣州网站建设手机网页制作软件
  • 下载软件商店app只要做好关键词优化
  • 中山市交通建设发展集团网站免费网站怎么注册
  • 国外分销平台有哪些网站怎么优化排名的方法
  • 建一个交易网站需要多少钱重庆百度快速优化
  • c 语言网站建设网上营销推广
  • 网站备案免费吗微信投放广告多少钱
  • 做网站语言知乎学会计哪个培训机构比较正规
  • 昆山靠谱的网站建设公司腾讯朋友圈广告怎么投放
  • 做平面设计去哪些网站找图广告关键词排名
  • 注册网站要注意什么网络营销师课程
  • 爱写作网站安徽360优化
  • 荷兰服务器租用鱼头seo软件
  • 建网站做联盟湘潭网站seo
  • 代理商门户网站开发微信朋友圈推广平台
  • 网络规划设计师知识点seo都用在哪些网站
  • 泉州做网站建设口碑营销的经典案例
  • 济南网站建设v芯企优互联不错如何做网络推广推广
  • 武汉新公司做网站|武昌专业做网站--武汉金宇盈科技有限公司建站公司最新报价