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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.0.29",
4
+ "version": "0.0.30",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="thTable-action" @click.stop>
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
- .thTable-action {
176
+ .th-table-action {
177
177
  width: 100%;
178
178
  display: flex;
179
179
  align-items: center;
@@ -0,0 +1,8 @@
1
+ import TableSearch from "./search.vue";
2
+
3
+ /* istanbul ignore next */
4
+ TableSearch.install = function(Vue) {
5
+ Vue.component(TableSearch.name, TableSearch);
6
+ };
7
+
8
+ export default TableSearch;
@@ -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
- <el-input
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
- :style="{ width: item.width + 'px' }"
10
- :placeholder="item.placeholder || '请输入'"
11
- :size="item.size || 'mini'"
12
- clearable
13
- ></el-input>
14
- <el-date-picker
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
- </el-date-picker>
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: 10px;
99
+ margin-bottom: 20px;
99
100
  &-item {
100
- margin-right: 10px;
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>
@@ -1,8 +1,8 @@
1
- import Tools from "./tools.vue";
1
+ import TableTools from "./tools.vue";
2
2
 
3
3
  /* istanbul ignore next */
4
- Tools.install = function(Vue) {
5
- Vue.component(Tools.name, Tools);
4
+ TableTools.install = function(Vue) {
5
+ Vue.component(TableTools.name, TableTools);
6
6
  };
7
7
 
8
- export default Tools;
8
+ export default TableTools;
@@ -16,7 +16,7 @@
16
16
 
17
17
  <script>
18
18
  export default {
19
- name: "ThTools",
19
+ name: "ThTableTools",
20
20
  props: {
21
21
  options: {
22
22
  type: Array,