| @ -0,0 +1,14 @@ | |||
| # 默认忽略的文件 | |||
| /shelf/ | |||
| /workspace.xml | |||
| # 基于编辑器的 HTTP 客户端请求 | |||
| /httpRequests/ | |||
| # Datasource local storage ignored files | |||
| /dataSources/ | |||
| /dataSources.local.xml | |||
| .idea | |||
| package-lock.json | |||
| node_modules/ | |||
| unpackage/ | |||
| .hbuilderx | |||
| .vite | |||
| @ -0,0 +1,15 @@ | |||
| <script> | |||
| export default { | |||
| onLaunch: function() { | |||
| }, | |||
| onShow: function() { | |||
| // this.$store.commit('initConfig') | |||
| }, | |||
| onHide: function() { | |||
| } | |||
| } | |||
| </script> | |||
| <style> | |||
| /*每个页面公共css */ | |||
| </style> | |||
| @ -0,0 +1,36 @@ | |||
| # uniapp项目开发模板 | |||
| #### Description | |||
| {**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} | |||
| #### Software Architecture | |||
| Software architecture description | |||
| #### Installation | |||
| 1. xxxx | |||
| 2. xxxx | |||
| 3. xxxx | |||
| #### Instructions | |||
| 1. xxxx | |||
| 2. xxxx | |||
| 3. xxxx | |||
| #### Contribution | |||
| 1. Fork the repository | |||
| 2. Create Feat_xxx branch | |||
| 3. Commit your code | |||
| 4. Create Pull Request | |||
| #### Gitee Feature | |||
| 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md | |||
| 2. Gitee blog [blog.gitee.com](https://blog.gitee.com) | |||
| 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) | |||
| 4. The most valuable open source project [GVP](https://gitee.com/gvp) | |||
| 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) | |||
| 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) | |||
| @ -0,0 +1,39 @@ | |||
| # uniapp项目开发模板 | |||
| #### 介绍 | |||
| {**以下是 Gitee 平台说明,您可以替换此简介** | |||
| Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 | |||
| 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} | |||
| #### 软件架构 | |||
| 软件架构说明 | |||
| #### 安装教程 | |||
| 1. xxxx | |||
| 2. xxxx | |||
| 3. xxxx | |||
| #### 使用说明 | |||
| 1. xxxx | |||
| 2. xxxx | |||
| 3. xxxx | |||
| #### 参与贡献 | |||
| 1. Fork 本仓库 | |||
| 2. 新建 Feat_xxx 分支 | |||
| 3. 提交代码 | |||
| 4. 新建 Pull Request | |||
| #### 特技 | |||
| 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md | |||
| 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) | |||
| 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 | |||
| 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 | |||
| 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) | |||
| 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) | |||
| @ -0,0 +1,59 @@ | |||
| import http from './http.js' | |||
| const config = { | |||
| // 示例 | |||
| // wxLogin : {url : '/api/wxLogin', method : 'POST', | |||
| // auth : false, showLoading : true, loadingTitle : '加载中...', | |||
| // limit : 1000 | |||
| // }, | |||
| getConfig : {url : '/api/getConfig', method : 'GET', limit : 500}, | |||
| } | |||
| export function api(key, data, callback, loadingTitle){ | |||
| let req = config[key] | |||
| if (!req) { | |||
| console.error('无效key' + key); | |||
| return | |||
| } | |||
| if(typeof callback == 'string'){ | |||
| loadingTitle = callback | |||
| } | |||
| if(typeof data == 'function'){ | |||
| callback = data | |||
| data = {} | |||
| } | |||
| // 接口限流 | |||
| if(req.limit){ | |||
| let storageKey = 'limit:' + req.url | |||
| let storage = uni.getStorageSync(storageKey) | |||
| if(storage && new Date().getTime() - parseInt(storage) < req.limit){ | |||
| return | |||
| } | |||
| uni.setStorageSync(storageKey, new Date().getTime()) | |||
| } | |||
| //必须登录 | |||
| if (req.auth) { | |||
| if (!uni.getStorageSync('token')) { | |||
| uni.navigateTo({ | |||
| url: '/pages/login/mobile' | |||
| }) | |||
| console.error('需要登录') | |||
| return | |||
| } | |||
| } | |||
| http.http(req.url, data, callback, req.method, | |||
| loadingTitle || req.showLoading, loadingTitle || req.loadingTitle) | |||
| } | |||
| export default api | |||
| @ -0,0 +1,135 @@ | |||
| import Vue from 'vue' | |||
| function http(uri, data, callback, method = 'GET', showLoading, title) { | |||
| if(showLoading){ | |||
| uni.showLoading({ | |||
| title: title || '正在提交...' | |||
| }); | |||
| } | |||
| uni.request({ | |||
| url: Vue.prototype.$config.baseUrl + uri, | |||
| data: enhanceData(data), | |||
| method: method, | |||
| header: { | |||
| 'X-Access-Token': uni.getStorageSync('token'), | |||
| 'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' | |||
| }, | |||
| success: (res) => { | |||
| if(showLoading){ | |||
| uni.hideLoading(); | |||
| } | |||
| if(res.statusCode == 401 || | |||
| res.data.message == '操作失败,token非法无效!'){ | |||
| uni.removeStorageSync('token') | |||
| console.error('登录过期'); | |||
| uni.navigateTo({ | |||
| url: '/pages/auth/login' | |||
| }) | |||
| } | |||
| if(res.statusCode == 200 && res.data.code != 200){ | |||
| uni.showToast({ | |||
| mask: true, | |||
| duration: 1000, | |||
| title: res.data.message, | |||
| icon:'none' | |||
| }); | |||
| } | |||
| callback(res.data) | |||
| }, | |||
| fail: () => { | |||
| uni.showLoading({}) | |||
| setTimeout(()=>{ | |||
| uni.hideLoading() | |||
| uni.showToast({icon:"none", title:"网络异常"}) | |||
| }, 3000) | |||
| if(showLoading){ | |||
| uni.hideLoading(); | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| function deleted(uri, data, callback) { | |||
| http(uri, data, callback, 'DELETE') | |||
| } | |||
| function post(uri, data, callback) { | |||
| http(uri, data, callback, 'POST') | |||
| } | |||
| function get(uri, data, callback) { | |||
| http(uri, data, callback, 'GET') | |||
| } | |||
| function enhanceData(data) { | |||
| const userid = uni.getStorageSync("userid") | |||
| if (!data) { | |||
| data = {} | |||
| } | |||
| if (userid) { | |||
| data.userid = userid | |||
| } | |||
| return data | |||
| } | |||
| function sync(method, uri, data) { | |||
| return new Promise((resolve, reject) => { | |||
| uni.request({ | |||
| url: uri, | |||
| data: data, | |||
| method: method, | |||
| header: { | |||
| 'auth': '1AS9F1HPC4FBC9EN00J7KX2L5RJ99XHZ' | |||
| }, | |||
| success: (res) => { | |||
| resolve(res.data) | |||
| }, | |||
| fail: (err) => { | |||
| reject(err); | |||
| } | |||
| }) | |||
| }) | |||
| } | |||
| let cache = null | |||
| function async (method, uri, data) { | |||
| const promise = sync(method, uri, data).then(res => { | |||
| cache = res | |||
| }).catch(err => { | |||
| }) | |||
| } | |||
| function syncHttp(uri, data, method = 'GET') { | |||
| async (method, uri, data) | |||
| } | |||
| export default { | |||
| http: http, | |||
| delete: deleted, | |||
| post: post, | |||
| get: get, | |||
| syncHttp: syncHttp | |||
| } | |||
| @ -0,0 +1,77 @@ | |||
| <template> | |||
| <view class="change-language"> | |||
| <uv-picker ref="picker" | |||
| :columns="languageList" | |||
| keyName="name" | |||
| :itemHeight="70" | |||
| @confirm="confirm"></uv-picker> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| props : { | |||
| url : { | |||
| default : '/pages/index/index', | |||
| type : String, | |||
| } | |||
| }, | |||
| data(){ | |||
| return { | |||
| languageList: [ | |||
| [ | |||
| { | |||
| name:'简体中文', | |||
| key : "zh-Hans" | |||
| }, | |||
| { | |||
| name:'English', | |||
| key : "en" | |||
| }, | |||
| ] | |||
| ], | |||
| } | |||
| }, | |||
| methods : { | |||
| open() { | |||
| this.$refs.picker.open(); | |||
| }, | |||
| confirm(e) { | |||
| this.changeLanguage(e.value.pop()) | |||
| }, | |||
| //修改当前语言 | |||
| changeLanguage(res){ | |||
| //#ifdef H5 | |||
| this.$router.go(0); //刷新页面,不然validate.js不好国际化 | |||
| //#endif | |||
| //#ifdef APP-PLUS | |||
| uni.navigateTo({ | |||
| url: this.url // 要刷新的页面路径 | |||
| }); | |||
| //#endif | |||
| if(!res.key){ | |||
| return | |||
| } | |||
| uni.setStorage({ | |||
| key: 'language', | |||
| data: res.key | |||
| }) | |||
| this.$i18n.locale = res.key | |||
| uni.setLocale(res.key) //切换语言环境必须在this.$i18n.locale之后,否则app端会有意想不到的bug | |||
| uni.$responseMessage = this.$t('responseMessage') | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .change-language{ | |||
| } | |||
| </style> | |||
| @ -0,0 +1,164 @@ | |||
| <template> | |||
| <view class="navbar"> | |||
| <view class="title"> | |||
| <view class="left"> | |||
| <uv-icon name="arrow-left" | |||
| v-if="leftClick" | |||
| @click="leftClick()" | |||
| color="#333" size="46rpx"></uv-icon> | |||
| </view> | |||
| <view>{{ title }}</view> | |||
| <view class="icon"> | |||
| <uv-icon name="search" | |||
| v-if="isSearch" | |||
| color="#333" size="58rpx"></uv-icon> | |||
| <uv-icon name="plus-circle" color="#333" | |||
| v-if="isPlus" | |||
| @click="plusCircleShow = true" | |||
| size="46rpx" style="margin-left: 30rpx;"></uv-icon> | |||
| <view v-if="moreClick" style="margin-left: 30rpx;"> | |||
| <uv-icon name="more-dot-fill" color="#333" | |||
| v-if="!moreText" | |||
| @click="moreClick()" | |||
| size="46rpx"></uv-icon> | |||
| <view v-else @click="moreClick" | |||
| style="font-weight: 400;font-size: 30rpx;"> | |||
| {{ moreText }} | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| name:"navbar", | |||
| props : { | |||
| title : { | |||
| type : String, | |||
| default : '' | |||
| }, | |||
| leftClick : { | |||
| type : Function, | |||
| }, | |||
| moreClick : { | |||
| type : Function, | |||
| }, | |||
| isSearch : { | |||
| type : Boolean, | |||
| default : false, | |||
| }, | |||
| isPlus : { | |||
| type : Boolean, | |||
| default : false, | |||
| }, | |||
| moreText : { | |||
| } | |||
| }, | |||
| created() { | |||
| }, | |||
| beforeDestroy() { | |||
| }, | |||
| data() { | |||
| return { | |||
| }; | |||
| }, | |||
| methods : { | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .navbar{ | |||
| width: 100%; | |||
| height: 100rpx; | |||
| .cover{ | |||
| position: fixed; | |||
| left: 0; | |||
| top: 0; | |||
| width: 100vw; | |||
| height: 100vh; | |||
| z-index: 9999999; | |||
| } | |||
| .plusCircle{ | |||
| position: fixed; | |||
| top: calc(100rpx + var(--status-bar-height)); | |||
| right: 10rpx; | |||
| background-color: rgb(76, 76, 76); | |||
| z-index: 99999999; | |||
| border-radius: 10rpx; | |||
| animation: fade-in .5s; | |||
| &::after{ | |||
| content: ''; | |||
| display: block; | |||
| position: absolute; | |||
| top: -34rpx; | |||
| right: 35rpx; | |||
| border-left: 20rpx solid transparent; | |||
| border-right: 20rpx solid transparent; | |||
| border-top: 20rpx solid transparent; | |||
| border-bottom: 20rpx solid rgb(76, 76, 76); | |||
| } | |||
| &>view{ | |||
| display: flex; | |||
| color: #fff; | |||
| width: 300rpx; | |||
| height: 120rpx; | |||
| align-items: center; | |||
| border-bottom: 1px solid #ffffff22; | |||
| font-size: 30rpx; | |||
| .icon{ | |||
| padding-left: 30rpx; | |||
| padding-right: 20rpx; | |||
| image{ | |||
| width: 40rpx; | |||
| height: 40rpx; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| .title{ | |||
| position: fixed; | |||
| top: 0; | |||
| left: 0; | |||
| padding-top: var(--status-bar-height); | |||
| width: 100%; | |||
| height: 100rpx; | |||
| background-color: #f7f7f7; | |||
| display: flex; | |||
| justify-content: center; | |||
| font-size: 32rpx; | |||
| align-items: center; | |||
| z-index: 99999; | |||
| .left{ | |||
| position: absolute; | |||
| left: 40rpx; | |||
| display: flex; | |||
| justify-content: flex-start; | |||
| } | |||
| .icon{ | |||
| position: absolute; | |||
| right: 40rpx; | |||
| display: flex; | |||
| justify-content: flex-end; | |||
| } | |||
| } | |||
| @keyframes fade-in { | |||
| 0% { | |||
| opacity: 0; | |||
| } | |||
| 100% { | |||
| opacity: 1; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,71 @@ | |||
| <template> | |||
| <view> | |||
| <view> | |||
| <uni-drawer ref="mode1" mode="left" :width="200"> | |||
| <view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;" | |||
| v-for="ele in drawerData1" @click="oncuechange1(ele)">{{ ele.name }}</view> | |||
| </uni-drawer> | |||
| <uni-drawer ref="mode2" mode="left" :width="200"> | |||
| <view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;" | |||
| v-for="ele in drawerData2" @click="oncuechange2(ele)">{{ ele.name }}</view> | |||
| </uni-drawer> | |||
| <uni-drawer ref="mode3" mode="left" :width="200"> | |||
| <view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;" | |||
| v-for="ele in drawerData3" @click="oncuechange3(ele)">{{ ele.name }}</view> | |||
| </uni-drawer> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| drawerData1: [], | |||
| drawerData2: [], | |||
| drawerData3: [], | |||
| value: [] | |||
| } | |||
| }, | |||
| methods: { | |||
| open(categorys){ | |||
| this.value = [] | |||
| this.drawerData1 = categorys | |||
| this.$refs.mode1.open() | |||
| }, | |||
| oncuechange1(ele){ | |||
| this.value.push(ele.name) | |||
| if (ele.node){ | |||
| this.drawerData2 = ele.node | |||
| this.$refs.mode2.open() | |||
| } else { | |||
| this.clearAndEmit() | |||
| } | |||
| }, | |||
| oncuechange2(ele){ | |||
| this.value.push(ele.name) | |||
| if (ele.node){ | |||
| this.drawerData3 = ele.node | |||
| this.$refs.mode3.open() | |||
| } else { | |||
| this.clearAndEmit() | |||
| } | |||
| }, | |||
| oncuechange3(ele){ | |||
| this.value.push(ele.name) | |||
| this.clearAndEmit() | |||
| }, | |||
| clearAndEmit(ele){ | |||
| console.log("end", this.value.join(" ")); | |||
| this.$emit('changSuccess', this.value.join(" ")) | |||
| this.$refs.mode3.close() | |||
| this.$refs.mode2.close() | |||
| this.$refs.mode1.close() | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| @ -0,0 +1,104 @@ | |||
| <template> | |||
| <view class="tabbar"> | |||
| <view | |||
| :class="{item : true, active : select == index}" | |||
| v-for="(item, index) in list" | |||
| @click="toPath(item, index)"> | |||
| <view class="icon"> | |||
| <image :src="select == index ? | |||
| item.selectedIconPath : | |||
| item.iconPath" class="icon-image" mode=""></image> | |||
| </view> | |||
| <view class="title"> | |||
| {{ $t(item.title) }} | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| name:"tabbar", | |||
| props : ['select'], | |||
| data() { | |||
| return { | |||
| list : [ | |||
| { | |||
| "selectedIconPath": "/static/image/tabbar/home-a.png", | |||
| "iconPath": "/static/image/tabbar/home.png", | |||
| "pagePath": "/pages/index/index", | |||
| "title": "tabbar.title.1" | |||
| },{ | |||
| "selectedIconPath": "/static/image/tabbar/addressBook-a.png", | |||
| "iconPath": "/static/image/tabbar/addressBook.png", | |||
| "pagePath": "/pages/index/addressBook", | |||
| "title": "tabbar.title.2" | |||
| },{ | |||
| "selectedIconPath": "/static/image/tabbar/discover-a.png", | |||
| "iconPath": "/static/image/tabbar/discover.png", | |||
| "pagePath": "/pages/index/discover", | |||
| "title": "tabbar.title.3" | |||
| },{ | |||
| "selectedIconPath": "/static/image/tabbar/center-a.png", | |||
| "iconPath": "/static/image/tabbar/center.png", | |||
| "pagePath": "/pages/index/center", | |||
| "title": "tabbar.title.3" | |||
| } | |||
| ] | |||
| }; | |||
| }, | |||
| methods : { | |||
| toPath(item, index){ | |||
| if(index == this.select){ | |||
| return | |||
| } | |||
| uni.redirectTo({ | |||
| url: item.pagePath | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .tabbar{ | |||
| position: fixed; | |||
| width: 750rpx; | |||
| background-color: #f7f7f7; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| flex-direction: row; | |||
| height: 120rpx; | |||
| z-index: 999999; | |||
| bottom: 0; | |||
| left: 0; | |||
| line-height: 50rpx; | |||
| color: #333; | |||
| .item{ | |||
| width: 25%; | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: center; | |||
| align-items: center; | |||
| .icon{ | |||
| width: 54rpx; | |||
| height: 54rpx; | |||
| .icon-image{ | |||
| width: 54rpx; | |||
| height: 54rpx; | |||
| } | |||
| } | |||
| .title{ | |||
| overflow: hidden; | |||
| // white-space: nowrap; | |||
| // text-overflow: ellipsis; | |||
| // -o-text-overflow: ellipsis; | |||
| font-size: 23rpx; | |||
| } | |||
| } | |||
| } | |||
| .active{ | |||
| color: #03c061 !important; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,97 @@ | |||
| <template> | |||
| <!-- 协议配置弹出层组件 --> | |||
| <view> | |||
| <uv-parse | |||
| v-if="tiled" | |||
| :content="content"> | |||
| </uv-parse> | |||
| <uv-popup | |||
| v-else | |||
| :customStyle="{height: '75vh'}" | |||
| ref="popup"> | |||
| <view id="config"> | |||
| <uv-parse :content="content"></uv-parse> | |||
| </view> | |||
| </uv-popup> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import { mapState } from 'vuex' | |||
| export default { | |||
| name:"configPopup", | |||
| props : { | |||
| findValue : {//查找对应的值 | |||
| type : String, | |||
| }, | |||
| findKey : {//查找的键 | |||
| type : String, | |||
| default : 'keyValue' | |||
| }, | |||
| contentKey : {//展示内容的键 | |||
| type : String, | |||
| default : 'content' | |||
| }, | |||
| languageContentKey : {//国际化展示内容的键 | |||
| type : Object, | |||
| }, | |||
| index : {//索引查找,优先级高于查找 | |||
| type : Number, | |||
| }, | |||
| tiled : { | |||
| default : false, | |||
| type : Boolean, | |||
| } | |||
| }, | |||
| data() { | |||
| return { | |||
| }; | |||
| }, | |||
| computed : { | |||
| ...mapState(['configList']), | |||
| locale(){ | |||
| return this.$t('components.config.configPopup') | |||
| }, | |||
| obj(){ | |||
| if(typeof this.index == 'number'){ | |||
| return this.configList[this.index] | |||
| } | |||
| for(let i = 0; i < this.configList.length; i++){ | |||
| if(this.configList[i][this.findKey] == this.findValue){ | |||
| return this.configList[i] | |||
| } | |||
| } | |||
| }, | |||
| objKey(){ | |||
| if(this.languageContentKey | |||
| && this.languageContentKey[this.$i18n.locale]){ | |||
| return this.languageContentKey[this.$i18n.locale] | |||
| } | |||
| return this.contentKey | |||
| }, | |||
| content(){ | |||
| if(!this.obj){ | |||
| return `<h3>${this.locale.noData}</h3>` | |||
| } | |||
| return this.obj[this.objKey] | |||
| } | |||
| }, | |||
| methods : { | |||
| open(type = 'bottom'){ | |||
| if(this.tiled){ | |||
| return | |||
| } | |||
| this.$refs.popup.open(type); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| #config{ | |||
| padding: 20rpx; | |||
| line-height: 50rpx; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,118 @@ | |||
| <template> | |||
| <uv-popup ref="privacyPopup"> | |||
| <view class="privacyPopup"> | |||
| <view class="title"> | |||
| <view class="title_circle"></view> | |||
| <view>{{ title }}</view> | |||
| </view> | |||
| <view class="content_pri"> | |||
| <text>在你使用【{{ title }}】服务之前,请仔细阅读</text> | |||
| <text style="color: #1793ee;" @click="goToPrivacy">《{{ title }}小程序隐私保护指引》</text>。 | |||
| <text>如你同意{{ title }}小程序隐私保护指引,请点击“同意”开始使用【{{ title }}】。</text> | |||
| </view> | |||
| <view class="pri_btn"> | |||
| <button class="confuse_btn" @click="confusePrivacy">拒绝</button> | |||
| <button class="confirm_btn" id="agree-btn" open-type="agreePrivacyAuthorization" | |||
| @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button> | |||
| </view> | |||
| </view> | |||
| </uv-popup> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data(){ | |||
| return{ | |||
| title : '帧视界', | |||
| } | |||
| }, | |||
| methods:{ | |||
| init(resolve){ | |||
| this.$refs.privacyPopup.open() | |||
| this.resolvePrivacyAuthorization = resolve | |||
| }, | |||
| // 打开隐私协议 | |||
| goToPrivacy(){ | |||
| wx.openPrivacyContract({ | |||
| success: () => { | |||
| console.log('打开成功'); | |||
| }, // 打开成功 | |||
| fail: () => { | |||
| uni.showToast({ | |||
| title:'打开失败,稍后重试', | |||
| icon: 'none' | |||
| }) | |||
| } // 打开失败 | |||
| }) | |||
| }, | |||
| // 拒绝 | |||
| confusePrivacy(){ | |||
| this.$refs.privacyPopup.close() | |||
| this.resolvePrivacyAuthorization({ event:'disagree' }) | |||
| }, | |||
| // 同意 | |||
| handleAgreePrivacyAuthorization(){ | |||
| // 告知平台用户已经同意,参数传同意按钮的id | |||
| this.resolvePrivacyAuthorization({ buttonId: 'agree-btn', event: 'agree' }) | |||
| this.$refs.privacyPopup.close() | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| *{ | |||
| box-sizing: border-box; | |||
| } | |||
| .privacyPopup{ | |||
| width: 520rpx; | |||
| /* height: 500rpx; */ | |||
| background-color: #fff; | |||
| border-radius: 50rpx; | |||
| padding: 20rpx 40rpx; | |||
| } | |||
| .title{ | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: start; | |||
| margin: 20rpx 0; | |||
| font-size: 38rpx; | |||
| font-weight: 600; | |||
| } | |||
| .title .title_circle{ | |||
| width: 60rpx; | |||
| height: 60rpx; | |||
| background-color: #efefef; | |||
| border-radius: 50%; | |||
| margin-right: 20rpx; | |||
| } | |||
| .content_pri{ | |||
| width: 480rpx; | |||
| margin: 0 auto; | |||
| font-size: 34rpx; | |||
| line-height: 1.5; | |||
| } | |||
| .pri_btn{ | |||
| width: 100%; | |||
| height: 158rpx; | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: space-evenly; | |||
| } | |||
| .pri_btn .confuse_btn,.pri_btn .confirm_btn{ | |||
| width: 200rpx; | |||
| height: 90rpx; | |||
| border-radius: 20rpx; | |||
| font-size: 34rpx; | |||
| } | |||
| .pri_btn .confuse_btn{ | |||
| background-color: #eee; | |||
| color: #52bf6b; | |||
| } | |||
| .pri_btn .confirm_btn{ | |||
| background-color: #52bf6b; | |||
| color: #fff; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,56 @@ | |||
| import Vue from 'vue' | |||
| import api from '@/api/api.js' | |||
| import utils from './utils/utils.js' | |||
| import uvUI from '@/uni_modules/uv-ui-tools' | |||
| Vue.use(uvUI); | |||
| // 当前环境 | |||
| const type = 'dev' | |||
| // 环境配置 | |||
| const config = { | |||
| dev : { | |||
| baseUrl : 'http://www.gcosc.fun:82', | |||
| }, | |||
| prod : { | |||
| baseUrl : 'http://xxx.xxx.xxx/xxx', | |||
| } | |||
| } | |||
| // 默认配置 | |||
| const defaultConfig = { | |||
| mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', | |||
| aliOss : { | |||
| url : 'https://tennis-oss.xzaiyp.top/', | |||
| config : { | |||
| //桶的地址 | |||
| region: 'oss-cn-guangzhou', | |||
| //id | |||
| accessKeyId:'LTAI5tNycA46YTwm383dRvMV', | |||
| //密钥 | |||
| accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG', | |||
| //桶的名字 | |||
| bucket: 'zhuoqiu-image', | |||
| endpoint:'oss-cn-guangzhou.aliyuncs.com', | |||
| } | |||
| }, | |||
| } | |||
| uni.$uv.setConfig({ | |||
| // 修改$uv.config对象的属性 | |||
| config: { | |||
| // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx' | |||
| unit: 'rpx' | |||
| }, | |||
| }) | |||
| Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type]) | |||
| Vue.prototype.$api = api | |||
| export default Vue.prototype.$config | |||
| @ -0,0 +1,20 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
| <head> | |||
| <meta charset="UTF-8" /> | |||
| <script> | |||
| var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || | |||
| CSS.supports('top: constant(a)')) | |||
| document.write( | |||
| '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + | |||
| (coverSupport ? ', viewport-fit=cover' : '') + '" />') | |||
| </script> | |||
| <title></title> | |||
| <!--preload-links--> | |||
| <!--app-context--> | |||
| </head> | |||
| <body> | |||
| <div id="app"><!--app-html--></div> | |||
| <script type="module" src="/main.js"></script> | |||
| </body> | |||
| </html> | |||
| @ -0,0 +1,23 @@ | |||
| { | |||
| "tabbar.title.1" : "消息", | |||
| "tabbar.title.2" : "通讯录", | |||
| "tabbar.title.3" : "发现", | |||
| "tabbar.title.4" : "我", | |||
| "navbar.relation.newFriend" : "新的朋友", | |||
| "navbar.mine.service" : "服务", | |||
| "navbar.relation.searchFriend" : "添加朋友", | |||
| "pages" : { | |||
| "index" : { | |||
| "index" : { | |||
| "agreement" : "Agreement content" | |||
| } | |||
| } | |||
| }, | |||
| "components" : { | |||
| "config" : { | |||
| "configPopup" : { | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,25 @@ | |||
| import Vue from 'vue' | |||
| import VueI18n from 'vue-i18n' | |||
| import zhHans from './zh-Hans.json' // 中文简体 | |||
| Vue.use(VueI18n) | |||
| // 所需要用的语言包 | |||
| let messages = { | |||
| 'zh-Hans' : zhHans | |||
| } | |||
| if(!uni.getStorageSync('language') || !messages[uni.getStorageSync('language')]){ | |||
| uni.setStorageSync('language', 'zh-Hans') | |||
| } | |||
| const lang = uni.getStorageSync('language');//获取缓存中的语言 | |||
| // const lang = 'en'; | |||
| // VueI18n构造函数所需要的配置 | |||
| const i18nConfig = { | |||
| locale: lang,//当前语言 | |||
| messages | |||
| } | |||
| const i18n = new VueI18n(i18nConfig) | |||
| export default i18n | |||
| @ -0,0 +1,26 @@ | |||
| { | |||
| "tabbar.title.1" : "消息", | |||
| "tabbar.title.2" : "通讯录", | |||
| "tabbar.title.3" : "发现", | |||
| "tabbar.title.4" : "我", | |||
| "navbar.relation.newFriend" : "新的朋友", | |||
| "navbar.mine.service" : "服务", | |||
| "navbar.relation.searchFriend" : "添加朋友", | |||
| "responseMessage" : { | |||
| }, | |||
| "pages" : { | |||
| "index" : { | |||
| "index" : { | |||
| "agreement" : "协议内容" | |||
| } | |||
| } | |||
| }, | |||
| "components" : { | |||
| "config" : { | |||
| "configPopup" : { | |||
| "noData" : "内容未找到:404" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,43 @@ | |||
| import App from './App' | |||
| // #ifndef VUE3 | |||
| import Vue from 'vue' | |||
| import './uni.promisify.adaptor' | |||
| Vue.config.productionTip = false | |||
| App.mpType = 'app' | |||
| import store from '@/store/store' | |||
| import i18n from './locale/index.js' | |||
| import './config' | |||
| import './utils/index.js' | |||
| //组件注册 | |||
| import configPopup from '@/components/config/configPopup.vue' | |||
| import changeLanguage from '@/components/base/changeLanguage.vue' | |||
| Vue.component('configPopup',configPopup) | |||
| Vue.component('changeLanguage',changeLanguage) | |||
| const app = new Vue({ | |||
| ...App, | |||
| store, | |||
| i18n | |||
| }) | |||
| app.$mount() | |||
| // #endif | |||
| // #ifdef VUE3 | |||
| import { | |||
| createSSRApp | |||
| } from 'vue' | |||
| export function createApp() { | |||
| const app = createSSRApp(App) | |||
| return { | |||
| app | |||
| } | |||
| } | |||
| // #endif | |||
| @ -0,0 +1,105 @@ | |||
| { | |||
| "name" : "unapp模板", | |||
| "appid" : "__UNI__197A38F", | |||
| "description" : "", | |||
| "versionName" : "1.0.0", | |||
| "versionCode" : "100", | |||
| "transformPx" : false, | |||
| /* 5+App特有相关 */ | |||
| "app-plus" : { | |||
| "usingComponents" : true, | |||
| "nvueStyleCompiler" : "uni-app", | |||
| "compilerVersion" : 3, | |||
| "splashscreen" : { | |||
| "alwaysShowBeforeRender" : true, | |||
| "waiting" : true, | |||
| "autoclose" : true, | |||
| "delay" : 0 | |||
| }, | |||
| /* 模块配置 */ | |||
| "modules" : {}, | |||
| /* 应用发布信息 */ | |||
| "distribute" : { | |||
| /* android打包配置 */ | |||
| "android" : { | |||
| "permissions" : [ | |||
| "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | |||
| "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | |||
| "<uses-permission android:name=\"android.permission.VIBRATE\"/>", | |||
| "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | |||
| "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | |||
| "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | |||
| "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | |||
| "<uses-permission android:name=\"android.permission.CAMERA\"/>", | |||
| "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | |||
| "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | |||
| "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | |||
| "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | |||
| "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | |||
| "<uses-feature android:name=\"android.hardware.camera\"/>", | |||
| "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | |||
| ] | |||
| }, | |||
| /* ios打包配置 */ | |||
| "ios" : {}, | |||
| /* SDK配置 */ | |||
| "sdkConfigs" : { | |||
| "maps" : {} | |||
| } | |||
| } | |||
| }, | |||
| /* 快应用特有相关 */ | |||
| "quickapp" : {}, | |||
| /* 小程序特有相关 */ | |||
| "mp-weixin" : { | |||
| "appid" : "wxe7ae8cbe1673834c", | |||
| "setting" : { | |||
| "urlCheck" : false | |||
| }, | |||
| "usingComponents" : true, | |||
| "permission" : { | |||
| "scope.userLocation" : { | |||
| "desc" : "你的位置信息将用于小程序位置接口的效果展示" | |||
| }, | |||
| "scope.userFuzzyLocation" : { | |||
| "desc" : "你的位置信息将用于小程序位置接口的效果展示" | |||
| } | |||
| }, | |||
| "requiredPrivateInfos" : [ "chooseLocation", "getLocation" ] | |||
| }, | |||
| "mp-alipay" : { | |||
| "usingComponents" : true | |||
| }, | |||
| "mp-baidu" : { | |||
| "usingComponents" : true | |||
| }, | |||
| "mp-toutiao" : { | |||
| "usingComponents" : true | |||
| }, | |||
| "uniStatistics" : { | |||
| "enable" : false | |||
| }, | |||
| "vueVersion" : "2", | |||
| "h5" : { | |||
| "sdkConfigs" : { | |||
| "maps" : { | |||
| "qqmap" : { | |||
| "key" : "XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU" | |||
| } | |||
| } | |||
| }, | |||
| "devServer" : { | |||
| "https" : false, | |||
| "proxy" : { | |||
| "/ws/geocoder/v1/" : { | |||
| "target" : "https://apis.map.qq.com", | |||
| "changeOrigin" : true | |||
| }, | |||
| "/ws/location/v1/" : { | |||
| "target" : "https://apis.map.qq.com", | |||
| "changeOrigin" : true | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,20 @@ | |||
| { | |||
| "name": "uniapp-project-templates", | |||
| "version": "1.0.0", | |||
| "description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}", | |||
| "main": "main.js", | |||
| "scripts": { | |||
| "test": "echo \"Error: no test specified\" && exit 1" | |||
| }, | |||
| "repository": { | |||
| "type": "git", | |||
| "url": "https://gitee.com/huliyong/uniapp-project-templates.git" | |||
| }, | |||
| "keywords": [], | |||
| "author": "", | |||
| "license": "ISC", | |||
| "dependencies": { | |||
| "ali-oss": "^6.21.0", | |||
| "dayjs": "^1.11.12" | |||
| } | |||
| } | |||
| @ -0,0 +1,24 @@ | |||
| { | |||
| "pages": [ | |||
| { | |||
| "path": "pages/index/index", | |||
| "style": { | |||
| "navigationBarTitleText": "unapp模板" | |||
| } | |||
| }, | |||
| { | |||
| "path" : "pages/map/map", | |||
| "style" : | |||
| { | |||
| "navigationBarTitleText" : "" | |||
| } | |||
| } | |||
| ], | |||
| "globalStyle": { | |||
| "navigationBarTextStyle": "black", | |||
| "navigationBarTitleText": "unapp模板", | |||
| "navigationBarBackgroundColor": "#F8F8F8", | |||
| "backgroundColor": "#F8F8F8" | |||
| }, | |||
| "uniIdRouter": {} | |||
| } | |||
| @ -0,0 +1,192 @@ | |||
| <!-- 结单 --> | |||
| <template> | |||
| <view class="finish"> | |||
| <!-- <navbar title="结单" :leftClick="leftClick"></navbar> --> | |||
| <uv-form labelPosition="top" :model="form" :rules="rules" ref="form" labelWidth="140"> | |||
| <uv-form-item label="处理结果" prop="form.processingResult"> | |||
| <uv-input @focus="processingPickerOpen" placeholder="请选择处理结果" v-model="form.processingResult" | |||
| :fontSize="30"></uv-input> | |||
| </uv-form-item> | |||
| <uv-form-item label="收费金额" prop="form.money"> | |||
| <uv-input placeholder="请输入收费金额" type="number" v-model="form.money" :fontSize="30"></uv-input> | |||
| </uv-form-item> | |||
| <uv-form-item label="处理说明" prop="form.instructions"> | |||
| <uv-textarea v-model="form.instructions" :maxlength="200" :height="120" count | |||
| placeholder="请输入处理说明"></uv-textarea> | |||
| </uv-form-item> | |||
| <uv-form-item label="照片" prop="form.images"> | |||
| <view class="image-list"> | |||
| <view @click="openImageMenu(index)" v-for="(item,index) in form.images" :key="index" | |||
| class="image-item"> | |||
| <image :src="item" mode="widthFix"></image> | |||
| </view> | |||
| <view v-if="form.images.length < maxUpload" @click="chooseImage" class="upload"> | |||
| <uv-icon name="camera-fill" color="#3c9cff" size="50"></uv-icon> | |||
| </view> | |||
| </view> | |||
| </uv-form-item> | |||
| <uv-button type="primary" text="结单" shape="circle" customStyle="margin-top: 10px" | |||
| @click="submit"></uv-button> | |||
| <!-- 选择完成状态 --> | |||
| <uv-picker ref="processing" :columns="processingList" :itemHeight="100" :round="20" keyName="label" | |||
| title="选择处理结果" @confirm="floorConfirm"></uv-picker> | |||
| <!-- 图片操作菜单 --> | |||
| <uv-action-sheet ref="actionSheet" :actions="list" :round="20" cancelText="取消" title="图片操作" | |||
| @select="selectImageSheet"> </uv-action-sheet> | |||
| </uv-form> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import navbar from '../../components/base/navbar.vue' | |||
| export default { | |||
| name: 'Finish', | |||
| components: { | |||
| navbar | |||
| }, | |||
| data() { | |||
| return { | |||
| form: { | |||
| processingResult: '', | |||
| money: 0, | |||
| instructions: '', | |||
| images: [] | |||
| }, | |||
| rules: { | |||
| }, | |||
| processingList: [ | |||
| [{ | |||
| id: 0, | |||
| label: '已处理' | |||
| }, | |||
| { | |||
| id: 1, | |||
| label: '未处理' | |||
| } | |||
| ] | |||
| ], | |||
| maxUpload: 4, | |||
| currentIndex: 0, | |||
| list: [ //图片操作菜单操作项 | |||
| { | |||
| name: '查看图片', | |||
| id: 0 | |||
| }, | |||
| { | |||
| name: '删除图片', | |||
| id: 1 | |||
| } | |||
| ], | |||
| } | |||
| }, | |||
| methods: { | |||
| //返回 | |||
| leftClick() { | |||
| uni.switchTab({ | |||
| url: '/pages/repairList/repairList' | |||
| }) | |||
| }, | |||
| //打开处理结果 | |||
| processingPickerOpen() { | |||
| this.$refs.processing.open(); | |||
| }, | |||
| //用户选择了处理结果 | |||
| floorConfirm(floor) { | |||
| this.form.processingResult = floor.value[0].label | |||
| }, | |||
| //选择文件 | |||
| chooseImage() { | |||
| this.$utils.chooseImage(res => { | |||
| res.tempFiles.forEach(file => { | |||
| console.log(file); | |||
| this.aliUpload(file) | |||
| }) | |||
| }) | |||
| }, | |||
| //阿里云oss上传 | |||
| aliUpload(file) { | |||
| this.$uploadFileToOSS(file).then(filePath => { | |||
| this.form.images.push(filePath) | |||
| }) | |||
| }, | |||
| //打开图片操作菜单 | |||
| openImageMenu(index) { | |||
| this.currentIndex = index | |||
| this.$refs.actionSheet.open(); | |||
| }, | |||
| //用户选择了图片操作选项 | |||
| selectImageSheet(imageSheet) { | |||
| let { | |||
| id | |||
| } = imageSheet | |||
| if (id) { | |||
| this.deleteImageAsList() | |||
| } else { | |||
| this.viewImageAsList() | |||
| } | |||
| }, | |||
| //查看图片 | |||
| viewImageAsList() { | |||
| this.$utils.previewImage({ | |||
| current: this.currentIndex, | |||
| urls: this.form.images | |||
| }) | |||
| }, | |||
| //删除图片 | |||
| deleteImageAsList() { | |||
| this.form.images = this.form.images.filter((_, index) => { | |||
| return index != this.currentIndex | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style> | |||
| .finish { | |||
| width: 96%; | |||
| margin: 0rpx auto; | |||
| } | |||
| .image-list { | |||
| width: 100%; | |||
| display: flex; | |||
| flex-wrap: wrap; | |||
| padding-top: 20rpx; | |||
| } | |||
| .image-item, | |||
| .upload { | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| width: 24%; | |||
| height: 174rpx; | |||
| background: #f8f8f8; | |||
| margin-left: 1%; | |||
| border-radius: 15rpx; | |||
| overflow: hidden; | |||
| margin-bottom: 20rpx;; | |||
| } | |||
| .image-item image { | |||
| width: 100%; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,75 @@ | |||
| <template> | |||
| <view class="content"> | |||
| <button @click="$refs.configPopup.open()">{{ locale.agreement }}</button> | |||
| <button @click="$refs.changeLanguage.open()">切换语言</button> | |||
| <button @click="$utils.navigateTo('/map/map')">地图</button> | |||
| <button @click="uploadImage">图片上传</button> | |||
| <text>{{ image }}</text> | |||
| <uv-upload | |||
| :fileList="fileList" | |||
| :maxCount="5" | |||
| multiple | |||
| width="150rpx" | |||
| height="150rpx" | |||
| @delete="deleteImage" | |||
| @afterRead="afterRead" | |||
| :previewFullImage="true"></uv-upload> | |||
| <changeLanguage ref="changeLanguage"/> | |||
| <configPopup | |||
| keyValue="asd" | |||
| ref="configPopup"/> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| image : '', | |||
| fileList: [], | |||
| } | |||
| }, | |||
| computed : { | |||
| locale(){ | |||
| return this.$t('pages.index.index') | |||
| } | |||
| }, | |||
| methods: { | |||
| //上传图片 | |||
| uploadImage(){ | |||
| let self = this | |||
| this.$Oss.ossUploadImage({ | |||
| success(url){ | |||
| self.image = url | |||
| } | |||
| }) | |||
| }, | |||
| deleteImage(e){ | |||
| this.fileList.splice(e.index, 1) | |||
| }, | |||
| afterRead(e){ | |||
| let self = this | |||
| e.file.forEach(file => { | |||
| self.$Oss.ossUpload(file.url).then(url => { | |||
| self.fileList.push({ | |||
| url | |||
| }) | |||
| }) | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .content{ | |||
| padding: 20px; | |||
| button{ | |||
| margin-bottom: 10rpx; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,196 @@ | |||
| <template> | |||
| <view class="content"> | |||
| <!-- app和小程序使用以下svg会报错 h5正常 --> | |||
| <!-- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||
| width="100%" height="100%" viewBox="0 0 1600 900" preserveAspectRatio="xMidYMax slice"> | |||
| <defs> | |||
| <linearGradient id="bg"> | |||
| <stop offset="0%" style="stop-color:rgba(130, 158, 249, 0.06)"></stop> | |||
| <stop offset="50%" style="stop-color:rgba(76, 190, 255, 0.6)"></stop> | |||
| <stop offset="100%" style="stop-color:rgba(115, 209, 72, 0.2)"></stop> | |||
| </linearGradient> | |||
| <path id="wave" fill="url(#bg)" | |||
| d="M-363.852,502.589c0,0,236.988-41.997,505.475,0 | |||
| s371.981,38.998,575.971,0s293.985-39.278,505.474,5.859s493.475,48.368,716.963-4.995v560.106H-363.852V502.589z" /> | |||
| </defs> | |||
| <g> | |||
| <use xlink:href='#wave' opacity=".3"> | |||
| <animateTransform attributeName="transform" attributeType="XML" type="translate" dur="10s" | |||
| calcMode="spline" values="270 230; -334 180; 270 230" keyTimes="0; .5; 1" | |||
| keySplines="0.42, 0, 0.58, 1.0;0.42, 0, 0.58, 1.0" repeatCount="indefinite" /> | |||
| </use> | |||
| <use xlink:href='#wave' opacity=".6"> | |||
| <animateTransform attributeName="transform" attributeType="XML" type="translate" dur="8s" | |||
| calcMode="spline" values="-270 230;243 220;-270 230" keyTimes="0; .6; 1" | |||
| keySplines="0.42, 0, 0.58, 1.0;0.42, 0, 0.58, 1.0" repeatCount="indefinite" /> | |||
| </use> | |||
| <use xlink:href='#wave' opacty=".9"> | |||
| <animateTransform attributeName="transform" attributeType="XML" type="translate" dur="6s" | |||
| calcMode="spline" values="0 230;-140 200;0 230" keyTimes="0; .4; 1" | |||
| keySplines="0.42, 0, 0.58, 1.0;0.42, 0, 0.58, 1.0" repeatCount="indefinite" /> | |||
| </use> | |||
| </g> | |||
| </svg> --> | |||
| <view class="loginBox"> | |||
| <h3 style="text-align: center;margin-bottom:120rpx;">欢迎登录</h3> | |||
| <view class="inputBox"> | |||
| <view class="ipt"> | |||
| <uni-icons type="contact" size="24" color="rgb(66,157,250)"></uni-icons> | |||
| <input type="text" value="" placeholder="请输入手机号"/> | |||
| </view> | |||
| <view class="ipt"> | |||
| <uni-icons type="eye" size="24" color="rgb(66,157,250)"></uni-icons> | |||
| <input type="passsword" value="" placeholder="请输入密码"/> | |||
| </view> | |||
| <view class="ipt"> | |||
| <uni-icons type="checkmarkempty" size="24" color="rgb(66,157,250)"></uni-icons> | |||
| <input type="text" value="" placeholder="请输入验证码"/> | |||
| <view class="yzm"> | |||
| 验证码 | |||
| </view> | |||
| </view> | |||
| <button @click="login">登录</button> | |||
| <view class="forgetPwd"> | |||
| <!-- <span>忘记密码</span> --> | |||
| <!-- <span>没有账号,去注册</span> --> | |||
| </view> | |||
| </view> | |||
| <view class="tipbox"> | |||
| <view class="txt"> | |||
| —— 其他账号登录 —— | |||
| </view> | |||
| <view class="otherUser"> | |||
| <uni-icons type="weixin" size="40" color="rgb(2,187,17)" | |||
| @click="$store.commit('login')"></uni-icons> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| } | |||
| }, | |||
| methods: { | |||
| //登录 | |||
| login(){ | |||
| uni.switchTab({ | |||
| url: '/pages/repair/repair' | |||
| }) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| svg { | |||
| position: absolute; | |||
| bottom: 0; | |||
| left: 0; | |||
| width: 100%; | |||
| height:40%; | |||
| box-sizing: border-box; | |||
| display: block; | |||
| background-color: #ffffff; | |||
| } | |||
| .loginBox{ | |||
| position: absolute; | |||
| top: 50%; | |||
| left: 50%; | |||
| transform: translate(-50%,-60%); | |||
| width: 90%; | |||
| border-radius: 20rpx; | |||
| padding: 60rpx; | |||
| box-sizing: border-box; | |||
| } | |||
| h3{ | |||
| color:rgb(66,157,250); | |||
| font-size: 40rpx; | |||
| letter-spacing: 10rpx; | |||
| margin-bottom: 40rpx; | |||
| } | |||
| .inputBox{ | |||
| } | |||
| .ipt{ | |||
| height: 86rpx; | |||
| display: flex; | |||
| justify-content: flex-start; | |||
| align-items: center; | |||
| margin-bottom: 40rpx; | |||
| background-color: #f5f5f5; | |||
| border-radius: 10rpx; | |||
| padding-left: 10rpx; | |||
| } | |||
| .ipt input{ | |||
| margin-left: 20rpx; | |||
| font-size: 28rpx; | |||
| } | |||
| .ipt input{ | |||
| margin-left: 20rpx; | |||
| } | |||
| .forgetPwd{ | |||
| margin-top: 30rpx; | |||
| font-size: 26rpx; | |||
| color: #b5b5b5; | |||
| text-align: end; | |||
| padding:0 10rpx; | |||
| display: flex; | |||
| justify-content: space-between; | |||
| } | |||
| button{ | |||
| margin-top: 20rpx; | |||
| line-height: 85rpx; | |||
| text-align: center; | |||
| background: rgb(66,157,250); | |||
| border-radius: 40rpx; | |||
| color: #fff; | |||
| margin-top: 40rpx; | |||
| } | |||
| .tip{ | |||
| text-align: center; | |||
| font-size: 28rpx; | |||
| position: fixed; | |||
| bottom: 50rpx; | |||
| left: 50%; | |||
| transform: translate(-50%,-50%); | |||
| color: #f4f4f4; | |||
| } | |||
| .tipbox { | |||
| text-align: center; | |||
| margin-top: 100rpx; | |||
| } | |||
| .otherUser { | |||
| margin-top: 30rpx; | |||
| display: flex; | |||
| justify-content: center; | |||
| } | |||
| .txt { | |||
| font-size: 28rpx; | |||
| color: #cbcbcb; | |||
| } | |||
| .otherUser .uni-icons { | |||
| margin-left: 20rpx; | |||
| } | |||
| .yzm{ | |||
| text-align: end; | |||
| font-size: 24rpx; | |||
| background: linear-gradient(to right,rgb(66,157,250),rgb(0, 170, 127)); | |||
| height: 60rpx; | |||
| width: 150rpx; | |||
| line-height: 60rpx; | |||
| text-align: center; | |||
| border-radius: 10rpx; | |||
| color: #fff; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,95 @@ | |||
| <template> | |||
| <view class="content"> | |||
| <map style="width: 100%; height: 90vh;" | |||
| :layer-style='5' | |||
| :style="{height:mapheight}" | |||
| :show-location='true' | |||
| :latitude="latitude" | |||
| :longitude="longitude" | |||
| :markers="markers" | |||
| :scale="scale" | |||
| @markertap="markertap" | |||
| @callouttap='callouttap'> | |||
| <!-- subkey="66c5a2ad2849" --> | |||
| </map> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import position from '@/utils/position.js' | |||
| export default { | |||
| data() { | |||
| return { | |||
| latitude: 23.106574, //纬度 | |||
| longitude: 113.324587, //经度 | |||
| scale: 10, //缩放级别 | |||
| bottomData: false, | |||
| mapCtx: null, | |||
| markers:[ | |||
| { //标记点A 的信息 | |||
| iconPath: "/static/logo.png", //图标 | |||
| id: 0, | |||
| width: 20, //图标icon 宽度 | |||
| height: 28 ,//图标icon 高度 | |||
| latitude: 26.1272, | |||
| longitude: 113.11659 | |||
| } | |||
| ] | |||
| } | |||
| }, | |||
| onLoad() { | |||
| position.getLocation(res => { | |||
| console.log(res); | |||
| this.latitude = res.latitude | |||
| this.longitude = res.longitude | |||
| }) | |||
| }, | |||
| computed: { | |||
| mapheight() { | |||
| let data = '' | |||
| if (this.bottomData) { | |||
| if (this.upTop) { | |||
| data = '50px' | |||
| } else { | |||
| data = '200px' | |||
| } | |||
| } else { | |||
| data = '90vh' | |||
| } | |||
| return data | |||
| }, | |||
| coverbottom() { | |||
| let data = '' | |||
| if (this.bottomData) { | |||
| data = '20rpx' | |||
| } else { | |||
| data = '100rpx' | |||
| } | |||
| return data | |||
| } | |||
| }, | |||
| onShow() { | |||
| this.mapCtx = wx.createMapContext('map'); | |||
| this.mapCtx && this.mapCtx.addCustomLayer({ | |||
| layerId: '66c5a2ad2849', | |||
| success: (res) => { | |||
| console.log('success', res); | |||
| }, | |||
| fail: (e) => { | |||
| console.log('fail', e); | |||
| }, | |||
| }); | |||
| }, | |||
| methods: { | |||
| //地图点击事件 | |||
| markertap(e) { | |||
| console.log("===你点击了标记点===", e) | |||
| }, | |||
| //地图点击事件 | |||
| callouttap(e) { | |||
| console.log('地图点击事件', e) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| @ -0,0 +1,70 @@ | |||
| <!-- 驳回 --> | |||
| <template> | |||
| <view class="reject"> | |||
| <!-- <navbar title="驳回" :leftClick="leftClick"></navbar> --> | |||
| <uv-form labelPosition="left" :model="form" :rules="rules" errorType="toast" ref="form" labelWidth="0"> | |||
| <uv-form-item label="" prop="reason"> | |||
| <uv-textarea v-model="form.reason" :maxlength="200" :height="120" count | |||
| placeholder="请输入驳回原因"></uv-textarea> | |||
| </uv-form-item> | |||
| <uv-button type="primary" text="驳回" shape="circle" customStyle="margin-top: 10px" | |||
| @click="submit"></uv-button> | |||
| </uv-form> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import navbar from '../../components/base/navbar.vue' | |||
| export default { | |||
| name: 'Reject', | |||
| components: { | |||
| navbar | |||
| }, | |||
| data() { | |||
| return { | |||
| form: { | |||
| reason: '' | |||
| }, | |||
| rules: { | |||
| 'reason': { | |||
| type: 'string', | |||
| required: true, | |||
| message: '请填写姓名', | |||
| trigger: ['blur', 'change'] | |||
| } | |||
| }, | |||
| } | |||
| }, | |||
| methods: { | |||
| //驳回 | |||
| submit() { | |||
| this.$refs.form.validate().then(res => { | |||
| }).catch(errors => { | |||
| uni.showToast({ | |||
| icon: 'none', | |||
| title: '请填写驳回原因' | |||
| }) | |||
| }) | |||
| }, | |||
| //返回 | |||
| leftClick() { | |||
| uni.switchTab({ | |||
| url: '/pages/repairList/repairList' | |||
| }) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| .reject { | |||
| width: 96%; | |||
| margin: 0rpx auto; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,271 @@ | |||
| <!-- 报修 --> | |||
| <template> | |||
| <view class="repair bx reserveSpace"> | |||
| <!-- <view class="repair-title"> | |||
| <text>申请报修</text> | |||
| </view> --> | |||
| <uv-form :model="form" :rules="rules" :useBeforeRead="true" ref="form" labelPosition="left" labelWidth="100"> | |||
| <uv-form-item label="楼栋" prop="form.building" borderBottom> | |||
| <uv-input @focus="floorPickerOpen" placeholder="请选择楼层" v-model="form.building" border="none" | |||
| :fontSize="30"></uv-input> | |||
| <template v-slot:right> | |||
| <uv-icon name="arrow-right"></uv-icon> | |||
| </template> | |||
| </uv-form-item> | |||
| <uv-form-item label="室号" prop="form.room" borderBottom> | |||
| <uv-input @focus="roomPickerOpen" placeholder="请选择室号" v-model="form.room" border="none" | |||
| :fontSize="30"></uv-input> | |||
| <template v-slot:right> | |||
| <uv-icon name="arrow-right"></uv-icon> | |||
| </template> | |||
| </uv-form-item> | |||
| <uv-form-item label="项目" prop="form.project" borderBottom> | |||
| <uv-input v-model="form.project" placeholder="请填写项目" :fontSize="30" border="none"></uv-input> | |||
| </uv-form-item> | |||
| <uv-form-item label="姓名" prop="form.name" borderBottom> | |||
| <uv-input v-model="form.name" placeholder="请填写姓名" :fontSize="30" border="none"></uv-input> | |||
| </uv-form-item> | |||
| <uv-form-item label="简介" prop="form.intro" borderBottom> | |||
| <uv-textarea v-model="form.intro" :height="140" :maxlength="200" textStyle="font-size : 30rpx" count | |||
| placeholder="请输入内容"></uv-textarea> | |||
| </uv-form-item> | |||
| <uv-form-item label="电话号" prop="form.name" borderBottom> | |||
| <uv-input v-model="form.phone" placeholder="请填写电话号" border="none" :fontSize="30"></uv-input> | |||
| </uv-form-item> | |||
| <uv-form-item label="照片" prop="form.images" labelPosition="top"> | |||
| <view class="image-list"> | |||
| <view @click="openImageMenu(index)" v-for="(item,index) in form.images" :key="index" | |||
| class="image-item"> | |||
| <image :src="item" mode="widthFix"></image> | |||
| </view> | |||
| <view v-if="form.images.length < maxUpload" @click="uploadImage" class="upload"> | |||
| <uv-icon name="camera-fill" color="#3c9cff" size="50"></uv-icon> | |||
| </view> | |||
| </view> | |||
| </uv-form-item> | |||
| <uv-button type="primary" text="提交" shape="circle" customStyle="margin-top: 10px" | |||
| @click="submitRepair"></uv-button> | |||
| </uv-form> | |||
| <!-- 报修地址选择(楼栋) --> | |||
| <uv-picker ref="floorPicker" :columns="floorList" :itemHeight="100" :round="20" keyName="label" title="选择楼栋" | |||
| @confirm="floorConfirm"></uv-picker> | |||
| <!-- 报修地址选择(室号) --> | |||
| <uv-picker ref="roomPicker" :columns="roomNumberList" :itemHeight="100" :round="20" keyName="label" title="选择室号" | |||
| @confirm="roomConfirm"></uv-picker> | |||
| <!-- 图片操作菜单 --> | |||
| <uv-action-sheet ref="actionSheet" :actions="list" :round="20" cancelText="取消" title="图片操作" | |||
| @select="selectImageSheet"> </uv-action-sheet> | |||
| <showPrivacyAgreement ref="showPrivacy"> | |||
| </showPrivacyAgreement> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import showPrivacyAgreement from '@/components/config/showPrivacyAgreement.vue' | |||
| export default { | |||
| name: 'Repair', | |||
| components: { | |||
| showPrivacyAgreement | |||
| }, | |||
| data() { | |||
| return { | |||
| form: { | |||
| building: '', //楼栋 | |||
| room: '', //室号 | |||
| project: '', //项目 | |||
| phone: '', //手机号 | |||
| name: '', //姓名 | |||
| intro: '', //简介 | |||
| images: [] | |||
| }, | |||
| rules: { //参数校验 | |||
| 'form.name': { | |||
| type: 'string', | |||
| required: true, | |||
| message: '请填写姓名', | |||
| trigger: ['blur', 'change'] | |||
| } | |||
| }, | |||
| maxUpload: 4, //最大上传图片张数 | |||
| list: [ //图片操作菜单操作项 | |||
| { | |||
| name: '查看图片', | |||
| id: 0 | |||
| }, | |||
| { | |||
| name: '删除图片', | |||
| id: 1 | |||
| } | |||
| ], | |||
| currentIndex: undefined, //当前操作的图片索引 | |||
| floorList: [ | |||
| [{ | |||
| id: 0, | |||
| label: '楼栋1' | |||
| }, | |||
| { | |||
| id: 1, | |||
| label: '楼栋2' | |||
| } | |||
| ] | |||
| ], //楼栋列表 | |||
| roomNumberList: [ | |||
| [{ | |||
| id: 0, | |||
| label: 'A1001' | |||
| }, | |||
| { | |||
| id: 1, | |||
| label: 'A1002' | |||
| } | |||
| ] | |||
| ], //室号列表 | |||
| } | |||
| }, | |||
| onShow() { | |||
| if (wx.onNeedPrivacyAuthorization) { | |||
| console.log('onNeedPrivacyAuthorization'); | |||
| wx.onNeedPrivacyAuthorization(resolve => { | |||
| console.log('onNeedPrivacyAuthorization'); | |||
| // 需要用户同意隐私授权时 | |||
| // 弹出开发者自定义的隐私授权弹窗 | |||
| this.resolvePrivacyAuthorization = resolve | |||
| this.$refs.showPrivacy.init(resolve) | |||
| }) | |||
| } | |||
| }, | |||
| methods: { | |||
| //上传图片 | |||
| uploadImage() { | |||
| let self = this | |||
| this.$Oss.ossUploadImage({ | |||
| success(res) { | |||
| self.form.images.push(res) | |||
| } | |||
| }) | |||
| }, | |||
| //打开图片操作菜单 | |||
| openImageMenu(index) { | |||
| this.currentIndex = index | |||
| this.$refs.actionSheet.open(); | |||
| }, | |||
| //用户选择了图片操作选项 | |||
| selectImageSheet(imageSheet) { | |||
| let { | |||
| id | |||
| } = imageSheet | |||
| if (id) { | |||
| this.deleteImageAsList() | |||
| } else { | |||
| this.viewImageAsList() | |||
| } | |||
| }, | |||
| //查看图片 | |||
| viewImageAsList() { | |||
| this.$utils.previewImage({ | |||
| current: this.currentIndex, | |||
| urls: this.form.images | |||
| }) | |||
| }, | |||
| //删除图片 | |||
| deleteImageAsList() { | |||
| this.form.images = this.form.images.filter((_, index) => { | |||
| return index != this.currentIndex | |||
| }) | |||
| }, | |||
| //用户选择了楼栋 | |||
| floorConfirm(floor) { | |||
| this.form.building = floor.value[0].label | |||
| }, | |||
| //打开选择楼栋 | |||
| floorPickerOpen() { | |||
| uni.hideKeyboard() | |||
| this.$refs.floorPicker.open(); | |||
| }, | |||
| //用户选择了室号 | |||
| roomConfirm(floor) { | |||
| this.form.room = floor.value[0].label | |||
| }, | |||
| //打开选择室号 | |||
| roomPickerOpen() { | |||
| uni.hideKeyboard() | |||
| this.$refs.roomPicker.open(); | |||
| }, | |||
| //提交报修 | |||
| submitRepair() { | |||
| console.log(this.form); | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| .bx { | |||
| width: 96%; | |||
| margin: 0rpx auto; | |||
| } | |||
| .repair-title { | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| height: 100rpx; | |||
| padding-top: 100rpx; | |||
| } | |||
| .repair-title text { | |||
| font-size: 40rpx; | |||
| font-weight: bold; | |||
| height: 70rpx; | |||
| border-bottom: 8rpx solid #3c9cff; | |||
| } | |||
| .image-list { | |||
| width: 100%; | |||
| display: flex; | |||
| flex-wrap: wrap; | |||
| padding-top: 20rpx; | |||
| } | |||
| .image-item, | |||
| .upload { | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| width: 24%; | |||
| height: 174rpx; | |||
| background: #f8f8f8; | |||
| margin-left: 1%; | |||
| border-radius: 15rpx; | |||
| overflow: hidden; | |||
| margin-bottom: 20rpx; | |||
| } | |||
| .image-item image { | |||
| width: 100%; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,175 @@ | |||
| <template> | |||
| <view class="repairList reserveSpace"> | |||
| <view class="tab"> | |||
| <uv-tabs :list="list" lineWidth="60" lineHeight="10" @click="selectTag"></uv-tabs> | |||
| </view> | |||
| <view class="repairList-main"> | |||
| <view v-for="item in 10" class="repairItem"> | |||
| <view class="repairMain"> | |||
| <!-- <view class="userName">用户名</view> --> | |||
| <view class="build"> | |||
| <view> | |||
| <text style="margin-right: 10rpx;">楼栋:楼栋1</text> | |||
| <text>室号:A1001</text> | |||
| </view> | |||
| <text style="font-size: 26rpx;">2024-12-12</text> | |||
| </view> | |||
| <view class="desc"> | |||
| 近期,我所在的学生宿舍楼X栋XXX室遇到了一个亟需解决的问题,特此提交报修申请。具体故障为:宿舍内卫生间水龙头出现持续滴漏现象,已持续多日,不仅造成了水资源的浪费,还影响了寝室的日常使用和休息环境。夜间滴水声尤为明显,干扰了同学们的睡眠质量。我们初步检查,未能自行解决,判断可能是内部密封件老化或松动所致。为尽快恢复宿舍正常生活环境,恳请学校后勤部门能尽快安排专业维修人员前来检查并修复,我们将积极配合维修工作,确保宿舍设施尽快恢复正常使用。感谢学校对我们学习生活环境的关心与支持! | |||
| </view> | |||
| <view class="repairImages"> | |||
| <view v-for="(item,index) in urls" :key="index" class="image-item"> | |||
| <image @click="viewImageAsList(index)" :src="item" mode="widthFix"></image> | |||
| </view> | |||
| </view> | |||
| <view class="btns"> | |||
| <view @click="toReject" class="btn">驳回</view> | |||
| <view @click="toFinish" class="btn">结单</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| urls: [ | |||
| 'http://www.mxqih.top:666/logo.png', | |||
| 'http://www.mxqih.top:666/logo.png', | |||
| 'http://www.mxqih.top:666/logo.png' | |||
| ], | |||
| list: [{ | |||
| name: '待完成', | |||
| }, { | |||
| name: '已完成', | |||
| }], | |||
| current: 0, | |||
| currentIndex : 0 | |||
| } | |||
| }, | |||
| methods: { | |||
| //跳转驳回 | |||
| toReject() { | |||
| uni.navigateTo({ | |||
| url: '/pages/reject/reject' | |||
| }) | |||
| }, | |||
| //跳转结单页面 | |||
| toFinish() { | |||
| uni.navigateTo({ | |||
| url: '/pages/finish/finish' | |||
| }) | |||
| }, | |||
| //查看图片 | |||
| viewImageAsList(index) { | |||
| this.currentIndex = index | |||
| this.$utils.previewImage({ | |||
| current: this.currentIndex, | |||
| urls: this.urls | |||
| }) | |||
| }, | |||
| //选择了顶部的标签 | |||
| selectTag(tag){ | |||
| console.log(tag); | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| .repairList{ | |||
| background: #f8f8f8; | |||
| } | |||
| .tab{ | |||
| display: flex; | |||
| align-items: center; | |||
| height: 80rpx; | |||
| background: white; | |||
| margin-bottom: 20rpx; | |||
| } | |||
| .repairList-main { | |||
| min-height: 100vh; | |||
| } | |||
| .repairItem { | |||
| display: flex; | |||
| background: white; | |||
| width: 96%; | |||
| margin: 0rpx auto; | |||
| border-radius: 20rpx; | |||
| margin-bottom: 20rpx; | |||
| } | |||
| .repairMain { | |||
| width: 100%; | |||
| box-sizing: border-box; | |||
| padding-left: 20rpx; | |||
| } | |||
| /* | |||
| .userName { | |||
| font-size: 32rpx; | |||
| margin: 10rpx 0rpx; | |||
| } */ | |||
| .build { | |||
| display: flex; | |||
| justify-content: space-between; | |||
| font-size: 28rpx; | |||
| margin: 20rpx 0rpx; | |||
| } | |||
| .desc { | |||
| height: 200rpx; | |||
| overflow-y: scroll; | |||
| margin-bottom: 20rpx; | |||
| } | |||
| .repairImages { | |||
| display: flex; | |||
| flex-wrap: wrap; | |||
| margin: 10rpx 0rpx; | |||
| } | |||
| .image-item { | |||
| width: 24%; | |||
| margin-left: 1%; | |||
| height: 180rpx; | |||
| overflow: hidden; | |||
| } | |||
| .image-item image { | |||
| width: 100%; | |||
| } | |||
| .btns { | |||
| margin: 20rpx 0rpx; | |||
| display: flex; | |||
| justify-content: flex-end; | |||
| } | |||
| .btn { | |||
| width: 200rpx; | |||
| height: 50rpx; | |||
| display: flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| border-radius: 50rpx; | |||
| margin-left: 15rpx; | |||
| font-size: 30rpx; | |||
| color: white; | |||
| background: #f9ae3d; | |||
| } | |||
| .btn:nth-child(2) { | |||
| background: #3c9cff; | |||
| } | |||
| </style> | |||
| @ -0,0 +1,140 @@ | |||
| <template> | |||
| <view class="login"> | |||
| <view class="title"> | |||
| 帧视界 | |||
| </view> | |||
| <view class="title"> | |||
| 申请获取你的头像、昵称 | |||
| </view> | |||
| <button | |||
| class="chooseAvatar" | |||
| open-type="chooseAvatar" | |||
| @chooseavatar="onChooseAvatar"> | |||
| <view class="line"> | |||
| <view class=""> | |||
| 头像 | |||
| </view> | |||
| <view class=""> | |||
| <image :src="userInfo.headImage" | |||
| v-if="userInfo.headImage" | |||
| style="width: 60rpx;height: 60rpx;" | |||
| mode=""></image> | |||
| <!-- <image src="/static/image/tabbar/6.png" | |||
| v-else | |||
| style="width: 50rpx;height: 50rpx;" | |||
| mode=""></image> --> | |||
| </view> | |||
| </view> | |||
| </button> | |||
| <view class="line"> | |||
| <view class=""> | |||
| 昵称 | |||
| </view> | |||
| <view class=""> | |||
| <input type="nickname" placeholder="请输入昵称" | |||
| style="text-align: right;" | |||
| id="nickName" | |||
| v-model="userInfo.nickName"/> | |||
| </view> | |||
| </view> | |||
| <view class="btn" | |||
| @click="submit"> | |||
| 确认 | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| userInfo : { | |||
| headImage : '', | |||
| nickName : '', | |||
| } | |||
| }; | |||
| }, | |||
| onShow(){ | |||
| }, | |||
| computed : { | |||
| }, | |||
| methods : { | |||
| onChooseAvatar(res){ | |||
| let self = this | |||
| self.$Oss.ossUpload(res.target.avatarUrl) | |||
| .then(url => { | |||
| self.userInfo.headImage = url | |||
| }) | |||
| }, | |||
| submit(){ | |||
| let self = this | |||
| uni.createSelectorQuery().in(this) | |||
| .select("#nickName") | |||
| .fields({ | |||
| properties: ["value"], | |||
| }) | |||
| .exec((res) => { | |||
| const nickName = res?.[0]?.value | |||
| self.userInfo.nickName = nickName | |||
| cccc | |||
| if(self.$utils.verificationAll(self.userInfo, { | |||
| headImage : '请选择头像', | |||
| nickName : '请填写昵称', | |||
| })){ | |||
| return | |||
| } | |||
| self.$api('infoUpdateInfo', self.userInfo, res => { | |||
| if(res.code == 200){ | |||
| uni.navigateBack(-1) | |||
| } | |||
| }) | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .login{ | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: center; | |||
| align-items: center; | |||
| height: 80vh; | |||
| .title{ | |||
| line-height: 45rpx; | |||
| font-weight: 900; | |||
| } | |||
| .line{ | |||
| display: flex; | |||
| justify-content: space-between; | |||
| align-items: center; | |||
| width: 80%; | |||
| border-bottom: 1px solid #00000023; | |||
| padding: 30rpx 0; | |||
| margin: 0 auto; | |||
| } | |||
| .chooseAvatar{ | |||
| width: 100%; | |||
| padding: 0; | |||
| margin: 0; | |||
| margin-top: 10vh; | |||
| border: none; | |||
| } | |||
| .btn{ | |||
| background: #000; | |||
| color: #fff; | |||
| width: 80%; | |||
| padding: 20rpx 0; | |||
| text-align: center; | |||
| border-radius: 15rpx; | |||
| margin-top: 10vh; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,27 @@ | |||
| import Vue from 'vue' | |||
| import Vuex from 'vuex' | |||
| Vue.use(Vuex); //vue的插件机制 | |||
| import api from '@/api/api.js' | |||
| //Vuex.Store 构造器选项 | |||
| const store = new Vuex.Store({ | |||
| state: { | |||
| configList: [], //配置列表 | |||
| }, | |||
| getters: {}, | |||
| mutations: { | |||
| // 初始化配置 | |||
| initConfig(state){ | |||
| api('getConfig', res => { | |||
| if(res.code == 200){ | |||
| state.configList = res.result | |||
| } | |||
| }) | |||
| }, | |||
| }, | |||
| actions: {}, | |||
| }) | |||
| export default store | |||
| @ -0,0 +1,10 @@ | |||
| uni.addInterceptor({ | |||
| returnValue (res) { | |||
| if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { | |||
| return res; | |||
| } | |||
| return new Promise((resolve, reject) => { | |||
| res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); | |||
| }); | |||
| }, | |||
| }); | |||
| @ -0,0 +1,75 @@ | |||
| /** | |||
| * 这里是uni-app内置的常用样式变量 | |||
| * | |||
| * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 | |||
| * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App | |||
| * | |||
| */ | |||
| /** | |||
| * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 | |||
| * | |||
| * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 | |||
| */ | |||
| /* 颜色变量 */ | |||
| /* 行为相关颜色 */ | |||
| $uni-color-primary: #007aff; | |||
| $uni-color-success: #4cd964; | |||
| $uni-color-warning: #f0ad4e; | |||
| $uni-color-error: #dd524d; | |||
| /* 文字基本颜色 */ | |||
| $uni-text-color:#333;//基本色 | |||
| $uni-text-color-inverse:#fff;//反色 | |||
| $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 | |||
| $uni-text-color-placeholder: #808080; | |||
| $uni-text-color-disable:#c0c0c0; | |||
| /* 背景颜色 */ | |||
| $uni-bg-color:#ffffff; | |||
| $uni-bg-color-grey:#f8f8f8; | |||
| $uni-bg-color-hover:#f1f1f1;//点击状态颜色 | |||
| $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 | |||
| /* 边框颜色 */ | |||
| $uni-border-color:#c8c7cc; | |||
| /* 尺寸变量 */ | |||
| /* 文字尺寸 */ | |||
| $uni-font-size-sm:12px; | |||
| $uni-font-size-base:14px; | |||
| $uni-font-size-lg:16px; | |||
| /* 图片尺寸 */ | |||
| $uni-img-size-sm:20px; | |||
| $uni-img-size-base:26px; | |||
| $uni-img-size-lg:40px; | |||
| /* Border Radius */ | |||
| $uni-border-radius-sm: 2px; | |||
| $uni-border-radius-base: 3px; | |||
| $uni-border-radius-lg: 6px; | |||
| $uni-border-radius-circle: 50%; | |||
| /* 水平间距 */ | |||
| $uni-spacing-row-sm: 5px; | |||
| $uni-spacing-row-base: 10px; | |||
| $uni-spacing-row-lg: 15px; | |||
| /* 垂直间距 */ | |||
| $uni-spacing-col-sm: 4px; | |||
| $uni-spacing-col-base: 8px; | |||
| $uni-spacing-col-lg: 12px; | |||
| /* 透明度 */ | |||
| $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 | |||
| /* 文章场景相关 */ | |||
| $uni-color-title: #2C405A; // 文章标题颜色 | |||
| $uni-font-size-title:20px; | |||
| $uni-color-subtitle: #555555; // 二级标题颜色 | |||
| $uni-font-size-subtitle:26px; | |||
| $uni-color-paragraph: #3F536E; // 文章段落颜色 | |||
| $uni-font-size-paragraph:15px; | |||
| @ -0,0 +1,42 @@ | |||
| ## 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目录规范 | |||
| @ -0,0 +1,91 @@ | |||
| <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> | |||
| @ -0,0 +1,110 @@ | |||
| <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> | |||
| @ -0,0 +1,664 @@ | |||
| .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"; | |||
| } | |||
| @ -0,0 +1,664 @@ | |||
| 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) | |||
| @ -0,0 +1,649 @@ | |||
| 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) | |||
| @ -0,0 +1,89 @@ | |||
| { | |||
| "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" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,8 @@ | |||
| ## Icons 图标 | |||
| > **组件名:uni-icons** | |||
| > 代码块: `uIcons` | |||
| 用于展示 icons 图标 。 | |||
| ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) | |||
| #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 | |||
| @ -0,0 +1,8 @@ | |||
| ## 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 | |||
| @ -0,0 +1 @@ | |||
| @import './styles/index.scss'; | |||
| @ -0,0 +1,82 @@ | |||
| { | |||
| "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" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,4 @@ | |||
| `uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 | |||
| ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) | |||
| #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 | |||
| @ -0,0 +1,7 @@ | |||
| @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'; | |||
| @ -0,0 +1,3 @@ | |||
| .uni-border { | |||
| border: 1px $uni-border-1 solid; | |||
| } | |||
| @ -0,0 +1,66 @@ | |||
| // 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; | |||
| } | |||
| @ -0,0 +1,55 @@ | |||
| @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) | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,56 @@ | |||
| @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); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,167 @@ | |||
| /* #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 */ | |||
| @ -0,0 +1,24 @@ | |||
| @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 */ | |||
| } | |||
| @ -0,0 +1,146 @@ | |||
| // @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; | |||
| @ -0,0 +1,19 @@ | |||
| // 合并 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; | |||
| }; | |||
| @ -0,0 +1,31 @@ | |||
| // 间距基础倍数 | |||
| $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); | |||
| @ -0,0 +1,62 @@ | |||
| @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); | |||
| @ -0,0 +1,7 @@ | |||
| ## 1.0.2(2023-07-02) | |||
| uv-action-sheet 由于弹出层uv-popup的修改,打开和关闭方法更改,详情参考文档:https://www.uvui.cn/components/actionSheet.html | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-action-sheet 底部操作菜单 | |||
| @ -0,0 +1,50 @@ | |||
| export default { | |||
| props: { | |||
| // 标题,有值则显示,同时会显示关闭按钮 | |||
| title: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 选项上方的描述信息 | |||
| description: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 数据 | |||
| actions: { | |||
| type: Array, | |||
| default: () => [] | |||
| }, | |||
| // 取消按钮的文字,不为空时显示按钮 | |||
| cancelText: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 点击某个菜单项时是否关闭弹窗 | |||
| closeOnClickAction: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 处理底部安全区(默认true) | |||
| safeAreaInsetBottom: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 小程序的打开方式 | |||
| openType: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 点击遮罩是否允许关闭 (默认true) | |||
| closeOnClickOverlay: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 圆角值 | |||
| round: { | |||
| type: [Boolean, String, Number], | |||
| default: 0 | |||
| }, | |||
| ...uni.$uv?.props?.actionSheet | |||
| } | |||
| } | |||
| @ -0,0 +1,280 @@ | |||
| <template> | |||
| <uv-popup | |||
| ref="popup" | |||
| mode="bottom" | |||
| :safeAreaInsetBottom="safeAreaInsetBottom" | |||
| :round="round" | |||
| :close-on-click-overlay="closeOnClickOverlay" | |||
| @change="popupChange" | |||
| > | |||
| <view class="uv-action-sheet"> | |||
| <view | |||
| class="uv-action-sheet__header" | |||
| v-if="title" | |||
| > | |||
| <text class="uv-action-sheet__header__title uv-line-1">{{title}}</text> | |||
| <view | |||
| class="uv-action-sheet__header__icon-wrap" | |||
| @tap.stop="cancel" | |||
| > | |||
| <uv-icon | |||
| name="close" | |||
| size="17" | |||
| color="#c8c9cc" | |||
| bold | |||
| ></uv-icon> | |||
| </view> | |||
| </view> | |||
| <text | |||
| class="uv-action-sheet__description" | |||
| :style="[{ | |||
| marginTop: `${title && description ? 0 : '18px'}` | |||
| }]" | |||
| v-if="description" | |||
| >{{description}}</text> | |||
| <slot> | |||
| <uv-line v-if="description"></uv-line> | |||
| <view class="uv-action-sheet__item-wrap"> | |||
| <view v-for="(item, index) in actions" :key="index"> | |||
| <!-- #ifdef MP --> | |||
| <button | |||
| class="uv-reset-button" | |||
| :openType="item.openType" | |||
| @getuserinfo="onGetUserInfo" | |||
| @contact="onContact" | |||
| @getphonenumber="onGetPhoneNumber" | |||
| @error="onError" | |||
| @launchapp="onLaunchApp" | |||
| @opensetting="onOpenSetting" | |||
| :lang="lang" | |||
| :session-from="sessionFrom" | |||
| :send-message-title="sendMessageTitle" | |||
| :send-message-path="sendMessagePath" | |||
| :send-message-img="sendMessageImg" | |||
| :show-message-card="showMessageCard" | |||
| :app-parameter="appParameter" | |||
| @tap="selectHandler(index)" | |||
| :hover-class="!item.disabled && !item.loading ? 'uv-action-sheet--hover' : ''" | |||
| > | |||
| <!-- #endif --> | |||
| <view | |||
| class="uv-action-sheet__item-wrap__item" | |||
| @tap.stop="selectHandler(index)" | |||
| :hover-class="!item.disabled && !item.loading ? 'uv-action-sheet--hover' : ''" | |||
| :hover-stay-time="150" | |||
| > | |||
| <template v-if="!item.loading"> | |||
| <text | |||
| class="uv-action-sheet__item-wrap__item__name" | |||
| :style="[itemStyle(index)]" | |||
| >{{ item.name }}</text> | |||
| <text | |||
| v-if="item.subname" | |||
| class="uv-action-sheet__item-wrap__item__subname" | |||
| >{{ item.subname }}</text> | |||
| </template> | |||
| <uv-loading-icon | |||
| v-else | |||
| custom-class="van-action-sheet__loading" | |||
| size="18" | |||
| mode="circle" | |||
| /> | |||
| </view> | |||
| <!-- #ifdef MP --> | |||
| </button> | |||
| <!-- #endif --> | |||
| <uv-line v-if="index !== actions.length - 1"></uv-line> | |||
| </view> | |||
| </view> | |||
| </slot> | |||
| <uv-gap | |||
| bgColor="#eaeaec" | |||
| height="6" | |||
| v-if="cancelText" | |||
| ></uv-gap> | |||
| <view hover-class="uv-action-sheet--hover"> | |||
| <text | |||
| @touchmove.stop.prevent | |||
| :hover-stay-time="150" | |||
| v-if="cancelText" | |||
| class="uv-action-sheet__cancel-text" | |||
| @tap="cancel" | |||
| >{{cancelText}}</text> | |||
| </view> | |||
| </view> | |||
| </uv-popup> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import button from '@/uni_modules/uv-ui-tools/libs/mixin/button.js' | |||
| import openType from '@/uni_modules/uv-ui-tools/libs/mixin/openType.js' | |||
| import props from './props.js'; | |||
| /** | |||
| * ActionSheet 操作菜单 | |||
| * @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。 | |||
| * @tutorial https://www.uvui.cn/components/actionSheet.html | |||
| * @property {Boolean} show 操作菜单是否展示 (默认 false ) | |||
| * @property {String} title 操作菜单标题 | |||
| * @property {String} description 选项上方的描述信息 | |||
| * @property {Array<Object>} actions 按钮的文字数组,见官方文档示例 | |||
| * @property {String} cancelText 取消按钮的提示文字,不为空时显示按钮 | |||
| * @property {Boolean} closeOnClickAction 点击某个菜单项时是否关闭弹窗 (默认 true ) | |||
| * @property {Boolean} safeAreaInsetBottom 处理底部安全区 (默认 true ) | |||
| * @property {String} openType 小程序的打开方式 (contact | launchApp | getUserInfo | openSetting |getPhoneNumber |error ) | |||
| * @property {Boolean} closeOnClickOverlay 点击遮罩是否允许关闭 (默认 true ) | |||
| * @property {String} lang 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文 | |||
| * @property {String} sessionFrom 会话来源,openType="contact"时有效 | |||
| * @property {String} sendMessageTitle 会话内消息卡片标题,openType="contact"时有效 | |||
| * @property {String} sendMessagePath 会话内消息卡片点击跳转小程序路径,openType="contact"时有效 | |||
| * @property {String} sendMessageImg 会话内消息卡片图片,openType="contact"时有效 | |||
| * @property {Boolean} showMessageCard 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效 (默认 false ) | |||
| * @property {String} appParameter 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效 | |||
| * | |||
| * @event {Function} select 点击ActionSheet列表项时触发 | |||
| * @event {Function} close 点击取消按钮时触发 | |||
| * @event {Function} getuserinfo 用户点击该按钮时,会返回获取到的用户信息,回调的 detail 数据与 wx.getUserInfo 返回的一致,openType="getUserInfo"时有效 | |||
| * @event {Function} contact 客服消息回调,openType="contact"时有效 | |||
| * @event {Function} getphonenumber 获取用户手机号回调,openType="getPhoneNumber"时有效 | |||
| * @event {Function} error 当使用开放能力时,发生错误的回调,openType="error"时有效 | |||
| * @event {Function} launchapp 打开 APP 成功的回调,openType="launchApp"时有效 | |||
| * @event {Function} opensetting 在打开授权设置页后回调,openType="openSetting"时有效 | |||
| * @example <uv-action-sheet ref="actionSheet" :actions="list" :title="title" ></uv-action-sheet> | |||
| */ | |||
| export default { | |||
| name: "uv-action-sheet", | |||
| mixins: [openType, button, mpMixin , mixin, props], | |||
| emits: ['close', 'select'], | |||
| computed: { | |||
| // 操作项目的样式 | |||
| itemStyle() { | |||
| return (index) => { | |||
| let style = {}; | |||
| if (this.actions[index].color) style.color = this.actions[index].color | |||
| if (this.actions[index].fontSize) style.fontSize = this.$uv.addUnit(this.actions[index].fontSize) | |||
| // 选项被禁用的样式 | |||
| if (this.actions[index].disabled) style.color = '#c0c4cc' | |||
| return style; | |||
| } | |||
| }, | |||
| }, | |||
| methods: { | |||
| open() { | |||
| this.$refs.popup.open(); | |||
| }, | |||
| close() { | |||
| this.$refs.popup.close(); | |||
| }, | |||
| popupChange(e) { | |||
| if(!e.show) this.$emit('close'); | |||
| }, | |||
| // 点击取消按钮 | |||
| cancel() { | |||
| this.close(); | |||
| }, | |||
| selectHandler(index) { | |||
| const item = this.actions[index] | |||
| if (item && !item.disabled && !item.loading) { | |||
| this.$emit('select', item) | |||
| if (this.closeOnClickAction) { | |||
| this.close(); | |||
| } | |||
| } | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| $show-lines: 1; | |||
| $show-reset-button: 1; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/variable.scss'; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/color.scss'; | |||
| $uv-action-sheet-reset-button-width:100% !default; | |||
| $uv-action-sheet-title-font-size: 16px !default; | |||
| $uv-action-sheet-title-padding: 12px 30px !default; | |||
| $uv-action-sheet-title-color: $uv-main-color !default; | |||
| $uv-action-sheet-header-icon-wrap-right:15px !default; | |||
| $uv-action-sheet-header-icon-wrap-top:15px !default; | |||
| $uv-action-sheet-description-font-size:13px !default; | |||
| $uv-action-sheet-description-color:14px !default; | |||
| $uv-action-sheet-description-margin: 18px 15px !default; | |||
| $uv-action-sheet-item-wrap-item-padding:15px !default; | |||
| $uv-action-sheet-item-wrap-name-font-size:16px !default; | |||
| $uv-action-sheet-item-wrap-subname-font-size:13px !default; | |||
| $uv-action-sheet-item-wrap-subname-color: #c0c4cc !default; | |||
| $uv-action-sheet-item-wrap-subname-margin-top:10px !default; | |||
| $uv-action-sheet-cancel-text-font-size:16px !default; | |||
| $uv-action-sheet-cancel-text-color:$uv-content-color !default; | |||
| $uv-action-sheet-cancel-text-font-size:15px !default; | |||
| $uv-action-sheet-cancel-text-hover-background-color:rgb(242, 243, 245) !default; | |||
| .uv-reset-button { | |||
| width: $uv-action-sheet-reset-button-width; | |||
| } | |||
| .uv-action-sheet { | |||
| text-align: center; | |||
| &__header { | |||
| position: relative; | |||
| padding: $uv-action-sheet-title-padding; | |||
| &__title { | |||
| font-size: $uv-action-sheet-title-font-size; | |||
| color: $uv-action-sheet-title-color; | |||
| font-weight: bold; | |||
| text-align: center; | |||
| } | |||
| &__icon-wrap { | |||
| position: absolute; | |||
| right: $uv-action-sheet-header-icon-wrap-right; | |||
| top: $uv-action-sheet-header-icon-wrap-top; | |||
| } | |||
| } | |||
| &__description { | |||
| font-size: $uv-action-sheet-description-font-size; | |||
| color: $uv-tips-color; | |||
| margin: $uv-action-sheet-description-margin; | |||
| text-align: center; | |||
| } | |||
| &__item-wrap { | |||
| &__item { | |||
| padding: $uv-action-sheet-item-wrap-item-padding; | |||
| @include flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| flex-direction: column; | |||
| &__name { | |||
| font-size: $uv-action-sheet-item-wrap-name-font-size; | |||
| color: $uv-main-color; | |||
| text-align: center; | |||
| } | |||
| &__subname { | |||
| font-size: $uv-action-sheet-item-wrap-subname-font-size; | |||
| color: $uv-action-sheet-item-wrap-subname-color; | |||
| margin-top: $uv-action-sheet-item-wrap-subname-margin-top; | |||
| text-align: center; | |||
| } | |||
| } | |||
| } | |||
| &__cancel-text { | |||
| font-size: $uv-action-sheet-cancel-text-font-size; | |||
| color: $uv-action-sheet-cancel-text-color; | |||
| text-align: center; | |||
| padding: $uv-action-sheet-cancel-text-font-size; | |||
| } | |||
| &--hover { | |||
| background-color: $uv-action-sheet-cancel-text-hover-background-color; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,92 @@ | |||
| { | |||
| "id": "uv-action-sheet", | |||
| "displayName": "uv-action-sheet 底部操作菜单 全面兼容小程序、nvue、vue2、vue3等多端", | |||
| "version": "1.0.2", | |||
| "description": "该组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheet API,配置更加灵活,所有平台都表现一致。", | |||
| "keywords": [ | |||
| "action-sheet", | |||
| "uvui", | |||
| "uv-ui", | |||
| "操作菜单", | |||
| "菜单选择" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools", | |||
| "uv-popup", | |||
| "uv-icon", | |||
| "uv-line", | |||
| "uv-loading-icon", | |||
| "uv-gap" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,13 @@ | |||
| ## ActionSheet 操作菜单 | |||
| > **组件名:uv-action-sheet** | |||
| 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。 | |||
| 本组件功能类似于uni的uni.showActionSheet API,配置更加灵活,所有平台都表现一致。 | |||
| ### <a href="https://www.uvui.cn/components/actionSheet.html" target="_blank">查看文档</a> | |||
| ### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| #### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,10 @@ | |||
| ## 1.0.4(2023-12-06) | |||
| 1. 阻止事件冒泡处理 | |||
| ## 1.0.3(2023-10-23) | |||
| 1. 修复报错的BUG | |||
| ## 1.0.2(2023-10-23) | |||
| 1. 修复设置singleSize、multipleSize、space等值带单位,存在不显示的BUG | |||
| ## 1.0.1(2023-09-13) | |||
| 1. 添加依赖 | |||
| ## 1.0.0(2023-08-30) | |||
| 1. 新增uv-album相册组件 | |||
| @ -0,0 +1,312 @@ | |||
| <template> | |||
| <view class="uv-album"> | |||
| <view | |||
| class="uv-album__row" | |||
| ref="uv-album__row" | |||
| v-for="(arr, index) in showUrls" | |||
| :forComputedUse="albumWidth" | |||
| :key="index" | |||
| > | |||
| <view | |||
| class="uv-album__row__wrapper" | |||
| v-for="(item, index1) in arr" | |||
| :key="index1" | |||
| :style="[imageStyle(index + 1, index1 + 1)]" | |||
| @tap.stop="previewFullImage ? onPreviewTap(getSrc(item)) : ''" | |||
| > | |||
| <image | |||
| :src="getSrc(item)" | |||
| :mode=" | |||
| urls.length === 1 | |||
| ? imageHeight > 0 | |||
| ? singleMode | |||
| : 'widthFix' | |||
| : multipleMode | |||
| " | |||
| :style="[ | |||
| { | |||
| width: imageWidth, | |||
| height: imageHeight | |||
| } | |||
| ]" | |||
| ></image> | |||
| <view | |||
| v-if=" | |||
| showMore && | |||
| urls.length > rowCount * showUrls.length && | |||
| index === showUrls.length - 1 && | |||
| index1 === showUrls[showUrls.length - 1].length - 1 | |||
| " | |||
| class="uv-album__row__wrapper__text" | |||
| > | |||
| <uv-text | |||
| :text="`+${urls.length - maxCount}`" | |||
| color="#fff" | |||
| :size="$uv.getPx(multipleSize) * 0.3" | |||
| align="center" | |||
| customStyle="justify-content: center" | |||
| ></uv-text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| // #ifdef APP-NVUE | |||
| // 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度 | |||
| const dom = uni.requireNativePlugin('dom') | |||
| // #endif | |||
| /** | |||
| * Album 相册 | |||
| * @description 本组件提供一个类似相册的功能,让开发者开发起来更加得心应手。减少重复的模板代码 | |||
| * @tutorial https://www.uvui.cn/components/album.html | |||
| * @property {Array} urls 图片地址列表 Array<String>|Array<Object>形式 | |||
| * @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址 | |||
| * @property {String | Number} singleSize 单图时,图片长边的长度 (默认 180 ) | |||
| * @property {String | Number} multipleSize 多图时,图片边长 (默认 70 ) | |||
| * @property {String | Number} space 多图时,图片水平和垂直之间的间隔 (默认 6 ) | |||
| * @property {String} singleMode 单图时,图片缩放裁剪的模式 (默认 'scaleToFill' ) | |||
| * @property {String} multipleMode 多图时,图片缩放裁剪的模式 (默认 'aspectFill' ) | |||
| * @property {String | Number} maxCount 取消按钮的提示文字 (默认 9 ) | |||
| * @property {Boolean} previewFullImage 是否可以预览图片 (默认 true ) | |||
| * @property {String | Number} rowCount 每行展示图片数量,如设置,singleSize和multipleSize将会无效 (默认 3 ) | |||
| * @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true ) | |||
| * | |||
| * @event {Function} albumWidth 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width ) | |||
| * @example <uv-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></uv-album> | |||
| */ | |||
| export default { | |||
| name: 'uv-album', | |||
| mixins: [mpMixin, mixin], | |||
| emits: ['albumWidth'], | |||
| props: { | |||
| // 图片地址,Array<String>|Array<Object>形式 | |||
| urls: { | |||
| type: Array, | |||
| default: () => [] | |||
| }, | |||
| // 指定从数组的对象元素中读取哪个属性作为图片地址 | |||
| keyName: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 单图时,图片长边的长度 | |||
| singleSize: { | |||
| type: [String, Number], | |||
| default: 180 | |||
| }, | |||
| // 多图时,图片边长 | |||
| multipleSize: { | |||
| type: [String, Number], | |||
| default: 70 | |||
| }, | |||
| // 多图时,图片水平和垂直之间的间隔 | |||
| space: { | |||
| type: [String, Number], | |||
| default: 6 | |||
| }, | |||
| // 单图时,图片缩放裁剪的模式 | |||
| singleMode: { | |||
| type: String, | |||
| default: 'scaleToFill' | |||
| }, | |||
| // 多图时,图片缩放裁剪的模式 | |||
| multipleMode: { | |||
| type: String, | |||
| default: 'aspectFill' | |||
| }, | |||
| // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量 | |||
| maxCount: { | |||
| type: [String, Number], | |||
| default: 9 | |||
| }, | |||
| // 是否可以预览图片 | |||
| previewFullImage: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 每行展示图片数量,如设置,singleSize和multipleSize将会无效 | |||
| rowCount: { | |||
| type: [String, Number], | |||
| default: 3 | |||
| }, | |||
| // 超出maxCount时是否显示查看更多的提示 | |||
| showMore: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| ...uni.$uv?.props?.album | |||
| }, | |||
| data() { | |||
| return { | |||
| // 单图的宽度 | |||
| singleWidth: 0, | |||
| // 单图的高度 | |||
| singleHeight: 0, | |||
| // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比 | |||
| singlePercent: 0.6 | |||
| } | |||
| }, | |||
| watch: { | |||
| urls: { | |||
| immediate: true, | |||
| handler(newVal) { | |||
| if (newVal.length === 1) { | |||
| this.getImageRect() | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| computed: { | |||
| imageStyle() { | |||
| return (index1, index2) => { | |||
| const { space, rowCount, multipleSize, urls } = this; | |||
| const rowLen = this.showUrls.length; | |||
| const allLen = this.urls.length; | |||
| const style = { | |||
| marginRight: this.$uv.addUnit(space), | |||
| marginBottom: this.$uv.addUnit(space) | |||
| } | |||
| // 如果为最后一行,则每个图片都无需下边框 | |||
| if (index1 === rowLen) style.marginBottom = 0 | |||
| // 每行的最右边一张和总长度的最后一张无需右边框 | |||
| if ( | |||
| index2 === rowCount || | |||
| (index1 === rowLen && | |||
| index2 === this.showUrls[index1 - 1].length) | |||
| ) | |||
| style.marginRight = 0 | |||
| return style | |||
| } | |||
| }, | |||
| // 将数组划分为二维数组 | |||
| showUrls() { | |||
| const arr = [] | |||
| this.urls.map((item, index) => { | |||
| // 限制最大展示数量 | |||
| if (index + 1 <= this.maxCount) { | |||
| // 计算该元素为第几个素组内 | |||
| const itemIndex = Math.floor(index / this.rowCount) | |||
| // 判断对应的索引是否存在 | |||
| if (!arr[itemIndex]) { | |||
| arr[itemIndex] = [] | |||
| } | |||
| arr[itemIndex].push(item) | |||
| } | |||
| }) | |||
| return arr | |||
| }, | |||
| imageWidth() { | |||
| return this.$uv.addUnit( | |||
| this.urls.length === 1 ? this.singleWidth : this.multipleSize | |||
| ) | |||
| }, | |||
| imageHeight() { | |||
| return this.$uv.addUnit( | |||
| this.urls.length === 1 ? this.singleHeight : this.multipleSize | |||
| ) | |||
| }, | |||
| // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度 | |||
| // 因为用户在某些特殊的情况下,需要让文字与相册的宽度相等,所以这里事件的形式对外发送 | |||
| albumWidth() { | |||
| let width = 0 | |||
| if (this.urls.length === 1) { | |||
| width = this.singleWidth | |||
| } else { | |||
| width = | |||
| this.showUrls[0].length * this.$uv.getPx(this.multipleSize) + | |||
| this.$uv.getPx(this.space) * (this.showUrls[0].length - 1) | |||
| } | |||
| this.$emit('albumWidth', width) | |||
| return width | |||
| } | |||
| }, | |||
| methods: { | |||
| // 预览图片 | |||
| onPreviewTap(url) { | |||
| const urls = this.urls.map((item) => { | |||
| return this.getSrc(item) | |||
| }) | |||
| uni.previewImage({ | |||
| current: url, | |||
| urls | |||
| }) | |||
| }, | |||
| // 获取图片的路径 | |||
| getSrc(item) { | |||
| return this.$uv.test.object(item) ? | |||
| (this.keyName && item[this.keyName]) || item.src : | |||
| item | |||
| }, | |||
| // 单图时,获取图片的尺寸 | |||
| // 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸 | |||
| // 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent) | |||
| getImageRect() { | |||
| const src = this.getSrc(this.urls[0]) | |||
| uni.getImageInfo({ | |||
| src, | |||
| success: (res) => { | |||
| // 判断图片横向还是竖向展示方式 | |||
| const isHorizotal = res.width >= res.height | |||
| this.singleWidth = isHorizotal ? | |||
| this.singleSize : | |||
| (res.width / res.height) * this.$uv.getPx(this.singleSize) | |||
| this.singleHeight = !isHorizotal ? | |||
| this.singleSize : | |||
| (res.height / res.width) * this.singleWidth | |||
| }, | |||
| fail: () => { | |||
| this.getComponentWidth() | |||
| } | |||
| }) | |||
| }, | |||
| // 获取组件的宽度 | |||
| async getComponentWidth() { | |||
| // 延时一定时间,以获取dom尺寸 | |||
| await this.$uv.sleep(30) | |||
| // #ifndef APP-NVUE | |||
| this.$uGetRect('.uv-album__row').then((size) => { | |||
| this.singleWidth = size.width * this.singlePercent | |||
| }) | |||
| // #endif | |||
| // #ifdef APP-NVUE | |||
| // 这里ref="uv-album__row"所在的标签为通过for循环出来,导致this.$refs['uv-album__row']是一个数组 | |||
| const ref = this.$refs['uv-album__row'][0] | |||
| ref && | |||
| dom.getComponentRect(ref, (res) => { | |||
| this.singleWidth = res.size.width * this.singlePercent | |||
| }) | |||
| // #endif | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| .uv-album { | |||
| @include flex(column); | |||
| &__row { | |||
| @include flex(row); | |||
| flex-wrap: wrap; | |||
| &__wrapper { | |||
| position: relative; | |||
| &__text { | |||
| position: absolute; | |||
| top: 0; | |||
| left: 0; | |||
| right: 0; | |||
| bottom: 0; | |||
| background-color: rgba(0, 0, 0, 0.3); | |||
| @include flex(row); | |||
| justify-content: center; | |||
| align-items: center; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,88 @@ | |||
| { | |||
| "id": "uv-album", | |||
| "displayName": "uv-album 相册 全面兼容vue3+2、app、h5、小程序等多端", | |||
| "version": "1.0.4", | |||
| "description": "本组件提供一个类似相册的功能,让开发者开发起来更加得心应手,功能齐全,灵活配置可以,开箱即用。减少重复的模板代码", | |||
| "keywords": [ | |||
| "album", | |||
| "uv-ui", | |||
| "uvui", | |||
| "相册", | |||
| "图片" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools", | |||
| "uv-text" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,21 @@ | |||
| # Album 相册 | |||
| > **组件名:uv-album** | |||
| 本组件提供一个类似相册的功能,让开发者开发起来更加得心应手。 | |||
| 功能齐全,灵活配置可以,开箱即用。减少重复的模板代码。 | |||
| # <a href="https://www.uvui.cn/components/album.html" target="_blank">查看文档</a> | |||
| ## [下载完整示例项目](https://ext.dcloud.net.cn/plugin?name=uv-ui) <small>(请不要 下载插件ZIP)</small> | |||
| ### [更多插件,请关注uv-ui组件库](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| <a href="https://ext.dcloud.net.cn/plugin?name=uv-ui" target="_blank"> | |||
|  | |||
| </a> | |||
| #### 如使用过程中有任何问题反馈,或者您对uv-ui有一些好的建议,欢迎加入uv-ui官方交流群:<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,7 @@ | |||
| ## 1.0.2(2023-06-01) | |||
| 1. 修复点击触发两次实践的BUG | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-alert 警告提示组件 | |||
| @ -0,0 +1,45 @@ | |||
| export default { | |||
| props: { | |||
| // 显示文字 | |||
| title: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 主题,success/warning/info/error | |||
| type: { | |||
| type: String, | |||
| default: 'warning' | |||
| }, | |||
| // 辅助性文字 | |||
| description: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 是否可关闭 | |||
| closable: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 是否显示图标 | |||
| showIcon: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 浅或深色调,light-浅色,dark-深色 | |||
| effect: { | |||
| type: String, | |||
| default: 'light' | |||
| }, | |||
| // 文字是否居中 | |||
| center: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 字体大小 | |||
| fontSize: { | |||
| type: [String, Number], | |||
| default: 14 | |||
| }, | |||
| ...uni.$uv?.props?.alert | |||
| } | |||
| } | |||
| @ -0,0 +1,246 @@ | |||
| <template> | |||
| <uv-transition | |||
| mode="fade" | |||
| :show="show" | |||
| > | |||
| <view | |||
| class="uv-alert" | |||
| :class="[`uv-alert--${type}--${effect}`]" | |||
| @tap.stop="clickHandler" | |||
| :style="[$uv.addStyle(customStyle)]" | |||
| > | |||
| <view | |||
| class="uv-alert__icon" | |||
| v-if="showIcon" | |||
| > | |||
| <uv-icon | |||
| :name="iconName" | |||
| size="18" | |||
| :color="iconColor" | |||
| ></uv-icon> | |||
| </view> | |||
| <view | |||
| class="uv-alert__content" | |||
| :style="[{ | |||
| paddingRight: closable ? '20px' : 0 | |||
| }]" | |||
| > | |||
| <text | |||
| class="uv-alert__content__title" | |||
| v-if="title" | |||
| :style="[{ | |||
| fontSize: $uv.addUnit(fontSize), | |||
| textAlign: center ? 'center' : 'left' | |||
| }]" | |||
| :class="[effect === 'dark' ? 'uv-alert__text--dark' : `uv-alert__text--${type}--light`]" | |||
| >{{ title }}</text> | |||
| <text | |||
| class="uv-alert__content__desc" | |||
| v-if="description" | |||
| :style="[{ | |||
| fontSize: $uv.addUnit(fontSize), | |||
| textAlign: center ? 'center' : 'left' | |||
| }]" | |||
| :class="[effect === 'dark' ? 'uv-alert__text--dark' : `uv-alert__text--${type}--light`]" | |||
| >{{ description }}</text> | |||
| </view> | |||
| <view | |||
| class="uv-alert__close" | |||
| v-if="closable" | |||
| @tap.stop="closeHandler" | |||
| > | |||
| <uv-icon | |||
| name="close" | |||
| :color="iconColor" | |||
| size="15" | |||
| ></uv-icon> | |||
| </view> | |||
| </view> | |||
| </uv-transition> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import props from './props.js'; | |||
| /** | |||
| * Alert 警告提示 | |||
| * @description 警告提示,展现需要关注的信息。 | |||
| * @tutorial https://www.uvui.cn/components/alertTips.html | |||
| * | |||
| * @property {String} title 显示的文字 | |||
| * @property {String} type 使用预设的颜色 (默认 'warning' ) | |||
| * @property {String} description 辅助性文字,颜色比title浅一点,字号也小一点,可选 | |||
| * @property {Boolean} closable 关闭按钮(默认为叉号icon图标) (默认 false ) | |||
| * @property {Boolean} showIcon 是否显示左边的辅助图标 ( 默认 false ) | |||
| * @property {String} effect 多图时,图片缩放裁剪的模式 (默认 'light' ) | |||
| * @property {Boolean} center 文字是否居中 (默认 false ) | |||
| * @property {String | Number} fontSize 字体大小 (默认 14 ) | |||
| * @property {Object} customStyle 定义需要用到的外部样式 | |||
| * @event {Function} click 点击组件时触发 | |||
| * @example <uv-alert :title="title" type = "warning" :closable="closable" :description = "description"></uv-alert> | |||
| */ | |||
| export default { | |||
| name: 'uv-alert', | |||
| mixins: [mpMixin, mixin, props], | |||
| emits: ['click'], | |||
| data() { | |||
| return { | |||
| show: true | |||
| } | |||
| }, | |||
| computed: { | |||
| iconColor() { | |||
| return this.effect === 'light' ? this.type : '#fff' | |||
| }, | |||
| // 不同主题对应不同的图标 | |||
| iconName() { | |||
| switch (this.type) { | |||
| case 'success': | |||
| return 'checkmark-circle-fill'; | |||
| break; | |||
| case 'error': | |||
| return 'close-circle-fill'; | |||
| break; | |||
| case 'warning': | |||
| return 'error-circle-fill'; | |||
| break; | |||
| case 'info': | |||
| return 'info-circle-fill'; | |||
| break; | |||
| case 'primary': | |||
| return 'more-circle-fill'; | |||
| break; | |||
| default: | |||
| return 'error-circle-fill'; | |||
| } | |||
| } | |||
| }, | |||
| methods: { | |||
| // 点击内容 | |||
| clickHandler() { | |||
| this.$emit('click') | |||
| }, | |||
| // 点击关闭按钮 | |||
| closeHandler() { | |||
| this.show = false | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/color.scss'; | |||
| .uv-alert { | |||
| position: relative; | |||
| background-color: $uv-primary; | |||
| padding: 8px 10px; | |||
| @include flex(row); | |||
| align-items: center; | |||
| border-top-left-radius: 4px; | |||
| border-top-right-radius: 4px; | |||
| border-bottom-left-radius: 4px; | |||
| border-bottom-right-radius: 4px; | |||
| &--primary--dark { | |||
| background-color: $uv-primary; | |||
| } | |||
| &--primary--light { | |||
| background-color: #ecf5ff; | |||
| } | |||
| &--error--dark { | |||
| background-color: $uv-error; | |||
| } | |||
| &--error--light { | |||
| background-color: #FEF0F0; | |||
| } | |||
| &--success--dark { | |||
| background-color: $uv-success; | |||
| } | |||
| &--success--light { | |||
| background-color: #f5fff0; | |||
| } | |||
| &--warning--dark { | |||
| background-color: $uv-warning; | |||
| } | |||
| &--warning--light { | |||
| background-color: #FDF6EC; | |||
| } | |||
| &--info--dark { | |||
| background-color: $uv-info; | |||
| } | |||
| &--info--light { | |||
| background-color: #f4f4f5; | |||
| } | |||
| &__icon { | |||
| margin-right: 5px; | |||
| } | |||
| &__content { | |||
| @include flex(column); | |||
| flex: 1; | |||
| &__title { | |||
| color: $uv-main-color; | |||
| font-size: 14px; | |||
| font-weight: bold; | |||
| color: #fff; | |||
| margin-bottom: 2px; | |||
| } | |||
| &__desc { | |||
| color: $uv-main-color; | |||
| font-size: 14px; | |||
| flex-wrap: wrap; | |||
| color: #fff; | |||
| } | |||
| } | |||
| &__title--dark, | |||
| &__desc--dark { | |||
| color: #FFFFFF; | |||
| } | |||
| &__text--primary--light, | |||
| &__text--primary--light { | |||
| color: $uv-primary; | |||
| } | |||
| &__text--success--light, | |||
| &__text--success--light { | |||
| color: $uv-success; | |||
| } | |||
| &__text--warning--light, | |||
| &__text--warning--light { | |||
| color: $uv-warning; | |||
| } | |||
| &__text--error--light, | |||
| &__text--error--light { | |||
| color: $uv-error; | |||
| } | |||
| &__text--info--light, | |||
| &__text--info--light { | |||
| color: $uv-info; | |||
| } | |||
| &__close { | |||
| position: absolute; | |||
| top: 11px; | |||
| right: 10px; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,88 @@ | |||
| { | |||
| "id": "uv-alert", | |||
| "displayName": "uv-alert 警告提示 全面兼容小程序、nvue、vue2、vue3等多端", | |||
| "version": "1.0.2", | |||
| "description": "uv-alert 警告提示,展现需要关注的信息。灵活配置,功能齐全,兼容全端", | |||
| "keywords": [ | |||
| "alert", | |||
| "uvui", | |||
| "uv-ui", | |||
| "警告提示" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools", | |||
| "uv-transition", | |||
| "uv-icon" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,15 @@ | |||
| ## Alert 警告提示 | |||
| > **组件名:uv-alert** | |||
| 警告提示,展现需要关注的信息。 | |||
| 当某个页面需要向用户显示警告的信息时。 | |||
| 非浮层的静态展现形式,始终展现,不会自动消失,用户可以点击关闭。 | |||
| ### <a href="https://www.uvui.cn/components/alert.html" target="_blank">查看文档</a> | |||
| ### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| #### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,13 @@ | |||
| ## 1.0.5(2023-12-06) | |||
| 1. 优化 | |||
| ## 1.0.4(2023-12-06) | |||
| 1. 优化 | |||
| ## 1.0.3(2023-12-06) | |||
| 1. 阻止事件冒泡处理,单个头像模式 | |||
| ## 1.0.2(2023-12-06) | |||
| 1. 阻止事件冒泡处理 | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-avatar 头像组件 | |||
| @ -0,0 +1,53 @@ | |||
| export default { | |||
| props: { | |||
| // 头像图片组 | |||
| urls: { | |||
| type: Array, | |||
| default: () => [] | |||
| }, | |||
| // 最多展示的头像数量 | |||
| maxCount: { | |||
| type: [String, Number], | |||
| default: 5 | |||
| }, | |||
| // 头像形状 | |||
| shape: { | |||
| type: String, | |||
| default: 'circle' | |||
| }, | |||
| // 图片裁剪模式 | |||
| mode: { | |||
| type: String, | |||
| default: 'scaleToFill' | |||
| }, | |||
| // 超出maxCount时是否显示查看更多的提示 | |||
| showMore: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 头像大小 | |||
| size: { | |||
| type: [String, Number], | |||
| default: 40 | |||
| }, | |||
| // 指定从数组的对象元素中读取哪个属性作为图片地址 | |||
| keyName: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 头像之间的遮挡比例 | |||
| gap: { | |||
| type: [String, Number], | |||
| validator(value) { | |||
| return value >= 0 && value <= 1 | |||
| }, | |||
| default: 0.5 | |||
| }, | |||
| // 需额外显示的值 | |||
| extraValue: { | |||
| type: [Number, String], | |||
| default: 0 | |||
| }, | |||
| ...uni.$uv?.props?.avatarGroup | |||
| } | |||
| } | |||
| @ -0,0 +1,106 @@ | |||
| <template> | |||
| <view class="uv-avatar-group"> | |||
| <view | |||
| class="uv-avatar-group__item" | |||
| v-for="(item, index) in showUrl" | |||
| :key="index" | |||
| :style="{ | |||
| marginLeft: index === 0 ? 0 : $uv.addUnit(-size * gap) | |||
| }" | |||
| > | |||
| <uv-avatar | |||
| :size="size" | |||
| :shape="shape" | |||
| :mode="mode" | |||
| :src="$uv.test.object(item) ? keyName && item[keyName] || item.url : item" | |||
| ></uv-avatar> | |||
| <view | |||
| class="uv-avatar-group__item__show-more" | |||
| v-if="showMore && index === showUrl.length - 1 && (urls.length > maxCount || extraValue > 0)" | |||
| @tap="clickHandler" | |||
| > | |||
| <uv-text | |||
| color="#ffffff" | |||
| :size="size * 0.4" | |||
| :text="`+${extraValue || urls.length - showUrl.length}`" | |||
| align="center" | |||
| customStyle="justify-content: center" | |||
| ></uv-text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import props from './props.js'; | |||
| /** | |||
| * AvatarGroup 头像组 | |||
| * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。 | |||
| * @tutorial https://www.uvui.cn/components/avatar.html | |||
| * | |||
| * @property {Array} urls 头像图片组 (默认 [] ) | |||
| * @property {String | Number} maxCount 最多展示的头像数量 ( 默认 5 ) | |||
| * @property {String} shape 头像形状( 'circle' (默认) | 'square' ) | |||
| * @property {String} mode 图片裁剪模式(默认 'scaleToFill' ) | |||
| * @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true ) | |||
| * @property {String | Number} size 头像大小 (默认 40 ) | |||
| * @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址 | |||
| * @property {String | Number} gap 头像之间的遮挡比例(0.4代表遮挡40%) (默认 0.5 ) | |||
| * @property {String | Number} extraValue 需额外显示的值 | |||
| * @event {Function} showMore 头像组更多点击 | |||
| * @example <uv-avatar-group:urls="urls" size="35" gap="0.4" ></uv-avatar-group:urls=> | |||
| */ | |||
| export default { | |||
| name: 'uv-avatar-group', | |||
| mixins: [mpMixin, mixin, props], | |||
| data() { | |||
| return { | |||
| } | |||
| }, | |||
| computed: { | |||
| showUrl() { | |||
| return this.urls.slice(0, this.maxCount) | |||
| } | |||
| }, | |||
| methods: { | |||
| clickHandler() { | |||
| this.$emit('showMore') | |||
| } | |||
| }, | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/color.scss'; | |||
| .uv-avatar-group { | |||
| @include flex; | |||
| &__item { | |||
| margin-left: -10px; | |||
| position: relative; | |||
| &--no-indent { | |||
| // 如果你想质疑作者不会使用:first-child,说明你太年轻,因为nvue不支持 | |||
| margin-left: 0; | |||
| } | |||
| &__show-more { | |||
| position: absolute; | |||
| top: 0; | |||
| bottom: 0; | |||
| left: 0; | |||
| right: 0; | |||
| background-color: rgba(0, 0, 0, 0.3); | |||
| @include flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| border-radius: 100px; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,80 @@ | |||
| import { range } from '@/uni_modules/uv-ui-tools/libs/function/test.js' | |||
| export default { | |||
| props: { | |||
| // 头像图片路径(不能为相对路径) | |||
| src: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 头像形状,circle-圆形,square-方形 | |||
| shape: { | |||
| type: String, | |||
| default: 'circle' | |||
| }, | |||
| // 头像尺寸 | |||
| size: { | |||
| type: [String, Number], | |||
| default: 40 | |||
| }, | |||
| // 裁剪模式 | |||
| mode: { | |||
| type: String, | |||
| default: 'scaleToFill' | |||
| }, | |||
| // 显示的文字 | |||
| text: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 背景色 | |||
| bgColor: { | |||
| type: String, | |||
| default: '#c0c4cc' | |||
| }, | |||
| // 文字颜色 | |||
| color: { | |||
| type: String, | |||
| default: '#fff' | |||
| }, | |||
| // 文字大小 | |||
| fontSize: { | |||
| type: [String, Number], | |||
| default: 18 | |||
| }, | |||
| // 显示的图标 | |||
| icon: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 显示小程序头像,只对百度,微信,QQ小程序有效 | |||
| mpAvatar: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 是否使用随机背景色 | |||
| randomBgColor: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 加载失败的默认头像(组件有内置默认图片) | |||
| defaultUrl: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间 | |||
| colorIndex: { | |||
| type: [String, Number], | |||
| // 校验参数规则,索引在0-19之间 | |||
| validator(n) { | |||
| return range(n, [0, 19]) || n === '' | |||
| }, | |||
| default: '' | |||
| }, | |||
| // 组件标识符 | |||
| name: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| ...uni.$uv?.props?.avatar | |||
| } | |||
| } | |||
| @ -0,0 +1,175 @@ | |||
| <template> | |||
| <view | |||
| class="uv-avatar" | |||
| :class="[`uv-avatar--${shape}`]" | |||
| :style="[{ | |||
| backgroundColor: (text || icon) ? (randomBgColor ? colors[colorIndex !== '' ? colorIndex : $uv.random(0, 19)] : bgColor) : 'transparent', | |||
| width: $uv.addUnit(size), | |||
| height: $uv.addUnit(size), | |||
| }, $uv.addStyle(customStyle)]" | |||
| @tap="clickHandler" | |||
| > | |||
| <slot> | |||
| <!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU --> | |||
| <open-data | |||
| v-if="mpAvatar && allowMp" | |||
| type="userAvatarUrl" | |||
| :style="[{ | |||
| width: $uv.addUnit(size), | |||
| height: $uv.addUnit(size) | |||
| }]" | |||
| /> | |||
| <!-- #endif --> | |||
| <!-- #ifndef MP-WEIXIN && MP-QQ && MP-BAIDU --> | |||
| <template v-if="mpAvatar && allowMp"></template> | |||
| <!-- #endif --> | |||
| <uv-icon | |||
| v-else-if="icon" | |||
| :name="icon" | |||
| :size="fontSize" | |||
| :color="color" | |||
| ></uv-icon> | |||
| <uv-text | |||
| v-else-if="text" | |||
| :text="text" | |||
| :size="fontSize" | |||
| :color="color" | |||
| align="center" | |||
| customStyle="justify-content: center" | |||
| ></uv-text> | |||
| <image | |||
| class="uv-avatar__image" | |||
| v-else | |||
| :class="[`uv-avatar__image--${shape}`]" | |||
| :src="avatarUrl || defaultUrl" | |||
| :mode="mode" | |||
| @error="errorHandler" | |||
| :style="[{ | |||
| width: $uv.addUnit(size), | |||
| height: $uv.addUnit(size) | |||
| }]" | |||
| ></image> | |||
| </slot> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import props from './props.js'; | |||
| const base64Avatar = | |||
| "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; | |||
| /** | |||
| * Avatar 头像 | |||
| * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。 | |||
| * @tutorial https://www.uvui.cn/components/avatar.html | |||
| * | |||
| * @property {String} src 头像路径,如加载失败,将会显示默认头像(不能为相对路径) | |||
| * @property {String} shape 头像形状 ( circle (默认) | square) | |||
| * @property {String | Number} size 头像尺寸,可以为指定字符串(large, default, mini),或者数值 (默认 40 ) | |||
| * @property {String} mode 头像图片的裁剪类型,与uni的image组件的mode参数一致,如效果达不到需求,可尝试传widthFix值 (默认 'scaleToFill' ) | |||
| * @property {String} text 用文字替代图片,级别优先于src | |||
| * @property {String} bgColor 背景颜色,一般显示文字时用 (默认 '#c0c4cc' ) | |||
| * @property {String} color 文字颜色 (默认 '#ffffff' ) | |||
| * @property {String | Number} fontSize 文字大小 (默认 18 ) | |||
| * @property {String} icon 显示的图标 | |||
| * @property {Boolean} mpAvatar 显示小程序头像,只对百度,微信,QQ小程序有效 (默认 false ) | |||
| * @property {Boolean} randomBgColor 是否使用随机背景色 (默认 false ) | |||
| * @property {String} defaultUrl 加载失败的默认头像(组件有内置默认图片) | |||
| * @property {String | Number} colorIndex 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间 | |||
| * @property {String} name 组件标识符 (默认 'level' ) | |||
| * @property {Object} customStyle 定义需要用到的外部样式 | |||
| * | |||
| * @event {Function} click 点击组件时触发 index: 用户传递的标识符 | |||
| * @example <uv-avatar :src="src" mode="square"></uv-avatar> | |||
| */ | |||
| export default { | |||
| name: 'uv-avatar', | |||
| emits: ['click'], | |||
| mixins: [mpMixin, mixin, props], | |||
| data() { | |||
| return { | |||
| // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色 | |||
| colors: ['#ffb34b', '#f2bba9', '#f7a196', '#f18080', '#88a867', '#bfbf39', '#89c152', '#94d554', '#f19ec2', | |||
| '#afaae4', '#e1b0df', '#c38cc1', '#72dcdc', '#9acdcb', '#77b1cc', '#448aca', '#86cefa', '#98d1ee', | |||
| '#73d1f1', | |||
| '#80a7dc' | |||
| ], | |||
| avatarUrl: this.src, | |||
| allowMp: false | |||
| } | |||
| }, | |||
| watch: { | |||
| // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值 | |||
| // 而组件内部不能直接修改props的值,所以需要一个中间变量 | |||
| src: { | |||
| immediate: true, | |||
| handler(newVal) { | |||
| this.avatarUrl = newVal | |||
| // 如果没有传src,则主动触发error事件,用于显示默认的头像,否则src为''空字符等的时候,会无内容展示 | |||
| if(!newVal) { | |||
| this.errorHandler() | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| computed: { | |||
| imageStyle() { | |||
| const style = {} | |||
| return style | |||
| } | |||
| }, | |||
| created() { | |||
| this.init() | |||
| }, | |||
| methods: { | |||
| init() { | |||
| // 目前只有这几个小程序平台具有open-data标签 | |||
| // 其他平台可以通过uni.getUserInfo类似接口获取信息,但是需要弹窗授权(首次),不合符组件逻辑 | |||
| // 故目前自动获取小程序头像只支持这几个平台 | |||
| // #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU | |||
| this.allowMp = true | |||
| // #endif | |||
| }, | |||
| // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 | |||
| isImg() { | |||
| return this.src.indexOf('/') !== -1 | |||
| }, | |||
| // 图片加载时失败时触发 | |||
| errorHandler() { | |||
| this.avatarUrl = this.defaultUrl || base64Avatar | |||
| }, | |||
| clickHandler() { | |||
| this.$emit('click', this.name) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| .uv-avatar { | |||
| @include flex; | |||
| align-items: center; | |||
| justify-content: center; | |||
| &--circle { | |||
| border-radius: 100px; | |||
| } | |||
| &--square { | |||
| border-radius: 4px; | |||
| } | |||
| &__image { | |||
| &--circle { | |||
| border-radius: 100px; | |||
| } | |||
| &--square { | |||
| border-radius: 4px; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,89 @@ | |||
| { | |||
| "id": "uv-avatar", | |||
| "displayName": "uv-avatar 头像 全面兼容小程序、nvue、vue2、vue3等多端", | |||
| "version": "1.0.5", | |||
| "description": "uv-avatar 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。", | |||
| "keywords": [ | |||
| "uv-avatar", | |||
| "uvui", | |||
| "uv-ui", | |||
| "avatar", | |||
| "头像" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools", | |||
| "uv-icon", | |||
| "uv-text" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| ## Avatar 头像 | |||
| > **组件名:uv-avatar** | |||
| 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。 | |||
| ### <a href="https://www.uvui.cn/components/avatar.html" target="_blank">查看文档</a> | |||
| ### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| #### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,8 @@ | |||
| ## 1.0.2(2023-07-03) | |||
| 1. 优化插槽自定义内容部分 | |||
| 2. 增加backToTop方法说明 | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-back-top 返回顶部 | |||
| @ -0,0 +1,58 @@ | |||
| export default { | |||
| props: { | |||
| // 返回顶部的形状,circle-圆形,square-方形 | |||
| mode: { | |||
| type: String, | |||
| default: 'circle' | |||
| }, | |||
| // 自定义图标 | |||
| icon: { | |||
| type: String, | |||
| default: 'arrow-upward' | |||
| }, | |||
| // 提示文字 | |||
| text: { | |||
| type: String, | |||
| default: '' | |||
| }, | |||
| // 返回顶部滚动时间 | |||
| duration: { | |||
| type: [String, Number], | |||
| default: 100 | |||
| }, | |||
| // 滚动距离 | |||
| scrollTop: { | |||
| type: [String, Number], | |||
| default: 0 | |||
| }, | |||
| // 距离顶部多少距离显示,单位px | |||
| top: { | |||
| type: [String, Number], | |||
| default: 400 | |||
| }, | |||
| // 返回顶部按钮到底部的距离,单位px | |||
| bottom: { | |||
| type: [String, Number], | |||
| default: 100 | |||
| }, | |||
| // 返回顶部按钮到右边的距离,单位px | |||
| right: { | |||
| type: [String, Number], | |||
| default: 20 | |||
| }, | |||
| // 层级 | |||
| zIndex: { | |||
| type: [String, Number], | |||
| default: 9 | |||
| }, | |||
| // 图标的样式,对象形式 | |||
| iconStyle: { | |||
| type: Object, | |||
| default: () => ({ | |||
| color: '#909399', | |||
| fontSize: '19px' | |||
| }) | |||
| }, | |||
| ...uni.$uv?.props?.backtop | |||
| } | |||
| } | |||
| @ -0,0 +1,116 @@ | |||
| <template> | |||
| <uv-transition mode="fade" :customStyle="backTopStyle" :show="show"> | |||
| <slot> | |||
| <view class="uv-back-top" :style="[contentStyle]" @click="backToTop"> | |||
| <uv-icon :name="icon" :custom-style="iconStyle"></uv-icon> | |||
| <text v-if="text" class="uv-back-top__text">{{text}}</text> | |||
| </view> | |||
| </slot> | |||
| </uv-transition> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import props from './props.js'; | |||
| // #ifdef APP-NVUE | |||
| const dom = weex.requireModule('dom') | |||
| // #endif | |||
| /** | |||
| * backTop 返回顶部 | |||
| * @description 本组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。 | |||
| * @tutorial https://www.uvui.cn/components/backTop.html | |||
| * @property {String} mode 返回顶部的形状,circle-圆形,square-方形 (默认 'circle' ) | |||
| * @property {String} icon 自定义图标 (默认 'arrow-upward' ) 见官方文档示例 | |||
| * @property {String} text 提示文字 | |||
| * @property {String | Number} duration 返回顶部滚动时间 (默认 100) | |||
| * @property {String | Number} scrollTop 滚动距离 (默认 0 ) | |||
| * @property {String | Number} top 距离顶部多少距离显示,单位px (默认 400 ) | |||
| * @property {String | Number} bottom 返回顶部按钮到底部的距离,单位px (默认 100 ) | |||
| * @property {String | Number} right 返回顶部按钮到右边的距离,单位px (默认 20 ) | |||
| * @property {String | Number} zIndex 层级 (默认 9 ) | |||
| * @property {Object<Object>} iconStyle 图标的样式,对象形式 (默认 {color: '#909399',fontSize: '19px'}) | |||
| * @property {Object} customStyle 定义需要用到的外部样式 | |||
| * | |||
| * @example <uv-back-top :scrollTop="scrollTop"></uv-back-top> | |||
| */ | |||
| export default { | |||
| name: 'uv-back-top', | |||
| emits: ['click'], | |||
| mixins: [mpMixin, mixin, props], | |||
| computed: { | |||
| backTopStyle() { | |||
| // 动画组件样式 | |||
| const style = { | |||
| bottom: this.$uv.addUnit(this.bottom), | |||
| right: this.$uv.addUnit(this.right), | |||
| width: '40px', | |||
| height: '40px', | |||
| position: 'fixed', | |||
| zIndex: 10, | |||
| } | |||
| return style | |||
| }, | |||
| show() { | |||
| return this.$uv.getPx(this.scrollTop) > this.$uv.getPx(this.top) | |||
| }, | |||
| contentStyle() { | |||
| const style = {} | |||
| let radius = 0 | |||
| // 是否圆形 | |||
| if (this.mode === 'circle') { | |||
| radius = '100px' | |||
| } else { | |||
| radius = '4px' | |||
| } | |||
| // 为了兼容安卓nvue,只能这么分开写 | |||
| style.borderTopLeftRadius = radius | |||
| style.borderTopRightRadius = radius | |||
| style.borderBottomLeftRadius = radius | |||
| style.borderBottomRightRadius = radius | |||
| return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle)) | |||
| } | |||
| }, | |||
| methods: { | |||
| backToTop() { | |||
| // #ifdef APP-NVUE | |||
| if (!this.$parent.$refs['uv-back-top']) { | |||
| this.$uv.error(`nvue页面需要给页面最外层元素设置"ref='uv-back-top'`) | |||
| } | |||
| dom.scrollToElement(this.$parent.$refs['uv-back-top'], { | |||
| offset: 0 | |||
| }) | |||
| // #endif | |||
| // #ifndef APP-NVUE | |||
| uni.pageScrollTo({ | |||
| scrollTop: 0, | |||
| duration: this.duration | |||
| }); | |||
| // #endif | |||
| this.$emit('click') | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| $uv-back-top-flex: 1 !default; | |||
| $uv-back-top-height: 100% !default; | |||
| $uv-back-top-background-color: #E1E1E1 !default; | |||
| $uv-back-top-tips-font-size: 12px !default; | |||
| .uv-back-top { | |||
| @include flex; | |||
| flex-direction: column; | |||
| align-items: center; | |||
| flex: $uv-back-top-flex; | |||
| height: $uv-back-top-height; | |||
| justify-content: center; | |||
| background-color: $uv-back-top-background-color; | |||
| &__tips { | |||
| font-size: $uv-back-top-tips-font-size; | |||
| transform: scale(0.8); | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,89 @@ | |||
| { | |||
| "id": "uv-back-top", | |||
| "displayName": "uv-back-top 返回顶部 全面兼容小程序、nvue、vue2、vue3等多端", | |||
| "version": "1.0.2", | |||
| "description": "返回顶部 组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。", | |||
| "keywords": [ | |||
| "uv-back-top", | |||
| "uvui", | |||
| "uv-ui", | |||
| "avatar", | |||
| "返回顶部" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools", | |||
| "uv-icon", | |||
| "uv-transition" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| ## BackTop 返回顶部 | |||
| > **组件名:uv-back-top** | |||
| 该组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。 | |||
| ### <a href="https://www.uvui.cn/components/backTop.html" target="_blank">查看文档</a> | |||
| ### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| #### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,7 @@ | |||
| ## 1.0.2(2023-06-04) | |||
| 1. 修复type等属性为null的时候不显示徽标的BUG | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-badge 徽标数,数字角标 | |||
| @ -0,0 +1,73 @@ | |||
| export default { | |||
| props: { | |||
| // 是否显示圆点 | |||
| isDot: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 显示的内容 | |||
| value: { | |||
| type: [Number, String], | |||
| default: '' | |||
| }, | |||
| // 是否显示 | |||
| show: { | |||
| type: Boolean, | |||
| default: true | |||
| }, | |||
| // 最大值,超过最大值会显示 '{max}+' | |||
| max: { | |||
| type: [Number, String], | |||
| default: 999 | |||
| }, | |||
| // 主题类型,error|warning|success|primary | |||
| type: { | |||
| type: [String,undefined,null], | |||
| default: 'error' | |||
| }, | |||
| // 当数值为 0 时,是否展示 Badge | |||
| showZero: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 背景颜色,优先级比type高,如设置,type参数会失效 | |||
| bgColor: { | |||
| type: [String, null], | |||
| default: null | |||
| }, | |||
| // 字体颜色 | |||
| color: { | |||
| type: [String, null], | |||
| default: null | |||
| }, | |||
| // 徽标形状,circle-四角均为圆角,horn-左下角为直角 | |||
| shape: { | |||
| type: [String,undefined,null], | |||
| default: 'circle' | |||
| }, | |||
| // 设置数字的显示方式,overflow|ellipsis|limit | |||
| // overflow会根据max字段判断,超出显示`${max}+` | |||
| // ellipsis会根据max判断,超出显示`${max}...` | |||
| // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 | |||
| numberType: { | |||
| type: [String,undefined,null], | |||
| default: 'overflow' | |||
| }, | |||
| // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 | |||
| offset: { | |||
| type: Array, | |||
| default: () => [] | |||
| }, | |||
| // 是否反转背景和字体颜色 | |||
| inverted: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| // 是否绝对定位 | |||
| absolute: { | |||
| type: Boolean, | |||
| default: false | |||
| }, | |||
| ...uni.$uv?.props?.badge | |||
| } | |||
| } | |||
| @ -0,0 +1,176 @@ | |||
| <template> | |||
| <text | |||
| v-if="show && ((Number(value) === 0 ? showZero : true) || isDot)" | |||
| :class="[isDot ? 'uv-badge--dot' : 'uv-badge--not-dot', inverted && 'uv-badge--inverted', shape === 'horn' && 'uv-badge--horn', `uv-badge--${propsType}${inverted ? '--inverted' : ''}`]" | |||
| :style="[$uv.addStyle(customStyle), badgeStyle]" | |||
| class="uv-badge" | |||
| >{{ isDot ? '' :showValue }}</text> | |||
| </template> | |||
| <script> | |||
| import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js' | |||
| import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js' | |||
| import props from './props.js'; | |||
| /** | |||
| * badge 徽标数 | |||
| * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。 | |||
| * @tutorial https://www.uvui.cn/components/badge.html | |||
| * | |||
| * @property {Boolean} isDot 是否显示圆点 (默认 false ) | |||
| * @property {String | Number} value 显示的内容 | |||
| * @property {Boolean} show 是否显示 (默认 true ) | |||
| * @property {String | Number} max 最大值,超过最大值会显示 '{max}+' (默认999) | |||
| * @property {String} type 主题类型,error|warning|success|primary (默认 'error' ) | |||
| * @property {Boolean} showZero 当数值为 0 时,是否展示 Badge (默认 false ) | |||
| * @property {String} bgColor 背景颜色,优先级比type高,如设置,type参数会失效 | |||
| * @property {String} color 字体颜色 (默认 '#ffffff' ) | |||
| * @property {String} shape 徽标形状,circle-四角均为圆角,horn-左下角为直角 (默认 'circle' ) | |||
| * @property {String} numberType 设置数字的显示方式,overflow|ellipsis|limit (默认 'overflow' ) | |||
| * @property {Array}} offset 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 | |||
| * @property {Boolean} inverted 是否反转背景和字体颜色(默认 false ) | |||
| * @property {Boolean} absolute 是否绝对定位(默认 false ) | |||
| * @property {Object} customStyle 定义需要用到的外部样式 | |||
| * @example <uv-badge :type="type" :count="count"></uv-badge> | |||
| */ | |||
| export default { | |||
| name: 'uv-badge', | |||
| mixins: [mpMixin, mixin, props], | |||
| computed: { | |||
| // 是否将badge中心与父组件右上角重合 | |||
| boxStyle() { | |||
| let style = {}; | |||
| return style; | |||
| }, | |||
| // 整个组件的样式 | |||
| badgeStyle() { | |||
| const style = {} | |||
| if(this.color) { | |||
| style.color = this.color | |||
| } | |||
| if (this.bgColor && !this.inverted) { | |||
| style.backgroundColor = this.bgColor | |||
| } | |||
| if (this.absolute) { | |||
| style.position = 'absolute' | |||
| // 如果有设置offset参数 | |||
| if(this.offset.length) { | |||
| // top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top | |||
| const top = this.offset[0] | |||
| const right = this.offset[1] || top | |||
| style.top = this.$uv.addUnit(top) | |||
| style.right = this.$uv.addUnit(right) | |||
| } | |||
| } | |||
| return style | |||
| }, | |||
| showValue() { | |||
| switch (this.numberType) { | |||
| case "overflow": | |||
| return Number(this.value) > Number(this.max) ? this.max + "+" : this.value | |||
| break; | |||
| case "ellipsis": | |||
| return Number(this.value) > Number(this.max) ? "..." : this.value | |||
| break; | |||
| case "limit": | |||
| return Number(this.value) > 999 ? Number(this.value) >= 9999 ? | |||
| Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / | |||
| 1e3 * 100) / 100 + "k" : this.value | |||
| break; | |||
| default: | |||
| return Number(this.value) | |||
| } | |||
| }, | |||
| propsType(){ | |||
| return this.type || 'error' | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/components.scss'; | |||
| @import '@/uni_modules/uv-ui-tools/libs/css/color.scss'; | |||
| $uv-badge-primary: $uv-primary !default; | |||
| $uv-badge-error: $uv-error !default; | |||
| $uv-badge-success: $uv-success !default; | |||
| $uv-badge-info: $uv-info !default; | |||
| $uv-badge-warning: $uv-warning !default; | |||
| $uv-badge-dot-radius: 100px !default; | |||
| $uv-badge-dot-size: 8px !default; | |||
| $uv-badge-dot-right: 4px !default; | |||
| $uv-badge-dot-top: 0 !default; | |||
| $uv-badge-text-font-size: 11px !default; | |||
| $uv-badge-text-right: 10px !default; | |||
| $uv-badge-text-padding: 2px 5px !default; | |||
| $uv-badge-text-align: center !default; | |||
| $uv-badge-text-color: #FFFFFF !default; | |||
| .uv-badge { | |||
| border-top-right-radius: $uv-badge-dot-radius; | |||
| border-top-left-radius: $uv-badge-dot-radius; | |||
| border-bottom-left-radius: $uv-badge-dot-radius; | |||
| border-bottom-right-radius: $uv-badge-dot-radius; | |||
| @include flex; | |||
| line-height: $uv-badge-text-font-size; | |||
| text-align: $uv-badge-text-align; | |||
| font-size: $uv-badge-text-font-size; | |||
| color: $uv-badge-text-color; | |||
| &--dot { | |||
| height: $uv-badge-dot-size; | |||
| width: $uv-badge-dot-size; | |||
| } | |||
| &--inverted { | |||
| font-size: 13px; | |||
| } | |||
| &--not-dot { | |||
| padding: $uv-badge-text-padding; | |||
| } | |||
| &--horn { | |||
| border-bottom-left-radius: 0; | |||
| } | |||
| &--primary { | |||
| background-color: $uv-badge-primary; | |||
| } | |||
| &--primary--inverted { | |||
| color: $uv-badge-primary; | |||
| } | |||
| &--error { | |||
| background-color: $uv-badge-error; | |||
| } | |||
| &--error--inverted { | |||
| color: $uv-badge-error; | |||
| } | |||
| &--success { | |||
| background-color: $uv-badge-success; | |||
| } | |||
| &--success--inverted { | |||
| color: $uv-badge-success; | |||
| } | |||
| &--info { | |||
| background-color: $uv-badge-info; | |||
| } | |||
| &--info--inverted { | |||
| color: $uv-badge-info; | |||
| } | |||
| &--warning { | |||
| background-color: $uv-badge-warning; | |||
| } | |||
| &--warning--inverted { | |||
| color: $uv-badge-warning; | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,87 @@ | |||
| { | |||
| "id": "uv-badge", | |||
| "displayName": "uv-badge 徽标数,数字角标 全面兼容小程序、nvue、vue2、vue3等多端", | |||
| "version": "1.0.2", | |||
| "description": "徽标数一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。", | |||
| "keywords": [ | |||
| "uv-badge", | |||
| "uvui", | |||
| "uv-ui", | |||
| "徽标数", | |||
| "数字角标" | |||
| ], | |||
| "repository": "", | |||
| "engines": { | |||
| "HBuilderX": "^3.1.0" | |||
| }, | |||
| "dcloudext": { | |||
| "type": "component-vue", | |||
| "sale": { | |||
| "regular": { | |||
| "price": "0.00" | |||
| }, | |||
| "sourcecode": { | |||
| "price": "0.00" | |||
| } | |||
| }, | |||
| "contact": { | |||
| "qq": "" | |||
| }, | |||
| "declaration": { | |||
| "ads": "无", | |||
| "data": "插件不采集任何数据", | |||
| "permissions": "无" | |||
| }, | |||
| "npmurl": "" | |||
| }, | |||
| "uni_modules": { | |||
| "dependencies": [ | |||
| "uv-ui-tools" | |||
| ], | |||
| "encrypt": [], | |||
| "platforms": { | |||
| "cloud": { | |||
| "tcb": "y", | |||
| "aliyun": "y" | |||
| }, | |||
| "client": { | |||
| "Vue": { | |||
| "vue2": "y", | |||
| "vue3": "y" | |||
| }, | |||
| "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", | |||
| "飞书": "u", | |||
| "京东": "u" | |||
| }, | |||
| "快应用": { | |||
| "华为": "u", | |||
| "联盟": "u" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| ## Badge 徽标数 | |||
| > **组件名:uv-badge** | |||
| 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。 | |||
| ### <a href="https://www.uvui.cn/components/badge.html" target="_blank">查看文档</a> | |||
| ### [完整示例项目下载 | 关注更多组件](https://ext.dcloud.net.cn/plugin?name=uv-ui) | |||
| #### 如使用过程中有任何问题,或者您对uv-ui有一些好的建议,欢迎加入 uv-ui 交流群:<a href="https://ext.dcloud.net.cn/plugin?id=12287" target="_blank">uv-ui</a>、<a href="https://www.uvui.cn/components/addQQGroup.html" target="_blank">官方QQ群</a> | |||
| @ -0,0 +1,33 @@ | |||
| ## 1.0.15(2023-12-20) | |||
| 1. 优化 | |||
| ## 1.0.14(2023-12-06) | |||
| 1. 优化 | |||
| ## 1.0.13(2023-12-06) | |||
| 1. 阻止事件冒泡处理 | |||
| ## 1.0.12(2023-10-19) | |||
| 1. 增加后置插槽 | |||
| ## 1.0.11(2023-09-21) | |||
| 1. 修复通过customStyle修改按钮宽度,组件中最外层节点不改变的问题 | |||
| ## 1.0.10(2023-09-15) | |||
| 1. 按钮支持open-type="agreePrivacyAuthorization" | |||
| ## 1.0.9(2023-09-11) | |||
| 1. 增加参数iconSize,用于控制图标的大小 | |||
| ## 1.0.8(2023-09-10) | |||
| 1. 修复多个按钮在一行宽度不正常的BUG | |||
| ## 1.0.7(2023-09-07) | |||
| 1. 修复warning颜色对应错误的BUG | |||
| ## 1.0.6(2023-07-25) | |||
| 1. 增加customTextStyle属性,方便自定义文字样式 | |||
| ## 1.0.5(2023-07-20) | |||
| 1. 解决微信小程序动态设置hover-class点击态不消失的BUG | |||
| ## 1.0.4(2023-06-29) | |||
| 1. 修改上次更新出现nvue报错异常 | |||
| ## 1.0.3(2023-06-28) | |||
| 修复:设置open-type="chooseAvatar"等值不生效的BUG | |||
| ## 1.0.2(2023-06-01) | |||
| 1. 修复按钮点击触发两次的BUG | |||
| ## 1.0.1(2023-05-16) | |||
| 1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 | |||
| 2. 优化部分功能 | |||
| ## 1.0.0(2023-05-10) | |||
| uv-button 按钮 | |||
| @ -0,0 +1,46 @@ | |||
| $uv-button-active-opacity:0.75 !default; | |||
| $uv-button-loading-text-margin-left:4px !default; | |||
| $uv-button-text-color: #FFFFFF !default; | |||
| $uv-button-text-plain-error-color:$uv-error !default; | |||
| $uv-button-text-plain-warning-color:$uv-warning !default; | |||
| $uv-button-text-plain-success-color:$uv-success !default; | |||
| $uv-button-text-plain-info-color:$uv-info !default; | |||
| $uv-button-text-plain-primary-color:$uv-primary !default; | |||
| .uv-button { | |||
| &--active { | |||
| opacity: $uv-button-active-opacity; | |||
| } | |||
| &--active--plain { | |||
| background-color: rgb(217, 217, 217); | |||
| } | |||
| &__loading-text { | |||
| margin-left:$uv-button-loading-text-margin-left; | |||
| } | |||
| &__text, | |||
| &__loading-text { | |||
| color:$uv-button-text-color; | |||
| } | |||
| &__text--plain--error { | |||
| color:$uv-button-text-plain-error-color; | |||
| } | |||
| &__text--plain--warning { | |||
| color:$uv-button-text-plain-warning-color; | |||
| } | |||
| &__text--plain--success{ | |||
| color:$uv-button-text-plain-success-color; | |||
| } | |||
| &__text--plain--info { | |||
| color:$uv-button-text-plain-info-color; | |||
| } | |||
| &__text--plain--primary { | |||
| color:$uv-button-text-plain-primary-color; | |||
| } | |||
| } | |||