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

ShareElement demo 编译后的小程序和微信小程序原生效果不一致 #14053

Closed
smile-alive opened this issue Jun 21, 2023 · 3 comments · Fixed by #14067
Closed

ShareElement demo 编译后的小程序和微信小程序原生效果不一致 #14053

smile-alive opened this issue Jun 21, 2023 · 3 comments · Fixed by #14067
Assignees
Labels
A-docs Area - 文档相关 A-typings Area - TypeScript Typings 相关 E-easy Helper Wanted - Easy F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@smile-alive
Copy link

smile-alive commented Jun 21, 2023

相关平台

微信小程序

小程序基础库: 2.30.3
使用框架: React

复现步骤

https://docs.taro.zone/docs/components/viewContainer/share-element
copy 代码,本地运行

期望结果

动画效果和小程序原生demo效果一致

实际结果

类似于translateY的动画效果丢失,只有PageContainer的显隐动画

环境信息

  Taro CLI 3.5.11 environment info:
    System:
      OS: macOS 13.4
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.18.1 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.19.2 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.6 => 3.6.6 
      @tarojs/components: 3.6.6 => 3.6.6 
      @tarojs/helper: 3.6.6 => 3.6.6 
      @tarojs/mini-runner: 3.6.6 => 3.6.6 
      @tarojs/plugin-framework-react: 3.6.6 => 3.6.6 
      @tarojs/plugin-platform-weapp: 3.6.6 => 3.6.6 
      @tarojs/react: 3.6.6 => 3.6.6 
      @tarojs/router: 3.6.6 => 3.6.6 
      @tarojs/runtime: 3.6.6 => 3.6.6 
      @tarojs/shared: 3.6.6 => 3.6.6 
      @tarojs/taro: 3.6.6 => 3.6.6 
      @tarojs/webpack-runner: 3.6.6 => 3.6.6 
      babel-preset-taro: 3.6.6 => 3.6.6 
      eslint-config-taro: 3.6.6 => 3.6.6 
      react: ^18.0.0 => 18.2.0 
    npmGlobalPackages:
      typescript: 4.9.3
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jun 21, 2023
@TheKonka
Copy link
Member

ShareElement 的 key 换成 mapkey

@TheKonka TheKonka added A-docs Area - 文档相关 A-typings Area - TypeScript Typings 相关 labels Jun 21, 2023
@ZakaryCode ZakaryCode added the E-easy Helper Wanted - Easy label Jun 21, 2023
@TheKonka
Copy link
Member

10ff4a6#diff-6353c066b2ca7de7d2e5c6581dbc226f1060330a73322416c6b3784c909d9d64

类型我之前有加过,被机器人🤖️删了

@smile-alive
Copy link
Author

10ff4a6#diff-6353c066b2ca7de7d2e5c6581dbc226f1060330a73322416c6b3784c909d9d64

类型我之前有加过,被机器人🤖️删了

/// <reference types="@tarojs/taro" />
import '@tarojs/components';

declare namespace NodeJS {
	interface ProcessEnv {
		TARO_ENV: 'weapp' | 'swan' | 'alipay' | 'h5' | 'rn' | 'tt' | 'quickapp' | 'qq' | 'jd';
	}
}

declare module '@tarojs/components' {
	interface ShareElementProps {
		/** 映射标记
		 * @supported weapp
		 */
		mapkey?: string;
	}
}

目前先跑的本地,但是必须在global.d.ts文件手动引入import '@tarojs/components',否则@tarojs/components的类型被覆盖

TheKonka added a commit to TheKonka/taro that referenced this issue Jun 26, 2023
xuanzebin pushed a commit that referenced this issue Jun 26, 2023
#14067)

* fix(type): update params type of previewImage, add mapkey type for share-element

#14053

* fix: previewImage current prop compatible due to type change
@github-project-automation github-project-automation bot moved this from Todo to Done in Mini Program Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area - 文档相关 A-typings Area - TypeScript Typings 相关 E-easy Helper Wanted - Easy F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants