html52.com
我爱小程序-开发者交流社区

WXML是不能像html一样引入外部Script吗?

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Run for rs</title>
    <script src="./mcl.js"></script>
    <script src="./ibe.js"></script>
</head>
<body>
<button id="testIBE" onclick="runrunrun()">test</button>
</body>
</html>

其中mcl是一个提供了html调用的https://www.npmjs.com/package/mcl-wasm npm包,想确认一下在wxml中是不是不能提供类似html这样的脚本引入功能?

已查阅wxml中引用的部分https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/import.html

网友回复

拾忆:

这样写报错不很正常?

这样写报错不很正常?require被吃了?

require被吃了?

require被吃了?Hoooooo!:npm引用说明:https://developers.weixin.qq.com/miniprogram/dev/devt

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付