babel-plugin-transform-vue-jsx
Advanced tools
Comparing version 3.2.0 to 3.3.0
var makeMap = require('./make-map') | ||
var isTopLevel = makeMap('class,staticClass,style,key,ref,slot,scopedSlots') | ||
var isTopLevel = makeMap('class,staticClass,style,key,ref,refInFor,slot,scopedSlots') | ||
var isNestable = makeMap('domProps,on,nativeOn,hook') | ||
@@ -4,0 +4,0 @@ var nestableRE = /^(domProps|on|nativeOn|hook)([\-A-Z])/ |
{ | ||
"name": "babel-plugin-transform-vue-jsx", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "Babel plugin for Vue 2.0 JSX", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -101,2 +101,4 @@ # babel-plugin-transform-vue-jsx [![CircleCI](https://img.shields.io/circleci/project/vuejs/babel-plugin-transform-vue-jsx.svg?maxAge=2592000)](https://circleci.com/gh/vuejs/babel-plugin-transform-vue-jsx) | ||
ref: 'ref', | ||
// assign the `ref` is used on elements/components with v-for | ||
refInFor: true, | ||
slot: 'slot' | ||
@@ -115,5 +117,5 @@ }) | ||
id="foo" | ||
// DOM properties are prefixed with domProps- | ||
// DOM properties are prefixed with `domProps` | ||
domPropsInnerHTML="bar" | ||
// event listeners are prefixed with on- or nativeOn- | ||
// event listeners are prefixed with `on` or `nativeOn` | ||
onClick={this.clickHandler} | ||
@@ -126,2 +128,4 @@ nativeOnClick={this.nativeClickHandler} | ||
ref="ref" | ||
// assign the `ref` is used on elements/components with v-for | ||
refInFor | ||
slot="slot"> | ||
@@ -133,2 +137,16 @@ </div> | ||
### Component Tip | ||
If a custom element starts with lowercase, it will be treated as a string id and used to lookup a registered component. If it starts with uppercase, it will be treated as an identifier, which allows you to do: | ||
``` js | ||
import Todo from './Todo.js' | ||
export default { | ||
render (h) { | ||
return <Todo/> // no need to register Todo via components option | ||
} | ||
} | ||
``` | ||
### JSX Spread | ||
@@ -135,0 +153,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12996
182