码迷,mamicode.com
首页 > Web开发 > 详细

原生js和vue.js实现数据共享

时间:2020-02-14 10:42:10      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:提示   ocx   vue   from   opened   update   调用   保存   $$   

1.原生js生明全局变量

<script th:inline="javascript">
var aa="aa";
</script>

1.vue.js

<script th:inline="javascript">

var vm = new Vue({
el : "#app",
data : {
sendId : ‘‘,
versonNo : ‘‘,
update : ‘‘
},

mounted: function() {
debugger
this.sendId = response.getParameter("sendId");
this.versonNo = response.getParameter("versonNo");
this.update = response.getParameter("update");
var filePath = response.getParameter("filePath");
TANGER_OCX.BeginOpenFromURL($$pageContextPath+"/szgl/oaText/downloadText?filePath="+filePath);
aa="bb";
},
methods : {
save : function() {
TANGER_OCX.SaveToURL($$pageContextPath+"/szgl/oaText//uploadOaSendText?sendId=" + this.sendId + "&versonNo=" + this.versonNo, "upload");
$.alert(‘提示信息‘,"保存成功",function(){$.close(true);});
}


}
});
</script>

3.ntko.js调用全局变量

<script language="JScript" for="TANGER_OCX" event="OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj)">
alert(aa)
var NTKO=document.getElementById("TANGER_OCX");
console.log(NTKO);
NTKO.SetReadOnly(true);
</script>

原生js和vue.js实现数据共享

标签:提示   ocx   vue   from   opened   update   调用   保存   $$   

原文地址:https://www.cnblogs.com/zhangzhiqin/p/12306286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!