Vue调用js中的函数以及数据
js文件var myfunction = {Confirm: function (ConfirmList) {console.log('123' + ConfirmList)},}export default myfunctionvue文件<template></template><script>...
·
js文件
var myfunction = {
Confirm: function (ConfirmList) {
console.log('123' + ConfirmList)
},
}
export default myfunction
vue文件
<template>
</template>
<script>
import Manager from "@/assets/js/test.js";
export default {
data() {
return {
confirmList: [],
};
},
methods: {
//确认
confirm() {
var ConfirmList = ["1","2"];
Manager.Confirm(ConfirmList)
},
} ,
} ;
</script>
<style scoped>
</style>
更多推荐
已为社区贡献12条内容
所有评论(0)