forked from github/dataease
refactor: 修复ai提示本地记录方式
This commit is contained in:
parent
bfa0d131f3
commit
2051674c85
@ -22,7 +22,8 @@ import AiTips from '@/layout/components/AiTips.vue'
|
|||||||
const appearanceStore = useAppearanceStoreWithOut()
|
const appearanceStore = useAppearanceStoreWithOut()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
import { useCache } from '@/hooks/web/useCache'
|
||||||
|
const { wsCache } = useCache('localStorage')
|
||||||
const aiBaseUrl = ref(null)
|
const aiBaseUrl = ref(null)
|
||||||
const handleIconClick = () => {
|
const handleIconClick = () => {
|
||||||
if (route.path === '/workbranch/index') return
|
if (route.path === '/workbranch/index') return
|
||||||
@ -65,7 +66,7 @@ const navigateBg = computed(() => appearanceStore.getNavigateBg)
|
|||||||
const navigate = computed(() => appearanceStore.getNavigate)
|
const navigate = computed(() => appearanceStore.getNavigate)
|
||||||
|
|
||||||
const initAiBase = async () => {
|
const initAiBase = async () => {
|
||||||
const aiTipsCheck = localStorage.getItem('DE-AI-TIPS-CHECK')
|
const aiTipsCheck = wsCache.get('DE-AI-TIPS-CHECK')
|
||||||
if (aiTipsCheck === 'CHECKED') {
|
if (aiTipsCheck === 'CHECKED') {
|
||||||
showOverlay.value = false
|
showOverlay.value = false
|
||||||
} else {
|
} else {
|
||||||
@ -80,7 +81,7 @@ const initAiBase = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const aiTipsConfirm = () => {
|
const aiTipsConfirm = () => {
|
||||||
localStorage.setItem('DE-AI-TIPS-CHECK', 'CHECKED')
|
wsCache.set('DE-AI-TIPS-CHECK', 'CHECKED')
|
||||||
showOverlay.value = false
|
showOverlay.value = false
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user