| | |
| | | <div class="pb-fix"> |
| | | <div class="container-box"> |
| | | <div class="search-container flex items-center"> |
| | | <van-search class="search-input" v-model="searchVal" @update:model-value="onClickButton" |
| | | :placeholder="$t('searchKeys')" @clear="onClearSearch" @cancel="cancelBack()" shape="round" show-action |
| | | :action-text="$t('Cancel')"> |
| | | <van-search class="search-input" v-model="searchVal" @update:model-value="onClickButton" :placeholder="$t('searchKeys')" |
| | | @clear="onClearSearch" @cancel="cancelBack()" shape="round" show-action :action-text="$t('Cancel')"> |
| | | </van-search> |
| | | </div> |
| | | <div class="hot-search"> |
| | |
| | | <add-currency @updateItem="getIsItemHasAddGlobal" ref="addCurrencyRef"></add-currency> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script setup> |
| | | import { ref, onMounted } from "vue"; |
| | | import { _ItemUserOptionalItemAdd, _isItemHasAddGlobal, _getQuotes } from '@/service/quotes.api' |
| | |
| | | import { HOST_URL } from '@/config' |
| | | import addCurrency from '@/components/add-currency/index.vue' |
| | | import { _getETFItemList, _getHkStocksItemList } from "@/service/etf.api.js"; |
| | | import { debounce } from '@/utils/index' |
| | | |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | |
| | | router.push('/foreign/coinChart?symbol=' + data.symbol + '&isOptional=2') |
| | | } |
| | | } |
| | | const onClickButton = debounce(function () { |
| | | const onClickButton = () => { |
| | | if (!searchVal.value) { |
| | | searchAllList.value = [] |
| | | return |
| | |
| | | // }) |
| | | // }) |
| | | }) |
| | | }, 700) |
| | | |
| | | } |
| | | const getIsItemHasAddGlobal = () => { |
| | | // console.log(selectInfo.value); |
| | | selectInfo.value.hasAddGlobal = true |
| | |
| | | router.go(-1) |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | :deep(.van-field__control) { |
| | | font-size: 14px; |
| | |
| | | color: #B8BDD1; |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | |
| | | &>p:first-child { |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; |
| | | /* 限制为2行 */ |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .num { |
| | | font-size: 14px; |