update tool

This commit is contained in:
Qiuxia Fan 2022-03-31 19:49:34 +08:00
parent ad99e3a4f5
commit f2b381d463

View File

@ -99,7 +99,7 @@ limitations under the License. -->
</template> </template>
</el-dropdown> </el-dropdown>
<el-tooltip content="Apply" placement="bottom"> <el-tooltip content="Apply" placement="bottom">
<i> <i @click="applyDashboard">
<Icon class="icon-btn" size="sm" iconName="save" /> <Icon class="icon-btn" size="sm" iconName="save" />
</i> </i>
</el-tooltip> </el-tooltip>
@ -120,8 +120,7 @@ limitations under the License. -->
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, ref, unref } from "vue"; import { reactive, ref } from "vue";
import { ClickOutside as vClickOutside } from "element-plus";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { useDashboardStore } from "@/store/modules/dashboard"; import { useDashboardStore } from "@/store/modules/dashboard";
import { useAppStoreWithOut } from "@/store/modules/app"; import { useAppStoreWithOut } from "@/store/modules/app";
@ -357,13 +356,13 @@ function changeMode() {
ElMessage.warning(t("viewWarning")); ElMessage.warning(t("viewWarning"));
} }
async function applyDashboard() {
loading.value = true;
await dashboardStore.saveDashboard();
loading.value = false;
}
async function clickIcons(t: { id: string; content: string; name: string }) { async function clickIcons(t: { id: string; content: string; name: string }) {
if (t.id === "apply") {
loading.value = true;
await dashboardStore.saveDashboard();
loading.value = false;
return;
}
if ( if (
dashboardStore.selectedGrid && dashboardStore.selectedGrid &&
dashboardStore.selectedGrid.type === "Tab" dashboardStore.selectedGrid.type === "Tab"
@ -561,6 +560,7 @@ function searchDestPods(query: string) {
.tools { .tools {
justify-content: space-between; justify-content: space-between;
height: auto;
} }
.icon-btn { .icon-btn {