sadais-piui 1.2.7-beta7 → 1.2.7-beta70

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.
Files changed (56) hide show
  1. package/components/pi-bottom-bar/index.vue +1 -1
  2. package/components/pi-calendar/index.vue +187 -182
  3. package/components/pi-calendar-input/index.vue +6 -2
  4. package/components/pi-calendar-panel/components/calendar-days/index.vue +410 -0
  5. package/components/pi-calendar-panel/index.vue +201 -163
  6. package/components/pi-cascader/index.vue +536 -0
  7. package/components/pi-checkbox/index.vue +3 -4
  8. package/components/pi-checkbox-group/index.vue +2 -8
  9. package/components/pi-circle-progress/index.vue +108 -21
  10. package/components/pi-collapse/index.vue +124 -0
  11. package/components/pi-collapse-item/index.vue +352 -0
  12. package/components/pi-date-picker/index.vue +4 -1
  13. package/components/pi-date-picker-input/index.vue +6 -2
  14. package/components/pi-dropdown/components/dropdown-tab.vue +33 -24
  15. package/components/pi-dropdown/index.vue +58 -22
  16. package/components/pi-dropdown-item/index.vue +74 -55
  17. package/components/pi-form-item/index.vue +9 -4
  18. package/components/pi-grid/index.vue +1 -1
  19. package/components/pi-grid-item/index.vue +4 -4
  20. package/components/pi-img/index.vue +0 -1
  21. package/components/pi-img-cropper/index.vue +110 -110
  22. package/components/pi-input/index.vue +21 -3
  23. package/components/pi-list-item/index.vue +1 -1
  24. package/components/pi-popup/index.vue +5 -1
  25. package/components/pi-radio/index.vue +5 -5
  26. package/components/pi-radio-group/index.vue +0 -4
  27. package/components/pi-regions-select/index.vue +6 -1
  28. package/components/pi-regions-select-input/index.vue +6 -2
  29. package/components/pi-search/index.vue +29 -2
  30. package/components/pi-section/index.vue +1 -1
  31. package/components/pi-select/index.vue +48 -4
  32. package/components/pi-select-input/index.vue +6 -2
  33. package/components/pi-stepper/index.vue +1 -1
  34. package/components/pi-steps/index.vue +115 -36
  35. package/components/pi-table/index.vue +351 -0
  36. package/components/pi-tabs/index.vue +9 -3
  37. package/components/pi-tag/index.vue +488 -0
  38. package/components/pi-upload-img/index.vue +58 -9
  39. package/components/pi-webview/index.vue +9 -3
  40. package/config/actionSheet.js +0 -1
  41. package/config/calendarPanel.js +4 -1
  42. package/config/cascader.js +22 -0
  43. package/config/circleProgress.js +17 -10
  44. package/config/collapse.js +7 -0
  45. package/config/collapseItem.js +11 -0
  46. package/config/dropdown.js +4 -1
  47. package/config/input.js +1 -0
  48. package/config/select.js +2 -0
  49. package/config/steps.js +1 -1
  50. package/config/table.js +9 -0
  51. package/config/tag.js +21 -0
  52. package/config/uploadImg.js +3 -7
  53. package/package.json +5 -2
  54. package/scss/common.scss +11 -13
  55. package/scss/icon/icon.scss +2 -1
  56. package/scss/mixin.scss +1 -1
@@ -18,7 +18,7 @@
18
18
  <!-- fixed时候的占位空间 -->
19
19
  <template v-if="fixed">
20
20
  <view class="pi-bottom-bar-placeholder" :style="[{ height: barHeight }]" />
21
- <view v-if="safeArea" class="pi-safearea" />
21
+ <!-- <view v-if="safeArea" class="pi-safearea" /> -->
22
22
  </template>
23
23
  </view>
24
24
  </template>
