taro icon indicating copy to clipboard operation
taro copied to clipboard

飞书小程序模板无法识别 Form 和 Label 标签

Open Gino2333 opened this issue 2 years ago • 6 comments

相关平台

飞书小程序

复现仓库

[email protected]:Gino2333/FerishuTaroTest.git

使用框架: React

复现步骤

使用 taro cli 创建飞书小程序项目后,向页面 index.tsx 中添加 Form 标签和 Label 标签 例如下文

      <View className='index'>
        <Text>Hello world!</Text>
        <Form>
          <Label>测试</Label>
        </Form>
      </View>

期望结果

正常展示 Form 和 Label

实际结果

未定义的模板 (tmpl_0_21) in base // 实际是 Form,并且在 base.ttml 中是 tmpl_0_20 未定义的模板 (tmpl_0_24) in base // 实际是 Label,并且在 base.ttml 中是 tmpl_0_23

环境信息

👽 Taro v3.5.8


  Taro CLI 3.5.8 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.19.2 - ~/.nvm/versions/node/v14.19.2/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v14.19.2/bin/yarn
      npm: 9.1.3 - ~/.nvm/versions/node/v14.19.2/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.8 => 3.5.8
      @tarojs/components: 3.5.8 => 3.5.8
      @tarojs/helper: 3.5.8 => 3.5.8
      @tarojs/plugin-framework-react: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-alipay: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-jd: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-qq: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-swan: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-tt: 3.5.8 => 3.5.8
      @tarojs/plugin-platform-weapp: 3.5.8 => 3.5.8
      @tarojs/react: 3.5.8 => 3.5.8
      @tarojs/router: 3.5.8 => 3.5.8
      @tarojs/runtime: 3.5.8 => 3.5.8
      @tarojs/shared: 3.5.8 => 3.5.8
      @tarojs/taro: 3.5.8 => 3.5.8
      @tarojs/taro-h5: 3.5.8 => 3.5.8
      @tarojs/webpack5-runner: 3.5.8 => 3.5.8
      babel-preset-taro: 3.5.8 => 3.5.8
      eslint-config-taro: 3.5.8 => 3.5.8
      react: ^18.0.0 => 18.2.0

补充信息

使用 3.5.8 就会出问题,降级到 webpack4 也会出问题

Gino2333 avatar Dec 08 '22 06:12 Gino2333

input 也无法识别

Gino2333 avatar Dec 08 '22 06:12 Gino2333

如何解决

summxu avatar Jan 09 '23 07:01 summxu

原因是 lark 插件里,运行时没有区分是否是 pc 环境,统一使用了 pc 的组件,导致和编译时的组件名不一致。

image

Chen-jj avatar Jan 17 '23 10:01 Chen-jj

@tarojs/[email protected] 可以解决未定义模版的问题。

changcllong avatar Jan 18 '23 03:01 changcllong

3.6.14 报 未定义的模板 (tmpl_0_13) in base

daijun123 avatar Oct 26 '23 07:10 daijun123

3.6.14 报 未定义的模板 (tmpl_0_13) in base

使用Taro Camera组件的时候就有这个问题,官方有人帮忙看下吗

zworld avatar Apr 12 '24 10:04 zworld