|
63 | 63 | style="width:0.8rem;display:inline-block;vertical-align:middle;" |
64 | 64 | :style="{backgroundImage:`url(${memberUser.avatar})`}"></div> |
65 | 65 | <i v-else class="iconfont icon-user"></i> |
66 | | - {{memberUser.username}} |
| 66 | + {{ memberUser.username }} |
67 | 67 | </span> |
68 | 68 | <span v-else> |
69 | 69 | <i class="iconfont icon-user"></i> |
|
92 | 92 | <a href="javascript:;" class="tw-mr-1 tw-text-gray-500 tw-mr-1" |
93 | 93 | :class="{'ub-text-primary':search.categoryId===cat.id}" |
94 | 94 | v-for="(cat,catIndex) in categories" :key="catIndex" @click="search.categoryId=cat.id"> |
95 | | - {{cat.title}} |
| 95 | + {{ cat.title }} |
96 | 96 | </a> |
97 | 97 | </div> |
98 | 98 | <div class="tw-px-2 tw-pt-2" v-if="types.length>0 && search.tab!=='system'"> |
|
105 | 105 | <a href="javascript:;" class="tw-mr-1 tw-text-gray-500 tw-mr-1" |
106 | 106 | :class="{'ub-text-primary':search.type===type.value}" |
107 | 107 | v-for="(type,typeIndex) in types" :key="typeIndex" @click="search.type=type.value"> |
108 | | - {{type.title}} |
| 108 | + {{ type.title }} |
109 | 109 | </a> |
110 | 110 | </div> |
111 | 111 | <div class="ub-empty" v-if="loading"> |
|
151 | 151 | <span v-if="!module.isFee && !module._isLocal" |
152 | 152 | class="ub-text-success">免费</span> |
153 | 153 | <div v-if="module.isFee" class="ub-text-danger"> |
154 | | - <span v-if="module.priceYearEnable">¥{{module.priceYear}}</span> |
155 | | - <span v-else-if="module.priceSuperEnable">¥{{module.priceSuper}}</span> |
| 154 | + <span v-if="module.priceYearEnable">¥{{ module.priceYear }}</span> |
| 155 | + <span v-else-if="module.priceSuperEnable">¥{{ module.priceSuper }}</span> |
156 | 156 | </div> |
157 | 157 | </div> |
158 | 158 | <div class="tw-text-gray-400 tw-text-sm tw-mt-2" |
|
181 | 181 | <i class="iconfont icon-down"></i> |
182 | 182 | </a> |
183 | 183 | </el-tooltip> |
184 | | - <a v-if="module._isInstalled && !module._isLocal && module.latestVersion!==module._localVersion" |
| 184 | + <a v-if="module._isInstalled && !module._isLocal && canUpgrade(module._localVersion,module.latestVersion)" |
185 | 185 | @click="doUpgrade(module)" |
186 | 186 | :data-tk-event="'ModuleStore,Upgrade,'+module.name" |
187 | 187 | href="javascript:;" class="ub-text-warning tw-mr-4"> |
|
232 | 232 | v-html="$highlight(module.name,search.keywords)"></span></div> |
233 | 233 | <span class="ub-text-muted">|</span> |
234 | 234 | <span class="ub-text-muted" v-if="module._isLocal"> |
235 | | - 版本V{{module._localVersion}} |
| 235 | + 版本V{{ module._localVersion }} |
236 | 236 | </span> |
237 | 237 | <span class="ub-text-muted" v-else-if="module._isInstalled"> |
238 | | - 已安装V{{module._localVersion}},最新版V{{module.latestVersion}} |
| 238 | + 已安装V{{ module._localVersion }},最新版V{{ module.latestVersion }} |
239 | 239 | </span> |
240 | 240 | <span class="ub-text-muted" v-else> |
241 | | - 最新版V{{module.latestVersion}} |
| 241 | + 最新版V{{ module.latestVersion }} |
242 | 242 | </span> |
243 | 243 | </div> |
244 | 244 | </div> |
|
332 | 332 | :style="{backgroundImage:`url(${memberUser.avatar||'/asset/image/avatar.png'})`}"></div> |
333 | 333 | </div> |
334 | 334 | <div class="tw-ml-4 tw-mr-auto"> |
335 | | - <div class="tw-font-medium">{{memberUser.username || ''}}</div> |
| 335 | + <div class="tw-font-medium">{{ memberUser.username || '' }}</div> |
336 | 336 | </div> |
337 | 337 | <div> |
338 | 338 | <a href="javascript:;" @click="doMemberUserLogout()">退出</a> |
|
359 | 359 | <div slot="title"> |
360 | 360 | <div class="ub-text-bold ub-text-primary"> |
361 | 361 | <i class="iconfont icon-code"></i> |
362 | | - {{commandDialogTitle}} |
| 362 | + {{ commandDialogTitle }} |
363 | 363 | </div> |
364 | 364 | </div> |
365 | 365 | <div class="tw-bg-gray-900 tw-font-mono tw-leading-8 tw-p-4 tw-text-white"> |
366 | 366 | <div v-for="(msg,msgIndex) in commandDialogMsgs" v-html="msg"></div> |
367 | 367 | <div v-if="!commandDialogFinish"> |
368 | 368 | <i class="iconfont icon-loading tw-inline-block tw-animate-spin"></i> |
369 | | - 当前操作已运行 {{commandDialogRunElapse}} s ... |
| 369 | + 当前操作已运行 {{ commandDialogRunElapse }} s ... |
370 | 370 | </div> |
371 | 371 | <div v-else> |
372 | 372 | <i class="iconfont icon-check"></i> |
|
384 | 384 | <div slot="title"> |
385 | 385 | <div class="ub-text-bold ub-text-primary" v-if="installVersionModule"> |
386 | 386 | <i class="iconfont icon-code"></i> |
387 | | - 安装 {{installVersionModule.title}} 其他版本 |
| 387 | + 安装 {{ installVersionModule.title }} 其他版本 |
388 | 388 | </div> |
389 | 389 | </div> |
390 | 390 | <div v-if="installVersionModule"> |
391 | 391 | <table class="ub-table tw-w-full tw-font-mono"> |
392 | 392 | <tbody> |
393 | 393 | <tr v-for="(v,vIndex) in installVersionReleases"> |
394 | | - <td width="100">v{{v.version}}</td> |
395 | | - <td>{{v.feature}}</td> |
396 | | - <td width="100">{{v.time}}</td> |
| 394 | + <td width="100">v{{ v.version }}</td> |
| 395 | + <td> |
| 396 | + <span class="ub-tag warning" v-if="v.status==='preview'">预览</span> |
| 397 | + {{ v.feature }} |
| 398 | + </td> |
| 399 | + <td width="100">{{ v.time }}</td> |
397 | 400 | <td> |
398 | 401 | <a href="javascript:;" @click="doInstallVersionSubmit(installVersionModule,v.version)"> |
399 | 402 | <i class="iconfont icon-plus"></i> |
@@ -493,7 +496,7 @@ export default { |
493 | 496 | if (!module._isSystem) return false |
494 | 497 | break |
495 | 498 | case 'upgradeable': |
496 | | - if (!(module._isInstalled && !module._isLocal && module.latestVersion !== module._localVersion)) { |
| 499 | + if (!(module._isInstalled && !module._isLocal && this.canUpgrade(module._localVersion, module.latestVersion))) { |
497 | 500 | return false |
498 | 501 | } |
499 | 502 | if (module._isSystem) return false |
@@ -556,6 +559,9 @@ export default { |
556 | 559 | } |
557 | 560 | return 0; |
558 | 561 | }, |
| 562 | + canUpgrade(currentVersion, latestVersion) { |
| 563 | + return this.versionCompare(currentVersion, latestVersion) < 0 |
| 564 | + }, |
559 | 565 | doStoreRequest(url, data, cbSuccess, cbError) { |
560 | 566 | const cbErrorDefault = (res) => { |
561 | 567 | this.$dialog.tipError(res.msg) |
|
0 commit comments