@10yun/cv-mobile-ui 0.5.57 → 0.5.58

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.57",
3
+ "version": "0.5.58",
4
4
  "description": "十云cvjs移动端ui,适用uniapp",
5
5
  "homepage": "http://cvjs.cn/cv-mobile-ui/",
6
6
  "license": "Apache-2.0",
@@ -1,14 +1,12 @@
1
1
  <template>
2
- <view class="cv-dialog-bottom">
3
- <view class="cu-modal bottom-modal" :class="show ? 'show' : ''">
4
- <view class="cu-dialog">
5
- <view class="cu-bar bg-white">
6
- <view class="action text-blue" @tap="cancel">取消</view>
7
- <view class="action text-green" @tap="confirm">确定</view>
8
- </view>
9
- <view class="cv-dialog-body" :style="bodyClass">
10
- <slot name="default" />
11
- </view>
2
+ <view class="cv-dialog-bottom__wrap" :class="show ? 'show' : ''">
3
+ <view class="cv-dialog-bottom__box">
4
+ <view class="cv-dialog-bottom__bar">
5
+ <view class="action cv-dialog-bottom__bar-left" @tap="cancel">取消</view>
6
+ <view class="action cv-dialog-bottom__bar-right" @tap="confirm">确定</view>
7
+ </view>
8
+ <view class="cv-dialog-bottom__body" :style="bodyClass">
9
+ <slot name="default" />
12
10
  </view>
13
11
  </view>
14
12
  </view>
@@ -49,10 +47,7 @@ export default {
49
47
  };
50
48
  </script>
51
49
  <style>
