mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
show all and hide all columns refactored
This commit is contained in:
parent
53019058bc
commit
857cf2ff87
@ -24,16 +24,27 @@ limitations under the License. -->
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="dropdownSelector">
|
||||
<el-dropdown-item >
|
||||
<div
|
||||
style="width: 100%"
|
||||
class="flex-h items-center justify-between"
|
||||
@click="showAllColumns = true"
|
||||
>
|
||||
<el-icon><View /></el-icon>
|
||||
<span style="margin-right: 10px">Show All</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<div
|
||||
style="width: 100%"
|
||||
class="flex-h items-center justify-between"
|
||||
@click="showAllColumns = false"
|
||||
>
|
||||
<!-- <el-checkbox v-model="showAllColumns" size="large"> -->
|
||||
<span style="margin-right: 10px">Show All</span>
|
||||
<!-- </el-checkbox> -->
|
||||
<el-icon><Hide /></el-icon>
|
||||
<span style="margin-right: 10px">Hide All</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided></el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-for="item in logStore.serviceLogColumn"
|
||||
:key="item.value"
|
||||
@ -259,7 +270,7 @@ limitations under the License. -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ArrowDown } from "@element-plus/icons-vue";
|
||||
import { ArrowDown, View, Hide } from "@element-plus/icons-vue";
|
||||
import { ref, reactive, watch, computed, onMounted } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useI18n } from "vue-i18n";
|
||||
@ -366,14 +377,7 @@ function toggleColumSelector() {
|
||||
showColumList.value = !showColumList.value;
|
||||
setSearchTerm("column");
|
||||
}
|
||||
function hideColumns(column: string) {
|
||||
logStore.hideColumns(column.value);
|
||||
selectedColumns.value = [];
|
||||
}
|
||||
function showColumns(column: string) {
|
||||
logStore.showColumns(column.value);
|
||||
selectedColumns.value = [];
|
||||
}
|
||||
|
||||
function hideTags() {
|
||||
let tagsWrap = document.querySelector(".el-select__tags");
|
||||
if (!tagsWrap) return;
|
||||
@ -627,9 +631,9 @@ watch(
|
||||
watch(
|
||||
() => showAllColumns.value,
|
||||
(newVal, oldVal) => {
|
||||
console.log("New:", newVal, "Old:", oldVal)
|
||||
logStore.toggleAllColumns(newVal)
|
||||
})
|
||||
logStore.toggleAllColumns(newVal);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.dropdownSelector {
|
||||
|
Loading…
Reference in New Issue
Block a user