|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<header class="header">
|
|
|
- <button class="reset-btn" @click="goback"><i class="el-icon-arrow-left"></i>{{title || '返回作品'}}</button>
|
|
|
+ <button class="reset-btn"><i class="el-icon-arrow-left" @click="goback"></i>{{title || '返回作品'}}<i
|
|
|
+ class="el-icon-edit edit-title" @click="editTitle"></i></button>
|
|
|
<div class="tools">
|
|
|
<div class="next_return">
|
|
|
<div class="return" title="撤销" @click="revocation" :style="`opacity:${operationList.length>1?'1':'.3'}`">
|
|
@@ -127,6 +128,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ editTitle() {
|
|
|
+ console.log("编辑标题");
|
|
|
+ this.$prompt("请输入测试标题", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/,
|
|
|
+ inputErrorMessage: "测试标题不为空",
|
|
|
+ inputValue: this.title
|
|
|
+ })
|
|
|
+ .then(({ value }) => {
|
|
|
+ let param = {
|
|
|
+ id: this.shareModel.id,
|
|
|
+ title: value
|
|
|
+ };
|
|
|
+ api.saveTheme(this.shareModel).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.title = value;
|
|
|
+ } else {
|
|
|
+ this.$message.error("数据加载失败,请重试");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
notempty(arrays) {
|
|
|
for (var i = 0; i < arrays.length; i++) {
|
|
|
if (
|
|
@@ -301,6 +327,9 @@ export default {
|
|
|
padding-right: 15px;
|
|
|
flex-direction: row-reverse;
|
|
|
}
|
|
|
+ .edit-title {
|
|
|
+ padding-left: 10px;
|
|
|
+ }
|
|
|
.tools {
|
|
|
width: 100%;
|
|
|
height: 60px;
|
|
@@ -320,9 +349,9 @@ export default {
|
|
|
font-size: 16px;
|
|
|
color: rgba(100, 107, 129, 1);
|
|
|
.retutn_icon {
|
|
|
- width: 24px;
|
|
|
- height: 21px;
|
|
|
- margin-bottom: 5px;
|
|
|
+ width: 17px;
|
|
|
+ height: 14px;
|
|
|
+ margin-bottom: 8px;
|
|
|
}
|
|
|
}
|
|
|
}
|