Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix the ts version selected by the user #305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huangmingfu
Copy link

  • 问题:复现demo
    我在 Vue SFC Playground 发现了一个问题,当我选择了 ts 版本号和 vue 版本号,分享链接出去的时候:
    image
    接着通过分享链接打开后,vue 版本号可以正常的选择用户保存的设置,但是 ts 的始终都是 latest
    image
    image
  • 这个 pr 是修复 ts 版本的选择,我已经在 test/main.ts 测试过,测试代码如下,辛苦审核~
const query = new URLSearchParams(location.search)
const { importMap: builtinImportMap, vueVersion } = useVueImportMap()
vueVersion.value = '3.4.0'
const store = (window.store = useStore(
  {
    builtinImportMap,
    vueVersion,
    showOutput: ref(query.has('so')),
    outputMode: ref((query.get('om') as OutputModes) || 'preview'),
    typescriptVersion: ref('4.5.2')
  },
  location.hash,
))
console.info('store', store)

image

Copy link

vercel bot commented Jan 19, 2025

@huangmingfu is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant