小编Shr*_*shi的帖子

使用 vee-validate 在 vue js 中验证有错误

我想在 vuejs 中进行验证,因为我正在使用 vee-validate

  • 我的 vue js 版本是 2.6.10
  • 并安装 run -npm install vee-validate

我在 main.ts 中声明:

import  VeeValidate  from "vee-validate";
Vue.use(VeeValidate);
Run Code Online (Sandbox Code Playgroud)

但有错误

“在 'vee-validate' 中未找到导出 'default'(导入为 'VeeValidate')

还有在控制台上:

无法读取 Function.Vue.use 处未定义的属性“安装”

vue.js

8
推荐指数
2
解决办法
9109
查看次数

为什么 axios get 方法请求发送两次?

在此处输入图片说明我运行 axios get 方法来调用 php 脚本。但是请求发送两次如何解决这个问题。我的功能:-

   axios.get('http://13.233.179.174/customers_log.php',{
                  headers: {
                    'Access-Control-Allow-Origin': '*'
                  },
                })
                  .then(function (response) {
                    $("#spinner").hide();
                    console.log('this is response work');
                    console.log(response.data);
                  })
                  .catch(function (error) {
                    $("#spinner").hide();
                    console.log(error);
                  })
Run Code Online (Sandbox Code Playgroud)

vue.js

4
推荐指数
1
解决办法
6445
查看次数

如何从vue js中的url中删除hasbang

我想从 vue js 中的 url 中删除 hashbang 我正在尝试 mode:'history', hashbang:false, history:true, linkActiveClass: "active", 但仍然在 url 中获取哈希

vue.js

3
推荐指数
1
解决办法
3638
查看次数

标签 统计

vue.js ×3