NEZ-1980 perf : api keys 列表页面调整

This commit is contained in:
likexuan
2022-06-27 10:10:49 +08:00
parent 02cb511160
commit 39fe482397
2 changed files with 6 additions and 4 deletions

View File

@@ -79,7 +79,7 @@
</template> </template>
<template v-else-if="item.prop == 'token'"> <template v-else-if="item.prop == 'token'">
<div style="cursor:text" class="document-copy-block"> <div style="cursor:text" class="document-copy-block">
<span class="document-copy-text"> {{scope.row[item.prop].replace(/(?<=.{8})./g, '*')}}</span> <span class="document-copy-text"> {{scope.row[item.prop].replace(reg, '*')}}</span>
<i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i> <i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i>
</div> </div>
</template> </template>
@@ -172,7 +172,8 @@ export default {
disabledDate (time) { disabledDate (time) {
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000 return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
} }
} },
reg: new RegExp("(?<=.{8}).", 'g')
} }
}, },
methods: { methods: {

View File

@@ -41,7 +41,7 @@
</template> </template>
<template v-if="item.prop == 'token'"> <template v-if="item.prop == 'token'">
<div style="cursor:text" class="document-copy-block"> <div style="cursor:text" class="document-copy-block">
<span class="document-copy-text"> {{scope.row[item.prop]?scope.row[item.prop].replace(/(?<=.{8})./g, '*'):'-'}}</span> <span class="document-copy-text"> {{scope.row[item.prop]?scope.row[item.prop].replace(reg, '*'):'-'}}</span>
<i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i> <i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i>
</div> </div>
</template> </template>
@@ -126,7 +126,8 @@ export default {
minWidth: 100, minWidth: 100,
show: true show: true
} }
] ],
reg: new RegExp("(?<=.{8}).", 'g')
} }
}, },
methods: { methods: {