@fengzhongwen/kukan-ui 1.0.3 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# KukanUI
|
|
2
|
+
|
|
3
|
+
## 简介
|
|
4
|
+
|
|
5
|
+
KukanUI 是酷看前端团队开发的 UI 组件库。
|
|
6
|
+
|
|
7
|
+
## 当前版本
|
|
8
|
+
|
|
9
|
+
初始版本(v1.0.0)仅支持**上传组件**。
|
|
10
|
+
|
|
11
|
+
## 环境要求
|
|
12
|
+
|
|
13
|
+
- Vue 2.x
|
|
14
|
+
- Element-ui
|
|
15
|
+
- Axios
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @fengzhongwen/kukan-ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 使用
|
|
24
|
+
|
|
25
|
+
### 基本配置
|
|
26
|
+
|
|
27
|
+
使用 `Vue.use()` 注册组件库时,需要传入 axios 实例:
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
import Vue from 'vue'
|
|
31
|
+
import KukanUI from 'kukanui'
|
|
32
|
+
import axios from 'axios'
|
|
33
|
+
|
|
34
|
+
Vue.use(KukanUI, {
|
|
35
|
+
axios: axios
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 上传组件
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<template>
|
|
43
|
+
<kukan-upload />
|
|
44
|
+
</template>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 后续规划
|
|
48
|
+
|
|
49
|
+
- 优化使用体验
|
|
50
|
+
- 扩展更多组件
|
package/dist/kukan-ui.common.js
CHANGED
|
@@ -897,7 +897,7 @@ if (typeof window !== 'undefined') {
|
|
|
897
897
|
// import request from "@/utils/request";
|
|
898
898
|
|
|
899
899
|
|
|
900
|
-
|
|
900
|
+
let request = null
|
|
901
901
|
|
|
902
902
|
// 将vue.use传入的axios实例赋值给request
|
|
903
903
|
function setAxiosInstance(axiosInstance) {
|
|
@@ -1000,7 +1000,7 @@ function addNewFileOfSubTitle(data) {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1003
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1285e454-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/index.vue?vue&type=template&id=7baa51e4&scoped=true
|
|
1004
1004
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"upload-multiple"},[_c('input',{ref:"multiplePloadInput",staticStyle:{"display":"none"},attrs:{"type":"file","multiple":_vm.multiple},on:{"change":_vm.handleSelectedMultipleFiles}}),_c('div',{staticClass:"upload-multiple-box"},[_c('div',{ref:"upLoded_box",staticClass:"multiple_upload_area",class:_vm.multipleUploadAreaClass(),on:{"click":_vm.reviewUploadMultipleFiles,"dragover":function($event){$event.preventDefault();return _vm.onDragOver($event)},"dragleave":function($event){$event.preventDefault();return _vm.onDragLeave($event)},"drop":function($event){$event.preventDefault();return _vm.onDrop($event)}}},[(_vm.isUploading)?_c('div',{staticClass:"upload-loading-mask",style:(_vm.setUploadingLoadingMaskStyle())}):_vm._e(),(_vm.showIconTip)?_c('div',[_c('i',{staticClass:"el-icon-upload"})]):_vm._e(),_c('div',[_vm._v(_vm._s(_vm.startButtonText))]),_vm._t("tips")],2),(_vm.pictureConfig.show && _vm.showSuccessPicture)?_c('div',{staticClass:"upload-multiple-box-right"},[_c('div',{staticClass:"upload-multiple-box-close",on:{"click":function($event){$event.stopPropagation();return _vm.clearPicture($event)}}},[_c('i',{staticClass:"el-icon-close"})]),_c('img',{attrs:{"src":_vm.pictureConfig.url,"alt":_vm.pictureConfig.altText}})]):_vm._e()]),(_vm.model === 'info')?_c('el-button',{staticClass:"upload_button",attrs:{"type":"primary","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.startUploadMultipleFiles}},[_vm._v(" 全部文件开始上传 ")]):_vm._e(),(_vm.model === 'info')?_c('div',{staticClass:"multiple_upload_list"},[_c('span',{staticClass:"tip_title"},[_c('span',{staticClass:"title"},[_c('div',[_vm._v("文件列表")]),_c('transition',{attrs:{"name":"totalProgress","mode":"out-in"}},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"total_progress"},[_c('div',{staticClass:"logo"}),_c('span',[_vm._v("总进度:")]),(_vm.fileConfig.uploadController)?_c('div',[_c('el-tag',{attrs:{"size":"mini","type":_vm.isDanger}},[_vm._v("上传错误:"+_vm._s(_vm.fileConfig.skipError_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("上传成功:"+_vm._s(_vm.fileConfig.completed_num))]),_c('el-tag',{attrs:{"size":"mini","type":""}},[_vm._v("文件总数:"+_vm._s(_vm.fileConfig.filetotal_num))])],1):_vm._e()]):_vm._e()])],1),_c('span',[_c('el-button',{attrs:{"size":"mini","type":"","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.handleSelectAllFile}},[_vm._v("全选所有文件")]),_c('el-button',{attrs:{"size":"mini","type":"danger","disabled":_vm.isUploading || _vm.needUploadFilesArr.length === 0},on:{"click":_vm.delteSelectedFile}},[_vm._v("移除所选文件")])],1)]),_c('div',{staticClass:"selected_list_area"},[(_vm.needUploadFilesArr.length > 0)?_c('div',{staticClass:"selected_list"},_vm._l((_vm.needUploadFilesArr),function(item,index){return _c('Card_2',{key:index,attrs:{"index":index,"file-config":item},on:{"cancelFileUpload":_vm.cancelFileUpload,"resetFileUpload":_vm.resetFileUpload,"handleClickOnlyFile":_vm.handleClickOnlyFile}})}),1):_vm._e()])]):_vm._e()],1)}
|
|
1005
1005
|
var staticRenderFns = []
|
|
1006
1006
|
|
|
@@ -1062,7 +1062,7 @@ const fileTypeValidators = {
|
|
|
1062
1062
|
// return /^(presentation))|text\/(plain|html|csv|xml|css|javascript|markdown))$/i.test(mime);
|
|
1063
1063
|
},
|
|
1064
1064
|
};
|
|
1065
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
1065
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1285e454-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/FileUpload/components/UploadCard_Ver_Second/index.vue?vue&type=template&id=0db1699c&scoped=true
|
|
1066
1066
|
var UploadCard_Ver_Secondvue_type_template_id_0db1699c_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{key:_vm.fileConfig.name + '_' + _vm.index,staticClass:"only_file_area",class:{
|
|
1067
1067
|
only_file_area_isActive: _vm.fileConfig.isSelected,
|
|
1068
1068
|
'fade-in-element': true,
|