docs: update function component import path

This commit is contained in:
chenjiahan 2022-07-23 22:40:37 +08:00
parent f888e77cd2
commit 7e84eb5bd1
4 changed files with 8 additions and 8 deletions

View File

@ -83,7 +83,7 @@ Page({
``` ```
```js ```js
import Toast from 'path/to/vant-weapp/dist/toast/toast'; import Toast from '@vant/weapp/dist/toast/toast';
Page({ Page({
onClick() { onClick() {

View File

@ -25,7 +25,7 @@
``` ```
```javascript ```javascript
import Dialog from 'path/to/@vant/weapp/dist/dialog/dialog'; import Dialog from '@vant/weapp/dist/dialog/dialog';
Dialog.alert({ Dialog.alert({
title: '标题', title: '标题',
@ -50,7 +50,7 @@ Dialog.alert({
``` ```
```javascript ```javascript
import Dialog from 'path/to/@vant/weapp/dist/dialog/dialog'; import Dialog from '@vant/weapp/dist/dialog/dialog';
Dialog.confirm({ Dialog.confirm({
title: '标题', title: '标题',
@ -73,7 +73,7 @@ Dialog.confirm({
``` ```
```javascript ```javascript
import Dialog from 'path/to/@vant/weapp/dist/dialog/dialog'; import Dialog from '@vant/weapp/dist/dialog/dialog';
Dialog.alert({ Dialog.alert({
title: '标题', title: '标题',
@ -100,7 +100,7 @@ Dialog.alert({
``` ```
```javascript ```javascript
import Dialog from 'path/to/@vant/weapp/dist/dialog/dialog'; import Dialog from '@vant/weapp/dist/dialog/dialog';
const beforeClose = (action) => new Promise((resolve) => { const beforeClose = (action) => new Promise((resolve) => {
setTimeout(() => { setTimeout(() => {

View File

@ -19,7 +19,7 @@
### 基础用法 ### 基础用法
```js ```js
import Notify from 'path/to/@vant/weapp/dist/notify/notify'; import Notify from '@vant/weapp/dist/notify/notify';
Notify('通知内容'); Notify('通知内容');
``` ```

View File

@ -23,7 +23,7 @@
``` ```
```javascript ```javascript
import Toast from 'path/to/@vant/weapp/dist/toast/toast'; import Toast from '@vant/weapp/dist/toast/toast';
Page({ Page({
data: { data: {
@ -62,7 +62,7 @@ Page({
``` ```
```javascript ```javascript
import Toast from 'path/to/@vant/weapp/dist/toast/toast'; import Toast from '@vant/weapp/dist/toast/toast';
Page({ Page({
data: { data: {