vue-frame
Dynamic component for rapid creation of interfaces
17,674
47
| Install | |
|---|---|
npm install vue-frame |
|
| Latest Version: | 1.0.7 |
| Vue: | 2 |
| Last Updated: | Mar 3, 2018 |
| Links: | GitHub · npm |
Maintainer: anlijudavid
Vue-frame
A simple component Vue 2.x for prototyping interfaces with iframes.
Install
Using npm:
npm install --save vue-frame
Using yarn:
yarn add vue-frame
Import
import VueFrame from 'vue-frame'
export default {
components: { VueFrame },
data () {
return { /*...*/ }
},
methods: { /*...*/ }
}
Usage
This is a project for vue.
<div id="vue-frame">
<vue-frame text="VueJS" url="https://vuejs.org" frame="myframe" type="button" class="form-control"></vue-frame>
<vue-frame text="Api Vue" url="https://vuejs.org/v2/api" frame="myframe" type="a"></vue-frame>
<br />
<iframe id="myframe" width="800"></iframe>
</div>
<script src="/dist/vue-frame.js"></script>
The rendered elements look like this:
PropTypes
| Prop | Desc | Type | Default | Is Required |
|---|---|---|---|---|
class |
Custom class to add to the component | string |
||
url |
Custom url that the component will load | string |
✅ | |
text |
Custom text | string |
✅ | |
frame |
Iframe element ID | string |
✅ | |
type |
Name of the HTML tag to render | string |
a |
|
default |
load site instantly mount the element | boolean |
false |
Example
<vue-frame text="VueJS" url="https://juliandavidmr.github.io" frame="idframe" type="div" class="form-control"></vue-frame>
Use CDN
<script src="https://unpkg.com/vue-frame@1.0.6/dist/vue-frame.js"></script>
See example with cdn index.html
Development
| Command | Description |
|---|---|
| npm run build | Build |
| npm run dev | Open browser dev |
License
MIT @juliandavidmr
Related Packages
@koumoul/v-iframe
Iframes with aspect ratio, iframe resizer integration and some corner cases.
4,186
3
Version History
| Version | Released | License |
|---|---|---|
| 1.0.7 | ||
| 1.0.6 | ||
| 1.0.5 | ||
| 1.0.4 | ||
| 1.0.3 | ||
| 1.0.2 | ||
| 1.0.1 | ||
| 1.0.0 |
