diff --git a/pages/component/mixin-datacom/datacom.uvue b/pages/component/mixin-datacom/datacom.uvue index 82e9e1656cf0d8707b154090932047d08739375e..7b69ec78cdebe743bebc867a6bb3b7d86ee0040b 100644 --- a/pages/component/mixin-datacom/datacom.uvue +++ b/pages/component/mixin-datacom/datacom.uvue @@ -40,7 +40,7 @@ const data = res.data // const count = res.count this.mixinDatacomResData = data - }).catch((err) => { + }).catch((err: any | null) => { this.mixinDatacomError = err as UniCloudError }).finally(() => { this.mixinDatacomLoading = false diff --git a/pages/component/unicloud-db-contacts/add.uvue b/pages/component/unicloud-db-contacts/add.uvue index 700ce26197966efbdbe2a8090c34134fb3b326dc..76476e4dd01596c734296a826a42efe850c3466a 100644 --- a/pages/component/unicloud-db-contacts/add.uvue +++ b/pages/component/unicloud-db-contacts/add.uvue @@ -40,18 +40,19 @@ return { collection: COLLECTION_NAME, genderList: GenderList as GenderType[], - $uniCloudElement: null as UniCloudDBElement | null + uniCloudElement: null as UniCloudDBElement | null } }, onReady() { - this.$uniCloudElement = this.$refs['udb'] as UniCloudDBElement + this.uniCloudElement = this.$refs['udb'] as UniCloudDBElement }, methods: { onFormSubmit: function (e : FormSubmitEvent) { const formData = e.detail.value const genderString = formData['gender'] as string formData['gender'] = (genderString.length > 0) ? parseInt(genderString) : -1 - this.$uniCloudElement!.add(formData, { + console.log('formData', formData) + this.uniCloudElement!.add(formData, { showToast: false, needLoading: true, loadingTitle: "正在保存...", diff --git a/pages/component/unicloud-db-contacts/detail.uvue b/pages/component/unicloud-db-contacts/detail.uvue index 869b2a2f6ee3aa6cde25e1a21358829816c6985e..29da10e9815f1b1ba24642ffbd909a1298f79c5a 100644 --- a/pages/component/unicloud-db-contacts/detail.uvue +++ b/pages/component/unicloud-db-contacts/detail.uvue @@ -39,14 +39,14 @@ return { collection: '', where: '', - $whereID: '', - $uniCloudElement: null as UniCloudDBElement | null + whereID: '', + uniCloudElement: null as UniCloudDBElement | null } }, - onLoad(options : Map) { + onLoad(options) { this.collection = COLLECTION_NAME; - this.$whereID = options.get('id') as string; - this.where = `_id=='${this.$whereID}'`; + this.whereID = options['id'] as string; + this.where = `_id=='${this.whereID}'`; }, onShow() { // TODO 后续通过 EventChannel 实现 @@ -57,7 +57,7 @@ uni.$off(UNICLOUD_DB_CONTACTS_UPDATE, this.onDataChange); }, onReady() { - this.$uniCloudElement = this.$refs['udb'] as UniCloudDBElement + this.uniCloudElement = this.$refs['udb'] as UniCloudDBElement }, methods: { displayGender(value : number | null) : string { @@ -74,7 +74,7 @@ }) }, onDataChange(_ : string) { - this.$uniCloudElement!.loadData() + this.uniCloudElement!.loadData() } } } diff --git a/pages/component/unicloud-db-contacts/edit.uvue b/pages/component/unicloud-db-contacts/edit.uvue index b266532e5b9e6e63890bfd49fc59e5e491cf5311..509b9d7db45281194579a824afcaffa2dfc01e26 100644 --- a/pages/component/unicloud-db-contacts/edit.uvue +++ b/pages/component/unicloud-db-contacts/edit.uvue @@ -49,31 +49,31 @@ collection: '', where: '', genderList: GenderList as GenderType[], - $whereID: '', - $uniCloudElement: null as UniCloudDBElement | null + whereID: '', + uniCloudElement: null as UniCloudDBElement | null } }, - onLoad(options : Map) { + onLoad(options) { this.collection = COLLECTION_NAME; - this.$whereID = options.get('id') as string; - this.where = `_id=='${this.$whereID}'`; + this.whereID = options['id'] as string; + this.where = `_id=='${this.whereID}'`; }, onReady() { - this.$uniCloudElement = this.$refs['udb'] as UniCloudDBElement + this.uniCloudElement = this.$refs['udb'] as UniCloudDBElement }, methods: { onFormSubmit: function (e : FormSubmitEvent) { const formData = e.detail.value const genderString = formData['gender'] as string formData['gender'] = (genderString.length > 0) ? parseInt(genderString) : -1 - this.$uniCloudElement!.update(this.$whereID, formData, { + this.uniCloudElement!.update(this.whereID, formData, { showToast: false, needLoading: true, needConfirm: false, loadingTitle: "正在保存...", success: (_ : UniCloudDBUpdateResult) => { // TODO 后续通过 EventChannel 实现 - uni.$emit(UNICLOUD_DB_CONTACTS_UPDATE, this.$whereID) + uni.$emit(UNICLOUD_DB_CONTACTS_UPDATE, this.whereID) setTimeout(() => { uni.navigateBack() }, 500) @@ -88,7 +88,7 @@ }) }, remove(id : string | null, name : string | null) { - this.$uniCloudElement!.remove(id!, { + this.uniCloudElement!.remove(id!, { needConfirm: true, needLoading: true, loadingTitle: "正在删除...", @@ -96,7 +96,7 @@ confirmContent: name, success: (_ : UniCloudDBRemoveResult) => { // TODO 后续通过 EventChannel 实现 - uni.$emit(UNICLOUD_DB_CONTACTS_DELETE, this.$whereID) + uni.$emit(UNICLOUD_DB_CONTACTS_DELETE, this.whereID) setTimeout(() => { uni.navigateBack({ delta: 2 diff --git a/pages/component/unicloud-db-contacts/list.uvue b/pages/component/unicloud-db-contacts/list.uvue index c0d8cba170835ffe99b91b2fee0e0ec8b08a723a..9e5acaf28b201e3532979c676b1764fae036bce4 100644 --- a/pages/component/unicloud-db-contacts/list.uvue +++ b/pages/component/unicloud-db-contacts/list.uvue @@ -29,14 +29,14 @@ data() { return { collection: COLLECTION_NAME, - $uniCloudElement: null as UniCloudDBElement | null + uniCloudElement: null as UniCloudDBElement | null } }, onReady() { // TODO 后续通过 EventChannel 实现 uni.$on(UNICLOUD_DB_CONTACTS_DELETE, this.onDataChange); - this.$uniCloudElement = this.$refs['udb'] as UniCloudDBElement - this.$uniCloudElement!.loadData() + this.uniCloudElement = this.$refs['udb'] as UniCloudDBElement + this.uniCloudElement!.loadData() }, onUnload() { // TODO 后续通过 EventChannel 实现 @@ -50,7 +50,7 @@ uni.$off(UNICLOUD_DB_CONTACTS_UPDATE, this.onDataChange); }, onPullDownRefresh() { - this.$uniCloudElement!.loadData({ + this.uniCloudElement!.loadData({ clear: true, success: (_ : UniCloudDBGetResult) => { uni.stopPullDownRefresh() @@ -59,7 +59,7 @@ }, methods: { loadMore() { - this.$uniCloudElement!.loadMore() + this.uniCloudElement!.loadMore() }, gotoAddPage() { // TODO 后续通过 EventChannel 实现 @@ -76,7 +76,7 @@ }) }, onDataChange(_ : string) { - this.$uniCloudElement!.loadData({ + this.uniCloudElement!.loadData({ clear: true }) } @@ -97,6 +97,11 @@ .udb { flex: 1; + /* TODO */ + /* #ifdef WEB */ + display: flex; + /* #endif */ + flex-direction: column; } .list-view { diff --git a/uni_modules/uni-loading/changelog.md b/uni_modules/uni-loading/changelog.md index 1b603b4cace37bd1f44d595091fcf3ef689159c5..07008070fea5ae9b85b00636c332316c0147219b 100644 --- a/uni_modules/uni-loading/changelog.md +++ b/uni_modules/uni-loading/changelog.md @@ -1,3 +1,9 @@ +## 1.0.4(2024-01-10) +- 优化 兼容 uvue h5 项目 +## 1.0.3(2023-12-22) +- 更新 示例项目 +## 1.0.2(2023-12-22) +- 优化 circle 部分动画逻辑,使动画更顺滑 ## 1.0.1(2023-12-20) - 修复 组件在高版本HBuilderX中运行出错的bug ## 1.0.0(2023-12-19) diff --git a/uni_modules/uni-loading/components/uni-loading/circle.uvue b/uni_modules/uni-loading/components/uni-loading/circle.uvue index 3e657ca00fe8abb054c6531a7602d4e455226e39..b911892c23c9bd8a8c0ab6070af413e1b8d5bcf1 100644 --- a/uni_modules/uni-loading/components/uni-loading/circle.uvue +++ b/uni_modules/uni-loading/components/uni-loading/circle.uvue @@ -1,113 +1,187 @@ diff --git a/uni_modules/uni-loading/components/uni-loading/icon.uvue b/uni_modules/uni-loading/components/uni-loading/icon.uvue index 71fb195827883656489e767de02b944e1dd8daf0..8f8cce54977d2fce3be62ae2b156aef1b22e7bd7 100644 --- a/uni_modules/uni-loading/components/uni-loading/icon.uvue +++ b/uni_modules/uni-loading/components/uni-loading/icon.uvue @@ -1,20 +1,10 @@