JSFiddle - React, Tailwind, and code Playground

by Theara Yuom

HTML

<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<el-input ref="refInput" placeholder="Please input" v-model="input"></el-input>

<el-button @click="focus">Focus</el-button>
</div>

SCSS

@import url("//unpkg.com/[email protected]/lib/theme-chalk/index.css");

Babel + JSX

var Main = {
  data() {
    return {
      input: ''
    }
  },
  methods:{
    	focus(){
      	this.$refs.refInput.select()
      }
  }
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')