GithubHelp home page GithubHelp logo

微信支付中使用Toast about vant HOT 4 CLOSED

youzan avatar youzan commented on April 30, 2024
微信支付中使用Toast

from vant.

Comments (4)

pangxie1991 avatar pangxie1991 commented on April 30, 2024

可以的,只要引入 Toast 即可。这个和具体在什么回调函数里是无关的~

from vant.

llk2yq avatar llk2yq commented on April 30, 2024

@pangxie1991 蟹蟹,因为微信支付的success函数里访问不到当前vue实例,我的处理是在外面把this赋值给一个变量 vm,然后通过vm.xxx来访问当前实例的一些变量或者方法。按照你的意思是在success里只需要直接Toast('支付成功')就可以是吗?不需要vm.Toast或者是window.Toast什么的是吗?因为是公司项目,所以还是想确认一下,蟹蟹~

from vant.

w91 avatar w91 commented on April 30, 2024

@YYQ8023 只要

import { Toast } from 'vant'

后面就可以直接使用Toast('something')。你的问题是你那边不能在那个文件里不能把Toast import进来吗?能否具体说下你的使用场景?

from vant.

llk2yq avatar llk2yq commented on April 30, 2024

@w91 可以import,其实我主要问的是微信支付里面,因为开发过程中发现微信支付有很多坑,而且测试必须要部署之后,所以想问一下有没有在微信支付实际开发中测试可用,我等一下自己也测试一下,蟹蟹~~

from vant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.