sadais-piui 1.2.7-beta101 → 1.2.7-beta103

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.
@@ -10,7 +10,7 @@
10
10
  <template>
11
11
  <view class="pi-calendar-input">
12
12
  <!-- 输入框 -->
13
- <view v-if="$slots.default || $slots.$default" class="pi-w-100P" @click="show = true">
13
+ <view v-if="$slots.default || $slots.$default" class="pi-w-100P" @click="handleShow()">
14
14
  <slot />
15
15
  </view>
16
16
  <pi-input
@@ -42,7 +42,7 @@
42
42
  :disable-default-padding="getInput.disableDefaultPadding"
43
43
  :clearable="getInput.clearable"
44
44
  :clear-icon="getInput.clearIcon"
45
- @click="show = true"
45
+ @click="handleShow()"
46
46
  @clear="handleClearValue"
47
47
  />
48
48
 
@@ -141,6 +141,10 @@ export default {
141
141
  fn: calendarInput.parseValueFn
142
142
  }
143
143
  }
144
+ },
145
+ disabled: {
146
+ type: Boolean,
147
+ default: calendarInput.disabled
144
148
  }
145
149
  },
146
150
  data() {
@@ -183,9 +187,20 @@ export default {
183
187
  .join(this.rangeSplit)
184
188
  }
185
189
  return ''
186
- }
190
+ },
191
+ getDisabled() {
192
+ const parentFormItem = this.$pi.parent(this, 'PiFormItem')
193
+ const disabled = this.disabled || (parentFormItem && parentFormItem.getDisabled)
194
+ return disabled
195
+ },
187
196
  },
