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

[Taro next] 使用 vue ,引入微信小程序组件 vant-weapp 时,slot 具名插槽无效,不知道正确的写法 #6522

Closed
Mikasa33 opened this issue May 30, 2020 · 3 comments
Assignees
Milestone

Comments

@Mikasa33
Copy link

问题描述

使用 vue ,引入微信小程序组件 vant-weapp 时,slot 具名插槽无效,不知道正确的写法

复现步骤

插槽的名字是 title,但是一般的写法无效,全部传入默认的插槽中了。。

<van-cell>
  <view slot="title">无效</view>
  <view>默认的 value 插槽有效</view>
</van-cell>

期望行为

请问怎么写才能正确将内容传入具名插槽?

报错信息

image

系统信息

👽 Taro v3.0.0-rc.2


  Taro CLI 3.0.0-rc.2 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.15.0 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.0.0-rc.2 => 3.0.0-rc.2 
      @tarojs/mini-runner: 3.0.0-rc.2 => 3.0.0-rc.2 
      @tarojs/runtime: 3.0.0-rc.2 => 3.0.0-rc.2 
      @tarojs/taro: 3.0.0-rc.2 => 3.0.0-rc.2 
      @tarojs/webpack-runner: 3.0.0-rc.2 => 3.0.0-rc.2 
      babel-preset-taro: 3.0.0-rc.2 => 3.0.0-rc.2 
      eslint-config-taro: 3.0.0-rc.2 => 3.0.0-rc.2

补充信息

@Mikasa33
Copy link
Author

这个问题有点严重,目前没法继续使用微信小程序组件库开发了😂

@Chen-jj
Copy link
Contributor

Chen-jj commented May 31, 2020

@Mikasa33 给个 demo 看看?

@Mikasa33
Copy link
Author

Mikasa33 commented Jun 1, 2020

@Chen-jj https://github.com/Mikasa33/taro-next-vant-weapp-demo
demo 在这里 src/pages/index/index.vue
我把另一个问题的 demo 也写进去了 #6509
麻烦您看一下了,谢谢!🙏

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

3 participants