1.0.12 • Published 3 years ago

crystal-upload v1.0.12

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

crystal-upload

crystal upload plugin

Build Setup

# install dependencies
npm install

# in main.js
import CrystalUpload from 'crystal-upload'
Vue.use(CrystalUpload)

# in components
<template>
  <crystal-upload base-url="https://pathhub-test.histomed.com/v1/crystal..." :needLocal="true" @getGlobalId="getGlobalId"></crystal-upload>
</template>
# config.js里process.env.ACCESS_ID  系统的标识 SMART_PATH for smartpath ...
# token为当前系统登录获取的token存在本地存储里 
# getGlobalId 方法会获取当前上传的切片的globalId的集合
# needLocal 这个参数 在上传目的是本地服务的时候传true  其他(比如OSS)可以传false 或者不传
<script>
  export default {
    name: 'Component',
    created() {
      window.localStorage.setItem('access-id', process.env.ACCESS_ID)
      window.localStorage.setItem('crystal-token', token)
    },
    methods: {
      getGlobalId(val) {
        console.log(val)
      }
    }
  }
</script>

For detailed explanation on how things work, consult the docs for vue-loader.

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago