This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="html"> | |
<input class="v-tag-input" type="text" v-model="editableValue"> | |
</template> | |
<script> | |
export default { | |
name: 'v-tag-input', | |
props: { | |
value: { | |
type: Array, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"plugins": ["transform-es2015-modules-systemjs"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('tag-editor', { | |
template: `<div class="tag-editor"> | |
<tag-input v-model="editableValue"></tag-input> | |
<tag-list v-model="editableValue"></tag-list> | |
</div>`, | |
props: ['value'], | |
computed: { | |
editableValue: { | |
get () { | |
return this.value || [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('tag-list', { | |
template: `<div> | |
<span v-for="tag, index in value" class="tag is-info" style="margin-right: 2px"> | |
{{tag}} | |
<button class="delete is-small" @click="remove(index)"></button> | |
</span> | |
</div>`, | |
props: ['value'], | |
methods: { | |
remove (index) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('tag-input', { | |
template: '<input type="text" v-model="editableTags">', | |
props: ['value'], | |
computed: { | |
editableTags: { | |
get () { | |
return (this.value || []).join(' ') | |
}, | |
set (val) { | |
this.$emit('input', val.split(' ')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<radio name="frutas" data="1" label="Abacaxi" v-model="fruta"></radio> | |
<radio name="frutas" data="2" v-model="fruta"> | |
Laranja | |
</radio> | |
<radio name="frutas" data="3" label="Melão" v-model="fruta"></radio> | |
Fruta: {{fruta}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = new Vue({ | |
el: '#app', // https://vuejs.org/v2/api/#el | |
template: '', // https://vuejs.org/v2/api/#template | |
render (h) {}, // https://vuejs.org/v2/api/#render | |
data: {}, // https://vuejs.org/v2/api/#data | |
computed: { // https://vuejs.org/v2/api/#computed | |
fullName: { | |
get () {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('FooBar') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install oracle extension to php 5.6 and Oracle Express 11g on ubuntu 16.04 | |
apt-get update | |
# to install rpm on ubuntu | |
apt-get install -qy alien | |
alien -vi oracle/oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm | |
alien -vi oracle/oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm | |
# add php 5.6 to ubuntu 16 | |
apt-get install -qy software-properties-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |