作业批改:session缓存出现莫名缓存数据bug修改
This commit is contained in:
parent
0d21b1de53
commit
1a671d7dd2
|
@ -401,7 +401,8 @@ const onClickItem = (item) => {
|
||||||
clearInterval(pollingST.value)
|
clearInterval(pollingST.value)
|
||||||
|
|
||||||
console.log('防抖开启弹窗')
|
console.log('防抖开启弹窗')
|
||||||
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
// sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||||
|
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
|
||||||
debounceOpenWin();
|
debounceOpenWin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -476,7 +476,8 @@ const debounceOpenWin = debounce(() => {
|
||||||
// 批改作业
|
// 批改作业
|
||||||
const onClickItem = (item) => {
|
const onClickItem = (item) => {
|
||||||
console.log('防抖开启弹窗')
|
console.log('防抖开启弹窗')
|
||||||
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
// sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||||
|
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
|
||||||
debounceOpenWin();
|
debounceOpenWin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -634,8 +634,9 @@ const closeDialog = () => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
// const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
|
const data = JSON.parse(localStorage.getItem('teachClassWorkItem'));
|
||||||
const data = sessionStore.get('teachClassWorkItem');
|
// const data = sessionStore.get('teachClassWorkItem');
|
||||||
|
// const data = localStorage.getItem('teachClassWorkItem');
|
||||||
console.log(data,'????????????????????' )
|
console.log(data,'????????????????????' )
|
||||||
if(data){
|
if(data){
|
||||||
openDialog(data)
|
openDialog(data)
|
||||||
|
|
|
@ -96,7 +96,8 @@ const debounceOpenWin = debounce(() => {
|
||||||
// 批改作业
|
// 批改作业
|
||||||
const onClickItem = (item) => {
|
const onClickItem = (item) => {
|
||||||
console.log('防抖开启弹窗')
|
console.log('防抖开启弹窗')
|
||||||
sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
// sessionStore.set('teachClassWorkItem', item); // 缓存点击的item
|
||||||
|
localStorage.setItem('teachClassWorkItem', JSON.stringify(item));
|
||||||
debounceOpenWin();
|
debounceOpenWin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue