alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
7.99k stars 627 forks source link

[BUG] <style里的 gap 属性小程序编译后会消失> #2417

Closed stekovinbranturry closed 11 months ago

stekovinbranturry commented 11 months ago

⌨️

Where is the bug from?

Rax Components

Minimal code and steps to reproduce the bug

/** @jsx createElement */
import Rax, { createElement } from 'rax';
import View from 'rax-view';

const Demo = () => {
  return (
    <View style={{ flexDirection: 'row', gap: '20rpx' }}>
      <View>1</View>
      <View>2</View>
    </View>
  );
}

Current and expected behavior

H5 编译正常

image

小程序(微信+支付宝)编译后消失

image

Environment

  "dependencies": {
    "babel-runtime-jsx-plus": "^0.1.4",
    "rax": "^1.0.0",
    "rax-image": "^2.0.0",
    "rax-text": "^2.0.0",
    "rax-view": "^2.0.0",
    "universal-env": "^3.0.0"
  },

node: v16.20.2

image

build.json

{
  "inlineStyle": false,
  "targets": [
    "miniapp",
    "wechat-miniprogram",
    "bytedance-microapp"
  ],
  "miniapp": {
    "buildType": "runtime",
    "runtimeDependencies": ["/@ali\\/rxpi-/", "/@ali\\/wapi-/", "/@ali\\/rx-/",  "/@ali\\/rax-/", "/@ali\\/axpi-/"]
  },
  "wechat-miniprogram": {
    "buildType": "runtime",
    "runtimeDependencies": ["/@ali\\/rxpi-/", "/@ali\\/wapi-/", "/@ali\\/rx-/",  "/@ali\\/rax-/", "/@ali\\/axpi-/"]
  },
  "bytedance-microapp": {
    "buildType": "runtime",
    "runtimeDependencies": ["/@ali\\/rxpi-/", "/@ali\\/wapi-/", "/@ali\\/rx-/",  "/@ali\\/rax-/", "/@ali\\/axpi-/"]
  }
}

Possible solution

No response

Additional context

No response