mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
docs(quickstart): rename vant-weapp to @vant/weapp
This commit is contained in:
parent
c73bc5d3c4
commit
5ae6d1a146
@ -10,13 +10,13 @@
|
||||
|
||||
```bash
|
||||
# 通过 npm 安装
|
||||
npm i vant-weapp -S --production
|
||||
npm i @vant/weapp -S --production
|
||||
|
||||
# 通过 yarn 安装
|
||||
yarn add vant-weapp --production
|
||||
yarn add @vant/weapp --production
|
||||
|
||||
# 安装 1.0-beta 版本
|
||||
npm i @vant/weapp -S --production
|
||||
# 安装 0.x 版本
|
||||
npm i vant-weapp -S --production
|
||||
```
|
||||
|
||||
### 步骤二 构建 npm 包
|
||||
@ -29,12 +29,12 @@ npm i @vant/weapp -S --production
|
||||
|
||||
### 引入组件
|
||||
|
||||
以 Button 组件为例,只需要在`app.json`或`index.json`中配置 Button 对应的路径即可。如果你是通过下载源代码的方式使用 vant-weapp,请将路径修改为项目中 vant-weapp 所在的目录。
|
||||
以 Button 组件为例,只需要在`app.json`或`index.json`中配置 Button 对应的路径即可。如果你是通过下载源代码的方式使用 @vant/weapp,请将路径修改为项目中 @vant/weapp 所在的目录。
|
||||
|
||||
```json
|
||||
// app.json
|
||||
"usingComponents": {
|
||||
"van-button": "vant-weapp/button"
|
||||
"van-button": "@vant/weapp/button"
|
||||
}
|
||||
```
|
||||
|
||||
@ -56,7 +56,7 @@ npm install
|
||||
|
||||
# 执行组件编译
|
||||
npm run dev
|
||||
|
||||
|
||||
```
|
||||
|
||||
接着打开微信开发者工具,导入`example`目录的项目就可以预览示例了。
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-action-sheet": "path/to/vant-weapp/dist/action-sheet/index"
|
||||
"van-action-sheet": "path/to/@vant/weapp/dist/action-sheet/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -85,8 +85,8 @@ Page({
|
||||
设置`cancel-text`属`性后,会在底部展示取消按钮,点击后关闭当前菜单
|
||||
|
||||
```html
|
||||
<van-action-sheet
|
||||
show="{{ show }}"
|
||||
<van-action-sheet
|
||||
show="{{ show }}"
|
||||
actions="{{ actions }}"
|
||||
cancel-text="取消"
|
||||
/>
|
||||
@ -98,7 +98,7 @@ Page({
|
||||
|
||||
```html
|
||||
<van-action-sheet
|
||||
show="{{ show }}"
|
||||
show="{{ show }}"
|
||||
:actions="actions"
|
||||
description="这是一段描述信息"
|
||||
/>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-area": "path/to/vant-weapp/dist/area/index"
|
||||
"van-area": "path/to/@vant/weapp/dist/area/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-button": "path/to/vant-weapp/dist/button/index"
|
||||
"van-button": "path/to/@vant/weapp/dist/button/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-card": "path/to/vant-weapp/dist/card/index"
|
||||
"van-card": "path/to/@vant/weapp/dist/card/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-cell": "path/to/vant-weapp/dist/cell/index",
|
||||
"van-cell-group": "path/to/vant-weapp/dist/cell-group/index"
|
||||
"van-cell": "path/to/@vant/weapp/dist/cell/index",
|
||||
"van-cell-group": "path/to/@vant/weapp/dist/cell-group/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-checkbox": "path/to/vant-weapp/dist/checkbox/index",
|
||||
"van-checkbox-group": "path/to/vant-weapp/dist/checkbox-group/index"
|
||||
"van-checkbox": "path/to/@vant/weapp/dist/checkbox/index",
|
||||
"van-checkbox-group": "path/to/@vant/weapp/dist/checkbox-group/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-circle": "path/to/vant-weapp/dist/circle/index"
|
||||
"van-circle": "path/to/@vant/weapp/dist/circle/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,8 +10,8 @@ Layout 提供了`van-row`和`van-col`两个组件来进行行列布局
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-row": "path/to/vant-weapp/dist/row/index",
|
||||
"van-col": "path/to/vant-weapp/dist/col/index"
|
||||
"van-row": "path/to/@vant/weapp/dist/row/index",
|
||||
"van-col": "path/to/@vant/weapp/dist/col/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-collapse": "path/to/vant-weapp/dist/collapse/index",
|
||||
"van-collapse-item": "path/to/vant-weapp/dist/collapse-item/index"
|
||||
"van-collapse": "path/to/@vant/weapp/dist/collapse/index",
|
||||
"van-collapse-item": "path/to/@vant/weapp/dist/collapse-item/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Vant 中默认包含了一些常用样式,可以直接通过 className 的方
|
||||
在 app.wxss 中引入内置样式
|
||||
|
||||
```css
|
||||
@import "path/to/vant-weapp/dist/common/index.wxss";
|
||||
@import "path/to/@vant/weapp/dist/common/index.wxss";
|
||||
```
|
||||
|
||||
## 代码演示
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-count-down": "path/to/vant-weapp/dist/count-down/index"
|
||||
"van-count-down": "path/to/@vant/weapp/dist/count-down/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-datetime-picker": "path/to/vant-weapp/dist/datetime-picker/index"
|
||||
"van-datetime-picker": "path/to/@vant/weapp/dist/datetime-picker/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-dialog": "path/to/vant-weapp/dist/dialog/index"
|
||||
"van-dialog": "path/to/@vant/weapp/dist/dialog/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
```
|
||||
|
||||
```javascript
|
||||
import Dialog from 'path/to/vant-weapp/dist/dialog/dialog';
|
||||
import Dialog from 'path/to/@vant/weapp/dist/dialog/dialog';
|
||||
|
||||
Dialog.alert({
|
||||
title: '标题',
|
||||
@ -130,7 +130,7 @@ Page({
|
||||
|
||||
通过函数调用 Dialog 时,支持传入以下选项:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| title | 标题 | *string* | - | - |
|
||||
| width | 弹窗宽度,默认单位为`px` | *string \| number* | `320px` | 1.0.0 |
|
||||
@ -228,4 +228,4 @@ Page({
|
||||
|
||||
| 名称 | 说明 |
|
||||
|-----------|-----------|
|
||||
| title | 自定义`title`显示内容,如果设置了`title`属性则不生效 |
|
||||
| title | 自定义`title`显示内容,如果设置了`title`属性则不生效 |
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-divider": "path/to/vant-weapp/dist/divider/index"
|
||||
"van-divider": "path/to/@vant/weapp/dist/divider/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-dropdown-menu": "path/to/vant-weapp/dist/dropdown-menu/index",
|
||||
"van-dropdown-item": "path/to/vant-weapp/dist/dropdown-item/index"
|
||||
"van-dropdown-menu": "path/to/@vant/weapp/dist/dropdown-menu/index",
|
||||
"van-dropdown-item": "path/to/@vant/weapp/dist/dropdown-item/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -176,4 +176,4 @@ Page({
|
||||
| ----- | ------------------------------------------ | ------------------ |
|
||||
| text | 文字 | *string* |
|
||||
| value | 标识符 | *string \| number* |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | *string* |
|
||||
| icon | 左侧图标名称或图片链接,可选值见 Icon 组件 | *string* |
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-field": "path/to/vant-weapp/dist/field/index"
|
||||
"van-field": "path/to/@vant/weapp/dist/field/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -155,7 +155,7 @@ Page({
|
||||
|
||||
同时 `placeholder-style` 对 `vertical-align`、`line-height` 等大量css属性都不生效。
|
||||
|
||||
这一系列的问题导致了 placeholder 在真机上可能会出现偏移。vant-weapp 已经尽量抹平 textarea 在不同环境下的差异。
|
||||
这一系列的问题导致了 placeholder 在真机上可能会出现偏移。@vant/weapp 已经尽量抹平 textarea 在不同环境下的差异。
|
||||
|
||||
微信已经将 `padding` 的问题列为修复中的问题,可以查看[微信开放社区](https://developers.weixin.qq.com/community/develop/issue/96)
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-goods-action": "path/to/vant-weapp/dist/goods-action/index",
|
||||
"van-goods-action-icon": "path/to/vant-weapp/dist/goods-action-icon/index",
|
||||
"van-goods-action-button": "path/to/vant-weapp/dist/goods-action-button/index"
|
||||
"van-goods-action": "path/to/@vant/weapp/dist/goods-action/index",
|
||||
"van-goods-action-icon": "path/to/@vant/weapp/dist/goods-action-icon/index",
|
||||
"van-goods-action-button": "path/to/@vant/weapp/dist/goods-action-button/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-grid": "path/to/vant-weapp/dist/grid/index",
|
||||
"van-grid-item": "path/to/vant-weapp/dist/grid-item/index"
|
||||
"van-grid": "path/to/@vant/weapp/dist/grid/index",
|
||||
"van-grid-item": "path/to/@vant/weapp/dist/grid-item/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-icon": "path/to/vant-weapp/dist/icon/index"
|
||||
"van-icon": "path/to/@vant/weapp/dist/icon/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-image": "path/to/vant-weapp/dist/image/index"
|
||||
"van-image": "path/to/@vant/weapp/dist/image/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-index-bar": "path/to/vant-weapp/dist/van-index-bar/index",
|
||||
"van-index-anchor": "path/to/vant-weapp/dist/van-index-anchor/index"
|
||||
"van-index-bar": "path/to/@vant/weapp/dist/van-index-bar/index",
|
||||
"van-index-anchor": "path/to/@vant/weapp/dist/van-index-anchor/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -109,4 +109,4 @@ Page({
|
||||
|
||||
| 名称 | 说明 |
|
||||
|------|------|
|
||||
| default | 锚点位置显示内容,默认为索引字符 |
|
||||
| default | 锚点位置显示内容,默认为索引字符 |
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-loading": "path/to/vant-weapp/dist/loading/index"
|
||||
"van-loading": "path/to/@vant/weapp/dist/loading/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
| text-size | 文字大小,默认单位为为 `px` | *string \| number* | `14px` | 1.0.0 |
|
||||
| vertical | 是否垂直排列图标和文字内容 | *boolean* | `false` | 1.0.0 |
|
||||
|
||||
### Slots
|
||||
### Slots
|
||||
|
||||
| 名称 | 说明 |
|
||||
| --- | --- |
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-nav-bar": "path/to/vant-weapp/dist/nav-bar/index"
|
||||
"van-nav-bar": "path/to/@vant/weapp/dist/nav-bar/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-notice-bar": "path/to/vant-weapp/dist/notice-bar/index"
|
||||
"van-notice-bar": "path/to/@vant/weapp/dist/notice-bar/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-notify": "path/to/vant-weapp/dist/notify/index"
|
||||
"van-notify": "path/to/@vant/weapp/dist/notify/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
### 基础用法
|
||||
|
||||
```js
|
||||
import Notify from 'path/to/vant-weapp/dist/notify/notify';
|
||||
import Notify from 'path/to/@vant/weapp/dist/notify/notify';
|
||||
|
||||
Notify('通知内容');
|
||||
```
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-overlay": "path/to/vant-weapp/dist/overlay/index"
|
||||
"van-overlay": "path/to/@vant/weapp/dist/overlay/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-panel": "path/to/vant-weapp/dist/panel/index"
|
||||
"van-panel": "path/to/@vant/weapp/dist/panel/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-picker": "path/to/vant-weapp/dist/picker/index"
|
||||
"van-picker": "path/to/@vant/weapp/dist/picker/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
```
|
||||
|
||||
```javascript
|
||||
import Toast from 'path/to/vant-weapp/dist/toast/toast';
|
||||
import Toast from 'path/to/@vant/weapp/dist/toast/toast';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@ -61,7 +61,7 @@ Page({
|
||||
```
|
||||
|
||||
```javascript
|
||||
import Toast from 'path/to/vant-weapp/dist/toast/toast';
|
||||
import Toast from 'path/to/@vant/weapp/dist/toast/toast';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-popup": "path/to/vant-weapp/dist/popup/index"
|
||||
"van-popup": "path/to/@vant/weapp/dist/popup/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-progress": "path/to/vant-weapp/dist/progress/index"
|
||||
"van-progress": "path/to/@vant/weapp/dist/progress/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-radio": "path/to/vant-weapp/dist/radio/index",
|
||||
"van-radio-group": "path/to/vant-weapp/dist/radio-group/index"
|
||||
"van-radio": "path/to/@vant/weapp/dist/radio/index",
|
||||
"van-radio-group": "path/to/@vant/weapp/dist/radio-group/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-rate": "path/to/vant-weapp/dist/rate/index"
|
||||
"van-rate": "path/to/@vant/weapp/dist/rate/index"
|
||||
}
|
||||
```
|
||||
## 代码演示
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-search": "path/to/vant-weapp/dist/search/index"
|
||||
"van-search": "path/to/@vant/weapp/dist/search/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -55,7 +55,7 @@ VantComponent({
|
||||
onCancel() {
|
||||
/**
|
||||
* 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
|
||||
* https://github.com/youzan/vant-weapp/issues/1768
|
||||
* https://github.com/youzan/@vant/weapp/issues/1768
|
||||
*/
|
||||
setTimeout(() => {
|
||||
this.setData({ value: '' });
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-sidebar": "path/to/vant-weapp/dist/sidebar/index",
|
||||
"van-sidebar-item": "path/to/vant-weapp/dist/sidebar-item/index"
|
||||
"van-sidebar": "path/to/@vant/weapp/dist/sidebar/index",
|
||||
"van-sidebar-item": "path/to/@vant/weapp/dist/sidebar-item/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-skeleton": "path/to/vant-weapp/dist/skeleton/index"
|
||||
"van-skeleton": "path/to/@vant/weapp/dist/skeleton/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-slider": "path/to/vant-weapp/dist/slider/index"
|
||||
"van-slider": "path/to/@vant/weapp/dist/slider/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-stepper": "path/to/vant-weapp/dist/stepper/index"
|
||||
"van-stepper": "path/to/@vant/weapp/dist/stepper/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-steps": "path/to/vant-weapp/dist/steps/index"
|
||||
"van-steps": "path/to/@vant/weapp/dist/steps/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ Sticky 组件与 CSS 中`position: sticky`属性实现的效果一致,当组
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-sticky": "path/to/vant-weapp/dist/sticky/index"
|
||||
"van-sticky": "path/to/@vant/weapp/dist/sticky/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-submit-bar": "path/to/vant-weapp/dist/submit-bar/index"
|
||||
"van-submit-bar": "path/to/@vant/weapp/dist/submit-bar/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-swipe-cell": "path/to/vant-weapp/dist/swipe-cell/index"
|
||||
"van-swipe-cell": "path/to/@vant/weapp/dist/swipe-cell/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-switch": "path/to/vant-weapp/dist/switch/index"
|
||||
"van-switch": "path/to/@vant/weapp/dist/switch/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-tab": "path/to/vant-weapp/dist/tab/index",
|
||||
"van-tabs": "path/to/vant-weapp/dist/tabs/index"
|
||||
"van-tab": "path/to/@vant/weapp/dist/tab/index",
|
||||
"van-tabs": "path/to/@vant/weapp/dist/tabs/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-tabbar": "path/to/vant-weapp/dist/tabbar/index",
|
||||
"van-tabbar-item": "path/to/vant-weapp/dist/tabbar-item/index"
|
||||
"van-tabbar": "path/to/@vant/weapp/dist/tabbar/index",
|
||||
"van-tabbar-item": "path/to/@vant/weapp/dist/tabbar-item/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-tag": "path/to/vant-weapp/dist/tag/index"
|
||||
"van-tag": "path/to/@vant/weapp/dist/tag/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-toast": "path/to/vant-weapp/dist/toast/index"
|
||||
"van-toast": "path/to/@vant/weapp/dist/toast/index"
|
||||
}
|
||||
```
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
### 文字提示
|
||||
|
||||
```javascript
|
||||
import Toast from 'path/to/vant-weapp/dist/toast/toast';
|
||||
import Toast from 'path/to/@vant/weapp/dist/toast/toast';
|
||||
|
||||
Toast('我是提示文案,建议不超过十五字~');
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-transition": "path/to/vant-weapp/dist/transition/index"
|
||||
"van-transition": "path/to/@vant/weapp/dist/transition/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-tree-select": "path/to/vant-weapp/dist/tree-select/index"
|
||||
"van-tree-select": "path/to/@vant/weapp/dist/tree-select/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"van-uploader": "path/to/vant-weapp/dist/uploader/index"
|
||||
"van-uploader": "path/to/@vant/weapp/dist/uploader/index"
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user