mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-20 14:37:34 +00:00
fix tab
This commit is contained in:
parent
e19e03d413
commit
5593416257
@ -22,7 +22,7 @@ export const NewControl = {
|
|||||||
i: "0",
|
i: "0",
|
||||||
type: "Widget",
|
type: "Widget",
|
||||||
widget: {
|
widget: {
|
||||||
title: "Title",
|
title: "",
|
||||||
},
|
},
|
||||||
graph: {},
|
graph: {},
|
||||||
standard: {},
|
standard: {},
|
||||||
|
@ -164,6 +164,7 @@ export const dashboardStore = defineStore({
|
|||||||
}
|
}
|
||||||
if (type === "Text") {
|
if (type === "Text") {
|
||||||
newItem.h = 6;
|
newItem.h = 6;
|
||||||
|
newItem.graph = TextConfig;
|
||||||
}
|
}
|
||||||
if (this.layout[idx].children) {
|
if (this.layout[idx].children) {
|
||||||
const items = children.map((d: LayoutConfig) => {
|
const items = children.map((d: LayoutConfig) => {
|
||||||
|
@ -121,6 +121,7 @@ import Widget from "./Widget.vue";
|
|||||||
import Trace from "./Trace.vue";
|
import Trace from "./Trace.vue";
|
||||||
import Profile from "./Profile.vue";
|
import Profile from "./Profile.vue";
|
||||||
import Log from "./Log.vue";
|
import Log from "./Log.vue";
|
||||||
|
import Text from "./Text.vue";
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
data: {
|
data: {
|
||||||
@ -131,7 +132,7 @@ const props = {
|
|||||||
};
|
};
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "Tab",
|
name: "Tab",
|
||||||
components: { Topology, Widget, Trace, Profile, Log },
|
components: { Topology, Widget, Trace, Profile, Log, Text },
|
||||||
props,
|
props,
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -59,6 +59,9 @@ export default defineComponent({
|
|||||||
function clickGrid(item: LayoutConfig) {
|
function clickGrid(item: LayoutConfig) {
|
||||||
dashboardStore.activeGridItem(item.i);
|
dashboardStore.activeGridItem(item.i);
|
||||||
dashboardStore.selectWidget(item);
|
dashboardStore.selectWidget(item);
|
||||||
|
if (item.type === "Tab") {
|
||||||
|
dashboardStore.setActiveTabIndex(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
dashboardStore.setLayout([]);
|
dashboardStore.setLayout([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user