sadais-piui 1.2.7-beta102 → 1.2.7-beta104
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/components/pi-calendar-input/index.vue +18 -3
- package/components/pi-canvas/index.vue +8 -1
- package/components/pi-code-input/index.vue +11 -3
- package/components/pi-date-picker-input/index.vue +18 -3
- package/components/pi-dropdown/index.vue +5 -1
- package/components/pi-pagination/index.vue +13 -0
- package/components/pi-radio/index.vue +1 -1
- package/components/pi-radio-group/index.vue +7 -1
- package/components/pi-regions-select-input/index.vue +16 -2
- package/components/pi-select-input/index.vue +16 -2
- package/components/pi-switch/index.vue +5 -1
- package/components/pi-upload-img/index.vue +31 -10
- package/config/calendarInput.js +2 -1
- package/config/codeInput.js +2 -1
- package/config/datePickerInput.js +2 -1
- package/config/dropdown.js +2 -1
- package/config/regionsSelectInput.js +2 -1
- package/config/selectInput.js +2 -1
- package/config/uploadImg.js +6 -5
- package/package.json +1 -1
|
@@ -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="
|
|
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="
|
|
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,
|
|
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 {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
type="number"
|
|
6
6
|
:value="val"
|
|
7
7
|
:focus="focus"
|
|
8
|
-
: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="
|
|
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="
|
|
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.
|
|
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
|
-
'
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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.
|
|
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-
|
|
4
|
+
* @LastEditTime: 2024-05-24 15:19:19
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传组件
|
|
7
7
|
* @FilePath: /piui-awesome/src/piui/components/pi-upload-img/index.vue
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
class="pi-rela pi-flex-column-center"
|
|
21
21
|
@tap="handlePreview(img)"
|
|
22
22
|
>
|
|
23
|
-
<view v-if="!
|
|
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
|
|
@@ -37,7 +37,11 @@
|
|
|
37
37
|
>
|
|
38
38
|
<view class="file-mask">
|
|
39
39
|
<pi-icon
|
|
40
|
-
:name="
|
|
40
|
+
:name="
|
|
41
|
+
isVideoFilename(imgField ? img[imgField] : img)
|
|
42
|
+
? 'videofill'
|
|
43
|
+
: 'activity-fill'
|
|
44
|
+
"
|
|
41
45
|
size="48"
|
|
42
46
|
color="#0C6DF4"
|
|
43
47
|
/>
|
|
@@ -48,7 +52,7 @@
|
|
|
48
52
|
</view>
|
|
49
53
|
</view>
|
|
50
54
|
<!-- 上传框 -->
|
|
51
|
-
<view v-if="getUploadMaxCount && !
|
|
55
|
+
<view v-if="getUploadMaxCount && !getDisabled">
|
|
52
56
|
<view
|
|
53
57
|
:style="[getUploadBtnStyle]"
|
|
54
58
|
class="pi-flex-column-center"
|
|
@@ -382,6 +386,10 @@ export default {
|
|
|
382
386
|
}
|
|
383
387
|
},
|
|
384
388
|
computed: {
|
|
389
|
+
getDisabled() {
|
|
390
|
+
const parent = this.$pi.parent(this, 'PiFormItem')
|
|
391
|
+
return this.disabled || (parent && parent.getDisabled)
|
|
392
|
+
},
|
|
385
393
|
actionSheetItems() {
|
|
386
394
|
return [
|
|
387
395
|
{
|
|
@@ -441,20 +449,26 @@ export default {
|
|
|
441
449
|
uploadImg.chooseImageOpts,
|
|
442
450
|
this.chooseImageOpts,
|
|
443
451
|
{
|
|
444
|
-
arrayMerge: (
|
|
452
|
+
arrayMerge: (_target, source) => source
|
|
445
453
|
}
|
|
446
454
|
)
|
|
447
455
|
},
|
|
448
456
|
getChooseFileOpts() {
|
|
449
457
|
return this.$pi.lang.mergeDeep(
|
|
450
458
|
uploadImg.chooseFileOpts,
|
|
451
|
-
this.chooseFileOpts
|
|
459
|
+
this.chooseFileOpts,
|
|
460
|
+
{
|
|
461
|
+
arrayMerge: (_target, source) => source
|
|
462
|
+
}
|
|
452
463
|
)
|
|
453
464
|
},
|
|
454
465
|
getChooseVideoOpts() {
|
|
455
466
|
return this.$pi.lang.mergeDeep(
|
|
456
467
|
uploadImg.chooseVideoOpts,
|
|
457
|
-
this.chooseVideoOpts
|
|
468
|
+
this.chooseVideoOpts,
|
|
469
|
+
{
|
|
470
|
+
arrayMerge: (_target, source) => source
|
|
471
|
+
}
|
|
458
472
|
)
|
|
459
473
|
},
|
|
460
474
|
getUploadMaxCount() {
|
|
@@ -470,6 +484,7 @@ export default {
|
|
|
470
484
|
},
|
|
471
485
|
methods: {
|
|
472
486
|
isImageFilename,
|
|
487
|
+
isVideoFilename,
|
|
473
488
|
getFileType(file) {
|
|
474
489
|
if (!file) return ''
|
|
475
490
|
const ext = file.split('.').pop()
|
|
@@ -674,7 +689,12 @@ export default {
|
|
|
674
689
|
// #endif
|
|
675
690
|
|
|
676
691
|
// #ifdef MP-WEIXIN
|
|
677
|
-
|
|
692
|
+
const { fromWxMessage } = this.getChooseFileOpts
|
|
693
|
+
if (fromWxMessage) {
|
|
694
|
+
this.showActionSheet = true
|
|
695
|
+
} else {
|
|
696
|
+
this.handleChooseMedia()
|
|
697
|
+
}
|
|
678
698
|
// #endif
|
|
679
699
|
|
|
680
700
|
return
|
|
@@ -805,12 +825,13 @@ export default {
|
|
|
805
825
|
}
|
|
806
826
|
},
|
|
807
827
|
async handleChooseMedia() {
|
|
808
|
-
const { sourceType, maxDuration, camera } =
|
|
828
|
+
const { sourceType, extension, maxDuration, camera } =
|
|
809
829
|
this.type === 'video' ? this.getChooseVideoOpts : this.getChooseFileOpts
|
|
810
830
|
try {
|
|
811
831
|
const [, result] = await uni.chooseMedia({
|
|
812
832
|
count: this.getUploadMaxCount,
|
|
813
|
-
mediaType: this.type === 'video' ? ['video'] : ['
|
|
833
|
+
mediaType: this.type === 'video' ? ['video'] : ['mix'],
|
|
834
|
+
extension,
|
|
814
835
|
sourceType,
|
|
815
836
|
maxDuration,
|
|
816
837
|
camera
|
package/config/calendarInput.js
CHANGED
|
@@ -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
|
}
|
package/config/codeInput.js
CHANGED
package/config/dropdown.js
CHANGED
package/config/selectInput.js
CHANGED
package/config/uploadImg.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:29:02
|
|
4
|
-
* @LastEditTime: 2024-05-
|
|
4
|
+
* @LastEditTime: 2024-05-24 15:18:10
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传
|
|
7
7
|
* @FilePath: /piui-awesome/src/piui/config/uploadImg.js
|
|
@@ -43,20 +43,21 @@ export default {
|
|
|
43
43
|
type: 'image', // 上传文件类型,可选值为image、video、all
|
|
44
44
|
// 当type为 "all"时生效,调用uni.chooseFile参数
|
|
45
45
|
chooseFileOpts: {
|
|
46
|
-
sourceType: [], // (仅在type为image或video时可用)album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
|
|
46
|
+
sourceType: ['album', 'camera'], // (仅在type为image或video时可用)album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
|
|
47
47
|
extension: [], // 允许上传的文件类型,不填则不限制
|
|
48
48
|
maxDuration: 60, // 拍摄视频最长拍摄时间,单位秒,默认60
|
|
49
|
-
camera: 'back' // 前置或后置摄像头,默认back
|
|
49
|
+
camera: 'back', // 前置或后置摄像头,默认back
|
|
50
|
+
fromWxMessage: true // 是否来自微信消息
|
|
50
51
|
},
|
|
51
52
|
// 当type为 "image"时生效,调用uni.chooseImage参数
|
|
52
53
|
chooseImageOpts: {
|
|
53
|
-
sourceType: [], // album 从相册选图,camera 使用相机,默认album
|
|
54
|
+
sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认album
|
|
54
55
|
sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认compressed
|
|
55
56
|
crop: {} // 图像裁剪参数,设置后 sizeType 失效
|
|
56
57
|
},
|
|
57
58
|
// 当type为 "video"时生效,调用uniapp.chooseVideo参数
|
|
58
59
|
chooseVideoOpts: {
|
|
59
|
-
sourceType: [], // album 从相册选视频,camera 使用相机拍摄,默认二者都有
|
|
60
|
+
sourceType: ['album', 'camera'], // album 从相册选视频,camera 使用相机拍摄,默认二者都有
|
|
60
61
|
compressed: true, // 是否压缩视频,默认true
|
|
61
62
|
maxDuration: 60, // 拍摄视频最长拍摄时间,单位秒,默认60
|
|
62
63
|
camera: 'back', // 前置或后置摄像头,默认back
|