Commit 7f9d0d62 by pangchong

feat: 文件上传完善

parent d94311a5
......@@ -23,6 +23,7 @@ declare module 'vue' {
GlobalPopup: typeof import('./src/mocp/components/global-popup/global-popup.vue')['default']
GlobalTabs: typeof import('./src/mocp/components/global-tabs/global-tabs.vue')['default']
GlobalUpload: typeof import('./src/mocp/components/global-upload/global-upload.vue')['default']
GlobalUploadImage: typeof import('./src/mocp/components/global-upload-image/global-upload-image.vue')['default']
// 自定义组件
CustomScore: typeof import('./src/mocp/components/widget/custom-score.vue')['default']
CustomTabbar: typeof import('./src/mocp/components/widget/custom-tabbar.vue')['default']
......
......@@ -12,6 +12,7 @@
show-refresher-update-time
:hide-empty-view="!isDataList"
@query="query"
@scroll="scroll"
:paging-style="getPagingStyle"
>
<template #empty v-if="refresherEnabled || loadingMoreEnabled">
......@@ -53,7 +54,8 @@
</z-paging>
</template>
<script setup>
import { computed, ref } from 'vue'
import { debounce } from 'lodash'
import { computed, nextTick, ref } from 'vue'
const dataList = ref([])
const es = defineEmits(['query', 'handleLeftClick', 'handleRightClick', 'handleFooterClick'])
......@@ -191,6 +193,14 @@ const getStyle = computed(() => {
}
return style
})
//监听滚动
const scroll = debounce(() => {
// #ifdef APP
nextTick(() => {
uni.$emit('$upload-show', {})
})
// #endif
})
const complete = (data) => {
paging.value?.complete(data || true)
}
......
<template>
<!-- 全局图片下载 -->
<up-upload
:width="width + 'rpx'"
:height="height + 'rpx'"
:fileList="getFileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="10"
:previewFullImage="true"
>
<slot>
<view class="upload-button" :style="getUploadButtonSize">
<up-icon :name="uploadIcon" size="24" color="rgba(0, 0, 0, 0.4)"></up-icon>
</view>
</slot>
</up-upload>
</template>
<script setup>
import { computed, ref, watch } from 'vue'
import { cloneDeep } from 'lodash'
import { upload } from 'mocp/utils/http'
const es = defineEmits(['update:modelValue', 'change'])
const ps = defineProps({
fileList: {
type: Array,
default: () => []
},
width: {
type: [String, Number],
default: '155'
},
height: {
type: [String, Number],
default: '155'
},
url: {
type: String,
default: '/resource/uploadFile'
},
uploadIcon: {
type: String,
default: 'plus'
},
mapFieldName: {
type: String,
default: ''
},
mapFieldSplit: {
type: String,
default: ','
}
})
const getUploadButtonSize = computed(() => {
return {
width: ps.width + 'rpx',
height: ps.height + 'rpx'
}
})
const fileList = ref(cloneDeep(ps.fileList))
const getFileList = computed(() => {
return fileList.value.map((item) => {
return { ...item, url: item.fileUrl }
})
})
// 删除图片
const deletePic = (event) => {
fileList.value.splice(event.index, 1)
}
// 新增图片
const afterRead = async (event) => {
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
let fileListLen = fileList.value.length
lists.map((item) => {
fileList.value.push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
try {
const res = await upload({ url: ps.url, filePath: lists[i].url, name: 'file' })
if (res.code == 200) {
fileList.value.splice(fileListLen, 1, {
...res.data,
status: 'success',
message: ''
})
} else {
fileList.value.splice(fileListLen, 1)
uni.$mocpMessage.showToast(res.message || '请求错误')
}
} catch (error) {
fileList.value.splice(fileListLen, 1)
uni.$mocpMessage.showToast('上传失败')
}
fileListLen++
}
}
watch(
fileList,
(value) => {
let files = cloneDeep(value)
.filter((item) => {
return item.status != 'uploading'
})
.filter((item) => {
return delete item.status
})
.filter((item) => {
return delete item.message
})
if (ps.mapFieldName) {
files = files.map((v) => v[ps.mapFieldName]).join(ps.mapFieldSplit)
}
es('update:modelValue', files)
es('change', files)
},
{ deep: true, immediate: true }
)
</script>
<style lang="scss" scoped>
.upload-button {
display: flex;
align-items: center;
justify-content: center;
background: #f3f3f3;
}
</style>
<template>
<!-- 全局图片下载 -->
<up-upload
:width="width + 'rpx'"
:height="height + 'rpx'"
:fileList="getFileList"
@afterRead="afterRead"
@delete="deletePic"
multiple
:maxCount="10"
:previewFullImage="true"
>
<slot>
<view class="upload-button" :style="getUploadButtonSize">
<up-icon :name="uploadIcon" size="24" color="rgba(0, 0, 0, 0.4)"></up-icon>
<!-- 全局文件下载 -->
<view class="upload">
<view class="upload-list">
<view class="upload-item" v-for="(item, index) in getFileList" :key="item.id">
<view class="upload-item-left">
<view class="label">
<template v-if="item.fileType == 'image'">
<image src="/static/mocp/image/common/image.png" mode="widthFix" />
</template>
<template v-else-if="item.fileType == 'video'">
<image src="/static/mocp/image/common/video.png" mode="widthFix" />
</template>
<template v-else>
<image src="/static/mocp/image/common/pdf.png" mode="widthFix" />
</template>
<view class="u-line-1">{{ item.fileName }}</view>
</view>
<view class="tool" @tap="previewFile(item.fileUrl)"><up-icon name="eye" size="18" color="#4E5969"></up-icon></view>
</view>
<view class="upload-item-right" @tap="deleteFile(index)"><global-icon icon="delete-01" color="#F53F3F"></global-icon></view>
</view>
</slot>
</up-upload>
</view>
<view class="upload-button" v-if="isLoading">
<up-loading-icon text="上传中" textSize="14"></up-loading-icon>
</view>
<lsj-upload
v-else
width="640rpx"
height="88rpx"
:option="getOptions"
:size="30"
:instantly="true"
:distinct="true"
@uploadEnd="onuploadEnd"
@change="change"
>
<view class="upload-button">
<up-icon name="plus" size="18" color="#4E5969"></up-icon>
<text class="txt">上传文件</text>
</view>
</lsj-upload>
<up-modal
:width="250"
content="确认删除吗?删除后不可恢复!"
:show="show"
showCancelButton
closeOnClickOverlay
@confirm="confirm"
@cancel="show = false"
@close="show = false"
></up-modal>
</view>
</template>
<script setup>
import { computed, ref, watch } from 'vue'
import { cloneDeep } from 'lodash'
import { upload } from 'mocp/utils/http'
import { httpInterceptor } from 'mocp/utils/http'
const es = defineEmits(['update:modelValue', 'change'])
const ps = defineProps({
fileList: {
type: Array,
default: () => []
},
width: {
type: [String, Number],
default: '155'
},
height: {
type: [String, Number],
default: '155'
default: () => {
return []
}
},
url: {
type: String,
default: '/resource/uploadFile'
},
uploadIcon: {
type: String,
default: 'plus'
},
mapFieldName: {
type: String,
default: ''
......@@ -54,69 +79,65 @@ const ps = defineProps({
default: ','
}
})
const getUploadButtonSize = computed(() => {
return {
width: ps.width + 'rpx',
height: ps.height + 'rpx'
}
})
const fileList = ref(cloneDeep(ps.fileList))
const getFileList = computed(() => {
return fileList.value.map((item) => {
return { ...item, url: item.fileUrl }
})
})
// 删除图片
const deletePic = (event) => {
fileList.value.splice(event.index, 1)
const getOptions = computed(() => {
return httpInterceptor({ url: ps.url, name: 'file' })
})
// 删除文件
const show = ref(false)
const index = ref(-1)
const deleteFile = (_index) => {
show.value = true
index.value = _index
}
// 新增图片
const afterRead = async (event) => {
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
let fileListLen = fileList.value.length
lists.map((item) => {
fileList.value.push({
...item,
status: 'uploading',
message: '上传中'
})
//确认删除
const confirm = () => {
show.value = false
fileList.value.splice(index.value, 1)
}
//预览图片
const previewFile = (fileUrl) => {
uni.downloadFile({
url: fileUrl,
success: function (res) {
var filePath = res.tempFilePath
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
for (let i = 0; i < lists.length; i++) {
try {
const res = await upload({ url: ps.url, filePath: lists[i].url, name: 'file' })
if (res.code == 200) {
fileList.value.splice(fileListLen, 1, {
...res.data,
status: 'success',
message: ''
})
} else {
fileList.value.splice(fileListLen, 1)
uni.$mocpMessage.showToast(res.message || '请求错误')
}
} catch (error) {
fileList.value.splice(fileListLen, 1)
uni.$mocpMessage.showToast('上传失败')
}
const isLoading = ref(false)
const onuploadEnd = (e) => {
if (e.type == 'success') {
const res = JSON.parse(e.responseText)
if (res.code == 200) {
fileList.value.push(res.data)
} else {
uni.$mocpMessage.showToast(res.message || '请求错误')
}
fileListLen++
} else {
uni.$mocpMessage.showToast('上传失败')
}
}
isLoading.value = false
}
const change = (e) => {
isLoading.value = true
}
watch(
fileList,
(value) => {
let files = cloneDeep(value)
.filter((item) => {
return item.status != 'uploading'
})
.filter((item) => {
return delete item.status
})
.filter((item) => {
return delete item.message
})
if (ps.mapFieldName) {
files = files.map((v) => v[ps.mapFieldName]).join(ps.mapFieldSplit)
}
......@@ -127,10 +148,49 @@ watch(
)
</script>
<style lang="scss" scoped>
.upload-button {
display: flex;
align-items: center;
justify-content: center;
background: #f3f3f3;
.upload {
&-button {
display: flex;
align-items: center;
justify-content: center;
background: #f3f3f3;
width: 640rpx;
height: 88rpx;
.txt {
color: $mocp-text-5;
}
}
&-item {
height: 72rpx;
line-height: 72rpx;
margin-bottom: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
&-left {
display: flex;
align-items: center;
width: 640rpx;
background: #f3f3f3;
box-sizing: border-box;
padding: 0 20rpx 0 24rpx;
.label {
flex: auto;
display: flex;
align-items: center;
margin-right: 10rpx;
color: $mocp-text-5;
image {
width: 32rpx;
min-width: 32rpx;
margin-right: 20rpx;
}
.name {
flex: auto;
word-break: break-all;
}
}
}
}
}
</style>
......@@ -41,6 +41,16 @@ const useAppraisalRecordStore = defineStore('appraisalRecord', {
}
},
// 配置持久化
persist: false
persist: {
// 调整为兼容多端的API
storage: {
setItem(key, value) {
uni.setStorageSync(key, value)
},
getItem(key) {
return uni.getStorageSync(key)
}
}
}
})
export default useAppraisalRecordStore
......@@ -101,6 +101,16 @@ const useAssignWorkStore = defineStore('assignWork', {
}
},
// 配置持久化
persist: false
persist: {
// 调整为兼容多端的API
storage: {
setItem(key, value) {
uni.setStorageSync(key, value)
},
getItem(key) {
return uni.getStorageSync(key)
}
}
}
})
export default useAssignWorkStore
......@@ -31,7 +31,7 @@ class ServiceLoading {
}
const serviceLoading = new ServiceLoading()
//请求拦截器
const httpInterceptor = (options) => {
export const httpInterceptor = (options) => {
const userStore = useUserStore()
//responseType
if (options.config?.arraybuffer) {
......
......@@ -54,10 +54,11 @@
text-align: center;
font-size: 28rpx;
color: $mocp-text-5;
margin-top: 36rpx;
margin-top: 28rpx;
}
&-txt {
font-weight: bold;
margin-top: 8rpx;
}
&-line {
width: 2rpx;
......
......@@ -55,6 +55,24 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe6df;</span>
<div class="name">jpg</div>
<div class="code-name">&amp;#xe6df;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6e0;</span>
<div class="name">pdf</div>
<div class="code-name">&amp;#xe6e0;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6e1;</span>
<div class="name">video</div>
<div class="code-name">&amp;#xe6e1;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6de;</span>
<div class="name">delete-01</div>
<div class="code-name">&amp;#xe6de;</div>
......@@ -138,9 +156,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1716962655386') format('woff2'),
url('iconfont.woff?t=1716962655386') format('woff'),
url('iconfont.ttf?t=1716962655386') format('truetype');
src: url('iconfont.woff2?t=1717745202331') format('woff2'),
url('iconfont.woff?t=1717745202331') format('woff'),
url('iconfont.ttf?t=1717745202331') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -167,6 +185,33 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-jpg"></span>
<div class="name">
jpg
</div>
<div class="code-name">.icon-jpg
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-pdf"></span>
<div class="name">
pdf
</div>
<div class="code-name">.icon-pdf
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-video"></span>
<div class="name">
video
</div>
<div class="code-name">.icon-video
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-delete-01"></span>
<div class="name">
delete-01
......@@ -294,6 +339,30 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jpg"></use>
</svg>
<div class="name">jpg</div>
<div class="code-name">#icon-jpg</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-pdf"></use>
</svg>
<div class="name">pdf</div>
<div class="code-name">#icon-pdf</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-video"></use>
</svg>
<div class="name">video</div>
<div class="code-name">#icon-video</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-delete-01"></use>
</svg>
<div class="name">delete-01</div>
......
@font-face {
font-family: "iconfont"; /* Project id 4550048 */
src: url('iconfont.woff2?t=1716962655386') format('woff2'),
url('iconfont.woff?t=1716962655386') format('woff'),
url('iconfont.ttf?t=1716962655386') format('truetype');
src: url('iconfont.woff2?t=1717745202331') format('woff2'),
url('iconfont.woff?t=1717745202331') format('woff'),
url('iconfont.ttf?t=1717745202331') format('truetype');
}
.iconfont {
......@@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-jpg:before {
content: "\e6df";
}
.icon-pdf:before {
content: "\e6e0";
}
.icon-video:before {
content: "\e6e1";
}
.icon-delete-01:before {
content: "\e6de";
}
......
window._iconfont_svg_string_4550048='<svg><symbol id="icon-delete-01" viewBox="0 0 1024 1024"><path d="M723.2 192V108.8H300.8V192h-192v83.2h76.8v576c0 38.4 25.6 64 64 64h531.2c38.4 0 64-25.6 64-64v-576h76.8V192h-198.4zM268.8 832V275.2h492.8V832H268.8zM384 384v320h83.2V384H384z m172.8 0v320H640V384H556.8z" ></path></symbol><symbol id="icon-navbarright" viewBox="0 0 1024 1024"><path d="M896 748.8H128V832h768v-83.2z m0-281.6H467.2v83.2H896V467.2zM128 192h768v83.2H128V192z m172.8 448c12.8 6.4 32 0 32-19.2V409.6c0-19.2-19.2-25.6-32-19.2L140.8 499.2c-12.8 6.4-12.8 25.6 0 38.4L300.8 640z" ></path></symbol><symbol id="icon-drive" viewBox="0 0 1024 1024"><path d="M236.8 172.8v684.8h556.8v-448H620.8c-38.4 0-64-25.6-64-64V172.8h-320z m403.2 57.6V320h89.6L640 230.4zM147.2 147.2c0-38.4 25.6-64 64-64h403.2l262.4 262.4v531.2c0 38.4-25.6 64-64 64H211.2c-38.4 0-64-25.6-64-64V147.2z" ></path></symbol><symbol id="icon-safe" viewBox="0 0 1024 1024"><path d="M512 76.8l19.2 12.8c70.4 38.4 153.6 64 217.6 83.2 32 6.4 57.6 12.8 76.8 19.2 12.8 0 19.2 0 25.6 6.4h44.8v371.2l-44.8-6.4h44.8V576c0 6.4-6.4 19.2-12.8 32-6.4 25.6-25.6 64-51.2 108.8-51.2 83.2-147.2 172.8-307.2 224H512l-12.8-6.4c-160-44.8-256-140.8-307.2-224-25.6-32-38.4-70.4-51.2-102.4-6.4-12.8-6.4-25.6-6.4-32v-12.8l44.8-6.4-51.2 6.4V198.4l38.4-6.4h6.4c6.4 0 12.8 0 25.6-6.4 19.2 0 44.8-6.4 76.8-19.2 64-12.8 147.2-38.4 217.6-83.2l19.2-6.4z m-300.8 192v288c0 6.4 6.4 12.8 6.4 25.6 6.4 25.6 19.2 51.2 44.8 89.6 44.8 64 115.2 140.8 249.6 179.2 128-38.4 204.8-115.2 249.6-179.2 19.2-32 32-64 44.8-89.6 6.4-12.8 6.4-19.2 6.4-25.6V268.8c-19.2-6.4-51.2-6.4-83.2-19.2-64-12.8-140.8-38.4-217.6-76.8-76.8 44.8-153.6 64-217.6 83.2-32 6.4-57.6 12.8-83.2 12.8z m518.4 147.2l-243.2 243.2-160-153.6L384 448l96 96 185.6-185.6 64 57.6z" ></path></symbol><symbol id="icon-subscribed" viewBox="0 0 1024 1024"><path d="M234.688 170.688v654.208L512 676.992l277.312 147.904V170.688H234.688z m-85.376-21.312a64 64 0 0 1 64-64h597.376a64 64 0 0 1 64 64v739.52c0 35.456-37.76 58.112-69.056 41.408L512 773.76l-293.632 156.608a46.912 46.912 0 0 1-69.056-41.408V149.376zM471.36 468.48l165.952-165.952 60.352 60.352-226.304 226.304-135.68-135.744 60.288-60.352L471.36 468.48z" fill="#4E5969" ></path></symbol><symbol id="icon-mind-mapping" viewBox="0 0 1024 1024"><path d="M106.688 213.312a85.312 85.312 0 1 1 128 73.92v182.08h106.624v85.376H234.688V768h106.624v85.312h-192V287.232a85.312 85.312 0 0 1-42.624-73.92zM917.312 256H426.688V170.688h490.624V256z m0 298.688H426.688V469.312h490.624v85.376z m0 298.624H426.688V768h490.624v85.312z" fill="#4E5969" ></path></symbol><symbol id="icon-email" viewBox="0 0 1024 1024"><path d="M149.312 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h725.376a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64H149.312z m21.376 682.688V213.312h682.624v597.376H170.688z m88.32-483.072L512 502.784l253.056-175.168 48.576 70.144-265.216 183.552a64 64 0 0 1-72.832 0L210.368 397.76l48.64-70.144z" fill="#4E5969" ></path></symbol><symbol id="icon-idcard" viewBox="0 0 1024 1024"><path d="M85.312 213.312C85.312 166.208 123.52 128 170.688 128h682.624c47.168 0 85.376 38.208 85.376 85.312v597.376c0 47.104-38.208 85.312-85.376 85.312H170.688a85.312 85.312 0 0 1-85.376-85.312V213.312z m768 0H170.688v597.376h682.624V213.312z m-426.624 192h-192V320h192v85.312z m0 149.376h-192V469.312h192v85.376zM341.312 704H234.688V618.688h106.624V704z m277.376-106.688C559.808 597.312 512 645.12 512 704H426.688a192 192 0 0 1 114.24-175.616 128 128 0 1 1 155.456 0A192 192 0 0 1 810.688 704h-85.376c0-58.88-47.744-106.688-106.624-106.688zM576 426.688a42.688 42.688 0 1 1 85.312 0 42.688 42.688 0 0 1-85.312 0z" fill="#4E5969" ></path></symbol><symbol id="icon-calendar" viewBox="0 0 1024 1024"><path d="M256 149.312v-42.688h85.312v42.688h341.376v-42.688H768v42.688h85.312a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H170.688a64 64 0 0 1-64-64v-640a64 64 0 0 1 64-64H256z m0 85.312H192v192h640v-192h-64v42.688h-85.312v-42.688H341.312v42.688H256v-42.688zM832 512H192v320h640V512z" fill="#4E5969" ></path></symbol><symbol id="icon-message" viewBox="0 0 1024 1024"><path d="M106.688 512a405.312 405.312 0 1 1 810.624 0v13.44a391.936 391.936 0 0 1-391.872 391.872H106.688V512zM512 192a320 320 0 0 0-320 320v320h333.44A306.56 306.56 0 0 0 832 525.44V512a320 320 0 0 0-320-320z m192 192v85.312H320V384h384z m-192 277.312H320V576h192v85.312z" fill="#4E5969" ></path></symbol><symbol id="icon-Vector" viewBox="0 0 1228 1024"><path d="M285.360264 841.131887c15.870413 7.372063 15.870413 22.013799 23.754425 36.553144 0 22.013799-15.768023 43.925207-47.50885 43.925208-23.754425 7.269673-47.611239-14.641736-55.49525-43.925208 0-21.911409 15.870413-43.822818 47.508849-65.734226a263.960804 263.960804 0 0 1 150.615339 0c95.222478 36.553145 182.356164 116.929107 206.110588 168.123988-47.508849-175.49605-253.619438-321.708629-443.859614-241.332667-71.365663 29.283472-103.106489 87.748025-103.106489 153.584641C71.365663 965.637836 134.744926 1024 221.981002 1024c47.508849 0 87.133687-14.641736 110.990501-43.925207 31.740826-51.194881 15.768023-116.929107-47.611239-138.942906z m657.956604 0c-15.870413 7.372063-23.754425 14.641736-23.754424 36.553144 0 22.013799 15.768023 43.925207 47.508849 43.925208 23.754425 7.269673 47.611239-14.641736 55.49525-43.925208 0-21.911409-15.870413-43.822818-47.508849-65.734226a263.960804 263.960804 0 0 0-150.615338 0c-95.222478 36.553145-182.356164 116.929107-213.994601 168.123988 47.508849-175.49605 261.50345-321.708629 451.743626-241.332667 63.481652 22.013799 103.106489 80.478352 95.222478 146.314968-7.986401 73.106289-63.481652 131.673233-150.717729 131.673233-47.508849 0-87.133687-14.641736-110.990501-43.925208-23.754425-43.925207-15.768023-109.659434 47.611239-131.673232zM610.242976 387.750025C784.817518 387.750025 927.446455 307.271673 927.446455 204.881912c0-80.478352-87.236076-146.314969-206.110589-175.496051 142.731327 29.181082 245.735426 109.659434 245.735427 197.40746C967.071293 336.555144 832.428757 409.661434 713.451855 424.30317c-71.365663 7.269673-79.249675 7.269673-103.10649 29.283471-7.884012-22.013799-23.754425-22.013799-87.133686-29.283471C404.234777 409.661434 269.489851 329.183082 269.489851 226.793321c0-87.748025 103.106489-168.226377 245.735426-197.40746C388.466753 58.464554 301.230677 124.40356 301.230677 204.881912c0 102.389761 142.628937 182.868113 309.217078 182.868113z m0 117.031497c31.740826-22.013799 79.249675-29.283472 118.976902-36.655535C903.692031 431.572843 1014.682532 351.29927 1014.682532 241.435056c0-43.822818-15.870413-80.478352-47.611239-109.659434-63.481652-58.566943-158.49935-102.389761-277.476253-117.031496 213.994601 14.641736 372.69873 124.30117 372.698731 255.974402 0 117.031497-118.976902 204.779522-309.217079 248.60234-79.249675 22.013799-118.874513 36.655534-142.731327 73.208679-15.870413-36.553145-55.49525-43.925207-134.744925-73.208679-190.240176-43.822818-309.217078-131.570843-309.217078-248.60234 0-131.673233 158.70413-234.062994 372.69873-255.974402C427.989201 29.385861 332.971503 73.208679 269.489851 131.775622c-31.740826 29.181082-47.508849 73.106289-47.508849 109.659434 0 109.761824 110.990501 190.137786 285.360264 226.690931 31.740826 7.372063 79.249675 14.641736 103.004099 36.655535z m0 175.49605c39.624838-58.566943 118.976902-87.748025 190.240176-109.761824 23.856814-7.269673 31.740826-14.539346 55.49525-14.539346 150.615338-51.194881 245.735426-146.314969 253.721828-255.974402 0-153.584642-198.226577-277.988201-443.962004-299.89961C975.057694 14.744126 1228.677132 175.59844 1228.677132 358.466553c0 124.30117-95.120088 234.062994-277.476252 299.89961-79.249675 21.911409-285.360264 80.375962-340.855515 292.527548-47.508849-204.779522-253.619438-270.616138-332.869113-292.527548C95.120088 585.157484 0 482.767723 0 358.466553 0 175.59844 253.619438 22.013799 562.836516 0.10239 317.10109 14.744126 118.772123 139.045295 118.772123 292.629937c7.986401 109.761824 103.106489 204.779522 245.735426 255.974403 23.856814 7.372063 31.740826 14.641736 55.495251 14.641735 79.249675 29.283472 158.60174 58.464554 190.240176 117.031497z m-110.990501-511.948805C499.354865 109.659434 546.966103 58.464554 618.434157 58.464554 689.59504 58.566943 737.206279 102.492151 737.206279 168.328767c0 58.464554-47.611239 109.659434-118.874512 109.659434-71.365663 0-118.976902-43.822818-118.976902-109.659434z" fill="#DD4012" ></path></symbol></svg>',function(i){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var o,c,n,a,l,h=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!i.__iconfont__svg__cssinject__){i.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}o=function(){var t,e=document.createElement("div");e.innerHTML=i._iconfont_svg_string_4550048,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?h(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),o()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(n=o,a=i.document,l=!1,d(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,v())})}function v(){l||(l=!0,n())}function d(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(d,50)}v()}}(window);
\ No newline at end of file
window._iconfont_svg_string_4550048='<svg><symbol id="icon-jpg" viewBox="0 0 1024 1024"><path d="M128 128C128 83.2 166.4 44.8 211.2 44.8H640c12.8 0 19.2 6.4 32 12.8l211.2 211.2c6.4 6.4 12.8 19.2 12.8 32V896c0 44.8-38.4 83.2-83.2 83.2H211.2c-44.8 0-83.2-38.4-83.2-83.2V128z" fill="#65C466" ></path><path d="M256 320c0-70.4 57.6-128 128-128s128 57.6 128 128-57.6 128-128 128-128-57.6-128-128zM736 384c19.2 12.8 32 25.6 32 44.8v358.4c0 25.6-19.2 44.8-44.8 44.8H300.8c-25.6 0-44.8-19.2-44.8-44.8V588.8c0-12.8 6.4-32 19.2-38.4 12.8-12.8 32-12.8 44.8-6.4l166.4 64 198.4-211.2c12.8-12.8 38.4-19.2 51.2-12.8z" fill="#FFFFFF" ></path></symbol><symbol id="icon-pdf" viewBox="0 0 1024 1024"><path d="M128 128C128 83.2 166.4 44.8 211.2 44.8H640c12.8 0 19.2 6.4 32 12.8l211.2 211.2c6.4 6.4 12.8 19.2 12.8 32V896c0 44.8-38.4 83.2-83.2 83.2H211.2c-44.8 0-83.2-38.4-83.2-83.2V128z" fill="#F7CE46" ></path><path d="M640 339.2H384c-25.6 0-44.8 19.2-44.8 44.8s19.2 44.8 44.8 44.8h83.2v300.8c0 19.2 19.2 38.4 44.8 38.4s44.8-19.2 44.8-44.8V428.8H640c25.6 0 44.8-19.2 44.8-44.8s-19.2-44.8-44.8-44.8z" fill="#FFFFFF" ></path></symbol><symbol id="icon-video" viewBox="0 0 1024 1024"><path d="M128 128C128 83.2 166.4 44.8 211.2 44.8H640c12.8 0 19.2 6.4 32 12.8l211.2 211.2c6.4 6.4 12.8 19.2 12.8 32V896c0 44.8-38.4 83.2-83.2 83.2H211.2c-44.8 0-83.2-38.4-83.2-83.2V128z" fill="#165DFF" ></path><path d="M256 428.8c0-25.6 19.2-44.8 44.8-44.8h288c25.6 0 44.8 19.2 44.8 44.8v12.8l83.2-32c12.8-6.4 25.6-6.4 38.4 6.4 6.4 6.4 12.8 19.2 12.8 38.4V704c0 12.8-6.4 32-19.2 38.4-12.8 6.4-25.6 12.8-38.4 6.4l-83.2-32v12.8c0 25.6-19.2 44.8-44.8 44.8H300.8c-25.6-6.4-44.8-25.6-44.8-51.2V428.8z" fill="#FFFFFF" ></path></symbol><symbol id="icon-delete-01" viewBox="0 0 1024 1024"><path d="M723.2 192V108.8H300.8V192h-192v83.2h76.8v576c0 38.4 25.6 64 64 64h531.2c38.4 0 64-25.6 64-64v-576h76.8V192h-198.4zM268.8 832V275.2h492.8V832H268.8zM384 384v320h83.2V384H384z m172.8 0v320H640V384H556.8z" ></path></symbol><symbol id="icon-navbarright" viewBox="0 0 1024 1024"><path d="M896 748.8H128V832h768v-83.2z m0-281.6H467.2v83.2H896V467.2zM128 192h768v83.2H128V192z m172.8 448c12.8 6.4 32 0 32-19.2V409.6c0-19.2-19.2-25.6-32-19.2L140.8 499.2c-12.8 6.4-12.8 25.6 0 38.4L300.8 640z" ></path></symbol><symbol id="icon-drive" viewBox="0 0 1024 1024"><path d="M236.8 172.8v684.8h556.8v-448H620.8c-38.4 0-64-25.6-64-64V172.8h-320z m403.2 57.6V320h89.6L640 230.4zM147.2 147.2c0-38.4 25.6-64 64-64h403.2l262.4 262.4v531.2c0 38.4-25.6 64-64 64H211.2c-38.4 0-64-25.6-64-64V147.2z" ></path></symbol><symbol id="icon-safe" viewBox="0 0 1024 1024"><path d="M512 76.8l19.2 12.8c70.4 38.4 153.6 64 217.6 83.2 32 6.4 57.6 12.8 76.8 19.2 12.8 0 19.2 0 25.6 6.4h44.8v371.2l-44.8-6.4h44.8V576c0 6.4-6.4 19.2-12.8 32-6.4 25.6-25.6 64-51.2 108.8-51.2 83.2-147.2 172.8-307.2 224H512l-12.8-6.4c-160-44.8-256-140.8-307.2-224-25.6-32-38.4-70.4-51.2-102.4-6.4-12.8-6.4-25.6-6.4-32v-12.8l44.8-6.4-51.2 6.4V198.4l38.4-6.4h6.4c6.4 0 12.8 0 25.6-6.4 19.2 0 44.8-6.4 76.8-19.2 64-12.8 147.2-38.4 217.6-83.2l19.2-6.4z m-300.8 192v288c0 6.4 6.4 12.8 6.4 25.6 6.4 25.6 19.2 51.2 44.8 89.6 44.8 64 115.2 140.8 249.6 179.2 128-38.4 204.8-115.2 249.6-179.2 19.2-32 32-64 44.8-89.6 6.4-12.8 6.4-19.2 6.4-25.6V268.8c-19.2-6.4-51.2-6.4-83.2-19.2-64-12.8-140.8-38.4-217.6-76.8-76.8 44.8-153.6 64-217.6 83.2-32 6.4-57.6 12.8-83.2 12.8z m518.4 147.2l-243.2 243.2-160-153.6L384 448l96 96 185.6-185.6 64 57.6z" ></path></symbol><symbol id="icon-subscribed" viewBox="0 0 1024 1024"><path d="M234.688 170.688v654.208L512 676.992l277.312 147.904V170.688H234.688z m-85.376-21.312a64 64 0 0 1 64-64h597.376a64 64 0 0 1 64 64v739.52c0 35.456-37.76 58.112-69.056 41.408L512 773.76l-293.632 156.608a46.912 46.912 0 0 1-69.056-41.408V149.376zM471.36 468.48l165.952-165.952 60.352 60.352-226.304 226.304-135.68-135.744 60.288-60.352L471.36 468.48z" fill="#4E5969" ></path></symbol><symbol id="icon-mind-mapping" viewBox="0 0 1024 1024"><path d="M106.688 213.312a85.312 85.312 0 1 1 128 73.92v182.08h106.624v85.376H234.688V768h106.624v85.312h-192V287.232a85.312 85.312 0 0 1-42.624-73.92zM917.312 256H426.688V170.688h490.624V256z m0 298.688H426.688V469.312h490.624v85.376z m0 298.624H426.688V768h490.624v85.312z" fill="#4E5969" ></path></symbol><symbol id="icon-email" viewBox="0 0 1024 1024"><path d="M149.312 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h725.376a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64H149.312z m21.376 682.688V213.312h682.624v597.376H170.688z m88.32-483.072L512 502.784l253.056-175.168 48.576 70.144-265.216 183.552a64 64 0 0 1-72.832 0L210.368 397.76l48.64-70.144z" fill="#4E5969" ></path></symbol><symbol id="icon-idcard" viewBox="0 0 1024 1024"><path d="M85.312 213.312C85.312 166.208 123.52 128 170.688 128h682.624c47.168 0 85.376 38.208 85.376 85.312v597.376c0 47.104-38.208 85.312-85.376 85.312H170.688a85.312 85.312 0 0 1-85.376-85.312V213.312z m768 0H170.688v597.376h682.624V213.312z m-426.624 192h-192V320h192v85.312z m0 149.376h-192V469.312h192v85.376zM341.312 704H234.688V618.688h106.624V704z m277.376-106.688C559.808 597.312 512 645.12 512 704H426.688a192 192 0 0 1 114.24-175.616 128 128 0 1 1 155.456 0A192 192 0 0 1 810.688 704h-85.376c0-58.88-47.744-106.688-106.624-106.688zM576 426.688a42.688 42.688 0 1 1 85.312 0 42.688 42.688 0 0 1-85.312 0z" fill="#4E5969" ></path></symbol><symbol id="icon-calendar" viewBox="0 0 1024 1024"><path d="M256 149.312v-42.688h85.312v42.688h341.376v-42.688H768v42.688h85.312a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H170.688a64 64 0 0 1-64-64v-640a64 64 0 0 1 64-64H256z m0 85.312H192v192h640v-192h-64v42.688h-85.312v-42.688H341.312v42.688H256v-42.688zM832 512H192v320h640V512z" fill="#4E5969" ></path></symbol><symbol id="icon-message" viewBox="0 0 1024 1024"><path d="M106.688 512a405.312 405.312 0 1 1 810.624 0v13.44a391.936 391.936 0 0 1-391.872 391.872H106.688V512zM512 192a320 320 0 0 0-320 320v320h333.44A306.56 306.56 0 0 0 832 525.44V512a320 320 0 0 0-320-320z m192 192v85.312H320V384h384z m-192 277.312H320V576h192v85.312z" fill="#4E5969" ></path></symbol><symbol id="icon-Vector" viewBox="0 0 1228 1024"><path d="M285.360264 841.131887c15.870413 7.372063 15.870413 22.013799 23.754425 36.553144 0 22.013799-15.768023 43.925207-47.50885 43.925208-23.754425 7.269673-47.611239-14.641736-55.49525-43.925208 0-21.911409 15.870413-43.822818 47.508849-65.734226a263.960804 263.960804 0 0 1 150.615339 0c95.222478 36.553145 182.356164 116.929107 206.110588 168.123988-47.508849-175.49605-253.619438-321.708629-443.859614-241.332667-71.365663 29.283472-103.106489 87.748025-103.106489 153.584641C71.365663 965.637836 134.744926 1024 221.981002 1024c47.508849 0 87.133687-14.641736 110.990501-43.925207 31.740826-51.194881 15.768023-116.929107-47.611239-138.942906z m657.956604 0c-15.870413 7.372063-23.754425 14.641736-23.754424 36.553144 0 22.013799 15.768023 43.925207 47.508849 43.925208 23.754425 7.269673 47.611239-14.641736 55.49525-43.925208 0-21.911409-15.870413-43.822818-47.508849-65.734226a263.960804 263.960804 0 0 0-150.615338 0c-95.222478 36.553145-182.356164 116.929107-213.994601 168.123988 47.508849-175.49605 261.50345-321.708629 451.743626-241.332667 63.481652 22.013799 103.106489 80.478352 95.222478 146.314968-7.986401 73.106289-63.481652 131.673233-150.717729 131.673233-47.508849 0-87.133687-14.641736-110.990501-43.925208-23.754425-43.925207-15.768023-109.659434 47.611239-131.673232zM610.242976 387.750025C784.817518 387.750025 927.446455 307.271673 927.446455 204.881912c0-80.478352-87.236076-146.314969-206.110589-175.496051 142.731327 29.181082 245.735426 109.659434 245.735427 197.40746C967.071293 336.555144 832.428757 409.661434 713.451855 424.30317c-71.365663 7.269673-79.249675 7.269673-103.10649 29.283471-7.884012-22.013799-23.754425-22.013799-87.133686-29.283471C404.234777 409.661434 269.489851 329.183082 269.489851 226.793321c0-87.748025 103.106489-168.226377 245.735426-197.40746C388.466753 58.464554 301.230677 124.40356 301.230677 204.881912c0 102.389761 142.628937 182.868113 309.217078 182.868113z m0 117.031497c31.740826-22.013799 79.249675-29.283472 118.976902-36.655535C903.692031 431.572843 1014.682532 351.29927 1014.682532 241.435056c0-43.822818-15.870413-80.478352-47.611239-109.659434-63.481652-58.566943-158.49935-102.389761-277.476253-117.031496 213.994601 14.641736 372.69873 124.30117 372.698731 255.974402 0 117.031497-118.976902 204.779522-309.217079 248.60234-79.249675 22.013799-118.874513 36.655534-142.731327 73.208679-15.870413-36.553145-55.49525-43.925207-134.744925-73.208679-190.240176-43.822818-309.217078-131.570843-309.217078-248.60234 0-131.673233 158.70413-234.062994 372.69873-255.974402C427.989201 29.385861 332.971503 73.208679 269.489851 131.775622c-31.740826 29.181082-47.508849 73.106289-47.508849 109.659434 0 109.761824 110.990501 190.137786 285.360264 226.690931 31.740826 7.372063 79.249675 14.641736 103.004099 36.655535z m0 175.49605c39.624838-58.566943 118.976902-87.748025 190.240176-109.761824 23.856814-7.269673 31.740826-14.539346 55.49525-14.539346 150.615338-51.194881 245.735426-146.314969 253.721828-255.974402 0-153.584642-198.226577-277.988201-443.962004-299.89961C975.057694 14.744126 1228.677132 175.59844 1228.677132 358.466553c0 124.30117-95.120088 234.062994-277.476252 299.89961-79.249675 21.911409-285.360264 80.375962-340.855515 292.527548-47.508849-204.779522-253.619438-270.616138-332.869113-292.527548C95.120088 585.157484 0 482.767723 0 358.466553 0 175.59844 253.619438 22.013799 562.836516 0.10239 317.10109 14.744126 118.772123 139.045295 118.772123 292.629937c7.986401 109.761824 103.106489 204.779522 245.735426 255.974403 23.856814 7.372063 31.740826 14.641736 55.495251 14.641735 79.249675 29.283472 158.60174 58.464554 190.240176 117.031497z m-110.990501-511.948805C499.354865 109.659434 546.966103 58.464554 618.434157 58.464554 689.59504 58.566943 737.206279 102.492151 737.206279 168.328767c0 58.464554-47.611239 109.659434-118.874512 109.659434-71.365663 0-118.976902-43.822818-118.976902-109.659434z" fill="#DD4012" ></path></symbol></svg>',function(c){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var i,o,l,a,n,h=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}i=function(){var t,e=document.createElement("div");e.innerHTML=c._iconfont_svg_string_4550048,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?h(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(l=i,a=c.document,n=!1,v(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,d())})}function d(){n||(n=!0,l())}function v(){try{a.documentElement.doScroll("left")}catch(t){return void setTimeout(v,50)}d()}}(window);
\ No newline at end of file
......@@ -6,6 +6,27 @@
"description": "",
"glyphs": [
{
"icon_id": "40650590",
"name": "jpg",
"font_class": "jpg",
"unicode": "e6df",
"unicode_decimal": 59103
},
{
"icon_id": "40650589",
"name": "pdf",
"font_class": "pdf",
"unicode": "e6e0",
"unicode_decimal": 59104
},
{
"icon_id": "40650588",
"name": "video",
"font_class": "video",
"unicode": "e6e1",
"unicode_decimal": 59105
},
{
"icon_id": "40524214",
"name": "delete-01",
"font_class": "delete-01",
......
## 2.3.1(2024-05-20)
修复:文件不去重时返回文件列表name与组件内置列表key不一致问题。
## 2.3.0(2024-05-20)
优化:1:增加属性distinct【选择文件是否去重】、2:对show/hide函数增加uni.$emit事件监听,若页面存在多个上传组件时,可通过uni.$emit控制所有上传组件webview透明层是否显示。
## 2.2.9(2023-06-01)
优化:将是否多选与count字段解绑(原逻辑是count>1为允许多选),改为新增multiple属性控制是否多选。
## 2.2.8(2023-06-01)
修复上版本提交时accept测试值未删除导致h5端只能选择图片的问题。
## 2.2.7(2023-05-06)
应群友建议,当instantly为true时,触发change事件后延迟1000毫秒再自动上传,方便动态修改参数,其实个人还是建议想在change事件动态设置参数的伙伴将instantly设置为false,修改参数后手动调用upload()
## 2.2.6(2023-02-09)
修复多个文件同时选择时返回多次change回调的问题
## 2.2.5(2022-12-27)
1.修复多选文件时未能正常校验数量的问题;
2.app端与H5端支持单选或多选文件,通过count数量控制,超过1开启多选。
## 2.2.4(2022-12-27)
1.修复多选文件时未能正常校验数量的问题;
2.app端修复多选只取到第一个文件的问题。
## 2.2.3(2022-12-06)
修复手动调用show()导致count失效的问题
## 2.2.2(2022-12-01)
Vue3自行修改兼容
## 2.2.1(2022-10-19)
修复childId警告提示
## 2.2.0(2022-10-10)
更新app端webview窗口参数clidId,默认值添加时间戳保证唯一性
## 2.1.9(2022-07-13)
[修复] app端选择文件后初始化设置的文件列表被清空问题
## 2.1.8(2022-07-13)
[新增] ref方法初始化文件列表,用于已提交后再次编辑时需带入已上传文件:setFiles(files),可传入数组或Map对象,传入格式请与组件选择返回格式保持一致,且name为必须属性。
## 2.1.7(2022-07-12)
修复ios端偶现创建webview初始化参数未生效的问题
## 2.1.6(2022-07-11)
[修复]:修复上个版本更新导致nvue窗口组件不能选择文件的问题;
[新增]
1.应群友建议(填写禁止格式太多)格式限制formats由原来填写禁止选择的格式改为填写允许被选择的格式;
2.应群友建议(增加上传结束回调事件),上传结束回调事件@uploadEnd
3.如能帮到你请留下你的免费好评,组件使用过程中有问题可以加QQ群交流,至于Map对象怎么使用这类前端基础问题请自行百度
## 2.1.5(2022-07-01)
app端组件销毁时添加自动销毁webview功能,避免v-if销毁组件的情况控件还能被点击的问题
## 2.1.4(2022-07-01)
修复小程序端回显问题
## 2.1.3(2022-06-30)
回调事件返回参数新增path字段(文件临时地址),用于回显
## 2.1.2(2022-06-16)
修复APP端Tabbar窗口无法选择文件的问题
## 2.1.1(2022-06-16)
优化:
1.组件优化为允许在v-if中使用;
2.允许option直接在data赋值,不再强制在onRead中初始化;
## 2.1.0(2022-06-13)
h5 pc端更改为单次可多选
## 2.0.9(2022-06-10)
更新演示内容,部分同学不知道怎么获取服务端返回的数据
## 2.0.8(2022-06-09)
优化动态更新上传参数函数,具体查看下方说明:动态更新参数演示
## 2.0.7(2022-06-07)
新增wxFileType属性,用于小程序端选择附件时可选文件类型
## 2.0.6(2022-06-07)
修复小程序端真机选择文件提示失败的问题
## 2.0.5(2022-06-02)
优化小程序端调用hide()后未阻止触发文件选择问题
## 2.0.4(2022-06-01)
优化APP端选择器初始定位
## 2.0.3(2022-05-31)
修复nvue窗口选择文件报错问题
## 2.0.2(2022-05-20)
修复ios端opiton设置过早未传入webview导致不自动上传问题
## 2.0.1(2022-05-19)
修复APP端子窗口点击选择文件不响应问题
## 2.0.0(2022-05-18)
此次组件更新至2.0版本,与1.0版本使用上略有差异,已使用1.0的同学请自行斟酌是否需要升级!
部分差异:
一、 2.0新增异步触发上传功能;
二、2.0新增文件批量上传功能;
三、2.0优化option,剔除属性,只保留上传接口所需字段,且允许异步更改option的值;
四、组件增加size(文件大小限制)、count(文件个数限制)、formats(文件后缀限制)、accept(文件类型限制)、instantly(是否立即自动上传)、debug(日志打印)等属性;
五、回调事件取消input事件、callback事件,新增change事件和progress事件;
六、ref事件新增upload事件、clear事件;
七、优化组件代码,show和hide函数改为显示隐藏,不再重复开关webview;
## 1.2.3(2022-03-22)
修复Demo里传入待完善功能[手动上传属性manual=true]导致不自动上传的问题,手动提交上传待下个版本更新
## 1.2.2(2022-02-21)
修复上版本APP优化导致H5和小程序端不自动初始化的问题,此次更新仅修复此问题。异步提交功能下个版本更新~
## 1.2.1(2022-01-25)
QQ1群已满,已开放2群:469580165
## 1.2.0(2021-12-09)
优化APP端页面中DOM重排后每次需要重新定位的问题
## 1.1.1(2021-12-09)
优化,与上版本使用方式有改变,请检查后确认是否需要更新,create更名为show, close更名为hide,取消初始化时手动create, 传参方式改为props=>option
## 1.1.0(2021-12-09)
新增refresh方法,用于DOM发生重排时重新定位控件(APP端)
## 1.0.9(2021-07-15)
修复上传进度未同步渲染,直接返回100%的BUG
## 1.0.8(2021-07-12)
修复H5端传入height和width未生效的bug
## 1.0.7(2021-07-07)
修复h5和小程序端上传完成callback未返回fileName字段问题
## 1.0.6(2021-07-07)
修复h5端提示信息debug
## 1.0.5(2021-06-29)
感谢小伙伴找出bug,上传成功回调success未置为true,已修复
## 1.0.4(2021-06-28)
新增兼容APP,H5,小程序手动关闭控件,关闭后不再弹出文件选择框,需要重新create再次开启
## 1.0.3(2021-06-28)
close增加条件编译,除app端外不需要close
## 1.0.2(2021-06-28)
1.修复页面滚动位置后再create控件导致控件位置不正确的问题;
2.修复nvue无法create控件;
3.示例项目新增nvue使用案例;
## 1.0.1(2021-06-28)
因为有的朋友不清楚app端切换tab时应该怎么处理webview,现重新上传一版示例项目,需要做tab切换的朋友可以导入示例项目查看
## 1.0.0(2021-06-25)
此插件为l-file插件中上传功能改版,更新内容为:
1. 按钮内嵌入页面,不再强制固定底部,可跟随页面滚动
2.无需再单独弹框点击上传,减去中间层
3.通过slot自定义按钮样式
export class LsjFile {
constructor(data) {
this.dom = null;
// files.type = waiting(等待上传)|| loading(上传中)|| success(成功) || fail(失败)
this.files = new Map();
this.debug = data.debug || false;
this.id = data.id;
this.width = data.width;
this.height = data.height;
this.option = data.option;
this.instantly = data.instantly;
this.prohibited = data.prohibited;
this.onchange = data.onchange;
this.onprogress = data.onprogress;
this.uploadHandle = this._uploadHandle;
// #ifdef MP-WEIXIN
this.uploadHandle = this._uploadHandleWX;
// #endif
}
/**
* 创建File节点
* @param {string}path webview地址
*/
create(path) {
if (!this.dom) {
// #ifdef H5
let dom = document.createElement('input');
dom.type = 'file'
dom.value = ''
dom.style.height = this.height
dom.style.width = this.width
dom.style.position = 'absolute'
dom.style.top = 0
dom.style.left = 0
dom.style.right = 0
dom.style.bottom = 0
dom.style.opacity = 0
dom.style.zIndex = 999
dom.accept = this.prohibited.accept;
if (this.prohibited.multiple) {
dom.multiple = 'multiple';
}
dom.onchange = event => {
for (let file of event.target.files) {
if (this.files.size >= this.prohibited.count) {
this.toast(`只允许上传${this.prohibited.count}个文件`);
this.dom.value = '';
break;
}
this.addFile(file);
}
this._uploadAfter();
this.dom.value = '';
};
this.dom = dom;
// #endif
// #ifdef APP-PLUS
let styles = {
top: '-200px',
left: 0,
width: '1px',
height: '200px',
background: 'transparent'
};
let extras = {
debug: this.debug,
instantly: this.instantly,
prohibited: this.prohibited,
}
this.dom = plus.webview.create(path, this.id, styles,extras);
this.setData(this.option);
this._overrideUrlLoading();
// #endif
return this.dom;
}
}
/**
* 设置上传参数
* @param {object|string}name 上传参数,支持a.b 和 a[b]
*/
setData() {
let [name,value = ''] = arguments;
if (typeof name === 'object') {
Object.assign(this.option,name);
}
else {
this._setValue(this.option,name,value);
}
this.debug&&console.log(JSON.stringify(this.option));
// #ifdef APP-PLUS
this.dom.evalJS(`vm.setData('${JSON.stringify(this.option)}')`);
// #endif
}
/**
* 上传
* @param {string}name 文件名称
*/
async upload(name='') {
if (!this.option.url) {
throw Error('未设置上传地址');
}
// #ifndef APP-PLUS
if (name && this.files.has(name)) {
await this.uploadHandle(this.files.get(name));
}
else {
for (let item of this.files.values()) {
if (item.type === 'waiting' || item.type === 'fail') {
await this.uploadHandle(item);
}
}
}
// #endif
// #ifdef APP-PLUS
this.dom&&this.dom.evalJS(`vm.upload('${name}')`);
// #endif
}
// 选择文件change
addFile(file,isCallChange) {
let name = file.name;
this.debug&&console.log('文件名称',name,'大小',file.size);
if (file) {
// 限制文件格式
let path = '';
let suffix = name.substring(name.lastIndexOf(".")+1).toLowerCase();
let formats = this.prohibited.formats.toLowerCase();
// #ifndef MP-WEIXIN
path = URL.createObjectURL(file);
// #endif
// #ifdef MP-WEIXIN
path = file.path;
// #endif
if (formats&&!formats.includes(suffix)) {
this.toast(`不支持上传${suffix.toUpperCase()}格式文件`);
return false;
}
// 限制文件大小
if (file.size > 1024 * 1024 * Math.abs(this.prohibited.size)) {
this.toast(`附件大小请勿超过${this.prohibited.size}M`)
return false;
}
if (!this.prohibited.distinct) {
let homonymIndex = [...this.files.keys()].findLastIndex(item=>{
return (item.substring(0,item.lastIndexOf("("))||item.substring(0,item.lastIndexOf("."))) == name.substring(0,name.lastIndexOf(".")) &&
item.substring(item.lastIndexOf(".")+1).toLowerCase() === suffix;
})
if (homonymIndex > -1) {
name = `${name.substring(0,name.lastIndexOf("."))}(${homonymIndex+1}).${suffix}`;
}
}
this.files.set(name,{file,path,name: name,size: file.size,progress: 0,type: 'waiting'});
return true;
}
}
/**
* 移除文件
* @param {string}name 不传name默认移除所有文件,传入name移除指定name的文件
*/
clear(name='') {
// #ifdef APP-PLUS
this.dom&&this.dom.evalJS(`vm.clear('${name}')`);
// #endif
if (!name) {
this.files.clear();
}
else {
this.files.delete(name);
}
return this.onchange(this.files);
}
/**
* 提示框
* @param {string}msg 轻提示内容
*/
toast(msg) {
uni.showToast({
title: msg,
icon: 'none'
});
}
/**
* 微信小程序选择文件
* @param {number}count 可选择文件数量
*/
chooseMessageFile(type,count) {
wx.chooseMessageFile({
count: count,
type: type,
success: ({ tempFiles }) => {
for (let file of tempFiles) {
this.addFile(file);
}
this._uploadAfter();
},
fail: () => {
this.toast(`打开失败`);
}
})
}
_copyObject(obj) {
if (typeof obj !== "undefined") {
return JSON.parse(JSON.stringify(obj));
} else {
return obj;
}
}
/**
* 自动根据字符串路径设置对象中的值 支持.和[]
* @param {Object} dataObj 数据源
* @param {String} name 支持a.b 和 a[b]
* @param {String} value 值
* setValue(dataObj, name, value);
*/
_setValue(dataObj, name, value) {
// 通过正则表达式 查找路径数据
let dataValue;
if (typeof value === "object") {
dataValue = this._copyObject(value);
} else {
dataValue = value;
}
let regExp = new RegExp("([\\w$]+)|\\[(:\\d)\\]", "g");
const patten = name.match(regExp);
// 遍历路径 逐级查找 最后一级用于直接赋值
for (let i = 0; i < patten.length - 1; i++) {
let keyName = patten[i];
if (typeof dataObj[keyName] !== "object") dataObj[keyName] = {};
dataObj = dataObj[keyName];
}
// 最后一级
dataObj[patten[patten.length - 1]] = dataValue;
this.debug&&console.log('参数更新后',JSON.stringify(this.option));
}
_uploadAfter() {
this.onchange(this.files);
setTimeout(()=>{
this.instantly&&this.upload();
},1000)
}
_overrideUrlLoading() {
this.dom.overrideUrlLoading({ mode: 'reject' }, e => {
let {retype,item,files,end} = this._getRequest(
e.url
);
let _this = this;
switch (retype) {
case 'updateOption':
this.dom.evalJS(`vm.setData('${JSON.stringify(_this.option)}')`);
break
case 'change':
try {
_this.files = new Map([..._this.files,...JSON.parse(unescape(files))]);
} catch (e) {
return console.error('出错了,请检查代码')
}
_this.onchange(_this.files);
break
case 'progress':
try {
item = JSON.parse(unescape(item));
} catch (e) {
return console.error('出错了,请检查代码')
}
_this._changeFilesItem(item,end);
break
default:
break
}
})
}
_getRequest(url) {
let theRequest = new Object()
let index = url.indexOf('?')
if (index != -1) {
let str = url.substring(index + 1)
let strs = str.split('&')
for (let i = 0; i < strs.length; i++) {
theRequest[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1])
}
}
return theRequest
}
_changeFilesItem(item,end=false) {
this.debug&&console.log('onprogress',JSON.stringify(item));
this.onprogress(item,end);
this.files.set(item.name,item);
}
_uploadHandle(item) {
item.type = 'loading';
delete item.responseText;
return new Promise((resolve,reject)=>{
this.debug&&console.log('option',JSON.stringify(this.option));
let {url,name,method='POST',header,formData} = this.option;
let form = new FormData();
for (let keys in formData) {
form.append(keys, formData[keys])
}
form.append(name, item.file);
let xmlRequest = new XMLHttpRequest();
xmlRequest.open(method, url, true);
for (let keys in header) {
xmlRequest.setRequestHeader(keys, header[keys])
}
xmlRequest.upload.addEventListener(
'progress',
event => {
if (event.lengthComputable) {
let progress = Math.ceil((event.loaded * 100) / event.total)
if (progress <= 100) {
item.progress = progress;
this._changeFilesItem(item);
}
}
},
false
);
xmlRequest.ontimeout = () => {
console.error('请求超时')
item.type = 'fail';
this._changeFilesItem(item,true);
return resolve(false);
}
xmlRequest.onreadystatechange = ev => {
if (xmlRequest.readyState == 4) {
if (xmlRequest.status == 200) {
this.debug&&console.log('上传完成:' + xmlRequest.responseText)
item['responseText'] = xmlRequest.responseText;
item.type = 'success';
this._changeFilesItem(item,true);
return resolve(true);
} else if (xmlRequest.status == 0) {
console.error('status = 0 :请检查请求头Content-Type与服务端是否匹配,服务端已正确开启跨域,并且nginx未拦截阻止请求')
}
console.error('--ERROR--:status = ' + xmlRequest.status)
item.type = 'fail';
this._changeFilesItem(item,true);
return resolve(false);
}
}
xmlRequest.send(form)
});
}
_uploadHandleWX(item) {
item.type = 'loading';
delete item.responseText;
return new Promise((resolve,reject)=>{
this.debug&&console.log('option',JSON.stringify(this.option));
let form = {filePath: item.file.path,...this.option };
form['fail'] = ({ errMsg = '' }) => {
console.error('--ERROR--:' + errMsg)
item.type = 'fail';
this._changeFilesItem(item,true);
return resolve(false);
}
form['success'] = res => {
if (res.statusCode == 200) {
this.debug&&console.log('上传完成,微信端返回不一定是字符串,根据接口返回格式判断是否需要JSON.parse:' + res.data)
item['responseText'] = res.data;
item.type = 'success';
this._changeFilesItem(item,true);
return resolve(true);
}
item.type = 'fail';
this._changeFilesItem(item,true);
return resolve(false);
}
let xmlRequest = uni.uploadFile(form);
xmlRequest.onProgressUpdate(({ progress = 0 }) => {
if (progress <= 100) {
item.progress = progress;
this._changeFilesItem(item);
}
})
});
}
}
\ No newline at end of file
<template>
<view class="lsj-file" :style="[getStyles]">
<view ref="lsj" class="hFile" :style="[getStyles]" @click="onClick">
<slot><view class="defview" :style="[getStyles]">附件上传</view></slot>
</view>
</view>
</template>
<script>
// 查看文档:https://ext.dcloud.net.cn/plugin?id=5459
import {LsjFile} from './LsjFile.js'
export default {
name: 'Lsj-upload',
props: {
// 打印日志
debug: {type: Boolean,default: false},
// 是否去重文件(同名文件覆盖)
distinct: {type: Boolean,default: false},
// 自动上传
instantly: {type: Boolean,default: false},
// 上传接口参数设置
option: {type: Object,default: ()=>{}},
// 文件大小上限
size: { type: Number, default: 10 },
// 文件选择个数上限,超出后不触发点击
count: { type: Number, default: 9 },
// 是否允许多选文件
multiple: {type:Boolean, default: true},
// 允许上传的文件格式(多个以逗号隔开)
formats: { type: String, default:''},
// input file选择限制
accept: {type: String,default: ''},
// 微信选择文件类型
//all=从所有文件选择,
//video=只能选择视频文件,
//image=只能选择图片文件,
//file=可以选择除了图片和视频之外的其它的文件
wxFileType: { type: String, default: 'all' },
// webviewID需唯一,不同窗口也不要同Id
childId: { type: String, default: 'lsjUpload' },
// 文件选择触发面宽度
width: { type: String, default: '100%' },
// 文件选择触发面高度
height: { type: String, default: '80rpx' },
// top,left,bottom,right仅position=absolute时才需要传入
top: { type: [String, Number], default: '' },
left: { type: [String, Number], default: '' },
bottom: { type: [String, Number], default: '' },
right: { type: [String, Number], default: '' },
// nvue不支持跟随窗口滚动
position: {
type: String,
// #ifdef APP-NVUE
default: 'absolute',
// #endif
// #ifndef APP-NVUE
default: 'static',
// #endif
},
},
data() {
return {
}
},
computed: {
getStyles() {
let styles = {
width: this.width,
height: this.height
}
if (this.position == 'absolute') {
styles['top'] = this.top
styles['bottom'] = this.bottom
styles['left'] = this.left
styles['right'] = this.right
styles['position'] = 'fixed'
}
return styles
}
},
watch: {
option(v) {
// #ifdef APP-PLUS
this.lsjFile&&this.show();
// #endif
}
},
updated() {
// #ifdef APP-PLUS
if (this.isShow) {
this.lsjFile&&this.show();
}
// #endif
},
created() {
uni.$on('$upload-show',this.emitShow);
uni.$on('$upload-hide',this.hide);
},
beforeDestroy() {
uni.$off('$upload-show',this.emitShow);
uni.$off('$upload-hide',this.hide);
// #ifdef APP-PLUS
this.lsjFile.dom.close();
// #endif
},
mounted() {
let pages = getCurrentPages();
this.myRoute = pages[pages.length - 1].route;
this._size = 0;
let WEBID = 'lsj_' + this.childId + new Date().getTime();
this.lsjFile = new LsjFile({
id: WEBID,
debug: this.debug,
width: this.width,
height: this.height,
option: this.option,
instantly: this.instantly,
// 限制条件
prohibited: {
// 是否去重
distinct: this.distinct,
// 大小
size: this.size,
// 允许上传的格式
formats: this.formats,
// 限制选择的格式
accept: this.accept,
count: this.count,
// 是否多选
multiple: this.multiple,
},
onchange: this.onchange,
onprogress: this.onprogress,
});
this.create();
},
methods: {
setFiles(array) {
if (array instanceof Map) {
for (let [key, item] of array) {
item['progress'] = 100;
item['type'] = 'success';
this.lsjFile.files.set(key,item);
}
}
else if (Array.isArray(array)) {
array.forEach(item=>{
if (item.name) {
item['progress'] = 100;
item['type'] = 'success';
this.lsjFile.files.set(item.name,item);
}
});
}
this.onchange(this.lsjFile.files);
},
setData() {
this.lsjFile&&this.lsjFile.setData(...arguments);
},
getDomStyles(callback) {
// #ifndef APP-NVUE
let view = uni
.createSelectorQuery()
.in(this)
.select('.lsj-file')
view.fields(
{
size: true,
rect: true
},
({ height, width, top, left, right, bottom }) => {
uni.createSelectorQuery()
.selectViewport()
.scrollOffset(({ scrollTop }) => {
return callback({
top: parseInt(top) + parseInt(scrollTop) + 'px',
left: parseInt(left) + 'px',
width: parseInt(width) + 'px',
height: parseInt(height) + 'px'
})
})
.exec()
}
).exec()
// #endif
// #ifdef APP-NVUE
const dom = weex.requireModule('dom')
dom.getComponentRect(this.$refs.lsj, ({ size: { height, width, top, left, right, bottom } }) => {
return callback({
top: parseInt(top) + 'px',
left: parseInt(left) + 'px',
width: parseInt(width) + 'px',
height: parseInt(height) + 'px',
right: parseInt(right) + 'px',
bottom: parseInt(bottom) + 'px'
})
})
// #endif
},
emitShow() {
let pages = getCurrentPages();
let route = pages[pages.length - 1].route;
if (route === this.myRoute) {
return this.show();
}
},
show() {
this.debug&&console.log('触发show函数');
if (this._size && (this._size >= this.count)) {
return;
}
this.isShow = true;
// #ifdef APP-PLUS
this.lsjFile&&this.getDomStyles(styles => {
this.lsjFile.dom.setStyle(styles)
});
// #endif
// #ifdef H5
this.lsjFile.dom.style.display = 'inline'
// #endif
},
hide() {
this.debug&&console.log('触发hide函数');
this.isShow = false;
// #ifdef APP-PLUS
this.lsjFile&&this.lsjFile.dom.setStyle({
top: '-100px',
left:'0px',
width: '1px',
height: '100px',
});
// #endif
// #ifdef H5
this.lsjFile.dom.style.display = 'none'
// #endif
},
/**
* 手动提交上传
* @param {string}name 文件名称,不传则上传所有type等于waiting和fail的文件
*/
upload(name) {
this.lsjFile&&this.lsjFile.upload(name);
},
/**
* @returns {Map} 已选择的文件Map集
*/
onchange(files) {
this.$emit('change',files);
this._size = files.size;
return files.size >= this.count ? this.hide() : this.show();
},
/**
* @returns {object} 当前上传中的对象
*/
onprogress(item,end=false) {
this.$emit('progress',item);
if (end) {
setTimeout(()=>{
this.$emit('uploadEnd',item);
},0);
}
},
/**
* 移除组件内缓存的某条数据
* @param {string}name 文件名称,不指定默认清除所有文件
*/
clear(name) {
this.lsjFile.clear(name);
},
// 创建选择器
create() {
// 若iOS端服务端处理不了跨域就将hybrid目录内的html放到服务端去,并将此处path改成服务器上的地址
let path = '/uni_modules/lsj-upload/hybrid/html/uploadFile.html';
let dom = this.lsjFile.create(path);
// #ifdef H5
this.$refs.lsj.$el.appendChild(dom);
// #endif
// #ifndef APP-PLUS
this.show();
// #endif
// #ifdef APP-PLUS
dom.setStyle({position: this.position});
dom.loadURL(path);
setTimeout(()=>{
// #ifdef APP-NVUE
plus.webview.currentWebview().append(dom);
// #endif
// #ifndef APP-NVUE
this.$root.$scope.$getAppWebview().append(dom);
// #endif
this.show();
},300)
// #endif
},
// 点击选择附件
onClick() {
if (this._size >= this.count) {
this.toast(`只允许上传${this.count}个文件`);
return;
}
// #ifdef MP-WEIXIN
if (!this.isShow) {return;}
let count = this.count - this._size;
this.lsjFile.chooseMessageFile(this.wxFileType,count);
// #endif
},
toast(msg) {
uni.showToast({
title: msg,
icon: 'none'
});
}
}
}
</script>
<style scoped>
.lsj-file {
display: inline-block;
}
.defview {
background-color: #007aff;
color: #fff;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.hFile {
position: relative;
overflow: hidden;
}
</style>
/*!
* Vue.js v2.3.0
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e){return void 0!==e&&null!==e}function n(e){return!0===e}function r(e){return"string"==typeof e||"number"==typeof e}function i(e){return null!==e&&"object"==typeof e}function o(e){return"[object Object]"===Ai.call(e)}function a(e){return"[object RegExp]"===Ai.call(e)}function s(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function c(e){var t=parseFloat(e);return isNaN(t)?e:t}function u(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function l(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function f(e,t){return Si.call(e,t)}function p(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function d(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function v(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function h(e,t){for(var n in t)e[n]=t[n];return e}function m(e){for(var t={},n=0;n<e.length;n++)e[n]&&h(t,e[n]);return t}function g(){}function y(e,t){var n=i(e),r=i(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{return JSON.stringify(e)===JSON.stringify(t)}catch(n){return e===t}}function _(e,t){for(var n=0;n<e.length;n++)if(y(e[n],t))return n;return-1}function b(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function $(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function x(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function w(e){if(!Fi.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function C(e,t,n){if(Pi.errorHandler)Pi.errorHandler.call(null,e,t,n);else{if(!Ui||"undefined"==typeof console)throw e;console.error(e)}}function k(e){return"function"==typeof e&&/native code/.test(e.toString())}function A(e){oo.target&&ao.push(oo.target),oo.target=e}function O(){oo.target=ao.pop()}function S(e,t){e.__proto__=t}function T(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];x(e,o,t[o])}}function E(e,t){if(i(e)){var n;return f(e,"__ob__")&&e.__ob__ instanceof fo?n=e.__ob__:lo.shouldConvert&&!eo()&&(Array.isArray(e)||o(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new fo(e)),t&&n&&n.vmCount++,n}}function j(e,t,n,r){var i=new oo,o=Object.getOwnPropertyDescriptor(e,t);if(!o||!1!==o.configurable){var a=o&&o.get,s=o&&o.set,c=E(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return oo.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&I(t)),t},set:function(t){var r=a?a.call(e):n;t===r||t!==t&&r!==r||(s?s.call(e,t):n=t,c=E(t),i.notify())}})}}function N(e,t,n){if(Array.isArray(e)&&"number"==typeof t)return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(f(e,t))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(j(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function L(e,t){if(Array.isArray(e)&&"number"==typeof t)return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||f(e,t)&&(delete e[t],n&&n.dep.notify())}function I(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&I(t)}function D(e,t){if(!t)return e;for(var n,r,i,a=Object.keys(t),s=0;s<a.length;s++)n=a[s],r=e[n],i=t[n],f(e,n)?o(r)&&o(i)&&D(r,i):N(e,n,i);return e}function M(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function P(e,t){var n=Object.create(e||null);return t?h(n,t):n}function R(e){var t=e.props;if(t){var n,r,i,a={};if(Array.isArray(t))for(n=t.length;n--;)"string"==typeof(r=t[n])&&(i=Ti(r),a[i]={type:null});else if(o(t))for(var s in t)r=t[s],i=Ti(s),a[i]=o(r)?r:{type:r};e.props=a}}function F(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function B(e,t,n){function r(r){var i=po[r]||vo;c[r]=i(e[r],t[r],n,r)}"function"==typeof t&&(t=t.options),R(t),F(t);var i=t.extends;if(i&&(e=B(e,i,n)),t.mixins)for(var o=0,a=t.mixins.length;o<a;o++)e=B(e,t.mixins[o],n);var s,c={};for(s in e)r(s);for(s in t)f(e,s)||r(s);return c}function H(e,t,n,r){if("string"==typeof n){var i=e[t];if(f(i,n))return i[n];var o=Ti(n);if(f(i,o))return i[o];var a=Ei(o);if(f(i,a))return i[a];var s=i[n]||i[o]||i[a];return s}}function U(e,t,n,r){var i=t[e],o=!f(n,e),a=n[e];if(J(Boolean,i.type)&&(o&&!f(i,"default")?a=!1:J(String,i.type)||""!==a&&a!==ji(e)||(a=!0)),void 0===a){a=V(r,i,e);var s=lo.shouldConvert;lo.shouldConvert=!0,E(a),lo.shouldConvert=s}return a}function V(e,t,n){if(f(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==z(t.type)?r.call(e):r}}function z(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function J(e,t){if(!Array.isArray(t))return z(t)===z(e);for(var n=0,r=t.length;n<r;n++)if(z(t[n])===z(e))return!0;return!1}function K(e){return new ho(void 0,void 0,void 0,String(e))}function q(e){var t=new ho(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isCloned=!0,t}function W(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[r]=q(e[r]);return n}function Z(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=0;r<n.length;r++)n[r].apply(null,e)}return t.fns=e,t}function G(t,n,r,i,o){var a,s,c,u;for(a in t)s=t[a],c=n[a],u=_o(a),e(s)||(e(c)?(e(s.fns)&&(s=t[a]=Z(s)),r(u.name,s,u.once,u.capture,u.passive)):s!==c&&(c.fns=s,t[a]=c));for(a in n)e(t[a])&&(u=_o(a),i(u.name,n[a],u.capture))}function Y(r,i,o){function a(){o.apply(this,arguments),l(s.fns,a)}var s,c=r[i];e(c)?s=Z([a]):t(c.fns)&&n(c.merged)?(s=c,s.fns.push(a)):s=Z([c,a]),s.merged=!0,r[i]=s}function Q(n,r,i){var o=r.options.props;if(!e(o)){var a={},s=n.attrs,c=n.props;if(t(s)||t(c))for(var u in o){var l=ji(u);X(a,c,u,l,!0)||X(a,s,u,l,!1)}return a}}function X(e,n,r,i,o){if(t(n)){if(f(n,r))return e[r]=n[r],o||delete n[r],!0;if(f(n,i))return e[r]=n[i],o||delete n[i],!0}return!1}function ee(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function te(e){return r(e)?[K(e)]:Array.isArray(e)?ne(e):void 0}function ne(n,i){var o,a,s,c=[];for(o=0;o<n.length;o++)a=n[o],e(a)||"boolean"==typeof a||(s=c[c.length-1],Array.isArray(a)?c.push.apply(c,ne(a,(i||"")+"_"+o)):r(a)?t(s)&&t(s.text)?s.text+=String(a):""!==a&&c.push(K(a)):t(a.text)&&t(s)&&t(s.text)?c[c.length-1]=K(s.text+a.text):(t(a.tag)&&e(a.key)&&t(i)&&(a.key="__vlist"+i+"_"+o+"__"),c.push(a)));return c}function re(e,t){return i(e)?t.extend(e):e}function ie(r,o,a){if(n(r.error)&&t(r.errorComp))return r.errorComp;if(t(r.resolved))return r.resolved;if(n(r.loading)&&t(r.loadingComp))return r.loadingComp;if(!t(r.contexts)){var s=r.contexts=[a],c=!0,u=function(){for(var e=0,t=s.length;e<t;e++)s[e].$forceUpdate()},l=b(function(e){r.resolved=re(e,o),c||u()}),f=b(function(e){t(r.errorComp)&&(r.error=!0,u())}),p=r(l,f);return i(p)&&("function"==typeof p.then?e(r.resolved)&&p.then(l,f):t(p.component)&&"function"==typeof p.component.then&&(p.component.then(l,f),t(p.error)&&(r.errorComp=re(p.error,o)),t(p.loading)&&(r.loadingComp=re(p.loading,o),0===p.delay?r.loading=!0:setTimeout(function(){e(r.resolved)&&e(r.error)&&(r.loading=!0,u())},p.delay||200)),t(p.timeout)&&setTimeout(function(){f(null)},p.timeout))),c=!1,r.loading?r.loadingComp:r.resolved}r.contexts.push(a)}function oe(e){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];if(t(r)&&t(r.componentOptions))return r}}function ae(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&ue(e,t)}function se(e,t,n){n?go.$once(e,t):go.$on(e,t)}function ce(e,t){go.$off(e,t)}function ue(e,t,n){go=e,G(t,n||{},se,ce,e)}function le(e,t){var n={};if(!e)return n;for(var r=[],i=0,o=e.length;i<o;i++){var a=e[i];if(a.context!==t&&a.functionalContext!==t||!a.data||null==a.data.slot)r.push(a);else{var s=a.data.slot,c=n[s]||(n[s]=[]);"template"===a.tag?c.push.apply(c,a.children):c.push(a)}}return r.every(fe)||(n.default=r),n}function fe(e){return e.isComment||" "===e.text}function pe(e){for(var t={},n=0;n<e.length;n++)t[e[n][0]]=e[n][1];return t}function de(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function ve(e,t,n){e.$el=t,e.$options.render||(e.$options.render=yo),_e(e,"beforeMount");var r;return r=function(){e._update(e._render(),n)},e._watcher=new So(e,r,g),n=!1,null==e.$vnode&&(e._isMounted=!0,_e(e,"mounted")),e}function he(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Ri);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,t&&e.$options.props){lo.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c];a[u]=U(u,e.$options.props,t,e)}lo.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,ue(e,n,l)}o&&(e.$slots=le(i,r.context),e.$forceUpdate())}function me(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function ge(e,t){if(t){if(e._directInactive=!1,me(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)ge(e.$children[n]);_e(e,"activated")}}function ye(e,t){if(!(t&&(e._directInactive=!0,me(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)ye(e.$children[n]);_e(e,"deactivated")}}function _e(e,t){var n=e.$options[t];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(e)}catch(n){C(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function be(){$o.length=xo.length=0,wo={},Co=ko=!1}function $e(){ko=!0;var e,t;for($o.sort(function(e,t){return e.id-t.id}),Ao=0;Ao<$o.length;Ao++)e=$o[Ao],t=e.id,wo[t]=null,e.run();var n=xo.slice(),r=$o.slice();be(),Ce(n),xe(r),to&&Pi.devtools&&to.emit("flush")}function xe(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&_e(r,"updated")}}function we(e){e._inactive=!1,xo.push(e)}function Ce(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,ge(e[t],!0)}function ke(e){var t=e.id;if(null==wo[t]){if(wo[t]=!0,ko){for(var n=$o.length-1;n>=0&&$o[n].id>e.id;)n--;$o.splice(Math.max(n,Ao)+1,0,e)}else $o.push(e);Co||(Co=!0,ro($e))}}function Ae(e){To.clear(),Oe(e,To)}function Oe(e,t){var n,r,o=Array.isArray(e);if((o||i(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)Oe(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Oe(e[r[n]],t)}}function Se(e,t,n){Eo.get=function(){return this[t][n]},Eo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Eo)}function Te(e){e._watchers=[];var t=e.$options;t.props&&Ee(e,t.props),t.methods&&Me(e,t.methods),t.data?je(e):E(e._data={},!0),t.computed&&Le(e,t.computed),t.watch&&Pe(e,t.watch)}function Ee(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;lo.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=U(o,t,n,e);j(r,o,a),o in e||Se(e,"_props",o)}(a);lo.shouldConvert=!0}function je(e){var t=e.$options.data;t=e._data="function"==typeof t?Ne(t,e):t||{},o(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=n.length;i--;)r&&f(r,n[i])||$(n[i])||Se(e,"_data",n[i]);E(t,!0)}function Ne(e,t){try{return e.call(t)}catch(e){return C(e,t,"data()"),{}}}function Le(e,t){var n=e._computedWatchers=Object.create(null);for(var r in t){var i=t[r],o="function"==typeof i?i:i.get;n[r]=new So(e,o,g,jo),r in e||Ie(e,r,i)}}function Ie(e,t,n){"function"==typeof n?(Eo.get=De(t),Eo.set=g):(Eo.get=n.get?!1!==n.cache?De(t):n.get:g,Eo.set=n.set?n.set:g),Object.defineProperty(e,t,Eo)}function De(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),oo.target&&t.depend(),t.value}}function Me(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?g:d(t[n],e)}function Pe(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Re(e,n,r[i]);else Re(e,n,r)}}function Re(e,t,n){var r;o(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Fe(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Be(e){var t=He(e.$options.inject,e);t&&Object.keys(t).forEach(function(n){j(e,n,t[n])})}function He(e,t){if(e){for(var n=Array.isArray(e),r=Object.create(null),i=n?e:no?Reflect.ownKeys(e):Object.keys(e),o=0;o<i.length;o++)for(var a=i[o],s=n?a:e[a],c=t;c;){if(c._provided&&s in c._provided){r[a]=c._provided[s];break}c=c.$parent}return r}}function Ue(e,n,r,i,o){var a={},s=e.options.props;if(t(s))for(var c in s)a[c]=U(c,s,n);else t(r.attrs)&&Ve(a,r.attrs),t(r.props)&&Ve(a,r.props);var u=Object.create(i),l=function(e,t,n,r){return Ze(u,e,t,n,r,!0)},f=e.options.render.call(null,l,{data:r,props:a,children:o,parent:i,listeners:r.on||{},injections:He(e.options.inject,i),slots:function(){return le(o,i)}});return f instanceof ho&&(f.functionalContext=i,r.slot&&((f.data||(f.data={})).slot=r.slot)),f}function Ve(e,t){for(var n in t)e[Ti(n)]=t[n]}function ze(r,o,a,s,c){if(!e(r)){var u=a.$options._base;if(i(r)&&(r=u.extend(r)),"function"==typeof r&&(!e(r.cid)||void 0!==(r=ie(r,u,a)))){ut(r),o=o||{},t(o.model)&&We(r.options,o);var l=Q(o,r,c);if(n(r.options.functional))return Ue(r,l,o,a,s);var f=o.on;o.on=o.nativeOn,n(r.options.abstract)&&(o={}),Ke(o);var p=r.options.name||c;return new ho("vue-component-"+r.cid+(p?"-"+p:""),o,void 0,void 0,void 0,a,{Ctor:r,propsData:l,listeners:f,tag:c,children:s})}}}function Je(e,n,r,i){var o=e.componentOptions,a={_isComponent:!0,parent:n,propsData:o.propsData,_componentTag:o.tag,_parentVnode:e,_parentListeners:o.listeners,_renderChildren:o.children,_parentElm:r||null,_refElm:i||null},s=e.data.inlineTemplate;return t(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new o.Ctor(a)}function Ke(e){e.hook||(e.hook={});for(var t=0;t<Lo.length;t++){var n=Lo[t],r=e.hook[n],i=No[n];e.hook[n]=r?qe(i,r):i}}function qe(e,t){return function(n,r,i,o){e(n,r,i,o),t(n,r,i,o)}}function We(e,n){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(n.props||(n.props={}))[r]=n.model.value;var o=n.on||(n.on={});t(o[i])?o[i]=[n.model.callback].concat(o[i]):o[i]=n.model.callback}function Ze(e,t,i,o,a,s){return(Array.isArray(i)||r(i))&&(a=o,o=i,i=void 0),n(s)&&(a=Do),Ge(e,t,i,o,a)}function Ge(e,n,r,i,o){if(t(r)&&t(r.__ob__))return yo();if(!n)return yo();Array.isArray(i)&&"function"==typeof i[0]&&(r=r||{},r.scopedSlots={default:i[0]},i.length=0),o===Do?i=te(i):o===Io&&(i=ee(i));var a,s;if("string"==typeof n){var c;s=Pi.getTagNamespace(n),a=Pi.isReservedTag(n)?new ho(Pi.parsePlatformTagName(n),r,i,void 0,void 0,e):t(c=H(e.$options,"components",n))?ze(c,r,e,i,n):new ho(n,r,i,void 0,void 0,e)}else a=ze(n,r,e,i);return void 0!==a?(s&&Ye(a,s),a):yo()}function Ye(n,r){if(n.ns=r,"foreignObject"!==n.tag&&Array.isArray(n.children))for(var i=0,o=n.children.length;i<o;i++){var a=n.children[i];t(a.tag)&&e(a.ns)&&Ye(a,r)}}function Qe(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,o=e.length;r<o;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(i(e))for(a=Object.keys(e),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=t(e[s],s,r);return n}function Xe(e,t,n,r){var i=this.$scopedSlots[e];if(i)return n=n||{},r&&h(n,r),i(n)||t;var o=this.$slots[e];return o||t}function et(e){return H(this.$options,"filters",e,!0)||Li}function tt(e,t,n){var r=Pi.keyCodes[t]||n;return Array.isArray(r)?-1===r.indexOf(e):r!==e}function nt(e,t,n,r){if(n)if(i(n)){Array.isArray(n)&&(n=m(n));var o;for(var a in n){if("class"===a||"style"===a)o=e;else{var s=e.attrs&&e.attrs.type;o=r||Pi.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}a in o||(o[a]=n[a])}}else;return e}function rt(e,t){var n=this._staticTrees[e];return n&&!t?Array.isArray(n)?W(n):q(n):(n=this._staticTrees[e]=this.$options.staticRenderFns[e].call(this._renderProxy),ot(n,"__static__"+e,!1),n)}function it(e,t,n){return ot(e,"__once__"+t+(n?"_"+n:""),!0),e}function ot(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&at(e[r],t+"_"+r,n);else at(e,t,n)}function at(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function st(e){e._vnode=null,e._staticTrees=null;var t=e.$vnode=e.$options._parentVnode,n=t&&t.context;e.$slots=le(e.$options._renderChildren,n),e.$scopedSlots=Ri,e._c=function(t,n,r,i){return Ze(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Ze(e,t,n,r,i,!0)}}function ct(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._renderChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function ut(e){var t=e.options;if(e.super){var n=ut(e.super);if(n!==e.superOptions){e.superOptions=n;var r=lt(e);r&&h(e.extendOptions,r),t=e.options=B(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function lt(e){var t,n=e.options,r=e.extendOptions,i=e.sealedOptions;for(var o in n)n[o]!==i[o]&&(t||(t={}),t[o]=ft(n[o],r[o],i[o]));return t}function ft(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var i=0;i<e.length;i++)(t.indexOf(e[i])>=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function pt(e){this._init(e)}function dt(e){e.use=function(e){if(!e.installed){var t=v(arguments,1);return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),e.installed=!0,this}}}function vt(e){e.mixin=function(e){this.options=B(this.options,e)}}function ht(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=B(n.options,e),a.super=n,a.options.props&&mt(a),a.options.computed&&gt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Di.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=h({},a.options),i[r]=a,a}}function mt(e){var t=e.options.props;for(var n in t)Se(e.prototype,"_props",n)}function gt(e){var t=e.options.computed;for(var n in t)Ie(e.prototype,n,t[n])}function yt(e){Di.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&o(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function _t(e){return e&&(e.Ctor.options.name||e.tag)}function bt(e,t){return"string"==typeof e?e.split(",").indexOf(t)>-1:!!a(e)&&e.test(t)}function $t(e,t,n){for(var r in e){var i=e[r];if(i){var o=_t(i.componentOptions);o&&!n(o)&&(i!==t&&xt(i),e[r]=null)}}}function xt(e){e&&e.componentInstance.$destroy()}function wt(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)i=i.componentInstance._vnode,i.data&&(n=Ct(i.data,n));for(;t(r=r.parent);)r.data&&(n=Ct(n,r.data));return kt(n)}function Ct(e,n){return{staticClass:At(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function kt(e){var n=e.class,r=e.staticClass;return t(r)||t(n)?At(r,Ot(n)):""}function At(e,t){return e?t?e+" "+t:e:t||""}function Ot(n){if(e(n))return"";if("string"==typeof n)return n;var r="";if(Array.isArray(n)){for(var o,a=0,s=n.length;a<s;a++)t(n[a])&&t(o=Ot(n[a]))&&""!==o&&(r+=o+" ");return r.slice(0,-1)}if(i(n)){for(var c in n)n[c]&&(r+=c+" ");return r.slice(0,-1)}return r}function St(e){return aa(e)?"svg":"math"===e?"math":void 0}function Tt(e){if(!Ui)return!0;if(ca(e))return!1;if(e=e.toLowerCase(),null!=ua[e])return ua[e];var t=document.createElement(e);return e.indexOf("-")>-1?ua[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ua[e]=/HTMLUnknownElement/.test(t.toString())}function Et(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function jt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Nt(e,t){return document.createElementNS(ia[e],t)}function Lt(e){return document.createTextNode(e)}function It(e){return document.createComment(e)}function Dt(e,t,n){e.insertBefore(t,n)}function Mt(e,t){e.removeChild(t)}function Pt(e,t){e.appendChild(t)}function Rt(e){return e.parentNode}function Ft(e){return e.nextSibling}function Bt(e){return e.tagName}function Ht(e,t){e.textContent=t}function Ut(e,t,n){e.setAttribute(t,n)}function Vt(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?l(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])&&o[n].indexOf(i)<0?o[n].push(i):o[n]=[i]:o[n]=i}}function zt(e,n){return e.key===n.key&&e.tag===n.tag&&e.isComment===n.isComment&&t(e.data)===t(n.data)&&Jt(e,n)}function Jt(e,n){if("input"!==e.tag)return!0;var r;return(t(r=e.data)&&t(r=r.attrs)&&r.type)===(t(r=n.data)&&t(r=r.attrs)&&r.type)}function Kt(e,n,r){var i,o,a={};for(i=n;i<=r;++i)o=e[i].key,t(o)&&(a[o]=i);return a}function qt(e,t){(e.data.directives||t.data.directives)&&Wt(e,t)}function Wt(e,t){var n,r,i,o=e===pa,a=t===pa,s=Zt(e.data.directives,e.context),c=Zt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,Yt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Yt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)Yt(u[n],"inserted",t,e)};o?Y(t.data.hook||(t.data.hook={}),"insert",f):f()}if(l.length&&Y(t.data.hook||(t.data.hook={}),"postpatch",function(){for(var n=0;n<l.length;n++)Yt(l[n],"componentUpdated",t,e)}),!o)for(n in s)c[n]||Yt(s[n],"unbind",e,e,a)}function Zt(e,t){var n=Object.create(null);if(!e)return n;var r,i;for(r=0;r<e.length;r++)i=e[r],i.modifiers||(i.modifiers=ha),n[Gt(i)]=i,i.def=H(t.$options,"directives",i.name,!0);return n}function Gt(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Yt(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){C(r,n.context,"directive "+e.name+" "+t+" hook")}}function Qt(n,r){if(!e(n.data.attrs)||!e(r.data.attrs)){var i,o,a=r.elm,s=n.data.attrs||{},c=r.data.attrs||{};t(c.__ob__)&&(c=r.data.attrs=h({},c));for(i in c)o=c[i],s[i]!==o&&Xt(a,i,o);Ji&&c.value!==s.value&&Xt(a,"value",c.value);for(i in s)e(c[i])&&(ta(i)?a.removeAttributeNS(ea,na(i)):Qo(i)||a.removeAttribute(i))}}function Xt(e,t,n){Xo(t)?ra(n)?e.removeAttribute(t):e.setAttribute(t,t):Qo(t)?e.setAttribute(t,ra(n)||"false"===n?"false":"true"):ta(t)?ra(n)?e.removeAttributeNS(ea,na(t)):e.setAttributeNS(ea,t,n):ra(n)?e.removeAttribute(t):e.setAttribute(t,n)}function en(n,r){var i=r.elm,o=r.data,a=n.data;if(!(e(o.staticClass)&&e(o.class)&&(e(a)||e(a.staticClass)&&e(a.class)))){var s=wt(r),c=i._transitionClasses;t(c)&&(s=At(s,Ot(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}function tn(e){function t(){(a||(a=[])).push(e.slice(v,i).trim()),v=i+1}var n,r,i,o,a,s=!1,c=!1,u=!1,l=!1,f=0,p=0,d=0,v=0;for(i=0;i<e.length;i++)if(r=n,n=e.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===e.charCodeAt(i+1)||124===e.charCodeAt(i-1)||f||p||d){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:d++;break;case 41:d--;break;case 91:p++;break;case 93:p--;break;case 123:f++;break;case 125:f--}if(47===n){for(var h=i-1,m=void 0;h>=0&&" "===(m=e.charAt(h));h--);m&&_a.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i<a.length;i++)o=nn(o,a[i]);return o}function nn(e,t){var n=t.indexOf("(");return n<0?'_f("'+t+'")('+e+")":'_f("'+t.slice(0,n)+'")('+e+","+t.slice(n+1)}function rn(e){console.error("[Vue compiler]: "+e)}function on(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function an(e,t,n){(e.props||(e.props=[])).push({name:t,value:n})}function sn(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n})}function cn(e,t,n,r,i,o){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:i,modifiers:o})}function un(e,t,n,r,i,o){r&&r.capture&&(delete r.capture,t="!"+t),r&&r.once&&(delete r.once,t="~"+t),r&&r.passive&&(delete r.passive,t="&"+t);var a;r&&r.native?(delete r.native,a=e.nativeEvents||(e.nativeEvents={})):a=e.events||(e.events={});var s={value:n,modifiers:r},c=a[t];Array.isArray(c)?i?c.unshift(s):c.push(s):a[t]=c?i?[s,c]:[c,s]:s}function ln(e,t,n){var r=fn(e,":"+t)||fn(e,"v-bind:"+t);if(null!=r)return tn(r);if(!1!==n){var i=fn(e,t);if(null!=i)return JSON.stringify(i)}}function fn(e,t){var n;if(null!=(n=e.attrsMap[t]))for(var r=e.attrsList,i=0,o=r.length;i<o;i++)if(r[i].name===t){r.splice(i,1);break}return n}function pn(e,t,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=dn(t,a);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+s+"}"}}function dn(e,t){var n=vn(e);return null===n.idx?e+"="+t:"var $$exp = "+n.exp+", $$idx = "+n.idx+";if (!Array.isArray($$exp)){"+e+"="+t+"}else{$$exp.splice($$idx, 1, "+t+")}"}function vn(e){if(Ho=e,Bo=Ho.length,Vo=zo=Jo=0,e.indexOf("[")<0||e.lastIndexOf("]")<Bo-1)return{exp:e,idx:null};for(;!mn();)Uo=hn(),gn(Uo)?_n(Uo):91===Uo&&yn(Uo);return{exp:e.substring(0,zo),idx:e.substring(zo+1,Jo)}}function hn(){return Ho.charCodeAt(++Vo)}function mn(){return Vo>=Bo}function gn(e){return 34===e||39===e}function yn(e){var t=1;for(zo=Vo;!mn();)if(e=hn(),gn(e))_n(e);else if(91===e&&t++,93===e&&t--,0===t){Jo=Vo;break}}function _n(e){for(var t=e;!mn()&&(e=hn())!==t;);}function bn(e,t,n){Ko=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if("select"===o)wn(e,r,i);else if("input"===o&&"checkbox"===a)$n(e,r,i);else if("input"===o&&"radio"===a)xn(e,r,i);else if("input"===o||"textarea"===o)Cn(e,r,i);else if(!Pi.isReservedTag(o))return pn(e,r,i),!1;return!0}function $n(e,t,n){var r=n&&n.number,i=ln(e,"value")||"null",o=ln(e,"true-value")||"true",a=ln(e,"false-value")||"false";an(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),un(e,$a,"var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+dn(t,"$$c")+"}",null,!0)}function xn(e,t,n){var r=n&&n.number,i=ln(e,"value")||"null";i=r?"_n("+i+")":i,an(e,"checked","_q("+t+","+i+")"),un(e,$a,dn(t,i),null,!0)}function wn(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+dn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),un(e,"change",o,null,!0)}function Cn(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ba:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=dn(t,l);c&&(f="if($event.target.composing)return;"+f),an(e,"value","("+t+")"),un(e,u,f,null,!0),(s||a||"number"===r)&&un(e,"blur","$forceUpdate()")}function kn(e){var n;t(e[ba])&&(n=zi?"change":"input",e[n]=[].concat(e[ba],e[n]||[]),delete e[ba]),t(e[$a])&&(n=Zi?"click":"change",e[n]=[].concat(e[$a],e[n]||[]),delete e[$a])}function An(e,t,n,r,i){if(n){var o=t,a=qo;t=function(n){null!==(1===arguments.length?o(n):o.apply(null,arguments))&&On(e,t,r,a)}}qo.addEventListener(e,t,Gi?{capture:r,passive:i}:r)}function On(e,t,n,r){(r||qo).removeEventListener(e,t,n)}function Sn(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};qo=n.elm,kn(r),G(r,i,An,On,n.context)}}function Tn(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=h({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c)if(o=c[i],"textContent"!==i&&"innerHTML"!==i||(r.children&&(r.children.length=0),o!==s[i]))if("value"===i){a._value=o;var u=null==o?"":String(o);En(a,r,u)&&(a.value=u)}else a[i]=o}}function En(e,t,n){return!e.composing&&("option"===t.tag||jn(e,n)||Nn(e,n))}function jn(e,t){return document.activeElement!==e&&e.value!==t}function Nn(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number||"number"===e.type?c(r)!==c(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Ln(e){var t=In(e.style);return e.staticStyle?h(e.staticStyle,t):t}function In(e){return Array.isArray(e)?m(e):"string"==typeof e?Ca(e):e}function Dn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=Ln(i.data))&&h(r,n);(n=Ln(e.data))&&h(r,n);for(var o=e;o=o.parent;)o.data&&(n=Ln(o.data))&&h(r,n);return r}function Mn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=In(r.data.style)||{};r.data.normalizedStyle=t(p.__ob__)?h({},p):p;var d=Dn(r,!0);for(s in f)e(d[s])&&Oa(c,s,"");for(s in d)(a=d[s])!==f[s]&&Oa(c,s,null==a?"":a)}}function Pn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Rn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Fn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&h(t,ja(e.name||"v")),h(t,e),t}return"string"==typeof e?ja(e):void 0}}function Bn(e){Fa(function(){Fa(e)})}function Hn(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),Pn(e,t)}function Un(e,t){e._transitionClasses&&l(e._transitionClasses,t),Rn(e,t)}function Vn(e,t,n){var r=zn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===La?Ma:Ra,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}function zn(e,t){var n,r=window.getComputedStyle(e),i=r[Da+"Delay"].split(", "),o=r[Da+"Duration"].split(", "),a=Jn(i,o),s=r[Pa+"Delay"].split(", "),c=r[Pa+"Duration"].split(", "),u=Jn(s,c),l=0,f=0;return t===La?a>0&&(n=La,l=a,f=o.length):t===Ia?u>0&&(n=Ia,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?La:Ia:null,f=n?n===La?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===La&&Ba.test(r[Da+"Property"])}}function Jn(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Kn(t)+Kn(e[n])}))}function Kn(e){return 1e3*Number(e.slice(0,-1))}function qn(n,r){var o=n.elm;t(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var a=Fn(n.data.transition);if(!e(a)&&!t(o._enterCb)&&1===o.nodeType){
for(var s=a,u=s.css,l=s.type,f=s.enterClass,p=s.enterToClass,d=s.enterActiveClass,v=s.appearClass,h=s.appearToClass,m=s.appearActiveClass,g=s.beforeEnter,y=s.enter,_=s.afterEnter,$=s.enterCancelled,x=s.beforeAppear,w=s.appear,C=s.afterAppear,k=s.appearCancelled,A=s.duration,O=bo,S=bo.$vnode;S&&S.parent;)S=S.parent,O=S.context;var T=!O._isMounted||!n.isRootInsert;if(!T||w||""===w){var E=T&&v?v:f,j=T&&m?m:d,N=T&&h?h:p,L=T?x||g:g,I=T&&"function"==typeof w?w:y,D=T?C||_:_,M=T?k||$:$,P=c(i(A)?A.enter:A),R=!1!==u&&!Ji,F=Gn(I),B=o._enterCb=b(function(){R&&(Un(o,N),Un(o,j)),B.cancelled?(R&&Un(o,E),M&&M(o)):D&&D(o),o._enterCb=null});n.data.show||Y(n.data.hook||(n.data.hook={}),"insert",function(){var e=o.parentNode,t=e&&e._pending&&e._pending[n.key];t&&t.tag===n.tag&&t.elm._leaveCb&&t.elm._leaveCb(),I&&I(o,B)}),L&&L(o),R&&(Hn(o,E),Hn(o,j),Bn(function(){Hn(o,N),Un(o,E),B.cancelled||F||(Zn(P)?setTimeout(B,P):Vn(o,l,B))})),n.data.show&&(r&&r(),I&&I(o,B)),R||F||B()}}}function Wn(n,r){function o(){k.cancelled||(n.data.show||((a.parentNode._pending||(a.parentNode._pending={}))[n.key]=n),h&&h(a),x&&(Hn(a,p),Hn(a,v),Bn(function(){Hn(a,d),Un(a,p),k.cancelled||w||(Zn(C)?setTimeout(k,C):Vn(a,f,k))})),m&&m(a,k),x||w||k())}var a=n.elm;t(a._enterCb)&&(a._enterCb.cancelled=!0,a._enterCb());var s=Fn(n.data.transition);if(e(s))return r();if(!t(a._leaveCb)&&1===a.nodeType){var u=s,l=u.css,f=u.type,p=u.leaveClass,d=u.leaveToClass,v=u.leaveActiveClass,h=u.beforeLeave,m=u.leave,g=u.afterLeave,y=u.leaveCancelled,_=u.delayLeave,$=u.duration,x=!1!==l&&!Ji,w=Gn(m),C=c(i($)?$.leave:$),k=a._leaveCb=b(function(){a.parentNode&&a.parentNode._pending&&(a.parentNode._pending[n.key]=null),x&&(Un(a,d),Un(a,v)),k.cancelled?(x&&Un(a,p),y&&y(a)):(r(),g&&g(a)),a._leaveCb=null});_?_(o):o()}}function Zn(e){return"number"==typeof e&&!isNaN(e)}function Gn(n){if(e(n))return!1;var r=n.fns;return t(r)?Gn(Array.isArray(r)?r[0]:r):(n._length||n.length)>1}function Yn(e,t){!0!==t.data.show&&qn(t)}function Qn(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=_(r,er(a))>-1,a.selected!==o&&(a.selected=o);else if(y(er(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Xn(e,t){for(var n=0,r=t.length;n<r;n++)if(y(er(t[n]),e))return!1;return!0}function er(e){return"_value"in e?e._value:e.value}function tr(e){e.target.composing=!0}function nr(e){e.target.composing=!1,rr(e.target,"input")}function rr(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ir(e){return!e.componentInstance||e.data&&e.data.transition?e:ir(e.componentInstance._vnode)}function or(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?or(oe(t.children)):e}function ar(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[Ti(o)]=i[o];return t}function sr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function cr(e){for(;e=e.parent;)if(e.data.transition)return!0}function ur(e,t){return t.key===e.key&&t.tag===e.tag}function lr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function fr(e){e.data.newPos=e.elm.getBoundingClientRect()}function pr(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function dr(e){return Xa=Xa||document.createElement("div"),Xa.innerHTML=e,Xa.textContent}function vr(e,t){var n=t?Ms:Ds;return e.replace(n,function(e){return Is[e]})}function hr(e,t){function n(t){l+=t,e=e.substring(t)}function r(e,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),e&&(s=e.toLowerCase()),e)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Ni,u=t.canBeLeftOpenTag||Ni,l=0;e;){if(i=e,o&&Ns(o)){var f=o.toLowerCase(),p=Ls[f]||(Ls[f]=new RegExp("([\\s\\S]*?)(</"+f+"[^>]*>)","i")),d=0,v=e.replace(p,function(e,n,r){return d=r.length,Ns(f)||"noscript"===f||(n=n.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(fs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){n(m+3);continue}}if(ps.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(ls);if(y){n(y[0].length);continue}var _=e.match(us);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(ss);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(cs))&&(o=e.match(os));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&rs(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d<f;d++){var v=e.attrs[d];ds&&-1===v[0].indexOf('""')&&(""===v[3]&&delete v[3],""===v[4]&&delete v[4],""===v[5]&&delete v[5]);var h=v[3]||v[4]||v[5]||"";p[d]={name:v[1],value:vr(h,t.shouldDecodeNewlines)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:p}),o=n),t.start&&t.start(n,p,l,e.start,e.end)}($);continue}}var x=void 0,w=void 0,C=void 0;if(h>=0){for(w=e.slice(h);!(us.test(w)||ss.test(w)||fs.test(w)||ps.test(w)||(C=w.indexOf("<",1))<0);)h+=C,w=e.slice(h);x=e.substring(0,h),n(h)}h<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===i){t.chars&&t.chars(e);break}}r()}function mr(e,t){var n=t?Rs(t):Ps;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=tn(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a<e.length&&o.push(JSON.stringify(e.slice(a))),o.join("+")}}function gr(e,t){function n(e){e.pre&&(s=!1),_s(e.tag)&&(c=!1)}vs=t.warn||rn,$s=t.getTagNamespace||Ni,bs=t.mustUseProp||Ni,_s=t.isPreTag||Ni,gs=on(t.modules,"preTransformNode"),ms=on(t.modules,"transformNode"),ys=on(t.modules,"postTransformNode"),hs=t.delimiters;var r,i,o=[],a=!1!==t.preserveWhitespace,s=!1,c=!1;return hr(e,{warn:vs,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,start:function(e,a,u){var l=i&&i.ns||$s(e);zi&&"svg"===l&&(a=Mr(a));var f={type:1,tag:e,attrsList:a,attrsMap:Lr(a),parent:i,children:[]};l&&(f.ns=l),Dr(f)&&!eo()&&(f.forbidden=!0);for(var p=0;p<gs.length;p++)gs[p](f,t);if(s||(yr(f),f.pre&&(s=!0)),_s(f.tag)&&(c=!0),s)_r(f);else{xr(f),wr(f),Or(f),br(f),f.plain=!f.key&&!a.length,$r(f),Sr(f),Tr(f);for(var d=0;d<ms.length;d++)ms[d](f,t);Er(f)}if(r?o.length||r.if&&(f.elseif||f.else)&&Ar(r,{exp:f.elseif,block:f}):r=f,i&&!f.forbidden)if(f.elseif||f.else)Cr(f,i);else if(f.slotScope){i.plain=!1;var v=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[v]=f}else i.children.push(f),f.parent=i;u?n(f):(i=f,o.push(f));for(var h=0;h<ys.length;h++)ys[h](f,t)},end:function(){var e=o[o.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!c&&e.children.pop(),o.length-=1,i=o[o.length-1],n(e)},chars:function(e){if(i&&(!zi||"textarea"!==i.tag||i.attrsMap.placeholder!==e)){var t=i.children;if(e=c||e.trim()?Ir(i)?e:Ks(e):a&&t.length?" ":""){var n;!s&&" "!==e&&(n=mr(e,hs))?t.push({type:2,expression:n,text:e}):" "===e&&t.length&&" "===t[t.length-1].text||t.push({type:3,text:e})}}}}),r}function yr(e){null!=fn(e,"v-pre")&&(e.pre=!0)}function _r(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}function br(e){var t=ln(e,"key");t&&(e.key=t)}function $r(e){var t=ln(e,"ref");t&&(e.ref=t,e.refInFor=jr(e))}function xr(e){var t;if(t=fn(e,"v-for")){var n=t.match(Hs);if(!n)return;e.for=n[2].trim();var r=n[1].trim(),i=r.match(Us);i?(e.alias=i[1].trim(),e.iterator1=i[2].trim(),i[3]&&(e.iterator2=i[3].trim())):e.alias=r}}function wr(e){var t=fn(e,"v-if");if(t)e.if=t,Ar(e,{exp:t,block:e});else{null!=fn(e,"v-else")&&(e.else=!0);var n=fn(e,"v-else-if");n&&(e.elseif=n)}}function Cr(e,t){var n=kr(t.children);n&&n.if&&Ar(n,{exp:e.elseif,block:e})}function kr(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}function Ar(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function Or(e){null!=fn(e,"v-once")&&(e.once=!0)}function Sr(e){if("slot"===e.tag)e.slotName=ln(e,"name");else{var t=ln(e,"slot");t&&(e.slotTarget='""'===t?'"default"':t),"template"===e.tag&&(e.slotScope=fn(e,"scope"))}}function Tr(e){var t;(t=ln(e,"is"))&&(e.component=t),null!=fn(e,"inline-template")&&(e.inlineTemplate=!0)}function Er(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,Bs.test(r))if(e.hasBindings=!0,a=Nr(r),a&&(r=r.replace(Js,"")),zs.test(r))r=r.replace(zs,""),o=tn(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=Ti(r))&&(r="innerHTML")),a.camel&&(r=Ti(r)),a.sync&&un(e,"update:"+Ti(r),dn(o,"$event"))),s||bs(e.tag,e.attrsMap.type,r)?an(e,r,o):sn(e,r,o);else if(Fs.test(r))r=r.replace(Fs,""),un(e,r,o,a,!1,vs);else{r=r.replace(Bs,"");var u=r.match(Vs),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),cn(e,r,i,o,l,a)}else sn(e,r,JSON.stringify(o))}function jr(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function Nr(e){var t=e.match(Js);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function Lr(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}function Ir(e){return"script"===e.tag||"style"===e.tag}function Dr(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}function Mr(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];qs.test(r.name)||(r.name=r.name.replace(Ws,""),t.push(r))}return t}function Pr(e,t){e&&(xs=Zs(t.staticKeys||""),ws=t.isReservedTag||Ni,Fr(e),Br(e,!1))}function Rr(e){return u("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))}function Fr(e){if(e.static=Ur(e),1===e.type){if(!ws(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var r=e.children[t];Fr(r),r.static||(e.static=!1)}}}function Br(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,r=e.children.length;n<r;n++)Br(e.children[n],t||!!e.for);e.ifConditions&&Hr(e.ifConditions,t)}}function Hr(e,t){for(var n=1,r=e.length;n<r;n++)Br(e[n].block,t)}function Ur(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||Oi(e.tag)||!ws(e.tag)||Vr(e)||!Object.keys(e).every(xs))))}function Vr(e){for(;e.parent;){if(e=e.parent,"template"!==e.tag)return!1;if(e.for)return!0}return!1}function zr(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e){var o=e[i];r+='"'+i+'":'+Jr(i,o)+","}return r.slice(0,-1)+"}"}function Jr(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Jr(e,t)}).join(",")+"]";var n=Ys.test(t.value),r=Gs.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)ec[s]?(o+=ec[s],Qs[s]&&a.push(s)):a.push(s);a.length&&(i+=Kr(a)),o&&(i+=o);return"function($event){"+i+(n?t.value+"($event)":r?"("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function Kr(e){return"if(!('button' in $event)&&"+e.map(qr).join("&&")+")return null;"}function qr(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Qs[e];return"_k($event.keyCode,"+JSON.stringify(e)+(n?","+JSON.stringify(n):"")+")"}function Wr(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+(t.modifiers&&t.modifiers.prop?",true":"")+")"}}function Zr(e,t){var n=Ts,r=Ts=[],i=Es;Es=0,js=t,Cs=t.warn||rn,ks=on(t.modules,"transformCode"),As=on(t.modules,"genData"),Os=t.directives||{},Ss=t.isReservedTag||Ni;var o=e?Gr(e):'_c("div")';return Ts=n,Es=i,{render:"with(this){return "+o+"}",staticRenderFns:r}}function Gr(e){if(e.staticRoot&&!e.staticProcessed)return Yr(e);if(e.once&&!e.onceProcessed)return Qr(e);if(e.for&&!e.forProcessed)return ti(e);if(e.if&&!e.ifProcessed)return Xr(e);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return di(e);var t;if(e.component)t=vi(e.component,e);else{var n=e.plain?void 0:ni(e),r=e.inlineTemplate?null:si(e,!0);t="_c('"+e.tag+"'"+(n?","+n:"")+(r?","+r:"")+")"}for(var i=0;i<ks.length;i++)t=ks[i](e,t);return t}return si(e)||"void 0"}function Yr(e){return e.staticProcessed=!0,Ts.push("with(this){return "+Gr(e)+"}"),"_m("+(Ts.length-1)+(e.staticInFor?",true":"")+")"}function Qr(e){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Xr(e);if(e.staticInFor){for(var t="",n=e.parent;n;){if(n.for){t=n.key;break}n=n.parent}return t?"_o("+Gr(e)+","+Es+++(t?","+t:"")+")":Gr(e)}return Yr(e)}function Xr(e){return e.ifProcessed=!0,ei(e.ifConditions.slice())}function ei(e){function t(e){return e.once?Qr(e):Gr(e)}if(!e.length)return"_e()";var n=e.shift();return n.exp?"("+n.exp+")?"+t(n.block)+":"+ei(e):""+t(n.block)}function ti(e){var t=e.for,n=e.alias,r=e.iterator1?","+e.iterator1:"",i=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+t+"),function("+n+r+i+"){return "+Gr(e)+"})"}function ni(e){var t="{",n=ri(e);n&&(t+=n+","),e.key&&(t+="key:"+e.key+","),e.ref&&(t+="ref:"+e.ref+","),e.refInFor&&(t+="refInFor:true,"),e.pre&&(t+="pre:true,"),e.component&&(t+='tag:"'+e.tag+'",');for(var r=0;r<As.length;r++)t+=As[r](e);if(e.attrs&&(t+="attrs:{"+hi(e.attrs)+"},"),e.props&&(t+="domProps:{"+hi(e.props)+"},"),e.events&&(t+=zr(e.events,!1,Cs)+","),e.nativeEvents&&(t+=zr(e.nativeEvents,!0,Cs)+","),e.slotTarget&&(t+="slot:"+e.slotTarget+","),e.scopedSlots&&(t+=oi(e.scopedSlots)+","),e.model&&(t+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=ii(e);i&&(t+=i+",")}return t=t.replace(/,$/,"")+"}",e.wrapData&&(t=e.wrapData(t)),t}function ri(e){var t=e.directives;if(t){var n,r,i,o,a="directives:[",s=!1;for(n=0,r=t.length;n<r;n++){i=t[n],o=!0;var c=Os[i.name]||tc[i.name];c&&(o=!!c(e,i,Cs)),o&&(s=!0,a+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?',arg:"'+i.arg+'"':"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}return s?a.slice(0,-1)+"]":void 0}}function ii(e){var t=e.children[0];if(1===t.type){var n=Zr(t,js);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}function oi(e){return"scopedSlots:_u(["+Object.keys(e).map(function(t){return ai(t,e[t])}).join(",")+"])"}function ai(e,t){return"["+e+",function("+String(t.attrsMap.scope)+"){return "+("template"===t.tag?si(t)||"void 0":Gr(t))+"}]"}function si(e,t){var n=e.children;if(n.length){var r=n[0];if(1===n.length&&r.for&&"template"!==r.tag&&"slot"!==r.tag)return Gr(r);var i=t?ci(n):0;return"["+n.map(fi).join(",")+"]"+(i?","+i:"")}}function ci(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(1===r.type){if(ui(r)||r.ifConditions&&r.ifConditions.some(function(e){return ui(e.block)})){t=2;break}(li(r)||r.ifConditions&&r.ifConditions.some(function(e){return li(e.block)}))&&(t=1)}}return t}function ui(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function li(e){return!Ss(e.tag)}function fi(e){return 1===e.type?Gr(e):pi(e)}function pi(e){return"_v("+(2===e.type?e.expression:mi(JSON.stringify(e.text)))+")"}function di(e){var t=e.slotName||'"default"',n=si(e),r="_t("+t+(n?","+n:""),i=e.attrs&&"{"+e.attrs.map(function(e){return Ti(e.name)+":"+e.value}).join(",")+"}",o=e.attrsMap["v-bind"];return!i&&!o||n||(r+=",null"),i&&(r+=","+i),o&&(r+=(i?"":",null")+","+o),r+")"}function vi(e,t){var n=t.inlineTemplate?null:si(t,!0);return"_c("+e+","+ni(t)+(n?","+n:"")+")"}function hi(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+mi(r.value)+","}return t.slice(0,-1)}function mi(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function gi(e,t){var n=gr(e.trim(),t);Pr(n,t);var r=Zr(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}}function yi(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),g}}function _i(e,t){var n=(t.warn,fn(e,"class"));n&&(e.staticClass=JSON.stringify(n));var r=ln(e,"class",!1);r&&(e.classBinding=r)}function bi(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}function $i(e,t){var n=(t.warn,fn(e,"style"));n&&(e.staticStyle=JSON.stringify(Ca(n)));var r=ln(e,"style",!1);r&&(e.styleBinding=r)}function xi(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}function wi(e,t){t.value&&an(e,"textContent","_s("+t.value+")")}function Ci(e,t){t.value&&an(e,"innerHTML","_s("+t.value+")")}function ki(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}var Ai=Object.prototype.toString,Oi=u("slot,component",!0),Si=Object.prototype.hasOwnProperty,Ti=p(function(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}),Ei=p(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),ji=p(function(e){return e.replace(/([^-])([A-Z])/g,"$1-$2").replace(/([^-])([A-Z])/g,"$1-$2").toLowerCase()}),Ni=function(){return!1},Li=function(e){return e},Ii="data-server-rendered",Di=["component","directive","filter"],Mi=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],Pi={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Ni,isReservedAttr:Ni,isUnknownElement:Ni,getTagNamespace:g,parsePlatformTagName:Li,mustUseProp:Ni,_lifecycleHooks:Mi},Ri=Object.freeze({}),Fi=/[^\w.$]/,Bi=g,Hi="__proto__"in{},Ui="undefined"!=typeof window,Vi=Ui&&window.navigator.userAgent.toLowerCase(),zi=Vi&&/msie|trident/.test(Vi),Ji=Vi&&Vi.indexOf("msie 9.0")>0,Ki=Vi&&Vi.indexOf("edge/")>0,qi=Vi&&Vi.indexOf("android")>0,Wi=Vi&&/iphone|ipad|ipod|ios/.test(Vi),Zi=Vi&&/chrome\/\d+/.test(Vi)&&!Ki,Gi=!1;if(Ui)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){Gi=!0}}),window.addEventListener("test-passive",null,Yi)}catch(e){}var Qi,Xi,eo=function(){return void 0===Qi&&(Qi=!Ui&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),Qi},to=Ui&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,no="undefined"!=typeof Symbol&&k(Symbol)&&"undefined"!=typeof Reflect&&k(Reflect.ownKeys),ro=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t<e.length;t++)e[t]()}var t,n=[],r=!1;if("undefined"!=typeof Promise&&k(Promise)){var i=Promise.resolve(),o=function(e){console.error(e)};t=function(){i.then(e).catch(o),Wi&&setTimeout(g)}}else if("undefined"==typeof MutationObserver||!k(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())t=function(){setTimeout(e,0)};else{var a=1,s=new MutationObserver(e),c=document.createTextNode(String(a));s.observe(c,{characterData:!0}),t=function(){a=(a+1)%2,c.data=String(a)}}return function(e,i){var o;if(n.push(function(){if(e)try{e.call(i)}catch(e){C(e,i,"nextTick")}else o&&o(i)}),r||(r=!0,t()),!e&&"undefined"!=typeof Promise)return new Promise(function(e,t){o=e})}}();Xi="undefined"!=typeof Set&&k(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var io=0,oo=function(){this.id=io++,this.subs=[]};oo.prototype.addSub=function(e){this.subs.push(e)},oo.prototype.removeSub=function(e){l(this.subs,e)},oo.prototype.depend=function(){oo.target&&oo.target.addDep(this)},oo.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},oo.target=null;var ao=[],so=Array.prototype,co=Object.create(so);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=so[e];x(co,e,function(){for(var n=arguments,r=arguments.length,i=new Array(r);r--;)i[r]=n[r];var o,a=t.apply(this,i),s=this.__ob__;switch(e){case"push":case"unshift":o=i;break;case"splice":o=i.slice(2)}return o&&s.observeArray(o),s.dep.notify(),a})});var uo=Object.getOwnPropertyNames(co),lo={shouldConvert:!0,isSettingProps:!1},fo=function(e){if(this.value=e,this.dep=new oo,this.vmCount=0,x(e,"__ob__",this),Array.isArray(e)){(Hi?S:T)(e,co,uo),this.observeArray(e)}else this.walk(e)};fo.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)j(e,t[n],e[t[n]])},fo.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)E(e[t])};var po=Pi.optionMergeStrategies;po.data=function(e,t,n){return n?e||t?function(){var r="function"==typeof t?t.call(n):t,i="function"==typeof e?e.call(n):void 0;return r?D(r,i):i}:void 0:t?"function"!=typeof t?e:e?function(){return D(t.call(this),e.call(this))}:t:e},Mi.forEach(function(e){po[e]=M}),Di.forEach(function(e){po[e+"s"]=P}),po.watch=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n={};h(n,e);for(var r in t){var i=n[r],o=t[r];i&&!Array.isArray(i)&&(i=[i]),n[r]=i?i.concat(o):[o]}return n},po.props=po.methods=po.computed=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n=Object.create(null);return h(n,e),h(n,t),n};var vo=function(e,t){return void 0===t?e:t},ho=function(e,t,n,r,i,o,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.functionalContext=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1},mo={child:{}};mo.child.get=function(){return this.componentInstance},Object.defineProperties(ho.prototype,mo);var go,yo=function(){var e=new ho;return e.text="",e.isComment=!0,e},_o=p(function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var r="!"===e.charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}),bo=null,$o=[],xo=[],wo={},Co=!1,ko=!1,Ao=0,Oo=0,So=function(e,t,n,r){this.vm=e,e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Oo,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Xi,this.newDepIds=new Xi,this.expression="","function"==typeof t?this.getter=t:(this.getter=w(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};So.prototype.get=function(){A(this);var e,t=this.vm;if(this.user)try{e=this.getter.call(t,t)}catch(e){C(e,t,'getter for watcher "'+this.expression+'"')}else e=this.getter.call(t,t);return this.deep&&Ae(e),O(),this.cleanupDeps(),e},So.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},So.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},So.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():ke(this)},So.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||i(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){C(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},So.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},So.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},So.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||l(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var To=new Xi,Eo={enumerable:!0,configurable:!0,get:g,set:g},jo={lazy:!0},No={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed){(e.componentInstance=Je(e,bo,n,r)).$mount(t?e.elm:void 0,t)}else if(e.data.keepAlive){var i=e;No.prepatch(i,i)}},prepatch:function(e,t){var n=t.componentOptions;he(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,_e(n,"mounted")),e.data.keepAlive&&(t._isMounted?we(n):ge(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?ye(t,!0):t.$destroy())}},Lo=Object.keys(No),Io=1,Do=2,Mo=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=Mo++,t._isVue=!0,e&&e._isComponent?ct(t,e):t.$options=B(ut(t.constructor),e||{},t),t._renderProxy=t,t._self=t,de(t),ae(t),st(t),_e(t,"beforeCreate"),Be(t),Te(t),Fe(t),_e(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(pt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=N,e.prototype.$delete=L,e.prototype.$watch=function(e,t,n){var r=this;n=n||{},n.user=!0;var i=new So(r,e,t,n);return n.immediate&&t.call(r,i.value),function(){i.teardown()}}}(pt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,i=this;if(Array.isArray(e))for(var o=0,a=e.length;o<a;o++)r.$on(e[o],n);else(i._events[e]||(i._events[e]=[])).push(n),t.test(e)&&(i._hasHookEvent=!0);return i},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var i=0,o=e.length;i<o;i++)n.$off(e[i],t);return r}var a=r._events[e];if(!a)return r;if(1===arguments.length)return r._events[e]=null,r;for(var s,c=a.length;c--;)if((s=a[c])===t||s.fn===t){a.splice(c,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?v(n):n;for(var r=v(arguments,1),i=0,o=n.length;i<o;i++)n[i].apply(t,r)}return t}}(pt),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&_e(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=bo;bo=n,n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),bo=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_e(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||l(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_e(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$options._parentElm=e.$options._refElm=null}}}(pt),function(e){e.prototype.$nextTick=function(e){return ro(e,this)},e.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t.staticRenderFns,i=t._parentVnode;if(e._isMounted)for(var o in e.$slots)e.$slots[o]=W(e.$slots[o]);e.$scopedSlots=i&&i.data.scopedSlots||Ri,r&&!e._staticTrees&&(e._staticTrees=[]),e.$vnode=i;var a;try{a=n.call(e._renderProxy,e.$createElement)}catch(t){C(t,e,"render function"),a=e._vnode}return a instanceof ho||(a=yo()),a.parent=i,a},e.prototype._o=it,e.prototype._n=c,e.prototype._s=s,e.prototype._l=Qe,e.prototype._t=Xe,e.prototype._q=y,e.prototype._i=_,e.prototype._m=rt,e.prototype._f=et,e.prototype._k=tt,e.prototype._b=nt,e.prototype._v=K,e.prototype._e=yo,e.prototype._u=pe}(pt);var Po=[String,RegExp],Ro={name:"keep-alive",abstract:!0,props:{include:Po,exclude:Po},created:function(){this.cache=Object.create(null)},destroyed:function(){var e=this;for(var t in e.cache)xt(e.cache[t])},watch:{include:function(e){$t(this.cache,this._vnode,function(t){return bt(e,t)})},exclude:function(e){$t(this.cache,this._vnode,function(t){return!bt(e,t)})}},render:function(){var e=oe(this.$slots.default),t=e&&e.componentOptions;if(t){var n=_t(t);if(n&&(this.include&&!bt(this.include,n)||this.exclude&&bt(this.exclude,n)))return e;var r=null==e.key?t.Ctor.cid+(t.tag?"::"+t.tag:""):e.key;this.cache[r]?e.componentInstance=this.cache[r].componentInstance:this.cache[r]=e,e.data.keepAlive=!0}return e}},Fo={KeepAlive:Ro};!function(e){var t={};t.get=function(){return Pi},Object.defineProperty(e,"config",t),e.util={warn:Bi,extend:h,mergeOptions:B,defineReactive:j},e.set=N,e.delete=L,e.nextTick=ro,e.options=Object.create(null),Di.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,h(e.options.components,Fo),dt(e),vt(e),ht(e),yt(e)}(pt),Object.defineProperty(pt.prototype,"$isServer",{get:eo}),pt.version="2.3.0";var Bo,Ho,Uo,Vo,zo,Jo,Ko,qo,Wo,Zo=u("style,class"),Go=u("input,textarea,option,select"),Yo=function(e,t,n){return"value"===n&&Go(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Qo=u("contenteditable,draggable,spellcheck"),Xo=u("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),ea="http://www.w3.org/1999/xlink",ta=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},na=function(e){return ta(e)?e.slice(6,e.length):""},ra=function(e){return null==e||!1===e},ia={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},oa=u("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),aa=u("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),sa=function(e){return"pre"===e},ca=function(e){return oa(e)||aa(e)},ua=Object.create(null),la=Object.freeze({createElement:jt,createElementNS:Nt,createTextNode:Lt,createComment:It,insertBefore:Dt,removeChild:Mt,appendChild:Pt,parentNode:Rt,nextSibling:Ft,tagName:Bt,setTextContent:Ht,setAttribute:Ut}),fa={create:function(e,t){Vt(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Vt(e,!0),Vt(t))},destroy:function(e){Vt(e,!0)}},pa=new ho("",{},[]),da=["create","activate","update","remove","destroy"],va={create:qt,update:qt,destroy:function(e){qt(e,pa)}},ha=Object.create(null),ma=[fa,va],ga={create:Qt,update:Qt},ya={create:en,update:en},_a=/[\w).+\-_$\]]/,ba="__r",$a="__c",xa={create:Sn,update:Sn},wa={create:Tn,update:Tn},Ca=p(function(e){var t={};return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var n=e.split(/:(.+)/)
;n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),ka=/^--/,Aa=/\s*!important$/,Oa=function(e,t,n){if(ka.test(t))e.style.setProperty(t,n);else if(Aa.test(n))e.style.setProperty(t,n.replace(Aa,""),"important");else{var r=Ta(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Sa=["Webkit","Moz","ms"],Ta=p(function(e){if(Wo=Wo||document.createElement("div"),"filter"!==(e=Ti(e))&&e in Wo.style)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Sa.length;n++){var r=Sa[n]+t;if(r in Wo.style)return r}}),Ea={create:Mn,update:Mn},ja=p(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Na=Ui&&!Ji,La="transition",Ia="animation",Da="transition",Ma="transitionend",Pa="animation",Ra="animationend";Na&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Da="WebkitTransition",Ma="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Pa="WebkitAnimation",Ra="webkitAnimationEnd"));var Fa=Ui&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout,Ba=/\b(transform|all)(,|$)/,Ha=Ui?{create:Yn,activate:Yn,remove:function(e,t){!0!==e.data.show?Wn(e,t):t()}}:{},Ua=[ga,ya,xa,wa,Ea,Ha],Va=Ua.concat(ma),za=function(i){function o(e){return new ho(E.tagName(e).toLowerCase(),{},[],void 0,e)}function a(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}function s(e){var n=E.parentNode(e);t(n)&&E.removeChild(n,e)}function c(e,r,i,o,a){if(e.isRootInsert=!a,!l(e,r,i,o)){var s=e.data,c=e.children,u=e.tag;t(u)?(e.elm=e.ns?E.createElementNS(e.ns,u):E.createElement(u,e),g(e),v(e,c,r),t(s)&&m(e,r),d(i,e.elm,o)):n(e.isComment)?(e.elm=E.createComment(e.text),d(i,e.elm,o)):(e.elm=E.createTextNode(e.text),d(i,e.elm,o))}}function l(e,r,i,o){var a=e.data;if(t(a)){var s=t(e.componentInstance)&&a.keepAlive;if(t(a=a.hook)&&t(a=a.init)&&a(e,!1,i,o),t(e.componentInstance))return f(e,r),n(s)&&p(e,r,i,o),!0}}function f(e,n){t(e.data.pendingInsert)&&n.push.apply(n,e.data.pendingInsert),e.elm=e.componentInstance.$el,h(e)?(m(e,n),g(e)):(Vt(e),n.push(e))}function p(e,n,r,i){for(var o,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,t(o=a.data)&&t(o=o.transition)){for(o=0;o<S.activate.length;++o)S.activate[o](pa,a);n.push(a);break}d(r,e.elm,i)}function d(e,n,r){t(e)&&(t(r)?r.parentNode===e&&E.insertBefore(e,n,r):E.appendChild(e,n))}function v(e,t,n){if(Array.isArray(t))for(var i=0;i<t.length;++i)c(t[i],n,e.elm,null,!0);else r(e.text)&&E.appendChild(e.elm,E.createTextNode(e.text))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return t(e.tag)}function m(e,n){for(var r=0;r<S.create.length;++r)S.create[r](pa,e);A=e.data.hook,t(A)&&(t(A.create)&&A.create(pa,e),t(A.insert)&&n.push(e))}function g(e){for(var n,r=e;r;)t(n=r.context)&&t(n=n.$options._scopeId)&&E.setAttribute(e.elm,n,""),r=r.parent;t(n=bo)&&n!==e.context&&t(n=n.$options._scopeId)&&E.setAttribute(e.elm,n,"")}function y(e,t,n,r,i,o){for(;r<=i;++r)c(n[r],o,e,t)}function _(e){var n,r,i=e.data;if(t(i))for(t(n=i.hook)&&t(n=n.destroy)&&n(e),n=0;n<S.destroy.length;++n)S.destroy[n](e);if(t(n=e.children))for(r=0;r<e.children.length;++r)_(e.children[r])}function b(e,n,r,i){for(;r<=i;++r){var o=n[r];t(o)&&(t(o.tag)?($(o),_(o)):s(o.elm))}}function $(e,n){if(t(n)||t(e.data)){var r,i=S.remove.length+1;for(t(n)?n.listeners+=i:n=a(e.elm,i),t(r=e.componentInstance)&&t(r=r._vnode)&&t(r.data)&&$(r,n),r=0;r<S.remove.length;++r)S.remove[r](e,n);t(r=e.data.hook)&&t(r=r.remove)?r(e,n):n()}else s(e.elm)}function x(n,r,i,o,a){for(var s,u,l,f,p=0,d=0,v=r.length-1,h=r[0],m=r[v],g=i.length-1,_=i[0],$=i[g],x=!a;p<=v&&d<=g;)e(h)?h=r[++p]:e(m)?m=r[--v]:zt(h,_)?(w(h,_,o),h=r[++p],_=i[++d]):zt(m,$)?(w(m,$,o),m=r[--v],$=i[--g]):zt(h,$)?(w(h,$,o),x&&E.insertBefore(n,h.elm,E.nextSibling(m.elm)),h=r[++p],$=i[--g]):zt(m,_)?(w(m,_,o),x&&E.insertBefore(n,m.elm,h.elm),m=r[--v],_=i[++d]):(e(s)&&(s=Kt(r,p,v)),u=t(_.key)?s[_.key]:null,e(u)?(c(_,o,n,h.elm),_=i[++d]):(l=r[u],zt(l,_)?(w(l,_,o),r[u]=void 0,x&&E.insertBefore(n,_.elm,h.elm),_=i[++d]):(c(_,o,n,h.elm),_=i[++d])));p>v?(f=e(i[g+1])?null:i[g+1].elm,y(n,f,i,d,g,o)):d>g&&b(n,r,p,v)}function w(r,i,o,a){if(r!==i){if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))return i.elm=r.elm,void(i.componentInstance=r.componentInstance);var s,c=i.data;t(c)&&t(s=c.hook)&&t(s=s.prepatch)&&s(r,i);var u=i.elm=r.elm,l=r.children,f=i.children;if(t(c)&&h(i)){for(s=0;s<S.update.length;++s)S.update[s](r,i);t(s=c.hook)&&t(s=s.update)&&s(r,i)}e(i.text)?t(l)&&t(f)?l!==f&&x(u,l,f,o,a):t(f)?(t(r.text)&&E.setTextContent(u,""),y(u,null,f,0,f.length-1,o)):t(l)?b(u,l,0,l.length-1):t(r.text)&&E.setTextContent(u,""):r.text!==i.text&&E.setTextContent(u,i.text),t(c)&&t(s=c.hook)&&t(s=s.postpatch)&&s(r,i)}}function C(e,r,i){if(n(i)&&t(e.parent))e.parent.data.pendingInsert=r;else for(var o=0;o<r.length;++o)r[o].data.hook.insert(r[o])}function k(e,n,r){n.elm=e;var i=n.tag,o=n.data,a=n.children;if(t(o)&&(t(A=o.hook)&&t(A=A.init)&&A(n,!0),t(A=n.componentInstance)))return f(n,r),!0;if(t(i)){if(t(a))if(e.hasChildNodes()){for(var s=!0,c=e.firstChild,u=0;u<a.length;u++){if(!c||!k(c,a[u],r)){s=!1;break}c=c.nextSibling}if(!s||c)return!1}else v(n,a,r);if(t(o))for(var l in o)if(!j(l)){m(n,r);break}}else e.data!==n.text&&(e.data=n.text);return!0}var A,O,S={},T=i.modules,E=i.nodeOps;for(A=0;A<da.length;++A)for(S[da[A]]=[],O=0;O<T.length;++O)t(T[O][da[A]])&&S[da[A]].push(T[O][da[A]]);var j=u("attrs,style,class,staticClass,staticStyle,key");return function(r,i,a,s,u,l){if(e(i))return void(t(r)&&_(r));var f=!1,p=[];if(e(r))f=!0,c(i,p,u,l);else{var d=t(r.nodeType);if(!d&&zt(r,i))w(r,i,p,s);else{if(d){if(1===r.nodeType&&r.hasAttribute(Ii)&&(r.removeAttribute(Ii),a=!0),n(a)&&k(r,i,p))return C(i,p,!0),r;r=o(r)}var v=r.elm,m=E.parentNode(v);if(c(i,p,v._leaveCb?null:m,E.nextSibling(v)),t(i.parent)){for(var g=i.parent;g;)g.elm=i.elm,g=g.parent;if(h(i))for(var y=0;y<S.create.length;++y)S.create[y](pa,i.parent)}t(m)?b(m,[r],0,0):t(r.tag)&&_(r)}}return C(i,p,f),i.elm}}({nodeOps:la,modules:Va});Ji&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&rr(e,"input")});var Ja={inserted:function(e,t,n){if("select"===n.tag){var r=function(){Qn(e,t,n.context)};r(),(zi||Ki)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==e.type&&"password"!==e.type||(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("change",nr),qi||(e.addEventListener("compositionstart",tr),e.addEventListener("compositionend",nr)),Ji&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Qn(e,t,n.context);(e.multiple?t.value.some(function(t){return Xn(t,e.options)}):t.value!==t.oldValue&&Xn(t.value,e.options))&&rr(e,"change")}}},Ka={bind:function(e,t,n){var r=t.value;n=ir(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i&&!Ji?(n.data.show=!0,qn(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&(n=ir(n),n.data&&n.data.transition&&!Ji?(n.data.show=!0,r?qn(n,function(){e.style.display=e.__vOriginalDisplay}):Wn(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},qa={model:Ja,show:Ka},Wa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Za={name:"transition",props:Wa,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag}),n.length)){var i=this.mode,o=n[0];if(cr(this.$vnode))return o;var a=or(o);if(!a)return o;if(this._leaving)return sr(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?s+a.tag:r(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ar(this),u=this._vnode,l=or(u);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),l&&l.data&&!ur(a,l)){var f=l&&(l.data.transition=h({},c));if("out-in"===i)return this._leaving=!0,Y(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),sr(e,o);if("in-out"===i){var p,d=function(){p()};Y(c,"afterEnter",d),Y(c,"enterCancelled",d),Y(f,"delayLeave",function(e){p=e})}}return o}}},Ga=h({tag:String,moveClass:String},Wa);delete Ga.mode;var Ya={props:Ga,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=ar(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";if(e.length&&this.hasMove(e[0].elm,t)){e.forEach(lr),e.forEach(fr),e.forEach(pr);var n=document.body;n.offsetHeight;e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Hn(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ma,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ma,e),n._moveCb=null,Un(n,t))})}})}},methods:{hasMove:function(e,t){if(!Na)return!1;if(null!=this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){Rn(n,e)}),Pn(n,t),n.style.display="none",this.$el.appendChild(n);var r=zn(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Qa={Transition:Za,TransitionGroup:Ya};pt.config.mustUseProp=Yo,pt.config.isReservedTag=ca,pt.config.isReservedAttr=Zo,pt.config.getTagNamespace=St,pt.config.isUnknownElement=Tt,h(pt.options.directives,qa),h(pt.options.components,Qa),pt.prototype.__patch__=Ui?za:g,pt.prototype.$mount=function(e,t){return e=e&&Ui?Et(e):void 0,ve(this,e,t)},setTimeout(function(){Pi.devtools&&to&&to.emit("init",pt)},0);var Xa,es=!!Ui&&function(e,t){var n=document.createElement("div");return n.innerHTML='<div a="'+e+'">',n.innerHTML.indexOf(t)>0}("\n","&#10;"),ts=u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ns=u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),rs=u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),is=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],os=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+is.join("|")+"))?"),as="[a-zA-Z_][\\w\\-\\.]*",ss=new RegExp("^<((?:"+as+"\\:)?"+as+")"),cs=/^\s*(\/?)>/,us=new RegExp("^<\\/((?:"+as+"\\:)?"+as+")[^>]*>"),ls=/^<!DOCTYPE [^>]+>/i,fs=/^<!--/,ps=/^<!\[/,ds=!1;"x".replace(/x(.)?/g,function(e,t){ds=""===t});var vs,hs,ms,gs,ys,_s,bs,$s,xs,ws,Cs,ks,As,Os,Ss,Ts,Es,js,Ns=u("script,style,textarea",!0),Ls={},Is={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n"},Ds=/&(?:lt|gt|quot|amp);/g,Ms=/&(?:lt|gt|quot|amp|#10);/g,Ps=/\{\{((?:.|\n)+?)\}\}/g,Rs=p(function(e){var t=e[0].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&"),n=e[1].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),Fs=/^@|^v-on:/,Bs=/^v-|^@|^:/,Hs=/(.*?)\s+(?:in|of)\s+(.*)/,Us=/\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/,Vs=/:(.*)$/,zs=/^:|^v-bind:/,Js=/\.[^.]+/g,Ks=p(dr),qs=/^xmlns:NS\d+/,Ws=/^NS\d+:/,Zs=p(Rr),Gs=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Ys=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Qs={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Xs=function(e){return"if("+e+")return null;"},ec={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Xs("$event.target !== $event.currentTarget"),ctrl:Xs("!$event.ctrlKey"),shift:Xs("!$event.shiftKey"),alt:Xs("!$event.altKey"),meta:Xs("!$event.metaKey"),left:Xs("'button' in $event && $event.button !== 0"),middle:Xs("'button' in $event && $event.button !== 1"),right:Xs("'button' in $event && $event.button !== 2")},tc={bind:Wr,cloak:g},nc={staticKeys:["staticClass"],transformNode:_i,genData:bi},rc={staticKeys:["staticStyle"],transformNode:$i,genData:xi},ic=[nc,rc],oc={model:bn,text:wi,html:Ci},ac={expectHTML:!0,modules:ic,directives:oc,isPreTag:sa,isUnaryTag:ts,mustUseProp:Yo,canBeLeftOpenTag:ns,isReservedTag:ca,getTagNamespace:St,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ic)},sc=function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(r.warn=function(e,t){(t?o:i).push(e)},n){n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=h(Object.create(e.directives),n.directives));for(var a in n)"modules"!==a&&"directives"!==a&&(r[a]=n[a])}var s=gi(t,r);return s.errors=i,s.tips=o,s}function n(e,n,i){n=n||{};var o=n.delimiters?String(n.delimiters)+e:e;if(r[o])return r[o];var a=t(e,n),s={},c=[];s.render=yi(a.render,c);var u=a.staticRenderFns.length;s.staticRenderFns=new Array(u);for(var l=0;l<u;l++)s.staticRenderFns[l]=yi(a.staticRenderFns[l],c);return r[o]=s}var r=Object.create(null);return{compile:t,compileToFunctions:n}}(ac),cc=sc.compileToFunctions,uc=p(function(e){var t=Et(e);return t&&t.innerHTML}),lc=pt.prototype.$mount;return pt.prototype.$mount=function(e,t){if((e=e&&Et(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=uc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=ki(e));if(r){var i=cc(r,{shouldDecodeNewlines:es,delimiters:n.delimiters},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return lc.call(this,e,t)},pt.compile=cc,pt});
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title class="title">[文件管理器]</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<style type="text/css">
.content {background: transparent;}
.btn {position: relative;top: 0;left: 0;bottom: 0;right: 0;}
.btn .file {position: fixed;z-index: 93;left: 0;right: 0;top: 0;bottom: 0;width: 100%;opacity: 0;}
</style>
</head>
<body>
<div id="content" class="content">
<div class="btn">
<input :multiple="multiple" @change="onChange" :accept="accept" ref="file" class="file" type="file" />
</div>
</div>
<script type="text/javascript" src="js/vue.min.js"></script>
<script type="text/javascript">
let _this;
var vm = new Vue({
el: '#content',
data: {
accept: '',
multiple: true,
},
mounted() {
console.log('加载webview');
_this = this;
this.files = new Map();
document.addEventListener('plusready', (e)=>{
let {debug,instantly,prohibited} = plus.webview.currentWebview();
this.debug = debug;
this.instantly = instantly;
this.prohibited = prohibited;
this.accept = prohibited.accept;
if (prohibited.multiple === 'false') {
prohibited.multiple = false;
}
this.multiple = prohibited.multiple;
location.href = 'callback?retype=updateOption';
}, false);
},
methods: {
toast(msg) {
plus.nativeUI.toast(msg);
},
clear(name) {
if (!name) {
this.files.clear();
return;
}
this.files.delete(name);
},
setData(option='{}') {
this.debug&&console.log('更新参数:'+option);
try{
_this.option = JSON.parse(option);
}catch(e){
console.error('参数设置错误')
}
},
async upload(name=''){
if (name && this.files.has(name)) {
await this.createUpload(this.files.get(name));
}
else {
for (let item of this.files.values()) {
if (item.type === 'waiting' || item.type === 'fail') {
await this.createUpload(item);
}
}
}
},
onChange(e) {
let fileDom = this.$refs.file;
for (let file of fileDom.files) {
if (this.files.size >= this.prohibited.count) {
this.toast(`只允许上传${this.prohibited.count}个文件`);
fileDom.value = '';
break;
}
this.addFile(file);
}
this.uploadAfter();
fileDom.value = '';
},
addFile(file) {
if (file) {
let name = file.name;
this.debug&&console.log('文件名称',name,'大小',file.size);
// 限制文件格式
let suffix = name.substring(name.lastIndexOf(".")+1).toLowerCase();
let formats = this.prohibited.formats.toLowerCase();
if (formats&&!formats.includes(suffix)) {
this.toast(`不支持上传${suffix.toUpperCase()}格式文件`);
return;
}
// 限制文件大小
if (file.size > 1024 * 1024 * Math.abs(this.prohibited.size)) {
this.toast(`附件大小请勿超过${this.prohibited.size}M`)
return;
}
if (!this.prohibited.distinct) {
let homonymIndex = [...this.files.keys()].findLastIndex(item=>{
return (item.substring(0,item.lastIndexOf("("))||item.substring(0,item.lastIndexOf("."))) == name.substring(0,name.lastIndexOf(".")) &&
item.substring(item.lastIndexOf(".")+1).toLowerCase() === suffix;
})
if (homonymIndex > -1) {
name = `${name.substring(0,name.lastIndexOf("."))}(${homonymIndex+1}).${suffix}`;
}
}
// let itemBlob = new Blob([file]);
// let path = URL.createObjectURL(itemBlob);
let path = URL.createObjectURL(file);
this.files.set(name,{file,path,name: name,size: file.size,progress: 0,type: 'waiting'});
}
},
/**
* @returns {Map} 已选择的文件Map集
*/
callChange() {
location.href = 'callback?retype=change&files=' + escape(JSON.stringify([...this.files]));
},
/**
* @returns {object} 正在处理的当前对象
*/
changeFilesItem(item,end='') {
this.files.set(item.name,item);
location.href = 'callback?retype=progress&end='+ end +'&item=' + escape(JSON.stringify(item));
},
uploadAfter() {
this.callChange();
setTimeout(()=>{
this.instantly&&this.upload();
},1000)
},
createUpload(item) {
this.debug&&console.log('准备上传,option=:'+JSON.stringify(this.option));
item.type = 'loading';
delete item.responseText;
return new Promise((resolve,reject)=>{
let {url,name,method='POST',header={},formData={}} = this.option;
let form = new FormData();
for (let keys in formData) {
form.append(keys, formData[keys])
}
form.append(name, item.file);
let xmlRequest = new XMLHttpRequest();
xmlRequest.open(method, url, true);
for (let keys in header) {
xmlRequest.setRequestHeader(keys, header[keys])
}
xmlRequest.upload.addEventListener(
'progress',
event => {
if (event.lengthComputable) {
let progress = Math.ceil((event.loaded * 100) / event.total)
if (progress <= 100) {
item.progress = progress;
this.changeFilesItem(item);
}
}
},
false
);
xmlRequest.ontimeout = () => {
console.error('请求超时')
item.type = 'fail';
this.changeFilesItem(item,true);
return resolve(false);
}
xmlRequest.onreadystatechange = ev => {
if (xmlRequest.readyState == 4) {
this.debug && console.log('接口是否支持跨域',xmlRequest.withCredentials);
if (xmlRequest.status == 200) {
this.debug && console.log('上传完成:' + xmlRequest.responseText)
item['responseText'] = xmlRequest.responseText;
item.type = 'success';
this.changeFilesItem(item,true);
return resolve(true);
} else if (xmlRequest.status == 0) {
console.error('status = 0 :请检查请求头Content-Type与服务端是否匹配,服务端已正确开启跨域,并且nginx未拦截阻止请求')
}
console.error('--ERROR--:status = ' + xmlRequest.status)
item.type = 'fail';
this.changeFilesItem(item,true);
return resolve(false);
}
}
xmlRequest.send(form)
});
}
}
});
</script>
</body>
</html>
{
"id": "lsj-upload",
"displayName": "全文件上传选择非原生2.0版",
"version": "2.3.1",
"description": "文件选择上传-支持APP-H5网页-微信小程序",
"keywords": [
"附件",
"file",
"upload",
"上传",
"文件管理器"
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.9"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "相机/相册读取"
},
"npmurl": "",
"type": "component-vue"
},
"uni_modules": {
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
\ No newline at end of file
# lsj-upload
### 插件地址:https://ext.dcloud.net.cn/plugin?id=5459
### 不清楚使用方式可点击右侧导入示例项目运行完整示例
### 此次更新2.0与1.0使用方式略有差异,已使用1.0的同学自行斟酌是否更新到2.0版本!!!
使用插件有任何问题欢迎加入QQ讨论群:
### 插件交流群4:413918560
------
- 以下群如无空位会被拒绝
- 群3:667530868(已满)
- 群2:469580165(已满)
- 群1:701468256(已满)
若能帮到你请高抬贵手点亮5颗星~
------
## 重要提示
### 组件如果在scroll-view内使用需要自己监听scroll事件,并在滚动结束的时候调用一次show(查看下方scroll示例)!!
### 控件的height、width应与slot自定义内容宽高度保持一致。
### nvue窗口只能使用固定模式position=absolute 。
### show() 当DOM重排后在this.$nextTick内调用show(),控件定位会更加准确。
### hide() APP端webview层级比view高,如不希望触发点击时,应调用hide隐藏控件,反之调用show。
### APP端请优先联调Android,上传成功后再运行iOS端。
### 若iOS端跨域服务端同学实在配置不好,可把hybrid下html目录放到服务器去,同源则不存在跨域问题。
### 小程序端因hybrid不能使用本地HTML,所以插件提供的是从微信消息列表拉取文件并选择,请知悉。
### 关于很多问file对象打印出来是{}的问题,你可以打印file.name和file.size。
### 因为跨浏览器,file不能完整返回到vue,返回的path是个blobURL,仅供用于图片类文件回显,插件已内置好上传函数,调用上传会自动提交待上传文件,若非要自己拿path去搞上传那你自己处理。
### 不要再问关于返回的path怎么上传失败的问题,path只供用于image标签src属性回显图片,上传文件请使用组件内置上传函数。
------
## 上传报status:0 问题排查
### App如果上传报status: 0,调试方法:关闭manifest.json>h5的代理(若有配置代理),并运行项目至Chrome浏览器,按F12查看接口详细报错信息(重点:是Chrome,不是HX内置浏览器)
### Android端不存在跨域问题,如上传报status: 0时
#### 1、如果能进入接口,但收不到任何参数,检查是否在option>header里传入了Content-Type属性(默认不需要传,会自动匹配,若接口要求必须传则需要与接口匹配)
#### 2、如果未能进入接口,检查nginx网关配置,不清楚可加群查看群相册资料。
### iOS端若出现status:0,排除上面两个问题后只会是跨域问题
#### 1、后端处理允许上传接口跨域。(前端无需修改)
#### 2、若后端不放开跨域,可将hybrid>html文件夹放入与接口同源的服务器,同源访问则不存在跨域问题。(可加群查看群相册资料)
------
## 使用说明
| 属性 | 是否必填 | 值类型 | 默认值 | 说明 |
| --------- | -------- | -----: | --: | :------------ |
| width | 否 | String |100% | 容器宽度(App必填且与slot内容宽度一致) |
| height | 是 | String |80rpx | 容器高度(App必填且与slot内容高度一致) |
| debug | 否 | Boolean |false | 打印调试日志 |
| option | 是 | Object |- | [文件上传接口相关参数](#p1)|
| instantly | 否 | Boolean |false | 选择文件后是否自动触发上传|
| distinct | 否 | Boolean |false | 【2.3.0新增】是否去重同名文件(去重时后选择的文件覆盖前面的同名文件)|
| count | 否 | Number |10 | 文件选择上限(个)|
| size | 否 | Number |10 | 文件大小上限(M) |
| multiple | 否 | Boolean |true | 是否允许多选 |
| wxFileType| 否 | String |all | 微信小程序文件选择器格式限制(all=从所有文件选择,video=只能选择视频文件,image=只能选择图片文件,file=可以选择除了图片和视频之外的其它的文件)|
| accept | 否 | String |- | 文件选择器input file格式限制(有效值自行百度查accept)|
| formats | 否 | String |- | 限制允许上传的格式,空串=不限制,默认为空,多个格式以逗号隔开,例如png,jpg,pdf|
| childId | 否 | String |lsjUpload| 控件的id(仅APP有效,webview透明层Id)|
| position | 否 | String |static | 控件的定位模式(static=控件随页面滚动;absolute=控件在页面中绝对定位,不随窗口内容滚动)|
| top,left,right,bottom | 否 | [Number,String] |0 | 设置控件绝对位置,position=absolute时有效|
| @change | 否 | Function |Map | 选择文件后触发,返回所有已选择文件Map集合|
| @progress | 否 | Function |Object | 上传中持续触发,返回正在上传的文件对象,可通过set更新至页面显示上传进度|
| @uploadEnd| 否 | Function |Object | 上传结束回调,返回当前上传的文件对象,type等于success(上传成功)返回responseText属性(服务端返回数据)|
## 【2.3.0】新增uni.$emit事件监听
| 方法名 | 说明 |
|---- | ---- |
| $upload-show | 调用当前页面所有上传组件的show() |
| $upload-hide | 调用当前页面所有上传组件的hide() |
使用示例
``` javascript
this.$nextTick(()=>{
// 更新当前页所有上传组件在页面中的位置
uni.$emit('$upload-show',{});
})
```
## $Refs
|作用 | 方法名| 传入参数| 说明|
|---- | --------- | -------- | :--: |
|显示和定位控件点击层| show|-| 控件显示状态下可触发点击|
|隐藏控件点击层| hide|-| 控件隐藏状态下不触发点击|
|动态设置文件列表| setFiles|[Array,Map] files| 传入格式请与组件选择返回格式保持一致,且name为必须属性,可查看下方演示|
|动态更新参数| setData|[String] name,[any] value| name支持a.b 和 a[b],可查看下方演示|
|移除选择的文件| clear|[String] name| 不传参数清空所有文件,传入文件name时删除该name的文件|
|手动上传| upload|[String] name| 不传参数默认依次上传所有type=waiting的文件,传入文件name时不关心type是否为waiting,单独上传指定name的文件|
## <a id="p1">option说明</a>
|参数 | 是否必填 | 说明|
|---- | ---- | :--: |
|url | 是 | 上传接口地址|
|name| 否 |上传接口文件key,默认为file|
|header| 否 |上传接口请求头|
|formData| 否 |上传接口额外参数|
## progress返回对象字段说明
|字段 | 说明|
|---- | :--: |
|file | 文件对象|
|name |文件名称|
|size |文件大小|
|path |用于image标签src属性回显图片|
|type |文件上传状态:waiting(等待上传)、loading(上传中)、success(成功) 、fail(失败)|
|responseText|上传成功后服务端返回数据(仅type为success时存在)|
## 以下演示为vue窗口使用方式,nvue使用区别是必须传入控件绝对位置如top,bottom,left,right,且position只能为absolute,如不清楚可点击右侧导入示例项目有详细演示代码。
### vue:
``` javascript
<lsj-upload
ref="lsjUpload"
childId="upload1"
:width="width"
:height="height"
:option="option"
:size="size"
:formats="formats"
:debug="debug"
:instantly="instantly"
:distinct="distinct"
@uploadEnd="onuploadEnd"
@progress="onprogre"
@change="change">
<view class="btn" :style="{width: width,height: height}">选择附件</view>
</lsj-upload>
<view class="padding">
<view>已选择文件列表:</view>
<view>
提示:【请使用组件内置上传方法,返回path仅供用于图片视频类文件回显,他用自行处理】
</view>
<!-- #ifndef MP-WEIXIN -->
<view v-for="(item,index) in files.values()" :key="index">
<image style="width: 100rpx;height: 100rpx;" :src="item.path" mode="widthFix"></image>
<text>blob{{item.path}}</text>
<text>{{item.name}}</text>
<text style="margin-left: 10rpx;">大小:{{item.size}}</text>
<text style="margin-left: 10rpx;">状态:{{item.type}}</text>
<text style="margin-left: 10rpx;">进度:{{item.progress}}</text>
<text style="margin-left: 10rpx;" v-if="item.responseText">服务端返回演示:{{item.responseText}}</text>
<text @click="resetUpload(item.name)" v-if="item.type=='fail'" style="margin-left: 10rpx;padding: 0 10rpx;border: 1rpx solid #007AFF;">重新上传</text>
<text @click="clear(item.name)" style="margin-left: 10rpx;padding: 0 10rpx;border: 1rpx solid #007AFF;">删除</text>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view v-for="(item,index) in wxFiles" :key="index">
<text>{{item.name}}</text>
<text style="margin-left: 10rpx;">大小:{{item.size}}</text>
<text style="margin-left: 10rpx;">状态:{{item.type}}</text>
<text style="margin-left: 10rpx;">进度:{{item.progress}}</text>
<view>
<button @click="resetUpload(item.name)">重新上传</button>
<button @click="clear(item.name)">删除</button>
</view>
</view>
<!-- #endif -->
</view>
```
---
* 函数说明
``` javascript
export default {
data() {
return {
// 上传接口参数
option: {
// 上传服务器地址,需要替换为你的接口地址
url: 'http://hl.jw.com/dropbox/document/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
// 上传附件的key
name: 'file',
// 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
header: {
// 示例参数可删除
'Authorization': 'bearer aa',
'uid': '27',
'accountid': '27'
},
// 根据你接口需求自定义body参数
formData: {
// 'orderId': 1000
}
},
// 选择文件后是否立即自动上传,true=选择后立即上传
instantly: true,
// 选择文件是否去重
distinct: false,
// 必传宽高且宽高应与slot宽高保持一致
width: '180rpx',
height: '180rpx',
// 限制允许上传的格式,空串=不限制,默认为空
formats: '',
// 文件上传大小限制
size: 30,
// 文件数量限制
count: 2,
// 是否多选
multiple: true,
// 文件回显列表
files: new Map(),
// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
wxFiles: [],
// 是否打印日志
debug: true,
// 演示用
tabIndex: 0,
list:[],
}
},
onReady() {
setTimeout(()=>{
console.log('----演示动态更新参数-----');
this.$refs['lsjUpload'+this.tabIndex].setData('formData.orderId','动态设置的参数');
console.log('以下注释内容为-动态更新参数更多演示,放开后可查看演示效果');
// 修改option对象的name属性
// this.$refs.lsjUpload.setData('name','myFile');
// 修改option对象的formData内的属性
// this.$refs.lsjUpload.setData('formData.appid','1111');
// 替换option对象的formData
// this.$refs.lsjUpload.setData('formData',{appid:'222'});
// option对象的formData新增属性
// this.$refs.lsjUpload.setData('formData.newkey','新插入到formData的属性');
// ---------演示初始化值,用于已提交后再次编辑时需带入已上传文件-------
// 方式1=传入数组
// let files1 = [{name: '1.png'},{name: '2.png',}];
// 方式2=传入Map对象
// let files2 = new Map();
// files2.set('1.png',{name: '1.png'})
// 此处调用setFiles设置初始files
// this.$refs.lsjUpload.setFiles(files1);
// 初始化tab
this.onTab(0);
},2000)
},
methods: {
// 某文件上传结束回调(成功失败都回调)
onuploadEnd(item) {
console.log(`${item.name}已上传结束,上传状态=${item.type}`);
// 更新当前窗口状态变化的文件
this.files.set(item.name,item);
// ---可删除--演示上传完成后取服务端数据
if (item['responseText']) {
console.log('演示服务器返回的字符串JSON转Object对象');
this.files.get(item.name).responseText = JSON.parse(item.responseText);
}
// 微信小程序Map对象for循环不显示,所以转成普通数组,
// 如果你用不惯Map对象,也可以像这样转普通数组,组件使用Map主要是避免反复文件去重操作
// #ifdef MP-WEIXIN
this.wxFiles = [...this.files.values()];
// #endif
// 强制更新视图
this.$forceUpdate();
// ---可删除--演示判断是否所有文件均已上传成功
let isAll = [...this.files.values()].find(item=>item.type!=='success');
if (!isAll) {
console.log('已全部上传完毕');
}
else {
console.log(isAll.name+'待上传');
}
},
// 上传进度回调,md文档显示不出事件名称onprogress,如复制自行加上就行
onprogress(item) {
// 更新当前状态变化的文件
this.files.set(item.name,item);
console.log('打印对象',JSON.stringify(this.files.get(item.name)));
// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
// #ifdef MP-WEIXIN
this.wxFiles = [...this.files.values()];
// #endif
// 强制更新视图
this.$forceUpdate();
},
// 文件选择回调
onChange(files) {
console.log('当前选择的文件列表:',JSON.stringify([...files.values()]));
// 更新选择的文件
this.files = files;
// 强制更新视图
this.$forceUpdate();
// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
// #ifdef MP-WEIXIN
this.wxFiles = [...this.files.values()];
// #endif
// ---可删除--演示重新定位覆盖层控件
this.$nextTick(()=>{
console.log('演示重新定位 (提示:像示例里文件列表在按钮上方时就需要插入文件后更新webview位置)');
// 直接更新当前页面所有上传组件webview位置
uni.$emit('$upload-show',{});
// 也可以通过以下方式指定更新ref对应组件位置
// this.$refs.lsjUpload0.show();
// this.$refs.lsjUpload1.show();
// this.$refs.lsjUpload2.show();
});
},
// 手动上传
upload() {
// name=指定文件名,不指定则上传所有type等于waiting和fail的文件
this.$refs['lsjUpload'+this.tabIndex].upload();
},
// 指定上传某个文件
resetUpload(name) {
this.$refs['lsjUpload'+this.tabIndex].upload(name);
},
// 移除某个文件
clear(name) {
// name=指定文件名,不传name默认移除所有文件
this.$refs['lsjUpload'+this.tabIndex].clear(name);
},
// ---可删除--演示在scroll中,scroll滚动后重新定位webview
onscroll() {
// #ifdef APP
if (this.scrollTime) {
clearTimeout(this.scrollTime);
}
this.scrollTime = setTimeout(()=> {
console.log('scroll结束调用show()');
this.$refs.lsjUpload1.show();
},500)
// #endif
},
/**
* ---可删除--演示在组件上方添加新内容DOM变化
*/
add() {
this.list.push('DOM重排测试');
// #ifdef APP
this.$nextTick(()=>{
// 更新当前页所有上传组件在页面中的位置
uni.$emit('$upload-show',{});
})
// #endif
},
/**
* ---可删除--演示Tab切换时覆盖层是否能被点击
* APP端因为是webview,层级比view高,此时若不希望点击触发选择文件,需要手动调用hide()
* 手动调用hide后,需要调用show()才能恢复覆盖层的点击
*/
onTab(tabIndex) {
// 隐藏所有的控件(透明层)
uni.$emit('$upload-hide',{});
this.tabIndex = tabIndex;
// 显示允许点击的控件(透明层)
this.$nextTick(()=>{
this.$refs['lsjUpload'+this.tabIndex].show();
})
}
}
}
```
## 温馨提示
* 文件上传
0. 如说明表达还不够清楚,不清楚怎么使用可导入完整示例项目运行体验和查看
1. APP端请优先联调Android,上传成功后再运行iOS端,如iOS返回status=0则需要后端开启允许跨域;
2. header的Content-Type类型需要与服务端要求一致,否则收不到附件(服务端若没有明文规定则不写,使用默认匹配)
3. 服务端不清楚怎么配置跨域可加群咨询,具体百度~
4. 欢迎加入QQ讨论群:
### 插件交流群4:413918560
------
- 以下群如无空位会被拒绝
- 群3:667530868(已满)
- 群2:469580165(已满)
- 群1:701468256(已满)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment