src/decorator/urlSync/state.js
function urlSync(urlKeyOrTarget, property, descriptor) {
  if (invokedWithArgs(arguments)) {
    let options = property
    return (target, property, descriptor) =>
      urlsync(urlKeyOrTarget || property, { ...keyMap, ...options }, target, property, descriptor)
  }

  return urlsync(property, keyMap, urlKeyOrTarget, property, descriptor)
}
function urlSync(urlKeyOrTarget, property, descriptor) {
  if (invokedWithArgs(arguments)) {
    let options = property
    return (target, property, descriptor) =>
      urlsync(urlKeyOrTarget || property, { ...keyMap, ...options }, target, property, descriptor)
  }

  return urlsync(property, keyMap, urlKeyOrTarget, property, descriptor)
}
用于同步状态至 URL
@namespace urlSync
@name urlSync
@example
class Model extends Root {
\@urlSync
\@observable sync = 'abc'
// 未使用 @observable 修饰, urlSync会自动将其转为 observable
\@urlSync('g')
value = 'abcdef'
}
@public