Просмотр исходного кода

Inital commit for fancy-input component

sbkwgh 8 лет назад
Родитель
Сommit
fa7efa2c59
1 измененных файлов с 25 добавлено и 0 удалено
  1. 25 0
      src/components/FancyInput.vue

+ 25 - 0
src/components/FancyInput.vue

@@ -0,0 +1,25 @@
+<template>
+	<div class='fancy_input'>
+		<div class='fancy_input__placeholder'>{{placeholder}}</div>
+		<input type='text' v-bind:value='value' v-on:input='updateValue($event.target.value)'>
+	</div>
+</template>
+
+<script>
+	export default {
+		name: 'FancyInput',
+		props: ['value', 'placeholder'],
+		data () {
+			active: false
+		},
+		methods: {
+			updateValue (val) {
+				this.$emit('input', val);
+			}
+		}
+	}
+</script>
+
+<style lang='scss' scoped>
+	
+</style>