|
3 | 3 | <Card :padding="0"> |
4 | 4 | <div slot="title" @click="bodySwitch" class="card-title"> |
5 | 5 | <Icon :type="titleIcon"></Icon> |
6 | | - <span>发现 <Badge :count="count"></Badge> 个脚本适用于当前页面</span> |
| 6 | + <!--<span>发现 <Badge :count="count"></Badge> 个脚本适用于当前页面</span>--> |
| 7 | + <i18n path="table.tips" tag="span"> |
| 8 | + <Badge place="count" :count="count"></Badge> |
| 9 | + </i18n> |
7 | 10 | </div> |
8 | 11 | <div slot="extra"> |
9 | 12 | <span v-show="showBody"> |
10 | | - <Button type="dashed" @click="open('https://greasyfork.org/zh-CN/scripts/24508/feedback')"> |
11 | | - <Icon type="bug"></Icon> |
12 | | - </Button> |
| 13 | + <Tooltip :content="$t('table.feedback')" placement="bottom"> |
| 14 | + <Button type="dashed" @click="open('https://greasyfork.org/zh-CN/scripts/24508/feedback')"> |
| 15 | + <Icon type="bug"></Icon> |
| 16 | + </Button> |
| 17 | + </Tooltip> |
13 | 18 |
|
14 | | - <Button type="dashed" @click="open('https://greasyfork.org/zh-CN/scripts/24508')"> |
15 | | - <Icon type="fork"></Icon> |
16 | | - </Button> |
| 19 | + <Tooltip content="GreasyFork" placement="bottom"> |
| 20 | + <Button type="dashed" @click="open('https://greasyfork.org/zh-CN/scripts/24508')"> |
| 21 | + <Icon type="fork"></Icon> |
| 22 | + </Button> |
| 23 | + </Tooltip> |
17 | 24 |
|
18 | | - <Button type="dashed" @click="open('https://github.com/jae-jae/Show-Site-All-UserJS')"> |
19 | | - <Icon type="social-github"></Icon> |
20 | | - </Button> |
| 25 | + <Tooltip content="GitHub" placement="bottom"> |
| 26 | + <Button type="dashed" @click="open('https://github.com/jae-jae/Show-Site-All-UserJS')"> |
| 27 | + <Icon type="social-github"></Icon> |
| 28 | + </Button> |
| 29 | + </Tooltip> |
21 | 30 |
|
22 | | - <Button type="dashed" @click="showDonate = true"> |
23 | | - <Icon type="card"></Icon> |
24 | | - </Button> |
| 31 | + <Tooltip :content="$t('table.donate')" placement="bottom"> |
| 32 | + <Button type="dashed" @click="showDonate = true"> |
| 33 | + <Icon type="card"></Icon> |
| 34 | + </Button> |
| 35 | + </Tooltip> |
25 | 36 | </span> |
26 | | - <Button type="dashed" @click="close"> |
27 | | - <Icon type="close-round"></Icon> |
28 | | - </Button> |
| 37 | + |
| 38 | + <Tooltip :content="$t('table.close')" placement="left"> |
| 39 | + <Button type="dashed" @click="close"> |
| 40 | + <Icon type="close-round"></Icon> |
| 41 | + </Button> |
| 42 | + </Tooltip> |
| 43 | + |
29 | 44 | </div> |
30 | 45 | <transition name="custom-classes-transition" enter-active-class="animated jello" leave-active-class="animated bounceOutRight"> |
31 | 46 | <div v-show="showBody"> |
|
37 | 52 |
|
38 | 53 | <Tabs value="wechat"> |
39 | 54 |
|
40 | | - <Tab-Pane label="微信打赏" name="wechat"> |
| 55 | + <Tab-Pane :label="$t('table.wechat')" name="wechat"> |
41 | 56 | <div style="text-align: center;"> |
42 | 57 | <img width="200px" src="http://ww1.sinaimg.cn/large/7de3675bly1fizyy2pivwj2074074js6.jpg"> |
43 | 58 | </div> |
44 | 59 | </Tab-Pane> |
45 | 60 |
|
46 | | - <Tab-Pane label="支付宝打赏" name="alipay"> |
| 61 | + <Tab-Pane :label="$t('table.alipay')" name="alipay"> |
47 | 62 | <div style="text-align: center;"> |
48 | 63 | <img width="200px" src="http://ww1.sinaimg.cn/large/7de3675bly1fizyyh7m7yj20ci0ciwfl.jpg"> |
49 | 64 | </div> |
50 | 65 | </Tab-Pane> |
51 | 66 |
|
52 | | - <Tab-Pane label="PayPal打赏" name="paypal"> |
| 67 | + <Tab-Pane :label="$t('table.paypal')" name="paypal"> |
53 | 68 | <div style="text-align: center;"> |
54 | 69 | <a href="https://paypal.me/jaepay/10" target="_blank"> |
55 | 70 | <img src="http://ww1.sinaimg.cn/large/7de3675bly1fizzsw92owj207s03s748.jpg"> |
|
60 | 75 | </Tabs> |
61 | 76 |
|
62 | 77 | <div slot="footer"> |
63 | | - <Button type="info" size="large" long @click="showDonate=false">关闭</Button> |
| 78 | + <Button type="info" size="large" long @click="showDonate=false">{{$t('table.closeDonate')}}</Button> |
64 | 79 | </div> |
65 | 80 |
|
66 | 81 | </Modal> |
|
70 | 85 | <script> |
71 | 86 | import Tools from '../common/js/tools' |
72 | 87 | import Info from './Info.vue' |
| 88 | + import Vue from 'vue' |
73 | 89 | export default { |
74 | 90 | components: { Info }, |
75 | 91 | mounted: function() { |
|
83 | 99 | })*/ |
84 | 100 | this.data = Tools.getData() |
85 | 101 | }, |
86 | | - data: ()=>{ |
| 102 | + data: function (){ |
87 | 103 | return { |
88 | 104 | showBody: false, |
89 | 105 | titleIcon: 'chevron-up', |
|
107 | 123 | align: 'center' |
108 | 124 | }, |
109 | 125 | { |
110 | | - title: '标题', |
| 126 | + title: this.$t('table.title'), |
111 | 127 | key: 'name', |
112 | 128 | width: '35%', |
113 | 129 | ellipsis: false, |
|
128 | 144 | } |
129 | 145 | }, |
130 | 146 | { |
131 | | - title: '作者', |
| 147 | + title: this.$t('table.author'), |
132 | 148 | render: (h, params) => { |
133 | 149 | return h('span', { |
134 | 150 | attrs: { |
135 | | - title: `点击访问${params.row.user.name}主页` |
| 151 | + title:this.$t('table.authorTips',{name:params.row.user.name}) |
136 | 152 | }, |
137 | 153 | style: { |
138 | 154 | cursor: 'pointer' |
|
146 | 162 | } |
147 | 163 | }, |
148 | 164 | { |
149 | | - title: '今日安装', |
| 165 | + title: this.$t('table.dailyInstalls'), |
150 | 166 | key: 'daily_installs', |
151 | 167 | sortable: true |
152 | 168 | }, |
153 | 169 | { |
154 | | - title: '更新时间', |
| 170 | + title: this.$t('table.updatedTime'), |
155 | 171 | key: 'code_updated_at', |
156 | 172 | render: (h, params) => { |
157 | 173 | return h('span', Tools.timeagoFormat(params.row.code_updated_at)) |
158 | 174 | }, |
159 | 175 | sortable: true |
160 | 176 | }, |
161 | 177 | { |
162 | | - title: '操作', |
| 178 | + title: this.$t('table.action'), |
163 | 179 | key: 'code_url', |
164 | 180 | align: 'center', |
165 | 181 | render: (h, params) => { |
|
175 | 191 | }, |
176 | 192 | on: { |
177 | 193 | click: (event) => { |
178 | | - Tools.msg('脚本安装中...') |
| 194 | + //Tools.msg('脚本安装中...') |
| 195 | + this.$Message.info('脚本安装中...'); |
179 | 196 | Tools.installUserJs(params.row.code_url) |
180 | 197 | } |
181 | 198 | } |
182 | | - }, '安装') |
| 199 | + }, this.$t('table.install')) |
183 | 200 | ]) |
184 | 201 | } |
185 | 202 | } |
|
0 commit comments