@kyfe/hroa-ui 0.0.1

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.
Files changed (105) hide show
  1. package/README.md +50 -0
  2. package/dist/demo.html +8 -0
  3. package/dist/hrui.common.js +3892 -0
  4. package/dist/hrui.common.js.map +1 -0
  5. package/dist/hrui.umd.js +3902 -0
  6. package/dist/hrui.umd.js.map +1 -0
  7. package/dist/hrui.umd.min.js +2 -0
  8. package/dist/hrui.umd.min.js.map +1 -0
  9. package/lib/hr-bottom-button/index.css +1 -0
  10. package/lib/hr-bottom-button/index.js +1 -0
  11. package/lib/hr-button/index.css +1 -0
  12. package/lib/hr-button/index.js +1 -0
  13. package/lib/hr-clipboard/index.css +1 -0
  14. package/lib/hr-clipboard/index.js +1 -0
  15. package/lib/hr-condition-filtrate/index.css +1 -0
  16. package/lib/hr-condition-filtrate/index.js +1 -0
  17. package/lib/hr-emotional-picture/index.css +1 -0
  18. package/lib/hr-emotional-picture/index.js +1 -0
  19. package/lib/hr-module-card/index.css +1 -0
  20. package/lib/hr-module-card/index.js +1 -0
  21. package/lib/hr-notice-bar/index.js +1 -0
  22. package/lib/hr-open-ks/index.css +1 -0
  23. package/lib/hr-open-ks/index.js +1 -0
  24. package/lib/hr-pager/index.css +1 -0
  25. package/lib/hr-pager/index.js +1 -0
  26. package/lib/hr-search-input/index.css +1 -0
  27. package/lib/hr-search-input/index.js +1 -0
  28. package/lib/hr-select/index.js +1 -0
  29. package/lib/hr-slide-pager/index.css +1 -0
  30. package/lib/hr-slide-pager/index.js +1 -0
  31. package/lib/hr-stack-image/index.css +1 -0
  32. package/lib/hr-stack-image/index.js +1 -0
  33. package/lib/hr-tab-nav/index.css +1 -0
  34. package/lib/hr-tab-nav/index.js +1 -0
  35. package/lib/hr-view-item/index.css +1 -0
  36. package/lib/hr-view-item/index.js +1 -0
  37. package/lib/index/index.css +1 -0
  38. package/lib/index/index.js +1 -0
  39. package/lib/utils/index.js +1 -0
  40. package/package.json +66 -0
  41. package/packages/hr-bottom-button/index.js +7 -0
  42. package/packages/hr-bottom-button/src/index.vue +85 -0
  43. package/packages/hr-button/index.js +13 -0
  44. package/packages/hr-button/src/hr-button.vue +39 -0
  45. package/packages/hr-clipboard/index.js +3 -0
  46. package/packages/hr-clipboard/src/icon.png +0 -0
  47. package/packages/hr-clipboard/src/main.vue +64 -0
  48. package/packages/hr-clipboard/src/util.js +9 -0
  49. package/packages/hr-condition-filtrate/enum/index.js +11 -0
  50. package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
  51. package/packages/hr-condition-filtrate/index.js +7 -0
  52. package/packages/hr-condition-filtrate/src/employee-choose/index.vue +101 -0
  53. package/packages/hr-condition-filtrate/src/index.vue +246 -0
  54. package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +167 -0
  55. package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +102 -0
  56. package/packages/hr-condition-filtrate/src/single-choose/index.vue +144 -0
  57. package/packages/hr-condition-filtrate/src/text-input/index.vue +60 -0
  58. package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +154 -0
  59. package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
  60. package/packages/hr-condition-filtrate/src/time-selector/index.vue +380 -0
  61. package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +30 -0
  62. package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +213 -0
  63. package/packages/hr-emotional-picture/index.js +7 -0
  64. package/packages/hr-emotional-picture/src/index.vue +66 -0
  65. package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
  66. package/packages/hr-module-card/index.js +13 -0
  67. package/packages/hr-module-card/src/index.vue +132 -0
  68. package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +29 -0
  69. package/packages/hr-notice-bar/index.js +7 -0
  70. package/packages/hr-notice-bar/src/bem.js +38 -0
  71. package/packages/hr-notice-bar/src/index.js +52 -0
  72. package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +3 -0
  73. package/packages/hr-open-ks/index.js +3 -0
  74. package/packages/hr-open-ks/src/icon.png +0 -0
  75. package/packages/hr-open-ks/src/main.vue +85 -0
  76. package/packages/hr-open-ks/src/util.js +31 -0
  77. package/packages/hr-pager/images/next-page.png +0 -0
  78. package/packages/hr-pager/images/prev-page.png +0 -0
  79. package/packages/hr-pager/index.js +7 -0
  80. package/packages/hr-pager/src/index.vue +95 -0
  81. package/packages/hr-pager//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  82. package/packages/hr-search-input/image/input-close-icon.png +0 -0
  83. package/packages/hr-search-input/image/search-icon.png +0 -0
  84. package/packages/hr-search-input/index.js +8 -0
  85. package/packages/hr-search-input/src/index.vue +144 -0
  86. package/packages/hr-select/index.js +3 -0
  87. package/packages/hr-select/src/main.vue +62 -0
  88. package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
  89. package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
  90. package/packages/hr-slide-pager/guide/index.vue +59 -0
  91. package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
  92. package/packages/hr-slide-pager/index.js +7 -0
  93. package/packages/hr-slide-pager/src/index.vue +371 -0
  94. package/packages/hr-slide-pager//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
  95. package/packages/hr-stack-image/index.js +3 -0
  96. package/packages/hr-stack-image/src/main.vue +77 -0
  97. package/packages/hr-stack-image//345/261/202/345/217/240/345/233/276/347/211/207/347/273/204/344/273/266.md +0 -0
  98. package/packages/hr-tab-nav/index.js +8 -0
  99. package/packages/hr-tab-nav/src/index.vue +96 -0
  100. package/packages/hr-view-item/index.js +13 -0
  101. package/packages/hr-view-item/src/index.vue +89 -0
  102. package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
  103. package/packages/index.js +53 -0
  104. package/packages/utils/directive.js +58 -0
  105. package/packages/utils/index.js +73 -0
