hw-cus-ui 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -7,12 +7,12 @@ import HwInput from './HwInput';
7
7
  import HwFileUpload from './HwFileUpload';
8
8
  import HwCheckbox from './HwCheckbox';
9
9
  import HwTabs from './HwTabs';
10
- import ZPaging from './z-paging';
10
+ import HwAppList from './z-paging';
11
11
 
12
- export { HwBtn, HwDraggableBottomPopup, HwSelect, HwPickerTree, HwInput, HwFileUpload, HwCheckbox, HwTabs, ZPaging };
12
+ export { HwBtn, HwDraggableBottomPopup, HwSelect, HwPickerTree, HwInput, HwFileUpload, HwCheckbox, HwTabs, HwAppList };
13
13
 
14
14
  export declare const hwCusUi: {
15
15
  install: (app: App) => void;
16
16
  };
17
17
 
18
- export default hwCusUi;
18
+ export default hwCusUi;
package/index.ts CHANGED
@@ -8,9 +8,9 @@ import HwInput from './HwInput';
8
8
  import HwFileUpload from './HwFileUpload';
9
9
  import HwCheckbox from './HwCheckbox';
10
10
  import HwTabs from './HwTabs';
11
- import ZPaging from './z-paging';
11
+ import HwAppList from './z-paging';
12
12
 
13
- export { HwBtn, HwDraggableBottomPopup, HwSelect, HwPickerTree, HwInput, HwFileUpload, HwCheckbox, HwTabs, ZPaging };
13
+ export { HwBtn, HwDraggableBottomPopup, HwSelect, HwPickerTree, HwInput, HwFileUpload, HwCheckbox, HwTabs, HwAppList };
14
14
 
15
15
  // 所有组件列表
16
16
  const components = [
@@ -22,7 +22,7 @@ const components = [
22
22
  HwFileUpload,
23
23
  HwCheckbox,
24
24
  HwTabs,
25
- ZPaging
25
+ HwAppList
26
26
  ];
27
27
 
28
28
  // 定义 install 方法
@@ -35,4 +35,4 @@ const hwCusUi = {
35
35
  install
36
36
  };
37
37
 
38
- export default hwCusUi;
38
+ export default hwCusUi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hw-cus-ui",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "使用该组件库需安装uniapp插件@dcloudio/uni-ui",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -5,192 +5,222 @@
5
5
 
6
6
  <!-- 空数据占位view,此组件支持easycom规范,可以在项目中直接引用 -->
7
7
  <template>
8
- <view :class="{'zp-container':true,'zp-container-fixed':emptyViewFixed}" :style="[finalEmptyViewStyle]" @click="emptyViewClick">
9
- <view class="zp-main">
10
- <image v-if="!emptyViewImg.length" :class="{'zp-main-image-rpx':unit==='rpx','zp-main-image-px':unit==='px'}" :style="[emptyViewImgStyle]" :src="emptyImg" />
11
- <image v-else :class="{'zp-main-image-rpx':unit==='rpx','zp-main-image-px':unit==='px'}" mode="aspectFit" :style="[emptyViewImgStyle]" :src="emptyViewImg" />
12
- <text class="zp-main-title" :class="{'zp-main-title-rpx':unit==='rpx','zp-main-title-px':unit==='px'}" :style="[emptyViewTitleStyle]">{{emptyViewText}}</text>
13
- <text v-if="showEmptyViewReload" :class="{'zp-main-error-btn':true,'zp-main-error-btn-rpx':unit==='rpx','zp-main-error-btn-px':unit==='px'}" :style="[emptyViewReloadStyle]" @click.stop="reloadClick">{{emptyViewReloadText}}</text>
14
- </view>
15
- </view>
8
+ <view
9
+ :class="{ 'zp-container': true, 'zp-container-fixed': emptyViewFixed }"
10
+ :style="[finalEmptyViewStyle]"
11
+ @click="emptyViewClick"
12
+ >
13
+ <view class="zp-main">
14
+ <image
15
+ v-if="!emptyViewImg.length"
16
+ :class="{ 'zp-main-image-rpx': unit === 'rpx', 'zp-main-image-px': unit === 'px' }"
17
+ :style="[emptyViewImgStyle]"
18
+ :src="emptyImg"
19
+ />
20
+ <image
21
+ v-else
22
+ :class="{ 'zp-main-image-rpx': unit === 'rpx', 'zp-main-image-px': unit === 'px' }"
23
+ mode="aspectFit"
24
+ :style="[emptyViewImgStyle]"
25
+ :src="emptyViewImg"
26
+ />
27
+ <text
28
+ class="zp-main-title"
29
+ :class="{ 'zp-main-title-rpx': unit === 'rpx', 'zp-main-title-px': unit === 'px' }"
30
+ :style="[emptyViewTitleStyle]"
31
+ >
32
+ {{ emptyViewText }}
33
+ </text>
34
+ <text
35
+ v-if="showEmptyViewReload"
36
+ :class="{
37
+ 'zp-main-error-btn': true,
38
+ 'zp-main-error-btn-rpx': unit === 'rpx',
39
+ 'zp-main-error-btn-px': unit === 'px'
40
+ }"
41
+ :style="[emptyViewReloadStyle]"
42
+ @click.stop="reloadClick"
43
+ >
44
+ {{ emptyViewReloadText }}
45
+ </text>
46
+ </view>
47
+ </view>
16
48
  </template>
