File tree Expand file tree Collapse file tree 2 files changed +86
-22
lines changed
Vol.Vue3版本/src/components/basic
开发版dev/Vue.NetCore/Vol.Vue3版本/src/components/basic Expand file tree Collapse file tree 2 files changed +86
-22
lines changed Original file line number Diff line number Diff line change 1919 >
2020 </el-option >
2121 </el-select >
22- <el-date-picker
23- style =" width : 210px "
24- clearable
25- size =" small"
26- unlink-panels
22+ <div
23+ class =" date-range"
2724 v-else-if =" ['date', 'datetime'].indexOf(singleSearch.type) != -1"
28- v-model =" searchFormFields[singleSearch.field]"
29- type =" daterange"
30- :value-format =" getDateFormat(singleSearch)"
31- :placeholder =" singleSearch.title"
3225 >
33- </el-date-picker >
26+ <el-date-picker
27+ style =" width : 210px "
28+ :clearable =" false"
29+ size =" small"
30+ unlink-panels
31+ v-model =" searchFormFields[singleSearch.field]"
32+ type =" daterange"
33+ :value-format =" getDateFormat(singleSearch)"
34+ :placeholder =" singleSearch.title"
35+ >
36+ </el-date-picker >
37+ <i
38+ class =" el-icon-circle-close"
39+ @click =" dateRangeClear(singleSearch.field)"
40+ ></i >
41+ </div >
3442 <el-cascader
3543 style =" width : 210px "
3644 clearable
@@ -96,6 +104,9 @@ export default {
96104 this .compareDate (date, item .min ) || ! this .compareDate (date, item .max )
97105 );
98106 },
107+ dateRangeClear (field ) {
108+ this .searchFormFields [field]= [undefined ,undefined ];
109+ },
99110 },
100111 created () {
101112 this .singleSearch .dateType = this .singleSearch .type + " range" ;
@@ -120,4 +131,25 @@ export default {
120131 }
121132 },
122133};
123- </script >
134+ </script >
135+ <style lang="less" scoped>
136+ .date-range {
137+ position : relative ;
138+ > i {
139+ display : none ;
140+ height : 27px ;
141+ line-height : 27px ;
142+ right : 1px ;
143+ top : 3px ;
144+ font-size : 13px ;
145+ color : #b4adad ;
146+ position : absolute ;
147+ padding : 0 6px 0 3px ;
148+ background : #ffff ;
149+ cursor : pointer ;
150+ }
151+ }
152+ .date-range :hover > i {
153+ display : inline-block ;
154+ }
155+ </style >
Original file line number Diff line number Diff line change 1919 >
2020 </el-option >
2121 </el-select >
22- <el-date-picker
23- style =" width : 210px "
24- clearable
25- size =" small"
26- unlink-panels
22+ <div
23+ class =" date-range"
2724 v-else-if =" ['date', 'datetime'].indexOf(singleSearch.type) != -1"
28- v-model =" searchFormFields[singleSearch.field]"
29- type =" daterange"
30- :value-format =" getDateFormat(singleSearch)"
31- :placeholder =" singleSearch.title"
3225 >
33- </el-date-picker >
26+ <el-date-picker
27+ style =" width : 210px "
28+ :clearable =" false"
29+ size =" small"
30+ unlink-panels
31+ v-model =" searchFormFields[singleSearch.field]"
32+ type =" daterange"
33+ :value-format =" getDateFormat(singleSearch)"
34+ :placeholder =" singleSearch.title"
35+ >
36+ </el-date-picker >
37+ <i
38+ class =" el-icon-circle-close"
39+ @click =" dateRangeClear(singleSearch.field)"
40+ ></i >
41+ </div >
3442 <el-cascader
3543 style =" width : 210px "
3644 clearable
@@ -96,6 +104,9 @@ export default {
96104 this .compareDate (date, item .min ) || ! this .compareDate (date, item .max )
97105 );
98106 },
107+ dateRangeClear (field ) {
108+ this .searchFormFields [field]= [undefined ,undefined ];
109+ },
99110 },
100111 created () {
101112 this .singleSearch .dateType = this .singleSearch .type + " range" ;
@@ -120,4 +131,25 @@ export default {
120131 }
121132 },
122133};
123- </script >
134+ </script >
135+ <style lang="less" scoped>
136+ .date-range {
137+ position : relative ;
138+ > i {
139+ display : none ;
140+ height : 27px ;
141+ line-height : 27px ;
142+ right : 1px ;
143+ top : 3px ;
144+ font-size : 13px ;
145+ color : #b4adad ;
146+ position : absolute ;
147+ padding : 0 6px 0 3px ;
148+ background : #ffff ;
149+ cursor : pointer ;
150+ }
151+ }
152+ .date-range :hover > i {
153+ display : inline-block ;
154+ }
155+ </style >
You can’t perform that action at this time.
0 commit comments