Comments (4)
可以的,只要引入 Toast 即可。这个和具体在什么回调函数里是无关的~
from vant.
@pangxie1991 蟹蟹,因为微信支付的success函数里访问不到当前vue实例,我的处理是在外面把this赋值给一个变量 vm,然后通过vm.xxx来访问当前实例的一些变量或者方法。按照你的意思是在success里只需要直接Toast('支付成功')就可以是吗?不需要vm.Toast或者是window.Toast什么的是吗?因为是公司项目,所以还是想确认一下,蟹蟹~
from vant.
@YYQ8023 只要
import { Toast } from 'vant'
后面就可以直接使用Toast('something')。你的问题是你那边不能在那个文件里不能把Toast import进来吗?能否具体说下你的使用场景?
from vant.
@w91 可以import,其实我主要问的是微信支付里面,因为开发过程中发现微信支付有很多坑,而且测试必须要部署之后,所以想问一下有没有在微信支付实际开发中测试可用,我等一下自己也测试一下,蟹蟹~~
from vant.
Related Issues (20)
- [Feature Request] vant2长图问题 HOT 1
- [文档][email protected] 引用方式有误 HOT 2
- 使用 list 加载更多的时候会回到顶部 HOT 3
- [Feature Request] Popup + Floating Panel HOT 4
- 优化CheckBox的最大可选数属性 HOT 8
- 自定引入组件案例中基于vue-cli的vue.config.js进行配置后运行项目报ComponentsPlugin is not a function HOT 3
- calendar default mindate 在ios错误 HOT 1
- [Bug Report] van-uploader预览bug HOT 4
- 文档错误 HOT 1
- van-address-list和van-address-edit文字显示乱码 HOT 3
- [Bug Report] cdn报错 HOT 1
- 密码框和数字键盘搭配使用,华为机型出现监听bug HOT 3
- [Bug Report] ios 圆角属性 在cordava 嵌套的H5上 ,样式丢失导致的元素空白问题 HOT 3
- [Feature Request] TreeSelect 分类选择 左侧区域自定义插槽 HOT 4
- 预览图片组件,横屏显示(1232*568)的时候, 对于长图,无法显示完整图片,不能向上滑动查看 HOT 5
- showImagePreview HOT 1
- vant-tab 标签页组件进行切换的时候 active值变了 但是样式没有变化 需要点击两次 HOT 2
- [Bug Report] van-tabs 使用 sticky 后,切换 tab sticky 展示问题 HOT 6
- [Bug Report] 在钉钉内使用安卓手机上传文件名内包含%2f(/的url转义)时,上传组件没有反应 HOT 3
- v-popup中嵌套v-list,无法触发load事件 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vant.