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