vue2-client 1.13.23 → 1.13.25

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.
@@ -1,131 +1,131 @@
1
- <template>
2
- <div class="x-time-select">
3
- <div class="time-select-container">
4
- <span v-if="label" class="time-select-label">{{ label }}</span>
5
- <div class="picker-wrapper">
6
- <a-range-picker
7
- :value="dateRange"
8
- :placeholder="['开始日期', '结束日期']"
9
- separator="至"
10
- :disabled="disabled"
11
- :allowClear="allowClear"
12
- :format="format"
13
- @change="handleDateChange"
14
- />
15
- </div>
16
- </div>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- import moment from 'moment'
22
-
23
- export default {
24
- name: 'XTimeSelect',
25
- props: {
26
- queryParamsName: {
27
- type: String,
28
- default: null
29
- },
30
- value: {
31
- type: Array,
32
- default: () => []
33
- },
34
- disabled: {
35
- type: Boolean,
36
- default: false
37
- },
38
- allowClear: {
39
- type: Boolean,
40
- default: true
41
- },
42
- format: {
43
- type: String,
44
- default: 'YYYY/MM/DD'
45
- }
46
- },
47
- data () {
48
- return {
49
- dateRange: [],
50
- label: ''
51
- }
52
- },
53
- watch: {
54
- value: {
55
- handler (newVal) {
56
- if (newVal && newVal.length === 2) {
57
- this.dateRange = [
58
- newVal[0] ? moment(newVal[0]) : null,
59
- newVal[1] ? moment(newVal[1]) : null
60
- ]
61
- } else {
62
- this.dateRange = []
63
- }
64
- },
65
- immediate: true,
66
- deep: true
67
- }
68
- },
69
- created () {
70
- this.getData(this.queryParamsName)
71
- },
72
- methods: {
73
- handleDateChange (dates, dateStrings) {
74
- this.dateRange = dates
75
- console.warn(dateStrings)
76
- this.$emit('change', dateStrings)
77
- },
78
- getData (data) {
79
- this.label = data
80
- }
81
- }
82
- }
83
- </script>
84
-
85
- <style scoped>
86
- .x-time-select {
87
- position: relative;
88
- width: 100%;
89
- box-sizing: border-box;
90
- display: block;
91
- }
92
-
93
- .time-select-container {
94
- display: flex;
95
- align-items: center;
96
- }
97
-
98
- .time-select-label {
99
- white-space: nowrap;
100
- color: rgba(0, 0, 0, 0.85);
101
- padding-right: 8px;
102
- }
103
-
104
- .picker-wrapper {
105
- flex: 1;
106
- }
107
-
108
- .x-time-select :deep(.ant-picker-range),
109
- .x-time-select :deep(.ant-picker) {
110
- width: 100%;
111
- height: 30px;
112
- border-radius: 7px;
113
- background: #FFFFFF;
114
- border: 1px solid #E5E9F0;
115
- }
116
- .x-time-select :deep(.ant-calendar-picker) {
117
- width: 100%;
118
- display: block;
119
- }
120
- .x-time-select :deep(.ant-calendar-picker-input) {
121
- width: 100%;
122
- height: 30px;
123
- border-radius: 7px;
124
- background: #FFFFFF;
125
- border: 1px solid #E5E9F0;
126
- }
127
-
128
- .x-time-select :deep(.ant-input) {
129
- width: 100%;
130
- }
131
- </style>
1
+ <template>
2
+ <div class="x-time-select">
3
+ <div class="time-select-container">
4
+ <span v-if="label" class="time-select-label">{{ label }}</span>
5
+ <div class="picker-wrapper">
6
+ <a-range-picker
7
+ :value="dateRange"
8
+ :placeholder="['开始日期', '结束日期']"
9
+ separator="至"
10
+ :disabled="disabled"
11
+ :allowClear="allowClear"
12
+ :format="format"
13
+ @change="handleDateChange"
14
+ />
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import moment from 'moment'
22
+
23
+ export default {
24
+ name: 'XTimeSelect',
25
+ props: {
26
+ queryParamsName: {
27
+ type: String,
28
+ default: null
29
+ },
30
+ value: {
31
+ type: Array,
32
+ default: () => []
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ allowClear: {
39
+ type: Boolean,
40
+ default: true
41
+ },
42
+ format: {
43
+ type: String,
44
+ default: 'YYYY/MM/DD'
45
+ }
46
+ },
47
+ data () {
48
+ return {
49
+ dateRange: [],
50
+ label: ''
51
+ }
52
+ },
53
+ watch: {
54
+ value: {
55
+ handler (newVal) {
56
+ if (newVal && newVal.length === 2) {
57
+ this.dateRange = [
58
+ newVal[0] ? moment(newVal[0]) : null,
59
+ newVal[1] ? moment(newVal[1]) : null
60
+ ]
61
+ } else {
62
+ this.dateRange = []
63
+ }
64
+ },
65
+ immediate: true,
66
+ deep: true
67
+ }
68
+ },
69
+ created () {
70
+ this.getData(this.queryParamsName)
71
+ },
72
+ methods: {
73
+ handleDateChange (dates, dateStrings) {
74
+ this.dateRange = dates
75
+ console.warn(dateStrings)
76
+ this.$emit('change', dateStrings)
77
+ },
78
+ getData (data) {
79
+ this.label = data
80
+ }
81
+ }
82
+ }
83
+ </script>
84
+
85
+ <style scoped>
86
+ .x-time-select {
87
+ position: relative;
88
+ width: 100%;
89
+ box-sizing: border-box;
90
+ display: block;
91
+ }
92
+
93
+ .time-select-container {
94
+ display: flex;
95
+ align-items: center;
96
+ }
97
+
98
+ .time-select-label {
99
+ white-space: nowrap;
100
+ color: rgba(0, 0, 0, 0.85);
101
+ padding-right: 8px;
102
+ }
103
+
104
+ .picker-wrapper {
105
+ flex: 1;
106
+ }
107
+
108
+ .x-time-select :deep(.ant-picker-range),
109
+ .x-time-select :deep(.ant-picker) {
110
+ width: 100%;
111
+ height: 30px;
112
+ border-radius: 7px;
113
+ background: #FFFFFF;
114
+ border: 1px solid #E5E9F0;
115
+ }
116
+ .x-time-select :deep(.ant-calendar-picker) {
117
+ width: 100%;
118
+ display: block;
119
+ }
120
+ .x-time-select :deep(.ant-calendar-picker-input) {
121
+ width: 100%;
122
+ height: 30px;
123
+ border-radius: 7px;
124
+ background: #FFFFFF;
125
+ border: 1px solid #E5E9F0;
126
+ }
127
+
128
+ .x-time-select :deep(.ant-input) {
129
+ width: 100%;
130
+ }
131
+ </style>
@@ -1,62 +1,62 @@
1
- <template>
2
- <div class="x-title" :class="{ 'with-underline': hasUnderline, 'only-line': isOnlyLine }">
3
- <span v-show="!isOnlyLine">{{ processedTitle }}</span>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: 'XTitle',
10
- props: {
11
- queryParamsName: {
12
- type: String,
13
- default: null
14
- }
15
- },
16
- data () {
17
- return {
18
- title: ''
19
- }
20
- },
21
- computed: {
22
- processedTitle () {
23
- return this.title.replace('</br>', '')
24
- },
25
- hasUnderline () {
26
- return this.title.includes('</br>')
27
- },
28
- isOnlyLine () {
29
- return this.title === '</br>'
30
- }
31
- },
32
- created () {
33
- this.getData(this.queryParamsName)
34
- },
35
- methods: {
36
- getData (data) {
37
- this.title = data
38
- }
39
- }
40
- }
41
- </script>
42
- <style scoped>
43
- .x-title {
44
- font-size: 18px;
45
- font-weight: bold;
46
- height: 26px;
47
- width: 100%;
48
- text-align: left;
49
- font-family: "Source Han Sans", sans-serif;
50
- color: #5D5C5C;
51
- }
52
-
53
- .with-underline {
54
- border-bottom: 1px solid #5D5C5C;
55
- }
56
-
57
- .only-line {
58
- height: 1px;
59
- background-color: #5D5C5C;
60
- margin: 13px 0;
61
- }
62
- </style>
1
+ <template>
2
+ <div class="x-title" :class="{ 'with-underline': hasUnderline, 'only-line': isOnlyLine }">
3
+ <span v-show="!isOnlyLine">{{ processedTitle }}</span>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'XTitle',
10
+ props: {
11
+ queryParamsName: {
12
+ type: String,
13
+ default: null
14
+ }
15
+ },
16
+ data () {
17
+ return {
18
+ title: ''
19
+ }
20
+ },
21
+ computed: {
22
+ processedTitle () {
23
+ return this.title.replace('</br>', '')
24
+ },
25
+ hasUnderline () {
26
+ return this.title.includes('</br>')
27
+ },
28
+ isOnlyLine () {
29
+ return this.title === '</br>'
30
+ }
31
+ },
32
+ created () {
33
+ this.getData(this.queryParamsName)
34
+ },
35
+ methods: {
36
+ getData (data) {
37
+ this.title = data
38
+ }
39
+ }
40
+ }
41
+ </script>
42
+ <style scoped>
43
+ .x-title {
44
+ font-size: 18px;
45
+ font-weight: bold;
46
+ height: 26px;
47
+ width: 100%;
48
+ text-align: left;
49
+ font-family: "Source Han Sans", sans-serif;
50
+ color: #5D5C5C;
51
+ }
52
+
53
+ .with-underline {
54
+ border-bottom: 1px solid #5D5C5C;
55
+ }
56
+
57
+ .only-line {
58
+ height: 1px;
59
+ background-color: #5D5C5C;
60
+ margin: 13px 0;
61
+ }
62
+ </style>