From a2b71b3c9bbf0cf9d3e30f88dd0a77d7b422620e Mon Sep 17 00:00:00 2001 From: Fine Date: Wed, 1 Feb 2023 13:48:28 +0800 Subject: [PATCH] feat: add component --- src/views/dashboard/Edit.vue | 21 ++--------- src/views/dashboard/components/WidgetLink.vue | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 src/views/dashboard/components/WidgetLink.vue diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue index ffa79087..340b269f 100644 --- a/src/views/dashboard/Edit.vue +++ b/src/views/dashboard/Edit.vue @@ -36,14 +36,7 @@ limitations under the License. --> :destroy-on-close="true" @closed="dashboardStore.setWidgetLink(false)" > -
- - -
-
- {{ widgetLink }} - {{ t("generateLink") }} -
+ @@ -57,18 +50,18 @@ limitations under the License. --> import { useAppStoreWithOut } from "@/store/modules/app"; import Configuration from "./configuration"; import type { LayoutConfig } from "@/types/dashboard"; + import WidgetLink from "./components/WidgetLink.vue"; export default defineComponent({ name: "Dashboard", - components: { ...Configuration, GridLayout, Tool }, + components: { ...Configuration, GridLayout, Tool, WidgetLink }, setup() { const dashboardStore = useDashboardStore(); const appStore = useAppStoreWithOut(); const { t } = useI18n(); const p = useRoute().params; const layoutKey = ref(`${p.layerId}_${p.entity}_${p.name}`); - const hasDuration = ref(false); - const widgetLink = ref(""); + setTemplate(); async function setTemplate() { await dashboardStore.setDashboards(); @@ -125,8 +118,6 @@ limitations under the License. --> t, handleClick, dashboardStore, - hasDuration, - widgetLink, }; }, }); @@ -135,8 +126,4 @@ limitations under the License. --> .ds-main { overflow: auto; } - - .link { - color: #999; - } diff --git a/src/views/dashboard/components/WidgetLink.vue b/src/views/dashboard/components/WidgetLink.vue new file mode 100644 index 00000000..56a9d808 --- /dev/null +++ b/src/views/dashboard/components/WidgetLink.vue @@ -0,0 +1,37 @@ + + + +