UNPKG

@dfsj/ec-hooks

Version:

贵州东方世纪常用 hook。

20 lines (19 loc) 370 B
import { ref as c, watchEffect as r, onUnmounted as f, readonly as m } from "vue"; function s(n, o = !0) { const e = document.title, t = c(n || e); return r(() => { document.title = t.value; }), o && f(l), { title: m(t), setTitle: i }; function i(u) { t.value = u; } function l() { document.title = e; } } export { s as useTitle };