jd-opensource / jd-opensource/taro-ui

使用vue引擎创建的微信小程序AtFloatLayout渲染不出来

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

Description

**问题描述**
使用vue引擎创建的项目,UI使用的taro-ui-vue,AtFloatLayout渲染不出来

**复现步骤**
npm i taro-ui-vue
npm run dev:weapp

```js


打开

这是内容区 随你怎么写这是内容区 随你怎么写这是内容区 随你怎么写这是内容区
随你怎么写这是内容区 随你怎么写这是内容区 随你怎么写

import { AtFloatLayout } from 'taro-ui-vue'

console.log(AtFloatLayout)

export default {
name: 'article',
data () {
return {
showComments: false
}
},
methods: {
handleClose () {
console.log('closed')
}
}
}

@import "~taro-ui-vue/dist/style/components/float-layout.scss";
.article {
padding-bottom: 108px;
}

```

**期望行为**
点击“打开”按钮弹出浮动框

**报错信息**
![image](https://user-images.githubusercontent.com/2382425/91560041-ba9f5c80-e96b-11ea-90f9-0ce4e2cb063c.png)

```
[WXML Runtime warning] ./base.wxml
Template `tmpl_1_AtFloatLayout` not found.
267 |
268 |
> 269 |
| ^
270 |
271 |
272 |
```
**系统信息**
👽 Taro v3.0.7

Taro CLI 3.0.7 environment info:
System:
OS: macOS 10.15.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/opt/node@10/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/opt/node@10/bin/npm
npmPackages:
@tarojs/components: 3.0.7 => 3.0.7
@tarojs/mini-runner: 3.0.7 => 3.0.7
@tarojs/react: ^3.0.8 => 3.0.8
@tarojs/runtime: ^3.0.7 => 3.0.7
@tarojs/taro: ^3.0.7 => 3.0.7
@tarojs/webpack-runner: 3.0.7 => 3.0.7
babel-preset-taro: 3.0.7 => 3.0.7
eslint-config-taro: 3.0.7 => 3.0.7
react: ^16.13.0 => 16.13.0

**补充信息**
package.json
```
"dependencies": {
37 "@babel/runtime": "^7.7.7",
38 "@tarojs/components": "3.0.7",
39 "@tarojs/react": "^3.0.8",
40 "@tarojs/runtime": "^3.0.7",
41 "@tarojs/taro": "^3.0.7",
42 "bufferutil": "^4.0.1",
43 "canvas": "^2.5.0",
44 "fibers": "^3.1.0",
45 "react": "^16.13.0",
46 "react-dom": "^16.13.0",
47 "taro-ui-vue": "^1.0.0-alpha.6",
48 "utf-8-validate": "^5.0.2",
49 "vue": "^2.5.0",
50 "vue-template-compiler": "^2.5.0",
51 "vuex": "^3.0.0"
52 },
```

Contributor guide

Open the contributing guide

Research direction

Start with the minimal Vue and WeChat mini-program reproduction in the issue, then inspect the AtFloatLayout entry point and package.json versions. Trace why the generated WXML cannot find tmpl_1_AtFloatLayout; the work is done when AtFloatLayout opens after tapping the button without the missing-template warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, scss
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.