@@ -1,182 +1,187 @@
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
- <view class="pi-calendar" :style="[customStyle]" :class="[customClass]">
20
- <!-- 标题栏 -->
21
- <view class="pi-justify-center pi-fz-32 pi-fw-500" :style="[{ padding: getTitlePadding }]">
22
- <slot v-if="$slots.title" name="title" />
23
- <template v-else>{{ title }}</template>
24
- </view>
25
- <pi-calendar-panel
26
- v-model="calendarValue"
27
- :type="getCalendarPanel.type"
28
- :min-year="getCalendarPanel.minYear"
29
- :max-year="getCalendarPanel.maxYear"
30
- :min-date="getCalendarPanel.minDate"
31
- :max-date="getCalendarPanel.maxDate"
32
- :show-back-today="getCalendarPanel.showBackToday"
33
- :today-active-border-color="getCalendarPanel.todayActiveBorderColor"
34
- :active-color="getCalendarPanel.activeColor"
35
- :active-bg="getCalendarPanel.activeBg"
36
- :active-border-radius="getCalendarPanel.activeBorderRadius"
37
- :range-color="getCalendarPanel.rangeColor"
38
- :range-bg="getCalendarPanel.rangeBg"
39
- :start-text="getCalendarPanel.startText"
40
- :end-text="getCalendarPanel.endText"
41
- :date-format="getCalendarPanel.dateFormat"
42
- />
43
- <!-- footer -->
44
- <view class="pi-w-100P pi-align-center pi-pd-24 pi-solid-top-1">
45
- <view class="pi-flex-sub pi-fz-30 pi-fw-500">{{ getDisplayValue }}</view>
46
- <pi-button type="primary" size="medium" @click="handleConfirm">确定</pi-button>
47
- </view>
48
- </view>
49
- </pi-popup>
50
- </template>
51
-
52
- <script>
53
- import ValueSync from '../../mixin/value-sync'
54
- import { getConfig } from '../../config'
55
-
56
- const TAG = 'PiCalendar'
57
- const { calendar } = getConfig()
58
-
59
- export default {
60
- name: 'PiCalendar',
61
- // 混入v-model
62
- mixins: [ValueSync],
63
- props: {
64
- // 初始值
65
- value: {
66
- required: false
67
- },
68
- // 自定义样式,对象形式
69
- customStyle: {
70
- type: Object,
71
- // {}
72
- default() {
73
- return calendar.customStyle
74
- }
75
- },
76
- // 自定义样式类,字符串形式
77
- customClass: {
78
- type: String,
79
- // ''
80
- default() {
81
- return calendar.customClass
82
- }
83
- },
84
- // 是否显示title
85
- showTitle: {
86
- type: Boolean,
87
- // true
88
- default: calendar.showTitle
89
- },
90
- // 标题
91
- title: {
92
- type: String,
93
- // '日期选择'
94
- default: calendar.title
95
- },
96
- // 标题 padding
97
- titlePadding: {
98
- type: [String, Number],
99
- // 24
100
- default: calendar.titlePadding
101
- },
102
- // 日历面板参数设置
103
- calendarPanel: {
104
- type: Object,
105
- default() {
106
- // 参照calendarPanel
107
- return calendar.calendarPanel
108
- }
109
- },
110
- // 弹窗参数设置
111
- popup: {
112
- type: Object,
113
- default() {
114
- // 参照popup
115
- return calendar.popup
116
- }
117
- }
118
- },
119
- data() {
120
- const mergeCalendarPanel = this.$pi.lang.mergeDeep(calendar.calendarPanel, this.calendarPanel)
121
- return {
122
- calendarValue: mergeCalendarPanel.value
123
- }
124
- },
125
- computed: {
126
- getCalendarPanel() {
127
- return this.$pi.lang.mergeDeep(calendar.calendarPanel, this.calendarPanel)
128
- },
129
- getPopup() {
130
- return this.$pi.lang.mergeDeep(calendar.popup, this.popup)
131
- },
132
- getTitlePadding() {
133
- return this.$pi.common.addUnit(this.titlePadding)
134
- },
135
- getDisplayValue() {
136
- return [].concat(this.calendarValue).join(' - ')
137
- }
138
- },
139
- watch: {
140
- 'getCalendarPanel.value'(val) {
141
- this.calendarValue = val
142
- }
143
- },
144
- methods: {
145
- handlePopupClose() {
146
- this.val = false
147
- // 关闭
148
- this.$emit('close')
149
- this.handleEmitChange()
150
- },
151
- /**
152
- * @vuese
153
- * 确认选择
154
- */
155
- handleConfirm() {
156
- this.$emit('confirm', this.calendarValue)
157
- this.handlePopupClose()
158
- }
159
- }
160
- }
161
- </script>
162
-
163
- <style lang="scss" scoped>
164
- .pi-calendar {
165
- max-width: 960rpx;
166
- margin: 0 auto;
167
- }
168
- .date-item {
169
- position: relative;
170
- z-index: 2;
171
- width: calc(100% / 7);
172
- overflow: hidden;
173
- }
174
- .back-today {
175
- padding: 12rpx 24rpx;
176
- overflow: hidden;
177
- font-size: 20rpx;
178
- color: #ffffff;
179
- background: $pi-primary-color;
180
- border-radius: 50rpx 0 0 50rpx;
181
- }
182
- </style>
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 class="pi-justify-center pi-fz-32 pi-fw-500" :style="[{ padding: getTitlePadding }]">
25
+ <slot v-if="$slots.title" name="title" />
26
+ <template v-else>{{ title }}</template>
27
+ </view>
28
+ <pi-calendar-panel
29
+ v-model="calendarValue"
30
+ :type="getCalendarPanel.type"
31
+ :min-year="getCalendarPanel.minYear"
32
+ :max-year="getCalendarPanel.maxYear"
33
+ :min-date="getCalendarPanel.minDate"
34
+ :max-date="getCalendarPanel.maxDate"
35
+ :show-back-today="getCalendarPanel.showBackToday"
36
+ :today-active-border-color="getCalendarPanel.todayActiveBorderColor"
37
+ :active-color="getCalendarPanel.activeColor"
38
+ :active-bg="getCalendarPanel.activeBg"
39
+ :active-border-radius="getCalendarPanel.activeBorderRadius"
40
+ :range-color="getCalendarPanel.rangeColor"
41
+ :range-bg="getCalendarPanel.rangeBg"
42
+ :start-text="getCalendarPanel.startText"
43
+ :end-text="getCalendarPanel.endText"
44
+ :marks="getCalendarPanel.marks"
45
+ :date-format="getCalendarPanel.dateFormat"
46
+ @date-change="$emit('date-change', $event)"
47
+ />
48
+ <!-- footer -->
49
+ <view class="pi-w-100P pi-align-center pi-pd-24 pi-solid-top-1">
50
+ <view class="pi-flex-sub pi-fz-30 pi-fw-500">{{ getDisplayValue }}</view>
51
+ <pi-button type="primary" size="medium" @click="handleConfirm">确定</pi-button>
52
+ </view>
53
+ </view>
54
+ </pi-popup>
55
+ </template>
56
+
57
+ <script>
58
+ import ValueSync from '../../mixin/value-sync'
59
+ import { getConfig } from '../../config'
60
+
61
+ const TAG = 'PiCalendar'
62
+ const { calendar } = getConfig()
63
+
64
+ export default {
65
+ name: 'PiCalendar',
66
+ // 混入v-model
67
+ mixins: [ValueSync],
68
+ props: {
69
+ // 初始值
70
+ value: {
71
+ required: false
72
+ },
73
+ // 自定义样式,对象形式
74
+ customStyle: {
75
+ type: Object,
76
+ // {}
77
+ default() {
78
+ return calendar.customStyle
79
+ }
80
+ },
81
+ // 自定义样式类,字符串形式
82
+ customClass: {
83
+ type: String,
84
+ // ''
85
+ default() {
86
+ return calendar.customClass
87
+ }
88
+ },
89
+ // 是否显示title
90
+ showTitle: {
91
+ type: Boolean,
92
+ // true
93
+ default: calendar.showTitle
94
+ },
95
+ // 标题
96
+ title: {
97
+ type: String,
98
+ // '日期选择'
99
+ default: calendar.title
100
+ },
101
+ // 标题 padding
102
+ titlePadding: {
103
+ type: [String, Number],
104
+ // 24
105
+ default: calendar.titlePadding
106
+ },
107
+ // 日历面板参数设置
108
+ calendarPanel: {
109
+ type: Object,
110
+ default() {
111
+ // 参照calendarPanel
112
+ return calendar.calendarPanel
113
+ }
114
+ },
115
+ // 弹窗参数设置
116
+ popup: {
117
+ type: Object,
118
+ default() {
119
+ // 参照popup
120
+ return calendar.popup
121
+ }
122
+ }
123
+ },
124
+ data() {
125
+ const mergeCalendarPanel = this.$pi.lang.mergeDeep(calendar.calendarPanel, this.calendarPanel)
126
+ return {
127
+ calendarValue: mergeCalendarPanel.value
128
+ }
129
+ },
130
+ computed: {
131
+ getCalendarPanel() {
132
+ return this.$pi.lang.mergeDeep(calendar.calendarPanel, this.calendarPanel)
133
+ },
134
+ getPopup() {
135
+ return this.$pi.lang.mergeDeep(calendar.popup, this.popup)
136
+ },
137
+ getTitlePadding() {
138
+ return this.$pi.common.addUnit(this.titlePadding)
139
+ },
140
+ getDisplayValue() {
141
+ return [].concat(this.calendarValue).join(' - ')
142
+ }
143
+ },
144
+ watch: {
145
+ 'getCalendarPanel.value'(val) {
146
+ this.calendarValue = val
147
+ }
148
+ },
149
+ methods: {
150
+ handlePopupClose() {
151
+ this.val = false
152
+ // 关闭
153
+ this.$emit('close')
154
+ this.handleEmitChange()
155
+ },
156
+ /**
157
+ * @vuese
158
+ * 确认选择
159
+ */
160
+ handleConfirm() {
161
+ this.$emit('confirm', this.calendarValue)
162
+ this.handlePopupClose()
163
+ }
164
+ }
165
+ }
166
+ </script>
167
+
168
+ <style lang="scss" scoped>
169
+ .pi-calendar {
170
+ max-width: 960rpx;
171
+ margin: 0 auto;
172
+ }
173
+ .date-item {
174
+ position: relative;
175
+ z-index: 2;
176
+ width: calc(100% / 7);
177
+ overflow: hidden;
178
+ }
179
+ .back-today {
180
+ padding: 12rpx 24rpx;
181
+ overflow: hidden;
182
+ font-size: 20rpx;
183
+ color: #ffffff;
184
+ background: $pi-primary-color;
185
+ border-radius: 50rpx 0 0 50rpx;
186
+ }
187
+ </style>
@@ -1,10 +1,10 @@
1
1
  <!--
2
2
  * @Author: zhangzhenfei
3
3
  * @Date: 2022-05-18 11:08:49
4
- * @LastEditTime: 2022-05-21 15:00:48
4
+ * @LastEditTime: 2022-10-20 09:32:17
5
5
  * @LastEditors: zhangzhenfei
6
6
  * @Description: 日历输入
7
- * @FilePath: /hfmp-checkin-front/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-calendar-input/index.vue
7
+ * @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-calendar-input/index.vue
8
8
  -->
9
9
 
10
10
  <template>
@@ -61,6 +61,10 @@
61
61
  }"
62
62
  :popup="getCalendar.popup"
63
63
  @confirm="handleCalendarConfirm"
64
+ @close="$emit('close', $event)"
65
+ @closed="$emit('closed', $event)"
66
+ @show="$emit('show', $event)"
67
+ @showed="$emit('showed', $event)"
64
68
  />
65
69
  </view>
66
70
  </template>