import './LockActionItem.less'; import { defineComponent } from 'vue'; import { BasicModal, useModalInner } from '/@/components/Modal/index'; import Button from '/@/components/Button/index.vue'; import { BasicForm, useForm } from '/@/components/Form/index'; import headerImg from '/@/assets/images/header.jpg'; import { appStore } from '/@/store/modules/app'; import { userStore } from '/@/store/modules/user'; const prefixCls = 'lock-modal'; export default defineComponent({ name: 'LockModal', setup(_, { attrs }) { const [register, { closeModal }] = useModalInner(); const [registerForm, { validateFields, resetFields }] = useForm({ showActionButtonGroup: false, schemas: [ { field: 'password', label: '锁屏密码', component: 'InputPassword', required: true, }, ], }); async function lock(valid = true) { let password: string | undefined = ''; try { if (!valid) { password = undefined; } else { const values = (await validateFields()) as any; password = values.password; } closeModal(); appStore.commitLockInfoState({ isLock: true, pwd: password, }); await resetFields(); } catch (error) {} } return () => ( {() => (

{userStore.getUserInfoState.realName}

)}
); }, });