diff --git a/changelog.md b/changelog.md index 9575c32e1e9d77855c9efc37b5f934c917dcbe94..a35f33f1fe2fa286ce68f0fcc411030056d239aa 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +## 1.1.25(2021-12-09) +修复H5端在about页面,返回触发`uniShare.hide()`引发报错 ## 1.1.24(2021-11-29) - 新增注销用户账号的功能 - 修复在某些情况下,签到不连续7天,也获得60积分的问题 diff --git a/package.json b/package.json index e120ebba6e9a01ce2bb04a49dcf21aacfbc9c3d5..208bc6f5a3af189cddf8b8ba950d962119888956 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-starter", "displayName": "uni-starter", - "version": "1.1.24", + "version": "1.1.25", "description": "云端一体应用快速开发基本项目模版", "keywords": [ "login", diff --git a/pages/list/list.nvue b/pages/list/list.nvue index 305528ec341e4ecbb486be8b162e3cada3840f8f..1c8e0b3375be5978d2b15ba4d4af456c2fb2e15f 100644 --- a/pages/list/list.nvue +++ b/pages/list/list.nvue @@ -19,7 +19,7 @@ - + @@ -99,8 +99,7 @@ async onReady() { // #ifdef APP-NVUE /* 可用窗口高度 - 搜索框高 - 状态栏高 */ - this.listHight = uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50 + - 'px'; + this.listHight = uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50 + 'px'; // #endif // #ifndef APP-NVUE this.listHight = 'auto' diff --git a/pages/ucenter/about/about.vue b/pages/ucenter/about/about.vue index 23e6c506fdbe8221d77382874232867701f80f11..72637e39227850a4c93f4de38f9c1ccd14bf1ed3 100644 --- a/pages/ucenter/about/about.vue +++ b/pages/ucenter/about/about.vue @@ -19,17 +19,21 @@ - diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.css b/uni_modules/uni-icons/components/uni-icons/uniicons.css new file mode 100644 index 0000000000000000000000000000000000000000..2f56eabde99bc0e9e6407f04d334cce06c059c78 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uniicons.css @@ -0,0 +1,663 @@ +.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-gift-filled:before { + content: "\e6c4"; +} + +.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-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrowthinright:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrowthinleft:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrowthinup:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthindown:before { + content: "\e6be"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowdown:before { + content: "\e6b8"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-arrowright:before { + content: "\e6b5"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-arrowup:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowleft:before { + content: "\e6b7"; +} + +.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-cart-filled:before { + content: "\e629"; +} + +.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"; +} diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf new file mode 100644 index 0000000000000000000000000000000000000000..835f33bc9411461b8b9046b3fec742e921d6ce3a Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json index 2dd573c33660384ec45e4348daba8bae9b3ac87e..26ea69831abeee9926a0906a32198e93bf856a00 100644 --- a/uni_modules/uni-icons/package.json +++ b/uni_modules/uni-icons/package.json @@ -1,7 +1,7 @@ { "id": "uni-icons", "displayName": "uni-icons 图标", - "version": "1.2.1", + "version": "1.3.2", "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", "keywords": [ "uni-ui", @@ -11,7 +11,7 @@ ], "repository": "https://github.com/dcloudio/uni-ui", "engines": { - "HBuilderX": "" + "HBuilderX": "^3.2.14" }, "directories": { "example": "../../temps/example_temps" @@ -40,7 +40,7 @@ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" }, "uni_modules": { - "dependencies": [], + "dependencies": ["uni-scss"], "encrypt": [], "platforms": { "cloud": { diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md index efc0a970a4ed3feabd818a67d3f249704079504b..86234ba1ce8b8fbfa52c3f08ba6c5847f1934807 100644 --- a/uni_modules/uni-icons/readme.md +++ b/uni_modules/uni-icons/readme.md @@ -1,64 +1,8 @@ - - ## Icons 图标 > **组件名:uni-icons** > 代码块: `uIcons` - 用于展示 icons 图标 。 -### 安装方式 - -本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。 - -如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55) - -### 基本用法 - -在 ``template`` 中使用组件 - -```html - -``` - -### 扩展图标用法 - -1. 需要自行在项目 App.vue 中引入 css 图标扩展库(注意: css 图标库引用的 .ttf 文件路径是否正确) - - ```html - - ``` -2. 在 ``template`` 中使用组件 - - ```html - - ``` - - - - -## API - -### Icons Props - -|属性名 |类型 |默认值 |说明 | -|:-: |:-: |:-: |:-: | -|size |Number |24 |图标大小 | -|type |String |- |图标图案,参考示例 | -|color |String |- |图标颜色 | -|font-family(仅 vue 支持) |String |uniicons |图标库字体家族 | - - -### Icons Events -|事件名 |说明 |返回值| -|:-: |:-: |:-: | -|@click|点击 Icon 触发事件|- | - - - -## 组件示例 - -点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons](https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons) \ No newline at end of file +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/uni_modules/uni-id-cf/changelog.md b/uni_modules/uni-id-cf/changelog.md index 634254e90581bf0f83faf856ef853165b2a4aa75..009cb677d752f78faaf22c31231aa311504c7ede 100644 --- a/uni_modules/uni-id-cf/changelog.md +++ b/uni_modules/uni-id-cf/changelog.md @@ -1,3 +1,5 @@ +## 1.0.9(2021-12-01) +- 新增 uni-admin 用户标签管理接口 managerTags ## 1.0.8(2021-11-29) 新增 `closeAccount`注销账号 ## 1.0.7(2021-10-20) diff --git a/uni_modules/uni-id-cf/package.json b/uni_modules/uni-id-cf/package.json index 21af924d2e3550957bee086b132f8f12f117072b..725be01c2ffbed6c69ebd56bf471ae9326f888b9 100644 --- a/uni_modules/uni-id-cf/package.json +++ b/uni_modules/uni-id-cf/package.json @@ -1,7 +1,7 @@ { "id": "uni-id-cf", "displayName": "uni-id-cf", - "version": "1.0.8", + "version": "1.0.9", "description": "uni-id-cf", "keywords": [ "uni-id-cf", diff --git a/uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js b/uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js index fd9b97fc66d70cf3ce35e0263a1b504ade7a3c62..964fd25d273de9de0724164feffccfdfe1670f00 100644 --- a/uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js +++ b/uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js @@ -99,10 +99,10 @@ exports.main = async (event, context) => { create_date: now }; - if(res.code === 0){ + if (res.code === 0) { logData.user_id = res.uid logData.state = 1 - if(res.userInfo&&res.userInfo.password){ + if (res.userInfo && res.userInfo.password) { delete res.userInfo.password } if (res.type == 'register') { @@ -119,7 +119,7 @@ exports.main = async (event, context) => { }).update(deviceInfo) } } - }else{ + } else { logData.state = 0 } return await uniIdLogCollection.add(logData) @@ -128,13 +128,15 @@ exports.main = async (event, context) => { let res = {} switch (action) { //根据action的值执行对应的操作 case 'refreshSessionKey': - let getSessionKey = await uniID.code2SessionWeixin({code:params.code}); - if(getSessionKey.code){ + let getSessionKey = await uniID.code2SessionWeixin({ + code: params.code + }); + if (getSessionKey.code) { return getSessionKey } - res = await uniID.updateUser({ + res = await uniID.updateUser({ uid: params.uid, - sessionKey:getSessionKey.sessionKey + sessionKey: getSessionKey.sessionKey }) console.log(res); break; @@ -144,7 +146,7 @@ exports.main = async (event, context) => { uid: params.uid, field: ['sessionKey'] }) - if(getSessionKeyRes.code){ + if (getSessionKeyRes.code) { return getSessionKeyRes } let sessionKey = getSessionKeyRes.userInfo.sessionKey @@ -154,7 +156,7 @@ exports.main = async (event, context) => { sessionKey }) console.log(res); - if(res.code){ + if (res.code) { return res } res = await uniID.bindMobile({ @@ -266,49 +268,60 @@ exports.main = async (event, context) => { break; case 'loginByWeixin': let loginRes = await uniID.loginByWeixin(params); - if(loginRes.code===0){ + if (loginRes.code === 0) { //用户完善资料(昵称、头像) - if(context.PLATFORM == "app-plus" && !loginRes.userInfo.nickname){ - let {accessToken:access_token,openid} = loginRes, - {appid,appsecret:secret} = uniIdConfig['app-plus'].oauth.weixin; + if (context.PLATFORM == "app-plus" && !loginRes.userInfo.nickname) { + let { + accessToken: access_token, + openid + } = loginRes, { + appid, + appsecret: secret + } = uniIdConfig['app-plus'].oauth.weixin; let wxRes = await uniCloud.httpclient.request( `https://api.weixin.qq.com/sns/userinfo?access_token=${access_token}&openid=${openid}&scope=snsapi_userinfo&appid=${appid}&secret=${secret}`, { method: 'POST', contentType: 'json', // 指定以application/json发送data内的数据 dataType: 'json' // 指定返回值为json格式,自动进行parse }) - if(wxRes.status == 200){ - let {nickname,headimgurl} = wxRes.data; - let headimgurlFile = {},cloudPath = loginRes.uid+'/'+Date.now()+"headimgurl.jpg"; + if (wxRes.status == 200) { + let { + nickname, + headimgurl + } = wxRes.data; + let headimgurlFile = {}, + cloudPath = loginRes.uid + '/' + Date.now() + "headimgurl.jpg"; let getImgBuffer = await uniCloud.httpclient.request(headimgurl) - if(getImgBuffer.status == 200){ - let {fileID} = await uniCloud.uploadFile({ - cloudPath, - fileContent: getImgBuffer.data + if (getImgBuffer.status == 200) { + let { + fileID + } = await uniCloud.uploadFile({ + cloudPath, + fileContent: getImgBuffer.data }); headimgurlFile = { - name:cloudPath, - extname:"jpg", - url:fileID + name: cloudPath, + extname: "jpg", + url: fileID } - }else{ + } else { return getImgBuffer } await uniID.updateUser({ uid: loginRes.uid, nickname, - avatar_file:headimgurlFile + avatar_file: headimgurlFile }) loginRes.userInfo.nickname = nickname; loginRes.userInfo.avatar_file = headimgurlFile; - }else{ + } else { return wxRes } } - if(context.PLATFORM == "mp-weixin"){ - let resUpdateUser = await uniID.updateUser({ + if (context.PLATFORM == "mp-weixin") { + let resUpdateUser = await uniID.updateUser({ uid: loginRes.uid, - sessionKey:loginRes.sessionKey + sessionKey: loginRes.sessionKey }) console.log(resUpdateUser); } @@ -443,10 +456,12 @@ exports.main = async (event, context) => { uid: params.uid }) } - break; - case 'closeAccount': - console.log(params.uid,'-----------------------'); - res = await uniID.closeAccount({uid:params.uid}); + break; + case 'closeAccount': + console.log(params.uid, '-----------------------'); + res = await uniID.closeAccount({ + uid: params.uid + }); break; // =========================== admin api start ========================= @@ -571,6 +586,32 @@ exports.main = async (event, context) => { ...params }) break; + case 'managerMultiTag': + let { + ids, type, value + } = params + if (type === 'add') { + res = await db.collection('uni-id-users').where({ + _id: dbCmd.in(ids) + }).update({ + tags: dbCmd.addToSet({ + $each: value + }) + }) + } else if (type === 'del') { + res = await db.collection('uni-id-users').where({ + _id: dbCmd.in(ids) + }).update({ + tags: dbCmd.pull(dbCmd.in(value)) + }) + } else { + res = { + code: 403, + msg: '无效操作' + } + return + } + break; // =========================== admin api end ========================= default: res = { @@ -581,4 +622,4 @@ exports.main = async (event, context) => { } //返回数据给客户端 return res -} +} diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md index 99454baa0b20886272b2bd4010481e5d35f12820..a5d6a798e808aeec2251926d012e6ff9f13aeffb 100644 --- a/uni_modules/uni-popup/changelog.md +++ b/uni_modules/uni-popup/changelog.md @@ -1,37 +1,44 @@ -## 1.6.2(2021-08-24) -- 新增 支持国际化 -## 1.6.1(2021-07-30) -- 优化 vue3下事件警告的问题 -## 1.6.0(2021-07-13) -- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) -## 1.5.0(2021-06-23) -- 新增 mask-click 遮罩层点击事件 -## 1.4.5(2021-06-22) -- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug -## 1.4.4(2021-06-18) -- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug -## 1.4.3(2021-06-08) -- 修复 错误的 watch 字段 -- 修复 safeArea 属性不生效的问题 -- 修复 点击内容,再点击遮罩无法关闭的Bug -## 1.4.2(2021-05-12) -- 新增 组件示例地址 -## 1.4.1(2021-04-29) -- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 -## 1.4.0 (2021-04-29) -- 新增 type 属性的 left\right 值,支持左右弹出 -- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 -- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 -- 新增 safeArea 属性,是否适配底部安全区 -- 修复 App\h5\微信小程序底部安全区占位不对的Bug -- 修复 App 端弹出等待的Bug -- 优化 提升低配设备性能,优化动画卡顿问题 -- 优化 更简单的组件自定义方式 -## 1.2.9(2021-02-05) -- 优化 组件引用关系,通过uni_modules引用组件 -## 1.2.8(2021-02-05) -- 调整为uni_modules目录规范 -## 1.2.7(2021-02-05) -- 调整为uni_modules目录规范 -- 新增 支持 PC 端 -- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.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-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue index 7c8a0d3122c21aa3a5c02b7c09f3325fb06654d8..aeeb3efdcd69883c5ee73efc57660855897eb49a 100644 --- a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue +++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -165,7 +165,7 @@ - -``` - - -如果使用 `styles` 注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red` - -```html - - -``` - -### 自定义动画 -当内置动画类型不能满足需求的时候 ,可以使用 `step()` 和 `run()` 自定义动画,入参以及具体用法参考下方属性说明 - -`init()` 方法可以覆盖默认配置 - - -```html - - - -``` - - -## API - -### Transition Props - -|属性名 |类型 |默认值 |说明 | -|:-: |:-: |:-: |:-:| -|show |Boolean|false |控制组件显示或隐藏 | -|mode-class |Array/String |- |内置过渡动画类型 | -|custom-class |String |- |自定义类名 | -|duration |Number |300 |过渡动画持续时间 | -|styles |Object |- |组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red` | - -#### mode-class 内置过渡动画类型说明 -**格式为** :`'fade'` 或者 `['fade','slide-top']` - -|属性名 |说明 | -|:-: |:-: | -|fade |渐隐渐出过渡 | -|slide-top |由上至下过渡 | -|slide-right |由右至左过渡 | -|slide-bottom |由下至上过渡 | -|slide-left |由左至右过渡 | -|zoom-in |由小到大过渡 | -|zoom-out |由大到小过渡 | - -**注意** - -组合使用时,同一种类型相反的过渡动画如(slide-top、slide-bottom)同时使用时,只有最后一个生效 - -### Transition Events - -|事件名 |说明 |返回值 | -|:-: |:-: |:-: | -|click |点击组件触发 |- | -|change |过渡动画结束时触发 | e = {detail:true} | - -### Transition Methons - -|方法名|说明|参数| -|:-:|:-:|:-:| -|init()|手动初始化配置|Function(OBJECT:config)| -|step()|动画队列|Function(OBJECT:type,OBJECT:config)| -|run()|执行动画|Function(FUNCTION:callback) | - -### init(OBJECT:config) -**通过 ref 调用方法** - -手动设置动画配置,需要在页面渲染完毕后调用 - -```javascript -this.$refs.ani.init({ - duration: 1000, - timingFunction:'ease', - delay:500, - transformOrigin:'left center' -}) -``` - -### step(OBJECT:type,OBJECT:config) 动画队列 -**通过 ref 调用方法** - -调用 `step()` 来表示一组动画完成,`step` 第一个参数可以传入任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。`step` 第二个参数可以传入一个跟 `uni.createAnimation()` 一样的配置参数用于指定当前组动画的配置。 - -Tips -- 第一个参数支持的动画参考下面的 `支持的动画` -- 第二个参数参考下面的 `动画配置`,可省略,如果省略继承`init`的配置 - - -```javascript -this.$refs.ani.step({ - translateX: '100px' -},{ - duration: 1000, - timingFunction:'ease', - delay:500, - transformOrigin:'left center' -}) -``` - -### run(FUNCTION:callback) 执行动画 -**通过 ref 调用方法** - -在执行 `step()` 后,需要调用 `run()` 来运行动画 ,否则动画会一直等待 - -`run()` 方法可以传入一个 `callback` 函数 ,会在所有动画执行完毕后回调 - -```javascript -this.$refs.ani.step({ - translateX: '100px' -}) -this.$refs.ani.run(()=>{ - console.log('动画执行完毕') -}) - -``` - -### 动画配置 -动画配置 , `init()` 与 `step()` 第二个参数配置相同 ,如果配置`step() `第二个参数,将会覆盖 `init()` 的配置 - -|属性名|值|必填|默认值|说明|平台差异| -|:-:|:-:|:-:|:-:|:-:|:-:| -|duration|Number|否|400|动画持续时间,单位ms|-| -|timingFunction|String|否|"linear"|定义动画的效果|-| -|delay|Number|否|0|动画延迟时间,单位 ms|-| -|needLayout|Boolean|否|false |动画执行是否影响布局|仅 nvue 支持| -|transformOrigin|String |否|"center center"|设置 [transform-origin](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin)|-| - - -### timingFunction 属性说明 - -|值|说明|平台差异| -|:-:|:-:|:-:| -|linear|动画从头到尾的速度是相同的|-| -|ease|动画以低速开始,然后加快,在结束前变慢|-| -|ease-in| 动画以低速开始|-| -|ease-in-out| 动画以低速开始和结束|-| -|ease-out|动画以低速结束|-| -|step-start|动画第一帧就跳至结束状态直到结束|nvue不支持| -|step-end|动画一直保持开始状态,最后一帧跳到结束状态|nvue不支持| - -```javascript -// init 配置 -this.$refs.ani.init({ - duration: 1000, - timingFunction:'ease', - delay:500, - transformOrigin:'left center' -}) -// step 配置 -this.$refs.ani.step({ - translateX: '100px' -},{ - duration: 1000, - timingFunction:'ease', - delay:500, - transformOrigin:'left center' -}) -``` - -### 支持的动画 -动画方法 - -如果同一个动画方法有多个值,多个值使用数组分隔 - -```javascript -this.$refs.ani.step({ - width:'100px', - scale: [1.2,0.8], -}) -``` - -**样式:** - -|属性名|值|说明|平台差异| -|:-:|:-:|:-:|:-:| -|opacity|value|透明度,参数范围 0~1|-| -|backgroundColor|color|颜色值|-| -|width|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|-| -|height|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|-| -|top|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持| -|left|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持| -|bottom|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持| -|right|length|长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值|nvue 不支持| - -```javascript -this.$refs.ani.step({ - opacity: 1, - backgroundColor: '#ff5a5f', - widht:'100px', - height:'50rpx', -}) -``` - -**旋转:** - -旋转属性的值不需要填写单位 - -|属性名|值|说明|平台差异 | -|:-:|:-:|:-:|:-:| -|rotate|deg|deg的范围-180~180,从原点顺时针旋转一个deg角度 |-| -|rotateX|deg|deg的范围-180~180,在X轴旋转一个deg角度 |-| -|rotateY|deg|deg的范围-180~180,在Y轴旋转一个deg角度 |-| -|rotateZ|deg|deg的范围-180~180,在Z轴旋转一个deg角度 |nvue不支持| -|rotate3d|x,y,z,deg| 同 [transform-function rotate3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d()) |nvue不支持| - -```javascript -this.$refs.ani.step({ - rotateX: 45, - rotateY: 45 -}) -``` - -**缩放:** - -|属性名|值|说明|平台差异| -|:-:|:-:|:-: |:-:| -|scale|sx,[sy]|一个参数时,表示在X轴、Y轴同时缩放sx倍数;两个参数时表示在X轴缩放sx倍数,在Y轴缩放sy倍数|-| -|scaleX|sx|在X轴缩放sx倍数|-| -|scaleY|sy|在Y轴缩放sy倍数|-| -|scaleZ|sz|在Z轴缩放sy倍数|nvue不支持| -|scale3d|sx,sy,sz|在X轴缩放sx倍数,在Y轴缩放sy倍数,在Z轴缩放sz倍数|nvue不支持| - -```javascript -this.$refs.ani.step({ - scale: [1.2,0.8] -}) -``` - -**偏移:** - -|属性名|值|说明|平台差异| -|:-:|:-:|:-:|:-:| -|translate|tx,[ty]|一个参数时,表示在X轴偏移tx,单位px;两个参数时,表示在X轴偏移tx,在Y轴偏移ty,单位px。|-| -|translateX|tx| 在X轴偏移tx,单位px|-| -|translateY|ty| 在Y轴偏移tx,单位px|-| -|translateZ|tz| 在Z轴偏移tx,单位px|nvue不支持| -|translate3d|tx,ty,tz| 在X轴偏移tx,在Y轴偏移ty,在Z轴偏移tz,单位px|nvue不支持| - -```javascript -this.$refs.ani.step({ - translateX: '100px' -}) -``` - - - -## 组件示例 - -点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition](https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition) \ No newline at end of file + + +## Transition 过渡动画 +> **组件名:uni-transition** +> 代码块: `uTransition` + + +元素过渡动画 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file