|
@@ -22,6 +22,35 @@
|
|
|
</main>
|
|
</main>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <SmartDialog
|
|
|
|
|
+ ref="dialogs"
|
|
|
|
|
+ v-for="dialog in activeDialogs"
|
|
|
|
|
+ :key="dialog.id"
|
|
|
|
|
+ :id="dialog.id"
|
|
|
|
|
+ :visible.sync="dialog.visible"
|
|
|
|
|
+ :title="dialog.title"
|
|
|
|
|
+ :defaultWidth="dialog.width || 400"
|
|
|
|
|
+ :defaultHeight="dialog.height || 300"
|
|
|
|
|
+ :center="dialog.center !== false"
|
|
|
|
|
+ :position="dialog.position"
|
|
|
|
|
+ :showClose="dialog.showClose"
|
|
|
|
|
+ :enableDblclickExpand="dialog.enableDblclickExpand"
|
|
|
|
|
+ :noPadding="dialog.noPadding"
|
|
|
|
|
+ :draggable="dialog.draggable"
|
|
|
|
|
+ :resizable="dialog.resizable"
|
|
|
|
|
+ :minWidth="dialog.minWidth"
|
|
|
|
|
+ :minHeight="dialog.minHeight"
|
|
|
|
|
+ :bringToFrontOnMousedown="dialog.bringToFrontOnMousedown"
|
|
|
|
|
+ @close="handleDialogClose(dialog.id)"
|
|
|
|
|
+ @expand="handleDialogExpand(dialog)">
|
|
|
|
|
+
|
|
|
|
|
+ <template #header v-if="dialog.headerComponent">
|
|
|
|
|
+ <component :is="dialog.headerComponent" v-bind="dialog.headerProps" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <component :is="dialog.componentName" v-bind="dialog.data" />
|
|
|
|
|
+ </SmartDialog>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -29,13 +58,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
import FullscreenToggle from '@/components/ui/FullscreenToggle.vue';
|
|
import FullscreenToggle from '@/components/ui/FullscreenToggle.vue';
|
|
|
|
|
+import SmartDialog from '@/components/ui/SmartDialog.vue';
|
|
|
|
|
+import ChangePassword from '@/components/ui/ChangePassword.vue';
|
|
|
|
|
+import dialogManager from '@/mixins/dialogManager';
|
|
|
import brand from '@/utils/brand';
|
|
import brand from '@/utils/brand';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'LoginLayout',
|
|
name: 'LoginLayout',
|
|
|
- mixins: [],
|
|
|
|
|
|
|
+ mixins: [dialogManager],
|
|
|
components: {
|
|
components: {
|
|
|
FullscreenToggle,
|
|
FullscreenToggle,
|
|
|
|
|
+ SmartDialog,
|
|
|
|
|
+ ChangePassword,
|
|
|
|
|
+ },
|
|
|
|
|
+ provide() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ dialogManager: {
|
|
|
|
|
+ openDialog: this.openDialog,
|
|
|
|
|
+ closeDialog: this.handleDialogClose,
|
|
|
|
|
+ clearDialogs: this.clearDialogs,
|
|
|
|
|
+ getDialogs: () => this.activeDialogs,
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
layoutClass: {
|
|
layoutClass: {
|
|
@@ -49,7 +93,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
-
|
|
|
|
|
|
|
+ handleDialogExpand(dialog) {
|
|
|
|
|
+ if (dialog.data && typeof dialog.data.onExpand === 'function') {
|
|
|
|
|
+ dialog.data.onExpand(dialog.data);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|