weapp版本升级到1.11.7
"version": "1.11.7"
This commit is contained in:
1 parent
a3c886146a
commit
66ba21dd7b
67 files changed
+566
-365
No files matched your search
+4
-2
@@ -1,7 +1,7 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
import { isImageFile, chooseFile, isVideoFile } from './utils';
|
||||
import { imageProps, videoProps, mediaProps, messageFileProps } from './shared';
|
||||
import { isBoolean, isPromise } from '../common/validator';
|
||||
import { imageProps, mediaProps, messageFileProps, videoProps } from './shared';
|
||||
import { chooseFile, isImageFile, isVideoFile } from './utils';
|
||||
VantComponent({
|
||||
props: Object.assign(Object.assign(Object.assign(Object.assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {
|
||||
type: null,
|
||||
@@ -153,6 +153,8 @@ VantComponent({
|
||||
});
|
||||
},
|
||||
onPreviewFile(event) {
|
||||
if (!this.data.previewFile)
|
||||
return;
|
||||
const { index } = event.currentTarget.dataset;
|
||||
wx.openDocument({
|
||||
filePath: this.data.lists[index].url,
|
||||
|
||||
+1
@@ -29,6 +29,7 @@
|
||||
poster="{{ item.thumb }}"
|
||||
autoplay="{{ item.autoplay }}"
|
||||
object-fit="{{videoFit}}"
|
||||
referrer-policy="{{ referrerPolicy }}"
|
||||
class="van-uploader__preview-image"
|
||||
style="{{ computed.sizeStyle({ previewSize }) }}"
|
||||
data-index="{{ index }}"
|
||||
|
||||
+8
@@ -29,6 +29,10 @@ export declare const videoProps: {
|
||||
type: StringConstructor;
|
||||
value: string;
|
||||
};
|
||||
referrerPolicy: {
|
||||
type: StringConstructor;
|
||||
value: string;
|
||||
};
|
||||
};
|
||||
export declare const mediaProps: {
|
||||
capture: {
|
||||
@@ -50,4 +54,8 @@ export declare const mediaProps: {
|
||||
};
|
||||
export declare const messageFileProps: {
|
||||
extension: null;
|
||||
previewFile: {
|
||||
type: BooleanConstructor;
|
||||
value: boolean;
|
||||
};
|
||||
};
|
||||
+8
@@ -31,6 +31,10 @@ export const videoProps = {
|
||||
type: String,
|
||||
value: 'back',
|
||||
},
|
||||
referrerPolicy: {
|
||||
type: String,
|
||||
value: 'no-referrer',
|
||||
},
|
||||
};
|
||||
// props for media
|
||||
export const mediaProps = {
|
||||
@@ -54,4 +58,8 @@ export const mediaProps = {
|
||||
// props for file
|
||||
export const messageFileProps = {
|
||||
extension: null,
|
||||
previewFile: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user