Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
22个文件已修改
1个文件已删除
40个文件已添加
| | |
| | | export default { |
| | | BASE_URL: 'http://192.168.110.188:6194', |
| | | imageUrl: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | uploadToken: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | } |
| | |
| | | <view class="main"> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">时间</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题发生的时间" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | <view class=" flex a-center j-between flex1" @click="showDate=true"> |
| | | <input v-model="time" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="10" placeholder="请选择问题发生的时间" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">问题类型</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题类型" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | <view class=" flex a-center j-between flex1" @click="showList=true"> |
| | | <input v-model="problemType" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="10" placeholder="请选择问题类型" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">群众</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入群众姓名" /> |
| | | <input v-model="name" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请输入群众姓名" /> |
| | | |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">联系电话</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入群众联系电话" /> |
| | | <input v-model="contactNumber" type="number" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" maxlength="11" placeholder="请输入群众联系电话" /> |
| | | |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between" @click="goTopage"> |
| | | <text class="w-108 fs-27 font-bold mr-85">地点</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请选择问题发生具体地点" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | |
| | | <view class=" flex a-center j-between flex1"> |
| | | <input v-model="location" disabled placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请选择问题发生具体地点" /> |
| | | <image src="/static/Appeal/left.png" class="w-19 h-19" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="card flex a-center h-108 j-between"> |
| | | <text class="w-108 fs-27 font-bold mr-85">详细地址</text> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="uni-input flex1" |
| | | maxlength="10" placeholder="请输入详细地址描述" /> |
| | | <input v-model="detailedAddress" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="uni-input flex1" placeholder="请输入详细地址描述" /> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">问题描述</text> |
| | | <view class="bg mt-27 fs-27"> |
| | | <view class="h-94 " style="border-bottom: 2rpx solid rgba(0, 10, 26, 0.07);"> |
| | | <input placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" class="h-94 pl-31 flex1" |
| | | placeholder="请输入问题标题" /> |
| | | <input v-model="descriptionTitle" placeholder-style="color: rgba(0,0,0,0.3);font-size:27rpx;" |
| | | class="h-94 pl-31 flex1" placeholder="请输入问题标题" /> |
| | | </view> |
| | | <textarea name="" id="" cols="30" placeholder="请输入问题描述内容" |
| | | <textarea name="" v-model="descriptionContent" id="" cols="30" placeholder="请输入问题描述内容" |
| | | placeholder-style="color: rgba(0, 0, 0, 0.30);font-size:27rpx;" rows="10"></textarea> |
| | | </view> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">图片</text> |
| | | <view class="mt-27 flex a-center"> |
| | | <view class="img mr-15"> |
| | | <image src="/static/logo.png" class="w-140 h-140" mode=""></image> |
| | | <view class="img mr-15" v-for="item,index in images" :key="index"> |
| | | <image :src="item" class="w-140 h-140" mode=""></image> |
| | | <view class="img-icon"> |
| | | <image class="w-19 h-19" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" src="/static/Appeal/trash.png" mode=""></image> |
| | | <image class="w-19 h-19" @click="previewImage(index)" src="/static/Appeal/amplify.png" |
| | | mode=""></image> |
| | | <image class="w-19 h-19 ml-35" @click="deletimg(item)" src="/static/Appeal/trash.png" mode=""> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode=""></image> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode="" @click="uploadImg"></image> |
| | | </view> |
| | | </view> |
| | | <view class="mt-35"> |
| | | <text class="w-108 fs-27 font-bold mr-85">视频</text> |
| | | <view class="mt-27 flex a-center"> |
| | | <view class="img mr-15"> |
| | | <image src="/static/logo.png" class="w-140 h-140" mode=""></image> |
| | | <view class="img mr-15" v-for="item,index in videos" :key="index"> |
| | | <video :controls="false" :show-center-play-btn="false" :src="item" class="w-140 h-140" mode=""></video> |
| | | <view class="img-icon"> |
| | | <image class="w-19 h-19" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" src="/static/Appeal/trash.png" mode=""></image> |
| | | <image class="w-19 h-19" @click="gotoPage(item)" src="/static/Appeal/amplify.png" mode=""></image> |
| | | <image class="w-19 h-19 ml-35" @click="deletvideo(item)" src="/static/Appeal/trash.png" mode=""></image> |
| | | </view> |
| | | </view> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode=""></image> |
| | | <image src="/static/Appeal/add.png" class="w-140 h-140" mode="" @click="uploadVideo"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn" @click="submit"> |
| | | 保存 |
| | | </view> |
| | | <u-datetime-picker :show="showDate" v-model="value1" mode="date"></u-datetime-picker> |
| | | <u-picker :show="showList" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> |
| | | <u-datetime-picker :show="showDate" v-model="value1" mode="date" :closeOnClickOverlay="true" |
| | | @confirm="confirmone" @close="close" @cancel="cancel"></u-datetime-picker> |
| | | <u-picker :show="showList" :columns="columns" @confirm="confirmtwo" :closeOnClickOverlay="true" @close="close" |
| | | @cancel="cancel"></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'; |
| | | import { |
| | | save, |
| | | getproblem |
| | | } from './service.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | showList: false, |
| | | showDate: false, |
| | | value1: Number(new Date()), |
| | | columns: [['医疗','教育','就业','住房','养老']], |
| | | columns: [ |
| | | ['医疗', '教育', '就业', '住房', '养老'] |
| | | ], |
| | | time: '', |
| | | problemType: '', |
| | | name: '', |
| | | contactNumber: '', |
| | | location: '', |
| | | detailedAddress: '', |
| | | descriptionTitle: '', |
| | | descriptionContent: '', |
| | | images: [], |
| | | videos: [], |
| | | }; |
| | | }, |
| | | methods:{ |
| | | confirm(e){ |
| | | console.log(e,'eeee'); |
| | | onLoad() { |
| | | this.getproblem() |
| | | }, |
| | | methods: { |
| | | previewImage(index) { |
| | | uni.previewImage({ |
| | | urls: this.images, |
| | | current: this.images[index], |
| | | longPressActions: { |
| | | itemList: ['发送给朋友', '保存图片', '收藏'], |
| | | success: function(data) { |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | cancel(e){ |
| | | console.log(e,'eeee'); |
| | | deletimg(e) { |
| | | this.images = this.images.filter(item => item != e) |
| | | |
| | | }, |
| | | goTopage(){ |
| | | deletvideo(e){ |
| | | this.videos = this.videos.filter(item => item != e) |
| | | }, |
| | | gotoPage(e){ |
| | | uni.navigateTo({ |
| | | url:'/pages/location/location' |
| | | url:`/pages/work-detail/maxVideo?url=${e}` |
| | | }) |
| | | } |
| | | }, |
| | | getproblem() { |
| | | getproblem().then((resp => { |
| | | console.log(resp, '问题类型') |
| | | })) |
| | | }, |
| | | submit() { |
| | | const preciseRegex = '/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/'; |
| | | if(!this.time){ |
| | | uni.showToast({ |
| | | title:'请选择时间', |
| | | icon:'none' |
| | | }) |
| | | |
| | | }else if(!this.problemType){ |
| | | uni.showToast({ |
| | | title:'请选择问题类型', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.name){ |
| | | uni.showToast({ |
| | | title:'请输入群众姓名', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.contactNumber){ |
| | | uni.showToast({ |
| | | title:'请输入联系电话', |
| | | icon:'none' |
| | | }) |
| | | }else if(!preciseRegex.test(phoneNumber)){ |
| | | uni.showToast({ |
| | | title:'请输入正确的手机号', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.location){ |
| | | uni.showToast({ |
| | | title:'请选择地点', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.detailedAddress){ |
| | | uni.showToast({ |
| | | title:'请输入详细地址', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.descriptionTitle){ |
| | | uni.showToast({ |
| | | title:'请输入问题标题', |
| | | icon:'none' |
| | | }) |
| | | }else if(!this.descriptionContent){ |
| | | uni.showToast({ |
| | | title:'请输入问题描述', |
| | | icon:'none' |
| | | }) |
| | | }else if(this.images==0){ |
| | | uni.showToast({ |
| | | title:'请上传图片', |
| | | icon:'none' |
| | | }) |
| | | }else if(this.videos==0){ |
| | | uni.showToast({ |
| | | title:'请上传视频', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | const data = { |
| | | time: this.time, |
| | | problemType: this.problemType, |
| | | name: this.name, |
| | | contactNumber: this.contactNumber, |
| | | location: this.location, |
| | | detailedAddress: this.detailedAddress, |
| | | descriptionTitle: this.descriptionTitle, |
| | | descriptionContent: this.descriptionContent, |
| | | images: this.images.join(','), |
| | | videos: this.videos.join(','), |
| | | } |
| | | save().then(resp => { |
| | | console.log(resp, '保存'); |
| | | if(resp.code==200){ |
| | | uni.showToast({ |
| | | title:'保存成功', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | confirmone(e) { |
| | | console.log(e, 'eeee'); |
| | | this.time = dayjs(e.value).format('YYYY-MM-DD') |
| | | this.showDate = false |
| | | }, |
| | | confirmtwo(e) { |
| | | console.log(e, 'eeee'); |
| | | this.problemType = e.value[0] |
| | | this.showList = false |
| | | }, |
| | | cancel() { |
| | | this.showDate = false |
| | | this.showList = false |
| | | }, |
| | | close(e) { |
| | | this.showDate = false |
| | | this.showList = false |
| | | }, |
| | | goTopage() { |
| | | uni.navigateTo({ |
| | | url: '/pages/location/location' |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | | uni.chooseImage({ |
| | | count: 1, //默认9 |
| | | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], //从相册选择 |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | filePath: res.tempFilePaths[0], |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | | this.images = [...this.images, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | | fail: () => { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | uploadVideo() { |
| | | uni.chooseVideo({ |
| | | count: 1, //默认9 |
| | | sourceType: ['camera', 'album'], |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: 'https://huacheng.psciio.com/api/huacheng-communitybackstage/communitypartybuilding/uploadimage', |
| | | filePath: res.tempFilePath, |
| | | name: 'file', |
| | | header: { |
| | | 'Authorization': 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE2NzYwOTg3NzQ0OTk0NjMxNjgsInR5cGUiOjMsImV4cCI6MTc0MTY4NjQ0OSwiY3JlYXRlZCI6MTc0MDM5MDQ0OTYxN30.UpanrjmCLuKlxm32IbBldBOSJJNYL8ZDrbZQM9z_HCW8X9cL8Ox8jwgX0j4_2nq3ALjYD7aPQWbVmMb2vHIIdA' |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes'); |
| | | this.videos = [...this.videos, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | | fail: () => { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传失败', |
| | | icon: 'error' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | |
| | | export const save =(params)=>{ |
| | | return request.post(`/api/huacheng-sangeshenbian/applet/complaint/save`,params) |
| | | } |
| | | export const getproblem =(params)=>{ |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/problem-type/list`,params) |
| | | } |
| | |
| | | </view> |
| | | <view class="mx-13 mt-33 pt-35 pb-33 px-27 br-19 flex a-center j-between bgcolor1"> |
| | | <view class="fs-27 lh-38 color2">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <image src="@/static/public/gps.png" class="w-31 h-31 shrink0" /> |
| | | <image src="@/static/detailImg/dwei.png" class="w-31 h-31 shrink0" /> |
| | | </view> |
| | | <view class="flex a-center j-between mt-31 mx-13"> |
| | | <view class="flex-column a-center"> |
| | |
| | | <view class="fs-27 mt-38 lh-38 font-bold">图片</view> |
| | | <view class="flex wrap mt-27"> |
| | | <view class="relative mr-15" v-for="item in localImageUrls" :key="item"> |
| | | <image v-if="item != 'loading'" src="/static/logo.png" class="w-140 h-140 shrink0 br-8" /> |
| | | <image v-if="item != 'loading'" :src="item" class="w-140 h-140 shrink0 br-8" /> |
| | | <view v-if="item != 'loading'" class="absolute w-140 h-140 bgcolor5 top0 left0 br-8"> |
| | | <view class="absolute" style="top: 50%;left: 50%;transform: translate(-50%,-50%);"> |
| | | <image @tap="viewImage(item)" src="@/static/Appeal/amplify.png" class="w-19 h-19 mr-35" |
| | |
| | | methods: { |
| | | viewImage(item) { |
| | | uni.previewImage({ |
| | | urls: [require('@/static/logo.png')] |
| | | urls: [item] |
| | | }) |
| | | }, |
| | | uploadImg() { |
| | |
| | | sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['camera'], //x相机拍照 |
| | | success: (chooseImageRes) => { |
| | | this.imgUrls.push('loading') |
| | | this.againCklicFlag = true |
| | | let imgPathList = chooseImageRes.tempFilePaths; |
| | | if (imgPathList.length > 0) { |
| | | uni.uploadFile({ |
| | | url: config.BASE_URL + '/master/oss/pic', |
| | | url: config.imageUrl, |
| | | filePath: imgPathList[0], |
| | | timeout: 1000 * 45, |
| | | name: 'file', |
| | | header: { |
| | | Authorization: uni.getStorageSync('token') |
| | | Authorization: config.uploadToken |
| | | }, |
| | | success: (res) => { |
| | | if (JSON.parse(res.data).code == 200) { |
| | | let imgUrl = JSON.parse(res.data) |
| | | this.imageUrls = this.imageUrls.filter(item => item != |
| | | this.imgUrls = this.imgUrls.filter(item => item != |
| | | 'loading') |
| | | this.$nextTick(() => { |
| | | this.imageUrls.push(imgUrl) |
| | | this.imgUrls.push(imgUrl) |
| | | this.localImageUrls.push(imgPathList[0]) |
| | | }) |
| | | } else { |
| | |
| | | <view class="problem-report-page"> |
| | | <view class="info-cards"> |
| | | <view class="info-top"> |
| | | <view class="num">诉求号:7843523454</view> |
| | | <view class="status">正在办理</view> |
| | | <view class="num">诉求号:{{detail.serialNumber}}</view> |
| | | <view class="status">{{['正在办理','延期办理','超时办理','已办结','群众撤销','上报待审核','上级驳回'][detail.status]}}</view> |
| | | </view> |
| | | |
| | | <view class="address"> |
| | | <view class="adr">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <view class="adr">{{detail.detailedAddress || ''}}</view> |
| | | <image src="/static/position@2x.png" class="w-31 h-31" mode="aspectFill"></image> |
| | | </view> |
| | | |
| | |
| | | <view class="table-item"> |
| | | <view class="type-tip flex1"> |
| | | <view class="tip"> |
| | | 教育 |
| | | {{detail.problemType}} |
| | | </view> |
| | | </view> |
| | | <view class="person-item flex1">沙振</view> |
| | | <view class="phone-item flex1">14225874426</view> |
| | | <view class="person-item flex1">{{detail.name}}</view> |
| | | <view class="phone-item flex1">{{detail.contactNumber}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="input-card"> |
| | |
| | | <image src="/static/warnng@2x.png" class="w-31 h-31 mr-15" mode="aspectFill"></image> |
| | | 提交后会由上级部门进行审核,请留意审核结果 |
| | | </view> |
| | | <view class="btn">下派至下级部门</view> |
| | | <view class="btn" @click="dispatch">下派至下级部门</view> |
| | | |
| | | <u-popup round="19rpx" :show="showPop" mode="center" @close="close" @open="open"> |
| | | <view class="popup-content"> |
| | | <view class="title-pop">请选择下派单位</view> |
| | | <view class="pop-label">社区:</view> |
| | | <view class="pop-select"> |
| | | 请选择 |
| | | </view> |
| | | <uni-data-select v-model="value" :localdata="range" @change="change"></uni-data-select> |
| | | |
| | | <view class="botton-btn"> |
| | | <view class="cancle">取消</view> |
| | | <view class="sure">确定</view> |
| | | <view class="cancle" @tap="close">取消</view> |
| | | <view class="sure" @tap="toDispatch">确定</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | saveDispatch, |
| | | getDetail, |
| | | getDispatchList |
| | | } from './service' |
| | | export default { |
| | | data() { |
| | | return { |
| | | content: '', |
| | | detail: {}, |
| | | showPop: false, |
| | | value: '', |
| | | range: [], |
| | | }; |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | this.id = option.id |
| | | getDetail({ |
| | | id: option.id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.detail = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | change(e) { |
| | | console.log("e:", e); |
| | | }, |
| | | close() { |
| | | this.showPop = false |
| | | }, |
| | | dispatch() { |
| | | this.showPop = true |
| | | }, |
| | | |
| | | open() { |
| | | getDispatchList().then(res => { |
| | | if (res.code == 200) { |
| | | this.range = res.data.map(item => { |
| | | item.text = item.name |
| | | item.value = item.id |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | toDispatch() { |
| | | if (!this.value) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '请选择下派单位' |
| | | }) |
| | | return |
| | | } |
| | | saveDispatch({ |
| | | complaintId: this.id, |
| | | comment: this.content, |
| | | dispatchId: this.value |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '下派成功' |
| | | }) |
| | | uni.navigateBack() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | |
| | | |
| | | <style lang="scss" scoped> |
| | | /deep/.uni-select { |
| | | width: calc(484rpx) !important; |
| | | border: unset; |
| | | margin-top: 25rpx; |
| | | margin-left: 45.15rpx; |
| | | } |
| | | |
| | | /deep/.uni-select__input-box { |
| | | width: calc(454rpx - 30.77rpx) !important; |
| | | height: 77rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 15rpx; |
| | | border: 2rpx solid rgba(0, 0, 0, 0.15); |
| | | padding-left: 30.77rpx; |
| | | padding-right: 30.77rpx; |
| | | } |
| | | |
| | | /deep/.uni-select__selector { |
| | | width: calc(461rpx) !important; |
| | | left: 15rpx; |
| | | } |
| | | |
| | | .problem-report-page { |
| | | padding-top: 38.46rpx; |
| | | margin: 0 30.77rpx; |
| | |
| | | color: #FFFFFF; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | //获取工单详情 |
| | | export const getDetail = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/detail`, params) |
| | | } |
| | | |
| | | //下派 |
| | | export const saveDispatch = (params) => { |
| | | return request.post(`/api/huacheng-sangeshenbian/applet/complaint/saveDispatch`, params) |
| | | } |
| | | |
| | | //获取下派单位 |
| | | |
| | | export const getDispatchList = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/getDispatchList`, params) |
| | | } |
| | |
| | | <image class="h-32" src="/static/home/img5.png" mode=""></image> |
| | | </view> |
| | | <swiper class="swiper " :indicator-dots="false" :autoplay="true" :interval="3000"> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | <swiper-item v-for="item,index in bannerlist" :key="index"> |
| | | <image style="height: 270rpx;width: 688rpx;border-radius: 19rpx;" :src="item.url" mode=""></image> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <image style="height: 270rpx;width: 688rpx;" src="/static/home/img2.png" mode=""></image> |
| | | </swiper-item> |
| | | |
| | | </swiper> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class=" mt-15"> |
| | | <view class="flex a-center"> |
| | | <view class="msg mr-19" @click="isactive=1" :class="isactive==1? 'active':''"> |
| | | <view class="msg mr-19" @click="changeActive(1)" :class="isactive==1? 'active':''"> |
| | | 消息 |
| | | <view class="tips"> |
| | | 6 |
| | | {{msgList.length}} |
| | | </view> |
| | | </view> |
| | | <view class="representative" @click="isactive=2" :class="isactive==2? 'active':''"> |
| | | <view class="representative" @click="changeActive(2)" :class="isactive==2? 'active':''"> |
| | | 待办 |
| | | <view class="tips"> |
| | | 6 |
| | | {{msgList.length}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list mt-29"> |
| | | <view class="flex a-center mb-27" v-for="item in 5"> |
| | | <view class="flex a-center mb-27" v-for="item in msgList" :key="item.id"> |
| | | <view class="avater pb-33"> |
| | | <image class="w-85 h-85 br50" src="/static/home/img9.png" mode=""></image> |
| | | <view class="tips"> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="border-b flex1 ml-18 pb-33"> |
| | | <view class="border-b flex1 ml-18 pb-33" > |
| | | <view class="fs-31 font-w500 flex flex1 j-between"> |
| | | <text>钟山淑</text> |
| | | <text class="fs-23 font-w400">16分钟前</text> |
| | | <text>{{item.title}}</text> |
| | | <text class="fs-23 font-w400">{{item.responseTime}}分钟前</text> |
| | | |
| | | </view> |
| | | <view class="fs-27 flex j-between mt-8"> |
| | | <text>向你发来10份报告</text> |
| | | <view class="read">已读</view> |
| | | <view class="noread">未读</view> |
| | | <text>{{item.title}}</text> |
| | | <view class="read" v-if="item.readStatus==1">已读</view> |
| | | <view class="noread" v-else>未读</view> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | showData: false, |
| | | isClick: false, |
| | | pageNum:1, |
| | | bannerlist:[], |
| | | msgList:[], |
| | | msgListTotal:[], |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | getBanner() { |
| | | getBanner().then(resp => { |
| | | console.log(resp, '获取banner'); |
| | | this.bannerlist =resp.data |
| | | }) |
| | | }, |
| | | getMessagelist() { |
| | |
| | | } |
| | | getMessagelist(data).then(resp => { |
| | | console.log(resp, '获取消息列表'); |
| | | this.msgListTotal=resp.data.records |
| | | this.msgList =resp.data.records.filter(item=> item.promptType==2) |
| | | }) |
| | | }, |
| | | changeActive(value){ |
| | | this.isactive =value |
| | | this.msgList =this.msgListTotal.filter(item=> item.promptType==1) |
| | | }, |
| | | change() { |
| | | console.log('1111'); |
| | |
| | | border-radius: 19rpx; |
| | | |
| | | } |
| | | // swiper-item{ |
| | | // border-radius: 19rpx; |
| | | // } |
| | | |
| | | .msg { |
| | | width: 173rpx; |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <u-navbar title="选择地点" bgColor="transparent" titleStyle="font-size: 35rpx;font-weight:bold;" placeholder> |
| | | <view slot="left"> |
| | | <view slot="left" @click="back"> |
| | | <image src="/static/location/back.png" class="w-19 h-35" mode=""></image> |
| | | </view> |
| | | </u-navbar> |
| | | <view class="" id="container"> |
| | | |
| | | <view class="" id="container" @regionchange="onRegionChange"> |
| | | |
| | | </view> |
| | | <view class=""> |
| | | <view class="searchMain mb-35"> |
| | | <view class=" main"> |
| | | <view class="searchMain mb-35 mt-38"> |
| | | <view class="search fs-27 "> |
| | | <text class="mr-35 ml-50">成都市</text> |
| | | <image class="w-17 h-8 mr-35" src="/static/location/toleft.png" mode=""></image> |
| | | <image class="w-31 h-31 mr-13" src="/static/location/search.png" mode=""></image> |
| | | <input class="flex1" placeholder="搜索小区/写字楼等" placeholder-style="font-size:27rpx"></input> |
| | | <view class="sure"> |
| | | <input class="flex1" v-model="keyword" placeholder="搜索小区/写字楼等" |
| | | placeholder-style="font-size:27rpx"></input> |
| | | <view class="sure" @click="searchLocation"> |
| | | 确定 |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="card" :class="" v-for="item in 5"> |
| | | <text>天府新谷九号楼二单元</text> |
| | | <text class="font-w500 fs-23 mt-25" style="color: rgba(0, 0, 0, 0.6);">四川省成都市高新区府城大道西段399号天</text> |
| | | <view class="card" @click="changeAdr(item.id,item)" :class="item.id ==uid ?'activecard':''" |
| | | v-for="item in locationList" :key="item.id"> |
| | | <text>{{item.address}}</text> |
| | | <text class="font-w500 fs-23 mt-25" style="color: rgba(0, 0, 0, 0.6);">{{item.address}}</text> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | return { |
| | | latitude: 39.909, |
| | | longitude: 116.39742, |
| | | map: null, |
| | | uid: 0, |
| | | keyword: '', |
| | | locationList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack() |
| | | }, |
| | | onRegionChange(e) { |
| | | if (e.type === 'end') { |
| | | // 地图移动结束时执行操作 |
| | | console.log('地图移动结束,新的中心点经度:', e.longitude, '新的中心点纬度:', e.latitude); |
| | | } |
| | | }, |
| | | changeAdr(value, addr) { |
| | | console.log(value, addr, 'asdasdada'); |
| | | this.uid = value |
| | | const pages = getCurrentPages() |
| | | let prevPage = pages[pages.length - 2]; |
| | | prevPage.location = addr.address |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 500) |
| | | }, |
| | | // 搜索地点 |
| | | searchLocation() { |
| | | if (!this.keyword) return; |
| | | uni.request({ |
| | | url: `https://api.map.baidu.com/place/v2/search`, |
| | | method: 'GET', |
| | | data: { |
| | | query: this.keyword, |
| | | location: `${30.39},${104.04}`, |
| | | radius: 10000, // 搜索半径,单位:米 |
| | | output: 'json', |
| | | ak: '3mHKIXMArjgIkgADzOlTYp4XssNSNkwr' // 替换为你自己的 AK |
| | | }, |
| | | success: (res) => { |
| | | console.log(res, '-------'); |
| | | if (res.data.status === 0) { |
| | | this.searchResults = res.data.results; |
| | | this.latitude = res.data.results[0].location.lat |
| | | this.longitude = res.data.results[0].location.lng |
| | | this.locationList = res.data.results.map((result, index) => { |
| | | |
| | | result.id = index + 1 |
| | | |
| | | return result |
| | | }); |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | console.error('搜索失败:', err); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | onReady() { |
| | | var map = new BMapGL.Map("container"); // 创建地图实例 |
| | | var point = new BMapGL.Point(116.404, 39.915); // 创建点坐标 |
| | | map.centerAndZoom(point, 15); |
| | | } |
| | | onLoad() { |
| | | |
| | | }, |
| | | onReady() { |
| | | this.map = new BMapGL.Map("container"); // 创建地图实例 |
| | | |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | this.longitude = res.longitude; |
| | | this.latitude = res.latitude; |
| | | var point = new BMapGL.Point(res.longitude, res.latitude); // 创建点坐标 |
| | | this.map.centerAndZoom(point, 12); |
| | | var myGeo = new BMapGL.Geocoder(); |
| | | // 根据坐标得到地址描述 |
| | | myGeo.getLocation(new BMapGL.Point(res.longitude, res.latitude), (result) => { |
| | | console.log(result, 'result'); |
| | | this.locationList = result.surroundingPois.map((item, index) => { |
| | | item.id = index + 1 |
| | | return item |
| | | }) |
| | | |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | #container { |
| | | width: 100vw; |
| | | height: 517rpx; |
| | | height: 534rpx; |
| | | } |
| | | |
| | | .content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | |
| | | .main { |
| | | background-color: #fff; |
| | | border-radius: 34rpx; |
| | | position: absolute; |
| | | top: 517rpx; |
| | | z-index: 100; |
| | | |
| | | .activecard { |
| | | background: #F2F2F2; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | .searchMain { |
| | | padding-left: 40rpx; |
| | |
| | | font-size: 31rpx; |
| | | color: rgba(0, 0, 0, 0.8); |
| | | padding: 34rpx 38rpx 33rpx 38rpx; |
| | | background: #F2F2F2; |
| | | background: #fff; |
| | | border-bottom: 2rpx solid rgba(0, 10, 26, 0.07); |
| | | } |
| | | </style> |
| | |
| | | <view class="problem-report-page"> |
| | | <view class="info-cards"> |
| | | <view class="info-top"> |
| | | <view class="num">诉求号:7843523454</view> |
| | | <view class="status">正在办理</view> |
| | | <view class="num">诉求号:{{detail.serialNumber}}</view> |
| | | <view class="status">{{['正在办理','延期办理','超时办理','已办结','群众撤销','上报待审核','上级驳回'][detail.status]}}</view> |
| | | </view> |
| | | |
| | | <view class="address"> |
| | | <view class="adr">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <view class="adr">{{detail.detailedAddress || ''}}</view> |
| | | <image src="/static/position@2x.png" class="w-31 h-31" mode="aspectFill"></image> |
| | | </view> |
| | | |
| | |
| | | <view class="table-item"> |
| | | <view class="type-tip flex1"> |
| | | <view class="tip"> |
| | | 教育 |
| | | {{detail.problemType}} |
| | | </view> |
| | | </view> |
| | | <view class="person-item flex1">沙振</view> |
| | | <view class="phone-item flex1">14225874426</view> |
| | | <view class="person-item flex1">{{detail.name}}</view> |
| | | <view class="phone-item flex1">{{detail.contactNumber}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | problemReport, |
| | | getDetail |
| | | } from './service' |
| | | export default { |
| | | data() { |
| | | return { |
| | | content: '', |
| | | id: '', |
| | | detail: {}, |
| | | }; |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | if (option.id) { |
| | | this.id = option.id |
| | | getDetail({ |
| | | id: option.id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.detail = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | problemReports() { |
| | | problemReport({ |
| | | comment: this.content, |
| | | complaintId: this.id |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '上报成功' |
| | | }) |
| | | uni.navigateBack() |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | export const getDetail = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/detail`, params) |
| | | } |
| | | export const problemReport = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/report`, params) |
| | | } |
| | |
| | | </view> |
| | | <view class="mx-13 mt-33 pt-35 pb-33 px-27 br-19 flex a-center j-between bgcolor1"> |
| | | <view class="fs-27 lh-38 color2">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <image src="@/static/public/gps.png" class="w-31 h-31 shrink0" /> |
| | | <image src="@/static/detailImg/dwei.png" class="w-31 h-31 shrink0" /> |
| | | </view> |
| | | <view class="flex a-center j-between mt-31 mx-13"> |
| | | <view class="flex-column a-center"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | getComplaintDetail |
| | | } from './service' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | onLoad(params) { |
| | | this.id = params.id |
| | | getList({ |
| | | "pageNum": 1, |
| | | "pageSize": 10 |
| | | }).then(res => { |
| | | |
| | | }) |
| | | }, |
| | | methods: { |
| | | toAdd() { |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
New file |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | export const getList = (params) => { |
| | | return request.post('/api/huacheng-sangeshenbian/applet/home/todo-list', params) |
| | | } |
| | | |
| | | export const getComplaintDetail = (params) => { |
| | | return request.get('/api/huacheng-sangeshenbian/applet/complaint/detail', params) |
| | | } |
| | |
| | | </view> |
| | | <view class="mx-13 mt-33 pt-35 pb-33 px-27 br-19 flex a-center j-between bgcolor1"> |
| | | <view class="fs-27 lh-38 color2">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <image src="@/static/public/gps.png" class="w-31 h-31 shrink0" /> |
| | | <image src="@/static/detailImg/dwei.png" class="w-31 h-31 shrink0" /> |
| | | </view> |
| | | <view v-if="!unfoldFlag" class="flex a-center j-between mt-31 mx-13"> |
| | | <view class="flex-column a-center"> |
| | |
| | | </view> |
| | | <view class="mx-13 mt-33 pt-35 pb-33 px-27 br-19 flex a-center j-between bgcolor1"> |
| | | <view class="fs-27 lh-38 color2">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <image src="@/static/public/gps.png" class="w-31 h-31 shrink0" /> |
| | | <image src="@/static/detailImg/dwei.png" class="w-31 h-31 shrink0" /> |
| | | </view> |
| | | <view class="flex a-center j-between mt-31 mx-13"> |
| | | <view class="flex-column a-center"> |
| | |
| | | import request from '@/utils/request.js' |
| | | |
| | | export const list = (params) => { |
| | | return request.post(`/api/huacheng-sangeshenbian/applet/complaint/list`, params) |
| | | } |
| | | // 党员端 |
| | | // 党员端-普通商品列表 |
| | | export const getHomeGoodsSkuVOList = (params) => { |
| | | return request.post(`/goods/forepart/goods-sku/getHomeGoodsSkuVOList`, params) |
| | | // 党员端-工单详情 |
| | | export const workOrderDetail = (params) => { |
| | | return request.get(`/api/huacheng-sangeshenbian/applet/complaint/detail`, params) |
| | | } |
| | | |
| | | // 上级端 |
| | |
| | | </view> |
| | | <view class="allContent"> |
| | | <view class="topStatus"> |
| | | <view class="status">上报待上级审核</view> |
| | | <view class="status">{{['正在办理','延期办理','超时办理','已办结 ','群众撤销','上报待审核','上级驳回'][orderInfo.status] ||''}} |
| | | </view> |
| | | <view class="flex a-center j-between mb-17"> |
| | | <view class="tit">当前状态</view> |
| | | <!-- 延期状态 --> |
| | | <view v-if="false" class="flex a-center"> |
| | | <view v-if="orderInfo.status==1" class="flex a-center"> |
| | | <image src="../../static/detailImg/explain.png" class="plainIcon shrink0"></image> |
| | | <view class="explain">延期情况说明</view> |
| | | </view> |
| | | <!-- 超时状态 --> |
| | | <view v-if="true" class="flex a-center"> |
| | | <view v-if="orderInfo.status==2" class="flex a-center"> |
| | | <image src="../../static/detailImg/notice.png" class="overTimeIcon shrink0"></image> |
| | | <view class="overTime">已超时</view> |
| | | <view class="day">12</view> |
| | |
| | | |
| | | </view> |
| | | </view> |
| | | <!-- 已完结诉求信息 --> |
| | | <view class="mt-19 flex a-center j-between topMore"> |
| | | <!-- 已完结诉求信息 已办结--> |
| | | <view class="mt-19 flex a-center j-between topMore" v-if="orderInfo.status==3"> |
| | | <view class="name">诉求信息</view> |
| | | <view class="flex a-center"> |
| | | <view class="more">办理进度</view> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 上报待上级审核--待审核状态显示 --> |
| | | <view class="card1" v-if="status==3"> |
| | | <image src="../../static/detailImg/Ovaled.png" class="topIcon shrink0"></image> |
| | | <view class="infoCard"> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报人</view> |
| | | <view class="value">张三</view> |
| | | <!-- 上级驳回 --> |
| | | <view class="mt-19 flex a-center j-between topMore" v-if="orderInfo.status==6"> |
| | | <view class="name">上报情况</view> |
| | | </view> |
| | | |
| | | <!-- 上报后的状态 --> |
| | | <view class="card1" v-if="orderInfo.status==6 ||orderInfo.status==5 "> |
| | | <!-- 上报上级上级驳回--> |
| | | <view class="flex j-between" v-if="orderInfo.status==6"> |
| | | <view class="flex flex-column a-center mr-46"> |
| | | <image src="../../static/detailImg/Ovaled.png" class="topIcon shrink0"></image> |
| | | <view class="proLine"> |
| | | </view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">联系电话</view> |
| | | <view class="value">13987654321</view> |
| | | <view class="infoCard mb-46"> |
| | | <view class="flex j-between"> |
| | | <view class="label">审核时间</view> |
| | | <view class="value">张三</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">审核人</view> |
| | | <view class="value">13987654321</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">联系电话</view> |
| | | <view class="value">XXXXXXX部门</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">驳回原因</view> |
| | | <view class="value">上报说明上报说明上报说明上报上报说明上报说明上报说明上报上报说明上报说明上报说明上报</view> |
| | | </view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">所属部门</view> |
| | | <view class="value">XXXXXXX部门</view> |
| | | </view> |
| | | <!-- 上报待上级审核--待审核状态显示 --> |
| | | <view class="flex j-between"> |
| | | <view class="flex flex-column j-center mr-46"> |
| | | <image src="../../static/detailImg/Ovaled.png" class="topIcon shrink0"></image> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报时间</view> |
| | | <view class="value">2025-09-09 11:09:09</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报说明</view> |
| | | <view class="value">上报说明上报说明上报说明上报上报说明上报说明上报说明上报上报说明上报说明上报说明上报</view> |
| | | <view class="infoCard"> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报人</view> |
| | | <view class="value">{{orderInfo.reportName||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">联系电话</view> |
| | | <view class="value">{{orderInfo.contactNumber||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">所属部门</view> |
| | | <view class="value">{{orderInfo.departmentName||""}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报时间</view> |
| | | <view class="value">{{orderInfo.reportTime||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">上报说明</view> |
| | | <view class="value">{{orderInfo.comment||''}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- --> |
| | | <view class="cardInfo"> |
| | | <view class="flex j-between a-center"> |
| | | <view class="title">诉求号:7843523454</view> |
| | | <view class="flex a-center" v-if="true" @click.stop="applyOverTime"> |
| | | <view class="title">诉求号:{{orderInfo.serialNumber||''}}</view> |
| | | <view class="flex a-center" v-if="orderInfo.status==0" @click.stop="applyOverTime"> |
| | | <view class="apply">延期申请</view> |
| | | <image src="../../static/detailImg/right.png" class="rightIcon shrink0"></image> |
| | | </view> |
| | | </view> |
| | | <view class="addressCard"> |
| | | <view class="address">江苏省常州市溧阳市牛顿大道172号</view> |
| | | <view class="address">{{orderInfo.detailedAddress||""}}</view> |
| | | <image src="../../static/detailImg/dwei.png" class="addressIcon shrink0" mode="aspectFill"></image> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">创建时间</view> |
| | | <view class="value">2025-09-09 11:09:09</view> |
| | | <view class="value">{{orderInfo.createTime||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">问题类型</view> |
| | | <view class="value">教育</view> |
| | | <view class="value">{{orderInfo.problemType||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">群众</view> |
| | | <view class="value">张三</view> |
| | | <view class="value">{{orderInfo.name||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label"> 联系电话</view> |
| | | <view class="value">13987654321</view> |
| | | <view class="value">{{orderInfo.contactNumber||""}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">详细地址</view> |
| | | <view class="value">上报说明上报说明上报说明上报 |
| | | 上报说明上报说明上报说明上报说</view> |
| | | <view class="value">{{orderInfo.detailedAddress||''}}</view> |
| | | </view> |
| | | <!-- 上级端需要的字段 --> |
| | | <view class="flex j-between"> |
| | | <view class="label">录入人</view> |
| | | <view class="value">上报说明上报说明上报说明</view> |
| | | <view class="value">{{orderInfo.createBy||''}}</view> |
| | | </view> |
| | | <view class="flex j-between"> |
| | | <view class="label">录入人联系方式</view> |
| | | <view class="value">13987654321</view> |
| | | <view class="value">{{orderInfo.contactNumber||''}}</view> |
| | | </view> |
| | | <!-- 上级端需要的字段--> |
| | | </view> |
| | |
| | | <view class="problem"> |
| | | <view class="title">问题描述</view> |
| | | <view class="desc"> |
| | | <view class="top">问题标题问题标题问题标题问题标题</view> |
| | | <view class="top">{{orderInfo.descriptionTitle||""}}</view> |
| | | <view class="line1"></view> |
| | | <view class="context">问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容问题描述内容</view> |
| | | <view class="context">{{orderInfo.descriptionContent||''}}</view> |
| | | |
| | | </view> |
| | | <view class="title">描述图片</view> |
| | | <view class="descPic"> |
| | | <view class="picItem" v-for="(item,index) in 3"> |
| | | <image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
| | | class="img shrink0" mode="aspectFill"> |
| | | <view class="descPic" v-if="problemImg.length>0"> |
| | | <view class="picItem" v-for="(item,index) in problemImg"> |
| | | <image :src="item" class="img shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <view v-else class="noData">暂无数据</view> |
| | | <view class="title">描述视频</view> |
| | | <view class="descPic"> |
| | | <view class="picItem relative" v-for="(item,index) in 3"> |
| | | <!-- <image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
| | | class="img shrink0" mode="aspectFill"> |
| | | </image> --> |
| | | <!-- <video :autoplay="true" src="https://www.w3schools.com/tags/movie.mp4" |
| | | class="img shrink0"></video> --> |
| | | |
| | | |
| | | <view class="descPic" v-if="problemVideos.length>0"> |
| | | <view class="picItem relative" v-for="(item,index) in problemVideos"> |
| | | <video id="myVideo" class="videoImg shrink0" disabled :controls="false" |
| | | :show-center-play-btn="false" :src="src"> |
| | | |
| | | :show-center-play-btn="false" :src="item"> |
| | | </video> |
| | | <view class="videoOpen" @click.stop="openVideo(src)"> |
| | | <view class="videoOpen" @click.stop="openVideo(item)"> |
| | | <image src="../../static/detailImg/open.png" class="video shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 办结情况 --> |
| | | <view class=" flex a-center j-between topMore topMore1 "> |
| | | <view class="name">办结情况</view> |
| | | <view class="flex a-center"> |
| | | </view> |
| | | </view> |
| | | <!-- 办结结果描述 --> |
| | | <view class="resultDesc"> |
| | | <view class="topInfo"> |
| | | <view class="flex a-center j-between mb-15"> |
| | | <view class="flex a-center"> |
| | | <view class="name">办结人员:</view> |
| | | <view class="value">13987654321</view> |
| | | </view> |
| | | <view class="flex a-center"> |
| | | <view class="name">联系电话:</view> |
| | | <view class="value">13987654321</view> |
| | | </view> |
| | | </view> |
| | | <view class="flex a-center"> |
| | | <view class="name">办结时间:</view> |
| | | <view class="value">13987654321</view> |
| | | </view> |
| | | </view> |
| | | <view class="title">办结结果描述</view> |
| | | <view class="context"> |
| | | 1、处理措施:记录为解决该问题所采取的具体措施,包括政策宣传、处理沟通、现场处理等方式。 |
| | | 2、处理时间:记录处理该问题的时间节点,包括开始处理时间、处理完成时间等。 |
| | | 3、参与人员:记录参与处理该问题的人员名单,包括走访人员、相关部门工作人员等。 |
| | | 4、结果概述:简要描述问题的处理结果,是否得到有效解决,是否达到走访对象的期望等。 |
| | | 5、后续跟进:如需进一步跟进或处理,记录后续跟进的计划、时间节点及责任人员。 |
| | | </view> |
| | | <view class="title">描述图片</view> |
| | | <view class="descPic"> |
| | | <view class="picItem" v-for="(item,index) in 3"> |
| | | <image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
| | | class="img shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <view class="title">描述视频</view> |
| | | <view class="descPic" v-if="false"> |
| | | <view class="picItem" v-for="(item,index) in 3"> |
| | | <image src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
| | | class="img shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <view v-else class="noData">暂无数据</view> |
| | | </view> |
| | | |
| | | <!-- 详情/办理进度 --正在办理显示--> |
| | | <view class="progress"> |
| | | <!-- 办结情况 --> |
| | | <view class=" flex a-center j-between topMore topMore1" v-if="orderInfo.status==3"> |
| | | <view class="name">办结情况</view> |
| | | <view class="flex a-center"> |
| | | </view> |
| | | </view> |
| | | <!-- 办结结果描述 --> |
| | | <view class="resultDesc" v-if="orderInfo.status==3"> |
| | | <view class="topInfo"> |
| | | <view class="flex a-center j-between mb-15"> |
| | | <view class="flex a-center"> |
| | | <view class="name">办结人员:</view> |
| | | <view class="value">{{orderInfo.completionUsername||''}}</view> |
| | | </view> |
| | | <view class="flex a-center"> |
| | | <view class="name">联系电话:</view> |
| | | <view class="value">{{orderInfo.completionUserPhone||''}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="flex a-center"> |
| | | <view class="name">办结时间:</view> |
| | | <view class="value">{{orderInfo.completionTime||''}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="title">办结结果描述</view> |
| | | <view class="context">{{orderInfo.completionDescription||''}} |
| | | </view> |
| | | <view class="title">描述图片</view> |
| | | <view class="descPic" v-if="resultImg.length>0"> |
| | | <view class="picItem" v-for="(item,index) in resultImg"> |
| | | <image :src="item" class="img shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | <view v-else class="noData">暂无数据</view> |
| | | <view class="title">描述视频</view> |
| | | <view class="descPic" v-if="resultVideos.length>0"> |
| | | <view class="picItem relative" v-for="(item,index) in resultVideos"> |
| | | <video id="myVideo" class="videoImg shrink0" disabled :controls="false" |
| | | :show-center-play-btn="false" :src="item"> |
| | | </video> |
| | | <view class="videoOpen" @click.stop="openVideo(item)"> |
| | | <image src="../../static/detailImg/open.png" class="video shrink0" mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-else class="noData">暂无数据</view> |
| | | </view> |
| | | |
| | | <!-- 详情/办理进度 --正在办理-延期-超时 显示--> |
| | | <view class="progress" v-if="['0','1','2'].includes(orderInfo.status)"> |
| | | <view class="title">当前办理进度</view> |
| | | <view class="proCard"> |
| | | <view class="proItem" v-for="(item,index) in 3"> |
| | | <view class="proItem" v-for="(item,index) in progressesList"> |
| | | <view class="mr-31 flex flex-column a-center"> |
| | | <image src="../../static/detailImg/Ovaled.png" class="proIcon shrink0" mode="aspectFill"> |
| | | </image> |
| | |
| | | </view> |
| | | <view> |
| | | <view class="flex a-center j-between mb-10"> |
| | | <view class="name">李雷</view> |
| | | <view class="time">2024年9月29日11:09:09</view> |
| | | <view class="name">{{item.createByName||''}}</view> |
| | | <view class="time">{{item.createTime||''}}</view> |
| | | </view> |
| | | <view class="context">处理进度说明处理进度说明处理进度说明处理进 |
| | | 度说明处理进度说明处理进度说明处理进度说明处理进度说明</view> |
| | | <view class="context">{{item.describe||''}}</view> |
| | | <view class="proImg"> |
| | | <view class="imgOrVedio" v-for="(item,index) in 4"> |
| | | <image |
| | | src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
| | | class="img shrink0" mode="aspectFill"> |
| | | <view class="imgOrVedio" v-for="(ite,ind) in item.imgList"> |
| | | <image :src="ite" class="img shrink0" mode="aspectFill"> |
| | | </image> |
| | | <view class="openVideo" v-if="item==4"> |
| | | </view> |
| | | <view class="imgOrVedio" v-for="(ite,ind) in item.videoList "> |
| | | <video id="myVideo" class="videoImg shrink0" disabled :controls="false" |
| | | :show-center-play-btn="false" :src="ite"> |
| | | </video> |
| | | <view class="videoOpen" @click.stop="openVideo(ite)"> |
| | | <image src="../../static/detailImg/open.png" class="video shrink0" |
| | | mode="aspectFill"> |
| | | </image> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- 详情/诉求流转 --正在办理显示--> |
| | | <view class="careRequire"> |
| | | <view class="careRequire" v-if="orderInfo.status==0"> |
| | | <view class="title">诉求流转</view> |
| | | <view class="proCard"> |
| | | <view class="proItem" v-for="(item,index) in 3"> |
| | | <view class="proItem" v-for="(item,index) in flowsList"> |
| | | <view class="mr-34 flex flex-column a-center"> |
| | | <image v-if="item==3" src="../../static/detailImg/Ovaled.png" class="proIcon shrink0" |
| | | mode="aspectFill"> |
| | | <image v-if="index==flowsList.length-1" src="../../static/detailImg/Ovaled.png" |
| | | class="proIcon shrink0" mode="aspectFill"> |
| | | </image> |
| | | <image v-else src="../../static/detailImg/Ovaled.png" class="proIcon shrink0" |
| | | mode="aspectFill"> |
| | | </image> |
| | | |
| | | <view v-if="item!=3" class="proLine"> |
| | | <view v-if="index!=flowsList.length-1" class="proLine"> |
| | | </view> |
| | | </view> |
| | | <view class="requireItem"> |
| | | <view class="flex a-center j-between mb-23"> |
| | | <view class="name" :class="item==3?'opt1':''">市级下派</view> |
| | | <view class="time" :class="item==3?'opt1':''">2024年9月29日11:09:09</view> |
| | | <view class="name" :class="index==flowsList.length-1?'opt1':''">{{item.name||''}}</view> |
| | | <view class="time" :class="index==flowsList.length-1?'opt1':''">{{item.createTime||''}} |
| | | </view> |
| | | </view> |
| | | <view class="name fs-23" :class="item==3?'opt1':''">上报</view> |
| | | <view class="name fs-23" :class="index==flowsList.length-1?'opt1':''"> |
| | | {{item.type==0?"上报":'下派'}} |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- 上级显示 --> |
| | | <view class="btnButtom" v-if="false"> |
| | | <view class="btnDown">问题上报</view> |
| | | <view class="btnDown">诉求下派</view> |
| | | <view class="btnButtom" v-if="['0','1','2'].includes(orderInfo.status)"> |
| | | <view class="btnDown" @click.stop="toUp">问题上报</view> |
| | | <view class="btnDown" @click.stop="toDown">诉求下派</view> |
| | | <view class="btnAdd">添加办理进度</view> |
| | | <view class="btnAdd">办理结果录入</view> |
| | | </view> |
| | | <view class="btnButtom" v-if="false"> |
| | | <view class="btnButtom" v-if="orderInfo.status==5"> |
| | | <view class="cancel" @click.stop="showPop=true">驳回</view> |
| | | <view class="sure">审核通过</view> |
| | | </view> |
| | | <!-- 上级显示 --> |
| | | |
| | | <!-- 党员显示 --> |
| | | <view class="btnButtom" v-if="true"> |
| | | <view class="btnDown partyUp">问题上报</view> |
| | | <view class="btnButtom" v-if="['0','1','2'].includes(orderInfo.status)"> |
| | | <view class="btnDown partyUp" @click.stop="toUp">问题上报</view> |
| | | <view class="btnAdd partyDown">添加办理进度</view> |
| | | <view class="btnAdd partyDown">办理结果录入</view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | workOrderDetail, |
| | | list |
| | | } from './service.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | id: "", //工单详情ID |
| | | orderInfo: {}, //工单详情 |
| | | problemVideos: [], //描述视频 |
| | | problemImg: [], //描述图片 |
| | | resultVideos: [], //结果描述视频 |
| | | resultImg: [], //结果描述图片 |
| | | progressesList: [], //诉求流转记录 |
| | | flowsList: [], //办理进度 |
| | | |
| | | showPop: false, //弹窗驳回 |
| | | rejectText: "", //驳回原因 |
| | | |
| | | status: '2', //1 正在办理2已完结 |
| | | |
| | | scoreTopHeight: 0, //距离顶部多高 |
| | | |
| | | src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4' |
| | | |
| | | }; |
| | | }, |
| | | onPageScroll(e) { |
| | |
| | | |
| | | }, |
| | | onShow() { |
| | | list({ |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }).then(res => { |
| | | |
| | | }) |
| | | }, |
| | | methods: { |
| | | open() {}, |
| | |
| | | }, |
| | | // 获取订单详情信息 |
| | | getDetailInfo() { |
| | | workOrderDetail({ |
| | | id: this.id |
| | | }).then(res => { |
| | | if (res.data.images) { |
| | | this.problemImg = res.data.images.split(',') |
| | | } |
| | | if (res.data.videos) { |
| | | this.problemVideos = res.data.videos.split(',') |
| | | } |
| | | if (res.data.completionImages) { |
| | | this.resultImg = res.data.completionImages.split(',') |
| | | } |
| | | if (res.data.completionVideos) { |
| | | this.resultVideos = res.data.completionVideos.split(',') |
| | | } |
| | | // 办理进度 |
| | | if (res.data.complaintProgresses.length > 0) { |
| | | this.progressesList = res.data.complaintProgresses.map((item) => { |
| | | return { |
| | | ...item, |
| | | imgList: item.imgUrl ? item.imgUrl.split(',') : [], |
| | | videoList: item.video ? item.video.split(',') : [], |
| | | } |
| | | }) |
| | | } |
| | | // 诉求流转记录 |
| | | if (res.data.complaintFlows.length > 0) { |
| | | this.flowsList = res.data.complaintFlows |
| | | } |
| | | |
| | | this.orderInfo = { |
| | | ...res.data |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | // 确认驳回 |
| | | submitReject() { |
| | |
| | | applyOverTime() { |
| | | uni.navigateTo({ |
| | | url: `/pages/work-detail/postpone-apply` |
| | | }) |
| | | }, |
| | | // 问题上报 |
| | | toUp() { |
| | | uni.navigateTo({ |
| | | url: `/pages/problemReporting/problemReporting?id=${this.id}` |
| | | }) |
| | | }, |
| | | // 问题下派 |
| | | toDown() { |
| | | uni.navigateTo({ |
| | | url: `/pages/dispatchWorkOrder/dispatchWorkOrder?id=${this.id}` |
| | | }) |
| | | }, |
| | | } |
| | |
| | | |
| | | .card1 { |
| | | margin-top: 21rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | |
| | | .topIcon { |
| | | margin-top: 17rpx; |
| | | width: 26.23rpx; |
| | | height: 26.23rpx; |
| | | margin-right: 46rpx; |
| | | |
| | | } |
| | | |
| | | .proLine { |
| | | flex: 1; |
| | | width: 4rpx; |
| | | min-height: 50rpx; |
| | | background: rgba(0, 0, 0, 0.06); |
| | | border-radius: 3rpx; |
| | | } |
| | | |
| | | .infoCard { |
| | |
| | | margin-top: 19rpx; |
| | | } |
| | | |
| | | .openVideo { |
| | | .videoOpen { |
| | | position: absolute; |
| | | top: 19rpx; |
| | | top: 10rpx; |
| | | left: 0; |
| | | z-index: 99; |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | border-radius: 8rpx; |
| | |
| | | justify-content: center; |
| | | |
| | | .video { |
| | | z-index: 999; |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | } |
New file |
| | |
| | | ## 1.0.8(2024-03-28) |
| | | - 修复 在vue2下:style动态绑定导致编译失败的bug |
| | | ## 1.0.7(2024-01-20) |
| | | - 修复 长文本回显超过容器的bug,超过容器部分显示省略号 |
| | | ## 1.0.6(2023-04-12) |
| | | - 修复 微信小程序点击时会改变背景颜色的 bug |
| | | ## 1.0.5(2023-02-03) |
| | | - 修复 禁用时会显示清空按钮 |
| | | ## 1.0.4(2023-02-02) |
| | | - 优化 查询条件短期内多次变更只查询最后一次变更后的结果 |
| | | - 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue |
| | | ## 1.0.3(2023-01-16) |
| | | - 修复 不关联服务空间报错的问题 |
| | | ## 1.0.2(2023-01-14) |
| | | - 新增 属性 `format` 可用于格式化显示选项内容 |
| | | ## 1.0.1(2022-12-06) |
| | | - 修复 当where变化时,数据不会自动更新的问题 |
| | | ## 0.1.9(2022-09-05) |
| | | - 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框 |
| | | ## 0.1.8(2022-08-29) |
| | | - 修复 点击的位置不准确 |
| | | ## 0.1.7(2022-08-12) |
| | | - 新增 支持 disabled 属性 |
| | | ## 0.1.6(2022-07-06) |
| | | - 修复 pc端宽度异常的bug |
| | | ## 0.1.5 |
| | | - 修复 pc端宽度异常的bug |
| | | ## 0.1.4(2022-07-05) |
| | | - 优化 显示样式 |
| | | ## 0.1.3(2022-06-02) |
| | | - 修复 localdata 赋值不生效的 bug |
| | | - 新增 支持 uni.scss 修改颜色 |
| | | - 新增 支持选项禁用(数据选项设置 disabled: true 即禁用) |
| | | ## 0.1.2(2022-05-08) |
| | | - 修复 当 value 为 0 时选择不生效的 bug |
| | | ## 0.1.1(2022-05-07) |
| | | - 新增 记住上次的选项(仅 collection 存在时有效) |
| | | ## 0.1.0(2022-04-22) |
| | | - 初始化 |
New file |
| | |
| | | <template> |
| | | <view class="uni-stat__select"> |
| | | <span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span> |
| | | <view class="uni-stat-box" :class="{'uni-stat__actived': current}"> |
| | | <view class="uni-select" :class="{'uni-select--disabled':disabled}"> |
| | | <view class="uni-select__input-box" @click="toggleSelector"> |
| | | <view v-if="current" class="uni-select__input-text">{{textShow}}</view> |
| | | <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view> |
| | | <!-- <view v-if="current && clear && !disabled" @click.stop="clearVal"> |
| | | <uni-icons type="clear" color="#c0c4cc" size="24" /> |
| | | </view> --> |
| | | <view> |
| | | <u-icon :name="showSelector?'arrow-up':'arrow-down'"></u-icon> |
| | | <!-- <uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" /> --> |
| | | </view> |
| | | </view> |
| | | <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" /> |
| | | <view class="uni-select__selector" :style="getOffsetByPlacement" v-if="showSelector"> |
| | | <view :class="placement=='bottom'?'uni-popper__arrow_bottom':'uni-popper__arrow_top'"></view> |
| | | <scroll-view scroll-y="true" class="uni-select__selector-scroll"> |
| | | <view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0"> |
| | | <text>{{emptyTips}}</text> |
| | | </view> |
| | | <view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" |
| | | :key="index" @click="change(item)"> |
| | | <text |
| | | :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * DataChecklist 数据选择器 |
| | | * @description 通过数据渲染的下拉框组件 |
| | | * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select |
| | | * @property {String} value 默认值 |
| | | * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}] |
| | | * @property {Boolean} clear 是否可以清空已选项 |
| | | * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效 |
| | | * @property {String} label 左侧标题 |
| | | * @property {String} placeholder 输入框的提示文字 |
| | | * @property {Boolean} disabled 是否禁用 |
| | | * @property {String} placement 弹出位置 |
| | | * @value top 顶部弹出 |
| | | * @value bottom 底部弹出(default) |
| | | * @event {Function} change 选中发生变化触发 |
| | | */ |
| | | |
| | | export default { |
| | | name: "uni-data-select", |
| | | mixins: [uniCloud.mixinDatacom || {}], |
| | | props: { |
| | | localdata: { |
| | | type: Array, |
| | | default () { |
| | | return [] |
| | | } |
| | | }, |
| | | value: { |
| | | type: [String, Number], |
| | | default: '' |
| | | }, |
| | | modelValue: { |
| | | type: [String, Number], |
| | | default: '' |
| | | }, |
| | | label: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: '请选择' |
| | | }, |
| | | emptyTips: { |
| | | type: String, |
| | | default: '无选项' |
| | | }, |
| | | clear: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | defItem: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}" |
| | | format: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | placement: { |
| | | type: String, |
| | | default: 'bottom' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | showSelector: false, |
| | | current: '', |
| | | mixinDatacomResData: [], |
| | | apps: [], |
| | | channels: [], |
| | | cacheKey: "uni-data-select-lastSelectedValue", |
| | | }; |
| | | }, |
| | | created() { |
| | | this.debounceGet = this.debounce(() => { |
| | | this.query(); |
| | | }, 300); |
| | | if (this.collection && !this.localdata.length) { |
| | | this.debounceGet(); |
| | | } |
| | | }, |
| | | computed: { |
| | | typePlaceholder() { |
| | | const text = { |
| | | 'opendb-stat-app-versions': '版本', |
| | | 'opendb-app-channels': '渠道', |
| | | 'opendb-app-list': '应用' |
| | | } |
| | | const common = this.placeholder |
| | | const placeholder = text[this.collection] |
| | | return placeholder ? |
| | | common + placeholder : |
| | | common |
| | | }, |
| | | valueCom() { |
| | | // #ifdef VUE3 |
| | | return this.modelValue; |
| | | // #endif |
| | | // #ifndef VUE3 |
| | | return this.value; |
| | | // #endif |
| | | }, |
| | | textShow() { |
| | | // 长文本显示 |
| | | let text = this.current; |
| | | if (text.length > 10) { |
| | | return text.slice(0, 25) + '...'; |
| | | } |
| | | return text; |
| | | }, |
| | | getOffsetByPlacement() { |
| | | switch (this.placement) { |
| | | case 'top': |
| | | return "bottom:calc(100% + 12px);"; |
| | | case 'bottom': |
| | | return "top:calc(100% + 12px);"; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | localdata: { |
| | | immediate: true, |
| | | handler(val, old) { |
| | | if (Array.isArray(val) && old !== val) { |
| | | this.mixinDatacomResData = val |
| | | } |
| | | } |
| | | }, |
| | | valueCom(val, old) { |
| | | this.initDefVal() |
| | | }, |
| | | mixinDatacomResData: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (val.length) { |
| | | this.initDefVal() |
| | | } |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | methods: { |
| | | debounce(fn, time = 100) { |
| | | let timer = null |
| | | return function(...args) { |
| | | if (timer) clearTimeout(timer) |
| | | timer = setTimeout(() => { |
| | | fn.apply(this, args) |
| | | }, time) |
| | | } |
| | | }, |
| | | // 执行数据库查询 |
| | | query() { |
| | | this.mixinDatacomEasyGet(); |
| | | }, |
| | | // 监听查询条件变更事件 |
| | | onMixinDatacomPropsChange() { |
| | | if (this.collection) { |
| | | this.debounceGet(); |
| | | } |
| | | }, |
| | | initDefVal() { |
| | | let defValue = '' |
| | | if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) { |
| | | defValue = this.valueCom |
| | | } else { |
| | | let strogeValue |
| | | if (this.collection) { |
| | | strogeValue = this.getCache() |
| | | } |
| | | if (strogeValue || strogeValue === 0) { |
| | | defValue = strogeValue |
| | | } else { |
| | | let defItem = '' |
| | | if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) { |
| | | defItem = this.mixinDatacomResData[this.defItem - 1].value |
| | | } |
| | | defValue = defItem |
| | | } |
| | | if (defValue || defValue === 0) { |
| | | this.emit(defValue) |
| | | } |
| | | } |
| | | const def = this.mixinDatacomResData.find(item => item.value === defValue) |
| | | this.current = def ? this.formatItemName(def) : '' |
| | | }, |
| | | |
| | | /** |
| | | * @param {[String, Number]} value |
| | | * 判断用户给的 value 是否同时为禁用状态 |
| | | */ |
| | | isDisabled(value) { |
| | | let isDisabled = false; |
| | | |
| | | this.mixinDatacomResData.forEach(item => { |
| | | if (item.value === value) { |
| | | isDisabled = item.disable |
| | | } |
| | | }) |
| | | |
| | | return isDisabled; |
| | | }, |
| | | |
| | | clearVal() { |
| | | this.emit('') |
| | | if (this.collection) { |
| | | this.removeCache() |
| | | } |
| | | }, |
| | | change(item) { |
| | | if (!item.disable) { |
| | | this.showSelector = false |
| | | this.current = this.formatItemName(item) |
| | | this.emit(item.value) |
| | | } |
| | | }, |
| | | emit(val) { |
| | | this.$emit('input', val) |
| | | this.$emit('update:modelValue', val) |
| | | this.$emit('change', val) |
| | | if (this.collection) { |
| | | this.setCache(val); |
| | | } |
| | | }, |
| | | toggleSelector() { |
| | | if (this.disabled) { |
| | | return |
| | | } |
| | | |
| | | this.showSelector = !this.showSelector |
| | | }, |
| | | formatItemName(item) { |
| | | let { |
| | | text, |
| | | value, |
| | | channel_code |
| | | } = item |
| | | channel_code = channel_code ? `(${channel_code})` : '' |
| | | |
| | | if (this.format) { |
| | | // 格式化输出 |
| | | let str = ""; |
| | | str = this.format; |
| | | for (let key in item) { |
| | | str = str.replace(new RegExp(`{${key}}`, "g"), item[key]); |
| | | } |
| | | return str; |
| | | } else { |
| | | return this.collection.indexOf('app-list') > 0 ? |
| | | `${text}(${value})` : |
| | | ( |
| | | text ? |
| | | text : |
| | | `未命名${channel_code}` |
| | | ) |
| | | } |
| | | }, |
| | | // 获取当前加载的数据 |
| | | getLoadData() { |
| | | return this.mixinDatacomResData; |
| | | }, |
| | | // 获取当前缓存key |
| | | getCurrentCacheKey() { |
| | | return this.collection; |
| | | }, |
| | | // 获取缓存 |
| | | getCache(name = this.getCurrentCacheKey()) { |
| | | let cacheData = uni.getStorageSync(this.cacheKey) || {}; |
| | | return cacheData[name]; |
| | | }, |
| | | // 设置缓存 |
| | | setCache(value, name = this.getCurrentCacheKey()) { |
| | | let cacheData = uni.getStorageSync(this.cacheKey) || {}; |
| | | cacheData[name] = value; |
| | | uni.setStorageSync(this.cacheKey, cacheData); |
| | | }, |
| | | // 删除缓存 |
| | | removeCache(name = this.getCurrentCacheKey()) { |
| | | let cacheData = uni.getStorageSync(this.cacheKey) || {}; |
| | | delete cacheData[name]; |
| | | uni.setStorageSync(this.cacheKey, cacheData); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | $uni-base-color: #6a6a6a !default; |
| | | $uni-main-color: #333 !default; |
| | | $uni-secondary-color: #909399 !default; |
| | | $uni-border-3: #e5e5e5; |
| | | |
| | | /* #ifndef APP-NVUE */ |
| | | @media screen and (max-width: 500px) { |
| | | .hide-on-phone { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | /* #endif */ |
| | | .uni-stat__select { |
| | | display: flex; |
| | | align-items: center; |
| | | // padding: 15px; |
| | | /* #ifdef H5 */ |
| | | cursor: pointer; |
| | | /* #endif */ |
| | | width: 100%; |
| | | flex: 1; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .uni-stat-box { |
| | | width: 100%; |
| | | flex: 1; |
| | | } |
| | | |
| | | .uni-stat__actived { |
| | | width: 100%; |
| | | flex: 1; |
| | | // outline: 1px solid #2979ff; |
| | | } |
| | | |
| | | .uni-label-text { |
| | | font-size: 14px; |
| | | font-weight: bold; |
| | | color: $uni-base-color; |
| | | margin: auto 0; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .uni-select { |
| | | font-size: 14px; |
| | | border: 1px solid $uni-border-3; |
| | | box-sizing: border-box; |
| | | border-radius: 4px; |
| | | padding: 0 5px; |
| | | padding-left: 10px; |
| | | position: relative; |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | user-select: none; |
| | | /* #endif */ |
| | | flex-direction: row; |
| | | align-items: center; |
| | | border-bottom: solid 1px $uni-border-3; |
| | | width: 100%; |
| | | flex: 1; |
| | | height: 35px; |
| | | |
| | | &--disabled { |
| | | background-color: #f5f7fa; |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | | |
| | | .uni-select__label { |
| | | font-size: 16px; |
| | | // line-height: 22px; |
| | | height: 35px; |
| | | padding-right: 10px; |
| | | color: $uni-secondary-color; |
| | | } |
| | | |
| | | .uni-select__input-box { |
| | | height: 35px; |
| | | position: relative; |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | /* #endif */ |
| | | flex: 1; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | } |
| | | |
| | | .uni-select__input { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | } |
| | | |
| | | .uni-select__input-plac { |
| | | font-size: 14px; |
| | | color: $uni-secondary-color; |
| | | } |
| | | |
| | | .uni-select__selector { |
| | | /* #ifndef APP-NVUE */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | position: absolute; |
| | | left: 0; |
| | | width: 100%; |
| | | background-color: #FFFFFF; |
| | | border: 1px solid #EBEEF5; |
| | | border-radius: 6px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | z-index: 3; |
| | | padding: 4px 0; |
| | | } |
| | | |
| | | .uni-select__selector-scroll { |
| | | /* #ifndef APP-NVUE */ |
| | | max-height: 200px; |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | } |
| | | |
| | | /* #ifdef H5 */ |
| | | @media (min-width: 768px) { |
| | | .uni-select__selector-scroll { |
| | | max-height: 600px; |
| | | } |
| | | } |
| | | |
| | | /* #endif */ |
| | | |
| | | .uni-select__selector-empty, |
| | | .uni-select__selector-item { |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | cursor: pointer; |
| | | /* #endif */ |
| | | line-height: 35px; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | /* border-bottom: solid 1px $uni-border-3; */ |
| | | padding: 0px 10px; |
| | | } |
| | | |
| | | .uni-select__selector-item:hover { |
| | | background-color: #f9f9f9; |
| | | } |
| | | |
| | | .uni-select__selector-empty:last-child, |
| | | .uni-select__selector-item:last-child { |
| | | /* #ifndef APP-NVUE */ |
| | | border-bottom: none; |
| | | /* #endif */ |
| | | } |
| | | |
| | | .uni-select__selector__disabled { |
| | | opacity: 0.4; |
| | | cursor: default; |
| | | } |
| | | |
| | | /* picker 弹出层通用的指示小三角 */ |
| | | .uni-popper__arrow_bottom, |
| | | .uni-popper__arrow_bottom::after, |
| | | .uni-popper__arrow_top, |
| | | .uni-popper__arrow_top::after, |
| | | { |
| | | position: absolute; |
| | | display: block; |
| | | width: 0; |
| | | height: 0; |
| | | border-color: transparent; |
| | | border-style: solid; |
| | | border-width: 6px; |
| | | } |
| | | |
| | | .uni-popper__arrow_bottom { |
| | | filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); |
| | | top: -6px; |
| | | left: 10%; |
| | | margin-right: 3px; |
| | | border-top-width: 0; |
| | | border-bottom-color: #EBEEF5; |
| | | } |
| | | |
| | | .uni-popper__arrow_bottom::after { |
| | | content: " "; |
| | | top: 1px; |
| | | margin-left: -6px; |
| | | border-top-width: 0; |
| | | border-bottom-color: #fff; |
| | | } |
| | | |
| | | .uni-popper__arrow_top { |
| | | filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); |
| | | bottom: -6px; |
| | | left: 10%; |
| | | margin-right: 3px; |
| | | border-bottom-width: 0; |
| | | border-top-color: #EBEEF5; |
| | | } |
| | | |
| | | .uni-popper__arrow_top::after { |
| | | content: " "; |
| | | bottom: 1px; |
| | | margin-left: -6px; |
| | | border-bottom-width: 0; |
| | | border-top-color: #fff; |
| | | } |
| | | |
| | | |
| | | .uni-select__input-text { |
| | | // width: 280px; |
| | | width: 100%; |
| | | color: $uni-main-color; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | -o-text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .uni-select__input-placeholder { |
| | | color: $uni-base-color; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .uni-select--mask { |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | right: 0; |
| | | left: 0; |
| | | z-index: 2; |
| | | } |
| | | </style> |
New file |
| | |
| | | { |
| | | "id": "uni-data-select", |
| | | "displayName": "uni-data-select 下拉框选择器", |
| | | "version": "1.0.8", |
| | | "description": "通过数据驱动的下拉框选择器", |
| | | "keywords": [ |
| | | "uni-ui", |
| | | "select", |
| | | "uni-data-select", |
| | | "下拉框", |
| | | "下拉选" |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "^3.1.1" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | | }, |
| | | "dcloudext": { |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "无", |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", |
| | | "type": "component-vue" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": ["uni-load-more"], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y", |
| | | "alipay": "n" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "u", |
| | | "app-nvue": "n" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "u", |
| | | "百度": "u", |
| | | "字节跳动": "u", |
| | | "QQ": "u", |
| | | "京东": "u" |
| | | }, |
| | | "快应用": { |
| | | "华为": "u", |
| | | "联盟": "u" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | ## DataSelect 下拉框选择器 |
| | | > **组件名:uni-data-select** |
| | | > 代码块: `uDataSelect` |
| | | |
| | | 当选项过多时,使用下拉菜单展示并选择内容 |
| | | |
| | | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select) |
| | | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 |
New file |
| | |
| | | ## 2.0.10(2024-06-07) |
| | | - 优化 uni-app x 中,size 属性的类型 |
| | | ## 2.0.9(2024-01-12) |
| | | fix: 修复图标大小默认值错误的问题 |
| | | ## 2.0.8(2023-12-14) |
| | | - 修复 项目未使用 ts 情况下,打包报错的bug |
| | | ## 2.0.7(2023-12-14) |
| | | - 修复 size 属性为 string 时,不加单位导致尺寸异常的bug |
| | | ## 2.0.6(2023-12-11) |
| | | - 优化 兼容老版本icon类型,如 top ,bottom 等 |
| | | ## 2.0.5(2023-12-11) |
| | | - 优化 兼容老版本icon类型,如 top ,bottom 等 |
| | | ## 2.0.4(2023-12-06) |
| | | - 优化 uni-app x 下示例项目图标排序 |
| | | ## 2.0.3(2023-12-06) |
| | | - 修复 nvue下引入组件报错的bug |
| | | ## 2.0.2(2023-12-05) |
| | | -优化 size 属性支持单位 |
| | | ## 2.0.1(2023-12-05) |
| | | - 新增 uni-app x 支持定义图标 |
| | | ## 1.3.5(2022-01-24) |
| | | - 优化 size 属性可以传入不带单位的字符串数值 |
| | | ## 1.3.4(2022-01-24) |
| | | - 优化 size 支持其他单位 |
| | | ## 1.3.3(2022-01-17) |
| | | - 修复 nvue 有些图标不显示的bug,兼容老版本图标 |
| | | ## 1.3.2(2021-12-01) |
| | | - 优化 示例可复制图标名称 |
| | | ## 1.3.1(2021-11-23) |
| | | - 优化 兼容旧组件 type 值 |
| | | ## 1.3.0(2021-11-19) |
| | | - 新增 更多图标 |
| | | - 优化 自定义图标使用方式 |
| | | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) |
| | | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) |
| | | ## 1.1.7(2021-11-08) |
| | | ## 1.2.0(2021-07-30) |
| | | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) |
| | | ## 1.1.5(2021-05-12) |
| | | - 新增 组件示例地址 |
| | | ## 1.1.4(2021-02-05) |
| | | - 调整为uni_modules目录规范 |
New file |
| | |
| | | <template> |
| | | <text class="uni-icons" :style="styleObj"> |
| | | <slot>{{unicode}}</slot> |
| | | </text> |
| | | </template> |
| | | |
| | | <script> |
| | | import { fontData, IconsDataItem } from './uniicons_file' |
| | | |
| | | /** |
| | | * Icons 图标 |
| | | * @description 用于展示 icon 图标 |
| | | * @tutorial https://ext.dcloud.net.cn/plugin?id=28 |
| | | * @property {Number,String} size 图标大小 |
| | | * @property {String} type 图标图案,参考示例 |
| | | * @property {String} color 图标颜色 |
| | | * @property {String} customPrefix 自定义图标 |
| | | * @event {Function} click 点击 Icon 触发事件 |
| | | */ |
| | | export default { |
| | | name: "uni-icons", |
| | | props: { |
| | | type: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | color: { |
| | | type: String, |
| | | default: '#333333' |
| | | }, |
| | | size: { |
| | | type: [Number, String], |
| | | default: 16 |
| | | }, |
| | | fontFamily: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | computed: { |
| | | unicode() : string { |
| | | let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type }) |
| | | if (codes !== null) { |
| | | return codes.unicode |
| | | } |
| | | return '' |
| | | }, |
| | | iconSize() : string { |
| | | const size = this.size |
| | | if (typeof size == 'string') { |
| | | const reg = /^[0-9]*$/g |
| | | return reg.test(size as string) ? '' + size + 'px' : '' + size; |
| | | // return '' + this.size |
| | | } |
| | | return this.getFontSize(size as number) |
| | | }, |
| | | styleObj() : UTSJSONObject { |
| | | if (this.fontFamily !== '') { |
| | | return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily } |
| | | } |
| | | return { color: this.color, fontSize: this.iconSize } |
| | | } |
| | | }, |
| | | created() { }, |
| | | methods: { |
| | | /** |
| | | * 字体大小 |
| | | */ |
| | | getFontSize(size : number) : string { |
| | | return size + 'px'; |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @font-face { |
| | | font-family: UniIconsFontFamily; |
| | | src: url('./uniicons.ttf'); |
| | | } |
| | | |
| | | .uni-icons { |
| | | font-family: UniIconsFontFamily; |
| | | font-size: 18px; |
| | | font-style: normal; |
| | | color: #333; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text> |
| | | <!-- #endif --> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"> |
| | | <slot></slot> |
| | | </text> |
| | | <!-- #endif --> |
| | | </template> |
| | | |
| | | <script> |
| | | import { fontData } from './uniicons_file_vue.js'; |
| | | |
| | | const getVal = (val) => { |
| | | const reg = /^[0-9]*$/g |
| | | return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val; |
| | | } |
| | | |
| | | // #ifdef APP-NVUE |
| | | var domModule = weex.requireModule('dom'); |
| | | import iconUrl from './uniicons.ttf' |
| | | domModule.addRule('fontFace', { |
| | | 'fontFamily': "uniicons", |
| | | 'src': "url('" + iconUrl + "')" |
| | | }); |
| | | // #endif |
| | | |
| | | /** |
| | | * Icons 图标 |
| | | * @description 用于展示 icons 图标 |
| | | * @tutorial https://ext.dcloud.net.cn/plugin?id=28 |
| | | * @property {Number} size 图标大小 |
| | | * @property {String} type 图标图案,参考示例 |
| | | * @property {String} color 图标颜色 |
| | | * @property {String} customPrefix 自定义图标 |
| | | * @event {Function} click 点击 Icon 触发事件 |
| | | */ |
| | | export default { |
| | | name: 'UniIcons', |
| | | emits: ['click'], |
| | | props: { |
| | | type: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | color: { |
| | | type: String, |
| | | default: '#333333' |
| | | }, |
| | | size: { |
| | | type: [Number, String], |
| | | default: 16 |
| | | }, |
| | | customPrefix: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | fontFamily: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | icons: fontData |
| | | } |
| | | }, |
| | | computed: { |
| | | unicode() { |
| | | let code = this.icons.find(v => v.font_class === this.type) |
| | | if (code) { |
| | | return code.unicode |
| | | } |
| | | return '' |
| | | }, |
| | | iconSize() { |
| | | return getVal(this.size) |
| | | }, |
| | | styleObj() { |
| | | if (this.fontFamily !== '') { |
| | | return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};` |
| | | } |
| | | return `color: ${this.color}; font-size: ${this.iconSize};` |
| | | } |
| | | }, |
| | | methods: { |
| | | _onClick() { |
| | | this.$emit('click') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | /* #ifndef APP-NVUE */ |
| | | @import './uniicons.css'; |
| | | |
| | | @font-face { |
| | | font-family: uniicons; |
| | | src: url('./uniicons.ttf'); |
| | | } |
| | | |
| | | /* #endif */ |
| | | .uni-icons { |
| | | font-family: uniicons; |
| | | text-decoration: none; |
| | | text-align: center; |
| | | } |
| | | </style> |
New file |
| | |
| | | |
| | | .uniui-cart-filled:before { |
| | | content: "\e6d0"; |
| | | } |
| | | |
| | | .uniui-gift-filled:before { |
| | | content: "\e6c4"; |
| | | } |
| | | |
| | | .uniui-color:before { |
| | | content: "\e6cf"; |
| | | } |
| | | |
| | | .uniui-wallet:before { |
| | | content: "\e6b1"; |
| | | } |
| | | |
| | | .uniui-settings-filled:before { |
| | | content: "\e6ce"; |
| | | } |
| | | |
| | | .uniui-auth-filled:before { |
| | | content: "\e6cc"; |
| | | } |
| | | |
| | | .uniui-shop-filled:before { |
| | | content: "\e6cd"; |
| | | } |
| | | |
| | | .uniui-staff-filled:before { |
| | | content: "\e6cb"; |
| | | } |
| | | |
| | | .uniui-vip-filled:before { |
| | | content: "\e6c6"; |
| | | } |
| | | |
| | | .uniui-plus-filled:before { |
| | | content: "\e6c7"; |
| | | } |
| | | |
| | | .uniui-folder-add-filled:before { |
| | | content: "\e6c8"; |
| | | } |
| | | |
| | | .uniui-color-filled:before { |
| | | content: "\e6c9"; |
| | | } |
| | | |
| | | .uniui-tune-filled:before { |
| | | content: "\e6ca"; |
| | | } |
| | | |
| | | .uniui-calendar-filled:before { |
| | | content: "\e6c0"; |
| | | } |
| | | |
| | | .uniui-notification-filled:before { |
| | | content: "\e6c1"; |
| | | } |
| | | |
| | | .uniui-wallet-filled:before { |
| | | content: "\e6c2"; |
| | | } |
| | | |
| | | .uniui-medal-filled:before { |
| | | content: "\e6c3"; |
| | | } |
| | | |
| | | .uniui-fire-filled:before { |
| | | content: "\e6c5"; |
| | | } |
| | | |
| | | .uniui-refreshempty:before { |
| | | content: "\e6bf"; |
| | | } |
| | | |
| | | .uniui-location-filled:before { |
| | | content: "\e6af"; |
| | | } |
| | | |
| | | .uniui-person-filled:before { |
| | | content: "\e69d"; |
| | | } |
| | | |
| | | .uniui-personadd-filled:before { |
| | | content: "\e698"; |
| | | } |
| | | |
| | | .uniui-arrowthinleft:before { |
| | | content: "\e6d2"; |
| | | } |
| | | |
| | | .uniui-arrowthinup:before { |
| | | content: "\e6d3"; |
| | | } |
| | | |
| | | .uniui-arrowthindown:before { |
| | | content: "\e6d4"; |
| | | } |
| | | |
| | | .uniui-back:before { |
| | | content: "\e6b9"; |
| | | } |
| | | |
| | | .uniui-forward:before { |
| | | content: "\e6ba"; |
| | | } |
| | | |
| | | .uniui-arrow-right:before { |
| | | content: "\e6bb"; |
| | | } |
| | | |
| | | .uniui-arrow-left:before { |
| | | content: "\e6bc"; |
| | | } |
| | | |
| | | .uniui-arrow-up:before { |
| | | content: "\e6bd"; |
| | | } |
| | | |
| | | .uniui-arrow-down:before { |
| | | content: "\e6be"; |
| | | } |
| | | |
| | | .uniui-arrowthinright:before { |
| | | content: "\e6d1"; |
| | | } |
| | | |
| | | .uniui-down:before { |
| | | content: "\e6b8"; |
| | | } |
| | | |
| | | .uniui-bottom:before { |
| | | content: "\e6b8"; |
| | | } |
| | | |
| | | .uniui-arrowright:before { |
| | | content: "\e6d5"; |
| | | } |
| | | |
| | | .uniui-right:before { |
| | | content: "\e6b5"; |
| | | } |
| | | |
| | | .uniui-up:before { |
| | | content: "\e6b6"; |
| | | } |
| | | |
| | | .uniui-top:before { |
| | | content: "\e6b6"; |
| | | } |
| | | |
| | | .uniui-left:before { |
| | | content: "\e6b7"; |
| | | } |
| | | |
| | | .uniui-arrowup:before { |
| | | content: "\e6d6"; |
| | | } |
| | | |
| | | .uniui-eye:before { |
| | | content: "\e651"; |
| | | } |
| | | |
| | | .uniui-eye-filled:before { |
| | | content: "\e66a"; |
| | | } |
| | | |
| | | .uniui-eye-slash:before { |
| | | content: "\e6b3"; |
| | | } |
| | | |
| | | .uniui-eye-slash-filled:before { |
| | | content: "\e6b4"; |
| | | } |
| | | |
| | | .uniui-info-filled:before { |
| | | content: "\e649"; |
| | | } |
| | | |
| | | .uniui-reload:before { |
| | | content: "\e6b2"; |
| | | } |
| | | |
| | | .uniui-micoff-filled:before { |
| | | content: "\e6b0"; |
| | | } |
| | | |
| | | .uniui-map-pin-ellipse:before { |
| | | content: "\e6ac"; |
| | | } |
| | | |
| | | .uniui-map-pin:before { |
| | | content: "\e6ad"; |
| | | } |
| | | |
| | | .uniui-location:before { |
| | | content: "\e6ae"; |
| | | } |
| | | |
| | | .uniui-starhalf:before { |
| | | content: "\e683"; |
| | | } |
| | | |
| | | .uniui-star:before { |
| | | content: "\e688"; |
| | | } |
| | | |
| | | .uniui-star-filled:before { |
| | | content: "\e68f"; |
| | | } |
| | | |
| | | .uniui-calendar:before { |
| | | content: "\e6a0"; |
| | | } |
| | | |
| | | .uniui-fire:before { |
| | | content: "\e6a1"; |
| | | } |
| | | |
| | | .uniui-medal:before { |
| | | content: "\e6a2"; |
| | | } |
| | | |
| | | .uniui-font:before { |
| | | content: "\e6a3"; |
| | | } |
| | | |
| | | .uniui-gift:before { |
| | | content: "\e6a4"; |
| | | } |
| | | |
| | | .uniui-link:before { |
| | | content: "\e6a5"; |
| | | } |
| | | |
| | | .uniui-notification:before { |
| | | content: "\e6a6"; |
| | | } |
| | | |
| | | .uniui-staff:before { |
| | | content: "\e6a7"; |
| | | } |
| | | |
| | | .uniui-vip:before { |
| | | content: "\e6a8"; |
| | | } |
| | | |
| | | .uniui-folder-add:before { |
| | | content: "\e6a9"; |
| | | } |
| | | |
| | | .uniui-tune:before { |
| | | content: "\e6aa"; |
| | | } |
| | | |
| | | .uniui-auth:before { |
| | | content: "\e6ab"; |
| | | } |
| | | |
| | | .uniui-person:before { |
| | | content: "\e699"; |
| | | } |
| | | |
| | | .uniui-email-filled:before { |
| | | content: "\e69a"; |
| | | } |
| | | |
| | | .uniui-phone-filled:before { |
| | | content: "\e69b"; |
| | | } |
| | | |
| | | .uniui-phone:before { |
| | | content: "\e69c"; |
| | | } |
| | | |
| | | .uniui-email:before { |
| | | content: "\e69e"; |
| | | } |
| | | |
| | | .uniui-personadd:before { |
| | | content: "\e69f"; |
| | | } |
| | | |
| | | .uniui-chatboxes-filled:before { |
| | | content: "\e692"; |
| | | } |
| | | |
| | | .uniui-contact:before { |
| | | content: "\e693"; |
| | | } |
| | | |
| | | .uniui-chatbubble-filled:before { |
| | | content: "\e694"; |
| | | } |
| | | |
| | | .uniui-contact-filled:before { |
| | | content: "\e695"; |
| | | } |
| | | |
| | | .uniui-chatboxes:before { |
| | | content: "\e696"; |
| | | } |
| | | |
| | | .uniui-chatbubble:before { |
| | | content: "\e697"; |
| | | } |
| | | |
| | | .uniui-upload-filled:before { |
| | | content: "\e68e"; |
| | | } |
| | | |
| | | .uniui-upload:before { |
| | | content: "\e690"; |
| | | } |
| | | |
| | | .uniui-weixin:before { |
| | | content: "\e691"; |
| | | } |
| | | |
| | | .uniui-compose:before { |
| | | content: "\e67f"; |
| | | } |
| | | |
| | | .uniui-qq:before { |
| | | content: "\e680"; |
| | | } |
| | | |
| | | .uniui-download-filled:before { |
| | | content: "\e681"; |
| | | } |
| | | |
| | | .uniui-pyq:before { |
| | | content: "\e682"; |
| | | } |
| | | |
| | | .uniui-sound:before { |
| | | content: "\e684"; |
| | | } |
| | | |
| | | .uniui-trash-filled:before { |
| | | content: "\e685"; |
| | | } |
| | | |
| | | .uniui-sound-filled:before { |
| | | content: "\e686"; |
| | | } |
| | | |
| | | .uniui-trash:before { |
| | | content: "\e687"; |
| | | } |
| | | |
| | | .uniui-videocam-filled:before { |
| | | content: "\e689"; |
| | | } |
| | | |
| | | .uniui-spinner-cycle:before { |
| | | content: "\e68a"; |
| | | } |
| | | |
| | | .uniui-weibo:before { |
| | | content: "\e68b"; |
| | | } |
| | | |
| | | .uniui-videocam:before { |
| | | content: "\e68c"; |
| | | } |
| | | |
| | | .uniui-download:before { |
| | | content: "\e68d"; |
| | | } |
| | | |
| | | .uniui-help:before { |
| | | content: "\e679"; |
| | | } |
| | | |
| | | .uniui-navigate-filled:before { |
| | | content: "\e67a"; |
| | | } |
| | | |
| | | .uniui-plusempty:before { |
| | | content: "\e67b"; |
| | | } |
| | | |
| | | .uniui-smallcircle:before { |
| | | content: "\e67c"; |
| | | } |
| | | |
| | | .uniui-minus-filled:before { |
| | | content: "\e67d"; |
| | | } |
| | | |
| | | .uniui-micoff:before { |
| | | content: "\e67e"; |
| | | } |
| | | |
| | | .uniui-closeempty:before { |
| | | content: "\e66c"; |
| | | } |
| | | |
| | | .uniui-clear:before { |
| | | content: "\e66d"; |
| | | } |
| | | |
| | | .uniui-navigate:before { |
| | | content: "\e66e"; |
| | | } |
| | | |
| | | .uniui-minus:before { |
| | | content: "\e66f"; |
| | | } |
| | | |
| | | .uniui-image:before { |
| | | content: "\e670"; |
| | | } |
| | | |
| | | .uniui-mic:before { |
| | | content: "\e671"; |
| | | } |
| | | |
| | | .uniui-paperplane:before { |
| | | content: "\e672"; |
| | | } |
| | | |
| | | .uniui-close:before { |
| | | content: "\e673"; |
| | | } |
| | | |
| | | .uniui-help-filled:before { |
| | | content: "\e674"; |
| | | } |
| | | |
| | | .uniui-paperplane-filled:before { |
| | | content: "\e675"; |
| | | } |
| | | |
| | | .uniui-plus:before { |
| | | content: "\e676"; |
| | | } |
| | | |
| | | .uniui-mic-filled:before { |
| | | content: "\e677"; |
| | | } |
| | | |
| | | .uniui-image-filled:before { |
| | | content: "\e678"; |
| | | } |
| | | |
| | | .uniui-locked-filled:before { |
| | | content: "\e668"; |
| | | } |
| | | |
| | | .uniui-info:before { |
| | | content: "\e669"; |
| | | } |
| | | |
| | | .uniui-locked:before { |
| | | content: "\e66b"; |
| | | } |
| | | |
| | | .uniui-camera-filled:before { |
| | | content: "\e658"; |
| | | } |
| | | |
| | | .uniui-chat-filled:before { |
| | | content: "\e659"; |
| | | } |
| | | |
| | | .uniui-camera:before { |
| | | content: "\e65a"; |
| | | } |
| | | |
| | | .uniui-circle:before { |
| | | content: "\e65b"; |
| | | } |
| | | |
| | | .uniui-checkmarkempty:before { |
| | | content: "\e65c"; |
| | | } |
| | | |
| | | .uniui-chat:before { |
| | | content: "\e65d"; |
| | | } |
| | | |
| | | .uniui-circle-filled:before { |
| | | content: "\e65e"; |
| | | } |
| | | |
| | | .uniui-flag:before { |
| | | content: "\e65f"; |
| | | } |
| | | |
| | | .uniui-flag-filled:before { |
| | | content: "\e660"; |
| | | } |
| | | |
| | | .uniui-gear-filled:before { |
| | | content: "\e661"; |
| | | } |
| | | |
| | | .uniui-home:before { |
| | | content: "\e662"; |
| | | } |
| | | |
| | | .uniui-home-filled:before { |
| | | content: "\e663"; |
| | | } |
| | | |
| | | .uniui-gear:before { |
| | | content: "\e664"; |
| | | } |
| | | |
| | | .uniui-smallcircle-filled:before { |
| | | content: "\e665"; |
| | | } |
| | | |
| | | .uniui-map-filled:before { |
| | | content: "\e666"; |
| | | } |
| | | |
| | | .uniui-map:before { |
| | | content: "\e667"; |
| | | } |
| | | |
| | | .uniui-refresh-filled:before { |
| | | content: "\e656"; |
| | | } |
| | | |
| | | .uniui-refresh:before { |
| | | content: "\e657"; |
| | | } |
| | | |
| | | .uniui-cloud-upload:before { |
| | | content: "\e645"; |
| | | } |
| | | |
| | | .uniui-cloud-download-filled:before { |
| | | content: "\e646"; |
| | | } |
| | | |
| | | .uniui-cloud-download:before { |
| | | content: "\e647"; |
| | | } |
| | | |
| | | .uniui-cloud-upload-filled:before { |
| | | content: "\e648"; |
| | | } |
| | | |
| | | .uniui-redo:before { |
| | | content: "\e64a"; |
| | | } |
| | | |
| | | .uniui-images-filled:before { |
| | | content: "\e64b"; |
| | | } |
| | | |
| | | .uniui-undo-filled:before { |
| | | content: "\e64c"; |
| | | } |
| | | |
| | | .uniui-more:before { |
| | | content: "\e64d"; |
| | | } |
| | | |
| | | .uniui-more-filled:before { |
| | | content: "\e64e"; |
| | | } |
| | | |
| | | .uniui-undo:before { |
| | | content: "\e64f"; |
| | | } |
| | | |
| | | .uniui-images:before { |
| | | content: "\e650"; |
| | | } |
| | | |
| | | .uniui-paperclip:before { |
| | | content: "\e652"; |
| | | } |
| | | |
| | | .uniui-settings:before { |
| | | content: "\e653"; |
| | | } |
| | | |
| | | .uniui-search:before { |
| | | content: "\e654"; |
| | | } |
| | | |
| | | .uniui-redo-filled:before { |
| | | content: "\e655"; |
| | | } |
| | | |
| | | .uniui-list:before { |
| | | content: "\e644"; |
| | | } |
| | | |
| | | .uniui-mail-open-filled:before { |
| | | content: "\e63a"; |
| | | } |
| | | |
| | | .uniui-hand-down-filled:before { |
| | | content: "\e63c"; |
| | | } |
| | | |
| | | .uniui-hand-down:before { |
| | | content: "\e63d"; |
| | | } |
| | | |
| | | .uniui-hand-up-filled:before { |
| | | content: "\e63e"; |
| | | } |
| | | |
| | | .uniui-hand-up:before { |
| | | content: "\e63f"; |
| | | } |
| | | |
| | | .uniui-heart-filled:before { |
| | | content: "\e641"; |
| | | } |
| | | |
| | | .uniui-mail-open:before { |
| | | content: "\e643"; |
| | | } |
| | | |
| | | .uniui-heart:before { |
| | | content: "\e639"; |
| | | } |
| | | |
| | | .uniui-loop:before { |
| | | content: "\e633"; |
| | | } |
| | | |
| | | .uniui-pulldown:before { |
| | | content: "\e632"; |
| | | } |
| | | |
| | | .uniui-scan:before { |
| | | content: "\e62a"; |
| | | } |
| | | |
| | | .uniui-bars:before { |
| | | content: "\e627"; |
| | | } |
| | | |
| | | .uniui-checkbox:before { |
| | | content: "\e62b"; |
| | | } |
| | | |
| | | .uniui-checkbox-filled:before { |
| | | content: "\e62c"; |
| | | } |
| | | |
| | | .uniui-shop:before { |
| | | content: "\e62f"; |
| | | } |
| | | |
| | | .uniui-headphones:before { |
| | | content: "\e630"; |
| | | } |
| | | |
| | | .uniui-cart:before { |
| | | content: "\e631"; |
| | | } |
New file |
| | |
| | | |
| | | export type IconsData = { |
| | | id : string |
| | | name : string |
| | | font_family : string |
| | | css_prefix_text : string |
| | | description : string |
| | | glyphs : Array<IconsDataItem> |
| | | } |
| | | |
| | | export type IconsDataItem = { |
| | | font_class : string |
| | | unicode : string |
| | | } |
| | | |
| | | |
| | | export const fontData = [ |
| | | { |
| | | "font_class": "arrow-down", |
| | | "unicode": "\ue6be" |
| | | }, |
| | | { |
| | | "font_class": "arrow-left", |
| | | "unicode": "\ue6bc" |
| | | }, |
| | | { |
| | | "font_class": "arrow-right", |
| | | "unicode": "\ue6bb" |
| | | }, |
| | | { |
| | | "font_class": "arrow-up", |
| | | "unicode": "\ue6bd" |
| | | }, |
| | | { |
| | | "font_class": "auth", |
| | | "unicode": "\ue6ab" |
| | | }, |
| | | { |
| | | "font_class": "auth-filled", |
| | | "unicode": "\ue6cc" |
| | | }, |
| | | { |
| | | "font_class": "back", |
| | | "unicode": "\ue6b9" |
| | | }, |
| | | { |
| | | "font_class": "bars", |
| | | "unicode": "\ue627" |
| | | }, |
| | | { |
| | | "font_class": "calendar", |
| | | "unicode": "\ue6a0" |
| | | }, |
| | | { |
| | | "font_class": "calendar-filled", |
| | | "unicode": "\ue6c0" |
| | | }, |
| | | { |
| | | "font_class": "camera", |
| | | "unicode": "\ue65a" |
| | | }, |
| | | { |
| | | "font_class": "camera-filled", |
| | | "unicode": "\ue658" |
| | | }, |
| | | { |
| | | "font_class": "cart", |
| | | "unicode": "\ue631" |
| | | }, |
| | | { |
| | | "font_class": "cart-filled", |
| | | "unicode": "\ue6d0" |
| | | }, |
| | | { |
| | | "font_class": "chat", |
| | | "unicode": "\ue65d" |
| | | }, |
| | | { |
| | | "font_class": "chat-filled", |
| | | "unicode": "\ue659" |
| | | }, |
| | | { |
| | | "font_class": "chatboxes", |
| | | "unicode": "\ue696" |
| | | }, |
| | | { |
| | | "font_class": "chatboxes-filled", |
| | | "unicode": "\ue692" |
| | | }, |
| | | { |
| | | "font_class": "chatbubble", |
| | | "unicode": "\ue697" |
| | | }, |
| | | { |
| | | "font_class": "chatbubble-filled", |
| | | "unicode": "\ue694" |
| | | }, |
| | | { |
| | | "font_class": "checkbox", |
| | | "unicode": "\ue62b" |
| | | }, |
| | | { |
| | | "font_class": "checkbox-filled", |
| | | "unicode": "\ue62c" |
| | | }, |
| | | { |
| | | "font_class": "checkmarkempty", |
| | | "unicode": "\ue65c" |
| | | }, |
| | | { |
| | | "font_class": "circle", |
| | | "unicode": "\ue65b" |
| | | }, |
| | | { |
| | | "font_class": "circle-filled", |
| | | "unicode": "\ue65e" |
| | | }, |
| | | { |
| | | "font_class": "clear", |
| | | "unicode": "\ue66d" |
| | | }, |
| | | { |
| | | "font_class": "close", |
| | | "unicode": "\ue673" |
| | | }, |
| | | { |
| | | "font_class": "closeempty", |
| | | "unicode": "\ue66c" |
| | | }, |
| | | { |
| | | "font_class": "cloud-download", |
| | | "unicode": "\ue647" |
| | | }, |
| | | { |
| | | "font_class": "cloud-download-filled", |
| | | "unicode": "\ue646" |
| | | }, |
| | | { |
| | | "font_class": "cloud-upload", |
| | | "unicode": "\ue645" |
| | | }, |
| | | { |
| | | "font_class": "cloud-upload-filled", |
| | | "unicode": "\ue648" |
| | | }, |
| | | { |
| | | "font_class": "color", |
| | | "unicode": "\ue6cf" |
| | | }, |
| | | { |
| | | "font_class": "color-filled", |
| | | "unicode": "\ue6c9" |
| | | }, |
| | | { |
| | | "font_class": "compose", |
| | | "unicode": "\ue67f" |
| | | }, |
| | | { |
| | | "font_class": "contact", |
| | | "unicode": "\ue693" |
| | | }, |
| | | { |
| | | "font_class": "contact-filled", |
| | | "unicode": "\ue695" |
| | | }, |
| | | { |
| | | "font_class": "down", |
| | | "unicode": "\ue6b8" |
| | | }, |
| | | { |
| | | "font_class": "bottom", |
| | | "unicode": "\ue6b8" |
| | | }, |
| | | { |
| | | "font_class": "download", |
| | | "unicode": "\ue68d" |
| | | }, |
| | | { |
| | | "font_class": "download-filled", |
| | | "unicode": "\ue681" |
| | | }, |
| | | { |
| | | "font_class": "email", |
| | | "unicode": "\ue69e" |
| | | }, |
| | | { |
| | | "font_class": "email-filled", |
| | | "unicode": "\ue69a" |
| | | }, |
| | | { |
| | | "font_class": "eye", |
| | | "unicode": "\ue651" |
| | | }, |
| | | { |
| | | "font_class": "eye-filled", |
| | | "unicode": "\ue66a" |
| | | }, |
| | | { |
| | | "font_class": "eye-slash", |
| | | "unicode": "\ue6b3" |
| | | }, |
| | | { |
| | | "font_class": "eye-slash-filled", |
| | | "unicode": "\ue6b4" |
| | | }, |
| | | { |
| | | "font_class": "fire", |
| | | "unicode": "\ue6a1" |
| | | }, |
| | | { |
| | | "font_class": "fire-filled", |
| | | "unicode": "\ue6c5" |
| | | }, |
| | | { |
| | | "font_class": "flag", |
| | | "unicode": "\ue65f" |
| | | }, |
| | | { |
| | | "font_class": "flag-filled", |
| | | "unicode": "\ue660" |
| | | }, |
| | | { |
| | | "font_class": "folder-add", |
| | | "unicode": "\ue6a9" |
| | | }, |
| | | { |
| | | "font_class": "folder-add-filled", |
| | | "unicode": "\ue6c8" |
| | | }, |
| | | { |
| | | "font_class": "font", |
| | | "unicode": "\ue6a3" |
| | | }, |
| | | { |
| | | "font_class": "forward", |
| | | "unicode": "\ue6ba" |
| | | }, |
| | | { |
| | | "font_class": "gear", |
| | | "unicode": "\ue664" |
| | | }, |
| | | { |
| | | "font_class": "gear-filled", |
| | | "unicode": "\ue661" |
| | | }, |
| | | { |
| | | "font_class": "gift", |
| | | "unicode": "\ue6a4" |
| | | }, |
| | | { |
| | | "font_class": "gift-filled", |
| | | "unicode": "\ue6c4" |
| | | }, |
| | | { |
| | | "font_class": "hand-down", |
| | | "unicode": "\ue63d" |
| | | }, |
| | | { |
| | | "font_class": "hand-down-filled", |
| | | "unicode": "\ue63c" |
| | | }, |
| | | { |
| | | "font_class": "hand-up", |
| | | "unicode": "\ue63f" |
| | | }, |
| | | { |
| | | "font_class": "hand-up-filled", |
| | | "unicode": "\ue63e" |
| | | }, |
| | | { |
| | | "font_class": "headphones", |
| | | "unicode": "\ue630" |
| | | }, |
| | | { |
| | | "font_class": "heart", |
| | | "unicode": "\ue639" |
| | | }, |
| | | { |
| | | "font_class": "heart-filled", |
| | | "unicode": "\ue641" |
| | | }, |
| | | { |
| | | "font_class": "help", |
| | | "unicode": "\ue679" |
| | | }, |
| | | { |
| | | "font_class": "help-filled", |
| | | "unicode": "\ue674" |
| | | }, |
| | | { |
| | | "font_class": "home", |
| | | "unicode": "\ue662" |
| | | }, |
| | | { |
| | | "font_class": "home-filled", |
| | | "unicode": "\ue663" |
| | | }, |
| | | { |
| | | "font_class": "image", |
| | | "unicode": "\ue670" |
| | | }, |
| | | { |
| | | "font_class": "image-filled", |
| | | "unicode": "\ue678" |
| | | }, |
| | | { |
| | | "font_class": "images", |
| | | "unicode": "\ue650" |
| | | }, |
| | | { |
| | | "font_class": "images-filled", |
| | | "unicode": "\ue64b" |
| | | }, |
| | | { |
| | | "font_class": "info", |
| | | "unicode": "\ue669" |
| | | }, |
| | | { |
| | | "font_class": "info-filled", |
| | | "unicode": "\ue649" |
| | | }, |
| | | { |
| | | "font_class": "left", |
| | | "unicode": "\ue6b7" |
| | | }, |
| | | { |
| | | "font_class": "link", |
| | | "unicode": "\ue6a5" |
| | | }, |
| | | { |
| | | "font_class": "list", |
| | | "unicode": "\ue644" |
| | | }, |
| | | { |
| | | "font_class": "location", |
| | | "unicode": "\ue6ae" |
| | | }, |
| | | { |
| | | "font_class": "location-filled", |
| | | "unicode": "\ue6af" |
| | | }, |
| | | { |
| | | "font_class": "locked", |
| | | "unicode": "\ue66b" |
| | | }, |
| | | { |
| | | "font_class": "locked-filled", |
| | | "unicode": "\ue668" |
| | | }, |
| | | { |
| | | "font_class": "loop", |
| | | "unicode": "\ue633" |
| | | }, |
| | | { |
| | | "font_class": "mail-open", |
| | | "unicode": "\ue643" |
| | | }, |
| | | { |
| | | "font_class": "mail-open-filled", |
| | | "unicode": "\ue63a" |
| | | }, |
| | | { |
| | | "font_class": "map", |
| | | "unicode": "\ue667" |
| | | }, |
| | | { |
| | | "font_class": "map-filled", |
| | | "unicode": "\ue666" |
| | | }, |
| | | { |
| | | "font_class": "map-pin", |
| | | "unicode": "\ue6ad" |
| | | }, |
| | | { |
| | | "font_class": "map-pin-ellipse", |
| | | "unicode": "\ue6ac" |
| | | }, |
| | | { |
| | | "font_class": "medal", |
| | | "unicode": "\ue6a2" |
| | | }, |
| | | { |
| | | "font_class": "medal-filled", |
| | | "unicode": "\ue6c3" |
| | | }, |
| | | { |
| | | "font_class": "mic", |
| | | "unicode": "\ue671" |
| | | }, |
| | | { |
| | | "font_class": "mic-filled", |
| | | "unicode": "\ue677" |
| | | }, |
| | | { |
| | | "font_class": "micoff", |
| | | "unicode": "\ue67e" |
| | | }, |
| | | { |
| | | "font_class": "micoff-filled", |
| | | "unicode": "\ue6b0" |
| | | }, |
| | | { |
| | | "font_class": "minus", |
| | | "unicode": "\ue66f" |
| | | }, |
| | | { |
| | | "font_class": "minus-filled", |
| | | "unicode": "\ue67d" |
| | | }, |
| | | { |
| | | "font_class": "more", |
| | | "unicode": "\ue64d" |
| | | }, |
| | | { |
| | | "font_class": "more-filled", |
| | | "unicode": "\ue64e" |
| | | }, |
| | | { |
| | | "font_class": "navigate", |
| | | "unicode": "\ue66e" |
| | | }, |
| | | { |
| | | "font_class": "navigate-filled", |
| | | "unicode": "\ue67a" |
| | | }, |
| | | { |
| | | "font_class": "notification", |
| | | "unicode": "\ue6a6" |
| | | }, |
| | | { |
| | | "font_class": "notification-filled", |
| | | "unicode": "\ue6c1" |
| | | }, |
| | | { |
| | | "font_class": "paperclip", |
| | | "unicode": "\ue652" |
| | | }, |
| | | { |
| | | "font_class": "paperplane", |
| | | "unicode": "\ue672" |
| | | }, |
| | | { |
| | | "font_class": "paperplane-filled", |
| | | "unicode": "\ue675" |
| | | }, |
| | | { |
| | | "font_class": "person", |
| | | "unicode": "\ue699" |
| | | }, |
| | | { |
| | | "font_class": "person-filled", |
| | | "unicode": "\ue69d" |
| | | }, |
| | | { |
| | | "font_class": "personadd", |
| | | "unicode": "\ue69f" |
| | | }, |
| | | { |
| | | "font_class": "personadd-filled", |
| | | "unicode": "\ue698" |
| | | }, |
| | | { |
| | | "font_class": "personadd-filled-copy", |
| | | "unicode": "\ue6d1" |
| | | }, |
| | | { |
| | | "font_class": "phone", |
| | | "unicode": "\ue69c" |
| | | }, |
| | | { |
| | | "font_class": "phone-filled", |
| | | "unicode": "\ue69b" |
| | | }, |
| | | { |
| | | "font_class": "plus", |
| | | "unicode": "\ue676" |
| | | }, |
| | | { |
| | | "font_class": "plus-filled", |
| | | "unicode": "\ue6c7" |
| | | }, |
| | | { |
| | | "font_class": "plusempty", |
| | | "unicode": "\ue67b" |
| | | }, |
| | | { |
| | | "font_class": "pulldown", |
| | | "unicode": "\ue632" |
| | | }, |
| | | { |
| | | "font_class": "pyq", |
| | | "unicode": "\ue682" |
| | | }, |
| | | { |
| | | "font_class": "qq", |
| | | "unicode": "\ue680" |
| | | }, |
| | | { |
| | | "font_class": "redo", |
| | | "unicode": "\ue64a" |
| | | }, |
| | | { |
| | | "font_class": "redo-filled", |
| | | "unicode": "\ue655" |
| | | }, |
| | | { |
| | | "font_class": "refresh", |
| | | "unicode": "\ue657" |
| | | }, |
| | | { |
| | | "font_class": "refresh-filled", |
| | | "unicode": "\ue656" |
| | | }, |
| | | { |
| | | "font_class": "refreshempty", |
| | | "unicode": "\ue6bf" |
| | | }, |
| | | { |
| | | "font_class": "reload", |
| | | "unicode": "\ue6b2" |
| | | }, |
| | | { |
| | | "font_class": "right", |
| | | "unicode": "\ue6b5" |
| | | }, |
| | | { |
| | | "font_class": "scan", |
| | | "unicode": "\ue62a" |
| | | }, |
| | | { |
| | | "font_class": "search", |
| | | "unicode": "\ue654" |
| | | }, |
| | | { |
| | | "font_class": "settings", |
| | | "unicode": "\ue653" |
| | | }, |
| | | { |
| | | "font_class": "settings-filled", |
| | | "unicode": "\ue6ce" |
| | | }, |
| | | { |
| | | "font_class": "shop", |
| | | "unicode": "\ue62f" |
| | | }, |
| | | { |
| | | "font_class": "shop-filled", |
| | | "unicode": "\ue6cd" |
| | | }, |
| | | { |
| | | "font_class": "smallcircle", |
| | | "unicode": "\ue67c" |
| | | }, |
| | | { |
| | | "font_class": "smallcircle-filled", |
| | | "unicode": "\ue665" |
| | | }, |
| | | { |
| | | "font_class": "sound", |
| | | "unicode": "\ue684" |
| | | }, |
| | | { |
| | | "font_class": "sound-filled", |
| | | "unicode": "\ue686" |
| | | }, |
| | | { |
| | | "font_class": "spinner-cycle", |
| | | "unicode": "\ue68a" |
| | | }, |
| | | { |
| | | "font_class": "staff", |
| | | "unicode": "\ue6a7" |
| | | }, |
| | | { |
| | | "font_class": "staff-filled", |
| | | "unicode": "\ue6cb" |
| | | }, |
| | | { |
| | | "font_class": "star", |
| | | "unicode": "\ue688" |
| | | }, |
| | | { |
| | | "font_class": "star-filled", |
| | | "unicode": "\ue68f" |
| | | }, |
| | | { |
| | | "font_class": "starhalf", |
| | | "unicode": "\ue683" |
| | | }, |
| | | { |
| | | "font_class": "trash", |
| | | "unicode": "\ue687" |
| | | }, |
| | | { |
| | | "font_class": "trash-filled", |
| | | "unicode": "\ue685" |
| | | }, |
| | | { |
| | | "font_class": "tune", |
| | | "unicode": "\ue6aa" |
| | | }, |
| | | { |
| | | "font_class": "tune-filled", |
| | | "unicode": "\ue6ca" |
| | | }, |
| | | { |
| | | "font_class": "undo", |
| | | "unicode": "\ue64f" |
| | | }, |
| | | { |
| | | "font_class": "undo-filled", |
| | | "unicode": "\ue64c" |
| | | }, |
| | | { |
| | | "font_class": "up", |
| | | "unicode": "\ue6b6" |
| | | }, |
| | | { |
| | | "font_class": "top", |
| | | "unicode": "\ue6b6" |
| | | }, |
| | | { |
| | | "font_class": "upload", |
| | | "unicode": "\ue690" |
| | | }, |
| | | { |
| | | "font_class": "upload-filled", |
| | | "unicode": "\ue68e" |
| | | }, |
| | | { |
| | | "font_class": "videocam", |
| | | "unicode": "\ue68c" |
| | | }, |
| | | { |
| | | "font_class": "videocam-filled", |
| | | "unicode": "\ue689" |
| | | }, |
| | | { |
| | | "font_class": "vip", |
| | | "unicode": "\ue6a8" |
| | | }, |
| | | { |
| | | "font_class": "vip-filled", |
| | | "unicode": "\ue6c6" |
| | | }, |
| | | { |
| | | "font_class": "wallet", |
| | | "unicode": "\ue6b1" |
| | | }, |
| | | { |
| | | "font_class": "wallet-filled", |
| | | "unicode": "\ue6c2" |
| | | }, |
| | | { |
| | | "font_class": "weibo", |
| | | "unicode": "\ue68b" |
| | | }, |
| | | { |
| | | "font_class": "weixin", |
| | | "unicode": "\ue691" |
| | | } |
| | | ] as IconsDataItem[] |
| | | |
| | | // export const fontData = JSON.parse<IconsDataItem>(fontDataJson) |
New file |
| | |
| | | |
| | | export const fontData = [ |
| | | { |
| | | "font_class": "arrow-down", |
| | | "unicode": "\ue6be" |
| | | }, |
| | | { |
| | | "font_class": "arrow-left", |
| | | "unicode": "\ue6bc" |
| | | }, |
| | | { |
| | | "font_class": "arrow-right", |
| | | "unicode": "\ue6bb" |
| | | }, |
| | | { |
| | | "font_class": "arrow-up", |
| | | "unicode": "\ue6bd" |
| | | }, |
| | | { |
| | | "font_class": "auth", |
| | | "unicode": "\ue6ab" |
| | | }, |
| | | { |
| | | "font_class": "auth-filled", |
| | | "unicode": "\ue6cc" |
| | | }, |
| | | { |
| | | "font_class": "back", |
| | | "unicode": "\ue6b9" |
| | | }, |
| | | { |
| | | "font_class": "bars", |
| | | "unicode": "\ue627" |
| | | }, |
| | | { |
| | | "font_class": "calendar", |
| | | "unicode": "\ue6a0" |
| | | }, |
| | | { |
| | | "font_class": "calendar-filled", |
| | | "unicode": "\ue6c0" |
| | | }, |
| | | { |
| | | "font_class": "camera", |
| | | "unicode": "\ue65a" |
| | | }, |
| | | { |
| | | "font_class": "camera-filled", |
| | | "unicode": "\ue658" |
| | | }, |
| | | { |
| | | "font_class": "cart", |
| | | "unicode": "\ue631" |
| | | }, |
| | | { |
| | | "font_class": "cart-filled", |
| | | "unicode": "\ue6d0" |
| | | }, |
| | | { |
| | | "font_class": "chat", |
| | | "unicode": "\ue65d" |
| | | }, |
| | | { |
| | | "font_class": "chat-filled", |
| | | "unicode": "\ue659" |
| | | }, |
| | | { |
| | | "font_class": "chatboxes", |
| | | "unicode": "\ue696" |
| | | }, |
| | | { |
| | | "font_class": "chatboxes-filled", |
| | | "unicode": "\ue692" |
| | | }, |
| | | { |
| | | "font_class": "chatbubble", |
| | | "unicode": "\ue697" |
| | | }, |
| | | { |
| | | "font_class": "chatbubble-filled", |
| | | "unicode": "\ue694" |
| | | }, |
| | | { |
| | | "font_class": "checkbox", |
| | | "unicode": "\ue62b" |
| | | }, |
| | | { |
| | | "font_class": "checkbox-filled", |
| | | "unicode": "\ue62c" |
| | | }, |
| | | { |
| | | "font_class": "checkmarkempty", |
| | | "unicode": "\ue65c" |
| | | }, |
| | | { |
| | | "font_class": "circle", |
| | | "unicode": "\ue65b" |
| | | }, |
| | | { |
| | | "font_class": "circle-filled", |
| | | "unicode": "\ue65e" |
| | | }, |
| | | { |
| | | "font_class": "clear", |
| | | "unicode": "\ue66d" |
| | | }, |
| | | { |
| | | "font_class": "close", |
| | | "unicode": "\ue673" |
| | | }, |
| | | { |
| | | "font_class": "closeempty", |
| | | "unicode": "\ue66c" |
| | | }, |
| | | { |
| | | "font_class": "cloud-download", |
| | | "unicode": "\ue647" |
| | | }, |
| | | { |
| | | "font_class": "cloud-download-filled", |
| | | "unicode": "\ue646" |
| | | }, |
| | | { |
| | | "font_class": "cloud-upload", |
| | | "unicode": "\ue645" |
| | | }, |
| | | { |
| | | "font_class": "cloud-upload-filled", |
| | | "unicode": "\ue648" |
| | | }, |
| | | { |
| | | "font_class": "color", |
| | | "unicode": "\ue6cf" |
| | | }, |
| | | { |
| | | "font_class": "color-filled", |
| | | "unicode": "\ue6c9" |
| | | }, |
| | | { |
| | | "font_class": "compose", |
| | | "unicode": "\ue67f" |
| | | }, |
| | | { |
| | | "font_class": "contact", |
| | | "unicode": "\ue693" |
| | | }, |
| | | { |
| | | "font_class": "contact-filled", |
| | | "unicode": "\ue695" |
| | | }, |
| | | { |
| | | "font_class": "down", |
| | | "unicode": "\ue6b8" |
| | | }, |
| | | { |
| | | "font_class": "bottom", |
| | | "unicode": "\ue6b8" |
| | | }, |
| | | { |
| | | "font_class": "download", |
| | | "unicode": "\ue68d" |
| | | }, |
| | | { |
| | | "font_class": "download-filled", |
| | | "unicode": "\ue681" |
| | | }, |
| | | { |
| | | "font_class": "email", |
| | | "unicode": "\ue69e" |
| | | }, |
| | | { |
| | | "font_class": "email-filled", |
| | | "unicode": "\ue69a" |
| | | }, |
| | | { |
| | | "font_class": "eye", |
| | | "unicode": "\ue651" |
| | | }, |
| | | { |
| | | "font_class": "eye-filled", |
| | | "unicode": "\ue66a" |
| | | }, |
| | | { |
| | | "font_class": "eye-slash", |
| | | "unicode": "\ue6b3" |
| | | }, |
| | | { |
| | | "font_class": "eye-slash-filled", |
| | | "unicode": "\ue6b4" |
| | | }, |
| | | { |
| | | "font_class": "fire", |
| | | "unicode": "\ue6a1" |
| | | }, |
| | | { |
| | | "font_class": "fire-filled", |
| | | "unicode": "\ue6c5" |
| | | }, |
| | | { |
| | | "font_class": "flag", |
| | | "unicode": "\ue65f" |
| | | }, |
| | | { |
| | | "font_class": "flag-filled", |
| | | "unicode": "\ue660" |
| | | }, |
| | | { |
| | | "font_class": "folder-add", |
| | | "unicode": "\ue6a9" |
| | | }, |
| | | { |
| | | "font_class": "folder-add-filled", |
| | | "unicode": "\ue6c8" |
| | | }, |
| | | { |
| | | "font_class": "font", |
| | | "unicode": "\ue6a3" |
| | | }, |
| | | { |
| | | "font_class": "forward", |
| | | "unicode": "\ue6ba" |
| | | }, |
| | | { |
| | | "font_class": "gear", |
| | | "unicode": "\ue664" |
| | | }, |
| | | { |
| | | "font_class": "gear-filled", |
| | | "unicode": "\ue661" |
| | | }, |
| | | { |
| | | "font_class": "gift", |
| | | "unicode": "\ue6a4" |
| | | }, |
| | | { |
| | | "font_class": "gift-filled", |
| | | "unicode": "\ue6c4" |
| | | }, |
| | | { |
| | | "font_class": "hand-down", |
| | | "unicode": "\ue63d" |
| | | }, |
| | | { |
| | | "font_class": "hand-down-filled", |
| | | "unicode": "\ue63c" |
| | | }, |
| | | { |
| | | "font_class": "hand-up", |
| | | "unicode": "\ue63f" |
| | | }, |
| | | { |
| | | "font_class": "hand-up-filled", |
| | | "unicode": "\ue63e" |
| | | }, |
| | | { |
| | | "font_class": "headphones", |
| | | "unicode": "\ue630" |
| | | }, |
| | | { |
| | | "font_class": "heart", |
| | | "unicode": "\ue639" |
| | | }, |
| | | { |
| | | "font_class": "heart-filled", |
| | | "unicode": "\ue641" |
| | | }, |
| | | { |
| | | "font_class": "help", |
| | | "unicode": "\ue679" |
| | | }, |
| | | { |
| | | "font_class": "help-filled", |
| | | "unicode": "\ue674" |
| | | }, |
| | | { |
| | | "font_class": "home", |
| | | "unicode": "\ue662" |
| | | }, |
| | | { |
| | | "font_class": "home-filled", |
| | | "unicode": "\ue663" |
| | | }, |
| | | { |
| | | "font_class": "image", |
| | | "unicode": "\ue670" |
| | | }, |
| | | { |
| | | "font_class": "image-filled", |
| | | "unicode": "\ue678" |
| | | }, |
| | | { |
| | | "font_class": "images", |
| | | "unicode": "\ue650" |
| | | }, |
| | | { |
| | | "font_class": "images-filled", |
| | | "unicode": "\ue64b" |
| | | }, |
| | | { |
| | | "font_class": "info", |
| | | "unicode": "\ue669" |
| | | }, |
| | | { |
| | | "font_class": "info-filled", |
| | | "unicode": "\ue649" |
| | | }, |
| | | { |
| | | "font_class": "left", |
| | | "unicode": "\ue6b7" |
| | | }, |
| | | { |
| | | "font_class": "link", |
| | | "unicode": "\ue6a5" |
| | | }, |
| | | { |
| | | "font_class": "list", |
| | | "unicode": "\ue644" |
| | | }, |
| | | { |
| | | "font_class": "location", |
| | | "unicode": "\ue6ae" |
| | | }, |
| | | { |
| | | "font_class": "location-filled", |
| | | "unicode": "\ue6af" |
| | | }, |
| | | { |
| | | "font_class": "locked", |
| | | "unicode": "\ue66b" |
| | | }, |
| | | { |
| | | "font_class": "locked-filled", |
| | | "unicode": "\ue668" |
| | | }, |
| | | { |
| | | "font_class": "loop", |
| | | "unicode": "\ue633" |
| | | }, |
| | | { |
| | | "font_class": "mail-open", |
| | | "unicode": "\ue643" |
| | | }, |
| | | { |
| | | "font_class": "mail-open-filled", |
| | | "unicode": "\ue63a" |
| | | }, |
| | | { |
| | | "font_class": "map", |
| | | "unicode": "\ue667" |
| | | }, |
| | | { |
| | | "font_class": "map-filled", |
| | | "unicode": "\ue666" |
| | | }, |
| | | { |
| | | "font_class": "map-pin", |
| | | "unicode": "\ue6ad" |
| | | }, |
| | | { |
| | | "font_class": "map-pin-ellipse", |
| | | "unicode": "\ue6ac" |
| | | }, |
| | | { |
| | | "font_class": "medal", |
| | | "unicode": "\ue6a2" |
| | | }, |
| | | { |
| | | "font_class": "medal-filled", |
| | | "unicode": "\ue6c3" |
| | | }, |
| | | { |
| | | "font_class": "mic", |
| | | "unicode": "\ue671" |
| | | }, |
| | | { |
| | | "font_class": "mic-filled", |
| | | "unicode": "\ue677" |
| | | }, |
| | | { |
| | | "font_class": "micoff", |
| | | "unicode": "\ue67e" |
| | | }, |
| | | { |
| | | "font_class": "micoff-filled", |
| | | "unicode": "\ue6b0" |
| | | }, |
| | | { |
| | | "font_class": "minus", |
| | | "unicode": "\ue66f" |
| | | }, |
| | | { |
| | | "font_class": "minus-filled", |
| | | "unicode": "\ue67d" |
| | | }, |
| | | { |
| | | "font_class": "more", |
| | | "unicode": "\ue64d" |
| | | }, |
| | | { |
| | | "font_class": "more-filled", |
| | | "unicode": "\ue64e" |
| | | }, |
| | | { |
| | | "font_class": "navigate", |
| | | "unicode": "\ue66e" |
| | | }, |
| | | { |
| | | "font_class": "navigate-filled", |
| | | "unicode": "\ue67a" |
| | | }, |
| | | { |
| | | "font_class": "notification", |
| | | "unicode": "\ue6a6" |
| | | }, |
| | | { |
| | | "font_class": "notification-filled", |
| | | "unicode": "\ue6c1" |
| | | }, |
| | | { |
| | | "font_class": "paperclip", |
| | | "unicode": "\ue652" |
| | | }, |
| | | { |
| | | "font_class": "paperplane", |
| | | "unicode": "\ue672" |
| | | }, |
| | | { |
| | | "font_class": "paperplane-filled", |
| | | "unicode": "\ue675" |
| | | }, |
| | | { |
| | | "font_class": "person", |
| | | "unicode": "\ue699" |
| | | }, |
| | | { |
| | | "font_class": "person-filled", |
| | | "unicode": "\ue69d" |
| | | }, |
| | | { |
| | | "font_class": "personadd", |
| | | "unicode": "\ue69f" |
| | | }, |
| | | { |
| | | "font_class": "personadd-filled", |
| | | "unicode": "\ue698" |
| | | }, |
| | | { |
| | | "font_class": "personadd-filled-copy", |
| | | "unicode": "\ue6d1" |
| | | }, |
| | | { |
| | | "font_class": "phone", |
| | | "unicode": "\ue69c" |
| | | }, |
| | | { |
| | | "font_class": "phone-filled", |
| | | "unicode": "\ue69b" |
| | | }, |
| | | { |
| | | "font_class": "plus", |
| | | "unicode": "\ue676" |
| | | }, |
| | | { |
| | | "font_class": "plus-filled", |
| | | "unicode": "\ue6c7" |
| | | }, |
| | | { |
| | | "font_class": "plusempty", |
| | | "unicode": "\ue67b" |
| | | }, |
| | | { |
| | | "font_class": "pulldown", |
| | | "unicode": "\ue632" |
| | | }, |
| | | { |
| | | "font_class": "pyq", |
| | | "unicode": "\ue682" |
| | | }, |
| | | { |
| | | "font_class": "qq", |
| | | "unicode": "\ue680" |
| | | }, |
| | | { |
| | | "font_class": "redo", |
| | | "unicode": "\ue64a" |
| | | }, |
| | | { |
| | | "font_class": "redo-filled", |
| | | "unicode": "\ue655" |
| | | }, |
| | | { |
| | | "font_class": "refresh", |
| | | "unicode": "\ue657" |
| | | }, |
| | | { |
| | | "font_class": "refresh-filled", |
| | | "unicode": "\ue656" |
| | | }, |
| | | { |
| | | "font_class": "refreshempty", |
| | | "unicode": "\ue6bf" |
| | | }, |
| | | { |
| | | "font_class": "reload", |
| | | "unicode": "\ue6b2" |
| | | }, |
| | | { |
| | | "font_class": "right", |
| | | "unicode": "\ue6b5" |
| | | }, |
| | | { |
| | | "font_class": "scan", |
| | | "unicode": "\ue62a" |
| | | }, |
| | | { |
| | | "font_class": "search", |
| | | "unicode": "\ue654" |
| | | }, |
| | | { |
| | | "font_class": "settings", |
| | | "unicode": "\ue653" |
| | | }, |
| | | { |
| | | "font_class": "settings-filled", |
| | | "unicode": "\ue6ce" |
| | | }, |
| | | { |
| | | "font_class": "shop", |
| | | "unicode": "\ue62f" |
| | | }, |
| | | { |
| | | "font_class": "shop-filled", |
| | | "unicode": "\ue6cd" |
| | | }, |
| | | { |
| | | "font_class": "smallcircle", |
| | | "unicode": "\ue67c" |
| | | }, |
| | | { |
| | | "font_class": "smallcircle-filled", |
| | | "unicode": "\ue665" |
| | | }, |
| | | { |
| | | "font_class": "sound", |
| | | "unicode": "\ue684" |
| | | }, |
| | | { |
| | | "font_class": "sound-filled", |
| | | "unicode": "\ue686" |
| | | }, |
| | | { |
| | | "font_class": "spinner-cycle", |
| | | "unicode": "\ue68a" |
| | | }, |
| | | { |
| | | "font_class": "staff", |
| | | "unicode": "\ue6a7" |
| | | }, |
| | | { |
| | | "font_class": "staff-filled", |
| | | "unicode": "\ue6cb" |
| | | }, |
| | | { |
| | | "font_class": "star", |
| | | "unicode": "\ue688" |
| | | }, |
| | | { |
| | | "font_class": "star-filled", |
| | | "unicode": "\ue68f" |
| | | }, |
| | | { |
| | | "font_class": "starhalf", |
| | | "unicode": "\ue683" |
| | | }, |
| | | { |
| | | "font_class": "trash", |
| | | "unicode": "\ue687" |
| | | }, |
| | | { |
| | | "font_class": "trash-filled", |
| | | "unicode": "\ue685" |
| | | }, |
| | | { |
| | | "font_class": "tune", |
| | | "unicode": "\ue6aa" |
| | | }, |
| | | { |
| | | "font_class": "tune-filled", |
| | | "unicode": "\ue6ca" |
| | | }, |
| | | { |
| | | "font_class": "undo", |
| | | "unicode": "\ue64f" |
| | | }, |
| | | { |
| | | "font_class": "undo-filled", |
| | | "unicode": "\ue64c" |
| | | }, |
| | | { |
| | | "font_class": "up", |
| | | "unicode": "\ue6b6" |
| | | }, |
| | | { |
| | | "font_class": "top", |
| | | "unicode": "\ue6b6" |
| | | }, |
| | | { |
| | | "font_class": "upload", |
| | | "unicode": "\ue690" |
| | | }, |
| | | { |
| | | "font_class": "upload-filled", |
| | | "unicode": "\ue68e" |
| | | }, |
| | | { |
| | | "font_class": "videocam", |
| | | "unicode": "\ue68c" |
| | | }, |
| | | { |
| | | "font_class": "videocam-filled", |
| | | "unicode": "\ue689" |
| | | }, |
| | | { |
| | | "font_class": "vip", |
| | | "unicode": "\ue6a8" |
| | | }, |
| | | { |
| | | "font_class": "vip-filled", |
| | | "unicode": "\ue6c6" |
| | | }, |
| | | { |
| | | "font_class": "wallet", |
| | | "unicode": "\ue6b1" |
| | | }, |
| | | { |
| | | "font_class": "wallet-filled", |
| | | "unicode": "\ue6c2" |
| | | }, |
| | | { |
| | | "font_class": "weibo", |
| | | "unicode": "\ue68b" |
| | | }, |
| | | { |
| | | "font_class": "weixin", |
| | | "unicode": "\ue691" |
| | | } |
| | | ] |
| | | |
| | | // export const fontData = JSON.parse<IconsDataItem>(fontDataJson) |
New file |
| | |
| | | { |
| | | "id": "uni-icons", |
| | | "displayName": "uni-icons 图标", |
| | | "version": "2.0.10", |
| | | "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", |
| | | "keywords": [ |
| | | "uni-ui", |
| | | "uniui", |
| | | "icon", |
| | | "图标" |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "^3.2.14" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | | }, |
| | | "dcloudext": { |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "无", |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", |
| | | "type": "component-vue" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": ["uni-scss"], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y", |
| | | "alipay": "n" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y", |
| | | "app-uvue": "y" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y", |
| | | "钉钉": "y", |
| | | "快手": "y", |
| | | "飞书": "y", |
| | | "京东": "y" |
| | | }, |
| | | "快应用": { |
| | | "华为": "y", |
| | | "联盟": "y" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | ## Icons 图标 |
| | | > **组件名:uni-icons** |
| | | > 代码块: `uIcons` |
| | | |
| | | 用于展示 icons 图标 。 |
| | | |
| | | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) |
| | | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 |
New file |
| | |
| | | ## 1.3.6(2024-10-15) |
| | | - 修复 微信小程序中的getSystemInfo警告 |
| | | ## 1.3.5(2024-10-12) |
| | | - 修复 微信小程序中的getSystemInfo警告 |
| | | ## 1.3.4(2024-10-12) |
| | | - 修复 微信小程序中的getSystemInfo警告 |
| | | ## 1.3.3(2022-01-20) |
| | | - 新增 showText属性 ,是否显示文本 |
| | | ## 1.3.2(2022-01-19) |
| | | - 修复 nvue 平台下不显示文本的bug |
| | | ## 1.3.1(2022-01-19) |
| | | - 修复 微信小程序平台样式选择器报警告的问题 |
| | | ## 1.3.0(2021-11-19) |
| | | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) |
| | | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more) |
| | | ## 1.2.1(2021-08-24) |
| | | - 新增 支持国际化 |
| | | ## 1.2.0(2021-07-30) |
| | | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) |
| | | ## 1.1.8(2021-05-12) |
| | | - 新增 组件示例地址 |
| | | ## 1.1.7(2021-03-30) |
| | | - 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug |
| | | ## 1.1.6(2021-02-05) |
| | | - 调整为uni_modules目录规范 |
New file |
| | |
| | | { |
| | | "uni-load-more.contentdown": "Pull up to show more", |
| | | "uni-load-more.contentrefresh": "loading...", |
| | | "uni-load-more.contentnomore": "No more data" |
| | | } |
New file |
| | |
| | | import en from './en.json' |
| | | import zhHans from './zh-Hans.json' |
| | | import zhHant from './zh-Hant.json' |
| | | export default { |
| | | en, |
| | | 'zh-Hans': zhHans, |
| | | 'zh-Hant': zhHant |
| | | } |
New file |
| | |
| | | { |
| | | "uni-load-more.contentdown": "上拉显示更多", |
| | | "uni-load-more.contentrefresh": "正在加载...", |
| | | "uni-load-more.contentnomore": "没有更多数据了" |
| | | } |
New file |
| | |
| | | { |
| | | "uni-load-more.contentdown": "上拉顯示更多", |
| | | "uni-load-more.contentrefresh": "正在加載...", |
| | | "uni-load-more.contentnomore": "沒有更多數據了" |
| | | } |
New file |
| | |
| | | <template> |
| | | <view class="uni-load-more" @click="onClick"> |
| | | <!-- #ifdef APP-NVUE --> |
| | | <loading-indicator v-if="!webviewHide && status === 'loading' && showIcon" |
| | | :style="{color: color,width:iconSize+'px',height:iconSize+'px'}" :animating="true" |
| | | class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator> |
| | | <!-- #endif --> |
| | | <!-- #ifdef H5 --> |
| | | <svg width="24" height="24" viewBox="25 25 50 50" |
| | | v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" |
| | | :style="{width:iconSize+'px',height:iconSize+'px'}" |
| | | class="uni-load-more__img uni-load-more__img--android-H5"> |
| | | <circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" :stroke-width="3"></circle> |
| | | </svg> |
| | | <!-- #endif --> |
| | | <!-- #ifndef APP-NVUE || H5 --> |
| | | <view |
| | | v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" |
| | | :style="{width:iconSize+'px',height:iconSize+'px'}" |
| | | class="uni-load-more__img uni-load-more__img--android-MP"> |
| | | <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> |
| | | <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> |
| | | <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> |
| | | </view> |
| | | <!-- #endif --> |
| | | <!-- #ifndef APP-NVUE --> |
| | | <view v-else-if="!webviewHide && status === 'loading' && showIcon" |
| | | :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5"> |
| | | <image :src="imgBase64" mode="widthFix"></image> |
| | | </view> |
| | | <!-- #endif --> |
| | | <text v-if="showText" class="uni-load-more__text" |
| | | :style="{color: color}">{{ status === 'more' ? contentdownText : status === 'loading' ? contentrefreshText : contentnomoreText }}</text> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | let platform |
| | | setTimeout(() => { |
| | | // #ifdef MP-WEIXIN |
| | | platform = uni.getDeviceInfo().platform |
| | | // #endif |
| | | // #ifndef MP-WEIXIN |
| | | platform = uni.getSystemInfoSync().platform |
| | | // #endif |
| | | }, 16) |
| | | |
| | | import { |
| | | initVueI18n |
| | | } from '@dcloudio/uni-i18n' |
| | | import messages from './i18n/index.js' |
| | | const { |
| | | t |
| | | } = initVueI18n(messages) |
| | | |
| | | /** |
| | | * LoadMore 加载更多 |
| | | * @description 用于列表中,做滚动加载使用,展示 loading 的各种状态 |
| | | * @tutorial https://ext.dcloud.net.cn/plugin?id=29 |
| | | * @property {String} status = [more|loading|noMore] loading 的状态 |
| | | * @value more loading前 |
| | | * @value loading loading中 |
| | | * @value noMore 没有更多了 |
| | | * @property {Number} iconSize 指定图标大小 |
| | | * @property {Boolean} iconSize = [true|false] 是否显示 loading 图标 |
| | | * @property {String} iconType = [snow|circle|auto] 指定图标样式 |
| | | * @value snow ios雪花加载样式 |
| | | * @value circle 安卓唤醒加载样式 |
| | | * @value auto 根据平台自动选择加载样式 |
| | | * @property {String} color 图标和文字颜色 |
| | | * @property {Object} contentText 各状态文字说明,值为:{contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"} |
| | | * @event {Function} clickLoadMore 点击加载更多时触发 |
| | | */ |
| | | export default { |
| | | name: 'UniLoadMore', |
| | | emits: ['clickLoadMore'], |
| | | props: { |
| | | status: { |
| | | // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了 |
| | | type: String, |
| | | default: 'more' |
| | | }, |
| | | showIcon: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | iconType: { |
| | | type: String, |
| | | default: 'auto' |
| | | }, |
| | | iconSize: { |
| | | type: Number, |
| | | default: 24 |
| | | }, |
| | | color: { |
| | | type: String, |
| | | default: '#777777' |
| | | }, |
| | | contentText: { |
| | | type: Object, |
| | | default () { |
| | | return { |
| | | contentdown: '', |
| | | contentrefresh: '', |
| | | contentnomore: '' |
| | | } |
| | | } |
| | | }, |
| | | showText: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | webviewHide: false, |
| | | platform: platform, |
| | | imgBase64: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII=' |
| | | } |
| | | }, |
| | | computed: { |
| | | iconSnowWidth() { |
| | | return (Math.floor(this.iconSize / 24) || 1) * 2 |
| | | }, |
| | | contentdownText() { |
| | | return this.contentText.contentdown || t("uni-load-more.contentdown") |
| | | }, |
| | | contentrefreshText() { |
| | | return this.contentText.contentrefresh || t("uni-load-more.contentrefresh") |
| | | }, |
| | | contentnomoreText() { |
| | | return this.contentText.contentnomore || t("uni-load-more.contentnomore") |
| | | } |
| | | }, |
| | | mounted() { |
| | | // #ifdef APP-PLUS |
| | | var pages = getCurrentPages(); |
| | | var page = pages[pages.length - 1]; |
| | | var currentWebview = page.$getAppWebview(); |
| | | currentWebview.addEventListener('hide', () => { |
| | | this.webviewHide = true |
| | | }) |
| | | currentWebview.addEventListener('show', () => { |
| | | this.webviewHide = false |
| | | }) |
| | | // #endif |
| | | }, |
| | | methods: { |
| | | onClick() { |
| | | this.$emit('clickLoadMore', { |
| | | detail: { |
| | | status: this.status, |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" > |
| | | .uni-load-more { |
| | | /* #ifndef APP-NVUE */ |
| | | display: flex; |
| | | /* #endif */ |
| | | flex-direction: row; |
| | | height: 40px; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .uni-load-more__text { |
| | | font-size: 14px; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .uni-load-more__img { |
| | | width: 24px; |
| | | height: 24px; |
| | | // margin-right: 8px; |
| | | } |
| | | |
| | | .uni-load-more__img--nvue { |
| | | color: #666666; |
| | | } |
| | | |
| | | .uni-load-more__img--android, |
| | | .uni-load-more__img--ios { |
| | | width: 24px; |
| | | height: 24px; |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | /* #ifndef APP-NVUE */ |
| | | .uni-load-more__img--android { |
| | | animation: loading-ios 1s 0s linear infinite; |
| | | } |
| | | |
| | | @keyframes loading-android { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | .uni-load-more__img--ios-H5 { |
| | | position: relative; |
| | | animation: loading-ios-H5 1s 0s step-end infinite; |
| | | } |
| | | |
| | | .uni-load-more__img--ios-H5 image { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | left: 0; |
| | | top: 0; |
| | | } |
| | | |
| | | @keyframes loading-ios-H5 { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 8% { |
| | | transform: rotate(30deg); |
| | | } |
| | | |
| | | 16% { |
| | | transform: rotate(60deg); |
| | | } |
| | | |
| | | 24% { |
| | | transform: rotate(90deg); |
| | | } |
| | | |
| | | 32% { |
| | | transform: rotate(120deg); |
| | | } |
| | | |
| | | 40% { |
| | | transform: rotate(150deg); |
| | | } |
| | | |
| | | 48% { |
| | | transform: rotate(180deg); |
| | | } |
| | | |
| | | 56% { |
| | | transform: rotate(210deg); |
| | | } |
| | | |
| | | 64% { |
| | | transform: rotate(240deg); |
| | | } |
| | | |
| | | 73% { |
| | | transform: rotate(270deg); |
| | | } |
| | | |
| | | 82% { |
| | | transform: rotate(300deg); |
| | | } |
| | | |
| | | 91% { |
| | | transform: rotate(330deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | /* #endif */ |
| | | |
| | | /* #ifdef H5 */ |
| | | .uni-load-more__img--android-H5 { |
| | | animation: loading-android-H5-rotate 2s linear infinite; |
| | | transform-origin: center center; |
| | | } |
| | | |
| | | .uni-load-more__img--android-H5 circle { |
| | | display: inline-block; |
| | | animation: loading-android-H5-dash 1.5s ease-in-out infinite; |
| | | stroke: currentColor; |
| | | stroke-linecap: round; |
| | | } |
| | | |
| | | @keyframes loading-android-H5-rotate { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes loading-android-H5-dash { |
| | | 0% { |
| | | stroke-dasharray: 1, 200; |
| | | stroke-dashoffset: 0; |
| | | } |
| | | |
| | | 50% { |
| | | stroke-dasharray: 90, 150; |
| | | stroke-dashoffset: -40; |
| | | } |
| | | |
| | | 100% { |
| | | stroke-dasharray: 90, 150; |
| | | stroke-dashoffset: -120; |
| | | } |
| | | } |
| | | |
| | | /* #endif */ |
| | | |
| | | /* #ifndef APP-NVUE || H5 */ |
| | | .uni-load-more__img--android-MP { |
| | | position: relative; |
| | | width: 24px; |
| | | height: 24px; |
| | | transform: rotate(0deg); |
| | | animation: loading-ios 1s 0s ease infinite; |
| | | } |
| | | |
| | | .uni-load-more__img--android-MP .uni-load-more__img-icon { |
| | | position: absolute; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 50%; |
| | | border: solid 2px transparent; |
| | | border-top: solid 2px #777777; |
| | | transform-origin: center; |
| | | } |
| | | |
| | | .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(1) { |
| | | animation: loading-android-MP-1 1s 0s linear infinite; |
| | | } |
| | | |
| | | .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(2) { |
| | | animation: loading-android-MP-2 1s 0s linear infinite; |
| | | } |
| | | |
| | | .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(3) { |
| | | animation: loading-android-MP-3 1s 0s linear infinite; |
| | | } |
| | | |
| | | @keyframes loading-android { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes loading-android-MP-1 { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 50% { |
| | | transform: rotate(90deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes loading-android-MP-2 { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 50% { |
| | | transform: rotate(180deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes loading-android-MP-3 { |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | |
| | | 50% { |
| | | transform: rotate(270deg); |
| | | } |
| | | |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | /* #endif */ |
| | | </style> |
New file |
| | |
| | | { |
| | | "id": "uni-load-more", |
| | | "displayName": "uni-load-more 加载更多", |
| | | "version": "1.3.6", |
| | | "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。", |
| | | "keywords": [ |
| | | "uni-ui", |
| | | "uniui", |
| | | "加载更多", |
| | | "load-more" |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "" |
| | | }, |
| | | "directories": { |
| | | "example": "../../temps/example_temps" |
| | | }, |
| | | "dcloudext": { |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "无", |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", |
| | | "type": "component-vue" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": ["uni-scss"], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y", |
| | | "alipay": "n" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "y" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y" |
| | | }, |
| | | "快应用": { |
| | | "华为": "u", |
| | | "联盟": "u" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | |
| | | ### LoadMore 加载更多 |
| | | > **组件名:uni-load-more** |
| | | > 代码块: `uLoadMore` |
| | | |
| | | |
| | | 用于列表中,做滚动加载使用,展示 loading 的各种状态。 |
| | | |
| | | |
| | | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more) |
| | | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 |
| | | |
| | | |
New file |
| | |
| | | ## 1.0.3(2022-01-21) |
| | | - 优化 组件示例 |
| | | ## 1.0.2(2021-11-22) |
| | | - 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 |
| | | ## 1.0.1(2021-11-22) |
| | | - 修复 vue3中scss语法兼容问题 |
| | | ## 1.0.0(2021-11-18) |
| | | - init |
New file |
| | |
| | | @import './styles/index.scss'; |
New file |
| | |
| | | { |
| | | "id": "uni-scss", |
| | | "displayName": "uni-scss 辅助样式", |
| | | "version": "1.0.3", |
| | | "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", |
| | | "keywords": [ |
| | | "uni-scss", |
| | | "uni-ui", |
| | | "辅助样式" |
| | | ], |
| | | "repository": "https://github.com/dcloudio/uni-ui", |
| | | "engines": { |
| | | "HBuilderX": "^3.1.0" |
| | | }, |
| | | "dcloudext": { |
| | | "category": [ |
| | | "JS SDK", |
| | | "通用 SDK" |
| | | ], |
| | | "sale": { |
| | | "regular": { |
| | | "price": "0.00" |
| | | }, |
| | | "sourcecode": { |
| | | "price": "0.00" |
| | | } |
| | | }, |
| | | "contact": { |
| | | "qq": "" |
| | | }, |
| | | "declaration": { |
| | | "ads": "无", |
| | | "data": "无", |
| | | "permissions": "无" |
| | | }, |
| | | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" |
| | | }, |
| | | "uni_modules": { |
| | | "dependencies": [], |
| | | "encrypt": [], |
| | | "platforms": { |
| | | "cloud": { |
| | | "tcb": "y", |
| | | "aliyun": "y" |
| | | }, |
| | | "client": { |
| | | "App": { |
| | | "app-vue": "y", |
| | | "app-nvue": "u" |
| | | }, |
| | | "H5-mobile": { |
| | | "Safari": "y", |
| | | "Android Browser": "y", |
| | | "微信浏览器(Android)": "y", |
| | | "QQ浏览器(Android)": "y" |
| | | }, |
| | | "H5-pc": { |
| | | "Chrome": "y", |
| | | "IE": "y", |
| | | "Edge": "y", |
| | | "Firefox": "y", |
| | | "Safari": "y" |
| | | }, |
| | | "小程序": { |
| | | "微信": "y", |
| | | "阿里": "y", |
| | | "百度": "y", |
| | | "字节跳动": "y", |
| | | "QQ": "y" |
| | | }, |
| | | "快应用": { |
| | | "华为": "n", |
| | | "联盟": "n" |
| | | }, |
| | | "Vue": { |
| | | "vue2": "y", |
| | | "vue3": "y" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | `uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 |
| | | |
| | | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) |
| | | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 |
New file |
| | |
| | | @import './setting/_variables.scss'; |
| | | @import './setting/_border.scss'; |
| | | @import './setting/_color.scss'; |
| | | @import './setting/_space.scss'; |
| | | @import './setting/_radius.scss'; |
| | | @import './setting/_text.scss'; |
| | | @import './setting/_styles.scss'; |
New file |
| | |
| | | .uni-border { |
| | | border: 1px $uni-border-1 solid; |
| | | } |
New file |
| | |
| | | |
| | | // TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 |
| | | // @mixin get-styles($k,$c) { |
| | | // @if $k == size or $k == weight{ |
| | | // font-#{$k}:#{$c} |
| | | // }@else{ |
| | | // #{$k}:#{$c} |
| | | // } |
| | | // } |
| | | $uni-ui-color:( |
| | | // 主色 |
| | | primary: $uni-primary, |
| | | primary-disable: $uni-primary-disable, |
| | | primary-light: $uni-primary-light, |
| | | // 辅助色 |
| | | success: $uni-success, |
| | | success-disable: $uni-success-disable, |
| | | success-light: $uni-success-light, |
| | | warning: $uni-warning, |
| | | warning-disable: $uni-warning-disable, |
| | | warning-light: $uni-warning-light, |
| | | error: $uni-error, |
| | | error-disable: $uni-error-disable, |
| | | error-light: $uni-error-light, |
| | | info: $uni-info, |
| | | info-disable: $uni-info-disable, |
| | | info-light: $uni-info-light, |
| | | // 中性色 |
| | | main-color: $uni-main-color, |
| | | base-color: $uni-base-color, |
| | | secondary-color: $uni-secondary-color, |
| | | extra-color: $uni-extra-color, |
| | | // 背景色 |
| | | bg-color: $uni-bg-color, |
| | | // 边框颜色 |
| | | border-1: $uni-border-1, |
| | | border-2: $uni-border-2, |
| | | border-3: $uni-border-3, |
| | | border-4: $uni-border-4, |
| | | // 黑色 |
| | | black:$uni-black, |
| | | // 白色 |
| | | white:$uni-white, |
| | | // 透明 |
| | | transparent:$uni-transparent |
| | | ) !default; |
| | | @each $key, $child in $uni-ui-color { |
| | | .uni-#{"" + $key} { |
| | | color: $child; |
| | | } |
| | | .uni-#{"" + $key}-bg { |
| | | background-color: $child; |
| | | } |
| | | } |
| | | .uni-shadow-sm { |
| | | box-shadow: $uni-shadow-sm; |
| | | } |
| | | .uni-shadow-base { |
| | | box-shadow: $uni-shadow-base; |
| | | } |
| | | .uni-shadow-lg { |
| | | box-shadow: $uni-shadow-lg; |
| | | } |
| | | .uni-mask { |
| | | background-color:$uni-mask; |
| | | } |
New file |
| | |
| | | @mixin radius($r,$d:null ,$important: false){ |
| | | $radius-value:map-get($uni-radius, $r) if($important, !important, null); |
| | | // Key exists within the $uni-radius variable |
| | | @if (map-has-key($uni-radius, $r) and $d){ |
| | | @if $d == t { |
| | | border-top-left-radius:$radius-value; |
| | | border-top-right-radius:$radius-value; |
| | | }@else if $d == r { |
| | | border-top-right-radius:$radius-value; |
| | | border-bottom-right-radius:$radius-value; |
| | | }@else if $d == b { |
| | | border-bottom-left-radius:$radius-value; |
| | | border-bottom-right-radius:$radius-value; |
| | | }@else if $d == l { |
| | | border-top-left-radius:$radius-value; |
| | | border-bottom-left-radius:$radius-value; |
| | | }@else if $d == tl { |
| | | border-top-left-radius:$radius-value; |
| | | }@else if $d == tr { |
| | | border-top-right-radius:$radius-value; |
| | | }@else if $d == br { |
| | | border-bottom-right-radius:$radius-value; |
| | | }@else if $d == bl { |
| | | border-bottom-left-radius:$radius-value; |
| | | } |
| | | }@else{ |
| | | border-radius:$radius-value; |
| | | } |
| | | } |
| | | |
| | | @each $key, $child in $uni-radius { |
| | | @if($key){ |
| | | .uni-radius-#{"" + $key} { |
| | | @include radius($key) |
| | | } |
| | | }@else{ |
| | | .uni-radius { |
| | | @include radius($key) |
| | | } |
| | | } |
| | | } |
| | | |
| | | @each $direction in t, r, b, l,tl, tr, br, bl { |
| | | @each $key, $child in $uni-radius { |
| | | @if($key){ |
| | | .uni-radius-#{"" + $direction}-#{"" + $key} { |
| | | @include radius($key,$direction,false) |
| | | } |
| | | }@else{ |
| | | .uni-radius-#{$direction} { |
| | | @include radius($key,$direction,false) |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | @mixin fn($space,$direction,$size,$n) { |
| | | @if $n { |
| | | #{$space}-#{$direction}: #{$size*$uni-space-root}px |
| | | } @else { |
| | | #{$space}-#{$direction}: #{-$size*$uni-space-root}px |
| | | } |
| | | } |
| | | @mixin get-styles($direction,$i,$space,$n){ |
| | | @if $direction == t { |
| | | @include fn($space, top,$i,$n); |
| | | } |
| | | @if $direction == r { |
| | | @include fn($space, right,$i,$n); |
| | | } |
| | | @if $direction == b { |
| | | @include fn($space, bottom,$i,$n); |
| | | } |
| | | @if $direction == l { |
| | | @include fn($space, left,$i,$n); |
| | | } |
| | | @if $direction == x { |
| | | @include fn($space, left,$i,$n); |
| | | @include fn($space, right,$i,$n); |
| | | } |
| | | @if $direction == y { |
| | | @include fn($space, top,$i,$n); |
| | | @include fn($space, bottom,$i,$n); |
| | | } |
| | | @if $direction == a { |
| | | @if $n { |
| | | #{$space}:#{$i*$uni-space-root}px; |
| | | } @else { |
| | | #{$space}:#{-$i*$uni-space-root}px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @each $orientation in m,p { |
| | | $space: margin; |
| | | @if $orientation == m { |
| | | $space: margin; |
| | | } @else { |
| | | $space: padding; |
| | | } |
| | | @for $i from 0 through 16 { |
| | | @each $direction in t, r, b, l, x, y, a { |
| | | .uni-#{$orientation}#{$direction}-#{$i} { |
| | | @include get-styles($direction,$i,$space,true); |
| | | } |
| | | .uni-#{$orientation}#{$direction}-n#{$i} { |
| | | @include get-styles($direction,$i,$space,false); |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | /* #ifndef APP-NVUE */ |
| | | |
| | | $-color-white:#fff; |
| | | $-color-black:#000; |
| | | @mixin base-style($color) { |
| | | color: #fff; |
| | | background-color: $color; |
| | | border-color: mix($-color-black, $color, 8%); |
| | | &:not([hover-class]):active { |
| | | background: mix($-color-black, $color, 10%); |
| | | border-color: mix($-color-black, $color, 20%); |
| | | color: $-color-white; |
| | | outline: none; |
| | | } |
| | | } |
| | | @mixin is-color($color) { |
| | | @include base-style($color); |
| | | &[loading] { |
| | | @include base-style($color); |
| | | &::before { |
| | | margin-right:5px; |
| | | } |
| | | } |
| | | &[disabled] { |
| | | &, |
| | | &[loading], |
| | | &:not([hover-class]):active { |
| | | color: $-color-white; |
| | | border-color: mix(darken($color,10%), $-color-white); |
| | | background-color: mix($color, $-color-white); |
| | | } |
| | | } |
| | | |
| | | } |
| | | @mixin base-plain-style($color) { |
| | | color:$color; |
| | | background-color: mix($-color-white, $color, 90%); |
| | | border-color: mix($-color-white, $color, 70%); |
| | | &:not([hover-class]):active { |
| | | background: mix($-color-white, $color, 80%); |
| | | color: $color; |
| | | outline: none; |
| | | border-color: mix($-color-white, $color, 50%); |
| | | } |
| | | } |
| | | @mixin is-plain($color){ |
| | | &[plain] { |
| | | @include base-plain-style($color); |
| | | &[loading] { |
| | | @include base-plain-style($color); |
| | | &::before { |
| | | margin-right:5px; |
| | | } |
| | | } |
| | | &[disabled] { |
| | | &, |
| | | &:active { |
| | | color: mix($-color-white, $color, 40%); |
| | | background-color: mix($-color-white, $color, 90%); |
| | | border-color: mix($-color-white, $color, 80%); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .uni-btn { |
| | | margin: 5px; |
| | | color: #393939; |
| | | border:1px solid #ccc; |
| | | font-size: 16px; |
| | | font-weight: 200; |
| | | background-color: #F9F9F9; |
| | | // TODO 暂时处理边框隐藏一边的问题 |
| | | overflow: visible; |
| | | &::after{ |
| | | border: none; |
| | | } |
| | | |
| | | &:not([type]),&[type=default] { |
| | | color: #999; |
| | | &[loading] { |
| | | background: none; |
| | | &::before { |
| | | margin-right:5px; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | &[disabled]{ |
| | | color: mix($-color-white, #999, 60%); |
| | | &, |
| | | &[loading], |
| | | &:active { |
| | | color: mix($-color-white, #999, 60%); |
| | | background-color: mix($-color-white,$-color-black , 98%); |
| | | border-color: mix($-color-white, #999, 85%); |
| | | } |
| | | } |
| | | |
| | | &[plain] { |
| | | color: #999; |
| | | background: none; |
| | | border-color: $uni-border-1; |
| | | &:not([hover-class]):active { |
| | | background: none; |
| | | color: mix($-color-white, $-color-black, 80%); |
| | | border-color: mix($-color-white, $-color-black, 90%); |
| | | outline: none; |
| | | } |
| | | &[disabled]{ |
| | | &, |
| | | &[loading], |
| | | &:active { |
| | | background: none; |
| | | color: mix($-color-white, #999, 60%); |
| | | border-color: mix($-color-white, #999, 85%); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | &:not([hover-class]):active { |
| | | color: mix($-color-white, $-color-black, 50%); |
| | | } |
| | | |
| | | &[size=mini] { |
| | | font-size: 16px; |
| | | font-weight: 200; |
| | | border-radius: 8px; |
| | | } |
| | | |
| | | |
| | | |
| | | &.uni-btn-small { |
| | | font-size: 14px; |
| | | } |
| | | &.uni-btn-mini { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | &.uni-btn-radius { |
| | | border-radius: 999px; |
| | | } |
| | | &[type=primary] { |
| | | @include is-color($uni-primary); |
| | | @include is-plain($uni-primary) |
| | | } |
| | | &[type=success] { |
| | | @include is-color($uni-success); |
| | | @include is-plain($uni-success) |
| | | } |
| | | &[type=error] { |
| | | @include is-color($uni-error); |
| | | @include is-plain($uni-error) |
| | | } |
| | | &[type=warning] { |
| | | @include is-color($uni-warning); |
| | | @include is-plain($uni-warning) |
| | | } |
| | | &[type=info] { |
| | | @include is-color($uni-info); |
| | | @include is-plain($uni-info) |
| | | } |
| | | } |
| | | /* #endif */ |
New file |
| | |
| | | @mixin get-styles($k,$c) { |
| | | @if $k == size or $k == weight{ |
| | | font-#{$k}:#{$c} |
| | | }@else{ |
| | | #{$k}:#{$c} |
| | | } |
| | | } |
| | | |
| | | @each $key, $child in $uni-headings { |
| | | /* #ifndef APP-NVUE */ |
| | | .uni-#{$key} { |
| | | @each $k, $c in $child { |
| | | @include get-styles($k,$c) |
| | | } |
| | | } |
| | | /* #endif */ |
| | | /* #ifdef APP-NVUE */ |
| | | .container .uni-#{$key} { |
| | | @each $k, $c in $child { |
| | | @include get-styles($k,$c) |
| | | } |
| | | } |
| | | /* #endif */ |
| | | } |
New file |
| | |
| | | // @use "sass:math"; |
| | | @import '../tools/functions.scss'; |
| | | // 间距基础倍数 |
| | | $uni-space-root: 2 !default; |
| | | // 边框半径默认值 |
| | | $uni-radius-root:5px !default; |
| | | $uni-radius: () !default; |
| | | // 边框半径断点 |
| | | $uni-radius: map-deep-merge( |
| | | ( |
| | | 0: 0, |
| | | // TODO 当前版本暂时不支持 sm 属性 |
| | | // 'sm': math.div($uni-radius-root, 2), |
| | | null: $uni-radius-root, |
| | | 'lg': $uni-radius-root * 2, |
| | | 'xl': $uni-radius-root * 6, |
| | | 'pill': 9999px, |
| | | 'circle': 50% |
| | | ), |
| | | $uni-radius |
| | | ); |
| | | // 字体家族 |
| | | $body-font-family: 'Roboto', sans-serif !default; |
| | | // 文本 |
| | | $heading-font-family: $body-font-family !default; |
| | | $uni-headings: () !default; |
| | | $letterSpacing: -0.01562em; |
| | | $uni-headings: map-deep-merge( |
| | | ( |
| | | 'h1': ( |
| | | size: 32px, |
| | | weight: 300, |
| | | line-height: 50px, |
| | | // letter-spacing:-0.01562em |
| | | ), |
| | | 'h2': ( |
| | | size: 28px, |
| | | weight: 300, |
| | | line-height: 40px, |
| | | // letter-spacing: -0.00833em |
| | | ), |
| | | 'h3': ( |
| | | size: 24px, |
| | | weight: 400, |
| | | line-height: 32px, |
| | | // letter-spacing: normal |
| | | ), |
| | | 'h4': ( |
| | | size: 20px, |
| | | weight: 400, |
| | | line-height: 30px, |
| | | // letter-spacing: 0.00735em |
| | | ), |
| | | 'h5': ( |
| | | size: 16px, |
| | | weight: 400, |
| | | line-height: 24px, |
| | | // letter-spacing: normal |
| | | ), |
| | | 'h6': ( |
| | | size: 14px, |
| | | weight: 500, |
| | | line-height: 18px, |
| | | // letter-spacing: 0.0125em |
| | | ), |
| | | 'subtitle': ( |
| | | size: 12px, |
| | | weight: 400, |
| | | line-height: 20px, |
| | | // letter-spacing: 0.00937em |
| | | ), |
| | | 'body': ( |
| | | font-size: 14px, |
| | | font-weight: 400, |
| | | line-height: 22px, |
| | | // letter-spacing: 0.03125em |
| | | ), |
| | | 'caption': ( |
| | | 'size': 12px, |
| | | 'weight': 400, |
| | | 'line-height': 20px, |
| | | // 'letter-spacing': 0.03333em, |
| | | // 'text-transform': false |
| | | ) |
| | | ), |
| | | $uni-headings |
| | | ); |
| | | |
| | | |
| | | |
| | | // 主色 |
| | | $uni-primary: #2979ff !default; |
| | | $uni-primary-disable:lighten($uni-primary,20%) !default; |
| | | $uni-primary-light: lighten($uni-primary,25%) !default; |
| | | |
| | | // 辅助色 |
| | | // 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 |
| | | $uni-success: #18bc37 !default; |
| | | $uni-success-disable:lighten($uni-success,20%) !default; |
| | | $uni-success-light: lighten($uni-success,25%) !default; |
| | | |
| | | $uni-warning: #f3a73f !default; |
| | | $uni-warning-disable:lighten($uni-warning,20%) !default; |
| | | $uni-warning-light: lighten($uni-warning,25%) !default; |
| | | |
| | | $uni-error: #e43d33 !default; |
| | | $uni-error-disable:lighten($uni-error,20%) !default; |
| | | $uni-error-light: lighten($uni-error,25%) !default; |
| | | |
| | | $uni-info: #8f939c !default; |
| | | $uni-info-disable:lighten($uni-info,20%) !default; |
| | | $uni-info-light: lighten($uni-info,25%) !default; |
| | | |
| | | // 中性色 |
| | | // 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 |
| | | $uni-main-color: #3a3a3a !default; // 主要文字 |
| | | $uni-base-color: #6a6a6a !default; // 常规文字 |
| | | $uni-secondary-color: #909399 !default; // 次要文字 |
| | | $uni-extra-color: #c7c7c7 !default; // 辅助说明 |
| | | |
| | | // 边框颜色 |
| | | $uni-border-1: #F0F0F0 !default; |
| | | $uni-border-2: #EDEDED !default; |
| | | $uni-border-3: #DCDCDC !default; |
| | | $uni-border-4: #B9B9B9 !default; |
| | | |
| | | // 常规色 |
| | | $uni-black: #000000 !default; |
| | | $uni-white: #ffffff !default; |
| | | $uni-transparent: rgba($color: #000000, $alpha: 0) !default; |
| | | |
| | | // 背景色 |
| | | $uni-bg-color: #f7f7f7 !default; |
| | | |
| | | /* 水平间距 */ |
| | | $uni-spacing-sm: 8px !default; |
| | | $uni-spacing-base: 15px !default; |
| | | $uni-spacing-lg: 30px !default; |
| | | |
| | | // 阴影 |
| | | $uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; |
| | | $uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; |
| | | $uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; |
| | | |
| | | // 蒙版 |
| | | $uni-mask: rgba($color: #000000, $alpha: 0.4) !default; |
New file |
| | |
| | | // 合并 map |
| | | @function map-deep-merge($parent-map, $child-map){ |
| | | $result: $parent-map; |
| | | @each $key, $child in $child-map { |
| | | $parent-has-key: map-has-key($result, $key); |
| | | $parent-value: map-get($result, $key); |
| | | $parent-type: type-of($parent-value); |
| | | $child-type: type-of($child); |
| | | $parent-is-map: $parent-type == map; |
| | | $child-is-map: $child-type == map; |
| | | |
| | | @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ |
| | | $result: map-merge($result, ( $key: $child )); |
| | | }@else { |
| | | $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); |
| | | } |
| | | } |
| | | @return $result; |
| | | }; |
New file |
| | |
| | | // 间距基础倍数 |
| | | $uni-space-root: 2; |
| | | // 边框半径默认值 |
| | | $uni-radius-root:5px; |
| | | // 主色 |
| | | $uni-primary: #2979ff; |
| | | // 辅助色 |
| | | $uni-success: #4cd964; |
| | | // 警告色 |
| | | $uni-warning: #f0ad4e; |
| | | // 错误色 |
| | | $uni-error: #dd524d; |
| | | // 描述色 |
| | | $uni-info: #909399; |
| | | // 中性色 |
| | | $uni-main-color: #303133; |
| | | $uni-base-color: #606266; |
| | | $uni-secondary-color: #909399; |
| | | $uni-extra-color: #C0C4CC; |
| | | // 背景色 |
| | | $uni-bg-color: #f5f5f5; |
| | | // 边框颜色 |
| | | $uni-border-1: #DCDFE6; |
| | | $uni-border-2: #E4E7ED; |
| | | $uni-border-3: #EBEEF5; |
| | | $uni-border-4: #F2F6FC; |
| | | |
| | | // 常规色 |
| | | $uni-black: #000000; |
| | | $uni-white: #ffffff; |
| | | $uni-transparent: rgba($color: #000000, $alpha: 0); |
New file |
| | |
| | | @import './styles/setting/_variables.scss'; |
| | | // 间距基础倍数 |
| | | $uni-space-root: 2; |
| | | // 边框半径默认值 |
| | | $uni-radius-root:5px; |
| | | |
| | | // 主色 |
| | | $uni-primary: #2979ff; |
| | | $uni-primary-disable:mix(#fff,$uni-primary,50%); |
| | | $uni-primary-light: mix(#fff,$uni-primary,80%); |
| | | |
| | | // 辅助色 |
| | | // 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 |
| | | $uni-success: #18bc37; |
| | | $uni-success-disable:mix(#fff,$uni-success,50%); |
| | | $uni-success-light: mix(#fff,$uni-success,80%); |
| | | |
| | | $uni-warning: #f3a73f; |
| | | $uni-warning-disable:mix(#fff,$uni-warning,50%); |
| | | $uni-warning-light: mix(#fff,$uni-warning,80%); |
| | | |
| | | $uni-error: #e43d33; |
| | | $uni-error-disable:mix(#fff,$uni-error,50%); |
| | | $uni-error-light: mix(#fff,$uni-error,80%); |
| | | |
| | | $uni-info: #8f939c; |
| | | $uni-info-disable:mix(#fff,$uni-info,50%); |
| | | $uni-info-light: mix(#fff,$uni-info,80%); |
| | | |
| | | // 中性色 |
| | | // 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 |
| | | $uni-main-color: #3a3a3a; // 主要文字 |
| | | $uni-base-color: #6a6a6a; // 常规文字 |
| | | $uni-secondary-color: #909399; // 次要文字 |
| | | $uni-extra-color: #c7c7c7; // 辅助说明 |
| | | |
| | | // 边框颜色 |
| | | $uni-border-1: #F0F0F0; |
| | | $uni-border-2: #EDEDED; |
| | | $uni-border-3: #DCDCDC; |
| | | $uni-border-4: #B9B9B9; |
| | | |
| | | // 常规色 |
| | | $uni-black: #000000; |
| | | $uni-white: #ffffff; |
| | | $uni-transparent: rgba($color: #000000, $alpha: 0); |
| | | |
| | | // 背景色 |
| | | $uni-bg-color: #f7f7f7; |
| | | |
| | | /* 水平间距 */ |
| | | $uni-spacing-sm: 8px; |
| | | $uni-spacing-base: 15px; |
| | | $uni-spacing-lg: 30px; |
| | | |
| | | // 阴影 |
| | | $uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); |
| | | $uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); |
| | | $uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); |
| | | |
| | | // 蒙版 |
| | | $uni-mask: rgba($color: #000000, $alpha: 0.4); |
| | |
| | | |
| | | return new Promise(function(resolve, reject) { |
| | | |
| | | let token = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MTY3NjA3MCwiY3JlYXRlZCI6MTc0MDM4MDA3MDQzM30.VbtID-0OdvLSLraK3Sr9cPbOLnvrrfobX-dHg3rScv7EUyu-qqPK_pXzd03wa5CgSQ7R6-m9R3NZqmPQEuQjEg' |
| | | let token = uni.getStorageSync('token') || |
| | | 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOjE4OTI0ODk0OTc5Nzk5NDA4NjUsInR5cGUiOjEsImV4cCI6MTc0MTY3NjA3MCwiY3JlYXRlZCI6MTc0MDM4MDA3MDQzM30.VbtID-0OdvLSLraK3Sr9cPbOLnvrrfobX-dHg3rScv7EUyu-qqPK_pXzd03wa5CgSQ7R6-m9R3NZqmPQEuQjEg' |
| | | let header = { |
| | | 'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json', |
| | | 'Authorization': 'Bearer ' + token, |
| | |
| | | export default { |
| | | dev: { |
| | | SERVER_URL: '', |
| | | SERVER_URL: 'http://192.168.110.188:6194', |
| | | }, |
| | | test: { |
| | | SERVER_URL: '', |
| | |
| | | import { AvatarDropdown, AvatarName } from './components/RightContent/AvatarDropdown'; |
| | | import { errorConfig } from './requestErrorConfig'; |
| | | const loginPath = '/login'; |
| | | import logo from '../public/logo/logo.png' |
| | | import '../public/font.css' |
| | | |
| | | |
| | |
| | | permission?: Array<Permissions>; |
| | | loading?: boolean; |
| | | }> { |
| | | |
| | | // 如果不是登录页面,执行 |
| | | const { location } = history; |
| | | |
| | | if (location.pathname !== loginPath && !localStorage.getItem('userInfo')) { |
| | | history.replace(loginPath) |
| | | |
| | | return { |
| | | permission: JSON.parse(localStorage.getItem('access') || '') || [], |
| | | currentUser: JSON.parse(localStorage.getItem('userInfo') || '') || {}, |
| | | settings: { ...defaultSettings, fixedHeader: true } as Partial<LayoutSettings>, |
| | | }; |
| | | } |
| | | return { |
| | | permission: JSON.parse(localStorage.getItem('access') || '') || [], |
| | | currentUser: JSON.parse(localStorage.getItem('userInfo') || '') || {}, |
| | |
| | | export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) => { |
| | | |
| | | return { |
| | | siderWidth: '210', |
| | | token: { |
| | | |
| | | }, |
| | | logo: false, |
| | | avatarProps: { |
| | | title: <AvatarName />, |
| | | render: (_, avatarChildren) => { |
| | |
| | | }, |
| | | waterMarkProps: { |
| | | content: false, |
| | | }, |
| | | onPageChange: () => { |
| | | const { location: { pathname } } = history; |
| | | // 如果没有登录,重定向到 login |
| | | if (!initialState?.currentUser && location.pathname !== loginPath) { |
| | | // history.push(loginPath); |
| | | return |
| | | } |
| | | }, |
| | | // 自定义 403 页面 |
| | | unAccessible: <div></div>, |
| | |
| | | ); |
| | | }, |
| | | ...initialState?.settings, |
| | | logo |
| | | }; |
| | | }; |
| | | |
| | |
| | | left: unset; |
| | | } |
| | | |
| | | .ant-pro-layout .ant-pro-sider.ant-pro-sider-fixed-mix { |
| | | height: calc(100% - 74px); |
| | | inset-block-start: 74px; |
| | | } |
| | | |
| | | .ant-layout-has-sider>div:nth-child(1) { |
| | | max-width: 210px !important; |
| | | min-width: 64px !important; |
| | | } |
| | | |
| | | .ant-layout-header { |
| | | height: 74px !important; |
| | | } |
| | | |
| | | .ant-pro-global-header { |
| | | height: 74px !important; |
| | | } |
| | | |
| | | canvas { |
| | | display: block; |
| | | } |
| | |
| | | display: block; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .del-confirm { |
| | | .del-icon { |
| | | margin-right: 5px; |
| | | width: 22px; |
| | | height: 22px; |
| | | background-color: rgba(233, 157, 66, 1); |
| | | color: #fff; |
| | | border-radius: 50%; |
| | | align-content: center; |
| | | text-align: center; |
| | | } |
| | | |
| | | .ant-modal-confirm-btns { |
| | | .ant-btn-default:last-child { |
| | | border-color: #1677ff !important; |
| | | color: #fff !important; |
| | | background-color: #1677ff !important; |
| | | } |
| | | |
| | | .ant-btn-default { |
| | | color: #000 !important; |
| | | border-color: #d9d9d9 !important; |
| | | } |
| | | } |
| | | } |
| | |
| | | import { LockOutlined, SafetyOutlined, UserOutlined } from '@ant-design/icons'; |
| | | import { LoginForm, ProFormText } from '@ant-design/pro-components'; |
| | | import { useEmotionCss } from '@ant-design/use-emotion-css'; |
| | | import { Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max'; |
| | | import { history, SelectLang, useIntl, useModel } from '@umijs/max'; |
| | | import { Alert, message, Space } from 'antd'; |
| | | // import CryptoJS from 'crypto-js'; |
| | | import CryptoJS from 'crypto-js'; |
| | | import React, { useRef, useState } from 'react'; |
| | | import Captcha from 'react-captcha-code'; |
| | | import { useAccess } from 'umi'; |
| | | import Settings from '../../../config/defaultSettings'; |
| | | import logo from '../../../public/logo/logo.png'; |
| | | import EditPwd from './editPwd.jsx'; |
| | | import { updatePwd } from './service.js'; |
| | | import './style.less'; |
| | |
| | | const captchaRef = useRef(); |
| | | const [type, setType] = useState<string>('username'); |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | const access = useAccess(); |
| | | const style1 = { |
| | | display: 'flex', |
| | | }; |
| | | |
| | | const containerClassName = useEmotionCss(() => { |
| | | return { |
| | | height: '100vh', |
| | |
| | | id: 'pages.login.success', |
| | | defaultMessage: '登录成功!', |
| | | }); |
| | | const userInfo = data.userInfo.user |
| | | const userInfo = { userName: data.name }; |
| | | localStorage.setItem('userInfo', JSON.stringify(userInfo)); |
| | | let permissionList: any[] = [ |
| | | "/work_order_transaction_management/work_order_item_configuration", |
| | | "/work_order_transaction_management", |
| | | "/system_setting/role_management/edit", |
| | | "/work_order_transaction_management/banner_management", |
| | | "/work_order_transaction_management/banner_management/del", |
| | | "/system_setting/position_management/add", |
| | | "/message_notification/mark_read", |
| | | "/system_setting/role_management", |
| | | "/system_setting/unit_management/del", |
| | | "/system_setting/people_management/freeze", |
| | | "/work_order_transaction_management/problem_type_management", |
| | | "/system_setting/position_management/edit", |
| | | "/system_setting/people_management/del", |
| | | "/work_order_transaction_management/problem_type_management/edit", |
| | | "/position_management/del", |
| | | "/system_setting/unit_management/edit", |
| | | "/system_setting/people_management/edit", |
| | | "/work_order_transaction_management/problem_type_management/add", |
| | | "/system_setting/unit_management/add", |
| | | "/system_setting/unit_management", |
| | | "/message_notification", |
| | | "/system_setting/role_management/add", |
| | | "/work_order_transaction_management/banner_management/edit", |
| | | "/system_setting/role_management/del", |
| | | "/work_order_transaction_management/problem_type_management/del", |
| | | "/system_setting/people_management/add", |
| | | "/work_order_transaction_management/banner_management/add", |
| | | "/system_setting/position_management", |
| | | "/system_setting", |
| | | "/system_setting/people_management", |
| | | ]; |
| | | let accessObj: any = {}; |
| | | permissionList.map((item) => { |
| | | if (JSON.stringify(data.menu) === JSON.stringify(['*:*:*'])) { |
| | | accessObj[item] = true; |
| | | } else { |
| | | accessObj[item] = data.menu.includes(item); |
| | | } |
| | | }); |
| | | |
| | | |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | token: 'data.token.access_token', |
| | | token: data.token, |
| | | permission: accessObj, |
| | | currentUser: userInfo, |
| | | settings: Settings, |
| | | })); |
| | | |
| | | localStorage.setItem('access', JSON.stringify(accessObj)); |
| | | message.success(defaultLoginSuccessMessage); |
| | | const urlParams = new URL(window.location.href).searchParams; |
| | | setTimeout(() => { |
| | |
| | | }, 0); |
| | | }; |
| | | |
| | | const filterPermission = (list: any[], arr: any[]) => { |
| | | return list.map((item) => { |
| | | if (item.children) { |
| | | filterPermission(item.children, arr); |
| | | } |
| | | arr.push(item); |
| | | return item; |
| | | }); |
| | | }; |
| | | |
| | | const handleClick = (e: String) => { |
| | | setCaptcha(e); |
| | | }; |
| | | // 生成随机字符串 |
| | | const generateRandomString = (length: number) => { |
| | | const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
| | | const str = []; |
| | | for (let i = 0; i < length; i++) { |
| | | const randomIndex = Math.floor(Math.random() * chars.length); |
| | | str.push(chars[randomIndex]); |
| | | } |
| | | return str.join(''); |
| | | }; |
| | | const handleSubmit = async (values: API.LoginParams) => { |
| | | try { |
| | | // 登录 |
| | | const res = await login({ ...values }); |
| | | if (res.code == 200) { |
| | | let accessObj: any = {}; |
| | | localStorage.setItem('access', JSON.stringify(accessObj)); |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | permission: accessObj, |
| | | })); |
| | | localStorage.setItem('token', res.token); |
| | | getUserInfo(res); |
| | | localStorage.setItem('token', res.data.token); |
| | | getUserInfo(res.data); |
| | | return; |
| | | } else { |
| | | throw new Error('登录发生错误'); |
| | | } |
| | | // 如果失败去设置用户错误信息 |
| | | // setUserLoginState(res); |
| | | } catch (error) { |
| | | captchaRef?.current?.refresh(); |
| | | } |
| | |
| | | return ( |
| | | <div className={containerClassName}> |
| | | <div className="loginContent"> |
| | | <Helmet> |
| | | <title> |
| | | {intl.formatMessage({ |
| | | id: 'menu.login', |
| | | defaultMessage: '登录页', |
| | | })} |
| | | - {Settings.title} |
| | | </title> |
| | | </Helmet> |
| | | <Lang /> |
| | | |
| | | <div |
| | | style={{ |
| | | position: 'absolute', |
| | |
| | | left: '50%', |
| | | transform: 'translate(-50%,-50%)', |
| | | display: 'flex', |
| | | flexDirection: 'column', |
| | | alignItems: 'center', |
| | | }} |
| | | > |
| | | {/* <div style={{ width: '787px' }}> |
| | | <h1 |
| | | style={{ fontSize: '48px', color: '#fff', textAlign: 'center', marginBottom: '48px' }} |
| | | > |
| | | 三个身边 |
| | | <div style={{ width: '787px', fontSize: '26px', textAlign: 'center' }}> |
| | | <h1> |
| | | “三个身边”群众工作机制问题化解 |
| | | </h1> |
| | | </div> */} |
| | | <h1>平台</h1> |
| | | </div> |
| | | <LoginForm |
| | | contentStyle={{ |
| | | minWidth: 280, |
| | | maxWidth: '75vw', |
| | | }} |
| | | logo={logo} |
| | | title="" |
| | | subTitle={' '} |
| | | logo={false} |
| | | title={false} |
| | | subTitle={false} |
| | | initialValues={{ |
| | | autoLogin: true, |
| | | }} |
| | | // actions={[ |
| | | // <FormattedMessage |
| | | // key="loginWith" |
| | | // id="pages.login.loginWith" |
| | | // defaultMessage="其他登录方式" |
| | | // />, |
| | | // <ActionIcons key="icons" />, |
| | | // ]} |
| | | onFinish={async (values) => { |
| | | if (values.code != captcha) { |
| | | captchaRef?.current?.refresh(); |
| | |
| | | return; |
| | | } |
| | | delete values.code; |
| | | values.password = CryptoJS.MD5(values.password).toString(); |
| | | await handleSubmit(values as API.LoginParams); |
| | | }} |
| | | > |
| | | {/* <Tabs |
| | | activeKey={type} |
| | | onChange={setType} |
| | | centered |
| | | items={[ |
| | | { |
| | | key: 'username', |
| | | label: intl.formatMessage({ |
| | | id: 'pages.login.accountLogin.tab', |
| | | defaultMessage: '账户密码登录', |
| | | }), |
| | | }, |
| | | { |
| | | key: 'mobile', |
| | | label: intl.formatMessage({ |
| | | id: 'pages.login.phoneLogin.tab', |
| | | defaultMessage: '手机号登录', |
| | | }), |
| | | }, |
| | | ]} |
| | | /> */} |
| | | |
| | | <h1 style={{ fontSize: '26px', textAlign: 'center', marginBottom: '20px' }}>登录</h1> |
| | | {status === 'error' && loginType === 'username' && ( |
| | | <LoginMessage |
| | | content={intl.formatMessage({ |
| | |
| | | {type === 'username' && ( |
| | | <> |
| | | <ProFormText |
| | | name="username" |
| | | name="phone" |
| | | fieldProps={{ |
| | | size: 'large', |
| | | prefix: <UserOutlined />, |
| | |
| | | <Captcha onChange={handleClick} ref={captchaRef} bgColor="#fff" /> |
| | | </div> |
| | | </Space> |
| | | |
| | | {/* <div |
| | | style={{ color: '#0086F6', textAlign: 'right', marginBottom: '21px' }} |
| | | className="login-form-forgot" |
| | | onClick={() => { |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 修改密码 |
| | | </div> */} |
| | | </> |
| | | )} |
| | | |
| | | {status === 'error' && loginType === 'mobile' && <LoginMessage content="验证码错误" />} |
| | | {/* <ProFormText |
| | | fieldProps={{ |
| | | size: 'large', |
| | | prefix: <MobileOutlined />, |
| | | }} |
| | | name="mobile" |
| | | placeholder={intl.formatMessage({ |
| | | id: 'pages.login.phoneNumber.placeholder', |
| | | defaultMessage: '手机号', |
| | | })} |
| | | rules={[ |
| | | { |
| | | required: true, |
| | | message: ( |
| | | <FormattedMessage |
| | | id="pages.login.phoneNumber.required" |
| | | defaultMessage="请输入手机号!" |
| | | /> |
| | | ), |
| | | }, |
| | | { |
| | | pattern: /^1\d{10}$/, |
| | | message: ( |
| | | <FormattedMessage |
| | | id="pages.login.phoneNumber.invalid" |
| | | defaultMessage="手机号格式错误!" |
| | | /> |
| | | ), |
| | | }, |
| | | ]} |
| | | /> */} |
| | | |
| | | {/* <div |
| | | style={{ |
| | | marginBottom: 24, |
| | | }} |
| | | > |
| | | <ProFormCheckbox noStyle name="autoLogin"> |
| | | <FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" /> |
| | | </ProFormCheckbox> |
| | | <a |
| | | style={{ |
| | | float: 'right', |
| | | }} |
| | | > |
| | | <FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" /> |
| | | </a> |
| | | </div> */} |
| | | </LoginForm> |
| | | </div> |
| | | <EditPwd |
| | |
| | | |
| | | |
| | | export async function login(data) { |
| | | return request('/management/tUser/login', { |
| | | return request('/api/huacheng-sangeshenbian/systemUser/login', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | |
| | | .ant-pro-form-login-container{ |
| | | .ant-pro-form-login-container { |
| | | background-color: #fff; |
| | | border-radius: 23px; |
| | | padding: 45px 60px; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); |
| | | margin-left: 50px; |
| | | } |
| | | |
| | | .ant-pro-form-login-header { |
| | |
| | | height: 190px; |
| | | } |
| | | |
| | | |
| | | .ant-pro-form-login-top{ |
| | | width: 413px; |
| | | height: 167px; |
| | | margin-bottom: 64px; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | |
| | | .ant-pro-form-login-logo { |
| | | width: 190px; |
| | | height: 190px; |
| | | overflow: hidden; |
| | | margin-inline-end:0px |
| | | |
| | | .ant-pro-form-login-top { |
| | | display: none; |
| | | } |
| | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | console.log('fileList',fileList) |
| | | |
| | | values.picUrl = fileList[0].url |
| | | delete values.image |
| | | if (searchParams.get('id')) { |
| | |
| | | // 提交表单 |
| | | const submit = () => { |
| | | form.validateFields().then(async (values) => { |
| | | console.log('fileList',fileList) |
| | | |
| | | values.picUrl = fileList[0].url |
| | | delete values.image |
| | | if (searchParams.get('id')) { |
| | |
| | | const { data } = response as unknown as ResponseStructure; |
| | | if (data?.code === 103 || data?.code === 401) { |
| | | localStorage.clear() |
| | | // history.replace('/login') |
| | | history.replace('/login') |
| | | return Promise.resolve(response) |
| | | } |
| | | if (data?.code != 200) { |