mali-applet-ui 1.0.154 → 1.0.156
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/lib/components/ml-calendar/calendar.js +145 -0
- package/lib/components/ml-calendar/ml-calendar.vue +331 -0
- package/lib/components/ml-drawer/ml-drawer.vue +1 -1
- package/lib/components/ml-fix-uni-datetime-picker/calendar-item.vue +3 -6
- package/lib/components/ml-fix-uni-datetime-picker/calendar.vue +2 -4
- package/lib/components/ml-fix-uni-datetime-picker/ml-fix-uni-datetime-picker.vue +2 -4
- package/lib/components/ml-fix-uni-datetime-picker/time-picker.vue +1 -3
- package/lib/components/ml-list-group/ml-list-group.vue +1 -1
- package/lib/components/ml-list-select-group/ml-list-select-group.vue +1 -1
- package/lib/components/ml-list-select-user-page/ml-list-select-user-page.vue +1 -1
- package/lib/components/ml-modal/ml-modal.vue +1 -1
- package/lib/components/ml-navbar/ml-navbar.vue +2 -2
- package/lib/components/ml-tabbar/ml-tabbar.vue +1 -1
- package/lib/components/ml-table/ml-table.vue +10 -4
- package/package.json +1 -1
- package/theme.scss +8 -8
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils'
|
|
2
|
+
|
|
3
|
+
// 判断是否是闰年,
|
|
4
|
+
const isLeapYear = (year) => {
|
|
5
|
+
if (year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0)) {
|
|
6
|
+
return true
|
|
7
|
+
}
|
|
8
|
+
return false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 获取当前月份的总天数
|
|
12
|
+
const totalDaysByDate = (date) => {
|
|
13
|
+
const today = new Date(date)
|
|
14
|
+
const year = today.getFullYear()
|
|
15
|
+
const month = today.getMonth() + 1
|
|
16
|
+
let monthDay = 31
|
|
17
|
+
switch (month) {
|
|
18
|
+
case 1: monthDay = 31; break
|
|
19
|
+
case 2:
|
|
20
|
+
if (isLeapYear(year)) { monthDay = 29 } else { monthDay = 28 }
|
|
21
|
+
break
|
|
22
|
+
case 3: monthDay = 31; break
|
|
23
|
+
case 4: monthDay = 30; break
|
|
24
|
+
case 5: monthDay = 31; break
|
|
25
|
+
case 6: monthDay = 30; break
|
|
26
|
+
case 7: monthDay = 31; break
|
|
27
|
+
case 8: monthDay = 31; break
|
|
28
|
+
case 9: monthDay = 30; break
|
|
29
|
+
case 10: monthDay = 31; break
|
|
30
|
+
case 11: monthDay = 30; break
|
|
31
|
+
case 12: monthDay = 31; break
|
|
32
|
+
}
|
|
33
|
+
return monthDay
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 获取当前月份数据
|
|
37
|
+
const getDaysByDate = (date) => {
|
|
38
|
+
// 获取总天数
|
|
39
|
+
const totalDays = totalDaysByDate(date)
|
|
40
|
+
const days = []
|
|
41
|
+
const thisMonth = new Date(date)
|
|
42
|
+
const todayDate = new Date()
|
|
43
|
+
const today = XEUtils.toDateString(todayDate, 'yyyy-MM-dd')
|
|
44
|
+
for (let i = 1; i <= totalDays; i++) {
|
|
45
|
+
thisMonth.setDate(i)
|
|
46
|
+
const dateFormat = {
|
|
47
|
+
date: XEUtils.toDateString(thisMonth, 'yyyy-MM-dd'),
|
|
48
|
+
day: XEUtils.toDateString(thisMonth, 'd'),
|
|
49
|
+
statusList: []
|
|
50
|
+
}
|
|
51
|
+
if (dateFormat.date === today) {
|
|
52
|
+
dateFormat.isToday = true
|
|
53
|
+
} else {
|
|
54
|
+
if (todayDate.getTime() < thisMonth.getTime()) {
|
|
55
|
+
dateFormat.isNotYet = true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
days.push(dateFormat)
|
|
59
|
+
}
|
|
60
|
+
const { previousMonth, nextMonth } = completion(date)
|
|
61
|
+
return [...previousMonth, ...days, ...nextMonth]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 获取这个月的第一天和左后一天
|
|
65
|
+
const getMonthInfo = (date) => {
|
|
66
|
+
const designatedDate = new Date(date)
|
|
67
|
+
const nowMonth = designatedDate.getMonth() // 当前月
|
|
68
|
+
const nowYear = designatedDate.getFullYear() // 当前年
|
|
69
|
+
// 本月的开始时间
|
|
70
|
+
const monthStartDate = new Date(nowYear, nowMonth, 1)
|
|
71
|
+
// 本月的结束时间
|
|
72
|
+
const monthEndDate = new Date(nowYear, nowMonth + 1, 0)
|
|
73
|
+
return {
|
|
74
|
+
start: monthStartDate,
|
|
75
|
+
end: monthEndDate
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// 补全开头和结尾
|
|
79
|
+
const completion = (date) => {
|
|
80
|
+
const { start: startDate, end: endDate } = getMonthInfo(date)
|
|
81
|
+
const startWeek = startDate.getDay()
|
|
82
|
+
const endWeek = endDate.getDay()
|
|
83
|
+
const startDifference = startWeek
|
|
84
|
+
const endDifference = 7 - endWeek
|
|
85
|
+
const previousMonth = []
|
|
86
|
+
const nextMonth = []
|
|
87
|
+
const todayDate = new Date()
|
|
88
|
+
const today = XEUtils.toDateString(todayDate, 'yyyy-MM-dd')
|
|
89
|
+
for (let i = startDifference; i > 0; i--) {
|
|
90
|
+
let needDate = new Date(startDate.getTime())
|
|
91
|
+
needDate = needDate.setDate(needDate.getDate() - i)
|
|
92
|
+
needDate = new Date(needDate)
|
|
93
|
+
const dateFormat = {
|
|
94
|
+
date: XEUtils.toDateString(needDate, 'yyyy-MM-dd'),
|
|
95
|
+
day: XEUtils.toDateString(needDate, 'd'),
|
|
96
|
+
statusList: [],
|
|
97
|
+
isLastMonth: true
|
|
98
|
+
}
|
|
99
|
+
if (dateFormat.date === today) {
|
|
100
|
+
dateFormat.isToday = true
|
|
101
|
+
} else {
|
|
102
|
+
if (todayDate.getTime() < needDate.getTime()) {
|
|
103
|
+
dateFormat.isNotYet = true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
previousMonth.push(dateFormat)
|
|
107
|
+
}
|
|
108
|
+
for (let i = 1; i < endDifference; i++) {
|
|
109
|
+
let needDate = new Date(endDate.getTime())
|
|
110
|
+
needDate = needDate.setDate(needDate.getDate() + i)
|
|
111
|
+
needDate = new Date(needDate)
|
|
112
|
+
const dateFormat = {
|
|
113
|
+
date: XEUtils.toDateString(needDate, 'yyyy-MM-dd'),
|
|
114
|
+
day: XEUtils.toDateString(needDate, 'd'),
|
|
115
|
+
statusList: [],
|
|
116
|
+
isNextMonth: true
|
|
117
|
+
}
|
|
118
|
+
if (dateFormat.date === today) {
|
|
119
|
+
dateFormat.isToday = true
|
|
120
|
+
} else {
|
|
121
|
+
if (todayDate.getTime() < needDate.getTime()) {
|
|
122
|
+
dateFormat.isNotYet = true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
nextMonth.push(dateFormat)
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
previousMonth,
|
|
129
|
+
nextMonth
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// 获取日历数据
|
|
134
|
+
export const Calendar = (date) => {
|
|
135
|
+
return getDaysByDate(date)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 每组多少
|
|
139
|
+
export const GroupArray = (list, num) => {
|
|
140
|
+
const arr = []
|
|
141
|
+
for (let i = 0; i < list.length; i += 7) {
|
|
142
|
+
arr.push(list.slice(i, i + 7))
|
|
143
|
+
}
|
|
144
|
+
return arr
|
|
145
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-calendar" :class="{'is-fold': isfold}">
|
|
3
|
+
<view class="ml-calendar-header">
|
|
4
|
+
<button class="ml-calendar-header-button" @tap="onLastMonth">
|
|
5
|
+
<ml-icon class="text-bold" name="arrow-left"></ml-icon>
|
|
6
|
+
</button>
|
|
7
|
+
<view class="ml-calendar-header-title">
|
|
8
|
+
<slot name="title">
|
|
9
|
+
<text>{{ monthTitle }}</text>
|
|
10
|
+
</slot>
|
|
11
|
+
</view>
|
|
12
|
+
<button class="ml-calendar-header-button" @tap="onNextMonth" :disabled="!isAfterMonth">
|
|
13
|
+
<ml-icon class="text-bold" name="arrow-right"></ml-icon>
|
|
14
|
+
</button>
|
|
15
|
+
</view>
|
|
16
|
+
|
|
17
|
+
<view class="ml-calendar-body" @touchstart="touchstartEvent" @touchend="touchendEvent">
|
|
18
|
+
<view class="ml-calendar-date-head">
|
|
19
|
+
<view class="ml-calendar-week-item" v-for="(week, index) in weekList" :key="index">
|
|
20
|
+
<view class="ml-calendar-week-box">{{ week }}</view>
|
|
21
|
+
</view>
|
|
22
|
+
</view>
|
|
23
|
+
|
|
24
|
+
<view class="ml-calendar-date-content" :style="contentStyle">
|
|
25
|
+
<view class="ml-calendar-date-week-list" v-for="(list, index) in months" :key="index">
|
|
26
|
+
<view class="ml-calendar-date-day-item" v-for="(item, key) in list" :key="key" @tap="onSelect(item)">
|
|
27
|
+
<view class="ml-calendar-date-day-box" :class="{'today': item.isToday, 'last-month': item.isLastMonth, 'next-month': item.isNextMonth, 'selected': selectDay === item.date, 'not-yet': item.isNotYet, 'disabled': item.disabled}">
|
|
28
|
+
<view class="ml-calendar-date-box-warpper">
|
|
29
|
+
<view class="ml-calendar-date-day-text" :class="{'today': item.isToday}" v-if="item.isToday">今天</view>
|
|
30
|
+
<view class="ml-calendar-date-day-text" v-else>{{ item.day }}</view>
|
|
31
|
+
<view class="ml-calendar-date-day-dots">
|
|
32
|
+
<view class="ml-calendar-date-day-status" v-for="(status, sIndex) in item.statusList" :key="sIndex" :class="[`ss-${status}`]"></view>
|
|
33
|
+
</view>
|
|
34
|
+
<view class="ml-calendar-date-day-dots">
|
|
35
|
+
<view class="ml-calendar-date-day-status" :style="{ backgroundColor: item.color }" v-if="item.color"></view>
|
|
36
|
+
</view>
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
|
|
43
|
+
<view class="ml-calendar-fold-btn" @tap="toggleFold">
|
|
44
|
+
<ml-icon :name="isfold ? 'arrow-down' : 'arrow-top'"></ml-icon>
|
|
45
|
+
</view>
|
|
46
|
+
</view>
|
|
47
|
+
</view>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import { Calendar, GroupArray } from './calendar.js'
|
|
52
|
+
import XEUtils from 'xe-utils'
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
name: 'MlCalendar',
|
|
56
|
+
props: {
|
|
57
|
+
value: String,
|
|
58
|
+
scheduleMethod: Function
|
|
59
|
+
},
|
|
60
|
+
inject: {
|
|
61
|
+
currVM: {
|
|
62
|
+
from: '$pageVM',
|
|
63
|
+
default: null
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
data () {
|
|
67
|
+
return {
|
|
68
|
+
isfold: false,
|
|
69
|
+
selectMonth: new Date(),
|
|
70
|
+
weekList: ['日', '一', '二', '三', '四', '五', '六'],
|
|
71
|
+
months: [],
|
|
72
|
+
selectDay: ''
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
monthTitle () {
|
|
77
|
+
return XEUtils.toDateString(this.selectMonth, 'yyyy年MM月')
|
|
78
|
+
},
|
|
79
|
+
contentStyle () {
|
|
80
|
+
const lineHeight = 80
|
|
81
|
+
if (this.isfold) {
|
|
82
|
+
return `height: ${lineHeight}rpx;`
|
|
83
|
+
}
|
|
84
|
+
return `height: ${(this.months.length || 5) * lineHeight}rpx;`
|
|
85
|
+
},
|
|
86
|
+
// 判断是否可进行下一月的切换
|
|
87
|
+
isAfterMonth () {
|
|
88
|
+
return true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
watch: {
|
|
92
|
+
value () {
|
|
93
|
+
this.updateDate()
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
mounted () {
|
|
97
|
+
this.updateDate()
|
|
98
|
+
this.updateCalendar()
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
updateDate () {
|
|
102
|
+
const currVal = XEUtils.toStringDate(this.value || new Date())
|
|
103
|
+
this.selectDay = XEUtils.toDateString(currVal, 'yyyy-MM-dd')
|
|
104
|
+
this.selectMonth = currVal
|
|
105
|
+
},
|
|
106
|
+
loadsChedule () {
|
|
107
|
+
if (this.scheduleMethod) {
|
|
108
|
+
Promise.resolve(this.scheduleMethod.call(this.currVM, { currMonth: this.selectMonth })).then(rest => {
|
|
109
|
+
if (rest) {
|
|
110
|
+
const dateMaps = {}
|
|
111
|
+
rest.forEach(item => {
|
|
112
|
+
dateMaps[item.date] = item
|
|
113
|
+
})
|
|
114
|
+
this.months.forEach(list => {
|
|
115
|
+
list.forEach(item => {
|
|
116
|
+
if (dateMaps[item.date]) {
|
|
117
|
+
const status = dateMaps[item.date].status
|
|
118
|
+
item.statusList = (XEUtils.isArray(status) ? status : [status]).slice(0, 2)
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
updateCalendar (date) {
|
|
127
|
+
if (!date) {
|
|
128
|
+
date = this.value
|
|
129
|
+
}
|
|
130
|
+
if (!date) {
|
|
131
|
+
date = new Date()
|
|
132
|
+
}
|
|
133
|
+
const dates = Calendar(this.selectMonth)
|
|
134
|
+
this.months = GroupArray(dates, 7)
|
|
135
|
+
this.loadsChedule()
|
|
136
|
+
},
|
|
137
|
+
toggleFold () {
|
|
138
|
+
this.isfold = !this.isfold
|
|
139
|
+
},
|
|
140
|
+
onSelect (item) {
|
|
141
|
+
if (item.disabled) {
|
|
142
|
+
return false
|
|
143
|
+
}
|
|
144
|
+
const value = item.date
|
|
145
|
+
this.selectDay = value
|
|
146
|
+
this.selectMonth = XEUtils.toStringDate(value)
|
|
147
|
+
if (item.isLastMonth) {
|
|
148
|
+
this.initCalendar()
|
|
149
|
+
} else if (item.isNextMonth) {
|
|
150
|
+
this.initCalendar()
|
|
151
|
+
}
|
|
152
|
+
this.$emit('input', value)
|
|
153
|
+
this.$emit('click', { value })
|
|
154
|
+
},
|
|
155
|
+
onLastMonth () {
|
|
156
|
+
this.selectMonth = XEUtils.getWhatMonth(this.selectMonth, -1)
|
|
157
|
+
this.updateCalendar()
|
|
158
|
+
},
|
|
159
|
+
onNextMonth () {
|
|
160
|
+
this.selectMonth = XEUtils.getWhatMonth(this.selectMonth, 1)
|
|
161
|
+
this.updateCalendar()
|
|
162
|
+
},
|
|
163
|
+
touchstartEvent (e) {
|
|
164
|
+
this.startPoint = e.changedTouches[0]
|
|
165
|
+
},
|
|
166
|
+
touchendEvent (e) {
|
|
167
|
+
const startPoint = this.startPoint
|
|
168
|
+
const endPoint = e.changedTouches[0]
|
|
169
|
+
if (startPoint.clientX > endPoint.clientX + 60) {
|
|
170
|
+
this.onLastMonth()
|
|
171
|
+
} else if (startPoint.clientX < endPoint.clientX - 60) {
|
|
172
|
+
this.onNextMonth()
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<style lang="scss">
|
|
180
|
+
.ml-calendar {
|
|
181
|
+
width: 100%;
|
|
182
|
+
padding: 30rpx;
|
|
183
|
+
background-color: #FFFFFF;
|
|
184
|
+
.ml-calendar-header {
|
|
185
|
+
display: flex;
|
|
186
|
+
justify-content: space-between;
|
|
187
|
+
align-items: center;
|
|
188
|
+
margin-bottom: 10rpx;
|
|
189
|
+
.ml-calendar-header-title {
|
|
190
|
+
flex: 1;
|
|
191
|
+
text-align: center;
|
|
192
|
+
margin: 0 30rpx;
|
|
193
|
+
font-size: 40rpx;
|
|
194
|
+
font-weight: bolder;
|
|
195
|
+
}
|
|
196
|
+
.ml-calendar-header-button {
|
|
197
|
+
border: 1px solid #dddddd;
|
|
198
|
+
padding: 10rpx;
|
|
199
|
+
border-radius: 8rpx;
|
|
200
|
+
text-align: center;
|
|
201
|
+
margin: 0;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ml-calendar-date-head {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
margin: 0 -10rpx;
|
|
209
|
+
margin-bottom: 10rpx;
|
|
210
|
+
.ml-calendar-week-item {
|
|
211
|
+
flex-grow: 1;
|
|
212
|
+
.ml-calendar-week-box {
|
|
213
|
+
color: #999999;
|
|
214
|
+
text-align: center;
|
|
215
|
+
width: 60rpx;
|
|
216
|
+
height: 60rpx;
|
|
217
|
+
margin: auto;
|
|
218
|
+
display: flex;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
align-items: center;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ml-calendar-date-content {
|
|
226
|
+
height: 500rpx;
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
transition: height 0.3s ease-out;
|
|
229
|
+
.ml-calendar-date-week-list {
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
margin: 0 -10rpx;
|
|
233
|
+
margin-bottom: 10rpx;
|
|
234
|
+
.ml-calendar-date-day-item {
|
|
235
|
+
flex-grow: 1;
|
|
236
|
+
}
|
|
237
|
+
.ml-calendar-date-day-box {
|
|
238
|
+
width: 64rpx;
|
|
239
|
+
height: 72rpx;
|
|
240
|
+
border-radius: 8rpx;
|
|
241
|
+
margin: auto;
|
|
242
|
+
border: 2px solid transparent;
|
|
243
|
+
.ml-calendar-date-box-warpper {
|
|
244
|
+
width: 100%;
|
|
245
|
+
height: 100%;
|
|
246
|
+
.ml-calendar-date-day-text {
|
|
247
|
+
font-weight: 500;
|
|
248
|
+
font-size: 32rpx;
|
|
249
|
+
text-align: center;
|
|
250
|
+
line-height: 36rpx;
|
|
251
|
+
&.today {
|
|
252
|
+
font-size: 22rpx;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
.ml-calendar-date-day-dots {
|
|
256
|
+
width: 100%;
|
|
257
|
+
line-height: 24rpx;
|
|
258
|
+
text-align: center;
|
|
259
|
+
}
|
|
260
|
+
.ml-calendar-date-day-status {
|
|
261
|
+
display: inline-block;
|
|
262
|
+
width: 15rpx;
|
|
263
|
+
height: 15rpx;
|
|
264
|
+
margin: 0 5rpx;
|
|
265
|
+
border-radius: 50%;
|
|
266
|
+
&.ss-primary {
|
|
267
|
+
background-color: $ml-theme-primary-color;
|
|
268
|
+
}
|
|
269
|
+
&.ss-success {
|
|
270
|
+
background-color: $ml-theme-success-color;
|
|
271
|
+
}
|
|
272
|
+
&.ss-info {
|
|
273
|
+
background-color: #909399;
|
|
274
|
+
}
|
|
275
|
+
&.ss-warning {
|
|
276
|
+
background-color: $ml-theme-warning-color;
|
|
277
|
+
}
|
|
278
|
+
&.ss-danger {
|
|
279
|
+
background-color: $ml-theme-error-color;
|
|
280
|
+
}
|
|
281
|
+
&.ss-gray {
|
|
282
|
+
background-color: $ml-gray-color;
|
|
283
|
+
}
|
|
284
|
+
&.ss-blue {
|
|
285
|
+
background-color: $ml-blue-color;
|
|
286
|
+
}
|
|
287
|
+
&.ss-green {
|
|
288
|
+
background-color: $ml-green-color;
|
|
289
|
+
}
|
|
290
|
+
&.ss-pink {
|
|
291
|
+
background-color: $ml-pink-color;
|
|
292
|
+
}
|
|
293
|
+
&.ss-orange {
|
|
294
|
+
background-color: $ml-orange-color;
|
|
295
|
+
}
|
|
296
|
+
&.ss-purple {
|
|
297
|
+
background-color: $ml-purple-color;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
&.selected {
|
|
302
|
+
border-color: #2497FF;
|
|
303
|
+
}
|
|
304
|
+
&.selected {
|
|
305
|
+
border-color: #2497FF;
|
|
306
|
+
}
|
|
307
|
+
&.today {
|
|
308
|
+
.ml-calendar-date-box-warpper {
|
|
309
|
+
background-color: #c6e4ff;
|
|
310
|
+
border-radius: 8rpx;
|
|
311
|
+
.ml-calendar-date-day-text {
|
|
312
|
+
color: #2497FF;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
&.last-month,
|
|
317
|
+
&.next-month,
|
|
318
|
+
&.disabled {
|
|
319
|
+
.ml-calendar-date-day-text {
|
|
320
|
+
color: rgba(23, 26, 29, 0.4);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ml-calendar-fold-btn {
|
|
328
|
+
text-align: center;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
</style>
|
|
@@ -62,8 +62,6 @@ export default {
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<style lang="scss" >
|
|
65
|
-
$uni-primary: #007aff !default;
|
|
66
|
-
|
|
67
65
|
.uni-calendar-item__weeks-box {
|
|
68
66
|
flex: 1;
|
|
69
67
|
/* #ifndef APP-NVUE */
|
|
@@ -80,7 +78,7 @@ export default {
|
|
|
80
78
|
font-size: 14px;
|
|
81
79
|
// font-family: Lato-Bold, Lato;
|
|
82
80
|
font-weight: bold;
|
|
83
|
-
color: darken($color: $
|
|
81
|
+
color: darken($color: $ml-theme-primary-color, $amount: 40%);
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
.uni-calendar-item__weeks-lunar-text {
|
|
@@ -115,7 +113,6 @@ export default {
|
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
.uni-calendar-item__weeks-box .uni-calendar-item--disable {
|
|
118
|
-
// background-color: rgba(249, 249, 249, $uni-opacity-disabled);
|
|
119
116
|
cursor: default;
|
|
120
117
|
}
|
|
121
118
|
|
|
@@ -139,7 +136,7 @@ export default {
|
|
|
139
136
|
}
|
|
140
137
|
|
|
141
138
|
.uni-calendar-item__weeks-box .uni-calendar-item--checked {
|
|
142
|
-
background-color: $
|
|
139
|
+
background-color: $ml-theme-primary-color;
|
|
143
140
|
border-radius: 50%;
|
|
144
141
|
box-sizing: border-box;
|
|
145
142
|
border: 3px solid #fff;
|
|
@@ -160,7 +157,7 @@ export default {
|
|
|
160
157
|
|
|
161
158
|
.uni-calendar-item--multiple .uni-calendar-item--before-checked,
|
|
162
159
|
.uni-calendar-item--multiple .uni-calendar-item--after-checked {
|
|
163
|
-
background-color: $
|
|
160
|
+
background-color: $ml-theme-primary-color;
|
|
164
161
|
border-radius: 50%;
|
|
165
162
|
box-sizing: border-box;
|
|
166
163
|
border: 3px solid #F6F7FC;
|
|
@@ -619,8 +619,6 @@ export default {
|
|
|
619
619
|
</script>
|
|
620
620
|
|
|
621
621
|
<style lang="scss" >
|
|
622
|
-
$uni-primary: #007aff !default;
|
|
623
|
-
|
|
624
622
|
.uni-calendar {
|
|
625
623
|
/* #ifndef APP-NVUE */
|
|
626
624
|
display: flex;
|
|
@@ -731,7 +729,7 @@ export default {
|
|
|
731
729
|
text-align: center;
|
|
732
730
|
width: 100px;
|
|
733
731
|
font-size: 14px;
|
|
734
|
-
color: $
|
|
732
|
+
color: $ml-theme-primary-color;
|
|
735
733
|
/* #ifndef APP-NVUE */
|
|
736
734
|
letter-spacing: 3px;
|
|
737
735
|
/* #endif */
|
|
@@ -909,7 +907,7 @@ export default {
|
|
|
909
907
|
border-radius: 100px;
|
|
910
908
|
height: 40px;
|
|
911
909
|
line-height: 40px;
|
|
912
|
-
background-color: $
|
|
910
|
+
background-color: $ml-theme-primary-color;
|
|
913
911
|
color: #fff;
|
|
914
912
|
font-size: 16px;
|
|
915
913
|
letter-spacing: 2px;
|
|
@@ -796,8 +796,6 @@ export default {
|
|
|
796
796
|
</script>
|
|
797
797
|
|
|
798
798
|
<style lang="scss">
|
|
799
|
-
$uni-primary: #007aff !default;
|
|
800
|
-
|
|
801
799
|
.uni-date {
|
|
802
800
|
/* #ifndef APP-NVUE */
|
|
803
801
|
width: 100%;
|
|
@@ -956,14 +954,14 @@ export default {
|
|
|
956
954
|
}
|
|
957
955
|
|
|
958
956
|
.popup-x-footer text:hover {
|
|
959
|
-
color: $
|
|
957
|
+
color: $ml-theme-primary-color;
|
|
960
958
|
cursor: pointer;
|
|
961
959
|
opacity: 0.8;
|
|
962
960
|
}
|
|
963
961
|
|
|
964
962
|
.popup-x-footer .confirm {
|
|
965
963
|
margin-left: 20px;
|
|
966
|
-
color: $
|
|
964
|
+
color: $ml-theme-primary-color;
|
|
967
965
|
}
|
|
968
966
|
|
|
969
967
|
.uni-date-changed {
|
|
@@ -788,8 +788,6 @@ export default {
|
|
|
788
788
|
</script>
|
|
789
789
|
|
|
790
790
|
<style lang="scss">
|
|
791
|
-
$uni-primary: #007aff !default;
|
|
792
|
-
|
|
793
791
|
.uni-datetime-picker {
|
|
794
792
|
/* #ifndef APP-NVUE */
|
|
795
793
|
/* width: 100%; */
|
|
@@ -823,7 +821,7 @@ export default {
|
|
|
823
821
|
|
|
824
822
|
.uni-datetime-picker-btn-text {
|
|
825
823
|
font-size: 14px;
|
|
826
|
-
color: $
|
|
824
|
+
color: $ml-theme-primary-color;
|
|
827
825
|
}
|
|
828
826
|
|
|
829
827
|
.uni-datetime-picker-btn-group {
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
width: 100%;
|
|
57
57
|
height: 90rpx;
|
|
58
58
|
line-height: 90rpx;
|
|
59
|
-
color: $
|
|
59
|
+
color: $ml-font-color;
|
|
60
60
|
background: #FFFFFF;
|
|
61
61
|
.ml-navbar-left-warpper {
|
|
62
62
|
height: 100%;
|
|
@@ -92,4 +92,4 @@ export default {
|
|
|
92
92
|
font-size: 30rpx;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
</style>
|
|
95
|
+
</style>
|
|
@@ -182,13 +182,20 @@ export default {
|
|
|
182
182
|
return column.cellRender.props ? column.cellRender.props.activeColor : ''
|
|
183
183
|
},
|
|
184
184
|
getHeaderCellClass (params) {
|
|
185
|
+
const { column } = params
|
|
186
|
+
const clss = []
|
|
187
|
+
const showOverflow = XEUtils.isBoolean(column.showOverflow) ? column.showOverflow : this.showOverflow
|
|
188
|
+
if (showOverflow) {
|
|
189
|
+
clss.push('is-ellipsis')
|
|
190
|
+
}
|
|
185
191
|
if (this.headerCellClass) {
|
|
186
192
|
if (XEUtils.isFunction(this.headerCellClass)) {
|
|
187
|
-
|
|
193
|
+
clss.push(this.headerCellClass.call(this.currVM, params))
|
|
194
|
+
} else {
|
|
195
|
+
clss.push(`${this.headerCellClass}`)
|
|
188
196
|
}
|
|
189
|
-
return `${this.headerCellClass}`
|
|
190
197
|
}
|
|
191
|
-
return ''
|
|
198
|
+
return clss.join(' ')
|
|
192
199
|
},
|
|
193
200
|
getHeaderCellValue (params) {
|
|
194
201
|
const { row, column } = params
|
|
@@ -342,7 +349,6 @@ export default {
|
|
|
342
349
|
background: #fff;
|
|
343
350
|
.table-td {
|
|
344
351
|
height: 84rpx;
|
|
345
|
-
line-height: 84rpx;
|
|
346
352
|
}
|
|
347
353
|
}
|
|
348
354
|
.table-th {
|
package/package.json
CHANGED
package/theme.scss
CHANGED
|
@@ -11,15 +11,15 @@ $ml-theme-warning-color: #f0ad4e;
|
|
|
11
11
|
$ml-theme-error-color: #dd524d;
|
|
12
12
|
|
|
13
13
|
// 字体
|
|
14
|
-
$ml-base-font-size:
|
|
14
|
+
$ml-base-font-size: 17px;
|
|
15
15
|
// 副标题字体
|
|
16
|
-
$ml-subhead-font-size:
|
|
16
|
+
$ml-subhead-font-size: 15px;
|
|
17
17
|
// 描述字体
|
|
18
|
-
$ml-describe-font-size:
|
|
18
|
+
$ml-describe-font-size: 14px;
|
|
19
19
|
|
|
20
20
|
// 页面间隔宽度
|
|
21
|
-
$ml-page-interval-margin:
|
|
22
|
-
$ml-page-toolbar-left-width:
|
|
21
|
+
$ml-page-interval-margin: 8px;
|
|
22
|
+
$ml-page-toolbar-left-width: 60px;
|
|
23
23
|
|
|
24
24
|
// 全局色调
|
|
25
25
|
$ml-gray-color: #F0F2F5;
|
|
@@ -31,11 +31,11 @@ $ml-purple-color: #9747FF;
|
|
|
31
31
|
$ml-white-color: #ffffff;
|
|
32
32
|
|
|
33
33
|
// 边框圆角
|
|
34
|
-
$ml-border-radius:
|
|
34
|
+
$ml-border-radius: 4px;
|
|
35
35
|
// 按钮间隔宽度
|
|
36
|
-
$ml-button-interval-margin:
|
|
36
|
+
$ml-button-interval-margin: 8px;
|
|
37
37
|
// 输入框清除按钮颜色
|
|
38
38
|
$ml-input-clear-icon-color: rgba(23, 26, 29, 0.4);
|
|
39
|
-
$ml-input-clear-icon-font-size:
|
|
39
|
+
$ml-input-clear-icon-font-size: 22px;
|
|
40
40
|
// 输入框提示文本颜色
|
|
41
41
|
$ml-input-color-placeholder: rgba(23, 26, 29, 0.7);
|