af-mobile-client-vue3 1.4.6 → 1.4.7-cs

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.4.6",
4
+ "version": "1.4.7-cs",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -4,7 +4,7 @@ import type { BaseUser, ConfigItem } from './types'
4
4
  import useLoading from '@af-mobile-client-vue3/hooks/useLoading'
5
5
  import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
6
6
  import { Button as VanButton, Empty as VanEmpty, Icon as VanIcon, Loading as VanLoading } from 'vant'
7
- import { computed, ref, watch } from 'vue'
7
+ import { computed, onActivated, ref, watch } from 'vue'
8
8
  import { useRouter } from 'vue-router'
9
9
  import InfoDisplay from '../InfoDisplay/index.vue'
10
10
  import { getCacheUserDetail, getRecentBusinessTime } from './api'
@@ -214,6 +214,15 @@ function printProfile() {
214
214
  // 同时触发自定义打印事件
215
215
  emit('print', user.value)
216
216
  }
217
+ // 防止操作员办完业务从业务办理返回到此页面再点击业务办理这里需要在进入页面时调用刷新数据
218
+ onActivated(async () => {
219
+ console.log('进入页面(已缓存)')
220
+ // 可在这里刷新数据、重置状态等
221
+ await fetchUserDetail()
222
+ if (props.showRecentTime) {
223
+ await fetchRecentRecord()
224
+ }
225
+ })
217
226
 
218
227
  // 监听用户ID变化
219
228
  watch(() => props.userInfoId, async (newId) => {
@@ -620,7 +620,7 @@ function onCalendarConfirm(values) {
620
620
  // js 函数作为数据源
621
621
  async function updateOptions() {
622
622
  if (attr.keyName && (attr.keyName.toString().includes('async ') || attr.keyName.toString().includes('function '))) {
623
- option.value = await executeStrFunctionByContext(this, attr.keyName, [props.form, runLogic, props.mode, getConfigByNameAsync, post])
623
+ option.value = await executeStrFunctionByContext(currInst, attr.keyName, [props.form, runLogic, props.mode, getConfigByNameAsync, post])
624
624
  }
625
625
  }
626
626