Vant lead-in component error report

vant introduces components as documents:

import { Button} from "vant";
Vue.use(Button)

can be used normally, but the introduction of Field, in the same method will prompt an error,

in addition, when using the Dialog component, it is written in the official document:
`
after the introduction of the Dialog component, the $dialog method will be automatically mounted on the prototype of Vue, and this method can be called directly within all components
`

.
import Vant from "vant";
import "vant/lib/vant-css/index.css";

Vue.use(Vant);

but when using the this.$dialog.alert ({}) method, it prompts alert alert to print this.$alert as undefined for undefined,.
what is the reason?

Supplementary Code:
previously introduced on demand, other requirements have been configured:

buttoncellfieldundefined,

dialogalert

May.11,2021

the dialog modular reference is problematic and prompts the component that it is not registered.

clipboard.png


made a mistake. The arrow function is used in the next method, and the arrow function this is determined by the context. The ordinary function in this place should point to vue

.
Menu