17
49
 
18
50
  <script>
19
- // #ifdef APP-NVUE
20
- import zStatic from '../../z-paging/js/z-paging-static';
21
- // #endif
22
-
23
- // #ifndef APP-NVUE
24
- import zStatic from '../../z-paging/js/z-paging-static';
25
- // #endif
26
- export default {
27
- name: 'z-paging-empty-view',
28
- mixins: [zStatic],
29
- data() {
30
- return {
31
-
32
- };
33
- },
34
- props: {
35
- // 空数据描述文字
36
- emptyViewText: {
37
- type: String,
38
- default: '没有数据哦~'
39
- },
40
- // 空数据图片
41
- emptyViewImg: {
42
- type: String,
43
- default: ''
44
- },
45
- // 是否显示空数据图重新加载按钮
46
- showEmptyViewReload: {
47
- type: Boolean,
48
- default: false
49
- },
50
- // 空数据点击重新加载文字
51
- emptyViewReloadText: {
52
- type: String,
53
- default: '重新加载'
54
- },
55
- // 是否是加载失败
56
- isLoadFailed: {
57
- type: Boolean,
58
- default: false
59
- },
60
- // 空数据图样式
61
- emptyViewStyle: {
62
- type: Object,
63
- default: function() {
64
- return {}
65
- }
66
- },
67
- // 空数据图img样式
68
- emptyViewImgStyle: {
69
- type: Object,
70
- default: function() {
71
- return {}
72
- }
73
- },
74
- // 空数据图描述文字样式
75
- emptyViewTitleStyle: {
76
- type: Object,
77
- default: function() {
78
- return {}
79
- }
80
- },
81
- // 空数据图重新加载按钮样式
82
- emptyViewReloadStyle: {
83
- type: Object,
84
- default: function() {
85
- return {}
86
- }
87
- },
88
- // 空数据图z-index
89
- emptyViewZIndex: {
90
- type: Number,
91
- default: 9
92
- },
93
- // 空数据图片是否使用fixed布局并铺满z-paging
94
- emptyViewFixed: {
95
- type: Boolean,
96
- default: true
97
- },
98
- // 空数据图中布局的单位,默认为rpx
99
- unit: {
100
- type: String,
101
- default: 'rpx'
102
- }
103
- },
104
- computed: {
105
- emptyImg() {
106
- return this.isLoadFailed ? zStatic.base64Error : zStatic.base64Empty;
107
- },
108
- finalEmptyViewStyle(){
109
- this.emptyViewStyle['z-index'] = this.emptyViewZIndex;
110
- return this.emptyViewStyle;
111
- }
112
- },
113
- methods: {
114
- // 点击了reload按钮
115
- reloadClick() {
116
- this.$emit('reload');
117
- },
118
- // 点击了空数据view
119
- emptyViewClick() {
120
- this.$emit('viewClick');
121
- }
122
- }
123
- }
51
+ // #ifdef APP-NVUE
52
+ import zStatic from '../z-paging/js/z-paging-static';
53
+ // #endif
54
+
55
+ // #ifndef APP-NVUE
56
+ import zStatic from '../z-paging/js/z-paging-static';
57
+ // #endif
58
+ export default {
59
+ name: 'z-paging-empty-view',
60
+ mixins: [zStatic],
61
+ data() {
62
+ return {};
63
+ },
64
+ props: {
65
+ // 空数据描述文字
66
+ emptyViewText: {
67
+ type: String,
68
+ default: '没有数据哦~'
69
+ },
70
+ // 空数据图片
71
+ emptyViewImg: {
72
+ type: String,
73
+ default: ''
74
+ },
75
+ // 是否显示空数据图重新加载按钮
76
+ showEmptyViewReload: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ // 空数据点击重新加载文字
81
+ emptyViewReloadText: {
82
+ type: String,
83
+ default: '重新加载'
84
+ },
85
+ // 是否是加载失败
86
+ isLoadFailed: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ // 空数据图样式
91
+ emptyViewStyle: {
92
+ type: Object,
93
+ default: function () {
94
+ return {};
95
+ }
96
+ },
97
+ // 空数据图img样式
98
+ emptyViewImgStyle: {
99
+ type: Object,
100
+ default: function () {
101
+ return {};
102
+ }
103
+ },
104
+ // 空数据图描述文字样式
105
+ emptyViewTitleStyle: {
106
+ type: Object,
107
+ default: function () {
108
+ return {};
109
+ }
110
+ },
111
+ // 空数据图重新加载按钮样式
112
+ emptyViewReloadStyle: {
113
+ type: Object,
114
+ default: function () {
115
+ return {};
116
+ }
117
+ },
118
+ // 空数据图z-index
119
+ emptyViewZIndex: {
120
+ type: Number,
121
+ default: 9
122
+ },
123
+ // 空数据图片是否使用fixed布局并铺满z-paging
124
+ emptyViewFixed: {
125
+ type: Boolean,
126
+ default: true
127
+ },
128
+ // 空数据图中布局的单位,默认为rpx
129
+ unit: {
130
+ type: String,
131
+ default: 'rpx'
132
+ }
133
+ },
134
+ computed: {
135
+ emptyImg() {
136
+ return this.isLoadFailed ? zStatic.base64Error : zStatic.base64Empty;
137
+ },
138
+ finalEmptyViewStyle() {
139
+ this.emptyViewStyle['z-index'] = this.emptyViewZIndex;
140
+ return this.emptyViewStyle;
141
+ }
142
+ },
143
+ methods: {
144
+ // 点击了reload按钮
145
+ reloadClick() {
146
+ this.$emit('reload');
147
+ },
148
+ // 点击了空数据view
149
+ emptyViewClick() {
150
+ this.$emit('viewClick');
151
+ }
152
+ }
153
+ };
124
154
  </script>
