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

Popup组件中的getContentStyle方法失效bug #913

Open
1 of 5 tasks
AlanSean opened this issue Nov 7, 2023 · 4 comments
Open
1 of 5 tasks

Popup组件中的getContentStyle方法失效bug #913

AlanSean opened this issue Nov 7, 2023 · 4 comments

Comments

@AlanSean
Copy link

AlanSean commented Nov 7, 2023

组件

Popup

基础库版本

  • 1.x
  • 2.x

设备机型

手机系统

  • iOS
  • Android
  • HarmonyOS

APP

组件库版本

2.14.0

预期行为

官网的右侧弹窗示例

复现步骤

<popup
  visible="{{  true }}"
  width="250"
  position="right"
  onClose="onClose">
  <view style="padding: 12px;">
    从屏幕滑出或弹出一块自定义内容区,用于展示弹窗、信息提示、选择输入、切换等内容。
  </view>
</popup>

复现 demo

example.zip

上传时也会进行报错

Hash: fbffdc13
Version: webpack 4.41.6
Time: 2617ms
Built at: 11/09/2023 4:26:43 AM
Asset       Size  Chunks  Chunk Names
appConfig.json  165 bytes          
index.html   1.59 KiB          
index.js    119 KiB       0  index
index.worker.js    132 KiB       1  index.worker
manifest.json   74 bytes          
[46] multi /tmp/miniBuilder/install-path/antcube_miniBuilderSub_antcube_0.91.4/node_modules/_@ali_antcube-build@0.91.4@@ali/antcube-build/lib/build/loader/app.js!./app.json?jsonAsESM 28 bytes {1} [built]
+ 114 hidden modules


error[Build]: node_modules/antd-mini/es/Popup/index.axml
"export '$sjs_getContentStyle' (imported as 'getContentStyle') was not found in './index.sjs?sjsType=rml'


error[Build]: node_modules/antd-mini/es/Popup/index.axml
"export '$sjs_getContentStyle' (imported as 'getContentStyle') was not found in './index.sjs?sjsType=rml'


build error

reportBuildRecord res 200
[ERROR] 构建失败:
==============================
fork fail(1):
/usr/local/bin/node

"export '$sjs_getContentStyle' (imported as 'getContentStyle') was not found in './index.sjs?sjsType=rml'
"export '$sjs_getContentStyle' (imported as 'getContentStyle') was not found in './index.sjs?sjsType=rml'

构建失败


@DiamondYuan
Copy link
Collaborator

请问你指的是 antd-mini npm 包的代码,还是 master 的代码?

@DiamondYuan
Copy link
Collaborator

<import-sjs from="./helper.sjs"  name="{ a}"/>
<view>{{a()}}</view>

 const a = ()=>"123"

export default {a}

源码里已经改成了 import utils from './index.sjs';
如果是 2.14.0 , 实际上也是有效的。

@AlanSean
Copy link
Author

AlanSean commented Nov 7, 2023

我多次尝试,最后发现是在mini.project.json中开启了“treeShaking“才出现的这个bug

@AlanSean
Copy link
Author

AlanSean commented Nov 7, 2023

example.zip
这个是demo

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

2 participants