Skip to content

Instantly share code, notes, and snippets.

{
"plugins": ["transform-es2015-modules-systemjs"]
}
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 || []
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) {
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(' '))
<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}}
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 () {},
@neves
neves / index.js
Last active October 17, 2016 04:42
console.log('FooBar')
# 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
@neves
neves / 0_reuse_code.js
Created April 26, 2016 04:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console