125
155
 
126
156
  <style scoped>
127
- .zp-container{
128
- /* #ifndef APP-NVUE */
129
- display: flex;
130
- /* #endif */
131
- align-items: center;
132
- justify-content: center;
133
- }
134
- .zp-container-fixed {
135
- /* #ifndef APP-NVUE */
136
- position: absolute;
137
- top: 0;
138
- left: 0;
139
- width: 100%;
140
- height: 100%;
141
- /* #endif */
142
- /* #ifdef APP-NVUE */
143
- flex: 1;
144
- /* #endif */
145
- }
157
+ .zp-container {
158
+ /* #ifndef APP-NVUE */
159
+ display: flex;
160
+ /* #endif */
161
+ align-items: center;
162
+ justify-content: center;
163
+ }
164
+ .zp-container-fixed {
165
+ /* #ifndef APP-NVUE */
166
+ position: absolute;
167
+ top: 0;
168
+ left: 0;
169
+ width: 100%;
170
+ height: 100%;
171
+ /* #endif */
172
+ /* #ifdef APP-NVUE */
173
+ flex: 1;
174
+ /* #endif */
175
+ }
146
176
 
147
- .zp-main{
148
- /* #ifndef APP-NVUE */
149
- display: flex;
150
- /* #endif */
151
- flex-direction: column;
152
- align-items: center;
153
- padding: 50rpx 0rpx;
154
- }
177
+ .zp-main {
178
+ /* #ifndef APP-NVUE */
179
+ display: flex;
180
+ /* #endif */
181
+ flex-direction: column;
182
+ align-items: center;
183
+ padding: 50rpx 0rpx;
184
+ }
155
185
 
