提交 04e92a26 编写于 作者: fxy060608's avatar fxy060608

chore: update comment

上级 732777ca
...@@ -86,7 +86,7 @@ const ssrServerRef: SSRRef = (value, key, shallow = false) => { ...@@ -86,7 +86,7 @@ const ssrServerRef: SSRRef = (value, key, shallow = false) => {
state = globalData state = globalData
} }
state[key!] = sanitise(value) state[key!] = sanitise(value)
// SSR 模式下 watchEffect 不生效 https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/apiWatch.ts#L253 // SSR 模式下 watchEffect 不生效 https://github.com/vuejs/vue-next/blob/master/packages/runtime-core/src/apiWatch.ts#L283
// 故自定义ref // 故自定义ref
return customRef((track, trigger) => { return customRef((track, trigger) => {
const customTrigger = () => (trigger(), (state[key!] = sanitise(value))) const customTrigger = () => (trigger(), (state[key!] = sanitise(value)))
......
...@@ -4,7 +4,7 @@ import { getApp } from '../framework/setup/app' ...@@ -4,7 +4,7 @@ import { getApp } from '../framework/setup/app'
export function updateDocumentTitle(title: string) { export function updateDocumentTitle(title: string) {
if (__NODE_JS__) { if (__NODE_JS__) {
// updateDocumentTitle 可能是异步调用,此时使用 useSSRContext 获取,可能没有 instance // setNavigationBarTitle 可能是异步调用,此时使用 useSSRContext 获取,可能没有 instance
const ssrContext = getApp().$.appContext.provides[ssrContextKey] const ssrContext = getApp().$.appContext.provides[ssrContextKey]
if (ssrContext) { if (ssrContext) {
ssrContext[UNI_SSR_TITLE] = title ssrContext[UNI_SSR_TITLE] = title
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册