n20-common-lib 3.1.14 → 3.1.15
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 +3 -0
- package/src/assets/css/element-variables.scss +4 -1
- 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/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/index.js +10 -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
package/package.json
CHANGED
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
@import './dynamic-table.scss';
|
|
54
54
|
@import './v3/table.scss';
|
|
55
55
|
@import './v3/secondary-tab.scss';
|
|
56
|
+
@import './v3/header.scss';
|
|
57
|
+
@import './v3/footer.scss';
|
|
58
|
+
@import './v3/radioCard.scss';
|
|
56
59
|
|
|
57
60
|
//临时引入
|
|
58
61
|
@import '../../components/ChildRange/style.scss';
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
$--all-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1) !default;
|
|
9
9
|
$--fade-transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
|
|
10
10
|
$--fade-linear-transition: opacity 200ms linear !default;
|
|
11
|
-
$--md-fade-transition:
|
|
11
|
+
$--md-fade-transition:
|
|
12
|
+
transform 300ms cubic-bezier(0.23, 1, 0.32, 1),
|
|
13
|
+
opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
|
|
12
14
|
$--border-transition-base: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !default;
|
|
13
15
|
$--color-transition-base: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !default;
|
|
14
16
|
|
|
@@ -84,6 +86,7 @@ $--border-color-extra-light: #f2f6fc !default;
|
|
|
84
86
|
// Background
|
|
85
87
|
/// color|1|Background Color|4
|
|
86
88
|
$--background-color-base: #f2f3f5 !default;
|
|
89
|
+
$--background-selected-color-base: #e8f7ff !default;
|
|
87
90
|
|
|
88
91
|
/* Link
|
|
89
92
|
-------------------------- */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.n20-page-footer-v3 {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
padding: 12px 16px;
|
|
6
|
+
background: $--color-white;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
|
|
9
|
+
.n20-page-footer-left {
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.n20-page-footer-center {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.n20-page-footer-right {
|
|
17
|
+
flex: 1;
|
|
18
|
+
width: 0;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: flex-end;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.n20-page-header-v3 {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
padding: 12px 16px;
|
|
5
|
+
background: $--color-white;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
|
|
8
|
+
.n20-page-header-left {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 12px;
|
|
12
|
+
.n20-page-header-v3__back {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
color: $--color-text-regular;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
line-height: 22px;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
.n20-page-header-v3__back-text {
|
|
22
|
+
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
color: #165aaf;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.n20-page-header-v3__divider {
|
|
32
|
+
width: 1px;
|
|
33
|
+
height: 12px;
|
|
34
|
+
background: $--border-color-base;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
}
|
|
37
|
+
.n20-page-header-v3__title {
|
|
38
|
+
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
color: #1d2129;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.n20-page-radio-card {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: 16px;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
align-content: center;
|
|
7
|
+
gap: 16px;
|
|
8
|
+
align-self: stretch;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
|
|
11
|
+
.n20-page-radio-card-item {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
padding: 8px 15px;
|
|
16
|
+
height: 38px;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
border: 1px solid $--border-color-base;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
min-width: 170px;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
background-color: $--descriptions-item-bordered-label-background;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.n20-page-radio-card-item-checked {
|
|
27
|
+
border: 1px solid $--color-primary;
|
|
28
|
+
background-color: $--background-selected-color-base;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.n20-page-radio-card-item-disabled {
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.n20-page-radio-card-item-radio {
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 2px;
|
|
40
|
+
|
|
41
|
+
.el-radio__input,
|
|
42
|
+
.el-radio__inner {
|
|
43
|
+
height: 14px;
|
|
44
|
+
width: 14px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -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">{{ backText }}</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="title">{{ title }}</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
|
+
backText: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '返回'
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
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('onBack')
|
|
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,9 @@ 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 Footer from './components/v3/Footer/index.vue'
|
|
128
|
+
import Header from './components/v3/Header/index.vue'
|
|
129
|
+
import RadioCard from './components/v3/RadioCard/index.vue'
|
|
127
130
|
import SecondaryTabV3 from './components/v3/SecondaryTab/index.vue'
|
|
128
131
|
|
|
129
132
|
/* v3组件*/
|
|
@@ -281,7 +284,10 @@ const components = [
|
|
|
281
284
|
operatingStatus,
|
|
282
285
|
/* v3组件*/
|
|
283
286
|
tableProV3,
|
|
284
|
-
SecondaryTabV3
|
|
287
|
+
SecondaryTabV3,
|
|
288
|
+
Header,
|
|
289
|
+
Footer,
|
|
290
|
+
RadioCard
|
|
285
291
|
]
|
|
286
292
|
|
|
287
293
|
const install = function (Vue, opts = { prefix: 'Cl', i18nConfig: {} }) {
|
|
@@ -428,6 +434,9 @@ export {
|
|
|
428
434
|
/* v3组件*/
|
|
429
435
|
tableProV3,
|
|
430
436
|
SecondaryTabV3,
|
|
437
|
+
Header,
|
|
438
|
+
Footer,
|
|
439
|
+
RadioCard,
|
|
431
440
|
asyncGetRelaNos,
|
|
432
441
|
// 方法
|
|
433
442
|
auth,
|