Kaynağa Gözat

Use object with event and value parameter for options, in case value parameter is dynamic

sbkwgh 8 yıl önce
ebeveyn
işleme
1cd3e43bb4
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/components/MenuButton.vue

+ 2 - 2
src/components/MenuButton.vue

@@ -8,10 +8,10 @@
 			<div
 				class='menu_button__option'
 				v-for='(option, $index) in options'
-				@click='emit(option)'
+				@click='emit(option.event)'
 				:style="{ 'border-bottom' : $index === options.length-1 ? 'none' :  'solid thin rgb(245, 245, 245)' }"
 			>
-				{{option}}
+				{{option.value}}
 			</div>
 		</div>
 	</div>