|
@@ -90,7 +90,7 @@
|
|
|
$i18n.t(`edit_settings.button_name`)
|
|
|
}}</span>
|
|
|
<div style="margin-left: 16px" class="item-value">
|
|
|
- {{ item.name }}
|
|
|
+ {{ translateName(item.name) }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="edit-content-item">
|
|
@@ -225,7 +225,20 @@ export default {
|
|
|
...mapGetters({
|
|
|
info: "info",
|
|
|
}),
|
|
|
+ translateName() {
|
|
|
+ return (name) => {
|
|
|
+ switch (name) {
|
|
|
+ case "电话":
|
|
|
+ return this.$i18n.t("edit_settings.phone_short");
|
|
|
+ case "链接":
|
|
|
+ return this.$i18n.t("edit_settings.link_short");
|
|
|
+ default:
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
//1.3.1后用这个过滤中文Key
|
|
|
+ // eslint-disable-next-line vue/return-in-computed-property
|
|
|
customButton() {
|
|
|
if (this.info.customButton && this.info.customButton.length > 0) {
|
|
|
return Array.from(this.info.customButton).map((item) => {
|
|
@@ -298,6 +311,8 @@ export default {
|
|
|
console.log("current.name", current.name);
|
|
|
if (current.name.length === 0) {
|
|
|
this.editingInfo.name = item.label;
|
|
|
+ } else {
|
|
|
+ this.editingInfo.name = this.translateName(current.name);
|
|
|
}
|
|
|
},
|
|
|
},
|