|
|
@@ -10,7 +10,7 @@
|
|
|
<div class="right-title" v-if="editOrShow === 'edit'">
|
|
|
<span class="change-btn" v-if="!showSave" @click="openRenameDialog"><i class="iconfont icon-rename" /></span>
|
|
|
<el-button type="primary" class="preview-btn" v-if="!showSave" @click="preview">预览</el-button>
|
|
|
- <el-button type="primary" class="preview-btn" v-if="showSave" @click="autoSave">保存</el-button>
|
|
|
+ <el-button type="primary" class="preview-btn" :loading="saveLoading" v-if="showSave" @click="autoSave(); saveLoading = true">保存</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
class="preview-btn"
|
|
|
@@ -70,6 +70,7 @@ const renameVisible = ref(false);
|
|
|
const renameTitle = ref("");
|
|
|
const isPreview = computed(() => route.query.preview as string || '');
|
|
|
const fromRoute = computed(() => route.query.fromRoute ? route.query.fromRoute == 'criminal' ? 'criminal' : 'fire' : appId);
|
|
|
+const saveLoading = ref(false);
|
|
|
|
|
|
const headerTitle = computed(() => {
|
|
|
const cr: any = props.currentRecord || {};
|
|
|
@@ -129,7 +130,13 @@ const emit = defineEmits<{
|
|
|
export: [],
|
|
|
}>()
|
|
|
|
|
|
-const autoSave = throttle(() => emit('save'), 1000);
|
|
|
+const autoSave = throttle(() => {
|
|
|
+ emit('save');
|
|
|
+ // saveLoading.value = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ saveLoading.value = false;
|
|
|
+ }, 2000);
|
|
|
+}, 500);
|
|
|
|
|
|
// 导出相关状态与方法(复用 photos/index 的逻辑)
|
|
|
const isSenseLoaded = ref(true);
|