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

Taro4.0.5 PageMeta微信小程序不会编译进wxml #16900

Open
gt333 opened this issue Nov 21, 2024 · 0 comments
Open

Taro4.0.5 PageMeta微信小程序不会编译进wxml #16900

gt333 opened this issue Nov 21, 2024 · 0 comments

Comments

@gt333
Copy link

gt333 commented Nov 21, 2024

相关平台

微信小程序

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

复现步骤

按Taro 文档配置
// page.config.ts
export default definePageConfig({ enablePageMeta: true, ... })

// page.tsx
function Index () {
  return (
    <View>
     <PageMeta
       rootFontSize="100px"
     >
       <NavigationBar title={title} />
     </PageMeta>
   </View>
  )
}

期望结果

微信小程序可使用PageMeta

实际结果

标签被编译成空“”,微信小程序对应page的wxml文件显示为: <import src="../../base.wxml"/> <template is="taro_tmpl" data="{{root:root}}" />
缺少 <page-meta ><navigation/></page-meta>

环境信息

Taro v4.0.5


  Taro CLI 4.0.5 environment info:
    System:
      OS: macOS 13.3.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
      Yarn: 1.22.22 - ~/.nvm/versions/node/v18.19.0/bin/yarn
      npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.5 => 4.0.5 
      @tarojs/components: 4.0.5 => 4.0.5 
      @tarojs/helper: 4.0.5 => 4.0.5 
      @tarojs/plugin-framework-react: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-h5: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-jd: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-qq: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-swan: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-tt: 4.0.5 => 4.0.5 
      @tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5 
      @tarojs/react: 4.0.5 => 4.0.5 
      @tarojs/runtime: 4.0.5 => 4.0.5 
      @tarojs/shared: 4.0.5 => 4.0.5 
      @tarojs/taro: 4.0.5 => 4.0.5 
      @tarojs/vite-runner: 4.0.5 => 4.0.5 
      babel-preset-taro: 4.0.5 => 4.0.5 
      eslint-config-taro: 4.0.5 => 4.0.5 
      react: ^18.0.0 => 18.3.1 

@gt333 gt333 changed the title Tar4.0.5 PageMeta微信小程序不会编译进wxml Taro4.0.5 PageMeta微信小程序不会编译进wxml Nov 21, 2024
This was referenced Nov 23, 2024
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

1 participant