摘要: 1.子组件header.vue <template> <div>头部</div></template> <script> export default{ data(){ return{ } } }</script> <style scoped> div{ background: blue; }</s 阅读全文
posted @ 2017-10-09 15:43 ZBB0304 阅读(155) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <ul> <li v-for="(item,index) in cartoon" :key="index" :class="{'A':'red','B':'green','C':'yellow','D':'blue','E':'pink '}[item.score] 阅读全文
posted @ 2017-10-09 14:15 ZBB0304 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 引入Vue import Vue from "vue"; 1.全局组件注册 Vue.component("my-header",{//注册全局组件template:'<p>这是一首歌</p>'}); new Vue({ el:"#app", data:{ } }) 直接在html页面引入<my-he 阅读全文
posted @ 2017-09-27 10:40 ZBB0304 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1.下载node.js安装 https://nodejs.org/en/download/ 2.利用淘宝npm镜像安装相关依赖 在cmd里直接输入:npm install -g cnpm –registry=https://registry.npm.taobao.org,回车,等待安装... 3.安 阅读全文
posted @ 2017-09-19 09:22 ZBB0304 阅读(159) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Lazy Load Enabled</title> <!--[if lt IE 9]> <script src="html5shiv.js"></script> <![endif] 阅读全文
posted @ 2017-09-18 14:02 ZBB0304 阅读(135) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> #pbox{ width: 100%; height:100%; } #box{ width: 200px; heigh 阅读全文
posted @ 2017-09-08 08:55 ZBB0304 阅读(339) 评论(3) 推荐(0) 编辑
摘要: <!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title> <style> * { margin: 0; padding: 0; } .box { width: 350px; height: 350px; 阅读全文
posted @ 2017-09-08 08:54 ZBB0304 阅读(455) 评论(0) 推荐(0) 编辑
摘要: .box { width:100%; height:80%; background: url('img/nav_bg.png') no-repeat; background-attachment: fixed; filter: progid:DXImageTransform.Microsoft.Al 阅读全文
posted @ 2017-07-23 18:31 ZBB0304 阅读(1150) 评论(1) 推荐(1) 编辑
摘要: var json ={ "A2" : { "w" : "101", "v" : 101, "t" : "n" }, "A1" : { "w" : " id", "v" : " id", "t" : "s", "r" : "<t xml:space=\"preserve\"> i 阅读全文
posted @ 2017-03-01 09:44 ZBB0304 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 这两天学习了Vue.js 感觉组件这个地方知识点挺多的,而且很重要,所以,今天添加一点小笔记。 首先Vue组件的使用有3个步骤,创建组件构造器,注册组件,使用组件3个方面。 代码演示如下: 2.理解组件的创建和注册 我们用以下几个步骤来理解组件的创建和注册: 1. Vue.extend()是Vue构 阅读全文
posted @ 2016-12-22 10:34 ZBB0304 阅读(40875) 评论(7) 推荐(8) 编辑