| | |
| | | <template> |
| | | <div class="buy-input relative"> |
| | | <img class="w-40 h-40 absolute left-24" src="@/assets/image/payment/search.png" alt="" /> |
| | | <input class="w-full box-border pl-80 pt-10 pb-10" :readonly="readonly" type="text" :value="value" :placeholder="placeholder" @input="changeVal" |
| | | @focus="focus" /> |
| | | <input class="w-full box-border pl-80 pt-10 pb-10" :readonly="readonly" type="text" :value="value" |
| | | :placeholder="placeholder" @input="changeVal" @focus="focus" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'BuyInput', |
| | | props: ['value', 'placeholder','isReadonly'], |
| | | props: ['value', 'placeholder', 'isReadonly'], |
| | | data() { |
| | | return { |
| | | readonly: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | if(this.isReadonly) { |
| | | this.readonly = this.isReadonly |
| | | } else { |
| | | this.readonly = false |
| | | } |
| | | if (this.isReadonly) { |
| | | this.readonly = this.isReadonly |
| | | } else { |
| | | this.readonly = false |
| | | } |
| | | }, |
| | | methods: { |
| | | focus(e) { |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/css/copy2.scss"; |
| | | |
| | | input { |
| | | border: none; |
| | | outline: none; |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 50px; |
| | | background: $input_background; |
| | | color: $text_color; |
| | | |
| | | @include themify() { |
| | | background: themed("input_background"); |
| | | color: themed("text_color"); |
| | | } |
| | | } |
| | | } |
| | | </style> |