@kyfe/hroa-ui 1.0.3 → 1.0.5
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/dist/hroa-ui.common.js +3447 -472
- package/dist/hroa-ui.css +1 -1
- package/dist/hroa-ui.umd.js +3447 -472
- package/dist/hroa-ui.umd.min.js +2 -2
- package/lib/getJsModule/index.css +1 -1
- package/lib/getJsModule/index.js +2 -2
- package/lib/hr-add-list/index.js +1 -1
- package/lib/hr-bottom-button/index.css +1 -1
- package/lib/hr-bottom-button/index.js +1 -1
- package/lib/hr-breadcrumb/index.css +1 -1
- package/lib/hr-breadcrumb/index.js +2 -2
- package/lib/hr-button/index.js +1 -1
- package/lib/hr-clipboard/index.js +1 -1
- package/lib/hr-collapse-card/index.css +1 -0
- package/lib/hr-collapse-card/index.js +1 -0
- package/lib/hr-condition-filtrate/index.js +1 -1
- package/lib/hr-condition-filtrate-popup/index.js +1 -1
- package/lib/hr-dropdown-date/index.css +1 -0
- package/lib/hr-dropdown-date/index.js +1 -0
- package/lib/hr-elasticity-box/index.js +1 -1
- package/lib/hr-elasticity-box-item/index.js +1 -1
- package/lib/hr-emotional-picture/index.js +1 -1
- package/lib/hr-employee-choose/index.js +1 -1
- package/lib/hr-file-list/index.css +1 -0
- package/lib/hr-file-list/index.js +1 -0
- package/lib/hr-full-screen/index.css +1 -0
- package/lib/hr-full-screen/index.js +1 -0
- package/lib/hr-img-list/index.js +1 -1
- package/lib/hr-info-card/index.js +1 -1
- package/lib/hr-information/index.css +1 -1
- package/lib/hr-information/index.js +1 -1
- package/lib/hr-license-plate-number/index.js +1 -1
- package/lib/hr-module-card/index.js +1 -1
- package/lib/hr-multiterm-choose/index.js +1 -1
- package/lib/hr-no-data/index.js +1 -1
- package/lib/hr-notice-bar/index.js +1 -1
- package/lib/hr-open-ks/index.js +1 -1
- package/lib/hr-pager/index.css +1 -1
- package/lib/hr-pager/index.js +1 -1
- package/lib/hr-popup/index.js +1 -1
- package/lib/hr-preview-file/index.js +1 -1
- package/lib/hr-rate/index.js +1 -1
- package/lib/hr-reason-textarea/index.js +1 -1
- package/lib/hr-search-input/index.js +1 -1
- package/lib/hr-select/index.js +1 -1
- package/lib/hr-select-list/index.css +1 -1
- package/lib/hr-select-list/index.js +2 -2
- package/lib/hr-single-choose/index.js +1 -1
- package/lib/hr-slide-pager/index.js +1 -1
- package/lib/hr-sort/index.js +1 -1
- package/lib/hr-stack-image/index.js +1 -1
- package/lib/hr-tab-nav/index.css +1 -1
- package/lib/hr-tab-nav/index.js +1 -1
- package/lib/hr-view-item/index.js +1 -1
- package/lib/index/index.css +1 -1
- package/lib/index/index.js +2 -2
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
- package/packages/hr-bottom-button/src/index.vue +32 -13
- package/packages/hr-breadcrumb/src/index.vue +2 -2
- package/packages/hr-collapse-card/index.js +3 -0
- package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
- package/packages/hr-collapse-card/src/index.vue +151 -0
- package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
- package/packages/hr-dropdown-date/index.js +7 -0
- package/packages/hr-dropdown-date/src/calendar/calendar.js +128 -0
- package/packages/hr-dropdown-date/src/calendar/calendar.vue +485 -0
- package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
- package/packages/hr-dropdown-date/src/calendar/index.js +5 -0
- package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +92 -0
- package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +128 -0
- package/packages/hr-dropdown-date/src/date-picker/month-select.vue +98 -0
- package/packages/hr-dropdown-date/src/date-picker/style.less +120 -0
- package/packages/hr-dropdown-date/src/date-picker/utils.js +109 -0
- package/packages/hr-dropdown-date/src/index.vue +482 -0
- package/packages/hr-dropdown-date/src/week.js +194 -0
- package/packages/hr-file-list/index.js +3 -0
- package/packages/hr-file-list/src/file-type/other.vue +45 -0
- package/packages/hr-file-list/src/file-type/picture.vue +38 -0
- package/packages/hr-file-list/src/file-type/video.vue +60 -0
- package/packages/hr-file-list/src/index.vue +246 -0
- package/packages/hr-file-list/src/utils/enum.js +95 -0
- package/packages/hr-file-list/src/utils/fun.js +16 -0
- package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
- package/packages/hr-full-screen/index.js +7 -0
- package/packages/hr-full-screen/src/index.vue +117 -0
- package/packages/hr-information/src/index.vue +1 -0
- package/packages/hr-pager/index.js +1 -1
- package/packages/hr-pager/src/index.vue +6 -5
- package/packages/hr-select-list/src/index.vue +23 -11
- package/packages/hr-tab-nav/src/index.vue +83 -7
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
title: String,
|
|
17
17
|
// 默认值
|
|
18
18
|
defaultValue: {
|
|
19
|
-
type: [String, Array],
|
|
19
|
+
type: [String, Array, Number],
|
|
20
20
|
default: ''
|
|
21
21
|
},
|
|
22
22
|
// 选项value用到的字段
|
|
@@ -56,6 +56,11 @@
|
|
|
56
56
|
showSubmitBtn: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
default: true
|
|
59
|
+
},
|
|
60
|
+
// 确定按钮文本
|
|
61
|
+
submitBtnTxt: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: '确定'
|
|
59
64
|
}
|
|
60
65
|
},
|
|
61
66
|
data () {
|
|
@@ -96,7 +101,7 @@
|
|
|
96
101
|
closeable={this.closeable}
|
|
97
102
|
position={this.position}
|
|
98
103
|
popupStyle={this.popupStyle}
|
|
99
|
-
safe-area-inset-bottom
|
|
104
|
+
safe-area-inset-bottom={this.position === 'bottom'}
|
|
100
105
|
title={this.title}
|
|
101
106
|
onClose={this.close}>
|
|
102
107
|
<div class="hr-select-list">
|
|
@@ -106,14 +111,16 @@
|
|
|
106
111
|
return <div class={['option-item', this.isSelectedOption(item[this.valKey]) ? 'active' : '']}
|
|
107
112
|
onClick={() => this.optionClick(item[this.valKey])}>
|
|
108
113
|
{item[this.labelKey]}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
<div class="check-box">
|
|
115
|
+
{
|
|
116
|
+
this.isSelectedOption(item[this.valKey]) && <ks-icon name="success" class="icon-cls" />
|
|
117
|
+
}
|
|
118
|
+
</div>
|
|
112
119
|
</div>
|
|
113
120
|
})
|
|
114
121
|
}
|
|
115
122
|
</div>
|
|
116
|
-
{this.showSubmitBtn && <div class="submit-btn" onClick={this.submit}
|
|
123
|
+
{this.showSubmitBtn && <div class="submit-btn" onClick={this.submit}>{this.submitBtnTxt}</div>}
|
|
117
124
|
</div>
|
|
118
125
|
</HrPopup>
|
|
119
126
|
)
|
|
@@ -123,20 +130,22 @@
|
|
|
123
130
|
const val = cloneDeep(this.defaultValue)
|
|
124
131
|
if (Object.prototype.toString.call(val) === '[object String]') {
|
|
125
132
|
this.selectValue = val ? [val] : []
|
|
133
|
+
} else if (Object.prototype.toString.call(val) === '[object Number]') {
|
|
134
|
+
this.selectValue = String(val) ? [String(val)] : []
|
|
126
135
|
} else {
|
|
127
136
|
this.selectValue = val || []
|
|
128
137
|
}
|
|
129
138
|
},
|
|
130
139
|
isSelectedOption (key) {
|
|
131
|
-
return this.selectValue.some(i => i === key)
|
|
140
|
+
return this.selectValue.some(i => String(i) === String(key))
|
|
132
141
|
},
|
|
133
142
|
// 当前值
|
|
134
143
|
optionClick (key) {
|
|
135
144
|
const selectedOptions = this.selectValue || []
|
|
136
145
|
if (this.multiple) {
|
|
137
|
-
const hasSelected = selectedOptions.some(i => i === key)
|
|
146
|
+
const hasSelected = selectedOptions.some(i => String(i) === String(key))
|
|
138
147
|
if (hasSelected) {
|
|
139
|
-
this.selectValue = selectedOptions.filter(i => i !== key)
|
|
148
|
+
this.selectValue = selectedOptions.filter(i => String(i) !== String(key))
|
|
140
149
|
} else {
|
|
141
150
|
this.selectValue.push(key)
|
|
142
151
|
}
|
|
@@ -172,10 +181,10 @@
|
|
|
172
181
|
flex-direction: column;
|
|
173
182
|
.list-box {
|
|
174
183
|
flex: 1;
|
|
184
|
+
padding: 4px 0;
|
|
175
185
|
overflow: auto;
|
|
176
186
|
.option-item {
|
|
177
|
-
|
|
178
|
-
padding: 0 16px;
|
|
187
|
+
padding: 12px 16px;
|
|
179
188
|
font-size: 14px;
|
|
180
189
|
color: #03050d;
|
|
181
190
|
display: flex;
|
|
@@ -184,6 +193,9 @@
|
|
|
184
193
|
&.active {
|
|
185
194
|
color: #7972fe;
|
|
186
195
|
}
|
|
196
|
+
.check-box {
|
|
197
|
+
width: 14px;
|
|
198
|
+
}
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
201
|
.submit-btn {
|
|
@@ -22,8 +22,73 @@
|
|
|
22
22
|
count: 0,
|
|
23
23
|
type: 20
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
text: 'tab3',
|
|
27
|
+
count: 10,
|
|
28
|
+
type: 30
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
text: 'tab4',
|
|
32
|
+
count: 1000,
|
|
33
|
+
type: 40
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: 'tab5',
|
|
37
|
+
count: 0,
|
|
38
|
+
type: 50
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: 'tab6',
|
|
42
|
+
count: 0,
|
|
43
|
+
type: 60
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
text: 'tab7',
|
|
47
|
+
count: 0,
|
|
48
|
+
type: 70
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
text: 'tab8',
|
|
52
|
+
count: 0,
|
|
53
|
+
type: 80
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: 'tab9',
|
|
57
|
+
count: 0,
|
|
58
|
+
type: 90
|
|
59
|
+
},
|
|
25
60
|
]
|
|
26
61
|
}
|
|
62
|
+
},
|
|
63
|
+
marginRight: {
|
|
64
|
+
type: Number || String,
|
|
65
|
+
default () {
|
|
66
|
+
return 37
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
defaultColor: {
|
|
70
|
+
type: String,
|
|
71
|
+
default () {
|
|
72
|
+
return '#858793'
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
activeColor: {
|
|
76
|
+
type: String,
|
|
77
|
+
default () {
|
|
78
|
+
return '#03050d'
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
defaultFontSize: {
|
|
82
|
+
type: Number || String,
|
|
83
|
+
default () {
|
|
84
|
+
return 14
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
activeFontSize: {
|
|
88
|
+
type: Number || String,
|
|
89
|
+
default () {
|
|
90
|
+
return 14
|
|
91
|
+
},
|
|
27
92
|
}
|
|
28
93
|
},
|
|
29
94
|
data () {
|
|
@@ -47,20 +112,28 @@
|
|
|
47
112
|
},
|
|
48
113
|
render () {
|
|
49
114
|
// render tab
|
|
50
|
-
const renderHeaderTab = (params = {}) => {
|
|
51
|
-
const { text, type, count
|
|
115
|
+
const renderHeaderTab = (params = {}, index) => {
|
|
116
|
+
const { text, type, count } = params
|
|
52
117
|
const active = this.currentType === type
|
|
118
|
+
const isUndefined = typeof count === 'undefined'
|
|
119
|
+
const marginRight = index === this.tabList.length - 1 ? null : this.marginRight
|
|
120
|
+
const color = active ? this.activeColor : this.defaultColor
|
|
121
|
+
const fontSize = active ? this.activeFontSize : this.defaultFontSize
|
|
53
122
|
|
|
54
|
-
return <div class={['nav-item', active && 'active']}
|
|
55
|
-
|
|
123
|
+
return <div class={['nav-item', active && 'active']} style={{
|
|
124
|
+
marginRight: `${marginRight}px`,
|
|
125
|
+
color,
|
|
126
|
+
fontSize: `${fontSize}px`,
|
|
127
|
+
}} onClick={this.switchTab.bind(this, type)}>
|
|
128
|
+
{text} {isUndefined ? '' : count}
|
|
56
129
|
{active && <i class="item-border"></i>}
|
|
57
130
|
</div>
|
|
58
131
|
}
|
|
59
132
|
|
|
60
133
|
return <div class="hr-tab-nav">
|
|
61
134
|
{
|
|
62
|
-
this.tabList.map((item) => {
|
|
63
|
-
return renderHeaderTab(item)
|
|
135
|
+
this.tabList.map((item, index) => {
|
|
136
|
+
return renderHeaderTab(item, index)
|
|
64
137
|
})
|
|
65
138
|
}
|
|
66
139
|
{
|
|
@@ -102,13 +175,16 @@
|
|
|
102
175
|
background: #a68cff;
|
|
103
176
|
border-radius: 1.5px;
|
|
104
177
|
}
|
|
178
|
+
&:last-child {
|
|
179
|
+
margin: 0;
|
|
180
|
+
}
|
|
105
181
|
}
|
|
106
182
|
.nav-slot {
|
|
107
183
|
margin-left: auto;
|
|
108
184
|
}
|
|
109
185
|
.nav-item.active {
|
|
110
186
|
font-size: 14px;
|
|
111
|
-
color: #
|
|
187
|
+
color: #03050d;
|
|
112
188
|
}
|
|
113
189
|
}
|
|
114
190
|
</style>
|