@10yun/cv-mobile-ui 0.5.16 → 0.5.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-mobile-ui",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "description": "十云cvjs移动端ui,适用uniapp",
5
5
  "author": "10yun",
6
6
  "license": "Apache-2.0",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <button class="cv-button-wrap" :type="type" :form-type="formType" :size="size" @click="parentClick"><slot /></button>
2
+ <button class="cv-button-wrap" :type="type" :size="size" @click="parentClick"><slot /></button>
3
3
  </template>
4
4
  <script>
5
5
  export default {
@@ -14,10 +14,6 @@ export default {
14
14
  type: [String],
15
15
  default: 'primary'
16
16
  },
17
- formType: {
18
- type: [String],
19
- default: ''
20
- },
21
17
  click: {
22
18
  type: [Function]
23
19
  },
@@ -91,6 +91,9 @@ export default {
91
91
  background-color: #ffffff;
92
92
  padding-left: 10px;
93
93
  }
94
+ .cv-cell-box:active {
95
+ background-color: #e5e5e5;
96
+ }
94
97
  .cv-cell-main-box {
95
98
  padding: 5px 10px 5px 0;
96
99
  border-bottom: solid 1px #f1f1f1;
@@ -118,14 +121,14 @@ export default {
118
121
  align-items: center;
119
122
  }
120
123
  .cv-cell-left-icon {
121
- width: 20px;
122
- height: 40px;
124
+ width: 30px;
125
+ height: 30px;
123
126
  line-height: 40px;
124
127
  padding-right: 10px;
125
128
  }
126
129
  .cv-cell-left-image {
127
- width: 20px;
128
- height: 40px;
130
+ width: 30px;
131
+ height: 30px;
129
132
  }
130
133
  .cv-cell-left-content {
131
134
  padding-left: 0px;
File without changes
@@ -1,15 +1,15 @@
1
1
  <template>
2
- <view class="cv-nav-col" @click="jump" v-bind:style="cvNavColStyle">
3
- <view class="cv-nav-col-img-area" v-bind:style="cvNavImgAreaStyle">
4
- <view class="cv-nav-col-img-box">
5
- <view class="cv-nav-col-img-main">
2
+ <view class="cv-griditem-box" @click="jump" v-bind:style="cvNavColStyle">
3
+ <view class="cv-griditem-img-area" v-bind:style="cvNavImgAreaStyle">
4
+ <view class="cv-griditem-img-box">
5
+ <view class="cv-griditem-img-main">
6
6
  <view class="cv-nav-img-pla" v-if="isViewPla === true"></view>
7
7
  <slot name="default" />
8
- <image class="cv-nav-col-img" v-bind:style="cvNavImgStyle" @load="onImgLoad" :src="img" v-if="!$slots.default"></image>
8
+ <image class="cv-griditem-img" v-bind:style="cvNavImgStyle" @load="onImgLoad" :src="img" v-if="!$slots.default"></image>
9
9
  </view>
10
10
  </view>
11
11
  </view>
12
- <view class="cv-nav-col-label">
12
+ <view class="cv-griditem-label">
13
13
  {{ label }}
14
14
  </view>
15
15
  </view>
@@ -150,33 +150,33 @@ export default {
150
150
  </script>
151
151
  <style>
152
152
  /* #ifdef MP-WEIXIN */
153
- .cv-nav-col {
153
+ .cv-griditem-box {
154
154
  display: contents;
155
155
  }
156
156
 
157
157
  /* #endif */
158
- .cv-nav-col {
158
+ .cv-griditem-box {
159
159
  width: calc(100% - 10px);
160
160
  margin: 5px 5px;
161
161
  display: inline-flex;
162
162
  flex-direction: column;
163
163
  }
164
164
 
165
- .cv-nav-col-img-area {
165
+ .cv-griditem-img-area {
166
166
  width: 100%;
167
167
  max-width: 40px;
168
168
  text-align: center;
169
169
  margin: 0 auto;
170
170
  }
171
171
 
172
- .cv-nav-col-img-box {
172
+ .cv-griditem-img-box {
173
173
  width: 100%;
174
174
  height: 0;
175
175
  padding-bottom: 100%;
176
176
  position: relative;
177
177
  }
178
178
 
179
- .cv-nav-col-img-main {
179
+ .cv-griditem-img-main {
180
180
  position: absolute;
181
181
  width: 100%;
182
182
  height: 100%;
@@ -200,12 +200,12 @@ export default {
200
200
  left: 0%;
201
201
  }
202
202
 
203
- .cv-nav-col-img {
203
+ .cv-griditem-img {
204
204
  width: 100%;
205
205
  height: 100%;
206
206
  }
207
207
 
208
- .cv-nav-col-label {
208
+ .cv-griditem-label {
209
209
  font-size: 12px;
210
210
  color: #666666;
211
211
  text-align: center;
@@ -5,7 +5,7 @@
5
5
  class="cv-lists-base-data-scroll-box"
6
6
  scroll-y="true"
7
7
  refresher-background="transparent"
8
- :refresher-default-style="disableStyle && 'none'"
8
+ :refresher-default-style="refresherDefaultStyle"
9
9
  :refresher-enabled="localTabLists[index] && localTabLists[index].enabled && disableEnabled === false"
10
10
  :refresher-triggered="localTabLists[index] && localTabLists[index].triggered"
11
11
  @scrolltolower="onTolower(index)"
@@ -74,7 +74,7 @@ export default {
74
74
  }
75
75
  },
76
76
  disableStyle: {
77
- type: Boolean,
77
+ type: [Boolean, String],
78
78
  default: false
79
79
  },
80
80
  /* 监听更新数据通知 ,接收时间戳 */
@@ -125,6 +125,23 @@ export default {
125
125
  loadMoreText: { contentdown: '上拉或点击显示更多', contentrefresh: '正在加载...', contentnomore: '没有更多数据了' }
126
126
  };
127
127
  },
128
+ computed: {
129
+ refresherDefaultStyle() {
130
+ if (Object.prototype.toString.call(this.disableStyle) === '[object Boolean]') {
131
+ return this.disableStyle ? 'none' : 'black';
132
+ } else if (Object.prototype.toString.call(this.disableStyle) === '[object String]') {
133
+ switch (this.disableStyle) {
134
+ case 'white':
135
+ return 'white';
136
+ case 'none':
137
+ return 'none';
138
+ default:
139
+ case 'black':
140
+ return 'black';
141
+ }
142
+ }
143
+ }
144
+ },
128
145
  watch: {
129
146
  tabsConfig: {
130
147
  deep: true, //深度监听设置为 true
@@ -65,7 +65,7 @@
65
65
  refresher-background="transparent"
66
66
  :refresher-enabled="localTabLists[index].enabled && disableEnabled === false"
67
67
  :refresher-triggered="localTabLists[index].triggered"
68
- :refresher-default-style="disableStyle && 'none'"
68
+ :refresher-default-style="refresherDefaultStyle"
69
69
  @scrolltolower="onTolower(index)"
70
70
  @scrolltoupper="onToupper"
71
71
  @scroll="onScroll"
@@ -133,7 +133,7 @@ export default {
133
133
  }
134
134
  },
135
135
  disableStyle: {
136
- type: Boolean,
136
+ type: [Boolean, String],
137
137
  default: false
138
138
  },
139
139
  /* 监听更新数据通知 ,接收时间戳 */
@@ -183,6 +183,23 @@ export default {
183
183
  loadMoreText: { contentdown: '上拉或点击显示更多', contentrefresh: '正在加载...', contentnomore: '没有更多数据了' }
184
184
  };
185
185
  },
186
+ computed: {
187
+ refresherDefaultStyle() {
188
+ if (Object.prototype.toString.call(this.disableStyle) === '[object Boolean]') {
189
+ return this.disableStyle ? 'none' : 'black';
190
+ } else if (Object.prototype.toString.call(this.disableStyle) === '[object String]') {
191
+ switch (this.disableStyle) {
192
+ case 'white':
193
+ return 'white';
194
+ case 'none':
195
+ return 'none';
196
+ default:
197
+ case 'black':
198
+ return 'black';
199
+ }
200
+ }
201
+ }
202
+ },
186
203
  watch: {
187
204
  tabsConfig: {
188
205
  deep: true, //深度监听设置为 true