@@ -0,0 +1,132 @@
1
+ <!--
2
+ * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
+ * @Date : 2023-08-15 21:28:37
4
+ * @Description :
5
+ -->
6
+ <template>
7
+ <div :class="{'module-card': true,'card-radius': radius}">
8
+ <div :class="{'card-title': true, 'title-divider': divider }"
9
+ v-if="showTitle">
10
+ <slot name="title">
11
+ <!-- 标题插槽,如果没传则显示以下默认格式 -->
12
+ <div class='title-txt'>
13
+ <slot name="prefix"></slot>
14
+ {{title}}
15
+ </div>
16
+ <div class="title-btn">
17
+ <div v-if="refresh"
18
+ @click="handleBtnClick('refresh')">
19
+ <ks-icon name="replay" />
20
+ </div>
21
+ <div v-if="edit"
22
+ @click="handleBtnClick('edit')">
23
+ <ks-icon name="edit" />
24
+ <!-- <ks-image :src="require('@/assets/images/icon-edit.svg')"></ks-image> -->
25
+ </div>
26
+ </div>
27
+ </slot>
28
+ </div>
29
+ <div class="card-content">
30
+ <slot></slot>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ export default {
37
+ name: 'hr-module-card',
38
+ props: {
39
+ // 标题名称
40
+ title: {
41
+ type: String,
42
+ default: '',
43
+ },
44
+ // 标题-刷新按钮
45
+ refresh: {
46
+ type: Boolean,
47
+ default: false,
48
+ },
49
+ // 标题-编辑按钮
50
+ edit: {
51
+ type: Boolean,
52
+ default: false,
53
+ },
54
+ // 标题分割线
55
+ divider: {
56
+ type: Boolean,
57
+ default: true
58
+ },
59
+ // 卡片-默认圆角
60
+ radius: {
61
+ type: Boolean,
62
+ default: true
63
+ }
64
+
65
+ },
66
+ computed: {
67
+ // 是否显示标题,根据传参决定
68
+ showTitle () {
69
+ const hasTitleProps = this.title
70
+ const hasTitleSlots = this.$slots && this.$slots.title
71
+ // 如果传递了title的props或者 传递slot=title的插槽则显示
72
+ return hasTitleProps || hasTitleSlots
73
+ }
74
+ },
75
+ created () {
76
+ // console.log('this.props :>> ', this);
77
+ },
78
+ methods: {
79
+ // 标题按钮点击事件
80
+ handleBtnClick (type) {
81
+ this.$emit('clickTitleBtn', type)
82
+ },
83
+ }
84
+ }
85
+ </script>
86
+
87
+ <style lang="less" scoped>
88
+ // 主题色
89
+ @primaryColor: #7972fe;
90
+ .module-card {
91
+ margin-bottom: 10px;
92
+ background-color: #fff;
93
+ overflow: hidden;
94
+ font-size: 14px;
95
+ }
96
+ .card-radius {
97
+ border-radius: 8px;
98
+ padding: 1px; // 留出了1px的白色底边
99
+ }
100
+ .card-title {
101
+ display: flex;
102
+ justify-content: space-between;
103
+ align-items: center;
104
+ padding: 14px 11px;
105
+ background: linear-gradient(179deg, #edefff 9%, rgba(255, 255, 255, 0) 96%);
106
+ }
107
+ .title-divider {
108
+ border-bottom: 1px solid #ebedf5;
109
+ }
110
+
111
+ .title-txt {
112
+ color: #03050d;
113
+ font-size: 16px;
114
+ font-weight: 500;
115
+ }
116
+ .title-btn {
117
+ display: flex;
118
+ font-size: 12px;
119
+ vertical-align: middle;
120
+ color: @primaryColor;
121
+ > div {
122
+ margin-left: 5px;
123
+ > i {
124
+ vertical-align: middle;
125
+ padding-right: 5px;
126
+ }
127
+ }
128
+ }
129
+
130
+ .card-content {
131
+ }
132
+ </style>
@@ -0,0 +1,29 @@
1
+ <!--
2
+ * @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
3
+ * @Date : 2023-08-15 21:26:28
4
+ * @Description : icon卡片列表 视图组件
5
+ -->
6
+
7
+ ## 模块卡片 公共组件
8
+
9
+ ```html
10
+ <view-module-card
11
+ title="标题"
12
+ :divider="分割线Boolean"
13
+ refresh 刷新按钮
14
+ edit 编辑按钮
15
+ @click="handleTitleBtnClick"> </view-module-card>
16
+ ```
17
+
18
+ ### 插槽
19
+
20
+ #### 标题插槽,具名插槽 slot="title"
21
+
22
+ <code>
23
+
24
+ </code>
25
+ 接受参数 refresh、edit进行标题按钮的渲染
26
+
27
+ #### 默认插槽
28
+
29
+ 默认插槽为卡片内容区
@@ -0,0 +1,7 @@
1
+ import HrNoticeBar from './src/index.js'
2
+
3
+ HrNoticeBar.install = function (Vue) {
4
+ Vue.component(HrNoticeBar.name, HrNoticeBar)
5
+ }
6
+
7
+ export default HrNoticeBar
@@ -0,0 +1,38 @@
1
+ const ELEMENT = '__'
2
+ const MODS = '--'
3
+
4
+ function hrJoin (name, el, symbol) {
5
+ return el ? name + symbol + el : name
6
+ }
7
+
8
+ function hrPrefix (name, mods) {
9
+ if (typeof mods === 'string') { return hrJoin(name, mods, MODS) }
10
+
11
+ if (Array.isArray(mods)) {
12
+ return mods.map(function (item) {
13
+ return hrPrefix(name, item)
14
+ })
15
+ }
16
+
17
+ const ret = {}
18
+
19
+ if (mods) {
20
+ Object.keys(mods).forEach(function (key) {
21
+ ret[name + MODS + key] = mods[key]
22
+ })
23
+ }
24
+
25
+ return ret
26
+ }
27
+
28
+ export function createHrBEM (name) {
29
+ return function (el, mods) {
30
+ if (el && typeof el !== 'string') {
31
+ mods = el
32
+ el = ''
33
+ }
34
+
35
+ el = hrJoin(name, el, ELEMENT);
36
+ return mods ? [el, hrPrefix(el, mods)] : el
37
+ }
38
+ }
@@ -0,0 +1,52 @@
1
+ import { createHrBEM } from './bem.js'
2
+
3
+ export default {
4
+ name: 'HrNoticeBar',
5
+ extends: window.vant.NoticeBar,
6
+ data () {
7
+ return {
8
+ firstRound: true
9
+ }
10
+ },
11
+ props: {
12
+ isOverflowShow: {
13
+ type: Boolean,
14
+ default () {
15
+ return true
16
+ }
17
+ },
18
+ },
19
+ watch: {
20
+ text: {
21
+ handler () {
22
+ this.$nextTick(function () {
23
+ const ref = this.$refs
24
+ const wrap = ref.wrap
25
+ const content = ref.content
26
+ if (!wrap || !content) { return }
27
+ const wrapWidth = wrap.getBoundingClientRect().width
28
+ const offsetWidth = content.getBoundingClientRect().width
29
+
30
+ if (this.scrollable) { // _this.scrollable && offsetWidth > wrapWidth 【原逻辑】
31
+ if (this.isOverflowShow && offsetWidth <= wrapWidth) return
32
+ this.wrapWidth = wrapWidth
33
+ this.offsetWidth = offsetWidth
34
+ this.duration = offsetWidth / this.speed
35
+ this.animationClass = createHrBEM('van-notice-bar')('play')
36
+ }
37
+ });
38
+ },
39
+ immediate: true
40
+ }
41
+ },
42
+ mounted () {
43
+ this.init()
44
+ },
45
+ methods: {
46
+ init () {
47
+ this.initState()
48
+ },
49
+ initState () {
50
+ },
51
+ },
52
+ }
@@ -0,0 +1,3 @@
1
+ #这是一个通知栏组件
2
+ ##继承于vant的通知栏组件
3
+ ##解决文本没有超出,不能滚动的问题
@@ -0,0 +1,3 @@
1
+ import HrOpenKS from './src/main'
2
+
3
+ export default HrOpenKS
Binary file
@@ -0,0 +1,85 @@
1
+ <script>
2
+ import icon from './icon.png'
3
+ import {
4
+ openSession,
5
+ openProfile
6
+ } from './util.js'
7
+ export default {
8
+ name: 'HrOpenKS',
9
+ props: {
10
+ name: {
11
+ type: String,
12
+ default: '-'
13
+ },
14
+ num: {
15
+ type: [String, Number],
16
+ default: ''
17
+ },
18
+ color: {
19
+ type: String,
20
+ default: 'inherit'
21
+ },
22
+ size: {
23
+ type: [String, Number],
24
+ default: '12'
25
+ },
26
+ imgSize: {
27
+ type: [String, Number],
28
+ default: '14'
29
+ },
30
+ // 模块形式导入
31
+ icon: {
32
+ default: icon
33
+ },
34
+ // chat聊天窗 / profile信息卡
35
+ type: {
36
+ type: String,
37
+ default: 'chat'
38
+ },
39
+ marginLeft: {
40
+ type: [String, Number],
41
+ default: '4'
42
+ }
43
+ },
44
+ methods: {
45
+ open () {
46
+ if (!this.num) return window.vant.Toast('无效的工号')
47
+
48
+ const map = {
49
+ 'chat': openSession,
50
+ 'profile': openProfile
51
+ }
52
+
53
+ const fn = map[this.type]
54
+
55
+ if (fn === void 0) return window.vant.Toast('请传入正确的打开方式 chat/profile')
56
+
57
+ fn(this.num)
58
+
59
+ this.$emit('click', {
60
+ name: this.name,
61
+ num: this.num,
62
+ })
63
+ }
64
+ },
65
+ render () {
66
+ return (<div onClick={this.open.bind(this)} class="openks">
67
+ <div style={{ fontSize: `${this.size}px`, color: this.color }}>{this.name}</div>
68
+ <div style={{ width: `${this.imgSize}px`, height: `${this.imgSize}px`, marginLeft: `${this.marginLeft}px` }} class="openks-img">
69
+ <img width={this.imgSize}
70
+ height={this.imgSize}
71
+ src={this.icon} />
72
+ </div>
73
+ </div>)
74
+ }
75
+ }
76
+ </script>
77
+ <style lang="less" scoped>
78
+ .openks {
79
+ display: flex;
80
+ align-items: center;
81
+ .openks-img {
82
+ font-size: 0;
83
+ }
84
+ }
85
+ </style>
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @description: 打开用户信息聊天
3
+ * @param {String} num 工号
4
+ */
5
+ export async function openSession (num) {
6
+ try {
7
+ const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
8
+ window.ks.callFunc({
9
+ method: 'openSession',
10
+ params: { sessionId: res[num] }
11
+ })
12
+ } catch (err) {
13
+ console.log(`🚀 ~ openSession ~ err:`, err)
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @description: 打开用户详情页面
19
+ * @param {String} num 工号
20
+ */
21
+ export async function openProfile (num) {
22
+ try {
23
+ const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
24
+ window.ks.callFunc({
25
+ method: 'openProfile',
26
+ params: { userId: res[num] }
27
+ })
28
+ } catch (err) {
29
+ console.log(`🚀 ~ openProfile ~ err:`, err)
30
+ }
31
+ }
@@ -0,0 +1,7 @@
1
+ import hrPager from './src/index.vue'
2
+
3
+ hrPager.install = function (Vue) {
4
+ Vue.component(hrPager.name, hrPager);
5
+ };
6
+
7
+ export default hrPager;
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <div class="hr-pager"
3
+ v-if="ids && ids.length">
4
+ <img @click="prevPage"
5
+ class="prev"
6
+ v-if="!prevDisabled"
7
+ src="../images/prev-page.png">
8
+ <img @click="nextPage"
9
+ class="next"
10
+ v-if="!nextDisabled"
11
+ src="../images/next-page.png">
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'hr-pager', // 按钮分页组件
18
+ props: {
19
+ currentId: {
20
+ type: [String, Number],
21
+ default: ''
22
+ },
23
+ ids: {
24
+ type: [Array],
25
+ default: () => []
26
+ },
27
+ // 切换上下周周报时是否冻结分页器,用于保留当前分页id
28
+ isFreeze: {
29
+ default: false
30
+ },
31
+ },
32
+ data () {
33
+ return {
34
+ currentIndex: 0,
35
+ }
36
+ },
37
+ watch: {
38
+ currentId: {
39
+ handler () {
40
+ // 切换上下周周报时,冻结分页器后不响应id变化处理
41
+ if (this.ids.length && !this.isFreeze) {
42
+ this.currentIndex = this.ids.findIndex(v => +v === +this.currentId)
43
+ }
44
+ },
45
+ immediate: true
46
+ }
47
+ },
48
+ computed: {
49
+ prevDisabled () {
50
+ return this.currentIndex <= 0
51
+ },
52
+ nextDisabled () {
53
+ return this.currentIndex >= this.ids.length - 1
54
+ }
55
+ },
56
+ methods: {
57
+ nextPage () {
58
+ if (this.nextDisabled) {
59
+ return
60
+ }
61
+ this.currentIndex++
62
+ this.$emit('turnPage', this.ids[this.currentIndex])
63
+ },
64
+ prevPage () {
65
+ if (this.prevDisabled) {
66
+ return
67
+ }
68
+ this.currentIndex--
69
+ this.$emit('turnPage', this.ids[this.currentIndex])
70
+ },
71
+ }
72
+ }
73
+ </script>
74
+
75
+ <style lang="less" scoped>
76
+ .hr-pager {
77
+ user-select: none;
78
+ position: fixed;
79
+ top: 45%;
80
+ width: 100%;
81
+ box-sizing: border-box;
82
+ padding: 0 29px;
83
+ > img {
84
+ position: absolute;
85
+ width: 97px;
86
+ height: 97px;
87
+ }
88
+ .prev {
89
+ left: 29px;
90
+ }
91
+ .next {
92
+ right: 29px;
93
+ }
94
+ }
95
+ </style>
@@ -0,0 +1,8 @@
1
+
2
+ import HrSearchInput from './src/index.vue'
3
+
4
+ HrSearchInput.install = function (Vue) {
5
+ Vue.component(HrSearchInput.name, HrSearchInput)
6
+ }
7
+
8
+ export default HrSearchInput
@@ -0,0 +1,144 @@
1
+ <script>
2
+ export default {
3
+ name: 'HrSearchInput',
4
+ props: {
5
+ menuConfig: {
6
+ type: Object,
7
+ default () {
8
+ return {
9
+ id: '151596034994370809',
10
+ code: '41f7a32add1745c99c7fecd5ee83f41c'
11
+ }
12
+ }
13
+ },
14
+ placeholder: {
15
+ type: String,
16
+ default () {
17
+ return '搜索'
18
+ }
19
+ }
20
+ },
21
+ data () {
22
+ return {
23
+ searchParam: '',
24
+ isShowinputBox: false
25
+ }
26
+ },
27
+ methods: {
28
+ search (searchParam) {
29
+ this.searchParam = searchParam
30
+ this.isShowinputBox = false
31
+ this.$emit('search', this.searchParam)
32
+ }
33
+ },
34
+ render () {
35
+ const { id, code } = this.menuConfig
36
+ {/* render ipnput bar */ }
37
+ const renderInputBar = () => {
38
+ return <div class="input-bar">
39
+ <van-search
40
+ left-icon={require('../image/search-icon.png')}
41
+ readonly
42
+ value={this.searchParam}
43
+ onClick={() => {
44
+ this.isShowinputBox = true
45
+ }}
46
+ placeholder={this.placeholder} />
47
+ {
48
+ this.searchParam && <img
49
+ class="bar-close"
50
+ onClick={(event) => {
51
+ event.stopPropagation()
52
+ this.search('')
53
+ }}
54
+ src={require('../image/input-close-icon.png')} />
55
+ }
56
+ </div>
57
+ }
58
+
59
+ {/* render input box */ }
60
+ const renderInputBox = () => {
61
+ return <div class="input-box">
62
+ <header class="box-header ksui-header">
63
+ <div class="ksui-nav">
64
+ <ks-nav-bar
65
+ title="搜索"
66
+ left-arrow={true}
67
+ onClick-left={() => {
68
+ this.isShowinputBox = false
69
+ }}>
70
+ </ks-nav-bar>
71
+ </div>
72
+ </header>
73
+ <div class="box-content ksui-body">
74
+ <div class="content-bar">
75
+ <ks-history-search
76
+ placeholder={this.placeholder}
77
+ onSearch={this.search}
78
+ value={this.searchParam}
79
+ onSelect={this.search}
80
+ onCancel={this.search}
81
+ left-icon={require('../image/search-icon.png')}
82
+ menuId={id}
83
+ code={code}>
84
+ </ks-history-search>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ }
89
+
90
+ return <div class="hr-search-input">
91
+ {renderInputBar()}
92
+ {this.isShowinputBox && renderInputBox()}
93
+ </div>
94
+ }
95
+ }
96
+ </script>
97
+
98
+ <style scoped lang="less">
99
+ .hr-search-input {
100
+ display: flex;
101
+ padding-bottom: 10px;
102
+ .input-bar {
103
+ overflow: hidden;
104
+ border-radius: 8px;
105
+ flex: 1;
106
+ position: relative;
107
+ background: #ffffff;
108
+ .van-search {
109
+ padding: 0 !important;
110
+ .van-search__content {
111
+ background: #ffffff;
112
+ }
113
+ }
114
+ .bar-close {
115
+ width: 16px;
116
+ height: 16px;
117
+ position: absolute;
118
+ right: 14px;
119
+ top: 50%;
120
+ transform: translate(0, -50%);
121
+ }
122
+ }
123
+ .input-box {
124
+ position: fixed;
125
+ left: 0;
126
+ top: 0;
127
+ width: 100%;
128
+ height: 100%;
129
+ background: #fff;
130
+ .box-content {
131
+ .content-bar {
132
+ /deep/.van-search {
133
+ .van-search__content {
134
+ background: #f7f8fa;
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ .van-search .van-cell {
142
+ padding: 6px 8px 6px 0;
143
+ }
144
+ </style>
@@ -0,0 +1,3 @@
1
+ import HrSelect from './src/main'
2
+
3
+ export default HrSelect