#组件使用说明
>示例数据均为静态数据,接口生成如下结构的数据:(已上传完整demo)
---
#### 索引列表
```
{
"A": [{
"id": 56,
"spell": "aba",
"name": "阿坝"
}]
......
}
```
#### 通讯录列表
```
{
"A": [{
"id": 56,
"spell": "zs",
"name": "张三",
"phoneNumber":"13143599999"
}]
......
}
```
> id spell name 为必须字段 phoneNumber字段如果没有则不返回
---
#### 使用示例 (phones.vue)
```
<template>
<view>
<phone-directory :phones="phones" @paramClick="paramClick"></phone-directory>
</view>
</template>
<script>
import phoneDirectory from '@/components/phone-directory/phone-directory.vue'
export default {
name:"phones",
components:{
phoneDirectory
},
data() {
return {
//示例数据
phones:{
"A": [{
"id": 56,
"spell": "aba",
"name": "阿坝"
}, {
"id": 57,
"spell": "akesu",
"name": "阿克苏"
}, {
"id": 58,
"spell": "alashanmeng",
"name": "阿拉善盟"
}, {
"id": 59,
"spell": "aletai",
"name": "阿勒泰"
}, {
"id": 60,
"spell": "ali",
"name": "阿里"
}, {
"id": 61,
"spell": "ankang",
"name": "安康"
}, {
"id": 62,
"spell": "anqing",
"name": "安庆"
}, {
"id": 63,
"spell": "anshan",
"name": "鞍山"
}, {
"id": 64,
"spell": "anshun",
"name": "安顺"
}, {
"id": 65,
"spell": "anyang",
"name": "安阳"
}, {
"id": 338,
"spell": "acheng",
"name": "阿城"
}, {
"id": 339,
"spell": "anfu",
"name": "安福"
}, {
"id": 340,
"spell": "anji",
"name": "安吉"
}, {
"id": 341,
"spell": "anning",
"name": "安宁"
}, {
"id": 342,
"spell": "anqiu",
"name": "安丘"
}, {
"id": 343,
"spell": "anxi",
"name": "安溪"
}, {
"id": 344,
"spell": "anyi",
"name": "安义"
}, {
"id": 345,
"spell": "anyuan",
"name": "安远"
}],
"B": [{
"id": 1,
"spell": "beijing",
"name": "北京"
}, {
"id": 66,
"spell": "baicheng",
"name": "白城"
}, {
"id": 67,
"spell": "baise",
"name": "百色"
}, {
"id": 68,
"spell": "baishan",
"name": "白山"
}]
........
}
}
},
methods : {
paramClick (e) {
console.log(e)
}
}
}
</script>
<style>
</style>
```
#### 使用示例 (phone-search.vue)
```
<template>
<view>
<phone-search-list :phones="phones" @paramClick="paramClick"></phone-search-list>
</view>
</template>
<script>
import phoneSearchList from '@/components/phone-directory/phone-search-list.vue'
export default {
name:"phone-search",
components:{
phoneSearchList
},
data() {
return {
phones:null,
}
},
onLoad (option) {
this.phones = JSON.parse(unescape(option.phones))
},
methods:{
paramClick (e) {
console.log(e)
}
}
}
</script>
<style>
</style>
```
#### 引入
>把phone-directory目录拷贝至项目components
>把pages下的phones目录拷贝至项目pages目录下
>在项目pages.json文件写入
(```)
{
"path" : "pages/phones/phones",
"style" : {
"navigationBarTitleText" : "通讯录",
"app-plus":{
"bounce":"none",
"scrollIndicator":"none"
}
}
},
{
"path" : "pages/phones/phone-search",
"style" : {
"navigationBarTitleText" : "搜索联系人"
}
}
(```)
### 组件参数说明
属性名|类型|是否必填|说明
--|:--:|--:
phones|Object|是|接口数据
paramClick|Object|是|当点击时返回对应参数
>文件名 参数 也可自己定义 搜索框内容可在phone-directory.vue 和phone-search-list.vue 文件修改
没有合适的资源?快使用搜索试试~ 我知道了~
省钱兄上门送水小程序源码桶装水配送源码同城上门配送 uniapp前端模板

共358个文件
vue:137个
png:113个
js:64个

需积分: 0 13 下载量 3 浏览量
2024-05-23
13:30:43
上传
评论 1
收藏 1.4MB ZIP 举报
温馨提示
开源码兄送水系统源码,由于是商业版本版本,目前只开源用户端V1版本部分模块源码提供学习研究,使用uniapp技术,提供学习使用不可商业,商业使用请联系授权 适配支持公众号+APP+H5+小程序,使用Hbuilder导入即可运行 首页,我的订单,我的页面,手机号登录,服务详情,选择地址,订单详情,下单,购物车,购物车下单等功能,提供需要学习的朋友研究学习使用
资源推荐
资源详情
资源评论






























收起资源包目录





































































































共 358 条
- 1
- 2
- 3
- 4
资源评论


省钱兄科技
- 粉丝: 5267
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 解锁 QwenLM 全部潜能,一文教你充分利用
- A fine-tuned model from Qwen2-1.5B-Instruct, capable of handling sensitive topics like violence, exp
- sap2000钢结构廊架计算书.docx
- 内爬式塔式起重机安全技术交底.doc
- 网络优化改造项目施工方案大全.doc
- 第7章电子商务法律法规.ppt
- 指数函数对数函数与幂函数44对数运算法则课件人教B版必修第二册.ppt
- BIM技术在城际轨道交通项目.doc
- 北京某商业广场总承包施工管理措施.doc
- 剪力墙平法识图规则格式3页.pptx
- 关心教师精神生命健康成长.doc
- 12-绩效专员岗位说明书.doc
- 最新教师网络培训心得体会-教师网络培训感悟和心得(9篇).docx
- BIM应用及简介.pdf
- 钢结构制作安装合同书(空白范本).doc
- 网络女装调查问卷.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
