Merge branch 'master' of https://github.com/primefaces/primevue
commit
d1432ab395
|
@ -19,7 +19,7 @@
|
||||||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
||||||
@leaf-click="onLeafClick" :parentActive="item === activeItem" />
|
@leaf-click="onLeafClick" :parentActive="item === activeItem" />
|
||||||
</li>
|
</li>
|
||||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -18,6 +18,8 @@ declare class FileUpload extends Vue {
|
||||||
uploadLabel?: string;
|
uploadLabel?: string;
|
||||||
cancelLabel?: string;
|
cancelLabel?: string;
|
||||||
customUpload?: boolean;
|
customUpload?: boolean;
|
||||||
|
showUploadButton?: boolean;
|
||||||
|
showCancelButton?: boolean;
|
||||||
$emit(eventName: 'select', e: { originalEvent: Event, files: any }): this;
|
$emit(eventName: 'select', e: { originalEvent: Event, files: any }): this;
|
||||||
$emit(eventName: 'before-upload', e: { xhr: XMLHttpRequest, formData: any }): this;
|
$emit(eventName: 'before-upload', e: { xhr: XMLHttpRequest, formData: any }): this;
|
||||||
$emit(eventName: 'progress', e: { originalEvent: Event, progress: any }): this;
|
$emit(eventName: 'progress', e: { originalEvent: Event, progress: any }): this;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<span class="p-button-icon p-button-icon-left pi pi-fw pi-plus"></span>
|
<span class="p-button-icon p-button-icon-left pi pi-fw pi-plus"></span>
|
||||||
<span class="p-button-label">{{chooseButtonLabel}}</span>
|
<span class="p-button-label">{{chooseButtonLabel}}</span>
|
||||||
</span>
|
</span>
|
||||||
<FileUploadButton :label="uploadButtonLabel" icon="pi pi-upload" @click="upload" :disabled="uploadDisabled" />
|
<FileUploadButton :label="uploadButtonLabel" icon="pi pi-upload" @click="upload" :disabled="uploadDisabled" v-if="showUploadButton" />
|
||||||
<FileUploadButton :label="cancelButtonLabel" icon="pi pi-times" @click="clear" :disabled="cancelDisabled" />
|
<FileUploadButton :label="cancelButtonLabel" icon="pi pi-times" @click="clear" :disabled="cancelDisabled" v-if="showCancelButton" />
|
||||||
</div>
|
</div>
|
||||||
<div ref="content" class="p-fileupload-content" @dragenter="onDragEnter" @dragover="onDragOver" @dragleave="onDragLeave" @drop="onDrop">
|
<div ref="content" class="p-fileupload-content" @dragenter="onDragEnter" @dragover="onDragOver" @dragleave="onDragLeave" @drop="onDrop">
|
||||||
<FileUploadProgressBar :value="progress" v-if="hasFiles" />
|
<FileUploadProgressBar :value="progress" v-if="hasFiles" />
|
||||||
|
@ -116,6 +116,14 @@ export default {
|
||||||
customUpload: {
|
customUpload: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
showUploadButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
showCancelButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
duplicateIEEvent: false,
|
duplicateIEEvent: false,
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<span :class="getSubmenuIcon()" v-if="item.items"></span>
|
<span :class="getSubmenuIcon()" v-if="item.items"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
<li class="p-submenu-header" :key="item.label+i" v-if="item.items">{{item.label}}</li>
|
<li class="p-submenu-header" :key="item.label+i" v-if="item.items">{{item.label}}</li>
|
||||||
<template v-for="(child, j) of item.items">
|
<template v-for="(child, j) of item.items">
|
||||||
<Menuitem v-if="visible(child) && !child.separator" :key="child.label + i + j" :item="child" @click="itemClick" />
|
<Menuitem v-if="visible(child) && !child.separator" :key="child.label + i + j" :item="child" @click="itemClick" />
|
||||||
<li v-else-if="visible(child) && child.separator" class="p-menu-separator" :style="child.style" :key="'separator' + i + j" role="separator"></li>
|
<li v-else-if="visible(child) && child.separator" :class="['p-menu-separator', child.class]" :style="child.style" :key="'separator' + i + j" role="separator"></li>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<li v-else-if="visible(item) && item.separator" class="p-menu-separator" :style="item.style" :key="'separator' + i" role="separator"></li>
|
<li v-else-if="visible(item) && item.separator" :class="['p-menu-separator', item.class]" :style="item.style" :key="'separator' + i" role="separator"></li>
|
||||||
<Menuitem v-else :key="item.label+i" :item="item" @click="itemClick" />
|
<Menuitem v-else :key="item.label+i" :item="item" @click="itemClick" />
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'" :mobileActive="mobileActive"
|
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'" :mobileActive="mobileActive"
|
||||||
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
||||||
</li>
|
</li>
|
||||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</li>
|
</li>
|
||||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i"></li>
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i"></li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
<sub-menu :model="item.items" v-if="visible(item) && item.items" :key="item.label + '_sub_'"
|
||||||
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" />
|
||||||
</li>
|
</li>
|
||||||
<li class="p-menu-separator" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i" role="separator"></li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -214,6 +214,18 @@ myUploader(event) {
|
||||||
<td>boolean</td>
|
<td>boolean</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to PrimeVue <router-link to="/locale">Locale</router-link> configuration.</td>
|
<td>Whether to use the default upload or a manual implementation defined in uploadHandler callback. Defaults to PrimeVue <router-link to="/locale">Locale</router-link> configuration.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>showUploadButton</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether to show the upload button.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>showCancelButton</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>true</td>
|
||||||
|
<td>Whether to show the cancel button.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue