|
[云开发]
stml使用import引入js问题
[复制链接]
测试登录,使用 import 引入了同一文件夹下的Login.js,调不到里面的方法,求助
stml 代码
<template>
<view class="page" style="margin-top:50%;width:90%;margin-left:5%;">
<!-- 输入任意文本 -->
<a-field $value="phone" label="" placeholder="请输入账号" />
<!-- 输入密码 -->
<a-field $value="pwd" label="" placeholder="请输入密码" type="password" />
<a-button type="primary" @click="testShow">登录</a-button>
</view>
</template>
<script>
import 'Login.js';
import AButton from "../../../components/act/a-button";
import AField from "../../../components/act/a-field";
export default {
name: 'mainLogin',
apiready() {
},
data() {
return {
phone: '18888888888',
pwd: '19999999999'
}
},
methods: {
testShow: function () {
var _this = this;
console.log("testShow");
testLoginShow();
}
}
}
</script>
<!-- <style src='../css/common.css' /> -->
<style>
.page {
height: 100%;
}
</style>
Login.js 代码
function testLoginShow() {
console.log("conkk()");
};
|
|