n20-common-lib 3.1.14 → 3.1.16
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 +1 -1
- package/src/assets/css/_coreLib.scss +5 -0
- package/src/assets/css/element-variables.scss +4 -1
- package/src/assets/css/normalize.scss +48 -15
- package/src/assets/css/v3/anchor.scss +119 -0
- package/src/assets/css/v3/collapse.scss +71 -0
- package/src/assets/css/v3/footer.scss +22 -0
- package/src/assets/css/v3/header.scss +46 -0
- package/src/assets/css/v3/radioCard.scss +48 -0
- package/src/components/v3/Anchor/index.vue +226 -0
- package/src/components/v3/Collapse/index.vue +69 -0
- package/src/components/v3/Footer/index.vue +37 -0
- package/src/components/v3/Header/index.vue +54 -0
- package/src/components/v3/RadioCard/components/Card.vue +48 -0
- package/src/components/v3/RadioCard/index.vue +42 -0
- package/src/components/v3/UploadList/index.vue +1 -1
- package/src/index.js +16 -1
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="n20-page-collapse">
|
|
3
|
+
<div class="n20-page-collapse__header" @click="toggle">
|
|
4
|
+
<div class="n20-page-collapse__title">
|
|
5
|
+
<slot name="title">{{ title }}</slot>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="n20-page-collapse__action">
|
|
8
|
+
<span class="n20-page-collapse__action-text">{{ actionText }}</span>
|
|
9
|
+
<i
|
|
10
|
+
class="n20-page-collapse__arrow"
|
|
11
|
+
:class="isExpanded ? 'n20-page-collapse__arrow-up' : 'n20-page-collapse__arrow-down'"
|
|
12
|
+
>
|
|
13
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
14
|
+
<path d="M3 9.5L7 5.5L11 9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
15
|
+
</svg>
|
|
16
|
+
</i>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="n20-page-collapse__body-wrap" :class="{ 'is-expanded': isExpanded }">
|
|
20
|
+
<div class="n20-page-collapse__body">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { $lc } from '../../../utils/i18n/index'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'Collapse',
|
|
32
|
+
props: {
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ''
|
|
36
|
+
},
|
|
37
|
+
expanded: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: null
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
localExpanded: true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
isControlled() {
|
|
49
|
+
return this.expanded !== null
|
|
50
|
+
},
|
|
51
|
+
isExpanded() {
|
|
52
|
+
return this.isControlled ? this.expanded : this.localExpanded
|
|
53
|
+
},
|
|
54
|
+
actionText() {
|
|
55
|
+
return this.isExpanded ? $lc('收起') : $lc('展开')
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
toggle() {
|
|
60
|
+
const next = !this.isExpanded
|
|
61
|
+
if (!this.isControlled) {
|
|
62
|
+
this.localExpanded = next
|
|
63
|
+
}
|
|
64
|
+
this.$emit('update:expanded', next)
|
|
65
|
+
this.$emit('change', next)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="n20-page-footer-v3" :style="showTopDivider ? 'border-top: 1px solid #E5E6EB;' : undefined">
|
|
3
|
+
<div :class="`n20-page-footer-left ${leftExtraClass}`">
|
|
4
|
+
<slot name="leftExtra"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div :class="`n20-page-footer-center ${centerClass}`">
|
|
7
|
+
<slot></slot>
|
|
8
|
+
</div>
|
|
9
|
+
<div :class="`n20-page-footer-right ${rightExtraClass}`">
|
|
10
|
+
<slot name="rightExtra"></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
name: 'Footer',
|
|
18
|
+
props: {
|
|
19
|
+
leftExtraClass: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ''
|
|
22
|
+
},
|
|
23
|
+
centerClass: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
|
+
},
|
|
27
|
+
rightExtraClass: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ''
|
|
30
|
+
},
|
|
31
|
+
showTopDivider: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="n20-page-header-v3" :style="showBottomDivider ? 'border-bottom: 1px solid #E5E6EB;' : undefined">
|
|
3
|
+
<div class="n20-page-header-left">
|
|
4
|
+
<div v-if="showBack" class="n20-page-header-v3__back" @click="handleBack">
|
|
5
|
+
<i :class="icon"></i>
|
|
6
|
+
<span class="n20-page-header-v3__back-text">{{ title }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div v-if="showBack" class="n20-page-header-v3__divider"></div>
|
|
9
|
+
<div class="n20-page-header-v3__title">
|
|
10
|
+
<slot name="content">{{ content }}</slot>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div :class="`n20-page-header-right ${extraClass}`">
|
|
14
|
+
<slot name="extra"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'Header',
|
|
22
|
+
props: {
|
|
23
|
+
extraClass: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
|
+
},
|
|
27
|
+
showBack: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '返回'
|
|
34
|
+
},
|
|
35
|
+
content: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ''
|
|
38
|
+
},
|
|
39
|
+
icon: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'n20-icon-yuefenqiehuan-zuoce'
|
|
42
|
+
},
|
|
43
|
+
showBottomDivider: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
handleBack() {
|
|
50
|
+
this.$emit('back')
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="`n20-page-radio-card-item${checked ? ' n20-page-radio-card-item-checked' : ''}${disabled ? ' n20-page-radio-card-item-disabled' : ''}`"
|
|
4
|
+
@click="handleClick"
|
|
5
|
+
>
|
|
6
|
+
<el-radio
|
|
7
|
+
:key="value"
|
|
8
|
+
:value="checkValue"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
class="n20-page-radio-card-item-radio"
|
|
11
|
+
:label="value"
|
|
12
|
+
>{{ label }}</el-radio
|
|
13
|
+
>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'RadioCardItem',
|
|
20
|
+
props: {
|
|
21
|
+
checked: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
checkValue: {
|
|
26
|
+
type: [String, Number, Boolean, null, undefined],
|
|
27
|
+
default: null
|
|
28
|
+
},
|
|
29
|
+
value: {
|
|
30
|
+
type: [String, Number, Boolean],
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
label: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ''
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
handleClick() {
|
|
44
|
+
this.$emit('check', this.value)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="n20-page-radio-card">
|
|
3
|
+
<Card
|
|
4
|
+
v-for="option in options"
|
|
5
|
+
:key="option.value"
|
|
6
|
+
:checked="value === option.value"
|
|
7
|
+
:check-value="value"
|
|
8
|
+
:value="option.value"
|
|
9
|
+
:label="option.label"
|
|
10
|
+
:disabled="option.disabled"
|
|
11
|
+
@check="handleCheck"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import Card from './components/Card.vue'
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'RadioCard',
|
|
21
|
+
components: { Card },
|
|
22
|
+
model: {
|
|
23
|
+
prop: 'value',
|
|
24
|
+
event: 'onChange'
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
value: {
|
|
28
|
+
type: [String, Number, Boolean, null, undefined],
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
options: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
handleCheck(value) {
|
|
38
|
+
this.$emit('onChange', value)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
package/src/index.js
CHANGED
|
@@ -124,6 +124,11 @@ import TimePicker from './components/TimePicker/index.vue'
|
|
|
124
124
|
import Tree from './components/Tree/index.vue'
|
|
125
125
|
import Upload from './components/Upload/index.vue'
|
|
126
126
|
import UploadMsg from './components/Upload/uploadMsg.vue'
|
|
127
|
+
import AnchorV3 from './components/v3/Anchor/index.vue'
|
|
128
|
+
import Collapse from './components/v3/Collapse/index.vue'
|
|
129
|
+
import Footer from './components/v3/Footer/index.vue'
|
|
130
|
+
import Header from './components/v3/Header/index.vue'
|
|
131
|
+
import RadioCard from './components/v3/RadioCard/index.vue'
|
|
127
132
|
import SecondaryTabV3 from './components/v3/SecondaryTab/index.vue'
|
|
128
133
|
|
|
129
134
|
/* v3组件*/
|
|
@@ -281,7 +286,12 @@ const components = [
|
|
|
281
286
|
operatingStatus,
|
|
282
287
|
/* v3组件*/
|
|
283
288
|
tableProV3,
|
|
284
|
-
SecondaryTabV3
|
|
289
|
+
SecondaryTabV3,
|
|
290
|
+
Header,
|
|
291
|
+
Footer,
|
|
292
|
+
RadioCard,
|
|
293
|
+
Collapse,
|
|
294
|
+
AnchorV3
|
|
285
295
|
]
|
|
286
296
|
|
|
287
297
|
const install = function (Vue, opts = { prefix: 'Cl', i18nConfig: {} }) {
|
|
@@ -428,6 +438,11 @@ export {
|
|
|
428
438
|
/* v3组件*/
|
|
429
439
|
tableProV3,
|
|
430
440
|
SecondaryTabV3,
|
|
441
|
+
Header,
|
|
442
|
+
Footer,
|
|
443
|
+
RadioCard,
|
|
444
|
+
Collapse,
|
|
445
|
+
AnchorV3,
|
|
431
446
|
asyncGetRelaNos,
|
|
432
447
|
// 方法
|
|
433
448
|
auth,
|