2020-02-16 18:30:00 +00:00
|
|
|
<template>
|
2020-03-01 03:37:02 +00:00
|
|
|
<div
|
|
|
|
class="ft-input-component"
|
2020-06-02 02:42:29 +00:00
|
|
|
:class="{
|
|
|
|
search: isSearch,
|
|
|
|
forceTextColor: forceTextColor
|
|
|
|
}"
|
2020-03-01 03:37:02 +00:00
|
|
|
>
|
2020-06-02 02:42:29 +00:00
|
|
|
<label
|
|
|
|
v-if="showLabel"
|
|
|
|
:for="id"
|
|
|
|
>
|
|
|
|
{{ placeholder }}
|
|
|
|
</label>
|
2020-02-16 18:30:00 +00:00
|
|
|
<input
|
|
|
|
:id="id"
|
2020-06-19 19:58:59 +00:00
|
|
|
v-model="inputData"
|
2020-06-19 20:20:06 +00:00
|
|
|
:list="idDataList"
|
2020-02-16 18:30:00 +00:00
|
|
|
class="ft-input"
|
|
|
|
type="text"
|
|
|
|
:placeholder="placeholder"
|
2020-08-24 02:56:33 +00:00
|
|
|
:disabled="disabled"
|
2020-09-02 03:25:06 +00:00
|
|
|
@input="e => handleInput(e.target.value)"
|
2020-02-16 18:30:00 +00:00
|
|
|
>
|
|
|
|
<font-awesome-icon
|
|
|
|
v-if="showArrow"
|
|
|
|
icon="arrow-right"
|
|
|
|
class="inputAction"
|
2020-03-01 03:37:02 +00:00
|
|
|
@click="handleClick"
|
2020-02-16 18:30:00 +00:00
|
|
|
/>
|
2020-06-02 02:42:29 +00:00
|
|
|
<datalist
|
|
|
|
v-if="dataList.length > 0"
|
|
|
|
:id="idDataList"
|
|
|
|
>
|
|
|
|
<option
|
|
|
|
v-for="(list, index) in dataList"
|
|
|
|
:key="index"
|
|
|
|
:value="list"
|
|
|
|
/>
|
|
|
|
</datalist>
|
2020-02-16 18:30:00 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./ft-input.js" />
|
|
|
|
<style scoped src="./ft-input.css" />
|