tianheng-ui 0.0.49 → 0.0.52
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/index.js +1 -1
- package/lib/tianheng-ui.js +2 -2
- package/package.json +1 -1
- package/packages/dialog/index.vue +3 -2
- package/packages/table/search.vue +60 -35
package/package.json
CHANGED
@@ -27,9 +27,10 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
<slot></slot>
|
30
|
-
|
30
|
+
|
31
|
+
<template v-if="$slots.footer" slot="footer">
|
31
32
|
<slot name="footer"></slot>
|
32
|
-
</
|
33
|
+
</template>
|
33
34
|
<span v-else slot="footer">
|
34
35
|
<el-button
|
35
36
|
v-if="showAffirm"
|
@@ -1,40 +1,63 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="th-table-search">
|
3
|
-
<
|
4
|
-
|
5
|
-
|
3
|
+
<div
|
4
|
+
class="th-table-search-item"
|
5
|
+
v-for="(item, index) in options"
|
6
|
+
:key="index"
|
7
|
+
>
|
8
|
+
<span class="th-table-search-item-title">{{ item.options.name }}:</span>
|
9
|
+
<el-input
|
6
10
|
v-if="item.type === 'input'"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
:size="item.size"
|
15
|
-
clearable
|
16
|
-
></el-input>
|
17
|
-
</div>
|
18
|
-
<div
|
19
|
-
class="th-table-search-item"
|
11
|
+
v-model="params[item.options.prop]"
|
12
|
+
:style="{ width: item.options.width + 'px' }"
|
13
|
+
:placeholder="item.options.placeholder || '请输入'"
|
14
|
+
:disabled="item.options.disabled"
|
15
|
+
clearable
|
16
|
+
></el-input>
|
17
|
+
<el-date-picker
|
20
18
|
v-if="item.type === 'date'"
|
21
|
-
|
19
|
+
v-model="params[item.options.prop]"
|
20
|
+
:style="{ width: item.options.width + 'px' }"
|
21
|
+
:type="item.options.dateType || 'date'"
|
22
|
+
:format="item.options.format"
|
23
|
+
:value-format="item.options.valueFormat"
|
24
|
+
range-separator="至"
|
25
|
+
start-placeholder="开始日期"
|
26
|
+
end-placeholder="结束日期"
|
27
|
+
clearable
|
22
28
|
>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
29
|
+
</el-date-picker>
|
30
|
+
<el-select
|
31
|
+
v-if="item.type === 'select'"
|
32
|
+
v-model="params[item.options.prop]"
|
33
|
+
:style="{ width: item.options.width + 'px' }"
|
34
|
+
:placeholder="item.options.placeholder || '请选择'"
|
35
|
+
:multiple="item.options.multiple"
|
36
|
+
:multiple-limit="item.options.multipleLimit"
|
37
|
+
:filterable="item.options.filterable"
|
38
|
+
:disabled="item.options.disabled"
|
39
|
+
clearable
|
40
|
+
>
|
41
|
+
<template v-if="item.options.remote">
|
42
|
+
<el-option
|
43
|
+
v-for="option in item.options.options"
|
44
|
+
:key="option[item.option.props.value]"
|
45
|
+
:label="option[item.option.props.label]"
|
46
|
+
:value="option[item.option.props.value]"
|
47
|
+
>
|
48
|
+
</el-option>
|
49
|
+
</template>
|
50
|
+
<template v-else>
|
51
|
+
<el-option
|
52
|
+
v-for="option in item.options.options"
|
53
|
+
:key="option.value"
|
54
|
+
:label="option.label"
|
55
|
+
:value="option.value"
|
56
|
+
>
|
57
|
+
</el-option>
|
58
|
+
</template>
|
59
|
+
</el-select>
|
60
|
+
</div>
|
38
61
|
|
39
62
|
<el-button type="primary" icon="el-icon-search" plain @click="doSearch"
|
40
63
|
>查询</el-button
|
@@ -94,12 +117,14 @@ export default {
|
|
94
117
|
|
95
118
|
<style lang="less" scoped>
|
96
119
|
.th-table-search {
|
97
|
-
|
98
|
-
align-items: center;
|
99
|
-
margin-bottom: 20px;
|
120
|
+
margin-bottom: 15px;
|
100
121
|
&-item {
|
101
122
|
display: inline-block;
|
102
123
|
margin-right: 15px;
|
124
|
+
margin-bottom: 10px;
|
125
|
+
&-title {
|
126
|
+
font-size: 14px;
|
127
|
+
}
|
103
128
|
}
|
104
129
|
.th-table-search-item:last-child {
|
105
130
|
margin-right: 20px !important;
|