156
- .zp-main-image-rpx {
157
- width: 240rpx;
158
- height: 240rpx;
159
- }
160
- .zp-main-image-px {
161
- width: 120px;
162
- height: 120px;
163
- }
186
+ .zp-main-image-rpx {
187
+ width: 240rpx;
188
+ height: 240rpx;
189
+ }
190
+ .zp-main-image-px {
191
+ width: 120px;
192
+ height: 120px;
193
+ }
164
194
 
165
- .zp-main-title {
166
- color: #aaaaaa;
167
- text-align: center;
168
- }
169
- .zp-main-title-rpx {
170
- font-size: 28rpx;
171
- margin-top: 10rpx;
172
- padding: 0rpx 20rpx;
173
- }
174
- .zp-main-title-px {
175
- font-size: 14px;
176
- margin-top: 5px;
177
- padding: 0px 10px;
178
- }
195
+ .zp-main-title {
196
+ color: #aaaaaa;
197
+ text-align: center;
198
+ }
199
+ .zp-main-title-rpx {
200
+ font-size: 28rpx;
201
+ margin-top: 10rpx;
202
+ padding: 0rpx 20rpx;
203
+ }
204
+ .zp-main-title-px {
205
+ font-size: 14px;
206
+ margin-top: 5px;
207
+ padding: 0px 10px;
208
+ }
179
209
 
180
- .zp-main-error-btn {
181
- border: solid 1px #dddddd;
182
- color: #aaaaaa;
183
- }
184
- .zp-main-error-btn-rpx {
185
- font-size: 28rpx;
186
- padding: 8rpx 24rpx;
187
- border-radius: 6rpx;
188
- margin-top: 50rpx;
189
- }
190
- .zp-main-error-btn-px {
191
- font-size: 14px;
192
- padding: 4px 12px;
193
- border-radius: 3px;
194
- margin-top: 25px;
195
- }
210
+ .zp-main-error-btn {
211
+ border: solid 1px #dddddd;
212
+ color: #aaaaaa;
213
+ }
214
+ .zp-main-error-btn-rpx {
215
+ font-size: 28rpx;
216
+ padding: 8rpx 24rpx;
217
+ border-radius: 6rpx;
218
+ margin-top: 50rpx;
219
+ }
220
+ .zp-main-error-btn-px {
221
+ font-size: 14px;
222
+ padding: 4px 12px;
223
+ border-radius: 3px;
224
+ margin-top: 25px;
225
+ }
196
226
  </style>
@@ -1,3 +1,3 @@
1
- declare const ZPaging: any;
1
+ declare const HwAppList: any;
2
2
 
3
- export default ZPaging;
3
+ export default HwAppList;
package/z-paging/index.ts CHANGED
@@ -1,7 +1,8 @@
1
- import ZPaging from './components/z-paging/z-paging.vue';
1
+ // @ts-ignore
2
+ import HwAppList from './components/z-paging/z-paging.vue';
2
3
 
