画布 选择卡片层级

This commit is contained in:
lzp
2026-03-02 10:44:19 +08:00
parent 7045fbe963
commit a865d189f3
8 changed files with 71 additions and 21 deletions

View File

@@ -24,6 +24,7 @@
import { computed, ref, onBeforeUnmount, inject } from 'vue'
import dropdownMenu from '@/components/dropdown-menu.vue'
import { useUserInfoStore } from '@/stores'
import { UpdateUserProfile } from '@/api/user'
import { useI18n } from 'vue-i18n'
const userInfoStore = useUserInfoStore()
const { locale } = useI18n()
@@ -41,7 +42,7 @@
{ label: 'Germany', value: 'Germany' }
])
const changeBase = (value: string) => {
console.log(value)
onSubmit({ base: value })
}
const role = ref(userInfoStore.state.userInfo.role)
@@ -53,17 +54,28 @@
{ value: 'Other', label: 'Other' }
])
const changeRole = (value: string) => {
console.log(value)
onSubmit({ role: value })
}
const agent = ref('Partner')
const agent = ref("Partner")
const agents = ref([
{ label: 'Partner', value: 'Partner' },
{ label: 'Observer', value: 'Observer' },
{ label: 'Mentor', value: 'Mentor' }
])
const changeAgent = (value: string) => {
console.log(value)
// onSubmit({ agent: value })
}
const onSubmit = (value = {}) => {
const data = {
// base: userInfoStore.state.userInfo.base,
// role: userInfoStore.state.userInfo.role,
// vibe: userInfoStore.state.userInfo.vibe,
...value
}
UpdateUserProfile(data, true)
.then((res) => {})
.catch((err) => {})
}
</script>