mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 11:21:29 +00:00
polish event (#506)
This commit is contained in:
@@ -44,7 +44,7 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch, onMounted, nextTick } from "vue";
|
import { ref, watch, onMounted } from "vue";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
@@ -65,11 +65,12 @@ limitations under the License. -->
|
|||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const collapsedState = ref(true);
|
const collapsedState = ref(true);
|
||||||
const originalState = ref({ h: props.data.h });
|
const originalState = ref({ h: props.data.h });
|
||||||
|
const CollapsedHeight = 2;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
collapsedState.value = props.data.eventDefaultCollapse === undefined ? true : props.data.eventDefaultCollapse;
|
collapsedState.value = props.data.eventDefaultCollapse === undefined ? true : props.data.eventDefaultCollapse;
|
||||||
if (collapsedState.value) {
|
if (collapsedState.value) {
|
||||||
dashboardStore.setConfigs({ ...props.data, ...{ h: 3 } }, props.data.i);
|
dashboardStore.setConfigs({ ...props.data, ...{ h: CollapsedHeight } }, props.data.i);
|
||||||
} else {
|
} else {
|
||||||
dashboardStore.setConfigs({ ...props.data, ...originalState.value }, props.data.i);
|
dashboardStore.setConfigs({ ...props.data, ...originalState.value }, props.data.i);
|
||||||
}
|
}
|
||||||
@@ -86,7 +87,7 @@ limitations under the License. -->
|
|||||||
dashboardStore.activeGridItem(props.data.i);
|
dashboardStore.activeGridItem(props.data.i);
|
||||||
collapsedState.value = !collapsedState.value;
|
collapsedState.value = !collapsedState.value;
|
||||||
if (collapsedState.value) {
|
if (collapsedState.value) {
|
||||||
dashboardStore.setConfigs({ ...props.data, ...{ h: 3 } });
|
dashboardStore.setConfigs({ ...props.data, ...{ h: CollapsedHeight } });
|
||||||
} else {
|
} else {
|
||||||
dashboardStore.setConfigs({ ...props.data, ...originalState.value });
|
dashboardStore.setConfigs({ ...props.data, ...originalState.value });
|
||||||
}
|
}
|
||||||
@@ -164,7 +165,7 @@ limitations under the License. -->
|
|||||||
|
|
||||||
.event-inspector {
|
.event-inspector {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 45px;
|
line-height: 30px;
|
||||||
font-size: $font-size-normal;
|
font-size: $font-size-normal;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user