vue 模块 props
inbody.vue
<template>
<div>
<Breadcrumb :style="{margin: '24px 0'}">
<BreadcrumbItem>{{mbx[0]}}</BreadcrumbItem>
<BreadcrumbItem>{{mbx[1]}}</BreadcrumbItem>
<BreadcrumbItem>{{mbx[2]}}</BreadcrumbItem>
</Breadcrumb>
<Content :style="{padding: '24px', minHeight: '280px', background: '#fff'}">
<slot></slot>
</Content>
</div>
</template> <script>
export default {
name: "inBody",
props:{
mbx:Array
}
}
</script> <style scoped> </style>
myButton.vue
<template>
<div>
<in-body :mbx="['首页','基础','Button']">
<Button>Default</Button>
<Button type="primary">Primary</Button>
<Button type="dashed">Dashed</Button>
<Button type="text">Text</Button>
<br><br>
<Button type="info">Info</Button>
<Button type="success">Success</Button>
<Button type="warning">Warning</Button>
<Button type="error">Error</Button>
</in-body>
</div>
</template> <script>
import inBody from '../inBody'
export default {
name: "myButton"
,components:{
inBody
}
}
</script> <style scoped> </style>
vue 模块 props的更多相关文章
- vue & components & props & methods & callback
vue & components & props & methods & callback demo solution 1 & props & data ...
- [转]Vue中用props给data赋初始值遇到的问题解决
原文地址:https://segmentfault.com/a/1190000017149162 2018-11-28更:文章发布后因为存在理解错误,经@Kim09AI同学提醒后做了调整,在此深表感谢 ...
- Vue中用props给data赋初始值遇到的问题解决
Vue中用props给data赋初始值遇到的问题解决 更新时间:2018年11月27日 10:09:14 作者:yuyongyu 我要评论 这篇文章主要介绍了Vue中用props给dat ...
- Vue computed props pass params
Vue computed props pass params vue 计算属性传参数 // 计算 spreaderAlias spreaderAlias () { console.log('this. ...
- vue & watch props
vue & watch props bug OK watch: { // props // chatObj: () => { // // bug // log(`this.chatObj ...
- vue & modal props & form data update bug
vue & modal props & form data update bug OK <div> <BindModal :dialogBindVisible=&qu ...
- vue之props父子组件之间的谈话
眨眼就来杭州两年了,时间真快. 我们今天来说说vue的一个api---->props 首先我们先看看一个例子,是我一个项目中写的. 看到这个:有木有一点懂了.要是没懂,继续往下看 这里我们用到了 ...
- vue的props和$attrs
过去我们在vue的父子组件传值的时候,我们先需要的子组件上用props注册一些属性: <template> <div> props:{{name}},{{age}} 或者 {{ ...
- node搭环境(四)--webpack启服务运行VUE模块文件(手写简单脚手架)
webpack启服务步骤: 1.新建空文件夹webpack-vue.在空文件夹右键点击- GIt Bath here--输入cnpm init--按程序走完会生成package.json文件 2.打开 ...
随机推荐
- 微信小程序-B站:wxml和wxss文件
WXML WXML(WeiXin Markup Language)是微信的一套标签语言,结合基础组件.事件系统,可以构建出页面的结构. (小安娜:好像很厉害的样子,那基础组件.事件系统是什么?感觉更厉 ...
- Android 用Animation-list实现逐帧动画 (转载)
转自:http://blog.csdn.net/aminfo/article/details/7847761 第一步:先上图片素材,以下素材放到res/drawable目录下: http://blog ...
- C#中的Webservice实例代码(vs2013)
2.1首先创建一个最基本的web service服务端,顾名思义就是提供服务,这儿实现一个简单的加法计算. 首先,vs2013--文件---新建项目---Asp.net 空Web 应用程序 (V ...
- 洛谷 - P1379 - 八数码难题 - bfs
https://www.luogu.org/problemnew/show/P1379 #include <bits/stdc++.h> using namespace std; #def ...
- POJ1017 【据说是贪心...】
题意: 有6种面积的格子,给出这些格子的数量,然后有6*6的格子去容纳这6种面基,问最少需要几个6*6格子,使得所有类型的小格子被容纳. 思路: 按照面积的从大到小放. 一开始还是太天真,还要用各种1 ...
- 关于js变量作用域
先来看一段代码 var ss=1;function sss(){ alert(ss);}$(document).ready(function(){ var ss=2; alert(ss); sss() ...
- spoj SUBST1 - New Distinct Substrings【SAM||SA】
SAM里的转台不会有重复串,所以答案就是每个right集合所代表的串个数的和 #include<iostream> #include<cstdio> #include<c ...
- C#中自定义类数组和结构数组的使用
如有雷同,不胜荣幸,若转载,请注明 C#中自定义类数组和结构数组的使用 最近在很多项目中发现很多时候给定的数组要实现某个逻辑或处理很是麻烦,一维数组,二维数组,,,等等需要经过n多转换,还不如自己写一 ...
- Asp.net core 框架整理
https://github.com/thangchung/awesome-dotnet-core#cms
- nginx缓存过期
1 原理 在默认下,请求过的内容会接受304,而从本地缓存调用.这是通过client向server发送请求,给出ETag,server确认ETag未变,则不返回内容,client调用本地缓存. 而ex ...