|
|
@@ -13,7 +13,8 @@
|
|
|
</div>
|
|
|
<div class="flex-1"></div>
|
|
|
<el-button @click="preview()">保存并预览</el-button>
|
|
|
- <el-button @click="save()" :loading="loading">保存</el-button>
|
|
|
+ <el-button @click="save()">保存</el-button>
|
|
|
+ <!-- :loading="loading" -->
|
|
|
</el-header>
|
|
|
<div class="full-container flex flex-row flex-1 bg-page">
|
|
|
<div class="component-list w-[192px]">
|
|
|
@@ -275,10 +276,12 @@ const handleChange = (val: string[]) => {};
|
|
|
const goBack = () => {};
|
|
|
|
|
|
// 预览
|
|
|
-const preview = () => {};
|
|
|
+const preview = () => {
|
|
|
+ save(1);
|
|
|
+};
|
|
|
|
|
|
// 保存
|
|
|
-const save = () => {
|
|
|
+const save = (type?: number) => {
|
|
|
const datas: any = {
|
|
|
name: diyStore.name,
|
|
|
siteId: '',
|
|
|
@@ -302,6 +305,9 @@ const save = () => {
|
|
|
message: '保存成功~',
|
|
|
type: 'success'
|
|
|
});
|
|
|
+ if (type == 1) {
|
|
|
+ window.open('/diy/pcdiy?id=' + res.data.id);
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {});
|