Skip to content

Commit a3beb44

Browse files
author
piexlmax
committed
1 parent ba98288 commit a3beb44

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

web/src/pinia/modules/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const useUserStore = defineStore('user', () => {
122122
return userInfo.activeColor
123123
})
124124

125-
watch(token, () => {
125+
watch(() => token.value, () => {
126126
window.localStorage.setItem('token', token.value)
127127
})
128128

web/src/view/example/breakpoint/breakpoint.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const sliceFile = () => {
140140
})
141141
}
142142
143-
watch(waitNum, () => { percentage.value = Math.floor(((formDataList.value.length - waitNum.value) / formDataList.value.length) * 100) })
143+
watch(() => waitNum.value, () => { percentage.value = Math.floor(((formDataList.value.length - waitNum.value) / formDataList.value.length) * 100) })
144144
145145
const upLoadFileSlice = async(item) => {
146146
// 切片上传

web/src/view/layout/aside/historyComponent/history.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const removeTab = (tab) => {
217217
const index = historys.value.findIndex(
218218
(item) => getFmtString(item) === tab
219219
)
220-
if (getFmtString(route) === tab) {
220+
if (getFmtString(route) === tab) {
221221
if (historys.value.length === 1) {
222222
router.push({ name: defaultRouter.value })
223223
} else {
@@ -239,7 +239,7 @@ const removeTab = (tab) => {
239239
historys.value.splice(index, 1)
240240
}
241241
242-
watch(contextMenuVisible, () => {
242+
watch(() => contextMenuVisible.value, () => {
243243
if (contextMenuVisible.value) {
244244
document.body.addEventListener('click', () => {
245245
contextMenuVisible.value = false
@@ -251,15 +251,15 @@ watch(contextMenuVisible, () => {
251251
}
252252
})
253253
254-
watch(route, (to, now) => {
254+
watch(() => route, (to, now) => {
255255
if (to.name === 'Login' || to.name === 'Reload') {
256256
return
257257
}
258258
historys.value = historys.value.filter((item) => !item.meta.closeTab)
259259
setTab(to)
260260
sessionStorage.setItem('historys', JSON.stringify(historys.value))
261261
activeValue.value = window.sessionStorage.getItem('activeValue')
262-
})
262+
}, { deep: true })
263263
264264
watch(() => historys.value, () => {
265265
sessionStorage.setItem('historys', JSON.stringify(historys.value))

web/src/view/layout/aside/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ getTheme()
8383
const active = ref('')
8484
watch(() => route, () => {
8585
active.value = route.name
86-
})
86+
}, { deep: true })
8787
8888
watch(() => userStore.sideMode, () => {
8989
getTheme()

web/src/view/superAdmin/user/user.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ const getTableData = async() => {
193193
}
194194
}
195195
196-
watch(tableData, () => {
196+
watch(() => tableData.value, () => {
197197
setAuthorityIds()
198198
})
199199

0 commit comments

Comments
 (0)