shijiplus-web-plugin 0.1.43 → 0.1.45
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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<Tag
|
|
3
3
|
ref="plusTagRef"
|
|
4
4
|
:style="`--alpha-color:${alphaColor}`"
|
|
5
|
-
class="plus-new-tag"
|
|
5
|
+
:class="`plus-new-tag ${textColor ? 'text-color' : ''}`"
|
|
6
6
|
:type="type"
|
|
7
7
|
:color="color"
|
|
8
8
|
>
|
|
@@ -19,6 +19,10 @@ export default {
|
|
|
19
19
|
color: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: 'default'
|
|
22
|
+
},
|
|
23
|
+
textColor: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
watch: {
|
|
@@ -37,6 +41,17 @@ export default {
|
|
|
37
41
|
})
|
|
38
42
|
},
|
|
39
43
|
immediate: true
|
|
44
|
+
},
|
|
45
|
+
textColor: {
|
|
46
|
+
handler(nVal) {
|
|
47
|
+
this.$nextTick(() => {
|
|
48
|
+
this.$refs.plusTagRef.$el.style.setProperty(
|
|
49
|
+
'--text-color',
|
|
50
|
+
nVal || '#FFFFFF'
|
|
51
|
+
)
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
immediate: true
|
|
40
55
|
}
|
|
41
56
|
},
|
|
42
57
|
data() {
|
|
@@ -68,8 +83,21 @@ export default {
|
|
|
68
83
|
<style lang="less" scoped>
|
|
69
84
|
.plus-new-tag {
|
|
70
85
|
--alpha-color: '#FFFFFF';
|
|
86
|
+
--text-color: '#FFFFFF'
|
|
87
|
+
--line-height: 24px;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
height: var(--line-height);
|
|
90
|
+
line-height: var(--line-height);
|
|
91
|
+
margin: 0;
|
|
92
|
+
margin-right: 4px;
|
|
93
|
+
&:last-child {
|
|
94
|
+
margin-right: 0;
|
|
95
|
+
}
|
|
71
96
|
&.ivu-tag-border {
|
|
72
97
|
background-color: var(--alpha-color) !important;
|
|
73
98
|
}
|
|
99
|
+
&.text-color .ivu-tag-text{
|
|
100
|
+
color: var(--text-color) !important;
|
|
101
|
+
}
|
|
74
102
|
}
|
|
75
103
|
</style>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:on-success="handleSuccess"
|
|
8
8
|
:format="format"
|
|
9
9
|
:accept="accept"
|
|
10
|
-
:headers="
|
|
10
|
+
:headers="uploadHeaders"
|
|
11
11
|
:max-size="fileMaxSize"
|
|
12
12
|
:sizeUnit="sizeUnit"
|
|
13
13
|
:sizeUnitStr="sizeUnitStr"
|
|
@@ -22,12 +22,6 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
<script>
|
|
25
|
-
import config from '@/config'
|
|
26
|
-
import store from '@/store'
|
|
27
|
-
const baseUrl = config.plusApiV5Domain()
|
|
28
|
-
let authHeader = {}
|
|
29
|
-
authHeader[config.tokenHeaderName] = store.state.user.token
|
|
30
|
-
authHeader['app_name'] = 'op'
|
|
31
25
|
export default {
|
|
32
26
|
name: 'UploadFileInput',
|
|
33
27
|
props: {
|
|
@@ -61,12 +55,15 @@ export default {
|
|
|
61
55
|
},
|
|
62
56
|
sizeUnitStr: {
|
|
63
57
|
default: 'MB'
|
|
58
|
+
},
|
|
59
|
+
headers: {
|
|
60
|
+
default() {
|
|
61
|
+
return {}
|
|
62
|
+
}
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
65
|
data() {
|
|
67
66
|
return {
|
|
68
|
-
headers: authHeader,
|
|
69
|
-
baseUrl,
|
|
70
67
|
imgName: '',
|
|
71
68
|
visible: false,
|
|
72
69
|
remainderCount: this.maxUploadFiles,
|
|
@@ -75,8 +72,21 @@ export default {
|
|
|
75
72
|
}
|
|
76
73
|
},
|
|
77
74
|
computed: {
|
|
75
|
+
baseUrl() {
|
|
76
|
+
return this.$config.uploadDomain()
|
|
77
|
+
},
|
|
78
78
|
fileMaxSize() {
|
|
79
79
|
return this.maxSize * this.sizeUnit
|
|
80
|
+
},
|
|
81
|
+
uploadHeaders() {
|
|
82
|
+
let authHeader = {}
|
|
83
|
+
authHeader[this.$config.tokenHeaderName] = this.$store.state.user.token
|
|
84
|
+
authHeader['token'] = this.$store.state.user.token
|
|
85
|
+
authHeader['app_name'] = this.$config.appName
|
|
86
|
+
return {
|
|
87
|
+
...authHeader,
|
|
88
|
+
...this.headers
|
|
89
|
+
}
|
|
80
90
|
}
|
|
81
91
|
},
|
|
82
92
|
watch: {
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import PlusComp from './components/plus-comp'
|
|
|
7
7
|
import BeginEndDatePicker from './components/begin-end-date-picker'
|
|
8
8
|
import UploadFileSingle from './components/upload-file/upload-file-single'
|
|
9
9
|
import UploadFile from './components/upload-file/upload-file'
|
|
10
|
-
|
|
10
|
+
import UploadFileInput from './components/upload-file/upload-file-input'
|
|
11
11
|
|
|
12
12
|
console.log('--------web-tool---index.js----------')
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
vue.component('BeginEndDatePicker', BeginEndDatePicker)
|
|
25
25
|
vue.component('UploadFileSingle', UploadFileSingle)
|
|
26
26
|
vue.component('UploadFile', UploadFile)
|
|
27
|
-
|
|
27
|
+
vue.component('UploadFileInput', UploadFileInput)
|
|
28
28
|
/**
|
|
29
29
|
* 注册指令
|
|
30
30
|
*/
|