3
- ZPaging.install = function(Vue: any) {
4
- Vue.component(ZPaging.name, ZPaging);
4
+ HwAppList.install = function (Vue: any) {
5
+ Vue.component(HwAppList.name, HwAppList);
5
6
  };
6
7
 
7
- export default ZPaging;
8
+ export default HwAppList;
@@ -1,57 +0,0 @@
1
- # z-paging
2
-
3
- <p align="center">
4
- <img alt="logo" src="https://z-paging.zxlee.cn/img/title-logo.png" height="100" style="margin-bottom: 50px;" />
5
- </p>
6
-
7
- [![version](https://img.shields.io/badge/version-2.8.7-blue)](https://github.com/SmileZXLee/uni-z-paging) [![license](https://img.shields.io/github/license/SmileZXLee/uni-z-paging)](https://en.wikipedia.org/wiki/MIT_License)
8
- <img height="0" width="0" src="https://api.z-notify.zxlee.cn/v1/public/statistics/8293556910106066944/addOnly?from=uni" />
9
-
10
- `z-paging-x`现已支持uniapp x,持续完善中,插件地址👉🏻 [https://ext.dcloud.net.cn/plugin?name=z-paging-x](https://ext.dcloud.net.cn/plugin?name=z-paging-x)
11
-
12
- ### 文档地址:[https://z-paging.zxlee.cn](https://z-paging.zxlee.cn)
13
-
14
- ### 更新组件前,请注意[版本差异](https://z-paging.zxlee.cn/start/upgrade-guide.html)
15
-
16
- ***
17
- ### 功能&特点
18
- * 【配置简单】仅需两步(绑定网络请求方法、绑定分页结果数组)轻松完成完整下拉刷新,上拉加载更多功能。
19
- * 【低耦合,低侵入】分页自动管理。在page中无需处理任何分页相关逻辑,无需在data中定义任何分页相关变量,全由z-paging内部处理。
20
- * 【超灵活,支持各种类型自定义】支持自定义下拉刷新,自定义上拉加载更多等各种自定义效果;支持使用内置自动分页,同时也支持通过监听下拉刷新和滚动到底部事件自行处理;支持使用自带全屏布局规范,同时也支持将z-paging自由放在任意容器中。
21
- * 【功能丰富】支持国际化,支持自定义且自动管理空数据图,支持主题模式切换,支持本地分页,支持无闪动聊天分页模式,支持展示最后更新时间,支持吸顶效果,支持内部scroll-view滚动与页面滚动,支持一键滚动到顶部,支持下拉进入二楼等诸多功能。
22
- * 【【全平台兼容】支持vue&nvue,vue2&vue3,js&ts,支持h5、app、鸿蒙Next及各家小程序。
23
- * 【高性能】在app-vue、h5、微信小程序、QQ小程序上使用wxs+renderjs在视图层实现下拉刷新;支持虚拟列表,轻松渲染百万级列表数据!
24
-
25
- ***
26
- ### 反馈qq群
27
- * 官方1群`已满`:[790460711](https://jq.qq.com/?_wv=1027&k=vU2fKZZH)
28
-
29
- * 官方2群`已满`:[371624008](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=avPmibADf2TNi4LxkIwjCE5vbfXpa-r1&authKey=dQ%2FVDAR87ONxI4b32Py%2BvmXbhnopjHN7%2FJPtdsqJdsCPFZB6zDQ17L06Uh0kITUZ&noverify=0&group_code=371624008)
30
- * 官方3群:[343409055](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=sIaNqiCMIjxGQVksjytCw6R8DSiibHR7&authKey=pp995q8ZzFtl5F2xUwvvceP24QTcguWW%2FRVoDnMa8JZF4L2DmS%2B%2FV%2F5sYrcgPsmW&noverify=0&group_code=343409055)
31
-
32
- ***
33
-
34
- ### 预览
35
-
36
- ***
37
-
38
- | 自定义下拉刷新效果演示 | 滑动切换选项卡+吸顶演示 | 聊天记录模式演示 |
39
- | :----------------------------------------------------------: | :----------------------------------------------------------: | ------------------------------------------------------------ |
40
- | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo5.gif) | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo6.gif) | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo7.gif) |
41
-
42
- | 虚拟列表(流畅渲染1万+条)演示 | 下拉进入二楼演示 | 在弹窗内使用演示 |
43
- | :----------------------------------------------------------: | :----------------------------------------------------------: | ------------------------------------------------------------ |
44
- | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo8.gif) | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo9.gif) | ![](https://z-paging.zxlee.cn/public/img/z-paging-demo10.gif) |
45
-
46
-
47
- ### 在线demo体验地址:
48
-
49
- * [https://demo.z-paging.zxlee.cn](https://demo.z-paging.zxlee.cn)
50
-
51
- | 扫码体验 |
52
- | ------------------------------------------------------------ |
53
- | ![](https://z-paging.zxlee.cn/public/img/code.png) |
54
-
55
- ### demo下载
56
- * 支持vue2&vue3的`选项式api`写法demo下载,请点击页面右上角的【使用HBuilderX导入示例项目】或【下载示例项目ZIP】。
57
- * 支持vue3的`组合式api`写法demo下载,请访问[github](https://github.com/SmileZXLee/uni-z-paging)。