miniprogram-to-uniapp icon indicating copy to clipboard operation
miniprogram-to-uniapp copied to clipboard

将 wxs 的函数调用转化为小程序字符串 "{{}}"

Open DiamondYuan opened this issue 1 year ago • 0 comments

问题描述?

目前 uniapp 转换到小程序会报错

期望的结果

假设小程序的 axml 是这样的

<import-sjs name="utils" from="./new_file.sjs"></import-sjs>
<view class="content"><image class="helo {{utils.world()}} "></image>

转换后的 uniapp 结果应该是 class="helo {{utils.world()}}"

<image class="helo {{utils.world()}}" ></image>
<script lang="sjs" module='utils' src="./new_file.sjs"></script>

通过这种方式转换,再从 uniapp 转到小程序时, sjs 仍然可以工作。

DiamondYuan avatar Dec 29 '23 08:12 DiamondYuan