feat: Implement independent mode for widgets (#221)

This commit is contained in:
Fine0830
2023-02-06 13:38:19 +08:00
committed by GitHub
parent ca38366a60
commit 224053c0f4
16 changed files with 403 additions and 16 deletions

View File

@@ -30,6 +30,13 @@ limitations under the License. -->
>
<component :is="dashboardStore.selectedGrid.type" />
</el-dialog>
<el-dialog
v-model="dashboardStore.showLinkConfig"
:destroy-on-close="true"
@closed="dashboardStore.setWidgetLink(false)"
>
<WidgetLink />
</el-dialog>
</div>
</template>
<script lang="ts">
@@ -42,16 +49,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<string>(`${p.layerId}_${p.entity}_${p.name}`);
setTemplate();
async function setTemplate() {
await dashboardStore.setDashboards();