@10yun/cv-mobile-ui 0.5.62 → 0.5.64
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/other/uCharts-uniapp/index.js +2 -0
- package/other/uCharts-uniapp/package.json +42 -0
- package/other/{qiun-data-charts/js_sdk → uCharts-uniapp}/u-charts/config-echarts.js +421 -421
- package/other/{qiun-data-charts → uCharts-uniapp/u-charts}/license.md +201 -201
- package/other/uCharts-uniapp/u-charts/package.json +19 -0
- package/other/{qiun-data-charts/readme.md → uCharts-uniapp/u-charts/readme-npm.md} +57 -63
- package/other/{qiun-data-charts/js_sdk → uCharts-uniapp}/u-charts/readme.md +4 -4
- package/other/{qiun-data-charts/js_sdk → uCharts-uniapp}/u-charts/u-charts.js +7661 -7661
- package/other/{qiun-data-charts/js_sdk → uCharts-uniapp}/u-charts/u-charts.min.js +1 -1
- package/package.json +1 -1
- package/plugins/uni-extend.js +10 -10
- package/ui-cv/components/cv-filter-hm/cv-filter-hm.vue +134 -167
- package/ui-fireui/components/u-action-sheet/u-action-sheet.vue +46 -16
- package/ui-fireui/components/u-alert/u-alert.vue +11 -5
- package/ui-fireui/components/u-badge/u-badge.vue +52 -69
- package/ui-fireui/components/u-bottom-navigation/u-bottom-navigation.vue +28 -20
- package/ui-fireui/components/u-bottom-popup/u-bottom-popup.vue +40 -11
- package/ui-fireui/components/u-bubble-popup/u-bubble-popup.vue +3 -6
- package/ui-fireui/components/u-button/u-button.vue +262 -259
- package/ui-fireui/components/u-calendar/u-calendar.vue +227 -44
- package/ui-fireui/components/u-calendar/u-calendar2.js +562 -0
- package/ui-fireui/components/u-card/u-card.vue +50 -32
- package/ui-fireui/components/u-cascade-selection/u-cascade-selection.vue +197 -74
- package/ui-fireui/components/u-circular-progress/u-circular-progress.vue +324 -0
- package/ui-fireui/components/u-clipboard2/tui-clipboard.js +53 -0
- package/ui-fireui/components/u-collapse/u-collapse.vue +8 -8
- package/ui-fireui/components/u-config/index.js +129 -0
- package/ui-fireui/components/u-count-down/u-count-down.vue +124 -19
- package/ui-fireui/components/u-datetime/u-datetime.vue +416 -176
- package/ui-fireui/components/u-divider/u-divider.vue +3 -3
- package/ui-fireui/components/u-drawer/u-drawer.vue +55 -12
- package/ui-fireui/components/u-dropdown-list/u-dropdown-list.vue +103 -0
- package/ui-fireui/components/u-fab/u-fab.vue +344 -0
- package/ui-fireui/components/u-footer/u-footer.vue +148 -0
- package/ui-fireui/components/u-grid/u-grid.vue +2 -8
- package/ui-fireui/components/u-grid-item/u-grid-item.vue +22 -5
- package/ui-fireui/components/u-icon/u-icon-new.js +190 -0
- package/ui-fireui/components/u-icon/u-icon-new.vue +100 -0
- package/ui-fireui/components/u-image-cropper/u-image-cropper.vue +1144 -0
- package/ui-fireui/components/u-image-group/u-image-group.vue +164 -0
- package/ui-fireui/components/u-keyboard/u-keyboard.vue +3 -2
- package/ui-fireui/components/u-keyboard-input/u-keyboard-input.vue +1 -1
- package/ui-fireui/components/u-list-cell/u-list-cell.vue +82 -72
- package/ui-fireui/components/u-list-view/u-list-view.vue +33 -8
- package/ui-fireui/components/u-loading/u-loading.vue +107 -27
- package/ui-fireui/components/u-loadmore/u-loadmore.vue +21 -3
- package/ui-fireui/components/u-modal/u-modal.vue +140 -176
- package/ui-fireui/components/u-navigation-bar/u-navigation-bar.vue +121 -28
- package/ui-fireui/components/u-no-data/u-no-data.vue +58 -20
- package/ui-fireui/components/u-nomore/u-nomore.vue +5 -4
- package/ui-fireui/components/u-numberbox/u-numberbox.vue +88 -45
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.vue +94 -36
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.wxs +27 -17
- package/ui-fireui/components/u-rate/u-rate.vue +197 -0
- package/ui-fireui/components/u-round-progress/u-round-progress.vue +62 -42
- package/ui-fireui/components/u-scroll-top/u-scroll-top.vue +4 -3
- package/ui-fireui/components/u-section/u-section.vue +149 -0
- package/ui-fireui/components/u-skeleton/u-skeleton.vue +37 -6
- package/ui-fireui/components/u-steps/u-steps.vue +110 -27
- package/ui-fireui/components/u-sticky/u-sticky.vue +35 -21
- package/ui-fireui/components/u-sticky-wxs/u-sticky-wxs.vue +7 -4
- package/ui-fireui/components/u-sticky-wxs/u-sticky.wxs +39 -36
- package/ui-fireui/components/u-swipe-action/u-swipe-action.vue +76 -19
- package/ui-fireui/components/u-tabbar/u-tabbar.vue +71 -38
- package/ui-fireui/components/u-tabs/u-tabs.vue +133 -51
- package/ui-fireui/components/u-tag/u-tag.vue +109 -226
- package/ui-fireui/components/u-time-axis/u-time-axis.vue +1 -1
- package/ui-fireui/components/u-timeaxis-item/u-timeaxis-item.vue +1 -1
- package/ui-fireui/components/u-tips/u-tips.vue +35 -15
- package/ui-fireui/components/u-toast/u-toast.vue +9 -5
- package/ui-fireui/components/u-top-dropdown/u-top-dropdown.vue +8 -6
- package/ui-fireui/components/u-upload/u-upload-old.vue +462 -0
- package/ui-fireui/components/u-upload/u-upload.vue +648 -446
- package/ui-fireui/components/u-white-space/u-white-space.vue +68 -0
- package/ui-fireui/components/u-wing-blank/u-wing-blank.vue +100 -0
- package/uview-plus/libs/ctocode/index.js +1 -0
- package/uview-plus/libs/ctocode/richText.js +0 -1
- package/other/qiun-data-charts/changelog.md +0 -320
- package/other/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue +0 -1618
- package/other/qiun-data-charts/components/qiun-error/qiun-error.vue +0 -46
- package/other/qiun-data-charts/components/qiun-loading/loading1.vue +0 -162
- package/other/qiun-data-charts/components/qiun-loading/loading2.vue +0 -170
- package/other/qiun-data-charts/components/qiun-loading/loading3.vue +0 -173
- package/other/qiun-data-charts/components/qiun-loading/loading4.vue +0 -222
- package/other/qiun-data-charts/components/qiun-loading/loading5.vue +0 -229
- package/other/qiun-data-charts/components/qiun-loading/qiun-loading.vue +0 -36
- package/other/qiun-data-charts/js_sdk2/app-echarts.min.js +0 -23
- package/other/qiun-data-charts/js_sdk2/h5-echarts.min.js +0 -23
- package/other/qiun-data-charts/package.json +0 -81
- package/other/qiun-data-charts/static/app-plus/echarts.min.js +0 -23
- package/other/qiun-data-charts/static/h5/echarts.min.js +0 -23
- package/other/qiun-data-charts_2.5.0-20230101_example/App.vue +0 -20
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni-icons.css +0 -542
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni.css +0 -246
- package/other/qiun-data-charts_2.5.0-20230101_example/components/qiun-title-bar/qiun-title-bar.vue +0 -51
- package/other/qiun-data-charts_2.5.0-20230101_example/components/test-charts/test-charts.vue +0 -48
- package/other/qiun-data-charts_2.5.0-20230101_example/main.js +0 -13
- package/other/qiun-data-charts_2.5.0-20230101_example/manifest.json +0 -75
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/demodata.json +0 -448
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/mapdata.json +0 -1
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/canvas/canvas.vue +0 -142
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/echarts/echarts.vue +0 -228
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-e/format-e.vue +0 -113
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-u/format-u.vue +0 -110
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/index/index.vue +0 -58
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/layout/layout.vue +0 -174
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/other/other.vue +0 -233
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/tab/tab.vue +0 -115
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/ucharts/ucharts.vue +0 -339
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/unicloud/unicloud.vue +0 -117
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/updata/updata.vue +0 -212
- package/other/qiun-data-charts_2.5.0-20230101_example/pages.json +0 -79
- package/other/qiun-data-charts_2.5.0-20230101_example/static/logo.png +0 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uni.scss +0 -76
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/db_init.json +0 -455
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/qiun-charts-demo.schema.json +0 -76
- package/other/u-charts/config.js +0 -503
- package/other/u-charts/data.json +0 -1143
- package/other/u-charts/demodata.json +0 -267
- package/other/u-charts/mapdata.json +0 -41
- package/other/u-charts/u-charts.js +0 -5687
- package/other/u-charts/u-charts.min.js +0 -1
- package/other/u-charts/u-charts.vue +0 -466
- /package/other/{qiun-data-charts/js_sdk → uCharts-uniapp}/u-charts/config-ucharts.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view>
|
|
3
|
-
<view
|
|
4
|
-
<view class="up-calendar-header" :class="{ 'up-calendar-radius': radius }"
|
|
5
|
-
<view
|
|
2
|
+
<view @touchmove.stop.prevent="stop" v-if="isFixed">
|
|
3
|
+
<view class="up-bottom-popup" :class="{ 'up-popup-show': isShow }">
|
|
4
|
+
<view class="up-calendar-header" :class="{ 'up-calendar-radius': radius }">
|
|
5
|
+
<view>{{ title }}</view>
|
|
6
6
|
<view class="up-iconfont up-font-close" hover-class="up-opacity" :hover-stay-time="150" @tap="hide"></view>
|
|
7
7
|
</view>
|
|
8
8
|
|
|
@@ -100,35 +100,123 @@
|
|
|
100
100
|
<view class="up-bg-month">{{ month }}</view>
|
|
101
101
|
</view>
|
|
102
102
|
|
|
103
|
-
<view class="up-calendar-op"
|
|
103
|
+
<view class="up-calendar-op">
|
|
104
104
|
<view class="up-calendar-result">
|
|
105
105
|
<text>{{ type == 1 ? activeDate : startDate }}</text>
|
|
106
106
|
<text v-if="endDate">至{{ endDate }}</text>
|
|
107
107
|
</view>
|
|
108
108
|
<view class="up-calendar-btn_box">
|
|
109
|
-
<
|
|
109
|
+
<view
|
|
110
|
+
:style="{ background: getBtnBgColor }"
|
|
111
|
+
@tap.stop="btnFix(false)"
|
|
112
|
+
class="up-btn__confirm"
|
|
113
|
+
:class="{ 'up-btn__disabled': disabled, 'up-btn__confirm-hover': !disabled }"
|
|
114
|
+
>
|
|
115
|
+
确定
|
|
116
|
+
</view>
|
|
110
117
|
</view>
|
|
111
118
|
</view>
|
|
112
119
|
</view>
|
|
113
120
|
|
|
114
|
-
<view
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
<view class="up-popup-mask" :class="[isShow ? 'up-mask-show' : '']" @tap="hide"></view>
|
|
122
|
+
</view>
|
|
123
|
+
<view v-else>
|
|
124
|
+
<view class="up-date-box">
|
|
125
|
+
<view
|
|
126
|
+
class="up-iconfont up-font-arrowleft"
|
|
127
|
+
:style="{ color: yearArrowColor }"
|
|
128
|
+
hover-class="up-opacity"
|
|
129
|
+
:hover-stay-time="150"
|
|
130
|
+
v-if="arrowType == 1"
|
|
131
|
+
@tap="changeYear(0)"
|
|
132
|
+
></view>
|
|
133
|
+
<view
|
|
134
|
+
class="up-iconfont up-font-arrowleft"
|
|
135
|
+
:style="{ color: monthArrowColor }"
|
|
136
|
+
hover-class="up-opacity"
|
|
137
|
+
:hover-stay-time="150"
|
|
138
|
+
@tap="changeMonth(0)"
|
|
139
|
+
></view>
|
|
140
|
+
<view class="up-date_time">{{ showTitle }}</view>
|
|
141
|
+
<view
|
|
142
|
+
class="up-iconfont up-font-arrowright"
|
|
143
|
+
:style="{ color: monthArrowColor }"
|
|
144
|
+
hover-class="up-opacity"
|
|
145
|
+
:hover-stay-time="150"
|
|
146
|
+
@tap="changeMonth(1)"
|
|
147
|
+
></view>
|
|
148
|
+
<view
|
|
149
|
+
class="up-iconfont up-font-arrowright"
|
|
150
|
+
:style="{ color: yearArrowColor }"
|
|
151
|
+
hover-class="up-opacity"
|
|
152
|
+
:hover-stay-time="150"
|
|
153
|
+
v-if="arrowType == 1"
|
|
154
|
+
@tap="changeYear(1)"
|
|
155
|
+
></view>
|
|
156
|
+
</view>
|
|
157
|
+
<view class="up-date-header">
|
|
158
|
+
<view class="up-date">日</view>
|
|
159
|
+
<view class="up-date">一</view>
|
|
160
|
+
<view class="up-date">二</view>
|
|
161
|
+
<view class="up-date">三</view>
|
|
162
|
+
<view class="up-date">四</view>
|
|
163
|
+
<view class="up-date">五</view>
|
|
164
|
+
<view class="up-date">六</view>
|
|
165
|
+
</view>
|
|
166
|
+
<view class="up-date-content" :style="{ height: isFixed && fixedHeight ? dateHeight * 6 + 'px' : 'auto' }">
|
|
167
|
+
<block v-for="(item, index) in weekdayArr" :key="index">
|
|
168
|
+
<view class="up-date"></view>
|
|
169
|
+
</block>
|
|
170
|
+
<view
|
|
171
|
+
class="up-date"
|
|
172
|
+
:class="{
|
|
173
|
+
'up-date-pd_0': isFixed && fixedHeight,
|
|
174
|
+
'up-opacity': openDisAbled(year, month, index + 1),
|
|
175
|
+
'up-start-date': (type == 2 && startDate == `${year}-${month}-${index + 1}`) || type == 1,
|
|
176
|
+
'up-end-date': (type == 2 && endDate == `${year}-${month}-${index + 1}`) || type == 1
|
|
177
|
+
}"
|
|
178
|
+
:style="{
|
|
179
|
+
backgroundColor: isFixed ? getColor(index, 1) : 'transparent',
|
|
180
|
+
height: isFixed && fixedHeight ? dateHeight + 'px' : 'auto'
|
|
181
|
+
}"
|
|
182
|
+
v-for="(item, index) in daysArr"
|
|
183
|
+
:key="index"
|
|
184
|
+
@tap="dateClick(index)"
|
|
185
|
+
>
|
|
186
|
+
<view
|
|
187
|
+
class="up-date-text"
|
|
188
|
+
:style="{ color: isFixed ? getColor(index, 2) : getStatusData(3, index), backgroundColor: getStatusData(2, index) }"
|
|
189
|
+
>
|
|
190
|
+
<view v-if="isFixed || !getStatusData(4, index)">{{ index + 1 }}</view>
|
|
191
|
+
<view v-if="!getStatusData(4, index)" class="up-custom-desc" :class="{ 'up-lunar-unshow': !lunar && isFixed }">
|
|
192
|
+
{{ getDescText(index, startDate, endDate) }}
|
|
193
|
+
</view>
|
|
194
|
+
<text class="up-iconfont up-font-check" v-if="getStatusData(4, index)"></text>
|
|
195
|
+
</view>
|
|
196
|
+
<view
|
|
197
|
+
class="up-date-desc"
|
|
198
|
+
:style="{ color: activeColor }"
|
|
199
|
+
v-if="!lunar && type == 2 && startDate == `${year}-${month}-${index + 1}` && startDate != endDate"
|
|
200
|
+
>
|
|
201
|
+
{{ startText }}
|
|
202
|
+
</view>
|
|
203
|
+
<view
|
|
204
|
+
class="up-date-desc"
|
|
205
|
+
:style="{ color: activeColor }"
|
|
206
|
+
v-if="!lunar && type == 2 && endDate == `${year}-${month}-${index + 1}`"
|
|
207
|
+
>
|
|
208
|
+
{{ endText }}
|
|
209
|
+
</view>
|
|
210
|
+
</view>
|
|
211
|
+
<view class="up-bg-month">{{ month }}</view>
|
|
212
|
+
</view>
|
|
121
213
|
</view>
|
|
122
214
|
</template>
|
|
123
215
|
<script>
|
|
124
|
-
//easycom组件模式 无需手动引入
|
|
125
|
-
// import fuiButton from "../up-button/up-button"
|
|
126
216
|
import calendar from './up-calendar.js';
|
|
127
217
|
export default {
|
|
128
|
-
name: '
|
|
129
|
-
|
|
130
|
-
// fuiButton
|
|
131
|
-
// },
|
|
218
|
+
name: 'tuiCalendar',
|
|
219
|
+
emits: ['hide', 'change'],
|
|
132
220
|
props: {
|
|
133
221
|
//1-切换月份和年份 2-切换月份
|
|
134
222
|
arrowType: {
|
|
@@ -164,6 +252,10 @@ export default {
|
|
|
164
252
|
type: String,
|
|
165
253
|
default: ''
|
|
166
254
|
},
|
|
255
|
+
title: {
|
|
256
|
+
type: String,
|
|
257
|
+
default: '日期选择'
|
|
258
|
+
},
|
|
167
259
|
//显示圆角
|
|
168
260
|
radius: {
|
|
169
261
|
type: Boolean,
|
|
@@ -171,16 +263,16 @@ export default {
|
|
|
171
263
|
},
|
|
172
264
|
//状态 数据顺序与当月天数一致,index=>day
|
|
173
265
|
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
266
|
+
* [{
|
|
267
|
+
* text:"", 描述:2字以内
|
|
268
|
+
* value:"",状态值
|
|
269
|
+
* bgColor:"",背景色
|
|
270
|
+
* color:"" 文字颜色,
|
|
271
|
+
* check:false //是否显示对勾
|
|
272
|
+
*
|
|
273
|
+
}]
|
|
274
|
+
*
|
|
275
|
+
* **/
|
|
184
276
|
status: {
|
|
185
277
|
type: Array,
|
|
186
278
|
default() {
|
|
@@ -205,7 +297,7 @@ export default {
|
|
|
205
297
|
//选中|起始结束日期背景色
|
|
206
298
|
activeBgColor: {
|
|
207
299
|
type: String,
|
|
208
|
-
default: '
|
|
300
|
+
default: ''
|
|
209
301
|
},
|
|
210
302
|
//选中|起始结束日期字体颜色
|
|
211
303
|
activeColor: {
|
|
@@ -220,7 +312,7 @@ export default {
|
|
|
220
312
|
//范围内日期字体颜色
|
|
221
313
|
rangeColor: {
|
|
222
314
|
type: String,
|
|
223
|
-
default: '
|
|
315
|
+
default: ''
|
|
224
316
|
},
|
|
225
317
|
//type=2时生效,起始日期自定义文案
|
|
226
318
|
startText: {
|
|
@@ -232,10 +324,10 @@ export default {
|
|
|
232
324
|
type: String,
|
|
233
325
|
default: '结束'
|
|
234
326
|
},
|
|
235
|
-
|
|
236
|
-
|
|
327
|
+
//按钮背景色 V2.3.0+
|
|
328
|
+
btnBgColor: {
|
|
237
329
|
type: String,
|
|
238
|
-
default: '
|
|
330
|
+
default: ''
|
|
239
331
|
},
|
|
240
332
|
//固定在底部
|
|
241
333
|
isFixed: {
|
|
@@ -261,6 +353,16 @@ export default {
|
|
|
261
353
|
lunar: {
|
|
262
354
|
type: Boolean,
|
|
263
355
|
default: false
|
|
356
|
+
},
|
|
357
|
+
//初始化起始选中日期 格式: 2020-06-06 或 2020/06/06 【type=1 or 2】
|
|
358
|
+
initStartDate: {
|
|
359
|
+
type: [String, Array],
|
|
360
|
+
default: ''
|
|
361
|
+
},
|
|
362
|
+
//初始化结束日期 格式: 2020-06-06 或 2020/06/06【type=2】
|
|
363
|
+
initEndDate: {
|
|
364
|
+
type: String,
|
|
365
|
+
default: ''
|
|
264
366
|
}
|
|
265
367
|
},
|
|
266
368
|
data() {
|
|
@@ -292,7 +394,19 @@ export default {
|
|
|
292
394
|
},
|
|
293
395
|
computed: {
|
|
294
396
|
dataChange() {
|
|
295
|
-
return `${this.type}-${this.minDate}-${this.maxDate}`;
|
|
397
|
+
return `${this.type}-${this.minDate}-${this.maxDate}-${this.initStartDate}-${this.initEndDate}`;
|
|
398
|
+
},
|
|
399
|
+
disabled() {
|
|
400
|
+
return this.type == 2 && (!this.startDate || !this.endDate);
|
|
401
|
+
},
|
|
402
|
+
getActiveBgColor() {
|
|
403
|
+
return this.activeBgColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
|
404
|
+
},
|
|
405
|
+
getBtnBgColor() {
|
|
406
|
+
return this.btnBgColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
|
407
|
+
},
|
|
408
|
+
getRangeColor() {
|
|
409
|
+
return this.rangeColor || (uni && uni.$tui && uni.$tui.color.primary) || '#5677fc';
|
|
296
410
|
}
|
|
297
411
|
},
|
|
298
412
|
watch: {
|
|
@@ -317,9 +431,9 @@ export default {
|
|
|
317
431
|
let start = this.startDate.replace(/\-/g, '/');
|
|
318
432
|
let end = this.endDate.replace(/\-/g, '/');
|
|
319
433
|
if ((this.isActiveCurrent && this.activeDate == date) || this.startDate == date || this.endDate == date) {
|
|
320
|
-
color = type == 1 ? this.
|
|
434
|
+
color = type == 1 ? this.getActiveBgColor : this.activeColor;
|
|
321
435
|
} else if (this.endDate && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) {
|
|
322
|
-
color = type == 1 ? this.rangeBgColor : this.
|
|
436
|
+
color = type == 1 ? this.rangeBgColor : this.getRangeColor;
|
|
323
437
|
}
|
|
324
438
|
return color;
|
|
325
439
|
},
|
|
@@ -387,14 +501,47 @@ export default {
|
|
|
387
501
|
this.activeDate = this.today;
|
|
388
502
|
this.min = this.initDate(this.minDate);
|
|
389
503
|
this.max = this.initDate(this.maxDate || this.today);
|
|
504
|
+
if (this.openDisAbled(this.year, this.month, this.day)) {
|
|
505
|
+
this.year = this.max.year;
|
|
506
|
+
this.month = this.max.month;
|
|
507
|
+
this.day = this.max.day;
|
|
508
|
+
this.activeDate = `${this.max.year}-${this.max.month}-${this.max.day}`;
|
|
509
|
+
this.max = this.initDate(this.maxDate || this.minDate);
|
|
510
|
+
}
|
|
390
511
|
this.startDate = '';
|
|
391
512
|
this.startYear = 0;
|
|
392
513
|
this.startMonth = 0;
|
|
393
514
|
this.startDay = 0;
|
|
515
|
+
if (this.initStartDate) {
|
|
516
|
+
let start = new Date(this.initStartDate.replace(/\-/g, '/'));
|
|
517
|
+
if (this.type == 1) {
|
|
518
|
+
this.year = start.getFullYear();
|
|
519
|
+
this.month = start.getMonth() + 1;
|
|
520
|
+
this.day = start.getDate();
|
|
521
|
+
this.activeDate = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
|
|
522
|
+
} else {
|
|
523
|
+
this.startDate = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
|
|
524
|
+
this.startYear = start.getFullYear();
|
|
525
|
+
this.startMonth = start.getMonth() + 1;
|
|
526
|
+
this.startDay = start.getDate();
|
|
527
|
+
this.activeDate = '';
|
|
528
|
+
}
|
|
529
|
+
}
|
|
394
530
|
this.endYear = 0;
|
|
395
531
|
this.endMonth = 0;
|
|
396
532
|
this.endDay = 0;
|
|
397
533
|
this.endDate = '';
|
|
534
|
+
if (this.initEndDate && this.type == 2) {
|
|
535
|
+
let end = new Date(this.initEndDate.replace(/\-/g, '/'));
|
|
536
|
+
this.endDate = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`;
|
|
537
|
+
this.endYear = end.getFullYear();
|
|
538
|
+
this.endMonth = end.getMonth() + 1;
|
|
539
|
+
this.endDay = end.getDate();
|
|
540
|
+
this.activeDate = '';
|
|
541
|
+
this.year = end.getFullYear();
|
|
542
|
+
this.month = end.getMonth() + 1;
|
|
543
|
+
this.day = end.getDate();
|
|
544
|
+
}
|
|
398
545
|
this.isStart = true;
|
|
399
546
|
this.changeData();
|
|
400
547
|
},
|
|
@@ -407,7 +554,7 @@ export default {
|
|
|
407
554
|
day: Number(fdate[2] || 1)
|
|
408
555
|
};
|
|
409
556
|
},
|
|
410
|
-
openDisAbled(year, month, day) {
|
|
557
|
+
openDisAbled: function (year, month, day) {
|
|
411
558
|
let bool = true;
|
|
412
559
|
let date = `${year}/${month}/${day}`;
|
|
413
560
|
// let today = this.today.replace(/\-/g, '/');
|
|
@@ -419,14 +566,14 @@ export default {
|
|
|
419
566
|
}
|
|
420
567
|
return bool;
|
|
421
568
|
},
|
|
422
|
-
generateArray(start, end) {
|
|
569
|
+
generateArray: function (start, end) {
|
|
423
570
|
return Array.from(new Array(end + 1).keys()).slice(start);
|
|
424
571
|
},
|
|
425
|
-
formatNum(num) {
|
|
572
|
+
formatNum: function (num) {
|
|
426
573
|
return num < 10 ? '0' + num : num + '';
|
|
427
574
|
},
|
|
428
575
|
stop() {
|
|
429
|
-
return
|
|
576
|
+
return false;
|
|
430
577
|
},
|
|
431
578
|
//一个月有多少天
|
|
432
579
|
getMonthDay(year, month) {
|
|
@@ -484,7 +631,7 @@ export default {
|
|
|
484
631
|
this.btnFix(true);
|
|
485
632
|
}
|
|
486
633
|
},
|
|
487
|
-
dateClick(day) {
|
|
634
|
+
dateClick: function (day) {
|
|
488
635
|
day += 1;
|
|
489
636
|
if (!this.openDisAbled(this.year, this.month, day)) {
|
|
490
637
|
this.day = day;
|
|
@@ -522,6 +669,7 @@ export default {
|
|
|
522
669
|
},
|
|
523
670
|
hide() {
|
|
524
671
|
this.isShow = false;
|
|
672
|
+
this.$emit('hide', {});
|
|
525
673
|
},
|
|
526
674
|
getWeekText(date) {
|
|
527
675
|
date = new Date(`${date.replace(/\-/g, '/')} 00:00:00`);
|
|
@@ -530,6 +678,7 @@ export default {
|
|
|
530
678
|
},
|
|
531
679
|
btnFix(show) {
|
|
532
680
|
if (!show) {
|
|
681
|
+
if (this.disabled) return;
|
|
533
682
|
this.hide();
|
|
534
683
|
}
|
|
535
684
|
if (this.type == 1) {
|
|
@@ -593,7 +742,7 @@ export default {
|
|
|
593
742
|
|
|
594
743
|
<style scoped>
|
|
595
744
|
@font-face {
|
|
596
|
-
font-family: '
|
|
745
|
+
font-family: 'tuiDateFont';
|
|
597
746
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAVgAA0AAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAFRAAAABoAAAAci0/w50dERUYAAAUkAAAAHgAAAB4AKQANT1MvMgAAAaAAAABDAAAAVjxuSNNjbWFwAAAB+AAAAEoAAAFS5iPQt2dhc3AAAAUcAAAACAAAAAj//wADZ2x5ZgAAAlQAAAFHAAABvPf29TBoZWFkAAABMAAAADAAAAA2GMsN3WhoZWEAAAFgAAAAHQAAACQHjAOFaG10eAAAAeQAAAATAAAAFgzQAPJsb2NhAAACRAAAABAAAAAQAOoBSG1heHAAAAGAAAAAHgAAACABEwA3bmFtZQAAA5wAAAFJAAACiCnmEVVwb3N0AAAE6AAAADQAAABLUwjqHHjaY2BkYGAAYp5Gj5/x/DZfGbhZGEDg1tUn7+F00P/LzOuY9YFcDgYmkCgAa0gNlHjaY2BkYGBu+N/AEMPCAALM6xgYGVABCwBT4AMaAAAAeNpjYGRgYGBn0GZgYgABEMkFhAwM/8F8BgANaAFLAAB42mNgZGFgnMDAysDA1Ml0hoGBoR9CM75mMGLkAIoysDIzYAUBaa4pDA7PGJ49ZG7438AQw9zA0AAUZgTJAQDrcAy8AHjaY2GAABYIDgLCBQx1AAcEAc8AeNpjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETAwMzxifcTx7+P8/kMUAYUkxS/6VVIXqAgNGNgY4lxGoB6QPBTAyDHsAADDkDYkAAAAAAAAAAAAAADQAagC2AN542m2QsU7DMBCG/Tt1bNPUiUnkSgiVtqKpxJAgVLVbeAa6MaK+B4JXgJWBjY21UtW5gpkdMTFX7dzApaJLhXU6n8+n//ttxtn458N79XJWZ8eMxS00C4wy9A1EP8PQncAlIQzS4WgsVtPpSmwzV3OFRqLetH5TSQMK939X61ptPZ2p2EAttNMLBRMrtschQblDeS34aY50cIkCzg/B2Y5C+VpyQxhFkRgu515O8jvU5mmPM2O0wJ5Z27vhX+yMsV437WvCdTM+GI40MgwKfuGammC0uURqeqFMfe9cxaJclkt5GMaB1hIR1VobOgpEiKq+sLZcIrJWhO3/Jw7qWlYj1Jf21FaCtmd5bevrlk28O/7A4spXTl4KTh9MTlqQ8PESBRstReic+sRj0Dni9fIqmNS/pXNWCvWOeYBmx5S9Bsn9Ah+5WtAAeNp9kD1OAzEQhZ/zByQSQiCoXVEA2vyUKRMp9Ailo0g23pBo1155nUg5AS0VB6DlGByAGyDRcgpelkmTImvt6PObmeexAZzjGwr/3yXuhBWO8ShcwREy4Sr1F+Ea+V24jhY+hRvUf4SbuFUD4RYu1BsdVO2Eu5vSbcsKZxgIV3CKJ+Eq9ZVwjfwqXMcVPoQb1L+EmxjjV7iFa2WpDOFhMEFgnEFjig3jAjEcLJIyBtahOfRmEsxMTzd6ETubOBso71dilwMeaDnngCntPbdmvkon/mDLgdSYbh4FS7YpjS4idCgbXyyc1d2oc7D9nu22tNi/a4E1x+xRDWzU/D3bM9JIbAyvkJI18jK3pBJTj2hrrPG7ZynW814IiU68y/SIx5o0dTr3bmniwOLn8owcfbS5kj33qBw+Y1kIeb/dTsQgil2GP5PYcRkAAAB42mNgYoAALjDJyIAO2MGiTIxMjMyMLIys7GmJeRmlmWZQ2pQ5OSORLaU0Mz2/FACDfwlbAAAAAf//AAIAAQAAAAwAAAAWAAAAAgABAAMABgABAAQAAAACAAAAAHjaY2BgYGQAgqtL1DlA9K2rT97DaABNlwiuAAA=)
|
|
598
747
|
format('woff');
|
|
599
748
|
font-weight: normal;
|
|
@@ -601,7 +750,7 @@ export default {
|
|
|
601
750
|
}
|
|
602
751
|
|
|
603
752
|
.up-iconfont {
|
|
604
|
-
font-family: '
|
|
753
|
+
font-family: 'tuiDateFont' !important;
|
|
605
754
|
font-size: 36rpx;
|
|
606
755
|
font-style: normal;
|
|
607
756
|
-webkit-font-smoothing: antialiased;
|
|
@@ -865,4 +1014,38 @@ export default {
|
|
|
865
1014
|
.up-calendar-btn_box {
|
|
866
1015
|
width: 100%;
|
|
867
1016
|
}
|
|
1017
|
+
|
|
1018
|
+
.up-btn__confirm {
|
|
1019
|
+
width: 100%;
|
|
1020
|
+
height: 72rpx;
|
|
1021
|
+
border-radius: 72rpx;
|
|
1022
|
+
font-size: 28rpx;
|
|
1023
|
+
display: flex;
|
|
1024
|
+
align-items: center;
|
|
1025
|
+
justify-content: center;
|
|
1026
|
+
/* #ifdef H5 */
|
|
1027
|
+
cursor: pointer;
|
|
1028
|
+
/* #endif */
|
|
1029
|
+
color: #fff;
|
|
1030
|
+
position: relative;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.up-btn__confirm-hover:active::after {
|
|
1034
|
+
content: '';
|
|
1035
|
+
position: absolute;
|
|
1036
|
+
left: 0;
|
|
1037
|
+
top: 0;
|
|
1038
|
+
width: 100%;
|
|
1039
|
+
height: 72rpx;
|
|
1040
|
+
background: rgba(0, 0, 0, 0.2);
|
|
1041
|
+
border-radius: 72rpx;
|
|
1042
|
+
pointer-events: none;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.up-btn__disabled {
|
|
1046
|
+
opacity: 0.5;
|
|
1047
|
+
/* #ifdef H5 */
|
|
1048
|
+
cursor: not-allowed;
|
|
1049
|
+
/* #endif */
|
|
1050
|
+
}
|
|
868
1051
|
</style>
|