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

局部变量和 import 重名 插件转换有问题 #629

Open
imcuttle opened this issue Apr 19, 2023 · 0 comments
Open

局部变量和 import 重名 插件转换有问题 #629

imcuttle opened this issue Apr 19, 2023 · 0 comments

Comments

@imcuttle
Copy link

  • input
import * as e from 'react';
import t, { useState as n, useEffect as i, forwardRef as r, useRef as l, useImperativeHandle as o } from 'react';
import { Cascader as a, Checkbox as u, Tooltip as c, Icon as s } from 'antd';
import d from 'classnames';
import f from 'axios';

export default (p) => {
  var g = p.g,
    c = p.c;
  return () => {
    return Promise.resolve().then(() => {
      g(c ? c() : 2);
    });
  };
};
  • output
import _Tooltip from "antd/es/tooltip";
    import * as e from 'react';
    import t, { useState as n, useEffect as i, forwardRef as r, useRef as l, useImperativeHandle as o } from 'react';
    import d from 'classnames';
    import f from 'axios';
    export default (p => {
      var g = p.g,
        c = p.c;
      return () => {
        return Promise.resolve().then(() => {
         // 转换出问题!
          g(c ? _Tooltip() : 2);
        });
      };
    });
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

No branches or pull requests

1 participant