188
197
  methods: {
198
+ handleShow() {
199
+ if (this.getDisabled) {
200
+ return
201
+ }
202
+ this.show = true
203
+ },
189
204
  handlePopupClose() {
190
205
  this.val = false
191
206
  // 关闭
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view ref="root" :class="[customClass, 'wrapper']" :style="[customStyle]">
2
+ <view ref="root" :class="['wrapper',customClass, {disabled}]" :style="[customStyle]">
3
3
  <canvas
4
4
  ref="canvas"
5
5
  :style="[canvasStyle]"
@@ -72,6 +72,10 @@ export default {
72
72
  type: Number,
73
73
  // `1`
74
74
  default: 1
75
+ },
76
+ disabled: {
77
+ type: Boolean,
78
+ default: false
75
79
  }
76
80
  },
77
81
  data() {
@@ -385,6 +389,9 @@ export default {
385
389
  width: 100%;
386
390
  height: 100%;
387
391
  border: 1px solid #aaaaaa;
392
+ &.disabled {
393
+ pointer-events: none;
394
+ }
388
395
  }
389
396
 
390
397
  .content {
@@ -155,7 +155,7 @@ export default {
155
155
  methods: {
156
156
  handleValChange() {
157
157
  // 同步checkbox子组件
158
- this._children.forEach(child => {
158
+ this._children?.forEach(child => {
159
159
  // 对设置了name属性的checkbox才做同步
160
160
  if (child.name) {
161
161
  setTimeout(() => {
@@ -5,7 +5,7 @@
5
5
  type="number"
6
6
  :value="val"
7
7
  :focus="focus"
8
- :disabled="disabled"
8
+ :disabled="getDisabled"
9
9
  :maxlength="getLength"
10
10
  @focus="focus = true"
11
11
  @blur="focus = false"
@@ -137,12 +137,15 @@ export default {
137
137
  default() {
138
138
  return codeInput.codeFormat
139
139
  }
140
+ },
141
+ disabled: {
142
+ type: Boolean,
143
+ default: codeInput.disabled
140
144
  }
141
145
  },
142
146
  data() {
143
147
  return {
144
148
  focus: false,
145
- disabled: false,
146
149
  data() {
147
150
  return {
148
151
  val: this.value
@@ -165,7 +168,12 @@ export default {
165
168
  },
166
169
  getAlign() {
167
170
  return ALIGN_MAP[this.align]
168
- }
171
+ },
172
+ getDisabled() {
173
+ const parentFormItem = this.$pi.parent(this, 'PiFormItem')
174
+ const disabled = this.disabled || (parentFormItem && parentFormItem.getDisabled)
175
+ return disabled
176
+ },
169
177
  },
170
178
  mounted() {
171
179
  if (this.autoFocus) {
@@ -10,7 +10,7 @@
10
10
  <template>
11
11
  <view class="pi-datePicker-input">
12
12
  <!-- 输入框 -->
13
- <view v-if="$slots.default || $slots.$default" class="pi-w-100P" @click="show = true">
13
+ <view v-if="$slots.default || $slots.$default" class="pi-w-100P" @click="handleShow()">
14
14
  <slot />
15
15
  </view>
16
16
  <pi-input
@@ -42,7 +42,7 @@
42
42
  :disable-default-padding="getInput.disableDefaultPadding"
43
43
  :clearable="getInput.clearable"
44
44
  :clear-icon="getInput.clearIcon"
45
- @click="show = true"
45
+ @click="handleShow()"
46
46
  @clear="handleClearValue"
47
47
  />
48
48
 
@@ -149,6 +149,10 @@ export default {
149
149
  fn: datePickerInput.parseValueFn
150
150
  }
151
151
  }
152
+ },
153
+ disabled: {
154
+ type: Boolean,
155
+ default: datePickerInput.disabled
152
156
  }
153
157
  },
154
158
  data() {
@@ -177,9 +181,20 @@ export default {
177
181
  if (this.$pi.lang.isEmpty(this.val)) return ''
178
182
  const date = this.$pi.date.parseDate(this.val)
179
183
  return date.format(this.dateFormat)
180
- }
184
+ },
185
+ getDisabled() {
186
+ const parentFormItem = this.$pi.parent(this, 'PiFormItem')
187
+ const disabled = this.disabled || (parentFormItem && parentFormItem.getDisabled)
188
+ return disabled
189
+ },
181
190
  },
182
191
  methods: {
192
+ handleShow() {
193
+ if (this.getDisabled) {
194
+ return
195
+ }
196
+ this.show = true
197
+ },
183
198
  handlePopupClose() {
184
199
  this.val = false
185
200
  // 关闭
@@ -194,6 +194,10 @@ export default {
194
194
  default() {
195
195
  return dropdown.maskAlignTop
196
196
  }
197
+ },
198
+ disabled: {
199
+ type: Boolean,
200
+ default: dropdown.disabled
197
201
  }
198
202
  },
199
203
  data() {
@@ -273,7 +277,7 @@ export default {
273
277
  },
274
278
  // 显示当前Tab
275
279
  async handleClickTab(item) {
276
- if (item.disabled) return
280
+ if (this.disabled || item.disabled) return
277
281
  if (this.submiting) return console.log(TAG, '你点得太快了')
278
282
  if (this.show && item.id === this.activeItem.id) {
279
283
  this.closeMask()
@@ -94,6 +94,10 @@ export default {
94
94
  align: {
95
95
  type: String,
96
96
  default: config.align
97
+ },
98
+ disabled: {
99
+ type: Boolean,
100
+ default: false
97
101
  }
98
102
  },
99
103
  data() {
@@ -196,6 +200,9 @@ export default {
196
200
  },
197
201
  methods: {
198
202
  handlePrev() {
203
+ if (this.disabled) {
204
+ return
205
+ }
199
206
  this.val -= 1
200
207
  if (this.val <= 0) {
201
208
  this.val = 1
@@ -203,6 +210,9 @@ export default {
203
210
  this.handleEmitChange()
204
211
  },
205
212
  handleNext() {
213
+ if (this.disabled) {
214
+ return
215
+ }
206
216
  this.val += 1
207
217
  if (this.val > this.totalPage) {
208
218
  this.val = this.totalPage
@@ -210,6 +220,9 @@ export default {
210
220
  this.handleEmitChange()
211
221
  },
212
222
  handleClickPage(page) {
223
+ if (this.disabled) {
224
+ return
225
+ }
213
226
  if (page !== '...') {
214
227
  this.val = page
215
228
  this.handleEmitChange()
@@ -171,7 +171,7 @@ export default {
171
171
  : this.$pi.common.addUnit(this.border)
172
172
  },
173
173
  getDisable() {
174
- return this.inheritProps.disabled || this.disabled
174
+ return this.inheritProps.getDisabled || this.disabled
175
175
  },
176
176
  getActiveMode() {
177
177
  return this.inheritProps.activeMode || this.activeMode
@@ -36,7 +36,7 @@ export default {
36
36
  'borderRadius',
37
37
  'stretch',
38
38
  'border',
39
- 'disabled',
39
+ 'getDisabled',
40
40
  'size',
41
41
  'iconSize',
42
42
  'activeColor',
@@ -162,6 +162,12 @@ export default {
162
162
  default: radioGroup.onlyIconSelect
163
163
  }
164
164
  },
165
+ computed: {
166
+ getDisabled() {
167
+ const parent = this.$pi.parent(this, 'PiFormItem')
168
+ return this.disabled || (parent && parent.getDisabled)
169
+ }
170
+ },
165
171
  methods: {
166
172
  /**
167
173
  * @vuese
@@ -13,7 +13,7 @@
13
13
  <view
14
14
  v-if="$slots.default || $slots.$default"
15
15
  class="pi-w-100P"
16
- @click="show = true"
16
+ @click="handleShow()"
17
17
  >
18
18
  <slot />
19
19
  </view>
@@ -46,7 +46,7 @@
46
46
  :disable-default-padding="getInput.disableDefaultPadding"
47
47
  :clearable="getInput.clearable"
48
48
  :clear-icon="getInput.clearIcon"
49
- @click="show = true"
49
+ @click="handleShow()"
50
50
  @clear="handleClearValue"
51
51
  />
52
52
 
@@ -141,6 +141,10 @@ export default {
141
141
  fn: regionsSelectInput.parseValueFn
142
142
  }
143
143
  }
144
+ },
145
+ disabled: {
146
+ type: Boolean,
147
+ default: regionsSelectInput.disabled
144
148
  }
145
149
  },
146
150
  data() {
@@ -179,9 +183,19 @@ export default {
179
183
  this.getRegionsSelect.regionsData
180
184
  )
181
185
  return this.generateRegionsName(regions)
186
+ },
187
+ getDisabled() {
188
+ const parent = this.$pi.parent(this, 'PiFormItem')
189
+ return this.disabled || (parent && parent.getDisabled)
182
190
  }
183
191
  },
184
192
  methods: {
193
+ handleShow() {
194
+ if (this.getDisabled) {
195
+ return
196
+ }
197
+ this.show = true
198
+ },
185
199
  generateRegionsName(regions) {
186
200
  const addressFields = ['province', 'city', 'county', 'street']
187
201
  return addressFields
@@ -13,7 +13,7 @@
13
13
  <view
14
14
  v-if="$slots.default || $slots.$default"
15
15
  class="pi-w-100P"
16
- @click="show = true"
16
+ @click="handleShow()"
17
17
  >
18
18
  <slot />
19
19
  </view>
@@ -46,7 +46,7 @@
46
46
  :disable-default-padding="getInput.disableDefaultPadding"
47
47
  :clearable="getInput.clearable"
48
48
  :clear-icon="getInput.clearIcon"
49
- @click="show = true"
49
+ @click="handleShow()"
50
50
  @clear="handleClearValue"
51
51
  />
52
52
 
@@ -151,6 +151,10 @@ export default {
151
151
  fn: selectInput.parseValueFn
152
152
  }
153
153
  }
154
+ },
155
+ disabled: {
156
+ type: Boolean,
157
+ default: selectInput.disabled
154
158
  }
155
159
  },
156
160
  data() {
@@ -168,12 +172,22 @@ export default {
168
172
  },
169
173
  getInputValue() {
170
174
  return this.handleGetInputValue()
175
+ },
176
+ getDisabled() {
177
+ const parent = this.$pi.parent(this, 'PiFormItem')
178
+ return this.disabled || (parent && parent.getDisabled)
171
179
  }
172
180
  },
173
181
  created() {
174
182
  this.initRemoteSelectData()
175
183
  },
176
184
  methods: {
185
+ handleShow() {
186
+ if (this.getDisabled) {
187
+ return
188
+ }
189
+ this.show = true
190
+ },
177
191
  initRemoteSelectData() {
178
192
  // 如果开启了远程搜索 则在创建之初 先触发一次搜索 让代码触发到用户自定义的remoteMethod or parseRemoteSearchResult方法中
179
193
  // 目的为了回显数据
@@ -132,6 +132,10 @@ export default {
132
132
  }
133
133
  },
134
134
  computed: {
135
+ getDisabled() {
136
+ const parent = this.$pi.parent(this, 'PiFormItem')
137
+ return this.disabled || (parent && parent.getDisabled)
138
+ },
135
139
  getSize() {
136
140
  return this.$pi.common.addUnit(this.size)
137
141
  },
@@ -177,7 +181,7 @@ export default {
177
181
  methods: {
178
182
  handleSwitchToggle() {
179
183
  // 禁用开关
180
- if (this.disabled) return
184
+ if (this.getDisabled) return
181
185
  this.val = this.val === this.activeValue ? this.inactiveValue : this.activeValue
182
186
  if (this.vibrateShort) uni.vibrateShort()
183
187
  this.handleEmitChange()
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  * @Author: zhangzhenfei
3
3
  * @Date: 2021-08-13 11:31:57
4
- * @LastEditTime: 2024-05-13 19:08:30
4
+ * @LastEditTime: 2024-05-20 12:18:03
5
5
  * @LastEditors: zhangzhenfei
6
6
  * @Description: 图片上传组件
7
7
  * @FilePath: /piui-awesome/src/piui/components/pi-upload-img/index.vue
@@ -20,11 +20,11 @@
20
20
  class="pi-rela pi-flex-column-center"
21
21
  @tap="handlePreview(img)"
22
22
  >
23
- <view v-if="!disabled" class="close" @tap.stop="handleDelete(index)">
23
+ <view v-if="!getDisabled" class="close" @tap.stop="handleDelete(index)">
24
24
  <pi-icon name="roundclosefill" color="#8e8e8e" size="36" />
25
25
  </view>
26
26
  <image
27
- v-if="type === 'image'"
27
+ v-if="isImageFilename(imgField ? img[imgField] : img)"
28
28
  :style="[getItemStyle]"
29
29
  class="pi-of-hidden"
30
30
  :mode="imageMode"
@@ -48,7 +48,7 @@
48
48
  </view>
49
49
  </view>
50
50
  <!-- 上传框 -->
51
- <view v-if="getUploadMaxCount && !disabled">
51
+ <view v-if="getUploadMaxCount && !getDisabled">
52
52
  <view
53
53
  :style="[getUploadBtnStyle]"
54
54
  class="pi-flex-column-center"
@@ -111,6 +111,15 @@
111
111
  </pi-bottom-bar>
112
112
  </view>
113
113
  </pi-mask>
114
+ <!-- 上传视频操作面板(小程序专用) -->
115
+ <pi-action-sheet
116
+ v-model="showActionSheet"
117
+ :items="actionSheetItems"
118
+ :popup="{
119
+ borderRadius: 0
120
+ }"
121
+ @select="handleActionSheetSelect"
122
+ />
114
123
  </view>
115
124
  </template>
116
125
 
@@ -368,10 +377,27 @@ export default {
368
377
  return {
369
378
  showCrop: false, // 是否显示裁剪工具
370
379
  cropPic: '', // 需要剪裁的图片
371
- cropedPic: '' // 剪裁后的图片
380
+ cropedPic: '', // 剪裁后的图片
381
+ showActionSheet: false // 是否显示上传视频操作面板
372
382
  }
373
383
  },
374
384
  computed: {
385
+ getDisabled() {
386
+ const parent = this.$pi.parent(this, 'PiFormItem')
387
+ return this.disabled || (parent && parent.getDisabled)
388
+ },
389
+ actionSheetItems() {
390
+ return [
391
+ {
392
+ id: 1,
393
+ text: '选择媒体图片/视频'
394
+ },
395
+ {
396
+ id: 2,
397
+ text: '选择微信聊天文件'
398
+ }
399
+ ]
400
+ },
375
401
  isValString() {
376
402
  return this.$pi.lang.isString(this.val)
377
403
  },
@@ -447,6 +473,7 @@ export default {
447
473
  }
448
474
  },
449
475
  methods: {
476
+ isImageFilename,
450
477
  getFileType(file) {
451
478
  if (!file) return ''
452
479
  const ext = file.split('.').pop()
@@ -651,7 +678,7 @@ export default {
651
678
  // #endif
652
679
 
653
680
  // #ifdef MP-WEIXIN
654
- this.handleSelectMessageFile()
681
+ this.showActionSheet = true
655
682
  // #endif
656
683
 
657
684
  return
@@ -673,7 +700,7 @@ export default {
673
700
  }
674
701
  },
675
702
  async handleChooseFile() {
676
- const { sizeType, extension, sourceType, crop } = this.getChooseImageOpts
703
+ const { sizeType, extension, sourceType, crop } = this.getChooseFileOpts
677
704
  try {
678
705
  const [, result] = await uni.chooseFile({
679
706
  count: this.getUploadMaxCount,
@@ -699,6 +726,8 @@ export default {
699
726
  this.$toast('请在微信小程序中使用')
700
727
  // #endif
701
728
 
729
+ console.log('从微信聊天会话中选择文件')
730
+
702
731
  // #ifdef MP-WEIXIN
703
732
  this.showSheet = false
704
733
  try {
@@ -714,10 +743,6 @@ export default {
714
743
  if (errMsg !== 'chooseMessageFile:ok') {
715
744
  throw new Error(errMsg)
716
745
  }
717
- // const selectFile = tempFiles[0]
718
- // if (!this.isRightType(selectFile)) {
719
- // return
720
- // }
721
746
  this.handleUpload(tempFiles)
722
747
  } catch (error) {
723
748
  console.log(error)
@@ -784,10 +809,12 @@ export default {
784
809
  }
785
810
  },
786
811
  async handleChooseMedia() {
787
- const { sourceType, maxDuration, camera } = this.getChooseVideoOpts
812
+ const { sourceType, maxDuration, camera } =
813
+ this.type === 'video' ? this.getChooseVideoOpts : this.getChooseFileOpts
788
814
  try {
789
815
  const [, result] = await uni.chooseMedia({
790
- mediaType: ['video'],
816
+ count: this.getUploadMaxCount,
817
+ mediaType: this.type === 'video' ? ['video'] : ['video', 'image'],
791
818
  sourceType,
792
819
  maxDuration,
793
820
  camera
@@ -796,17 +823,25 @@ export default {
796
823
  if (errMsg !== 'chooseMedia:ok') {
797
824
  throw new Error(errMsg)
798
825
  }
799
- console.log(TAG, '上传视频结果', result)
826
+ console.log(TAG, '上传媒体结果', result)
800
827
 
801
828
  // #ifndef H5
802
829
  // 非H5端/开发者工具,上传视频,执行压缩视频操作
803
830
  if (this.$pi.system.systemInfo.platform !== 'devtools') {
804
831
  const compressTempFiles = []
805
832
  for await (const tempFile of tempFiles) {
806
- const tempFilePath = await this.handleCompressVideo(
807
- tempFile.tempFilePath
808
- )
809
- compressTempFiles.push(tempFilePath)
833
+ const tempFilePath = tempFile.tempFilePath
834
+ let filePath = ''
835
+ if (isImageFilename(tempFilePath)) {
836
+ const filePaths = await this.handleCompressImgs([
837
+ tempFile.tempFilePath
838
+ ])
839
+ filePath = filePaths[0]
840
+ } else {
841
+ filePath = await this.handleCompressVideo(tempFile.tempFilePath)
842
+ }
843
+
844
+ compressTempFiles.push(filePath)
810
845
  }
811
846
  this.handleUpload(compressTempFiles)
812
847
  return
@@ -835,6 +870,13 @@ export default {
835
870
  return tempFilePath
836
871
  }
837
872
  return tempUrl
873
+ },
874
+ handleActionSheetSelect(type) {
875
+ if (type.id === 1) {
876
+ this.handleChooseMedia()
877
+ } else {
878
+ this.handleSelectMessageFile()
879
+ }
838
880
  }
839
881
  }
840
882
  }
@@ -14,5 +14,6 @@ export default {
14
14
  calendar,
15
15
  dateFormat: 'YYYY-MM-DD', // 已选择的时间格式化显示规则,默认('YYYY-MM-DD')
16
16
  rangeSplit: '至', // 范围选择时间分隔符,默认('至')
17
- parseValueFn: null // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
17
+ parseValueFn: null, // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
18
+ disabled: false
18
19
  }
@@ -8,5 +8,6 @@ export default {
8
8
  autoFocusDelay: 350, // 自动拉起键盘延时
9
9
  stretch: false, // 每项验证码是否均分宽度
10
10
  align: 'left', // 验证码对齐方向,可选值:left、center、right
11
- codeFormat: '' // 验证码显示格式化
11
+ codeFormat: '', // 验证码显示格式化
12
+ disabled: false
12
13
  }
@@ -13,5 +13,6 @@ export default {
13
13
  // 日期弹窗的配置,默认选项请参照datePicker
14
14
  datePicker,
15
15
  dateFormat: 'YYYY-MM-DD', // 已选择的时间格式化显示规则,默认('YYYY-MM-DD')
16
- parseValueFn: null // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
16
+ parseValueFn: null, // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
17
+ disabled: false
17
18
  }
@@ -20,5 +20,6 @@ export default {
20
20
  selectedCheckbox: null, // 选中复选框配置
21
21
  stretch: false, // 标签是否均分布局,可选值 `true`
22
22
  tabHeight: 80, // 标签的高度,单位rpx
23
- maskAlignTop: true // 是否需要蒙层顶部对齐组件,可选值 `false`
23
+ maskAlignTop: true, // 是否需要蒙层顶部对齐组件,可选值 `false`
24
+ disabled: false
24
25
  }
@@ -24,5 +24,6 @@ export default {
24
24
  keyDefaultValue: true
25
25
  },
26
26
  rangeSplit: '/', // 地区分隔符,默认('/')
27
- parseValueFn: null // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
27
+ parseValueFn: null, // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
28
+ disabled: false
28
29
  }
@@ -24,5 +24,6 @@ export default {
24
24
  keyDefaultValue: true
25
25
  },
26
26
  rangeSplit: ',', // 范围选择时间分隔符,默认(',')
27
- parseValueFn: null // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
27
+ parseValueFn: null, // 解析值的方法,如果配置了,则读取该函数的返回值作为显示的内容
28
+ disabled: false
28
29
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author: zhangzhenfei
3
3
  * @Date: 2021-08-13 11:29:02
4
- * @LastEditTime: 2024-05-13 11:36:14
4
+ * @LastEditTime: 2024-05-20 12:11:59
5
5
  * @LastEditors: zhangzhenfei
6
6
  * @Description: 图片上传
7
7
  * @FilePath: /piui-awesome/src/piui/config/uploadImg.js
@@ -43,18 +43,20 @@ export default {
43
43
  type: 'image', // 上传文件类型,可选值为image、video、all
44
44
  // 当type为 "all"时生效,调用uni.chooseFile参数
45
45
  chooseFileOpts: {
46
- sourceType: ['album', 'camera'], // (仅在type为image或video时可用)album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
47
- extension: [] // 允许上传的文件类型,不填则不限制
46
+ sourceType: [], // (仅在type为image或video时可用)album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
47
+ extension: [], // 允许上传的文件类型,不填则不限制
48
+ maxDuration: 60, // 拍摄视频最长拍摄时间,单位秒,默认60
49
+ camera: 'back' // 前置或后置摄像头,默认back
48
50
  },
49
51
  // 当type为 "image"时生效,调用uni.chooseImage参数
50
52
  chooseImageOpts: {
51
- sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认album
53
+ sourceType: [], // album 从相册选图,camera 使用相机,默认album
52
54
  sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认compressed
53
55
  crop: {} // 图像裁剪参数,设置后 sizeType 失效
54
56
  },
55
57
  // 当type为 "video"时生效,调用uniapp.chooseVideo参数
56
58
  chooseVideoOpts: {
57
- sourceType: ['album', 'camera'], // album 从相册选视频,camera 使用相机拍摄,默认二者都有
59
+ sourceType: [], // album 从相册选视频,camera 使用相机拍摄,默认二者都有
58
60
  compressed: true, // 是否压缩视频,默认true
59
61
  maxDuration: 60, // 拍摄视频最长拍摄时间,单位秒,默认60
60
62
  camera: 'back', // 前置或后置摄像头,默认back
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7-beta101",
3
+ "version": "1.2.7-beta103",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {