vue render function
vue render function
https://vuejs.org/v2/guide/render-function.html
{
// Same API as `v-bind:class`, accepting either
// a string, object, or array of strings and objects.
class: {
foo: true,
bar: false
},
// Same API as `v-bind:style`, accepting either
// a string, object, or array of objects.
style: {
color: 'red',
fontSize: '14px'
},
// Normal HTML attributes
attrs: {
id: 'foo'
},
// Component props
props: {
myProp: 'bar'
},
// DOM properties
domProps: {
innerHTML: 'baz'
},
// Event handlers are nested under `on`, though
// modifiers such as in `v-on:keyup.enter` are not
// supported. You'll have to manually check the
// keyCode in the handler instead.
on: {
click: this.clickHandler
},
// For components only. Allows you to listen to
// native events, rather than events emitted from
// the component using `vm.$emit`.
nativeOn: {
click: this.nativeClickHandler
},
// Custom directives. Note that the `binding`'s
// `oldValue` cannot be set, as Vue keeps track
// of it for you.
directives: [
{
name: 'my-custom-directive',
value: '2',
expression: '1 + 1',
arg: 'foo',
modifiers: {
bar: true
}
}
],
// Scoped slots in the form of
// { name: props => VNode | Array<VNode> }
scopedSlots: {
default: props => createElement('span', props.text)
},
// The name of the slot, if this component is the
// child of another component
slot: 'name-of-slot',
// Other special top-level properties
key: 'myKey',
ref: 'myRef',
// If you are applying the same ref name to multiple
// elements in the render function. This will make `$refs.myRef` become an
// array
refInFor: true
}
attrs


https://css-tricks.com/what-does-the-h-stand-for-in-vues-render-method/
https://alligator.io/vuejs/introduction-render-functions/
macOS & bash shell
bash !== node





Windows
#!/usr/bin/env node
echo "^-v-^ app is running in development env!" && npm run start
MacOS
#!/usr/bin/env bash
echo "^-v-^ app is running in development env!" && npm run start
# chmod +x
$ chmod +x ./app.sh & sudo npm link & "app": "app.sh"
# npm link
$ npm link
vue render function的更多相关文章
- vue render function & dataset
vue render function & dataset https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In ...
- template or render function not defined vue 突然报错了,怎么解决
报错图例如下:template or render function not defined vue 突然报错了,怎么解决什么错误呢,就是加载不出来,网上看了一通,是vue版本不对,是vue-comp ...
- [Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined、vuejs路由使用的问题Error in render function
1.[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined 注意,只要出现Error i ...
- "[Vue warn]: Failed to mount component: template or render function not defined"错误的解决
VUE中动态路由出错: vue.esm.js?a026: [Vue warn]: Failed to mount component: template or render function not ...
- vue h render function & render select with options bug
vue h render function & render select with options bug https://github.com/xgqfrms/vue/issues/41 ...
- [Vue @Component] Control Template Contents with Vue's Render Function
Declaring templates and elements inside of templates works great for most scenarios. Sometimes you n ...
- [Vue warn]: You may have an infinite update loop in a component render function
[Vue warn]: You may have an infinite update loop in a component render function 这个问题很奇怪,之前从来没有遇到过.如果 ...
- vue render里面的nativeOn
vue render里面的nativeOn的解释官方的解释是:// 仅对于组件,用于监听原生事件,而不是组件内部使用 `vm.$emit` 触发的事件. 官方的解释比较抽象 个人理解: 父组件要在子组 ...
- vue render函数 函数组件化
之前创建的锚点标题组件是比较简单,没有管理或者监听任何传递给他的状态,也没有生命周期方法,它只是一个接受参数的函数 在这个例子中,我们标记组件为functional,这意味它是无状态(没有data), ...
随机推荐
- rcosfir函数的用法
B = rcosfir(R, N_T, RATE, T, FILTER_TYPE) designs and returns a square root raised cosine filter if ...
- js scroll nav
http://jsfiddle.net/cse_tushar/Dxtyu/141/http://ironsummitmedia.github.io/startbootstrap-scrolling-n ...
- 网络中可以引用的jquery库
网络项目可以直接引用这个jquery库 <script src="http://www.codefans.net/ajaxjs/jquery-1.4.2.min.js"> ...
- C语言 结构体学习
结构体的学习 struct 结构是由基本数据类型构成的.并用一个标识符来命名的各种变量的组合. 结构中可以使用不同的数据类型. 结构说明和结构变量定义 在Turbo C中, 结构也是一种数据类型,可以 ...
- 20155331 2016-2017-2 《Java程序设计》第10周学习总结
20155331 2016-2017-2 <Java程序设计>第10周学习总结 教材学习内容总结 网络编程 网络编程就是在两个或两个以上的设备(例如计算机)之间传输数据.程序员所作的事情就 ...
- 20155334 2016-2017-2《Java程序设计》课程总结
20155334 2016-2017-2<Java程序设计>课程总结 1. 每周作业链接汇总 题目 主要内容 二维码 预备作业1 不知道所以然的第一次博客 预备作业2 有关之前的C语言的调 ...
- PhoneGap3.2安装步骤
1.首选安装好JDK.Android SDK.Ant 配置如下: 系统环境变量 ANDROID_HOME Value: C:\Development\adt-bundle\ ...
- (ex)Lucas总结
(ex)Lucas总结 普通Lucas 求 \[ C_n^m\;mod\;p \] 其中\(n,m,p\leq 10^5\)其中\(p\)为质数 公式不难背,那就直接背吧... \[ C_n^m\;m ...
- 06004_Redis的启动、使用和停止
1.Redis的启动 (1)前端模式启动 ①直接运行bin/redis-server将以前端模式启动:切换到 /usr/local/redis/bin目录下,然后./redis-server : ②前 ...
- autoreleasepool 自动释放池的理解
常见的面试题:以下代码存在什么样的问题?应该如何改进? for (int i = 0; i < 100000; i++) { NSString *str = @"abc"; ...