@10yun/cv-mobile-ui 0.5.35 → 0.5.37
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/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/QRCodeAlg.js +1046 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/QS-SharePoster.js +1309 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/QS-SharePoster2.js +1575 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/app.js +572 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/app2.js +570 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/QS-SharePoster/image-tools.js +168 -0
- package/js-sdk/QuShe-SharerPoster_3.1.8/package.json +12 -0
- package/js-sdk/Sansnn-uQRCode/uqrcode.js +1295 -0
- package/js-sdk/ican-H5Api/ican-H5Api.js +669 -0
- package/package.json +1 -1
- package/ui-cv/components/cv-editor-quill/index.js +154 -133
- package/uni-ui/lib/uni-badge/uni-badge.vue +3 -1
- package/uni-ui/lib/uni-list/uni-refresh.wxs +1 -1
- package/uni-ui/lib/uni-load-more/uni-load-more.vue +3 -0
- package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +355 -213
- package/uview-plus/components/u-qrcode/qrcode.js +4 -0
- package/uview-plus/libs/ctocode/date.js +17 -0
- package/uview-plus/libs/ctocode/index.js +19 -0
|
@@ -1,225 +1,367 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
2
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
3
|
+
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
|
|
4
|
+
<view class="uni-swipe">
|
|
5
|
+
<!-- #ifdef MP-WEIXIN || VUE3 -->
|
|
6
|
+
<view
|
|
7
|
+
class="uni-swipe_box"
|
|
8
|
+
:change:prop="wxsswipe.showWatch"
|
|
9
|
+
:prop="is_show"
|
|
10
|
+
:data-threshold="threshold"
|
|
11
|
+
:data-disabled="disabled"
|
|
12
|
+
@touchstart="wxsswipe.touchstart"
|
|
13
|
+
@touchmove="wxsswipe.touchmove"
|
|
14
|
+
@touchend="wxsswipe.touchend"
|
|
15
|
+
>
|
|
16
|
+
<view class="uni-swipe_button-group button-group--left">
|
|
17
|
+
<slot name="left">
|
|
18
|
+
<view
|
|
19
|
+
v-for="(item, index) in leftOptions"
|
|
20
|
+
:key="index"
|
|
21
|
+
:style="{
|
|
22
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
23
|
+
}"
|
|
24
|
+
class="uni-swipe_button button-hock"
|
|
25
|
+
@touchstart="appTouchStart"
|
|
26
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
27
|
+
@click.stop="onClickForPC(index, item, 'left')"
|
|
28
|
+
>
|
|
29
|
+
<text
|
|
30
|
+
class="uni-swipe_button-text"
|
|
31
|
+
:style="{
|
|
32
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
33
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
34
|
+
}"
|
|
35
|
+
>
|
|
36
|
+
{{ item.text }}
|
|
37
|
+
</text>
|
|
38
|
+
</view>
|
|
39
|
+
</slot>
|
|
40
|
+
</view>
|
|
41
|
+
<view class="uni-swipe_text--center">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="uni-swipe_button-group button-group--right">
|
|
45
|
+
<slot name="right">
|
|
46
|
+
<view
|
|
47
|
+
v-for="(item, index) in rightOptions"
|
|
48
|
+
:key="index"
|
|
49
|
+
:style="{
|
|
50
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
51
|
+
}"
|
|
52
|
+
class="uni-swipe_button button-hock"
|
|
53
|
+
@touchstart="appTouchStart"
|
|
54
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
55
|
+
@click.stop="onClickForPC(index, item, 'right')"
|
|
56
|
+
>
|
|
57
|
+
<text
|
|
58
|
+
class="uni-swipe_button-text"
|
|
59
|
+
:style="{
|
|
60
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
61
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
62
|
+
}"
|
|
63
|
+
>
|
|
64
|
+
{{ item.text }}
|
|
65
|
+
</text>
|
|
66
|
+
</view>
|
|
67
|
+
</slot>
|
|
68
|
+
</view>
|
|
69
|
+
</view>
|
|
70
|
+
<!-- #endif -->
|
|
71
|
+
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
|
72
|
+
<view
|
|
73
|
+
class="uni-swipe_box"
|
|
74
|
+
:change:prop="renderswipe.showWatch"
|
|
75
|
+
:prop="is_show"
|
|
76
|
+
:data-threshold="threshold"
|
|
77
|
+
:data-disabled="disabled + ''"
|
|
78
|
+
@touchstart="renderswipe.touchstart"
|
|
79
|
+
@touchmove="renderswipe.touchmove"
|
|
80
|
+
@touchend="renderswipe.touchend"
|
|
81
|
+
>
|
|
82
|
+
<view class="uni-swipe_button-group button-group--left">
|
|
83
|
+
<slot name="left">
|
|
84
|
+
<view
|
|
85
|
+
v-for="(item, index) in leftOptions"
|
|
86
|
+
:key="index"
|
|
87
|
+
:style="{
|
|
88
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
89
|
+
}"
|
|
90
|
+
class="uni-swipe_button button-hock"
|
|
91
|
+
@touchstart="appTouchStart"
|
|
92
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
93
|
+
@click.stop="onClickForPC(index, item, 'left')"
|
|
94
|
+
>
|
|
95
|
+
<text
|
|
96
|
+
class="uni-swipe_button-text"
|
|
97
|
+
:style="{
|
|
98
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
99
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
100
|
+
}"
|
|
101
|
+
>
|
|
102
|
+
{{ item.text }}
|
|
103
|
+
</text>
|
|
104
|
+
</view>
|
|
105
|
+
</slot>
|
|
106
|
+
</view>
|
|
107
|
+
<view class="uni-swipe_text--center">
|
|
108
|
+
<slot></slot>
|
|
109
|
+
</view>
|
|
110
|
+
<view class="uni-swipe_button-group button-group--right">
|
|
111
|
+
<slot name="right">
|
|
112
|
+
<view
|
|
113
|
+
v-for="(item, index) in rightOptions"
|
|
114
|
+
:key="index"
|
|
115
|
+
:style="{
|
|
116
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
117
|
+
}"
|
|
118
|
+
class="uni-swipe_button button-hock"
|
|
119
|
+
@touchstart="appTouchStart"
|
|
120
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
121
|
+
@click.stop="onClickForPC(index, item, 'right')"
|
|
122
|
+
>
|
|
123
|
+
<text
|
|
124
|
+
class="uni-swipe_button-text"
|
|
125
|
+
:style="{
|
|
126
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
127
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
128
|
+
}"
|
|
129
|
+
>
|
|
130
|
+
{{ item.text }}
|
|
131
|
+
</text>
|
|
132
|
+
</view>
|
|
133
|
+
</slot>
|
|
134
|
+
</view>
|
|
135
|
+
</view>
|
|
136
|
+
<!-- #endif -->
|
|
137
|
+
</view>
|
|
138
|
+
<!-- #endif -->
|
|
139
|
+
<!-- app nvue端 使用 bindingx -->
|
|
140
|
+
<!-- #ifdef APP-NVUE -->
|
|
141
|
+
<view ref="selector-box--hock" class="uni-swipe" @horizontalpan="touchstart" @touchend="touchend">
|
|
142
|
+
<view ref="selector-left-button--hock" class="uni-swipe_button-group button-group--left">
|
|
143
|
+
<slot name="left">
|
|
144
|
+
<view
|
|
145
|
+
v-for="(item, index) in leftOptions"
|
|
146
|
+
:key="index"
|
|
147
|
+
:style="{
|
|
148
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
149
|
+
}"
|
|
150
|
+
class="uni-swipe_button button-hock"
|
|
151
|
+
@click.stop="onClick(index, item, 'left')"
|
|
152
|
+
>
|
|
153
|
+
<text
|
|
154
|
+
class="uni-swipe_button-text"
|
|
155
|
+
:style="{
|
|
156
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
157
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
158
|
+
}"
|
|
159
|
+
>
|
|
160
|
+
{{ item.text }}
|
|
161
|
+
</text>
|
|
162
|
+
</view>
|
|
163
|
+
</slot>
|
|
164
|
+
</view>
|
|
165
|
+
<view ref="selector-right-button--hock" class="uni-swipe_button-group button-group--right">
|
|
166
|
+
<slot name="right">
|
|
167
|
+
<view
|
|
168
|
+
v-for="(item, index) in rightOptions"
|
|
169
|
+
:key="index"
|
|
170
|
+
:style="{
|
|
171
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
172
|
+
}"
|
|
173
|
+
class="uni-swipe_button button-hock"
|
|
174
|
+
@click.stop="onClick(index, item, 'right')"
|
|
175
|
+
>
|
|
176
|
+
<text
|
|
177
|
+
class="uni-swipe_button-text"
|
|
178
|
+
:style="{
|
|
179
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
180
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
181
|
+
}"
|
|
182
|
+
>
|
|
183
|
+
{{ item.text }}
|
|
184
|
+
</text>
|
|
185
|
+
</view>
|
|
186
|
+
</slot>
|
|
187
|
+
</view>
|
|
188
|
+
<view ref="selector-content--hock" class="uni-swipe_box">
|
|
189
|
+
<slot></slot>
|
|
190
|
+
</view>
|
|
191
|
+
</view>
|
|
192
|
+
<!-- #endif -->
|
|
193
|
+
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
|
|
194
|
+
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
|
|
195
|
+
<view class="uni-swipe">
|
|
196
|
+
<view
|
|
197
|
+
class="uni-swipe_box"
|
|
198
|
+
@touchstart="touchstart"
|
|
199
|
+
@touchmove="touchmove"
|
|
200
|
+
@touchend="touchend"
|
|
201
|
+
:style="{ transform: moveLeft }"
|
|
202
|
+
:class="{ ani: ani }"
|
|
203
|
+
>
|
|
204
|
+
<view class="uni-swipe_button-group button-group--left" :class="[elClass]">
|
|
205
|
+
<slot name="left">
|
|
206
|
+
<view
|
|
207
|
+
v-for="(item, index) in leftOptions"
|
|
208
|
+
:key="index"
|
|
209
|
+
:style="{
|
|
210
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
211
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
212
|
+
}"
|
|
213
|
+
class="uni-swipe_button button-hock"
|
|
214
|
+
@touchstart="appTouchStart"
|
|
215
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
216
|
+
>
|
|
217
|
+
<text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">
|
|
218
|
+
{{ item.text }}
|
|
219
|
+
</text>
|
|
220
|
+
</view>
|
|
221
|
+
</slot>
|
|
222
|
+
</view>
|
|
223
|
+
<slot></slot>
|
|
224
|
+
<view class="uni-swipe_button-group button-group--right" :class="[elClass]">
|
|
225
|
+
<slot name="right">
|
|
226
|
+
<view
|
|
227
|
+
v-for="(item, index) in rightOptions"
|
|
228
|
+
:key="index"
|
|
229
|
+
:style="{
|
|
230
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
231
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
|
|
232
|
+
}"
|
|
233
|
+
@touchstart="appTouchStart"
|
|
234
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
235
|
+
class="uni-swipe_button button-hock"
|
|
236
|
+
>
|
|
237
|
+
<text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">
|
|
238
|
+
{{ item.text }}
|
|
239
|
+
</text>
|
|
240
|
+
</view>
|
|
241
|
+
</slot>
|
|
242
|
+
</view>
|
|
243
|
+
</view>
|
|
244
|
+
</view>
|
|
245
|
+
<!-- #endif -->
|
|
104
246
|
</template>
|
|
105
247
|
<script src="./wx.wxs" module="wxsswipe" lang="wxs"></script>
|
|
106
248
|
<script module="renderswipe" lang="renderjs">
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
249
|
+
import render from './render.js'
|
|
250
|
+
export default {
|
|
251
|
+
mounted(e, ins, owner) {
|
|
252
|
+
this.state = {}
|
|
253
|
+
},
|
|
254
|
+
methods: {
|
|
255
|
+
showWatch(newVal, oldVal, ownerInstance, instance) {
|
|
256
|
+
render.showWatch(newVal, oldVal, ownerInstance, instance, this)
|
|
111
257
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
render.showWatch(newVal, oldVal, ownerInstance, instance, this)
|
|
115
|
-
},
|
|
116
|
-
touchstart(e, ownerInstance) {
|
|
117
|
-
render.touchstart(e, ownerInstance, this)
|
|
118
|
-
},
|
|
119
|
-
touchmove(e, ownerInstance) {
|
|
120
|
-
render.touchmove(e, ownerInstance, this)
|
|
121
|
-
},
|
|
122
|
-
touchend(e, ownerInstance) {
|
|
123
|
-
render.touchend(e, ownerInstance, this)
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
</script>
|
|
128
|
-
<script>
|
|
129
|
-
import mpwxs from './mpwxs'
|
|
130
|
-
import bindingx from './bindingx.js'
|
|
131
|
-
import mpother from './mpother'
|
|
132
|
-
/**
|
|
133
|
-
* SwipeActionItem 滑动操作子组件
|
|
134
|
-
* @description 通过滑动触发选项的容器
|
|
135
|
-
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
|
136
|
-
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
|
137
|
-
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
|
138
|
-
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
|
139
|
-
* @property {Number} threshold 滑动缺省值
|
|
140
|
-
* @property {Array} leftOptions 左侧选项内容及样式
|
|
141
|
-
* @property {Array} rgihtOptions 右侧选项内容及样式
|
|
142
|
-
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
|
143
|
-
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
|
144
|
-
*/
|
|
145
|
-
export default {
|
|
146
|
-
mixins: [mpwxs, bindingx, mpother],
|
|
147
|
-
emits: ['click', 'change'],
|
|
148
|
-
props: {
|
|
149
|
-
// 控制开关
|
|
150
|
-
show: {
|
|
151
|
-
type: String,
|
|
152
|
-
default: 'none'
|
|
153
|
-
},
|
|
154
|
-
// 禁用
|
|
155
|
-
disabled: {
|
|
156
|
-
type: Boolean,
|
|
157
|
-
default: false
|
|
158
|
-
},
|
|
159
|
-
// 是否自动关闭
|
|
160
|
-
autoClose: {
|
|
161
|
-
type: Boolean,
|
|
162
|
-
default: true
|
|
163
|
-
},
|
|
164
|
-
// 滑动缺省距离
|
|
165
|
-
threshold: {
|
|
166
|
-
type: Number,
|
|
167
|
-
default: 20
|
|
168
|
-
},
|
|
169
|
-
// 左侧按钮内容
|
|
170
|
-
leftOptions: {
|
|
171
|
-
type: Array,
|
|
172
|
-
default () {
|
|
173
|
-
return []
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
// 右侧按钮内容
|
|
177
|
-
rightOptions: {
|
|
178
|
-
type: Array,
|
|
179
|
-
default () {
|
|
180
|
-
return []
|
|
181
|
-
}
|
|
182
|
-
}
|
|
258
|
+
touchstart(e, ownerInstance) {
|
|
259
|
+
render.touchstart(e, ownerInstance, this)
|
|
183
260
|
},
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
destroyed() {
|
|
187
|
-
if (this.__isUnmounted) return
|
|
188
|
-
this.uninstall()
|
|
261
|
+
touchmove(e, ownerInstance) {
|
|
262
|
+
render.touchmove(e, ownerInstance, this)
|
|
189
263
|
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// TODO vue3
|
|
193
|
-
unmounted() {
|
|
194
|
-
this.__isUnmounted = true
|
|
195
|
-
this.uninstall()
|
|
196
|
-
},
|
|
197
|
-
// #endif
|
|
198
|
-
methods: {
|
|
199
|
-
uninstall() {
|
|
200
|
-
if (this.swipeaction) {
|
|
201
|
-
this.swipeaction.children.forEach((item, index) => {
|
|
202
|
-
if (item === this) {
|
|
203
|
-
this.swipeaction.children.splice(index, 1)
|
|
204
|
-
}
|
|
205
|
-
})
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
/**
|
|
209
|
-
* 获取父元素实例
|
|
210
|
-
*/
|
|
211
|
-
getSwipeAction(name = 'uniSwipeAction') {
|
|
212
|
-
let parent = this.$parent;
|
|
213
|
-
let parentName = parent.$options.name;
|
|
214
|
-
while (parentName !== name) {
|
|
215
|
-
parent = parent.$parent;
|
|
216
|
-
if (!parent) return false;
|
|
217
|
-
parentName = parent.$options.name;
|
|
218
|
-
}
|
|
219
|
-
return parent;
|
|
220
|
-
}
|
|
264
|
+
touchend(e, ownerInstance) {
|
|
265
|
+
render.touchend(e, ownerInstance, this)
|
|
221
266
|
}
|
|
222
267
|
}
|
|
268
|
+
}
|
|
269
|
+
</script>
|
|
270
|
+
<script>
|
|
271
|
+
import mpwxs from './mpwxs';
|
|
272
|
+
import bindingx from './bindingx.js';
|
|
273
|
+
import mpother from './mpother';
|
|
274
|
+
/**
|
|
275
|
+
* SwipeActionItem 滑动操作子组件
|
|
276
|
+
* @description 通过滑动触发选项的容器
|
|
277
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
|
278
|
+
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
|
279
|
+
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
|
280
|
+
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
|
281
|
+
* @property {Number} threshold 滑动缺省值
|
|
282
|
+
* @property {Array} leftOptions 左侧选项内容及样式
|
|
283
|
+
* @property {Array} rgihtOptions 右侧选项内容及样式
|
|
284
|
+
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
|
285
|
+
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
|
286
|
+
*/
|
|
287
|
+
export default {
|
|
288
|
+
mixins: [mpwxs, bindingx, mpother],
|
|
289
|
+
emits: ['click', 'change'],
|
|
290
|
+
props: {
|
|
291
|
+
// 控制开关
|
|
292
|
+
show: {
|
|
293
|
+
type: String,
|
|
294
|
+
default: 'none'
|
|
295
|
+
},
|
|
296
|
+
// 禁用
|
|
297
|
+
disabled: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: false
|
|
300
|
+
},
|
|
301
|
+
// 是否自动关闭
|
|
302
|
+
autoClose: {
|
|
303
|
+
type: Boolean,
|
|
304
|
+
default: true
|
|
305
|
+
},
|
|
306
|
+
// 滑动缺省距离
|
|
307
|
+
threshold: {
|
|
308
|
+
type: Number,
|
|
309
|
+
default: 20
|
|
310
|
+
},
|
|
311
|
+
// 左侧按钮内容
|
|
312
|
+
leftOptions: {
|
|
313
|
+
type: Array,
|
|
314
|
+
default() {
|
|
315
|
+
return [];
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
// 右侧按钮内容
|
|
319
|
+
rightOptions: {
|
|
320
|
+
type: Array,
|
|
321
|
+
default() {
|
|
322
|
+
return [];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
// #ifndef VUE3
|
|
327
|
+
// TODO vue2
|
|
328
|
+
destroyed() {
|
|
329
|
+
if (this.__isUnmounted) return;
|
|
330
|
+
this.uninstall();
|
|
331
|
+
},
|
|
332
|
+
// #endif
|
|
333
|
+
// #ifdef VUE3
|
|
334
|
+
// TODO vue3
|
|
335
|
+
unmounted() {
|
|
336
|
+
this.__isUnmounted = true;
|
|
337
|
+
this.uninstall();
|
|
338
|
+
},
|
|
339
|
+
// #endif
|
|
340
|
+
methods: {
|
|
341
|
+
uninstall() {
|
|
342
|
+
if (this.swipeaction) {
|
|
343
|
+
this.swipeaction.children.forEach((item, index) => {
|
|
344
|
+
if (item === this) {
|
|
345
|
+
this.swipeaction.children.splice(index, 1);
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
/**
|
|
351
|
+
* 获取父元素实例
|
|
352
|
+
*/
|
|
353
|
+
getSwipeAction(name = 'uniSwipeAction') {
|
|
354
|
+
let parent = this.$parent;
|
|
355
|
+
let parentName = parent.$options.name;
|
|
356
|
+
while (parentName !== name) {
|
|
357
|
+
parent = parent.$parent;
|
|
358
|
+
if (!parent) return false;
|
|
359
|
+
parentName = parent.$options.name;
|
|
360
|
+
}
|
|
361
|
+
return parent;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
};
|
|
223
365
|
</script>
|
|
224
366
|
<style>
|
|
225
367
|
@import 'style.css';
|
|
@@ -1031,6 +1031,7 @@ let QRCode = {};
|
|
|
1031
1031
|
image: '',
|
|
1032
1032
|
imageSize: 30,
|
|
1033
1033
|
canvasId: opt.canvasId,
|
|
1034
|
+
// TODO 改动的
|
|
1034
1035
|
nvueContext: opt.nvueContext,
|
|
1035
1036
|
context: opt.context,
|
|
1036
1037
|
usingComponents: opt.usingComponents,
|
|
@@ -1091,6 +1092,7 @@ let QRCode = {};
|
|
|
1091
1092
|
mask: true
|
|
1092
1093
|
});
|
|
1093
1094
|
}
|
|
1095
|
+
// TODO 改动的
|
|
1094
1096
|
var ctx = '';
|
|
1095
1097
|
if (options.nvueContext) {
|
|
1096
1098
|
ctx = options.nvueContext;
|
|
@@ -1147,6 +1149,7 @@ let QRCode = {};
|
|
|
1147
1149
|
ctx.draw(true, () => {
|
|
1148
1150
|
// 保存到临时区域
|
|
1149
1151
|
setTimeout(() => {
|
|
1152
|
+
// TODO 改动的
|
|
1150
1153
|
if (options.nvueContext) {
|
|
1151
1154
|
ctx.toTempFilePath(
|
|
1152
1155
|
0,
|
|
@@ -1217,6 +1220,7 @@ let QRCode = {};
|
|
|
1217
1220
|
}
|
|
1218
1221
|
};
|
|
1219
1222
|
QRCode.prototype.clear = function (fn) {
|
|
1223
|
+
// TODO 改动的
|
|
1220
1224
|
var ctx = '';
|
|
1221
1225
|
if (options.nvueContext) {
|
|
1222
1226
|
ctx = options.nvueContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否在日期范围内
|
|
3
|
+
* @param {*} monthStr
|
|
4
|
+
* @param {*} startDateStr
|
|
5
|
+
* @param {*} endDateStr
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function cc_date_in_scope(monthStr, startDateStr, endDateStr) {
|
|
9
|
+
// 将月份字符串转换为日期对象(当月第一天)
|
|
10
|
+
const [year, month] = monthStr.split('-').map(Number);
|
|
11
|
+
const targetDate = new Date(year, month - 1, 1); // 月份从0开始
|
|
12
|
+
// 将日期字符串转换为日期对象
|
|
13
|
+
const startDate = new Date(startDateStr);
|
|
14
|
+
const endDate = new Date(endDateStr);
|
|
15
|
+
// 比较日期
|
|
16
|
+
return targetDate >= startDate && targetDate <= endDate;
|
|
17
|
+
}
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
+
export * from './date.js';
|
|
1
2
|
import { toast } from '../function/index.js';
|
|
2
3
|
import { colorToRgba } from '../function/colorGradient.js';
|
|
3
4
|
export function cc_toast(title, duration = 1600) {
|
|
4
5
|
toast(title, duration);
|
|
5
6
|
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 判断是否在微信中
|
|
10
|
+
* 浏览器判断是否微信
|
|
11
|
+
* 是否微信客户端
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export function cc_isWechat() {
|
|
15
|
+
let ua = navigator.userAgent.toLowerCase() || window.navigator.userAgent.toLowerCase();
|
|
16
|
+
let ua_match1 = String(ua.match(/MicroMessenger/i));
|
|
17
|
+
let ua_match2 = ua.match(/micromessenger/i);
|
|
18
|
+
let ua_match3 = ua.match(/MicroMessenger/i);
|
|
19
|
+
if (ua_match1 === 'micromessenger' || ua_match2 == 'micromessenger' || ua_match3 == 'micromessenger') {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
6
25
|
/**
|
|
7
26
|
* 判断是否为空
|
|
8
27
|
*/
|