mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
fix: edit widget config
This commit is contained in:
@@ -32,11 +32,7 @@ limitations under the License. -->
|
||||
@click="clickGrid(item)"
|
||||
:class="{ active: dashboardStore.activedGridItem === item.i }"
|
||||
>
|
||||
<component
|
||||
:is="item.type"
|
||||
:data="item"
|
||||
:active="dashboardStore.activedGridItem === item.i"
|
||||
/>
|
||||
<component :is="item.type" :data="item" />
|
||||
</grid-item>
|
||||
</grid-layout>
|
||||
</template>
|
||||
@@ -46,6 +42,7 @@ import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
import Widget from "../controls/Widget.vue";
|
||||
import Tab from "../controls/Tab.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Layout",
|
||||
components: { Widget, Tab },
|
||||
|
@@ -79,7 +79,6 @@ limitations under the License. -->
|
||||
<script lang="ts" setup>
|
||||
import { reactive } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { ElTooltip, ElCascader } from "element-plus";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import { Options, SelectOpts, EntityType, ToolIcons } from "../data";
|
||||
|
||||
@@ -113,17 +112,19 @@ function changeService(val: { value: string; label: string }) {
|
||||
function clickIcons(t: { id: string; content: string; name: string }) {
|
||||
switch (t.id) {
|
||||
case "addWidget":
|
||||
dashboardStore.addWidget();
|
||||
dashboardStore.addControl("Widget");
|
||||
break;
|
||||
case "addTab":
|
||||
dashboardStore.addTab();
|
||||
dashboardStore.addControl("Tab");
|
||||
break;
|
||||
case "addImage":
|
||||
dashboardStore.addWidget();
|
||||
dashboardStore.addControl("Image");
|
||||
break;
|
||||
case "settings":
|
||||
dashboardStore.setConfigPanel(true);
|
||||
break;
|
||||
default:
|
||||
dashboardStore.addControl("Widget");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user