Ver Fonte

feat: tooltip

ljc há 1 semana atrás
pai
commit
209b468cfb

+ 6 - 1
locale/cn.json

@@ -72,7 +72,12 @@
       "t2": "复制",
       "t3": "文件",
       "t4": "跳转{pageName}页面",
-      "t5": "公告"
+      "t5": "公告",
+      "t6": "打开链接",
+      "t7": "刷新",
+      "t8": "点击下载",
+      "t9": "支付方式"
+
     }
   },
   "common": {

+ 1 - 1
pages/analytics/analystViews.vue

@@ -14,7 +14,7 @@
                     <view class="card-header">
                         <view class="nav nav-underline card-header-tabs" id="myTab" role="tablist">
                             <view class="nav-item" v-for="item in tabsConfig" :key="item">
-                                <view class="nav-link cursor-pointer" @click="activeTab = item.value"
+                                <view class="nav-link cursor-pointer" :data-tooltip="item.text" data-placement="top" @click="activeTab = item.value"
                                     :class="{ 'active': item.value == activeTab }">{{
                                         item.text }}</view>
                             </view>

+ 17 - 1
pages/analytics/components/List.vue

@@ -28,7 +28,7 @@
     <!-- 列表 -->
     <view v-if="list.length > 0" class="list">
       <view v-for="item in list" :key="item.id" class="col-12 m-b30">
-        <view class="card card-action action-elevate action-border-primary cursor-pointer" @click="handleItemClick(item)">
+        <view class="card card-action action-elevate action-border-primary cursor-pointer" @click="handleItemClick(item)" :data-tooltip="t('vu.tooltip.t4',{pageName:currentTitleText})" data-placement="top">
           <view class="row g-0">
             <view class="col-md-3" v-if="item.coverImage">
               <view class="card-header border-0 p-0 m-2 position-relative overflow-hidden">
@@ -90,6 +90,22 @@ const formatDate = (dateStr) => {
   if (!dateStr) return ''
   return dateStr.slice(0, 10).replace('T', ' ')
 }
+const currentTitleText = computed(() => {
+  const map = {
+    1: t('News.ViewAnalysis'),
+    2: t('News.NewsInformation'),
+    3: t('News.Announcement'),
+    4: t('News.VideoCommentary'),
+    5: t('News.NewsInformation'),
+    6: t('News.VideoCommentary'),
+    7: t('News.Notice'),
+    8: t('News.TradeIdeas'),
+    9: t('News.FinancialCalendar'),
+    10: t('News.Ebook'),
+    11: t('News.VideoCommentary')
+  }
+  return map[props.type] || ''
+})
 
 const load = async () => {
   list.value = []

+ 1 - 1
pages/analytics/news.vue

@@ -37,7 +37,7 @@
                     <view class="card-header">
                         <view class="nav nav-underline card-header-tabs" id="myTab" role="tablist">
                             <view class="nav-item" v-for="item in tabsConfig" :key="item">
-                                <view class="nav-link cursor-pointer" @click="activeTab = item.value"
+                                <view class="nav-link cursor-pointer" :data-tooltip="item.text" data-placement="top" @click="activeTab = item.value"
                                     :class="{ 'active': item.value == activeTab }">{{
                                         item.text }}</view>
                             </view>

+ 3 - 3
pages/common/download.vue

@@ -15,15 +15,15 @@
                             <view class="nav nav-pills nav-fill card-header-pills">
                                 <view class="nav-item">
                                     <view class="nav-link cursor-pointer" :class="{ 'active': activeName == 'MT4' }"
-                                        @click="activeName = 'MT4'">MetaTrader 4</view>
+                                        @click="activeName = 'MT4'" :data-tooltip="'MetaTrader 4'" data-placement="top">MetaTrader 4</view>
                                 </view>
                                 <view class="nav-item">
                                     <view class="nav-link cursor-pointer" :class="{ 'active': activeName == 'MT5' }"
-                                        @click="activeName = 'MT5'">MetaTrader 5</view>
+                                        @click="activeName = 'MT5'" :data-tooltip="'MetaTrader 5'" data-placement="top">MetaTrader 5</view>
                                 </view>
                                 <view class="nav-item" v-if="app3">
                                     <view class="nav-link cursor-pointer" :class="{ 'active': activeName == 'App' }"
-                                        @click="activeName = 'App'" v-t="'vu.Downloadpage.item41'"></view>
+                                        @click="activeName = 'App'" v-t="'vu.Downloadpage.item41'" :data-tooltip="t('vu.Downloadpage.item41')" data-placement="top"></view>
                                 </view>
                             </view>
                         </view>

+ 1 - 1
pages/customer/components/PaymentMethodsList.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="row">
-    <view class="col-lg-3 col-sm-12 cursor-pointer mb-2" v-for="item in list" :key="item.id" :class="{ disabled: item.disabled }" @click="handleClick(item)">
+    <view class="col-lg-3 col-sm-12 cursor-pointer mb-2" v-for="item in list" :key="item.id" :class="{ disabled: item.disabled }" @click="handleClick(item)" :data-tooltip="t('vu.tooltip.t9')" data-placement="top">
       <view class="card hover">
         <view class="card-header d-flex justify-content-between align-items-center">
           <h4 class="card-title mb-0">{{ item.name }}</h4>

+ 3 - 3
pages/customer/components/TerminalDialog.vue

@@ -2,7 +2,7 @@
     <cwg-popup :title="t('Shop.Index.Transaction')" :visible="props.visible" :showFooters="false"
         @update:visible="$emit('update:visible', $event)">
         <view class="card-list">
-            <view class="card cursor-pointer" @click="handleWebClick">
+            <view class="card cursor-pointer" @click="handleWebClick" :data-tooltip="t('vu.tooltip.t6')" data-placement="top">
                 <view class="card-icon">
                     <cwg-icon name="cwg-mt" :size="48" color="#fff"  />
                 </view>
@@ -14,7 +14,7 @@
                     <cwg-icon name="cwg-arrow" :size="24" />
                 </view>
             </view>
-            <view class="card cursor-pointer" @click="handleDownloadClick">
+            <view class="card cursor-pointer" @click="handleDownloadClick" :data-tooltip="t('vu.tooltip.t8')" data-placement="top">
                 <view class="card-icon">
                     <cwg-icon name="cwg-mt" :size="48" color="#fff"  />
                 </view>
@@ -26,7 +26,7 @@
                     <cwg-icon name="cwg-arrow" :size="24"  />
                 </view>
             </view>
-            <view class="card cursor-pointer" @click="handleClick">
+            <view class="card cursor-pointer" @click="handleClick" :data-tooltip="t('vu.tooltip.t4',{pageName:t('Downloadpage.item1')})" data-placement="top">
                 <view class="card-content">
                     <text class="card-title" v-t="'vu.item13'"></text>
                 </view>

+ 1 - 1
pages/customer/dashboard.vue

@@ -112,7 +112,7 @@
                       <text v-if="chartForm.chartType == 3">{{ t('Custom.Index.WithdrawalsStatistical') }}</text>
                       <text v-if="chartForm.chartType == 6">{{ t('Custom.Index.ProfitLoss') }}</text>
                     </view>
-                    <view class="time cursor-pointer" @click="toReload">
+                    <view class="time cursor-pointer" @click="toReload" :data-tooltip="t('vu.tooltip.t7')" data-placement="top">
                       <cwg-icon name="crm-refresh" :size="16" color="#666" />
                       <text class="crm-cursor"> GMT+3 {{ time }}</text>
                     </view>

+ 1 - 1
pages/follow/index.vue

@@ -104,7 +104,7 @@
                     <view class="tit">
                       <text class="tab h3">{{ t('Documentary.console.item23') }}</text>
                     </view>
-                    <view class="num cursor-pointer" @click="toDocumentary1">
+                    <view class="num cursor-pointer" @click="toDocumentary1" :data-tooltip="t('Documentary.TundManagement.item11')" data-placement="top">
                       <cwg-icon name="crm-sz" :size="18" color="#6c8595" />
                     </view>
                   </view>

+ 1 - 1
pages/ib/transfer.vue

@@ -19,7 +19,7 @@
                                     <view class="nav-item" role="presentation" v-for="item in tabsConfig"
                                         :key="item.value" @click="activeTab = item.value">
                                         <view class="nav-link cursor-pointer"
-                                            :class="{ 'active': item.value === activeTab }">{{
+                                            :class="{ 'active': item.value === activeTab }" :data-tooltip="item.text" data-placement="top">{{
                                                 item.text }}</view>
                                     </view>
                                 </view>

+ 2 - 2
pages/mine/components/KycAuthDialog.vue

@@ -14,9 +14,9 @@
                     <view class="qrcode-wrapper" v-if="qrCodeUrl">
                         <QrCode v-if="qrCodeUrl" :text="qrCodeUrl"></QrCode>
                         <view class="qrcode-url">
-                            <view class="url-text cursor-pointer" @click="openExternalUrl(qrCodeUrl)">{{ qrCodeUrl }}
+                            <view class="url-text cursor-pointer" @click="openExternalUrl(qrCodeUrl)" :data-tooltip="t('vu.tooltip.t6')" data-placement="top">{{ qrCodeUrl }}
                             </view>
-                            <cwg-icon name="copy" class="cursor-pointer" :size="20" @click="copyUrl" />
+                            <cwg-icon name="copy" class="cursor-pointer" :size="20" @click="copyUrl" :data-tooltip="t('vu.tooltip.t2')" data-placement="top"/>
                         </view>
                     </view>
                     <!-- 说明 -->