n20-common-lib 2.2.40 → 2.2.41
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
|
@@ -19,6 +19,7 @@ import { debounce } from 'throttle-debounce'
|
|
|
19
19
|
import { addListener, removeListener } from 'resize-detector'
|
|
20
20
|
|
|
21
21
|
import AnchorSidebar from './sidebar.vue'
|
|
22
|
+
console.log(AnchorSidebar, 124)
|
|
22
23
|
export default {
|
|
23
24
|
name: 'Anchor',
|
|
24
25
|
components: {
|
|
@@ -91,14 +92,15 @@ export default {
|
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
|
-
itemWatch(type, id, title) {
|
|
95
|
+
itemWatch(type, id, title, slotT) {
|
|
95
96
|
if (type === 'mount') {
|
|
96
97
|
let item = this.navList.find((c) => c.id === id)
|
|
97
98
|
if (!item) {
|
|
98
|
-
item = { id: id, title: title, height: 48 }
|
|
99
|
+
item = { id: id, title: title, slotT: slotT, height: 48 }
|
|
99
100
|
this.navList.push(item)
|
|
100
101
|
} else {
|
|
101
102
|
item.title = title
|
|
103
|
+
item.slotT = slotT
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
let dom = this.$refs['anchor-content'].querySelector(`[anchor-item-id="${id}"]`)
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="p-t-m">
|
|
3
|
-
<div
|
|
4
|
-
v-for="item in navList"
|
|
5
|
-
:key="item.id"
|
|
6
|
-
class="n20-anchor2-nav"
|
|
7
|
-
:class="{ 'n20-anchor2-nav-activit': item.id === activit }"
|
|
8
|
-
@click="$emit('click', item)"
|
|
9
|
-
>
|
|
10
|
-
{{ item.title }}
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
1
|
<script>
|
|
16
2
|
export default {
|
|
17
3
|
props: {
|
|
@@ -23,6 +9,32 @@ export default {
|
|
|
23
9
|
type: [String, Number],
|
|
24
10
|
default: undefined
|
|
25
11
|
}
|
|
12
|
+
},
|
|
13
|
+
render() {
|
|
14
|
+
let _vm = this
|
|
15
|
+
let { navList, activit, _c, _l, _v, _s } = _vm
|
|
16
|
+
|
|
17
|
+
return _c(
|
|
18
|
+
'div',
|
|
19
|
+
{ staticClass: 'p-t-m' },
|
|
20
|
+
_l(navList, function (item) {
|
|
21
|
+
return _c(
|
|
22
|
+
'div',
|
|
23
|
+
{
|
|
24
|
+
key: item.id,
|
|
25
|
+
staticClass: 'n20-anchor2-nav',
|
|
26
|
+
class: { 'n20-anchor2-nav-activit': item.id === activit },
|
|
27
|
+
on: {
|
|
28
|
+
click: function ($event) {
|
|
29
|
+
return _vm.$emit('click', item)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
item.slotT ? item.slotT : [_v(_s(item.title))]
|
|
34
|
+
)
|
|
35
|
+
}),
|
|
36
|
+
0
|
|
37
|
+
)
|
|
26
38
|
}
|
|
27
39
|
}
|
|
28
40
|
</script>
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
>
|
|
17
17
|
<span ref="upload-trigger" slot="trigger">upload</span>
|
|
18
18
|
</Upload>
|
|
19
|
-
<uploadMsg
|
|
19
|
+
<uploadMsg
|
|
20
|
+
v-else
|
|
20
21
|
:title="'导入文件' | $lc"
|
|
21
22
|
:visible.sync="errorV"
|
|
22
23
|
:validate-result="validateResult"
|
|
23
24
|
:hide-percent="true"
|
|
24
|
-
:
|
|
25
|
+
:footer-btn="footer"
|
|
25
26
|
:validate-confirm="validateConfirm"
|
|
26
27
|
/>
|
|
27
|
-
|
|
28
28
|
</div>
|
|
29
29
|
</el-dropdown>
|
|
30
30
|
</template>
|
|
@@ -43,6 +43,10 @@ export default {
|
|
|
43
43
|
type: String,
|
|
44
44
|
default: ''
|
|
45
45
|
},
|
|
46
|
+
templateOpt: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: undefined
|
|
49
|
+
},
|
|
46
50
|
fileName: {
|
|
47
51
|
type: String,
|
|
48
52
|
default: $lc('下载.xlsx')
|
|
@@ -84,7 +88,7 @@ export default {
|
|
|
84
88
|
watch: {
|
|
85
89
|
validateDialog(val) {
|
|
86
90
|
this.errorV = val
|
|
87
|
-
}
|
|
91
|
+
}
|
|
88
92
|
},
|
|
89
93
|
mounted() {
|
|
90
94
|
console.log(this.footer)
|
|
@@ -114,7 +118,7 @@ export default {
|
|
|
114
118
|
})
|
|
115
119
|
},
|
|
116
120
|
downFn() {
|
|
117
|
-
axios.get(this.templateUrl, null, { responseType: 'blob' }).then((blob) => {
|
|
121
|
+
axios.get(this.templateUrl, null, { responseType: 'blob', ...this.templateOpt }).then((blob) => {
|
|
118
122
|
downloadBlob(blob, this.fileName)
|
|
119
123
|
})
|
|
120
124
|
}
|