Browse Source

重置密码

master
laishajiang 2 years ago
parent
commit
950d7e4564
  1. 14
      src/layout/components/Header.vue

14
src/layout/components/Header.vue

@ -13,7 +13,7 @@
</section> </section>
</header> </header>
<ul class="userinfo-dropdown" v-if="dropdownShow"> <ul class="userinfo-dropdown" v-if="dropdownShow">
<li class="flex gap v-center" > <li class="flex gap v-center" @click="handleEdit">
<icon name="el-icon-Lock" :size="22" /> <icon name="el-icon-Lock" :size="22" />
<span>修改密码</span> <span>修改密码</span>
</li> </li>
@ -22,14 +22,22 @@
<span>退出登录</span> <span>退出登录</span>
</li> </li>
</ul> </ul>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" @close="showEdit = false" />
</template> </template>
<script setup> <script lang="ts" setup>
import NoticeMessage from "./NoticeMessage.vue"; import NoticeMessage from "./NoticeMessage.vue";
import useUserStore from "@/stores/modules/user"; import useUserStore from "@/stores/modules/user";
import EditPopup from './edit.vue'
const userStore = useUserStore(); const userStore = useUserStore();
const dropdownShow = ref(false) const dropdownShow = ref(false)
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
const showEdit = ref(false)
const handleEdit = async () => {
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
}
document.addEventListener("click", () => { document.addEventListener("click", () => {
dropdownShow.value = false; dropdownShow.value = false;
}) })

Loading…
Cancel
Save