MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / watchEffectRef

Function watchEffectRef

tech-study.js:1293–1299  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

1291 * @returns
1292 */
1293const watchEffectRef = (callback) => {
1294 // 收集依赖
1295 const effectRes = shallowRef(undefined);
1296 // 监听
1297 watchEffect(() => (effectRes.value = unref(callback())));
1298 return effectRes;
1299};
1300/**
1301 * @description 创建元素节点
1302 * @param eleName

Callers 15

watchFunction · 0.70
TipFunction · 0.70
SelectFunction · 0.70
ExamBtnFunction · 0.70
FrameFunction · 0.70
LoginItemFunction · 0.70
InfoItemFunction · 0.70
ScoreItemFunction · 0.70
TaskItemFunction · 0.70
TaskListFunction · 0.70
TaskBtnFunction · 0.70
ScheduleListFunction · 0.70

Calls 3

shallowRefFunction · 0.70
watchEffectFunction · 0.70
unrefFunction · 0.70

Tested by

no test coverage detected