|
|
@ -18,8 +18,30 @@
|
|
|
|
</uploader>
|
|
|
|
</uploader>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #k_pass>
|
|
|
|
|
|
|
|
<q-btn @click="prompt = true" size='sm' color='secondary'>修改</q-btn>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</crud>
|
|
|
|
</crud>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<q-dialog v-model="prompt" persistent>
|
|
|
|
|
|
|
|
<q-card style="min-width: 350px">
|
|
|
|
|
|
|
|
<q-card-section>
|
|
|
|
|
|
|
|
<div class="text-h6">请输入新密码</div>
|
|
|
|
|
|
|
|
</q-card-section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<q-card-section class="q-pt-none">
|
|
|
|
|
|
|
|
<q-input type='password' dense v-model="pass[0]" autofocus @keyup.enter="prompt = false">
|
|
|
|
|
|
|
|
</q-input>
|
|
|
|
|
|
|
|
<q-input type='password' dense v-model="pass[1]" autofocus @keyup.enter="prompt = false">
|
|
|
|
|
|
|
|
</q-input>
|
|
|
|
|
|
|
|
</q-card-section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<q-card-actions align="right" class="text-primary">
|
|
|
|
|
|
|
|
<q-btn flat label="取消" v-close-popup />
|
|
|
|
|
|
|
|
<q-btn flat label="确定" @click="reset" v-close-popup />
|
|
|
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
|
|
|
</q-card>
|
|
|
|
|
|
|
|
</q-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="newData" class="flex justify-center gap-8 mt-6">
|
|
|
|
<div v-if="newData" class="flex justify-center gap-8 mt-6">
|
|
|
|
<q-btn color="brown-5" label="回退" @click="table.reload" />
|
|
|
|
<q-btn color="brown-5" label="回退" @click="table.reload" />
|
|
|
@ -35,11 +57,13 @@ import crud from 'src/components/crud.vue';
|
|
|
|
import uploader from 'src/components/uploader';
|
|
|
|
import uploader from 'src/components/uploader';
|
|
|
|
import { useUserStore } from 'src/stores/user';
|
|
|
|
import { useUserStore } from 'src/stores/user';
|
|
|
|
import { ref } from 'vue';
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
let prompt = ref(false)
|
|
|
|
let u = useUserStore()
|
|
|
|
let u = useUserStore()
|
|
|
|
let table = ref()
|
|
|
|
let table = ref()
|
|
|
|
const keys = ref<any>([
|
|
|
|
const keys = ref<any>([
|
|
|
|
{ name: 'id', label: 'ID', editable: false },
|
|
|
|
{ name: 'id', label: 'ID', editable: false },
|
|
|
|
{ name: 'username', label: '用户名' },
|
|
|
|
{ name: 'username', label: '用户名' },
|
|
|
|
|
|
|
|
{ name: 'pass', label: '密码' },
|
|
|
|
{ name: 'nickname', label: '昵称' },
|
|
|
|
{ name: 'nickname', label: '昵称' },
|
|
|
|
{ name: 'icon', label: 'logo' },
|
|
|
|
{ name: 'icon', label: 'logo' },
|
|
|
|
{ name: 'email', label: '邮箱' },
|
|
|
|
{ name: 'email', label: '邮箱' },
|
|
|
@ -56,6 +80,17 @@ const save = () => {
|
|
|
|
msg.Warn('更新失败 ' + e)
|
|
|
|
msg.Warn('更新失败 ' + e)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
let pass = ref(['', ''])
|
|
|
|
|
|
|
|
const reset = () => {
|
|
|
|
|
|
|
|
if (pass.value[0] == '' || pass.value[1] == '') {
|
|
|
|
|
|
|
|
msg.Warn('密码不能为空')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pass.value[0] != pass.value[1]) {
|
|
|
|
|
|
|
|
msg.Warn('两次密码不一致')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped></style>
|
|
|
|
<style scoped></style>
|
|
|
|