From da4441f5d445f4372d410c75fbeca109aa6c1e97 Mon Sep 17 00:00:00 2001 From: nzomkxia Date: Tue, 12 Feb 2019 16:25:01 +0800 Subject: [PATCH] customize button style and size #295 --- .../src/components/ServiceDetail.vue | 44 ++++++++++++++----- .../src/components/ServiceSearch.vue | 31 ++++++++----- dubbo-admin-ui/src/lang/en.js | 2 + dubbo-admin-ui/src/lang/zh.js | 2 + 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/dubbo-admin-ui/src/components/ServiceDetail.vue b/dubbo-admin-ui/src/components/ServiceDetail.vue index f4241b3f0..94d7ff670 100644 --- a/dubbo-admin-ui/src/components/ServiceDetail.vue +++ b/dubbo-admin-ui/src/components/ServiceDetail.vue @@ -56,17 +56,21 @@ {{getPort(props.item.address)}} - - - {{$t('copyUrl')}} - - {{props.item.url}} - + + + + {{$t(hint)}} + + {{props.item.url}} + + @@ -121,7 +125,8 @@ providerDetails: [], consumerDetails: [], methodMetaData: [], - basic: [] + basic: [], + hint: 'url' }), methods: { setmetaHeaders: function () { @@ -143,6 +148,13 @@ } ] }, + setHoverHint: function () { + this.hint = 'copy' + }, + + setoutHint: function () { + this.hint = 'url' + }, setdetailHeaders: function () { this.detailHeaders = { providers: [ @@ -261,3 +273,11 @@ } + + diff --git a/dubbo-admin-ui/src/components/ServiceSearch.vue b/dubbo-admin-ui/src/components/ServiceSearch.vue index 1f7706a65..dded4cdac 100644 --- a/dubbo-admin-ui/src/components/ServiceSearch.vue +++ b/dubbo-admin-ui/src/components/ServiceSearch.vue @@ -81,29 +81,30 @@ {{props.item.appName}} - {{$t('test')}} + {{ $t('detail') }} - {{ $t('detail') }} + {{$t('test')}} {{ $t('more') }} - expand_more + arrow_drop_down diff --git a/dubbo-admin-ui/src/lang/en.js b/dubbo-admin-ui/src/lang/en.js index 4542d471d..85820e8eb 100644 --- a/dubbo-admin-ui/src/lang/en.js +++ b/dubbo-admin-ui/src/lang/en.js @@ -132,6 +132,8 @@ export default { detail: 'Detail', more: 'More', copyUrl: 'Copy URL', + copy: 'Copy', + url: 'URL', copySuccessfully: 'Copied', test: 'Test', placeholders: { diff --git a/dubbo-admin-ui/src/lang/zh.js b/dubbo-admin-ui/src/lang/zh.js index 34670282f..3b7a4d6f8 100644 --- a/dubbo-admin-ui/src/lang/zh.js +++ b/dubbo-admin-ui/src/lang/zh.js @@ -132,6 +132,8 @@ export default { detail: '详情', more: '更多', copyUrl: '复制 URL', + copy: '复制', + url: 'URL', copySuccessfully: '已复制', test: '测试', placeholders: {