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

Fix same issue to FancyTextarea with having block level div at 100% width

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

+ 19 - 14
src/components/FancyInput.vue

@@ -1,21 +1,26 @@
 <template>
 	<div class='fancy_input'>
-		<error-tooltip :error='error'></error-tooltip>
-		<div
-			class='fancy_input__placeholder'
-			:class='{"fancy_input__placeholder--active": active || value.length}'
+		<div 
+			 style='position: relative; display: inline-block;'
+			 v-bind:style='{width: width || "10rem"}'
 		>
-			{{placeholder}}
+			<error-tooltip :error='error'></error-tooltip>
+			<div
+				class='fancy_input__placeholder'
+				:class='{"fancy_input__placeholder--active": active || value.length}'
+			>
+				{{placeholder}}
+			</div>
+			<input
+				v-bind:type='type || "text"'
+				class='input'
+				v-bind:value='value'
+				v-bind:style='{width: width || "10rem"}'
+				v-on:input='updateValue($event.target.value)'
+				@focus='addActive'
+				@blur='removeActive'
+			>
 		</div>
-		<input
-			v-bind:type='type || "text"'
-			class='input'
-			v-bind:value='value'
-			v-bind:style='{width: width || "10rem"}'
-			v-on:input='updateValue($event.target.value)'
-			@focus='addActive'
-			@blur='removeActive'
-		>
 	</div>
 </template>