99false;
1010
1111// 接口参数、回调或者返回值
12+ true;
1213false;
1314false;
1415false;
1516false;
16- false;
17- false;
17+ true;
1818
1919// 组件的属性
2020true;
@@ -42,34 +42,34 @@ Taro.noop();"
4242` ;
4343
4444exports [` babel-plugin-transform-taroapi should not go wrong when using an api twice 1` ] = `
45- "import Taro from '@tarojs/taro-h5';
46- const animation = Taro.createAnimation ({
45+ "import Taro, { createAnimation as _createAnimation } from '@tarojs/taro-h5';
46+ const animation = _createAnimation ({
4747 duration : dura * 1000 ,
4848 timingFunction : ' linear'
4949} );
50- const resetAnimation = Taro.createAnimation ({
50+ const resetAnimation = _createAnimation ({
5151 duration : 0 ,
5252 timingFunction : ' linear'
5353} );"
5454` ;
5555
5656exports [` babel-plugin-transform-taroapi should not import taro duplicity 1` ] = `
57- "import Taro from '@tarojs/taro-h5';
57+ "import Taro, { createAnimation as _createAnimation , initPxTransform as _initPxTransform } from '@tarojs/taro-h5';
5858Taro.Component;
59- Taro.createAnimation ();
60- Taro.initPxTransform ();"
59+ _createAnimation ();
60+ _initPxTransform ();"
6161` ;
6262
6363exports [` babel-plugin-transform-taroapi should preserve assignments in left hands 1` ] = `
64- "import Taro from '@tarojs/taro-h5';
64+ "import Taro, { createAnimation as _createAnimation , request as _request } from '@tarojs/taro-h5';
6565let animation;
66- animation = Taro.createAnimation ({
66+ animation = _createAnimation ({
6767 transformOrigin : " 50% 50%" ,
6868 duration : 1000 ,
6969 timingFunction : " ease" ,
7070 delay : 0
7171} );
72- Taro.request ();
72+ _request ();
7373Taro.request = '';
7474Taro['request'] = '';"
7575` ;
@@ -86,11 +86,11 @@ export class Connected extends Taro.Component {}"
8686` ;
8787
8888exports [` babel-plugin-transform-taroapi should work! 1` ] = `
89- "import Taro from '@tarojs/taro-h5';
90- Taro.initPxTransform (Taro.param);
91- Taro.initPxTransform ();
92- Taro.initPxTransform ();
93- Taro['getStorage'] ();
94- Taro.setStorage ();
89+ "import Taro, { setStorage as _setStorage , initPxTransform as _initPxTransform , getStorage as _getStorage } from '@tarojs/taro-h5';
90+ _initPxTransform (Taro.param);
91+ _initPxTransform ();
92+ _initPxTransform ();
93+ _getStorage ();
94+ _setStorage ();
9595export { Taro } ;"
9696` ;
0 commit comments