sadais-piui 1.2.7-beta18 → 1.2.7-beta180
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/.prettierrc +8 -0
- package/CHANGELOG.md +7 -1
- package/components/pi-action-sheet/index.vue +262 -247
- package/components/pi-badge/index.vue +66 -8
- package/components/pi-bottom-bar/index.vue +15 -4
- package/components/pi-bubble/index.vue +14 -3
- package/components/pi-button/index.vue +17 -4
- package/components/pi-calendar/index.vue +207 -182
- package/components/pi-calendar-input/index.vue +72 -31
- package/components/pi-calendar-panel/components/calendar-days/index.vue +134 -54
- package/components/pi-calendar-panel/index.vue +52 -19
- package/components/pi-canvas/index.vue +18 -2
- package/components/pi-card/index.vue +5 -1
- package/components/pi-cascader/index.vue +635 -0
- package/components/pi-checkbox/index.vue +8 -4
- package/components/pi-checkbox-group/index.vue +12 -11
- package/components/pi-circle-progress/index.vue +75 -19
- package/components/pi-code-input/index.vue +11 -2
- package/components/pi-collapse/index.vue +18 -7
- package/components/pi-collapse-item/index.vue +35 -22
- package/components/pi-count-up/index.vue +8 -2
- package/components/pi-date-picker/index.vue +678 -391
- package/components/pi-date-picker-input/index.vue +74 -31
- package/components/pi-divider/index.vue +5 -1
- package/components/pi-dropdown/components/dropdown-tab.vue +38 -23
- package/components/pi-dropdown/index.vue +50 -23
- package/components/pi-dropdown-item/index.vue +82 -62
- package/components/pi-form/index.vue +9 -3
- package/components/pi-form-item/index.vue +105 -21
- package/components/pi-grid/index.vue +6 -2
- package/components/pi-grid-item/index.vue +17 -8
- package/components/pi-icon/index.vue +6 -1
- package/components/pi-img/index.vue +275 -267
- package/components/pi-img-cropper/canvas.js +10 -3
- package/components/pi-img-cropper/index.vue +6 -3
- package/components/pi-img-cropper/touch.js +4 -1
- package/components/pi-img-cropper/vector.js +2 -2
- package/components/pi-input/index.vue +97 -36
- package/components/pi-line-progress/index.vue +9 -2
- package/components/pi-list/index.vue +5 -1
- package/components/pi-list-item/index.vue +9 -4
- package/components/pi-loading/index.vue +10 -2
- package/components/pi-marquee/index.vue +322 -310
- package/components/pi-marquee-pure-css/index.vue +267 -0
- package/components/pi-mask/index.vue +3 -1
- package/components/pi-modal/index.vue +311 -303
- package/components/pi-navbar/index.vue +22 -5
- package/components/pi-notify/index.vue +9 -3
- package/components/pi-number-keyboard/index.vue +15 -3
- package/components/pi-opentype-button/index.vue +11 -3
- package/components/pi-pagination/index.vue +18 -1
- package/components/pi-picker/index.vue +332 -317
- package/components/pi-popup/index.vue +12 -5
- package/components/pi-popup-select/index.vue +13 -4
- package/components/pi-radio/index.vue +12 -11
- package/components/pi-radio-group/index.vue +28 -6
- package/components/pi-rate/index.vue +9 -2
- package/components/pi-regions-select/index.vue +50 -12
- package/components/pi-regions-select-input/index.vue +69 -31
- package/components/pi-search/index.vue +37 -2
- package/components/pi-section/index.vue +6 -2
- package/components/pi-select/index.vue +237 -22
- package/components/pi-select-input/index.vue +106 -41
- package/components/pi-skeleton/index.vue +2 -1
- package/components/pi-status-bar/index.vue +4 -1
- package/components/pi-stepper/index.vue +34 -20
- package/components/pi-steps/index.vue +56 -13
- package/components/pi-subsection/index.vue +10 -5
- package/components/pi-swiper/index.vue +21 -7
- package/components/pi-switch/index.vue +19 -6
- package/components/pi-table/index.vue +351 -0
- package/components/pi-tabs/index.vue +87 -20
- package/components/pi-tag/index.vue +17 -5
- package/components/pi-upload-img/index.vue +900 -44
- package/components/pi-waterfall/index.vue +14 -5
- package/components/pi-webview/index.vue +95 -82
- package/config/actionSheet.js +1 -2
- package/config/badge.js +2 -1
- package/config/calendarInput.js +2 -1
- package/config/calendarPanel.js +2 -1
- package/config/cascader.js +22 -0
- package/config/circleProgress.js +32 -4
- package/config/codeInput.js +2 -1
- package/config/datePicker.js +31 -24
- package/config/datePickerInput.js +2 -1
- package/config/dropdown.js +3 -1
- package/config/formItem.js +2 -1
- package/config/input.js +5 -3
- package/config/marqueePureCss.js +18 -0
- package/config/regionsSelectInput.js +2 -1
- package/config/select.js +13 -1
- package/config/selectInput.js +2 -1
- package/config/table.js +9 -0
- package/config/uploadImg.js +57 -12
- package/context7.json +4 -0
- package/index.js +15 -2
- package/mixin/emitter.js +8 -1
- package/mixin/page-transitions/index.js +7 -2
- package/mixin/value-sync.js +5 -0
- package/package.json +5 -2
- package/scss/common.scss +18 -21
- package/scss/icon/icon.scss +2 -1
- package/scss/mixin.scss +5 -5
- package/utils/file-utils.js +273 -0
|
@@ -13,12 +13,19 @@
|
|
|
13
13
|
>
|
|
14
14
|
<slot />
|
|
15
15
|
</view>
|
|
16
|
-
<view
|
|
16
|
+
<view
|
|
17
|
+
v-if="safeArea"
|
|
18
|
+
class="pi-safearea"
|
|
19
|
+
:style="[{ backgroundColor: safeAreaBgColor }]"
|
|
20
|
+
/>
|
|
17
21
|
</view>
|
|
18
22
|
<!-- fixed时候的占位空间 -->
|
|
19
23
|
<template v-if="fixed">
|
|
20
|
-
<view
|
|
21
|
-
|
|
24
|
+
<view
|
|
25
|
+
class="pi-bottom-bar-placeholder"
|
|
26
|
+
:style="[{ height: barHeight }]"
|
|
27
|
+
/>
|
|
28
|
+
<!-- <view v-if="safeArea" class="pi-safearea" /> -->
|
|
22
29
|
</template>
|
|
23
30
|
</view>
|
|
24
31
|
</template>
|
|
@@ -114,7 +121,11 @@ export default {
|
|
|
114
121
|
methods: {
|
|
115
122
|
async init() {
|
|
116
123
|
if (!this.fixed || this.height) return // fixed并且未设定height,才需要计算高度
|
|
117
|
-
const barRect = await this.$pi.common.queryRect(
|
|
124
|
+
const barRect = await this.$pi.common.queryRect(
|
|
125
|
+
this,
|
|
126
|
+
'.pi-bottom-bar',
|
|
127
|
+
false
|
|
128
|
+
)
|
|
118
129
|
this.barHeight = `${barRect.height}px`
|
|
119
130
|
}
|
|
120
131
|
}
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
<view class="pi-bubble-angle pi-abso" />
|
|
17
17
|
</view>
|
|
18
18
|
</view>
|
|
19
|
-
<pi-mask
|
|
19
|
+
<pi-mask
|
|
20
|
+
v-model="showMaks"
|
|
21
|
+
background="transparent"
|
|
22
|
+
@close="showBubble = false"
|
|
23
|
+
/>
|
|
20
24
|
</view>
|
|
21
25
|
</template>
|
|
22
26
|
|
|
@@ -109,7 +113,11 @@ export default {
|
|
|
109
113
|
this.$set(this, 'bublePosition', { top: '-9999vh', left: 0 })
|
|
110
114
|
this.showBubble = true
|
|
111
115
|
setTimeout(() => {
|
|
112
|
-
reslove(
|
|
116
|
+
reslove(
|
|
117
|
+
this.$refs.bubble
|
|
118
|
+
? this.$refs.bubble.$el.getBoundingClientRect().width
|
|
119
|
+
: 0
|
|
120
|
+
)
|
|
113
121
|
this.showBubble = false
|
|
114
122
|
}, 500)
|
|
115
123
|
})
|
|
@@ -120,7 +128,10 @@ export default {
|
|
|
120
128
|
const lengthGap = (this.bubleWidth - bublePosition.width) / 2
|
|
121
129
|
const compRight = this.screenWidth - bublePosition.x - bublePosition.width
|
|
122
130
|
const posRes = {}
|
|
123
|
-
if (
|
|
131
|
+
if (
|
|
132
|
+
lengthGap <= 0 ||
|
|
133
|
+
(lengthGap < bublePosition.x && lengthGap < compRight)
|
|
134
|
+
) {
|
|
124
135
|
posRes.left = -Math.abs(lengthGap) + 'px'
|
|
125
136
|
} else {
|
|
126
137
|
posRes.right = 4 - Math.min(bublePosition.x, compRight) + 'px'
|
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
<!-- 按钮内容 -->
|
|
32
32
|
<slot />
|
|
33
33
|
<view v-if="ripple" class="pi-abso-full pi-of-hidden" :class="[{ round }]">
|
|
34
|
-
<view
|
|
34
|
+
<view
|
|
35
|
+
class="wave-ripple"
|
|
36
|
+
:class="[{ active: waveInfo.active }]"
|
|
37
|
+
:style="[waveStyle]"
|
|
38
|
+
/>
|
|
35
39
|
</view>
|
|
36
40
|
</button>
|
|
37
41
|
</template>
|
|
@@ -57,7 +61,9 @@ export default {
|
|
|
57
61
|
// 'default'
|
|
58
62
|
default: button.size,
|
|
59
63
|
validator: function(value) {
|
|
60
|
-
return ['default', 'large', 'medium', 'small', 'tiny', 'mini'].includes(
|
|
64
|
+
return ['default', 'large', 'medium', 'small', 'tiny', 'mini'].includes(
|
|
65
|
+
value
|
|
66
|
+
)
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
// 按钮的预置样式
|
|
@@ -67,7 +73,14 @@ export default {
|
|
|
67
73
|
// 'default'
|
|
68
74
|
default: button.type,
|
|
69
75
|
validator: function(value) {
|
|
70
|
-
return [
|
|
76
|
+
return [
|
|
77
|
+
'default',
|
|
78
|
+
'primary',
|
|
79
|
+
'warn',
|
|
80
|
+
'secondary',
|
|
81
|
+
'line',
|
|
82
|
+
'text'
|
|
83
|
+
].includes(value)
|
|
71
84
|
}
|
|
72
85
|
},
|
|
73
86
|
// 按钮是否镂空
|
|
@@ -280,7 +293,7 @@ export default {
|
|
|
280
293
|
// 查询返回的是一个数组节点
|
|
281
294
|
let data = res[0]
|
|
282
295
|
// 查询不到节点信息,不操作
|
|
283
|
-
if (!data
|
|
296
|
+
if (!data || !data.width) return
|
|
284
297
|
// 水波纹的最终形态是一个正方形(通过border-radius让其变为一个圆形),这里要保证正方形的边长等于按钮的最长边
|
|
285
298
|
// 最终的方形(变换后的圆形)才能覆盖整个按钮
|
|
286
299
|
data.targetWidth = data.height > data.width ? data.height : data.width
|
|
@@ -1,182 +1,207 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<pi-popup
|
|
3
|
-
ref="popup"
|
|
4
|
-
:value="val"
|
|
5
|
-
:custom-class="getPopup.customClass"
|
|
6
|
-
:custom-style="getPopup.customStyle"
|
|
7
|
-
:position="getPopup.position"
|
|
8
|
-
:border-radius="getPopup.borderRadius"
|
|
9
|
-
:show-close-icon="showTitle && getPopup.showCloseIcon"
|
|
10
|
-
:close-icon="getPopup.closeIcon"
|
|
11
|
-
:safe-area-inset-bottom="getPopup.safeAreaInsetBottom"
|
|
12
|
-
:mask="getPopup.mask"
|
|
13
|
-
:hide-tab-bar="getPopup.hideTabBar"
|
|
14
|
-
:append-to-body="getPopup.appendToBody"
|
|
15
|
-
:z-index="getPopup.zIndex"
|
|
16
|
-
:background="getPopup.background"
|
|
17
|
-
@close="handlePopupClose"
|
|
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
|
-
type:
|
|
87
|
-
//
|
|
88
|
-
default
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<pi-popup
|
|
3
|
+
ref="popup"
|
|
4
|
+
:value="val"
|
|
5
|
+
:custom-class="getPopup.customClass"
|
|
6
|
+
:custom-style="getPopup.customStyle"
|
|
7
|
+
:position="getPopup.position"
|
|
8
|
+
:border-radius="getPopup.borderRadius"
|
|
9
|
+
:show-close-icon="showTitle && getPopup.showCloseIcon"
|
|
10
|
+
:close-icon="getPopup.closeIcon"
|
|
11
|
+
:safe-area-inset-bottom="getPopup.safeAreaInsetBottom"
|
|
12
|
+
:mask="getPopup.mask"
|
|
13
|
+
:hide-tab-bar="getPopup.hideTabBar"
|
|
14
|
+
:append-to-body="getPopup.appendToBody"
|
|
15
|
+
:z-index="getPopup.zIndex"
|
|
16
|
+
:background="getPopup.background"
|
|
17
|
+
@close="handlePopupClose"
|
|
18
|
+
@closed="$emit('closed', $event)"
|
|
19
|
+
@show="$emit('show', $event)"
|
|
20
|
+
@showed="$emit('showed', $event)"
|
|
21
|
+
>
|
|
22
|
+
<view class="pi-calendar" :style="[customStyle]" :class="[customClass]">
|
|
23
|
+
<!-- 标题栏 -->
|
|
24
|
+
<view
|
|
25
|
+
class="pi-justify-center pi-fz-32 pi-fw-500"
|
|
26
|
+
:style="[{ padding: getTitlePadding }]"
|
|
27
|
+
>
|
|
28
|
+
<slot v-if="$slots.title" name="title" />
|
|
29
|
+
<template v-else>{{ title }}</template>
|
|
30
|
+
</view>
|
|
31
|
+
<pi-calendar-panel
|
|
32
|
+
v-model="calendarValue"
|
|
33
|
+
:type="getCalendarPanel.type"
|
|
34
|
+
:min-year="getCalendarPanel.minYear"
|
|
35
|
+
:max-year="getCalendarPanel.maxYear"
|
|
36
|
+
:min-date="getCalendarPanel.minDate"
|
|
37
|
+
:max-date="getCalendarPanel.maxDate"
|
|
38
|
+
:show-back-today="getCalendarPanel.showBackToday"
|
|
39
|
+
:today-active-border-color="getCalendarPanel.todayActiveBorderColor"
|
|
40
|
+
:active-color="getCalendarPanel.activeColor"
|
|
41
|
+
:active-bg="getCalendarPanel.activeBg"
|
|
42
|
+
:active-border-radius="getCalendarPanel.activeBorderRadius"
|
|
43
|
+
:range-color="getCalendarPanel.rangeColor"
|
|
44
|
+
:range-bg="getCalendarPanel.rangeBg"
|
|
45
|
+
:start-text="getCalendarPanel.startText"
|
|
46
|
+
:end-text="getCalendarPanel.endText"
|
|
47
|
+
:marks="getCalendarPanel.marks"
|
|
48
|
+
:date-format="getCalendarPanel.dateFormat"
|
|
49
|
+
@date-change="$emit('date-change', $event)"
|
|
50
|
+
/>
|
|
51
|
+
<!-- footer -->
|
|
52
|
+
<view class="pi-w-100P pi-align-center pi-pd-24 pi-solid-top-1">
|
|
53
|
+
<view class="pi-flex-sub pi-fz-30 pi-fw-500">{{
|
|
54
|
+
getDisplayValue
|
|
55
|
+
}}</view>
|
|
56
|
+
<pi-button
|
|
57
|
+
type="primary"
|
|
58
|
+
size="medium"
|
|
59
|
+
:disabled="confirmDisabled"
|
|
60
|
+
@click="handleConfirm"
|
|
61
|
+
>确定</pi-button
|
|
62
|
+
>
|
|
63
|
+
</view>
|
|
64
|
+
</view>
|
|
65
|
+
</pi-popup>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import ValueSync from '../../mixin/value-sync'
|
|
70
|
+
import { getConfig } from '../../config'
|
|
71
|
+
|
|
72
|
+
const TAG = 'PiCalendar'
|
|
73
|
+
const { calendar } = getConfig()
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
name: 'PiCalendar',
|
|
77
|
+
// 混入v-model
|
|
78
|
+
mixins: [ValueSync],
|
|
79
|
+
props: {
|
|
80
|
+
// 初始值
|
|
81
|
+
value: {
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
// 自定义样式,对象形式
|
|
85
|
+
customStyle: {
|
|
86
|
+
type: Object,
|
|
87
|
+
// {}
|
|
88
|
+
default() {
|
|
89
|
+
return calendar.customStyle
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
// 自定义样式类,字符串形式
|
|
93
|
+
customClass: {
|
|
94
|
+
type: String,
|
|
95
|
+
// ''
|
|
96
|
+
default() {
|
|
97
|
+
return calendar.customClass
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
// 是否显示title
|
|
101
|
+
showTitle: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
// true
|
|
104
|
+
default: calendar.showTitle
|
|
105
|
+
},
|
|
106
|
+
// 标题
|
|
107
|
+
title: {
|
|
108
|
+
type: String,
|
|
109
|
+
// '日期选择'
|
|
110
|
+
default: calendar.title
|
|
111
|
+
},
|
|
112
|
+
// 标题 padding
|
|
113
|
+
titlePadding: {
|
|
114
|
+
type: [String, Number],
|
|
115
|
+
// 24
|
|
116
|
+
default: calendar.titlePadding
|
|
117
|
+
},
|
|
118
|
+
// 日历面板参数设置
|
|
119
|
+
calendarPanel: {
|
|
120
|
+
type: Object,
|
|
121
|
+
default() {
|
|
122
|
+
// 参照calendarPanel
|
|
123
|
+
return calendar.calendarPanel
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
// 弹窗参数设置
|
|
127
|
+
popup: {
|
|
128
|
+
type: Object,
|
|
129
|
+
default() {
|
|
130
|
+
// 参照popup
|
|
131
|
+
return calendar.popup
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
data() {
|
|
136
|
+
const mergeCalendarPanel = this.$pi.lang.mergeDeep(
|
|
137
|
+
calendar.calendarPanel,
|
|
138
|
+
this.calendarPanel
|
|
139
|
+
)
|
|
140
|
+
return {
|
|
141
|
+
calendarValue: mergeCalendarPanel.value
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
computed: {
|
|
145
|
+
getCalendarPanel() {
|
|
146
|
+
return this.$pi.lang.mergeDeep(calendar.calendarPanel, this.calendarPanel)
|
|
147
|
+
},
|
|
148
|
+
getPopup() {
|
|
149
|
+
return this.$pi.lang.mergeDeep(calendar.popup, this.popup)
|
|
150
|
+
},
|
|
151
|
+
getTitlePadding() {
|
|
152
|
+
return this.$pi.common.addUnit(this.titlePadding)
|
|
153
|
+
},
|
|
154
|
+
getDisplayValue() {
|
|
155
|
+
return [].concat(this.calendarValue).join(' - ')
|
|
156
|
+
},
|
|
157
|
+
confirmDisabled() {
|
|
158
|
+
if (this.getCalendarPanel.type === 'range') {
|
|
159
|
+
return this.calendarValue.length !== 2
|
|
160
|
+
}
|
|
161
|
+
return !this.calendarValue
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
watch: {
|
|
165
|
+
'getCalendarPanel.value'(val) {
|
|
166
|
+
this.calendarValue = val
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
methods: {
|
|
170
|
+
handlePopupClose() {
|
|
171
|
+
this.val = false
|
|
172
|
+
// 关闭
|
|
173
|
+
this.$emit('close')
|
|
174
|
+
this.handleEmitChange()
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* @vuese
|
|
178
|
+
* 确认选择
|
|
179
|
+
*/
|
|
180
|
+
handleConfirm() {
|
|
181
|
+
this.$emit('confirm', this.calendarValue)
|
|
182
|
+
this.handlePopupClose()
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<style lang="scss" scoped>
|
|
189
|
+
.pi-calendar {
|
|
190
|
+
max-width: 960rpx;
|
|
191
|
+
margin: 0 auto;
|
|
192
|
+
}
|
|
193
|
+
.date-item {
|
|
194
|
+
position: relative;
|
|
195
|
+
z-index: 2;
|
|
196
|
+
width: calc(100% / 7);
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
}
|
|
199
|
+
.back-today {
|
|
200
|
+
padding: 12rpx 24rpx;
|
|
201
|
+
overflow: hidden;
|
|
202
|
+
font-size: 20rpx;
|
|
203
|
+
color: #ffffff;
|
|
204
|
+
background: $pi-primary-color;
|
|
205
|
+
border-radius: 50rpx 0 0 50rpx;
|
|
206
|
+
}
|
|
207
|
+
</style>
|