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

vscode插件不能实现文档示例,但是在线playground可以 #260

Open
neversleeppy opened this issue Jan 9, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@neversleeppy
Copy link

  • version:v1.0.55
  • playground demo:

转义前代码:

<template>
    <el-select
    v-model="selected"
    clearable
    ></el-select>
</template>

transform.js

  function transform(fileInfo, api, options) {
    const $ = api.gogocode
    const source = fileInfo.source
    const ast = $(source, { parseOptions: { language: 'vue' } })
    const template = ast.find('<template></template>')
    const script = ast.find('<script></script>')
    template.replace('<el-select clearable $$$1>$$$2</el-select>', '<el-select allowClear $$$1>$$$2</el-select>')
    return ast.generate()
  }

vscode插件没有匹配上标签,但是在线的playground可以
vscode插件:
1736435096667
在线playground:
image

@neversleeppy neversleeppy added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant