jd-opensource / jd-opensource/taro-ui

使用 Calendar 报错 createSelectorQuery is not a function

Open
#1,559 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

**问题描述**
Taro 3.5.7 使用 Taro UI 3.1.0-beta.4 的 Calendar 组件,在 h5 运行时报错 createSelectorQuery is not a function

**复现步骤**

1. taro init myApp
2. 选择 React -> Typescript -> Sass -> Webpack5 -> yarn -> gitee -> 使用 taro-ui 的模板
3. 按照 Taro UI 文档,添加 AtCalendar 的使用
```

```
4. yarn dev:h5
5. 报错,如图

**期望行为**
正常

**报错信息**
![image](https://user-images.githubusercontent.com/7709602/202665805-e55cd7c6-1b5c-42c5-ab8a-cb58576ab5de.png)

**系统信息**
Taro v3.5.7

Taro CLI 3.5.7 environment info:
System:
OS: macOS 12.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.20.0 - ~/.nvm/versions/node/v14.20.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v14.20.0/bin/yarn
npm: 6.14.17 - ~/.nvm/versions/node/v14.20.0/bin/npm
npmPackages:
@tarojs/cli: 3.5.7 => 3.5.7
@tarojs/components: 3.5.7 => 3.5.7
@tarojs/helper: 3.5.7 => 3.5.7
@tarojs/plugin-framework-react: 3.5.7 => 3.5.7
@tarojs/plugin-platform-alipay: 3.5.7 => 3.5.7
@tarojs/plugin-platform-jd: 3.5.7 => 3.5.7
@tarojs/plugin-platform-qq: 3.5.7 => 3.5.7
@tarojs/plugin-platform-swan: 3.5.7 => 3.5.7
@tarojs/plugin-platform-tt: 3.5.7 => 3.5.7
@tarojs/plugin-platform-weapp: 3.5.7 => 3.5.7
@tarojs/react: 3.5.7 => 3.5.7
@tarojs/router: 3.5.7 => 3.5.7
@tarojs/runtime: 3.5.7 => 3.5.7
@tarojs/shared: 3.5.7 => 3.5.7
@tarojs/taro: 3.5.7 => 3.5.7
@tarojs/taro-h5: 3.5.7 => 3.5.7
@tarojs/webpack5-runner: 3.5.7 => 3.5.7
babel-preset-taro: 3.5.7 => 3.5.7
eslint-config-taro: 3.5.7 => 3.5.7
react: 16.x => 16.14.0
taro-ui: ^3.1.0-beta.4 => 3.1.0-beta.4

**补充信息**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.