byt-ui 0.0.17 → 0.0.19

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,6 +1,6 @@
1
1
  {
2
2
  "name": "byt-ui",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "private": false,
5
5
  "description": "byt组件库",
6
6
  "author": {
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-10-18 12:37:03
5
- * @LastEditTime: 2022-11-16 20:11:01
5
+ * @LastEditTime: 2023-07-11 14:28:17
6
6
  * @LastEditors: 王国火
7
7
  */
8
8
  import Cookie from 'js-cookie'
@@ -29,5 +29,9 @@ export const setCookie = (key, value, expires = 7, path = '/') => {
29
29
  }
30
30
 
31
31
  export const removeCookie = (key, path = '/') => {
32
- return Cookie.remove(`${website.key}-${key}`, { path })
32
+ console.log(`${website.key}-${key}`)
33
+ return Cookie.remove(`${website.key}-${key}`, {
34
+ path,
35
+ domain:window.location.hostname
36
+ })
33
37
  }
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-07-12 17:47:20
5
- * @LastEditTime: 2023-06-07 08:31:20
6
- * @LastEditors: 王国火
5
+ * @LastEditTime: 2023-09-13 09:50:53
6
+ * @LastEditors: hcm
7
7
  -->
8
8
 
9
9
  <template>
@@ -19,7 +19,11 @@
19
19
  @reset="onReset"
20
20
  @init="init"
21
21
  v-model="searchForm"
22
- ></FormView>
22
+ >
23
+ <template #filters>
24
+ <slot name="filters"></slot>
25
+ </template>
26
+ </FormView>
23
27
  </div>
24
28
 
25
29
  <div class="action-view">
@@ -59,7 +63,7 @@
59
63
  <vxe-column
60
64
  :fixed="column.fixed"
61
65
  v-else-if="column.slot"
62
- :width="column.width||'auto'"
66
+ :width="column.width"
63
67
  :title="column.label"
64
68
  :align="column.align||'center'"
65
69
  :key="index"
@@ -86,7 +90,7 @@
86
90
  :type="column.type"
87
91
  v-else
88
92
  :field="column.key"
89
- :width="column.width||'auto'"
93
+ :width="column.width"
90
94
  :title="column.label"
91
95
  :align="column.align||'center'"
92
96
  :key="index"
@@ -2,15 +2,16 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-07-13 08:46:34
5
- * @LastEditTime: 2023-06-07 08:53:12
6
- * @LastEditors: 王国火
5
+ * @LastEditTime: 2023-09-13 09:54:09
6
+ * @LastEditors: hcm
7
7
  -->
8
8
  <!-- -->
9
9
  <template>
10
10
  <el-form ref="form" :model="form" :inline="inline" :label-width="`${labelWidth}px`">
11
11
  <el-form-item :label="item.label" :key="index" v-for="(item,index) in searchList">
12
12
  <template v-if="item.type=='input' || !item.type">
13
- <el-input v-model="form[item.key]" clearable :placeholder="`请输入${item.label}`"></el-input>
13
+ <!-- update by hcm 回车触发过滤 -->
14
+ <el-input v-model="form[item.key]" clearable :placeholder="`请输入${item.label}`" @keyup.enter.native="onSearch"></el-input>
14
15
  </template>
15
16
 
16
17
  <template v-if="item.type=='cascader'">
@@ -59,6 +60,22 @@
59
60
  >
60
61
  </el-date-picker>
61
62
  </template>
63
+
64
+ <!-- add by hcm 加时间区间类型-->
65
+ <template v-if="item.type=='datetimerange'">
66
+ <el-date-picker
67
+ v-model="form[item.key]"
68
+ type="datetimerange"
69
+ range-separator="至"
70
+ start-placeholder="开始时间"
71
+ end-placeholder="结束时间"
72
+ value-format="yyyy-MM-dd"
73
+ :picker-options="pickerOptions"
74
+ >
75
+ </el-date-picker>
76
+ </template>
77
+ <!-- add by hcm 加插槽 增加灵活性 -->
78
+ <slot name="filters"></slot>
62
79
  </el-form-item>
63
80
 
64
81
  <el-form-item>