52
- .cu-modal.bottom-modal {
53
- margin-bottom: -552px;
54
- }
55
- .cu-modal {
50
+ .cv-dialog-bottom__wrap {
56
51
  position: fixed;
57
52
  top: 0;
58
53
  right: 0;
@@ -69,32 +64,26 @@ export default {
69
64
  background: rgba(0, 0, 0, 0.6);
70
65
  transition: all 0.3s ease-in-out 0s;
71
66
  pointer-events: none;
67
+ margin-bottom: -552px;
72
68
  }
73
- .cu-modal.bottom-modal.show {
74
- margin-bottom: 0;
69
+ .cv-dialog-bottom__wrap::before {
70
+ vertical-align: bottom;
75
71
  }
76
- .cu-modal.show {
72
+ .cv-dialog-bottom__wrap::before {
73
+ content: '\200B';
74
+ display: inline-block;
75
+ height: 100%;
76
+ }
77
+ .cv-dialog-bottom__wrap.show {
77
78
  opacity: 1;
78
79
  transition-duration: 0.3s;
79
80
  transform: scale(1);
80
81
  overflow-x: hidden;
81
82
  overflow-y: auto;
82
83
  pointer-events: auto;
84
+ margin-bottom: 0;
83
85
  }
84
- .cu-modal.bottom-modal::before {
85
- vertical-align: bottom;
86
- }
87
- .cu-modal::before {
88
- content: '\200B';
89
- display: inline-block;
90
- height: 100%;
91
- vertical-align: middle;
92
- }
93
- .cu-modal.bottom-modal .cu-dialog {
94
- width: 100%;
95
- border-radius: 0;
96
- }
97
- .cu-dialog {
86
+ .cv-dialog-bottom__box {
98
87
  position: relative;
99
88
  display: inline-block;
100
89
  vertical-align: middle;
@@ -102,15 +91,14 @@ export default {
102
91
  margin-right: auto;
103
92
  width: 375px;
104
93
  max-width: 100%;
94
+ width: 100%;
105
95
  background-color: #f8f8f8;
106
- border-radius: 5px;
96
+ border-radius: 0;
97
+ border-top-left-radius: 15px;
98
+ border-top-right-radius: 15px;
107
99
  overflow: hidden;
108
100
  }
109
- .bg-white {
110
- background-color: #ffffff;
111
- color: #666666;
112
- }
113
- .cu-bar {
101
+ .cv-dialog-bottom__bar {
114
102
  display: flex;
115
103
  position: relative;
116
104
  -webkit-box-align: center;
@@ -120,19 +108,14 @@ export default {
120
108
  -webkit-box-pack: justify;
121
109
  -webkit-justify-content: space-between;
122
110
  justify-content: space-between;
111
+ background-color: #ffffff;
112
+ color: #666666;
123
113
  }
124
- .cu-modal .cu-dialog > .cu-bar:first-child .action {
114
+ .cv-dialog-bottom__bar-left {
125
115
  min-width: 55px;
126
- margin-right: 0;
127
116
  min-height: 45px;
128
- }
129
- .cu-bar .action:first-child {
117
+ margin-right: 0;
130
118
  margin-left: 16px;
131
- }
132
- .cu-bar .action:last-child {
133
- margin-right: 16px !important;
134
- }
135
- .cu-bar .action {
136
119
  display: flex;
137
120
  -webkit-box-align: center;
138
121
  -webkit-align-items: center;
@@ -142,17 +125,13 @@ export default {
142
125
  -webkit-justify-content: center;
143
126
  justify-content: center;
144
127
  max-width: 100%;
145
- font-size: 16px;
146
- }
147
- .text-green {
148
- color: #39b54a;
128
+ color: #0081ff;
149
129
  }
150
- .cu-modal .cu-dialog > .cu-bar:first-child .action {
130
+ .cv-dialog-bottom__bar-right {
151
131
  min-width: 55px;
152
- margin-right: 0;
153
132
  min-height: 45px;
154
- }
155
- .cu-bar .action {
133
+ margin-right: 16px;
134
+ font-size: 16px;
156
135
  display: flex;
157
136
  -webkit-box-align: center;
158
137
  -webkit-align-items: center;
@@ -162,11 +141,9 @@ export default {
162
141
  -webkit-justify-content: center;
163
142
  justify-content: center;
164
143
  max-width: 100%;
144
+ color: #39b54a;
165
145
  }
166
- .text-blue {
167
- color: #0081ff;
168
- }
169
- .cv-dialog-body {
146
+ .cv-dialog-bottom__body {
170
147
  padding-top: 10px;
171
148
  max-height: 500px;
172
149
  overflow: auto;
@@ -1,11 +1,12 @@
1
1
  <template>
2
- <view class="cv-dialog-bottom cv-modal bottom-modal" :class="show ? 'show' : ''">
3
- <view class="cv-dialog">
4
- <view class="cv-bar bg-white">
5
- <view class="action text-blue" @tap="cancel">取消</view>
6
- <view class="action text-green" @tap="confirm">确定</view>
2
+ <view class="cv-dialog-full__wrap" :class="localShow ? 'show' : ''">
3
+ <view class="cv-dialog-full__box">
4
+ <view class="cv-dialog-full__bar">
5
+ <view class="cv-dialog-full__bar-left" v-if="showLeft" @tap="cancel">取消</view>
6
+ <view class="cv-dialog-full__bar-title"><slot name="title">{{ title }}</slot></view>
7
+ <view class="cv-dialog-full__bar-right" v-if="showRight" @tap="confirm">确定</view>
7
8
  </view>
8
- <view class="cv-dialog-body" :style="bodyClass">
9
+ <view class="cv-dialog-full__body" :style="bodyClass">
9
10
  <slot name="default" />
10
11
  </view>
11
12
  </view>
@@ -26,14 +27,34 @@ export default {
26
27
  bodyClass: {
27
28
  type: [String],
28
29
  default: ''
30
+ },
31
+ showLeft: {
32
+ type: Boolean,
33
+ default: true
34
+ },
35
+ showRight: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ title: {
40
+ type: [String],
41
+ default: ''
29
42
  }
30
43
  },
31
44
  watch: {},
32
45
  data() {
33
- return {};
46
+ return {
47
+ localShow: false
48
+ };
34
49
  },
35
50
  created() {},
36
51
  methods: {
52
+ open() {
53
+ this.localShow = true;
54
+ },
55
+ close() {
56
+ this.localShow = false;
57
+ },
37
58
  confirm() {
38
59
  this.onConfirm(true);
39
60
  },
@@ -47,15 +68,12 @@ export default {
47
68
  };
48
69
  </script>
49
70
  <style>
50
- .cv-modal.bottom-modal {
51
- left: 100%;
52
- }
53
- .cv-modal {
71
+ .cv-dialog-full__wrap {
54
72
  width: 100%;
55
73
  position: fixed;
56
74
  top: 0;
57
75
  bottom: 0;
58
- left: 0;
76
+ left: 100%;
59
77
  z-index: 999;
60
78
  opacity: 0;
61
79
  outline: 0;
@@ -66,47 +84,36 @@ export default {
66
84
  transition: all 0.2s ease-in-out 0s;
67
85
  pointer-events: none;
68
86
  }
69
- .cv-modal.bottom-modal.show {
87
+ .cv-dialog-full__wrap.show {
70
88
  left: 0;
71
- }
72
- .cv-modal.show {
73
89
  opacity: 1;
74
90
  transition-duration: 0.2s;
75
91
  overflow-x: hidden;
76
92
  overflow-y: auto;
77
93
  pointer-events: auto;
78
94
  }
79
- .cv-modal.bottom-modal::before {
80
- vertical-align: bottom;
81
- }
82
- .cv-modal::before {
95
+ .cv-dialog-full__wrap::before {
83
96
  content: '\200B';
84
97
  display: inline-block;
85
98
  height: 100%;
86
99
  vertical-align: middle;
100
+ vertical-align: bottom;
87
101
  }
88
- .cv-modal.bottom-modal .cv-dialog {
102
+ .cv-dialog-full__wrap .cv-dialog {
89
103
  width: 100%;
90
104
  border-radius: 0;
91
105
  height: 100%;
92
106
  }
93
- .cv-dialog {
94
- position: relative;
107
+ .cv-dialog-full__box {
95
108
  display: inline-block;
96
109
  vertical-align: middle;
97
- margin-left: auto;
98
- margin-right: auto;
99
- width: 375px;
110
+ width: 100%;
100
111
  max-width: 100%;
101
112
  background-color: #f8f8f8;
102
- border-radius: 5px;
103
113
  overflow: hidden;
114
+ height: 100%;
104
115
  }
105
- .bg-white {
106
- background-color: #ffffff;
107
- color: #666666;
108
- }
109
- .cv-bar {
116
+ .cv-dialog-full__bar {
110
117
  display: flex;
111
118
  position: relative;
112
119
  align-items: center;
@@ -114,49 +121,35 @@ export default {
114
121
  -webkit-box-pack: justify;
115
122
  -webkit-justify-content: space-between;
116
123
  justify-content: space-between;
124
+ background-color: #ffffff;
125
+ color: #666666;
126
+ padding: 0 10px;
127
+ font-size: 15px;
117
128
  }
118
- .cv-modal .cv-dialog > .cv-bar:first-child .action {
119
- min-width: 55px;
120
- margin-right: 0;
121
- min-height: 45px;
122
- }
123
- .cv-bar .action:first-child {
124
- margin-left: 16px;
125
- }
126
- .cv-bar .action:last-child {
127
- margin-right: 16px !important;
129
+ .cv-dialog-full__bar-title {
130
+ flex: 1;
131
+ display: flex;
132
+ justify-content: center;
133
+ font-size: 15px;
134
+ font-weight: 400;
128
135
  }
129
- .cv-bar .action {
136
+ .cv-dialog-full__bar-left {
130
137
  display: flex;
131
138
  align-items: center;
132
- height: 100%;
133
139
  justify-content: center;
134
- max-width: 100%;
135
- font-size: 16px;
136
- }
137
- .text-green {
138
- color: #39b54a;
139
- }
140
- .cv-modal .cv-dialog > .cv-bar:first-child .action {
141
140
  min-width: 55px;
142
- margin-right: 0;
143
- min-height: 45px;
141
+ color: #0081ff;
144
142
  }
145
- .cv-bar .action {
143
+ .cv-dialog-full__bar-right {
146
144
  display: flex;
147
145
  align-items: center;
148
- height: 100%;
149
- -webkit-box-pack: center;
150
- -webkit-justify-content: center;
151
146
  justify-content: center;
152
- max-width: 100%;
153
- }
154
- .text-blue {
155
- color: #0081ff;
147
+ min-width: 55px;
148
+ color: #39b54a;
156
149
  }
157
- .cv-dialog-body {
150
+ .cv-dialog-full__body {
158
151
  padding: 10px;
159
- height: calc(100% - 45px - 20px);
152
+ height: calc(100% - 45px);
160
153
  overflow: auto;
161
154
  background-color: #fff;
162
155
  }
@@ -6,16 +6,7 @@
6
6
  @touchmove.stop.prevent="stopPrevent"
7
7
  :style="{ backgroundColor: backgroundColor }"
8
8
  >
9
- <view
10
- class="mask-content"
11
- @click.stop.prevent="stopPrevent"
12
- :style="[
13
- {
14
- height: config.height,
15
- transform: transform
16
- }
17
- ]"
18
- >
9
+ <view class="mask-content" @click.stop.prevent="stopPrevent" :style="[{ height: config.height, transform: transform }]">
19
10
  <scroll-view class="view-content" scroll-y>
20
11
  <view class="share-header">分享到</view>
21
12
  <view class="share-list">
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="container">
2
+ <view class="up-share-container">
3
3
  <text class="up-share-title">分享到</text>
4
4
  <view class="up-share-list">
5
5
  <view class="up-share-item" hover-class="up-hover" :hover-stay-time="150" v-for="(item, index) in shareList" :key="index">
@@ -41,7 +41,7 @@ export default {
41
41
  };
42
42
  </script>
43
43
  <style scoped>
44
- .container {
44
+ .up-share-container {
45
45
  padding: 0;
46
46
  background-color: #e8e8e8;
47
47
  }
@@ -4,9 +4,9 @@
4
4
  <template v-for="(item, index) in menu" :key="index">
5
5
  <view class="first-menu" :class="{ on: showPage == index }" @tap="togglePage(index)">
6
6
  <text class="name" :style="{ color: color }">{{ item.name }}</text>
7
- <!-- <cv-icons type="arrow-type1-up" size="12" class="arrows" v-if="statusList[index].isActive" />
8
- <cv-icons type="arrow-type1-down" size="12" class="arrows" v-if="!statusList[index].isActive" /> -->
9
- <cv-icons type="arrow-type1-down" size="12" color="#aaa" :style="'transform:rotate(' + triangleDeg[index] + 'deg);'" />
7
+ <!-- <cv-icons type="arrowUp" size="12" class="arrows" v-if="statusList[index].isActive" />
8
+ <cv-icons type="arrowDown" size="12" class="arrows" v-if="!statusList[index].isActive" /> -->
9
+ <cv-icons type="arrowDown" size="12" color="#aaa" :style="'transform:rotate(' + triangleDeg[index] + 'deg);'" />
10
10
  </view>
11
11
  </template>
12
12
  </view>
@@ -212,8 +212,8 @@ export default {
212
212
  this.defaultActive.length > 0
213
213
  ? this.defaultActive
214
214
  : this.activeMenuArr.length > 0
215
- ? this.activeMenuArr
216
- : tmpMenuActiveArr;
215
+ ? this.activeMenuArr
216
+ : tmpMenuActiveArr;
217
217
  this.defaultActive = [];
218
218
  this.activeMenuArr = JSON.parse(JSON.stringify(tmpMenuActiveArr));
219
219
  this.shadowActiveMenuArr = JSON.parse(JSON.stringify(tmpMenuActiveArr));
@@ -641,7 +641,9 @@ export default {
641
641
  height: 13px;
642
642
  align-items: center;
643
643
  justify-content: center;
644
- transition: transform 0.2s linear, color 0.2s linear;
644
+ transition:
645
+ transform 0.2s linear,
646
+ color 0.2s linear;
645
647
  }
646
648
  .sub-menu-class {
647
649
  width: 100%;
@@ -1,12 +1,8 @@
1
- <!-- <text :style="{ color: color, 'font-size': size + 'px' }" class="cv-icons" :class="rotate ? 'cv-icons-turn' : ''">
1
+ <!-- <text :style="mergeIconStyle" class="cv-icons" :class="rotate ? 'cv-icons-turn' : ''">
2
2
  {{ icons[type] }}
3
3
  </text> -->
4
4
  <template>
5
- <text
6
- :style="{ color: color, 'font-size': size + 'px' }"
7
- class="cv-icon"
8
- :class="rotate ? 'cv-icons-turn' : 'cv-icon-' + type"
9
- ></text>
5
+ <text :style="mergeIconStyle" class="cv-icon" :class="rotate ? 'cv-icons-turn' : 'cv-icon-' + type"></text>
10
6
  </template>
11
7
 
12
8
  <script>
@@ -44,6 +40,21 @@ export default {
44
40
  }
45
41
  }
46
42
  },
43
+ computed: {
44
+ mergeIconStyle() {
45
+ let sizePx = '';
46
+ if (typeof this.size === 'string' && (this.size.includes('px') || this.size.includes('rpx'))) {
47
+ sizePx = this.size;
48
+ } else {
49
+ sizePx = `${parseFloat(this.size)}px`;
50
+ }
51
+ return {
52
+ color: this.color,
53
+ height: sizePx,
54
+ 'font-size': sizePx
55
+ };
56
+ }
57
+ },
47
58
  data() {
48
59
  return {
49
60
  // icons: icons
@@ -34,7 +34,7 @@
34
34
  </view>
35
35
  </view>
36
36
  </view>
37
- <cv-upload-image layout="more" maxlength="9" v-model="imageList" :src="imageList" :upApiFunc="upApiFunc" />
37
+ <cv-upload-image layout="more" maxlength="9" v-model="imageList" :src="imageList" />
38
38
  <view class="uni-list list-pd">
39
39
  <view class="uni-list-cell cell-pd">
40
40
  <view class="uni-uploader">
@@ -0,0 +1,159 @@
1
+ import { defineMixin } from '../../libs/vue';
2
+ import defProps from '../../libs/config/props.js';
3
+ export const props = defineMixin({
4
+ props: {
5
+ // 是否细边框
6
+ hairline: {
7
+ type: Boolean,
8
+ default: () => defProps.button.hairline
9
+ },
10
+ // 按钮的预置样式,info,primary,error,warning,success
11
+ type: {
12
+ type: String,
13
+ default: () => defProps.button.type
14
+ },
15
+ // 按钮尺寸,large,normal,small,mini
16
+ size: {
17
+ type: String,
18
+ default: () => defProps.button.size
19
+ },
20
+ // 按钮形状,circle(两边为半圆),square(带圆角)
21
+ shape: {
22
+ type: String,
23
+ default: () => defProps.button.shape
24
+ },
25
+ // 按钮是否镂空
26
+ plain: {
27
+ type: Boolean,
28
+ default: () => defProps.button.plain
29
+ },
30
+ // 是否禁止状态
31
+ disabled: {
32
+ type: Boolean,
33
+ default: () => defProps.button.disabled
34
+ },
35
+ // 是否加载中
36
+ loading: {
37
+ type: Boolean,
38
+ default: () => defProps.button.loading
39
+ },
40
+ // 加载中提示文字
41
+ loadingText: {
42
+ type: [String, Number],
43
+ default: () => defProps.button.loadingText
44
+ },
45
+ // 加载状态图标类型
46
+ loadingMode: {
47
+ type: String,
48
+ default: () => defProps.button.loadingMode
49
+ },
50
+ // 加载图标大小
51
+ loadingSize: {
52
+ type: [String, Number],
53
+ default: () => defProps.button.loadingSize
54
+ },
55
+ // 开放能力,具体请看uniapp稳定关于button组件部分说明
56
+ // https://uniapp.dcloud.io/component/button
57
+ openType: {
58
+ type: String,
59
+ default: () => defProps.button.openType
60
+ },
61
+ // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
62
+ // 取值为submit(提交表单),reset(重置表单)
63
+ formType: {
64
+ type: String,
65
+ default: () => defProps.button.formType
66
+ },
67
+ // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
68
+ // 只微信小程序、QQ小程序有效
69
+ appParameter: {
70
+ type: String,
71
+ default: () => defProps.button.appParameter
72
+ },
73
+ // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
74
+ hoverStopPropagation: {
75
+ type: Boolean,
76
+ default: () => defProps.button.hoverStopPropagation
77
+ },
78
+ // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
79
+ lang: {
80
+ type: String,
81
+ default: () => defProps.button.lang
82
+ },
83
+ // 会话来源,open-type="contact"时有效。只微信小程序有效
84
+ sessionFrom: {
85
+ type: String,
86
+ default: () => defProps.button.sessionFrom
87
+ },
88
+ // 会话内消息卡片标题,open-type="contact"时有效
89
+ // 默认当前标题,只微信小程序有效
90
+ sendMessageTitle: {
91
+ type: String,
92
+ default: () => defProps.button.sendMessageTitle
93
+ },
94
+ // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
95
+ // 默认当前分享路径,只微信小程序有效
96
+ sendMessagePath: {
97
+ type: String,
98
+ default: () => defProps.button.sendMessagePath
99
+ },
100
+ // 会话内消息卡片图片,open-type="contact"时有效
101
+ // 默认当前页面截图,只微信小程序有效
102
+ sendMessageImg: {
103
+ type: String,
104
+ default: () => defProps.button.sendMessageImg
105
+ },
106
+ // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
107
+ // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
108
+ showMessageCard: {
109
+ type: Boolean,
110
+ default: () => defProps.button.showMessageCard
111
+ },
112
+ // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
113
+ dataName: {
114
+ type: String,
115
+ default: () => defProps.button.dataName
116
+ },
117
+ // 节流,一定时间内只能触发一次
118
+ throttleTime: {
119
+ type: [String, Number],
120
+ default: () => defProps.button.throttleTime
121
+ },
122
+ // 按住后多久出现点击态,单位毫秒
123
+ hoverStartTime: {
124
+ type: [String, Number],
125
+ default: () => defProps.button.hoverStartTime
126
+ },
127
+ // 手指松开后点击态保留时间,单位毫秒
128
+ hoverStayTime: {
129
+ type: [String, Number],
130
+ default: () => defProps.button.hoverStayTime
131
+ },
132
+ // 按钮文字,之所以通过props传入,是因为slot传入的话
133
+ // nvue中无法控制文字的样式
134
+ text: {
135
+ type: [String, Number],
136
+ default: () => defProps.button.text
137
+ },
138
+ // 按钮图标
139
+ icon: {
140
+ type: String,
141
+ default: () => defProps.button.icon
142
+ },
143
+ // 按钮图标
144
+ iconColor: {
145
+ type: String,
146
+ default: () => defProps.button.icon
147
+ },
148
+ // 按钮颜色,支持传入linear-gradient渐变色
149
+ color: {
150
+ type: String,
151
+ default: () => defProps.button.color
152
+ },
153
+ // 停止冒泡
154
+ stop: {
155
+ type: Boolean,
156
+ default: () => defProps.button.stop
157
+ }
158
+ }
159
+ });
@@ -2,6 +2,13 @@ import { defineMixin } from '../../libs/vue';
2
2
  import defProps from '../../libs/config/props.js';
3
3
  export const props = defineMixin({
4
4
  props: {
5
+ /**
6
+ * 自动加载禁用
7
+ */
8
+ autoLoading: {
9
+ type: Boolean,
10
+ default: false
11
+ },
5
12
  // 是否细边框
6
13
  hairline: {
7
14
  type: Boolean,