diff --git a/src/components/Apps/AccountCreateUpdateForm/index.vue b/src/components/Apps/AccountCreateUpdateForm/index.vue
index 36ca1b302..b5a99881f 100644
--- a/src/components/Apps/AccountCreateUpdateForm/index.vue
+++ b/src/components/Apps/AccountCreateUpdateForm/index.vue
@@ -158,7 +158,7 @@ export default {
margin: 5px 0;
}
h3 {
- margin-bottom: 5px;
+ margin-bottom: 10px;
}
}
}
diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue
index 2eb1a454e..ee1691971 100644
--- a/src/components/Apps/AccountListTable/AccountList.vue
+++ b/src/components/Apps/AccountListTable/AccountList.vue
@@ -27,7 +27,7 @@
:account="account"
:add-template="true"
:asset="iAsset"
- :title="accountCreateUpdateTitle"
+ :title="accountCreateByTemplateTitle"
:visible.sync="showAddTemplateDialog"
@add="addAccountSuccess"
@bulk-create-done="showBulkCreateResult($event)"
@@ -140,6 +140,7 @@ export default {
showAddTemplateDialog: false,
createAccountResults: [],
accountCreateUpdateTitle: this.$t('AddAccount'),
+ accountCreateByTemplateTitle: this.$t('AddAccountByTemplate'),
iAsset: this.asset,
account: {},
secretUrl: '',
@@ -325,7 +326,6 @@ export default {
setTimeout(() => {
vm.iAsset = this.asset
vm.account = {}
- vm.accountCreateUpdateTitle = this.$t('Create')
vm.showAddDialog = true
})
}
@@ -342,7 +342,6 @@ export default {
setTimeout(() => {
vm.iAsset = this.asset
vm.account = {}
- vm.accountCreateUpdateTitle = this.$t('Create')
vm.showAddTemplateDialog = true
})
}
diff --git a/src/components/DataActions/index.vue b/src/components/DataActions/index.vue
index c7a50564e..68453803b 100644
--- a/src/components/DataActions/index.vue
+++ b/src/components/DataActions/index.vue
@@ -13,9 +13,9 @@
-
+
- {{ toSentenceCase(action.title) }}
+ {{ action.title }}
@@ -35,9 +35,9 @@
>
-
+
- {{ toSentenceCase(option.title) }}
+ {{ option.title }}
@@ -57,7 +57,7 @@
- {{ toSentenceCase(action.title) }}
+ {{ action.title }}
@@ -154,7 +154,7 @@ export default {
if (!v) {
continue
}
- const action = Object.assign({}, v)
+ const action = { ...v }
// 是否拥有这个action
const has = this.checkItem(action, 'has')
delete action['has']
@@ -169,7 +169,6 @@ export default {
action.disabled = !can
if (action.dropdown) {
- // const dropdown = this.cleanActions(action.dropdown)
action.dropdown = this.cleanActions(action.dropdown)
}
cleanedActions.push(action)
diff --git a/src/components/Table/ListTable/TableAction/index.vue b/src/components/Table/ListTable/TableAction/index.vue
index afeaedc6b..ed854589c 100644
--- a/src/components/Table/ListTable/TableAction/index.vue
+++ b/src/components/Table/ListTable/TableAction/index.vue
@@ -151,7 +151,7 @@ export default {
.el-cascader {
.el-input.el-input--suffix {
.el-input__inner {
- height: calc(#{$innerHeight} - 1px);
+ height: calc(#{$headerHeight} - 1px);
}
}
}
diff --git a/src/utils/common.js b/src/utils/common.js
index 80ecbe726..a3d1de8c9 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -430,14 +430,23 @@ export function toTitleCase(string) {
export function toSentenceCase(string) {
if (!string) return string
if (string.indexOf('/') > 0) return string
- const s = string.trim().split(' ').map(item => {
+ const s = string.trim().split(' ').map((item, index) => {
if (item.length === 0) return ''
if (item.length === 1) return item.toLowerCase()
+ // 如果首字母大写,且第二个字母也大写,不处理
if (item[0] === item[0].toUpperCase() && item[1] === item[1].toUpperCase()) {
return item
}
- return item.toLowerCase()
+
+ if (index === 0) {
+ return item[0].toUpperCase() + item.slice(1)
+ }
+ // 仅处理首字母大写,别的是小写的情况
+ if (item[0] !== item[0].toLowerCase() && item.slice(1) === item.slice(1).toLowerCase()) {
+ return item[0].toLowerCase() + item.slice(1)
+ }
+ return item
}).join(' ')
return s[0].toUpperCase() + s.slice(1)
}
diff --git a/src/views/accounts/AccountTemplate/AccountTemplateList.vue b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
index 5b5a78337..4d530fb81 100644
--- a/src/views/accounts/AccountTemplate/AccountTemplateList.vue
+++ b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
@@ -38,6 +38,7 @@ export default {
},
columnsMeta: {
privileged: {
+ width: '120px',
formatterArgs: {
showText: false,
showFalse: false
diff --git a/src/views/assets/Platform/PlatformList.vue b/src/views/assets/Platform/PlatformList.vue
index 8d66254ba..86368cf87 100644
--- a/src/views/assets/Platform/PlatformList.vue
+++ b/src/views/assets/Platform/PlatformList.vue
@@ -142,6 +142,7 @@ export default {
this.headerActions.moreCreates.dropdown = this.$store.state.assets.assetCategoriesDropdown.filter(item => {
return item.category === this.tab.activeMenu
})
+ console.log('Category: ', this.headerActions.moreCreates.dropdown)
},
async setCategoriesTab() {
const categoryIcon = {