mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-06-04 04:39:16 +08:00
parent
ba9ede4453
commit
ec33af57e2
@ -4,7 +4,7 @@
|
|||||||
在 json 文件中配置button组件
|
在 json 文件中配置button组件
|
||||||
```json
|
```json
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-button": "/dist/btn/index"
|
"zan-button": "path/to/zanui-weapp/dist/btn/index"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -53,8 +53,8 @@
|
|||||||
1.在 json 文件中配置 button-group 组件
|
1.在 json 文件中配置 button-group 组件
|
||||||
```json
|
```json
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-button": "/dist/btn/index",
|
"zan-button": "path/to/zanui-weapp/dist/btn/index",
|
||||||
"zan-button-group": "/dist/btn-group/index"
|
"zan-button-group": "path/to/zanui-weapp/dist/btn-group/index"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
2.在 wxml 中直接引入
|
2.在 wxml 中直接引入
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-capsule": "/packages/capsule/index"
|
"zan-capsule": "path/to/zanui-weapp/dist/capsule/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -3,31 +3,27 @@
|
|||||||
### 使用指南
|
### 使用指南
|
||||||
|
|
||||||
#### 单个 cell 使用示例
|
#### 单个 cell 使用示例
|
||||||
~~~json
|
```json
|
||||||
{
|
{
|
||||||
...
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-cell": "../../dist/cell/index",
|
"zan-cell": "path/to/zanui-weapp/dist/cell/index",
|
||||||
}
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
~~~
|
```
|
||||||
|
|
||||||
~~~wxml
|
```wxml
|
||||||
<zan-cell title="单行列表" label="附加描述" value="详细信息"></zan-cell>
|
<zan-cell title="单行列表" label="附加描述" value="详细信息"></zan-cell>
|
||||||
~~~
|
```
|
||||||
|
|
||||||
#### cell 组使用示例
|
#### cell 组使用示例
|
||||||
多个 cell 组件必须作为 `cell-group` 组件的子组件,否则可能出现显示问题。
|
多个 cell 组件必须作为 `cell-group` 组件的子组件,否则可能出现显示问题。
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-cell": "../../dist/cell/index",
|
"zan-cell": "path/to/zanui-weapp/dist/cell/index",
|
||||||
"zan-cell-group": "../../dist/cell-group/index"
|
"zan-cell-group": "path/to/zanui-weapp/dist/cell-group/index"
|
||||||
}
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -2,16 +2,19 @@
|
|||||||
|
|
||||||
使用 picker 组件开发的时间日期组件,弥补小程序 picker 自身对于快速时间选择的不支持。
|
使用 picker 组件开发的时间日期组件,弥补小程序 picker 自身对于快速时间选择的不支持。
|
||||||
|
|
||||||
### 示例代码
|
### 使用指南
|
||||||
|
|
||||||
|
在 index.json 中引入组件
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-date-picker": "../../dist/datetime-picker/index"
|
"zan-date-picker": "path/to/zanui-weapp/dist/datetime-picker/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 代码演示
|
||||||
|
可以在任意位置上使用 zan-date-picker 标签。
|
||||||
```wxml
|
```wxml
|
||||||
<zan-date-picker
|
<zan-date-picker
|
||||||
bindchange="change"
|
bindchange="change"
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
在 index.json 中引入组件
|
在 index.json 中引入组件
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-loading": "../../dist/loading/index"
|
"zan-loading": "path/to/zanui-weapp/dist/loading/index"
|
||||||
}
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-panel": "/packages/panel/index"
|
"zan-panel": "path/to/zanui-weapp/dist/panel/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -53,7 +53,7 @@ togglePopup() {
|
|||||||
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|
||||||
|-----------|-----------|-----------|-------------|-------------|
|
|-----------|-----------|-----------|-------------|-------------|
|
||||||
| show | 是否显示弹出层 | Boolean | false | |
|
| show | 是否显示弹出层 | Boolean | false | |
|
||||||
| overlay | 是否显示遮罩层 | Boolean | false | |
|
| overlay | 是否显示遮罩层 | Boolean | true | |
|
||||||
| closeOnClickOverlay | 遮罩层点击时,是否触发关闭事件 | Boolean | true | |
|
| closeOnClickOverlay | 遮罩层点击时,是否触发关闭事件 | Boolean | true | |
|
||||||
| type | 弹出层动画方式, 可选`center`, `left`, `right`, `top`, `bottom` | String | center | |
|
| type | 弹出层动画方式, 可选`center`, `left`, `right`, `top`, `bottom` | String | center | |
|
||||||
|
|
||||||
@ -62,5 +62,3 @@ togglePopup() {
|
|||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| click-overlay | 遮罩层点击触发 | |
|
| click-overlay | 遮罩层点击触发 | |
|
||||||
| close | 遮罩层关闭时触发 | |
|
| close | 遮罩层关闭时触发 | |
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-select": "/packages/select/index"
|
"zan-select": "path/to/zanui-weapp/dist/select/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -33,7 +33,7 @@ Page({
|
|||||||
name: '选项二',
|
name: '选项二',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
checkedValue: '选项一',
|
checkedValue: '1',
|
||||||
activeColor: '#ff4443'
|
activeColor: '#ff4443'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-switch": "/packages/switch/index"
|
"zan-switch": "path/to/zanui-weapp/dist/switch/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 代码演示
|
### 代码演示
|
||||||
=======
|
可以在页面任意位置上使用 zan-switch 标签。
|
||||||
```html
|
```html
|
||||||
<zan-switch
|
<zan-switch
|
||||||
disabled="{{ disabled }}"
|
disabled="{{ disabled }}"
|
||||||
@ -49,6 +49,3 @@ Page({
|
|||||||
| 事件名称 | 说明 | 回调参数 |
|
| 事件名称 | 说明 | 回调参数 |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| change | 当绑定值变化时触发的事件 | event对象和数据对象(包含loading和checked) |
|
| change | 当绑定值变化时触发的事件 | event对象和数据对象(包含loading和checked) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,18 +4,10 @@
|
|||||||
在 json 文件中配置tag组件
|
在 json 文件中配置tag组件
|
||||||
```json
|
```json
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"zan-tag": "/dist/tag/index"
|
"zan-tag": "path/to/zanui-weapp/dist/tag/index"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### 属性
|
|
||||||
|
|
||||||
| 名称 | 类型 | 是否必须 | 默认 | 描述 |
|
|
||||||
|---------|---------|----------|------|-------|
|
|
||||||
| type | String | 否 | 空 | tag类型,值有primary、warn、danger |
|
|
||||||
| plain | Boolean | 否 | false | tag是否镂空,默认为false |
|
|
||||||
| disabled | Boolean | 否 | false | tag是否禁用,默认为false |
|
|
||||||
|
|
||||||
### 代码演示
|
### 代码演示
|
||||||
|
|
||||||
#### 基础用法
|
#### 基础用法
|
||||||
@ -43,3 +35,11 @@ tag禁用状态
|
|||||||
<zan-tag disabled>不可用</zan-tag>
|
<zan-tag disabled>不可用</zan-tag>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### API
|
||||||
|
|
||||||
|
| 名称 | 类型 | 是否必须 | 默认 | 描述 |
|
||||||
|
|---------|---------|----------|------|-------|
|
||||||
|
| type | String | 否 | 空 | tag类型,值有primary、warn、danger |
|
||||||
|
| plain | Boolean | 否 | false | tag是否镂空,默认为false |
|
||||||
|
| disabled | Boolean | 否 | false | tag是否禁用,默认为false |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user