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/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.49",
4
+ "version": "0.0.52",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -27,9 +27,10 @@
27
27
  </div>
28
28
  </div>
29
29
  <slot></slot>
30
- <slot v-if="$slots.footer" slot="footer">
30
+
31
+ <template v-if="$slots.footer" slot="footer">
31
32
  <slot name="footer"></slot>
32
- </slot>
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
- <template v-for="(item, index) in options">
4
- <div
5
- class="th-table-search-item"
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
- :key="index"
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"
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
- :key="index"
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
- <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>
37
- </template>
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
- display: flex;
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;