tianheng-ui 0.0.29 → 0.0.30
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 +3 -2
- package/lib/tianheng-ui.js +1 -1
- package/lib/tianheng-ui.js.map +1 -1
- package/package.json +1 -1
- package/packages/table/action.vue +2 -2
- package/packages/table/search.js +8 -0
- package/packages/table/search.vue +37 -35
- package/packages/table/tools.js +4 -4
- package/packages/table/tools.vue +1 -1
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
2
|
+
<div class="th-table-action" @click.stop>
|
3
3
|
<template v-for="(item, index) in actions">
|
4
4
|
<el-button
|
5
5
|
v-if="item.act === 'edit'"
|
@@ -173,7 +173,7 @@ export default {
|
|
173
173
|
</script>
|
174
174
|
|
175
175
|
<style lang="less">
|
176
|
-
.
|
176
|
+
.th-table-action {
|
177
177
|
width: 100%;
|
178
178
|
display: flex;
|
179
179
|
align-items: center;
|
@@ -1,45 +1,47 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="table-search">
|
2
|
+
<div class="th-table-search">
|
3
3
|
<template v-for="(item, index) in options">
|
4
|
-
<
|
4
|
+
<div
|
5
|
+
class="th-table-search-item"
|
5
6
|
v-if="item.type === 'input'"
|
6
|
-
class="table-search-item"
|
7
|
-
v-model="params[item.value]"
|
8
7
|
:key="index"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
>
|
9
|
+
<span class="th-table-search-item-title">{{ item.props.label }}:</span>
|
10
|
+
<el-input
|
11
|
+
v-model="params[item.props.prop]"
|
12
|
+
:style="{ width: item.width + 'px' }"
|
13
|
+
:placeholder="item.placeholder || '请输入'"
|
14
|
+
:size="item.size"
|
15
|
+
clearable
|
16
|
+
></el-input>
|
17
|
+
</div>
|
18
|
+
<div
|
19
|
+
class="th-table-search-item"
|
15
20
|
v-if="item.type === 'date'"
|
16
|
-
class="table-search-item"
|
17
|
-
v-model="params[item.value]"
|
18
21
|
:key="index"
|
19
|
-
:style="{ width: item.width + 'px' }"
|
20
|
-
:type="item.dateType || 'date'"
|
21
|
-
:format="item.format"
|
22
|
-
:value-format="item.valueFormat"
|
23
|
-
:size="item.size || 'mini'"
|
24
|
-
range-separator="至"
|
25
|
-
start-placeholder="开始日期"
|
26
|
-
end-placeholder="结束日期"
|
27
22
|
>
|
28
|
-
|
23
|
+
<span class="th-table-search-item-title">{{ item.props.label }}:</span>
|
24
|
+
<el-date-picker
|
25
|
+
v-model="params[item.props.prop]"
|
26
|
+
:style="{ width: item.width + 'px' }"
|
27
|
+
:type="item.dateType || 'date'"
|
28
|
+
:format="item.format"
|
29
|
+
:value-format="item.valueFormat"
|
30
|
+
:size="item.size"
|
31
|
+
range-separator="至"
|
32
|
+
start-placeholder="开始日期"
|
33
|
+
end-placeholder="结束日期"
|
34
|
+
>
|
35
|
+
</el-date-picker>
|
36
|
+
</div>
|
29
37
|
</template>
|
30
38
|
|
31
|
-
<el-button
|
32
|
-
type="primary"
|
33
|
-
icon="el-icon-search"
|
34
|
-
size="mini"
|
35
|
-
plain
|
36
|
-
@click="doSearch"
|
39
|
+
<el-button type="primary" icon="el-icon-search" plain @click="doSearch"
|
37
40
|
>查询</el-button
|
38
41
|
>
|
39
42
|
<el-button
|
40
43
|
type="primary"
|
41
44
|
icon="el-icon-refresh-right"
|
42
|
-
size="mini"
|
43
45
|
plain
|
44
46
|
@click="doReset"
|
45
47
|
>重置</el-button
|
@@ -84,7 +86,6 @@ export default {
|
|
84
86
|
this.$emit("on-search", this.params);
|
85
87
|
},
|
86
88
|
doReset() {
|
87
|
-
this.params = {};
|
88
89
|
this.$emit("on-reset", this.params);
|
89
90
|
}
|
90
91
|
}
|
@@ -92,15 +93,16 @@ export default {
|
|
92
93
|
</script>
|
93
94
|
|
94
95
|
<style lang="less" scoped>
|
95
|
-
.table-search {
|
96
|
+
.th-table-search {
|
96
97
|
display: flex;
|
97
98
|
align-items: center;
|
98
|
-
margin-bottom:
|
99
|
+
margin-bottom: 20px;
|
99
100
|
&-item {
|
100
|
-
|
101
|
+
display: inline-block;
|
102
|
+
margin-right: 15px;
|
103
|
+
}
|
104
|
+
.th-table-search-item:last-child {
|
105
|
+
margin-right: 20px !important;
|
101
106
|
}
|
102
|
-
}
|
103
|
-
.table-search-item:last-child {
|
104
|
-
margin-right: 20px !important;
|
105
107
|
}
|
106
108
|
</style>
|
package/packages/table/tools.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import TableTools from "./tools.vue";
|
2
2
|
|
3
3
|
/* istanbul ignore next */
|
4
|
-
|
5
|
-
Vue.component(
|
4
|
+
TableTools.install = function(Vue) {
|
5
|
+
Vue.component(TableTools.name, TableTools);
|
6
6
|
};
|
7
7
|
|
8
|
-
export default
|
8
|
+
export default TableTools;
|