1

我想将数据从颤振传递到 webview

我的数据是这样定义的,

var data = {
   "id": "hweqetwyqte"
};

我在 webview 中传递如下数据,

webViewController.evaluateJavascript('''
 t._selectItem($data); // this is not working --> I want this to work
 t._selectItem({"id": "hweqetwyqte"}); // this is working
''');

任何帮助,将不胜感激!!

4

1 回答 1

-1

尝试

t._selectItem({"id": "${data['id']}}"})
于 2021-05-05T16:50:43.883 回答