Content-Length: 295320 | pFad | http://github.com/vuejs/vue-element/commit/169564c2341163965b29f4d432177f746119029d

AD readme · vuejs/vue-element@169564c · GitHub
Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 169564c

Browse files
author
Evan You
committed
readme
1 parent 0df6dd5 commit 169564c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Vue.element plugin
2+
3+
Register a real Custom Element using Vue.js.
4+
5+
## Requirements
6+
7+
- Only works with Vue ^0.11.0
8+
- The browser must support the Custom Element API (currently Chrome only), or you need to include Polymer's [platform.js polyfill](https://www.polymer-project.org/docs/start/platform.html).
9+
10+
## Installation
11+
12+
Available through npm, Component, Duo or Bower.
13+
14+
### Direct include
15+
16+
If you are using Vue globally, just include `vue-element.js` and it will automatically install the `Vue.element` method.
17+
18+
### CommonJS
19+
20+
``` js
21+
Vue.use(require('vue-element')) // installed
22+
Vue.element({ /* ... */ })
23+
```
24+
25+
## Usage
26+
27+
Usage is the same as `Vue.component` - you pass in exactly the same options as if you are defining a Vue component. Two things to note:
28+
29+
- You don't need to manually instantiate a root level Vue instance. Custom Elements get auto-promoted when `document.registerElement` is called. You can also freely define the element before or after the markup.
30+
31+
- You can expose attributes with Vue's `paramAttributes` option. See the example folder to see it in action.
32+

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/vuejs/vue-element/commit/169564c2341163965b29f4d432177f746119029d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy