From 0f09d4fbb6d0e1d715222dc380620c0729b7eaa8 Mon Sep 17 00:00:00 2001
From: anne-lxm <1076217653@qq.com>
Date: Fri, 9 Sep 2022 17:54:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 1 +
pages.json | 20 +++-
uni_modules/uni-badge/changelog.md | 2 +
.../components/uni-badge/uni-badge.vue | 14 +--
uni_modules/uni-badge/package.json | 13 +--
uni_modules/uni-data-picker/changelog.md | 4 +
.../uni-data-picker/uni-data-picker.vue | 28 ++++--
uni_modules/uni-data-picker/package.json | 5 +-
uni_modules/uni-datetime-picker/changelog.md | 4 +
.../uni-datetime-picker/calendar.vue | 7 +-
.../uni-datetime-picker.vue | 3 +-
uni_modules/uni-datetime-picker/package.json | 11 +--
uni_modules/uni-fab/changelog.md | 4 +
.../uni-fab/components/uni-fab/uni-fab.vue | 16 ++-
uni_modules/uni-fab/package.json | 11 +--
uni_modules/uni-forms/changelog.md | 10 ++
.../uni-forms-item/uni-forms-item.vue | 22 +++--
uni_modules/uni-forms/package.json | 14 ++-
uni_modules/uni-id/changelog.md | 6 ++
uni_modules/uni-id/package.json | 11 +--
.../cloudfunctions/common/uni-id/index.js | 2 +-
.../cloudfunctions/common/uni-id/package.json | 2 +-
uni_modules/uni-notice-bar/changelog.md | 2 +
.../uni-notice-bar/uni-notice-bar.vue | 67 +++++++++----
uni_modules/uni-notice-bar/package.json | 11 +--
uni_modules/uni-pagination/changelog.md | 2 +
.../components/uni-pagination/i18n/en.json | 3 +-
.../components/uni-pagination/i18n/es.json | 3 +-
.../components/uni-pagination/i18n/fr.json | 3 +-
.../uni-pagination/i18n/zh-Hans.json | 3 +-
.../uni-pagination/i18n/zh-Hant.json | 3 +-
.../uni-pagination/uni-pagination.vue | 60 +++++++++++-
uni_modules/uni-pagination/package.json | 2 +-
uni_modules/uni-pagination/readme.md | 2 -
.../uni-upgrade-center-app/changelog.md | 6 +-
.../uni-upgrade-center-app/package.json | 14 ++-
.../pages/upgrade-popup.vue | 66 ++++++++++---
uni_modules/uni-upgrade-center-app/readme.md | 10 +-
.../uniCloud/cloudfunctions/temp.png | Bin 0 -> 7644 bytes
.../utils/call-check-version.js | 25 ++---
uni_modules/uni-upgrade-center/changelog.md | 7 ++
uni_modules/uni-upgrade-center/package.json | 6 +-
.../pages/components/show-info.vue | 6 +-
.../pages/mixin/version_add_detail_mixin.js | 40 +++++++-
.../uni-upgrade-center/pages/version/add.vue | 92 +++++++++++++++---
.../pages/version/detail.vue | 65 ++++++++-----
.../uni-upgrade-center/pages/version/list.vue | 38 +++++++-
uni_modules/uni-upgrade-center/readme.md | 40 ++++----
48 files changed, 572 insertions(+), 214 deletions(-)
create mode 100644 uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/temp.png
diff --git a/.gitignore b/.gitignore
index 4960744..82fde9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/coverage/
/android/
/mp-weixin/
+/manifest.json
diff --git a/pages.json b/pages.json
index 7473b51..b9ff26d 100644
--- a/pages.json
+++ b/pages.json
@@ -182,7 +182,25 @@
"enablePullDownRefresh": false
}
}
- ],
+ ,{
+ "path": "uni_modules/uni-upgrade-center/pages/version/list",
+ "style": {
+ "navigationBarTitleText": "版本列表"
+ }
+}
+,{
+ "path": "uni_modules/uni-upgrade-center/pages/version/add",
+ "style": {
+ "navigationBarTitleText": "新版发布"
+ }
+}
+,{
+ "path": "uni_modules/uni-upgrade-center/pages/version/detail",
+ "style": {
+ "navigationBarTitleText": "版本信息查看"
+ }
+}
+],
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#1296db",
diff --git a/uni_modules/uni-badge/changelog.md b/uni_modules/uni-badge/changelog.md
index 544ecc1..56581c4 100644
--- a/uni_modules/uni-badge/changelog.md
+++ b/uni_modules/uni-badge/changelog.md
@@ -1,3 +1,5 @@
+## 1.2.1(2022-09-05)
+- 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
## 1.2.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-badge](https://uniapp.dcloud.io/component/uniui/uni-badge)
diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
index 1981b4e..498bb1c 100644
--- a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
+++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
@@ -1,7 +1,7 @@
- {{displayValue}}
@@ -130,16 +130,13 @@
const match = whiteList[this.absolute]
return match ? match : whiteList['rightTop']
},
- badgeWidth() {
- return {
- width: `${this.width}px`
- }
- },
dotStyle() {
if (!this.isDot) return {}
return {
width: '10px',
+ minWidth: '0',
height: '10px',
+ padding: '0',
borderRadius: '10px'
}
},
@@ -160,7 +157,7 @@
};
-
diff --git a/uni_modules/uni-upgrade-center/pages/version/detail.vue b/uni_modules/uni-upgrade-center/pages/version/detail.vue
index 7dee38f..e3e9f05 100644
--- a/uni_modules/uni-upgrade-center/pages/version/detail.vue
+++ b/uni_modules/uni-upgrade-center/pages/version/detail.vue
@@ -11,7 +11,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -46,24 +46,28 @@
{{Number(appFileList.size / 1024 / 1024).toFixed(2)}}M
-
-
-
+
+
+
+
-
-
-
+
-
-
+
@@ -92,7 +96,6 @@
validator,
enumConverter
} from '@/uni_modules/uni-upgrade-center/js_sdk/validator/opendb-app-versions.js';
- import showInfo from '../components/show-info.vue'
import addAndDetail, {
fields
} from '../mixin/version_add_detail_mixin.js'
@@ -100,6 +103,7 @@
deepClone,
appVersionListDbName
} from '../utils.js'
+ import showInfo from '../components/show-info.vue'
const db = uniCloud.database();
const dbCmd = db.command;
@@ -127,7 +131,7 @@
return {
showStableInfo: false,
isStable: true, // 是否是线上发行版
- originalData: [], // 原始数据,用于恢复状态
+ originalData: {}, // 原始数据,用于恢复状态
detailsState: true // 查看状态
}
},
@@ -152,6 +156,12 @@
mask: true
})
this.$refs.form.validate().then((res) => {
+ res.store_list = this.formData.store_list
+ if (res.store_list) {
+ res.store_list.forEach(item => {
+ item.priority = parseFloat(item.priority)
+ })
+ }
this.submitForm(res)
}).catch((errors) => {
uni.hideLoading()
@@ -191,21 +201,24 @@
uni.showLoading({
mask: true
})
- return db.collection(dbCollectionName).doc(id).field(fields).get().then((
- res) => {
- const data = res.result.data[0]
- if (data) {
- this.formData = data
- this.originalData = deepClone(this.formData)
- }
- }).catch((err) => {
- uni.showModal({
- content: err.message || '请求服务失败',
- showCancel: false
+ return db.collection(dbCollectionName)
+ .doc(id)
+ .field(fields)
+ .get()
+ .then((res) => {
+ const data = res.result.data[0]
+ if (data) {
+ this.formData = data
+ this.originalData = deepClone(this.formData)
+ }
+ }).catch((err) => {
+ uni.showModal({
+ content: err.message || '请求服务失败',
+ showCancel: false
+ })
+ }).finally(() => {
+ uni.hideLoading()
})
- }).finally(() => {
- uni.hideLoading()
- })
},
deletePackage() {
uni.showModal({
diff --git a/uni_modules/uni-upgrade-center/pages/version/list.vue b/uni_modules/uni-upgrade-center/pages/version/list.vue
index dcfbc10..2797d59 100644
--- a/uni_modules/uni-upgrade-center/pages/version/list.vue
+++ b/uni_modules/uni-upgrade-center/pages/version/list.vue
@@ -35,6 +35,7 @@
更新标题
安装包类型
平台
+
版本号
安装包状态
上传时间
@@ -56,6 +57,9 @@
+
{{item.version}}
{{item.stable_publish == true ? '已上线' : '已下线'}}
@@ -93,8 +97,12 @@
appVersionListDbName,
defaultDisplayApp
} from '../utils.js'
+ import {
+ mapState
+ } from 'vuex'
const db = uniCloud.database()
+ const dbCmd = db.command
// 表查询配置
const dbOrderBy = 'stable_publish desc,create_date desc' // 排序字段
const dbSearchFields = ['name', 'title', 'stable_publish', 'type'] // 模糊搜索字段,支持模糊搜索的字段列表
@@ -109,6 +117,13 @@
return document.documentElement ? document.documentElement.clientHeight : window.innerHeight;
}
+ function createListQuery(condition = {}) {
+ return {
+ create_env: dbCmd.neq("uni-stat"),
+ ...condition
+ }
+ }
+
export default {
data() {
return {
@@ -135,19 +150,25 @@
showAppIndex: 0
}
},
- async onLoad(options) {
+ async onLoad({
+ appid
+ }) {
await this.getAppList()
if (!this.appList.length) return
this.loaded = true
this.appList.forEach((item, index) => {
- if (item.appid === defaultDisplayApp) {
+ if (item.appid === appid || defaultDisplayApp) {
this.showAppIndex = index
}
})
this.setAppInfo(this.showAppIndex)
+ this.where = createListQuery({
+ appid: this.currentAppid
+ })
},
computed: {
+ ...mapState('app', ['appid']),
appNameList() {
return this.appList.map(item => item.name)
}
@@ -156,9 +177,9 @@
showAppIndex(val) {
this.setAppInfo(val)
- this.where = {
+ this.where = createListQuery({
appid: this.currentAppid
- }
+ })
}
},
onReady() {
@@ -262,7 +283,7 @@
result
} = await db.collection(appListDbName).get()
if (result && result.data && result.data.length > 0) {
- this.appList = result.data
+ this.appList = result.data.filter(item => item.appid !== this.appid)
} else {
this.showModalToAppManager()
}
@@ -296,6 +317,13 @@
confirmText: '立即跳转',
success: (res) => jump()
})
+ },
+ store_list_key(store_list) {
+ const arr = store_list ? store_list.filter(item => item.enable) : []
+ return arr.length ?
+ arr.sort((a, b) => b.priority - a.priority)
+ .map(item => item.name).join(',') :
+ '-'
}
}
}
diff --git a/uni_modules/uni-upgrade-center/readme.md b/uni_modules/uni-upgrade-center/readme.md
index 2c44ef9..7d01682 100644
--- a/uni_modules/uni-upgrade-center/readme.md
+++ b/uni_modules/uni-upgrade-center/readme.md
@@ -52,25 +52,27 @@ uniCloud 是 DCloud 联合阿里云、腾讯云,为开发者提供的基于 se
7. 在`pages.json`中添加页面路径
```json
//此结构与uniCloud admin中的pages.json结构一致
-"pages": [
- // ……其他页面配置
- {
- "path": "uni_modules/uni-upgrade-center/pages/version/list",
- "style": {
- "navigationBarTitleText": "版本列表"
+{
+ "pages": [
+ // ……其他页面配置
+ {
+ "path": "uni_modules/uni-upgrade-center/pages/version/list",
+ "style": {
+ "navigationBarTitleText": "版本列表"
+ }
+ }, {
+ "path": "uni_modules/uni-upgrade-center/pages/version/add",
+ "style": {
+ "navigationBarTitleText": "新版发布"
+ }
+ }, {
+ "path": "uni_modules/uni-upgrade-center/pages/version/detail",
+ "style": {
+ "navigationBarTitleText": "版本信息查看"
+ }
}
- }, {
- "path": "uni_modules/uni-upgrade-center/pages/version/add",
- "style": {
- "navigationBarTitleText": "新版发布"
- }
- }, {
- "path": "uni_modules/uni-upgrade-center/pages/version/detail",
- "style": {
- "navigationBarTitleText": "版本信息查看"
- }
- }
-]
+ ]
+}
```
8. 在`manifest.json -> 源码视图`中添加以下配置:
@@ -220,4 +222,4 @@ uniCloud 是 DCloud 联合阿里云、腾讯云,为开发者提供的基于 se
- 集合[opendb-app-list]对应的schema内存在错误,详细信息:opendb-app-list表对应的schema名称冲突,这是什么意思呢
- 没有/找不到 [opendb-app-list] 集合/表。**解决方案:**升级 admin 至 1.6.0+ 即可
-- 测试时发布了高版本的包,测试完了发布包提示需要大于版本号 (x.x.x)。**解决方案:**直接在控制台修改数据库
+- 测试时发布了高版本的包,测试完了发布包提示需要大于版本号 (x.x.x)。**解决方案:**直接在控制台修改数据库
\ No newline at end of file
--
GitLab