FreeTube/src/renderer/components/ft-input/ft-input.vue

45 lines
850 B
Vue
Raw Normal View History

2020-02-16 19:30:00 +01:00
<template>
<div
class="ft-input-component"
:class="{
search: isSearch,
forceTextColor: forceTextColor
}"
>
<label
v-if="showLabel"
:for="id"
>
{{ placeholder }}
</label>
2020-02-16 19:30:00 +01:00
<input
:id="id"
:list="idDataList"
:value="value"
2020-02-16 19:30:00 +01:00
class="ft-input"
type="text"
:placeholder="placeholder"
@input="e => handleInput(e.target.value)"
2020-02-16 19:30:00 +01:00
>
<font-awesome-icon
v-if="showArrow"
icon="arrow-right"
class="inputAction"
@click="handleClick"
2020-02-16 19:30:00 +01:00
/>
<datalist
v-if="dataList.length > 0"
:id="idDataList"
>
<option
v-for="(list, index) in dataList"
:key="index"
:value="list"
/>
</datalist>
2020-02-16 19:30:00 +01:00
</div>
</template>
<script src="./ft-input.js" />
<style scoped src="./ft-input.css" />