Closed gthdweb closed 3 years ago
import { useTitle } from 'zcomposition'
const title = useTitle() console.log(title.value) // print current title title.value = 'Hello' // change current title
新钩子 (之前没有,新加的功能)
const messages = ref(0)
const title = computed(() => { return !messages.value ? 'No message' : ${messages.value} new messages })
${messages.value} new messages
useTitle(title)
使用场景
import { useTitle } from 'zcomposition'
const title = useTitle() console.log(title.value) // print current title title.value = 'Hello' // change current title
类型
新钩子 (之前没有,新加的功能)
参数、回调或其他补充
import { useTitle } from 'zcomposition'
const messages = ref(0)
const title = computed(() => { return !messages.value ? 'No message' :
${messages.value} new messages
})useTitle(title)