vsyswin-ui 0.2.54 → 0.2.57
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/lib/vsyswin-ui.common.js +70786 -71276
- package/lib/vsyswin-ui.common.js.map +1 -1
- package/lib/vsyswin-ui.umd.js +70796 -71286
- package/lib/vsyswin-ui.umd.js.map +1 -1
- package/lib/vsyswin-ui.umd.min.js +317 -317
- package/lib/vsyswin-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/index.js +3 -1
- package/packages/input-more/index.js +10 -0
- package/packages/input-more/src/input-more.vue +94 -0
- package/packages/search-bar/src/search-bar.vue +11 -0
- package/packages/simple-search-bar/src/simple-search-bar.vue +8 -2
package/package.json
CHANGED
package/packages/index.js
CHANGED
|
@@ -7,13 +7,14 @@ import selectProject from './select-project' // 项目选择组件
|
|
|
7
7
|
import selectTree from './select-tree' // 表单树选择器
|
|
8
8
|
import SearchBar from './search-bar' // 搜索工具栏
|
|
9
9
|
import simpleSearchBar from './simple-search-bar' // 简单搜索栏组件
|
|
10
|
+
import inputMore from './input-more' // 简单搜索栏组件
|
|
10
11
|
import paging from './paging'
|
|
11
12
|
import newSearchBar from './newSearchBar' // 高级筛选
|
|
12
13
|
import table from './table' // 表格组件
|
|
13
14
|
import dragSet from './drag-set'
|
|
14
15
|
|
|
15
16
|
// 存储组件列表
|
|
16
|
-
const components = [layout, searchTree, selectProject, selectTree, SearchBar, simpleSearchBar, paging, newSearchBar, table, dragSet]
|
|
17
|
+
const components = [layout, searchTree, selectProject, selectTree, SearchBar, simpleSearchBar, inputMore, paging, newSearchBar, table, dragSet]
|
|
17
18
|
|
|
18
19
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
19
20
|
const install = function (Vue) {
|
|
@@ -38,6 +39,7 @@ export default {
|
|
|
38
39
|
selectTree,
|
|
39
40
|
SearchBar,
|
|
40
41
|
simpleSearchBar,
|
|
42
|
+
inputMore,
|
|
41
43
|
paging,
|
|
42
44
|
newSearchBar,
|
|
43
45
|
table,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sy-input-more" :class="{ 'is-active': isActive }" @mouseleave="isActive = false">
|
|
3
|
+
<!-- <input type="text" :title="str" :value="str" :placeholder="placeholder" :maxlength="maxlength" readonly @focus="open" /> -->
|
|
4
|
+
<span class="span-input" :title="str" @click="open" @mouseenter="isActive = true">
|
|
5
|
+
<span class="span-content" v-if="!!str">{{ str }}</span>
|
|
6
|
+
<span v-else class="span-content placeholder">{{ placeholder }}</span>
|
|
7
|
+
<i class="el-icon-circle-close" v-if="!!str && isActive" @click.stop="clearChoosed"></i>
|
|
8
|
+
</span>
|
|
9
|
+
<i class="el-icon-more more-icon" @click="open"></i>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: 'SyInputMore',
|
|
16
|
+
props: {
|
|
17
|
+
placeholder: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '请选择'
|
|
20
|
+
},
|
|
21
|
+
str: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
maxlength: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
isActive: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
clearChoosed() {
|
|
37
|
+
this.$emit('clear')
|
|
38
|
+
},
|
|
39
|
+
open() {
|
|
40
|
+
this.isActive = true
|
|
41
|
+
this.$emit('open')
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="scss" scoped>
|
|
48
|
+
.sy-input-more {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
padding-right: 4px;
|
|
53
|
+
height: 32px;
|
|
54
|
+
line-height: 30px;
|
|
55
|
+
border-radius: 2px;
|
|
56
|
+
border: 1px solid #dcdfe6;
|
|
57
|
+
&.is-active {
|
|
58
|
+
border-color: #027aff;
|
|
59
|
+
}
|
|
60
|
+
.el-input__inner {
|
|
61
|
+
border: none;
|
|
62
|
+
height: 30px;
|
|
63
|
+
line-height: 30px;
|
|
64
|
+
}
|
|
65
|
+
.span-input {
|
|
66
|
+
width: 0;
|
|
67
|
+
flex: 1;
|
|
68
|
+
padding-left: 10px;
|
|
69
|
+
padding-right: 18px;
|
|
70
|
+
position: relative;
|
|
71
|
+
.span-content {
|
|
72
|
+
display: block;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
}
|
|
79
|
+
.el-icon-circle-close {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: 2px;
|
|
82
|
+
top: 50%;
|
|
83
|
+
transform: translateY(-50%);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
.placeholder {
|
|
87
|
+
color: #c0c4cc;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
> .el-icon-more {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
<template v-else-if="item.type === 'select'">
|
|
92
92
|
<span class="syswin-filter-item__name" v-if="item.name && !item.hideName">{{ item.name }}</span>
|
|
93
93
|
<el-select
|
|
94
|
+
size="small"
|
|
94
95
|
:multiple="!!item.multiple"
|
|
95
96
|
collapse-tags
|
|
96
97
|
clearable
|
|
@@ -179,6 +180,7 @@
|
|
|
179
180
|
<template v-else-if="item.type === 'select'">
|
|
180
181
|
<span class="syswin-filter-item__name" v-if="item.name && !item.hideName">{{ item.name }}</span>
|
|
181
182
|
<el-select
|
|
183
|
+
size="small"
|
|
182
184
|
:multiple="!!item.multiple"
|
|
183
185
|
collapse-tags
|
|
184
186
|
clearable
|
|
@@ -251,6 +253,7 @@
|
|
|
251
253
|
<template v-else-if="item.type === 'select'">
|
|
252
254
|
<span class="syswin-filter-item__name" v-if="item.name">{{ item.name }}</span>
|
|
253
255
|
<el-select
|
|
256
|
+
size="small"
|
|
254
257
|
:multiple="!!item.multiple"
|
|
255
258
|
collapse-tags
|
|
256
259
|
clearable
|
|
@@ -823,6 +826,14 @@ export default {
|
|
|
823
826
|
handleClickOutside(e) {
|
|
824
827
|
// console.log(e)
|
|
825
828
|
const target = e.target
|
|
829
|
+
// console.log(target)
|
|
830
|
+
const dialogList = [...document.querySelectorAll('.el-dialog__wrapper')]
|
|
831
|
+
for (let i = 0; i < dialogList.length; i++) {
|
|
832
|
+
if (dialogList[i].contains(target)) {
|
|
833
|
+
return false
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
826
837
|
if (target.classList.contains('el-dialog__wrapper')) {
|
|
827
838
|
// 点击弹窗遮罩时不隐藏
|
|
828
839
|
return false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<div class="header-filter">
|
|
3
3
|
<div class="header-filter-input">
|
|
4
4
|
<slot name="filterInput">
|
|
5
|
-
<el-input class="header-filter-input"
|
|
5
|
+
<el-input class="header-filter-input" size="small" :placeholder="placeholder" @keyup.enter.native="search"
|
|
6
|
+
v-model.trim="keyword" @input="auto && search" @clear="search" clearable>
|
|
6
7
|
<el-button type="primary" slot="append" icon="el-icon-search" @click="search()"></el-button>
|
|
7
8
|
</el-input>
|
|
8
9
|
</slot>
|
|
@@ -32,10 +33,15 @@ export default {
|
|
|
32
33
|
placeholder: {
|
|
33
34
|
type: String,
|
|
34
35
|
default: '请输入搜索关键字'
|
|
36
|
+
},
|
|
37
|
+
// 在input框输入是否自动搜索->也即,是否会自动触发@input事件
|
|
38
|
+
auto: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
35
41
|
}
|
|
36
42
|
},
|
|
37
43
|
methods: {
|
|
38
|
-
search: debounce(200, function() {
|
|
44
|
+
search: debounce(200, function () {
|
|
39
45
|
// 执行搜索事件
|
|
40
46
|
this.$emit('input', this.keyword)
|
|
41
47
|
this.$emit('search', this.keyword)
|