UNPKG

cyber-web-ui

Version:
41 lines 1.26 kB
import { createVNode as _createVNode } from "vue"; import { defineComponent, computed } from 'vue'; import Login from './Login'; import { configStore } from '../_utils/store'; import { changeLocation } from '../_utils/history'; export default defineComponent({ name: 'CLoginPage', props: { logo: String }, setup: function setup(props, _ref) { var attrs = _ref.attrs, slots = _ref.slots, emit = _ref.emit, expose = _ref.expose; var $configStore = configStore(); var logo = computed(function () { return props.logo || $configStore.loginLogo; }); var pageStyle = computed(function () { var obj = {}; if ($configStore.loginBackground) obj['background-image'] = "url(".concat($configStore.loginBackground, ")"); return obj; }); function onFinish() { changeLocation($configStore.homePath); } return function () { return _createVNode("div", { "class": "cyber-login-page", "style": pageStyle.value }, [_createVNode(Login, { "style": "margin: auto;", "onFinish": onFinish, "logo": logo.value }, null), _createVNode("div", { "class": "cyber-copyright-footer" }, [$configStore.copyright])]); }; } });