@neatui/vue 2.10.0 → 2.12.0
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 +1 -1
- package/src/components/basic/LayerView/Layer.vue +0 -16
- package/src/components/display/Calendar.vue +14 -14
- package/src/components/display/CalendarReg.vue +14 -14
- package/src/components/display/Tree.vue +6 -6
- package/src/components/form/Cascader.vue +20 -20
- package/src/components/form/DatePicker.vue +8 -9
- package/src/components/form/DateRangePicker@v3.vue +5 -5
- package/src/components/form/DateRangeView@v3.vue +9 -9
- package/src/components/form/DateView.vue +14 -14
- package/src/components/form/DateView@v2.vue +14 -14
- package/src/components/form/DateView@v3.vue +17 -15
- package/src/components/form/Input@v3.vue +2 -2
- package/src/components/form/MoreSelect@v3.vue +27 -8
- package/src/components/form/MoreSelectList.vue +1 -1
- package/src/components/form/MoreSelectPanel@v3.vue +4 -4
- package/src/components/form/MoreSelectPicker.vue +1 -1
- package/src/components/form/MoreSelectTags.vue +1 -1
- package/src/components/form/PageMoreSelect.vue +15 -15
- package/src/components/form/PageSelect.vue +17 -17
- package/src/components/form/SearchMoreSelect.vue +1 -1
- package/src/components/form/SearchSelect@v3.vue +4 -4
- package/src/components/form/Select@v3.vue +13 -10
- package/src/components/form/SelectList.vue +8 -8
- package/src/components/form/SelectPicker.vue +7 -7
- package/src/components/form/SelectTags.vue +7 -7
- package/src/components/form/SelectTree/SelectTree@v1.vue +6 -6
- package/src/components/form/Switch.vue +38 -103
- package/src/components/form/Textarea@v2.vue +275 -0
- package/src/components/form/TimeView.vue +14 -14
- package/src/components/form/Upload.vue +52 -9
- package/src/components/form/date.ts +321 -0
- package/src/components/form/index.ts +2 -2
- package/src/components/form/number.ts +3 -0
- package/src/components/form/type.ts +224 -0
- package/src/components/loader/FormLoader/FormLoader@v2.vue +20 -20
- package/src/components/loader/FormLoader/FormLoader@v3.vue.backup +372 -291
- package/src/components/loader/FormLoader/FormRender@v3.vue.backup +4 -0
- package/src/components/loader/FormLoader/NodeLoader.vue +85 -0
- package/src/components/loader/FormLoader@v1/FormLoader.vue +1 -1
- package/src/components/loader/FormLoader@v1/FormRender.vue +49 -24
- package/src/components/loader/LayerLoader/LayerLoader.vue +1 -1
- package/src/components/loader/LimitLoader/LimitLoader@v3.vue +1 -1
- package/src/components/loader/MoveLoader/MoveLoader.vue +8 -8
- package/src/components/loader/TableLoader/TableLoader.vue +14 -9
- package/src/components/loader/TableLoader/TableRender.vue +100 -70
- package/src/components/loader/index.ts +1 -1
- package/src/components/tools/Pagination@a.vue +1 -1
- package/tsconfig.json +1 -1
- package/src/components/loader/FormLoader/index.ts +0 -2
package/package.json
CHANGED
|
@@ -200,8 +200,6 @@
|
|
|
200
200
|
</script>
|
|
201
201
|
|
|
202
202
|
<style lang="scss">
|
|
203
|
-
@use '@neatui/css' as neatui;
|
|
204
|
-
|
|
205
203
|
// 弹层
|
|
206
204
|
.fekit-layer {
|
|
207
205
|
position: fixed;
|
|
@@ -265,18 +263,4 @@
|
|
|
265
263
|
}
|
|
266
264
|
}
|
|
267
265
|
}
|
|
268
|
-
|
|
269
|
-
@include neatui.mob {
|
|
270
|
-
.fekit-layer-close {
|
|
271
|
-
top: 1.5em;
|
|
272
|
-
right: 1.5em;
|
|
273
|
-
|
|
274
|
-
color: var(--co-fore);
|
|
275
|
-
top: auto;
|
|
276
|
-
right: auto;
|
|
277
|
-
left: 50%;
|
|
278
|
-
bottom: -2.5rem;
|
|
279
|
-
box-shadow: 0 0 0 2px currentColor;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
266
|
</style>
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<div
|
|
20
20
|
ui-flex="col cm"
|
|
21
21
|
class="r-ss b-solid bk-none b-xs"
|
|
22
|
-
:class="`${item.isToday ? 'bk-main-ls' : item.isLastMonth || item.isNextMonth ? 'co-note' : item.isHoliday ? 'co-risk' : ''} ${
|
|
23
|
-
state.selected && state.selected === item.date ? 'active bg-main-ls co-fore' : 'hover-bg-weak'
|
|
22
|
+
:class="`${item.isToday ? 'bk-main-o-ls' : item.isLastMonth || item.isNextMonth ? 'co-note' : item.isHoliday ? 'co-risk' : ''} ${
|
|
23
|
+
state.selected && state.selected === item.date ? 'active bg-main-o-ls co-fore' : 'hover-bg-weak'
|
|
24
24
|
}`"
|
|
25
25
|
>
|
|
26
26
|
<span>{{ item.day }}</span>
|
|
@@ -108,40 +108,40 @@
|
|
|
108
108
|
// 提示文案
|
|
109
109
|
tips: {
|
|
110
110
|
type: String,
|
|
111
|
-
default: ''
|
|
111
|
+
default: '',
|
|
112
112
|
},
|
|
113
113
|
// 提示文案
|
|
114
114
|
placeholder: {
|
|
115
115
|
type: String,
|
|
116
|
-
default: ''
|
|
116
|
+
default: '',
|
|
117
117
|
},
|
|
118
118
|
// 格式
|
|
119
119
|
format: {
|
|
120
120
|
type: String,
|
|
121
|
-
default: ''
|
|
121
|
+
default: '',
|
|
122
122
|
},
|
|
123
123
|
// 值
|
|
124
124
|
value: {
|
|
125
125
|
type: [String, Number],
|
|
126
|
-
default: ''
|
|
126
|
+
default: '',
|
|
127
127
|
},
|
|
128
128
|
// 值
|
|
129
129
|
modelValue: { type: [String, Number], default: '' },
|
|
130
130
|
// 节假日
|
|
131
131
|
holiday: {
|
|
132
132
|
type: Object,
|
|
133
|
-
default: () => ({})
|
|
133
|
+
default: () => ({}),
|
|
134
134
|
},
|
|
135
135
|
// 校验规则
|
|
136
136
|
rules: {
|
|
137
137
|
type: Array,
|
|
138
|
-
default: () => []
|
|
138
|
+
default: () => [],
|
|
139
139
|
},
|
|
140
140
|
// 是否是示校验图标
|
|
141
141
|
verify: {
|
|
142
142
|
type: Boolean,
|
|
143
|
-
default: false
|
|
144
|
-
}
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
// 内部数据
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
calendar.unshift({
|
|
187
187
|
date: `${last_y}-${last_m}-${prevdays}`,
|
|
188
188
|
day: prevdays,
|
|
189
|
-
isLastMonth: 1
|
|
189
|
+
isLastMonth: 1,
|
|
190
190
|
});
|
|
191
191
|
prevdays = prevdays - 1;
|
|
192
192
|
}
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
day: _i,
|
|
198
198
|
isToday: curr_y === y && curr_m === m && curr_d === i,
|
|
199
199
|
isHoliday: props.holiday[`${y}-${m}-${_i}`]?.name ? 1 : 0,
|
|
200
|
-
holiday: props.holiday[`${y}-${m}-${_i}`]?.name
|
|
200
|
+
holiday: props.holiday[`${y}-${m}-${_i}`]?.name,
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
for (let i = 1; calendar.length < 42; i++) {
|
|
@@ -205,14 +205,14 @@
|
|
|
205
205
|
calendar.push({
|
|
206
206
|
date: `${next_y}-${next_m}-${_i}`,
|
|
207
207
|
day: _i,
|
|
208
|
-
isNextMonth: 1
|
|
208
|
+
isNextMonth: 1,
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
return { days: calendar, y, m, d };
|
|
212
212
|
}),
|
|
213
213
|
value: computed(() => {
|
|
214
214
|
return props.format ? idate(state.selected || props.value).format(props.format) : state.selected || props.value;
|
|
215
|
-
})
|
|
215
|
+
}),
|
|
216
216
|
});
|
|
217
217
|
const { curr = {} }: any = toRefs(state);
|
|
218
218
|
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<div
|
|
20
20
|
ui-flex="col cm"
|
|
21
21
|
class="r-ss b-solid bk-none b-xs"
|
|
22
|
-
:class="`${item.isToday ? 'bk-main-ls' : item.isLastMonth || item.isNextMonth ? 'co-note' : item.isHoliday ? 'co-risk' : ''} ${
|
|
23
|
-
state.selected && state.selected === item.date ? 'active bg-main-ls co-fore' : 'hover-bg-weak'
|
|
22
|
+
:class="`${item.isToday ? 'bk-main-o-ls' : item.isLastMonth || item.isNextMonth ? 'co-note' : item.isHoliday ? 'co-risk' : ''} ${
|
|
23
|
+
state.selected && state.selected === item.date ? 'active bg-main-o-ls co-fore' : 'hover-bg-weak'
|
|
24
24
|
}`"
|
|
25
25
|
>
|
|
26
26
|
<span>{{ item.day }}</span>
|
|
@@ -108,40 +108,40 @@
|
|
|
108
108
|
// 提示文案
|
|
109
109
|
tips: {
|
|
110
110
|
type: String,
|
|
111
|
-
default: ''
|
|
111
|
+
default: '',
|
|
112
112
|
},
|
|
113
113
|
// 提示文案
|
|
114
114
|
placeholder: {
|
|
115
115
|
type: String,
|
|
116
|
-
default: ''
|
|
116
|
+
default: '',
|
|
117
117
|
},
|
|
118
118
|
// 格式
|
|
119
119
|
format: {
|
|
120
120
|
type: String,
|
|
121
|
-
default: ''
|
|
121
|
+
default: '',
|
|
122
122
|
},
|
|
123
123
|
// 值
|
|
124
124
|
value: {
|
|
125
125
|
type: [String, Number],
|
|
126
|
-
default: ''
|
|
126
|
+
default: '',
|
|
127
127
|
},
|
|
128
128
|
// 值
|
|
129
129
|
modelValue: { type: [String, Number], default: '' },
|
|
130
130
|
// 节假日
|
|
131
131
|
holiday: {
|
|
132
132
|
type: Object,
|
|
133
|
-
default: () => ({})
|
|
133
|
+
default: () => ({}),
|
|
134
134
|
},
|
|
135
135
|
// 校验规则
|
|
136
136
|
rules: {
|
|
137
137
|
type: Array,
|
|
138
|
-
default: () => []
|
|
138
|
+
default: () => [],
|
|
139
139
|
},
|
|
140
140
|
// 是否是示校验图标
|
|
141
141
|
verify: {
|
|
142
142
|
type: Boolean,
|
|
143
|
-
default: false
|
|
144
|
-
}
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
// 内部数据
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
calendar.unshift({
|
|
187
187
|
date: `${last_y}-${last_m}-${prevdays}`,
|
|
188
188
|
day: prevdays,
|
|
189
|
-
isLastMonth: 1
|
|
189
|
+
isLastMonth: 1,
|
|
190
190
|
});
|
|
191
191
|
prevdays = prevdays - 1;
|
|
192
192
|
}
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
day: _i,
|
|
198
198
|
isToday: curr_y === y && curr_m === m && curr_d === i,
|
|
199
199
|
isHoliday: props.holiday[`${y}-${m}-${_i}`]?.name ? 1 : 0,
|
|
200
|
-
holiday: props.holiday[`${y}-${m}-${_i}`]?.name
|
|
200
|
+
holiday: props.holiday[`${y}-${m}-${_i}`]?.name,
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
for (let i = 1; calendar.length < 42; i++) {
|
|
@@ -205,14 +205,14 @@
|
|
|
205
205
|
calendar.push({
|
|
206
206
|
date: `${next_y}-${next_m}-${_i}`,
|
|
207
207
|
day: _i,
|
|
208
|
-
isNextMonth: 1
|
|
208
|
+
isNextMonth: 1,
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
return { days: calendar, y, m, d };
|
|
212
212
|
}),
|
|
213
213
|
value: computed(() => {
|
|
214
214
|
return props.format ? idate(state.selected || props.value).format(props.format) : state.selected || props.value;
|
|
215
|
-
})
|
|
215
|
+
}),
|
|
216
216
|
});
|
|
217
217
|
const { curr = {} }: any = toRefs(state);
|
|
218
218
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ul :class="`${root ? '' : 'nl-ms'}`">
|
|
3
3
|
<li v-if="root" class="pr">
|
|
4
|
-
<div ui-form="@a sz: co:risk type:none :block" class="full
|
|
4
|
+
<div ui-form="@a sz: co:risk type:none :block" class="w-full">
|
|
5
5
|
<div style="left: 0.75em" :ui-form-tips="state.error.ontips">{{ state.error.tips }}</div>
|
|
6
6
|
</div>
|
|
7
7
|
</li>
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
line: false,
|
|
157
157
|
interacted: false,
|
|
158
158
|
rules: () => [],
|
|
159
|
-
block: false
|
|
159
|
+
block: false,
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
/*
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
error: {},
|
|
228
228
|
// 用户是否交互
|
|
229
229
|
interacted: false,
|
|
230
|
-
tree: [] as Array<Record<string, any
|
|
230
|
+
tree: [] as Array<Record<string, any>>,
|
|
231
231
|
});
|
|
232
232
|
|
|
233
233
|
watch(
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
return n;
|
|
248
248
|
});
|
|
249
249
|
},
|
|
250
|
-
{ deep: true, immediate: true }
|
|
250
|
+
{ deep: true, immediate: true },
|
|
251
251
|
);
|
|
252
252
|
|
|
253
253
|
// 获取节点勾选状态
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
change(state.selected);
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
|
-
{ deep: true, immediate: true }
|
|
303
|
+
{ deep: true, immediate: true },
|
|
304
304
|
);
|
|
305
305
|
|
|
306
306
|
// 校验
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
state.error = { tips: props.tips, ontips: props.tips ? 'show' : '', verify: '', co: '' };
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
|
-
{ deep: true, immediate: true }
|
|
362
|
+
{ deep: true, immediate: true },
|
|
363
363
|
);
|
|
364
364
|
</script>
|
|
365
365
|
<style lang="scss" scoped>
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
|
|
88
88
|
<script lang="ts" setup>
|
|
89
89
|
import { reactive, ref, watch, computed } from 'vue';
|
|
90
|
-
import { Input } from '
|
|
90
|
+
import { Input } from '.';
|
|
91
91
|
import IFollowView from '../basic/IFollowView.vue';
|
|
92
92
|
import { deepcopy } from '@fekit/utils';
|
|
93
93
|
|
|
@@ -101,49 +101,49 @@
|
|
|
101
101
|
// 提示文案
|
|
102
102
|
tips: {
|
|
103
103
|
type: String,
|
|
104
|
-
default: ''
|
|
104
|
+
default: '',
|
|
105
105
|
},
|
|
106
106
|
placeholder: {
|
|
107
107
|
type: String,
|
|
108
|
-
default: ''
|
|
108
|
+
default: '',
|
|
109
109
|
},
|
|
110
110
|
options: {
|
|
111
111
|
type: Array as () => any[],
|
|
112
|
-
default: () => []
|
|
112
|
+
default: () => [],
|
|
113
113
|
},
|
|
114
114
|
ui: {
|
|
115
115
|
type: Object,
|
|
116
|
-
default: () => ({ sz: 'm' })
|
|
116
|
+
default: () => ({ sz: 'm' }),
|
|
117
117
|
},
|
|
118
118
|
modelValue: {
|
|
119
119
|
type: [String, Number, Array as () => any[]],
|
|
120
|
-
default: ''
|
|
120
|
+
default: '',
|
|
121
121
|
},
|
|
122
122
|
tools: {
|
|
123
123
|
type: Boolean,
|
|
124
|
-
default: true
|
|
124
|
+
default: true,
|
|
125
125
|
},
|
|
126
126
|
spare: {
|
|
127
127
|
type: String,
|
|
128
|
-
default: '当前没有可选项'
|
|
128
|
+
default: '当前没有可选项',
|
|
129
129
|
},
|
|
130
130
|
multiple: {
|
|
131
131
|
type: Boolean,
|
|
132
|
-
default: false
|
|
132
|
+
default: false,
|
|
133
133
|
},
|
|
134
134
|
// 单选时生效,当为true时选中任何一级节点都生效
|
|
135
135
|
changeOnSelect: {
|
|
136
136
|
type: Boolean,
|
|
137
|
-
default: false
|
|
137
|
+
default: false,
|
|
138
138
|
},
|
|
139
139
|
readonly: {
|
|
140
140
|
type: Boolean,
|
|
141
|
-
default: false
|
|
141
|
+
default: false,
|
|
142
142
|
},
|
|
143
143
|
disabled: {
|
|
144
144
|
type: Boolean,
|
|
145
|
-
default: false
|
|
146
|
-
}
|
|
145
|
+
default: false,
|
|
146
|
+
},
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
const emit = defineEmits(['update:modelValue']);
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
flatOpts: [], // 拉平的数据
|
|
157
157
|
selectd: { label: '', value: '' },
|
|
158
158
|
transSelected: { label: '', value: [] }, // 单选选中节点 - 单选过渡节点(记录选中的级联节点)
|
|
159
|
-
checkAll: false //全选
|
|
159
|
+
checkAll: false, //全选
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
// modelValue与input组件的v-model绑定属性重复,会造成覆盖问题。需要删掉
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
} else {
|
|
373
373
|
state.selectd = {
|
|
374
374
|
label: '',
|
|
375
|
-
value: props.multiple ? [] : ''
|
|
375
|
+
value: props.multiple ? [] : '',
|
|
376
376
|
};
|
|
377
377
|
handleCheck(true);
|
|
378
378
|
}
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
const remove = () => {
|
|
383
383
|
state.selectd = {
|
|
384
384
|
label: '',
|
|
385
|
-
value: props.multiple ? [] : ''
|
|
385
|
+
value: props.multiple ? [] : '',
|
|
386
386
|
};
|
|
387
387
|
if (props.multiple) {
|
|
388
388
|
handleCheck(true);
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
} else {
|
|
391
391
|
state.transSelected = {
|
|
392
392
|
label: '',
|
|
393
|
-
value: []
|
|
393
|
+
value: [],
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
396
|
ifollow.value.cancel();
|
|
@@ -405,7 +405,7 @@
|
|
|
405
405
|
() => {
|
|
406
406
|
init();
|
|
407
407
|
},
|
|
408
|
-
{ deep: true }
|
|
408
|
+
{ deep: true },
|
|
409
409
|
);
|
|
410
410
|
|
|
411
411
|
watch(
|
|
@@ -423,13 +423,13 @@
|
|
|
423
423
|
emit('update:modelValue', state.selectd.value);
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
|
-
{ deep: true }
|
|
426
|
+
{ deep: true },
|
|
427
427
|
);
|
|
428
428
|
|
|
429
429
|
defineExpose({
|
|
430
430
|
select,
|
|
431
431
|
remove,
|
|
432
|
-
cancel
|
|
432
|
+
cancel,
|
|
433
433
|
});
|
|
434
434
|
</script>
|
|
435
435
|
. .
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
<script setup lang="ts">
|
|
20
20
|
import { reactive, watch, ref } from 'vue';
|
|
21
|
-
import { Input } from '
|
|
22
|
-
import { DateView } from '
|
|
21
|
+
import { Input } from '.';
|
|
22
|
+
import { DateView } from '.';
|
|
23
23
|
import { IFollowView } from '../basic';
|
|
24
24
|
const ifollow: any = ref(null);
|
|
25
25
|
// 方法
|
|
@@ -91,30 +91,29 @@
|
|
|
91
91
|
prefix: () => [],
|
|
92
92
|
suffix: () => [],
|
|
93
93
|
interacted: false,
|
|
94
|
-
time: false
|
|
94
|
+
time: false,
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
const state: any = reactive({
|
|
98
|
-
// view: 1,
|
|
99
98
|
show: 0,
|
|
100
|
-
value:
|
|
99
|
+
value: null,
|
|
101
100
|
});
|
|
102
101
|
|
|
103
102
|
watch(
|
|
104
103
|
() => props.modelValue,
|
|
105
104
|
(value: any) => {
|
|
106
|
-
state.value = value;
|
|
105
|
+
state.value = value || null;
|
|
107
106
|
},
|
|
108
|
-
{ deep: true, immediate: true }
|
|
107
|
+
{ deep: true, immediate: true },
|
|
109
108
|
);
|
|
110
109
|
|
|
111
110
|
watch(
|
|
112
111
|
() => state.value,
|
|
113
112
|
(value: any) => {
|
|
114
|
-
emits('update:modelValue', value);
|
|
113
|
+
emits('update:modelValue', value || null);
|
|
115
114
|
ifollow.value?.hide();
|
|
116
115
|
},
|
|
117
|
-
{ deep: true, immediate: true }
|
|
116
|
+
{ deep: true, immediate: true },
|
|
118
117
|
);
|
|
119
118
|
|
|
120
119
|
const toggle = () => {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
<script setup lang="ts">
|
|
20
20
|
import { reactive, watch, ref } from 'vue';
|
|
21
|
-
import { InputRange, DateRangeView } from '
|
|
21
|
+
import { InputRange, DateRangeView } from '.';
|
|
22
22
|
import { IFollowView } from '../basic';
|
|
23
23
|
const ifollow: any = ref(null);
|
|
24
24
|
// 方法
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
verify: false,
|
|
83
83
|
prefix: () => [],
|
|
84
84
|
suffix: () => [],
|
|
85
|
-
interacted: false
|
|
85
|
+
interacted: false,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
const state: any = reactive({
|
|
89
89
|
show: 0,
|
|
90
|
-
value: []
|
|
90
|
+
value: [],
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
watch(
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
(value: any) => {
|
|
96
96
|
state.value = value;
|
|
97
97
|
},
|
|
98
|
-
{ deep: true, immediate: true }
|
|
98
|
+
{ deep: true, immediate: true },
|
|
99
99
|
);
|
|
100
100
|
|
|
101
101
|
watch(
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
ifollow.value?.hide();
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
{ deep: true, immediate: true }
|
|
109
|
+
{ deep: true, immediate: true },
|
|
110
110
|
);
|
|
111
111
|
|
|
112
112
|
const toggle = () => {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
v-if="item.day"
|
|
53
53
|
:ui-date-day="item.day"
|
|
54
54
|
class="flex-block"
|
|
55
|
-
:class="`${item.range ? 'bg-main-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
55
|
+
:class="`${item.range ? 'bg-main-o-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
56
56
|
ui-flex="col cm"
|
|
57
57
|
@click="change(1, item)"
|
|
58
58
|
>
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
class="r-sm b-solid bk-none b-xs my-ss ux-scale"
|
|
62
62
|
style="width: 1.8em; height: 1.8em"
|
|
63
63
|
:class="`${item.isLastMonth || item.isNextMonth ? 'co-case' : item.holiday ? 'co-risk' : ''} ${
|
|
64
|
-
item.selected ? 'active bg-main-lm co-fore' : 'hover-bg-weak'
|
|
64
|
+
item.selected ? 'active bg-main-o-lm co-fore' : 'hover-bg-weak'
|
|
65
65
|
}`"
|
|
66
66
|
>
|
|
67
67
|
<span>{{ item.day }}</span>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
|
-
<div class="pa full
|
|
70
|
+
<div class="pa w-full lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 110%" ui-flex="row ct" v-html="extras(item)"></div>
|
|
71
71
|
</div>
|
|
72
72
|
</li>
|
|
73
73
|
</ul>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
v-if="item.day"
|
|
127
127
|
:ui-date-day="item.day"
|
|
128
128
|
class="flex-block"
|
|
129
|
-
:class="`${item.range ? 'bg-main-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
129
|
+
:class="`${item.range ? 'bg-main-o-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
130
130
|
ui-flex="col cm"
|
|
131
131
|
@click="change(2, item)"
|
|
132
132
|
>
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
class="r-sm b-solid bk-none b-xs my-ss ux-scale"
|
|
136
136
|
style="width: 1.8em; height: 1.8em"
|
|
137
137
|
:class="`${item.isLastMonth || item.isNextMonth ? 'co-case' : item.holiday ? 'co-risk' : ''} ${
|
|
138
|
-
item.selected ? 'active bg-main-lm co-fore' : 'hover-bg-weak'
|
|
138
|
+
item.selected ? 'active bg-main-o-lm co-fore' : 'hover-bg-weak'
|
|
139
139
|
}`"
|
|
140
140
|
>
|
|
141
141
|
<span>{{ item.day }}</span>
|
|
142
142
|
</div>
|
|
143
143
|
</div>
|
|
144
|
-
<div class="pa full
|
|
144
|
+
<div class="pa w-full lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 110%" ui-flex="row ct" v-html="extras(item)"></div>
|
|
145
145
|
</div>
|
|
146
146
|
</li>
|
|
147
147
|
</ul>
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
|
-
<div v-if="tools" ui-date-foot="" ui-flex="row xm" class="nx-sl ny-sl b-solid bk-line-ls bt-xs">
|
|
152
|
+
<div v-if="tools" ui-date-foot="" ui-flex="row xm" class="nx-sl ny-sl b-solid bk-line-o-ls bt-xs">
|
|
153
153
|
<div ui-flex="row lm" class="nl-ss">
|
|
154
154
|
<p v-if="sta.value || end.value">
|
|
155
155
|
<span class="nowrap">已选:</span>
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
<div v-else-if="com.shortcuts?.length" ui-flex="row lm">
|
|
159
159
|
<span class="nowrap">推荐:</span>
|
|
160
160
|
<div class="mr-sm-sub nx-sl-sub ny-ss-sub lh-ss nowrap fs-ss dib-sub" ui-scroll=":x y:hidden">
|
|
161
|
-
<p v-for="(item, idx) in com.shortcuts" :key="idx" class="bg-main-xs co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
|
|
162
|
-
<p class="bg-main-xs co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
|
|
161
|
+
<p v-for="(item, idx) in com.shortcuts" :key="idx" class="bg-main-o-xs co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
|
|
162
|
+
<p class="bg-main-o-xs co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
|
|
163
163
|
</div>
|
|
164
164
|
</div>
|
|
165
165
|
<div v-else> </div>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
v-if="item.day"
|
|
45
45
|
:ui-date-day="item.day"
|
|
46
46
|
class="flex-block"
|
|
47
|
-
:class="`${item.range ? 'bg-main-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
47
|
+
:class="`${item.range ? 'bg-main-o-xs' : ''} ${item.sta ? 'r-lt-sl r-lb-sl' : ''} ${item.end ? 'r-rt-sl r-rb-sl' : ''}`"
|
|
48
48
|
ui-flex="col cm"
|
|
49
49
|
@click="change(item)"
|
|
50
50
|
@mouseenter="setRangeValue(item)"
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
ui-flex="col cm"
|
|
54
54
|
class="r-sm b-solid bk-none b-xs my-ss ux-scale"
|
|
55
55
|
style="width: 1.8em; height: 1.8em"
|
|
56
|
-
:class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-lm co-fore' : 'hover-bg-weak'}`"
|
|
56
|
+
:class="`${item.isLastMonth || item.isNextMonth ? 'co-idle' : item.isHoliday ? 'co-risk' : ''} ${item.selected ? 'active bg-main-o-lm co-fore' : 'hover-bg-weak'}`"
|
|
57
57
|
>
|
|
58
58
|
<span>{{ item.day }}</span>
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
|
-
<div class="pa full
|
|
61
|
+
<div class="pa w-full lh-xs ny-ss ob-no ol-no nowrap s-ml bold" style="transform-origin: 50% 110%" ui-flex="row ct" v-html="extras(item)"></div>
|
|
62
62
|
</div>
|
|
63
63
|
</li>
|
|
64
64
|
</ul>
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
67
|
-
<div v-if="tools" ui-date-foot="" ui-flex="row xm" class="nx-sl ny-sl b-solid bk-line-mm bt-xs">
|
|
67
|
+
<div v-if="tools" ui-date-foot="" ui-flex="row xm" class="nx-sl ny-sl b-solid bk-line-o-mm bt-xs">
|
|
68
68
|
<div ui-flex="row lm" class="nl-ss">
|
|
69
69
|
<p v-if="state.date">
|
|
70
70
|
<span class="nowrap">已选:</span>
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
<div v-else-if="state.shortcuts?.length" ui-flex="row lm">
|
|
74
74
|
<span class="nowrap">推荐:</span>
|
|
75
75
|
<div class="mr-sm-sub nx-sl-sub ny-ss-sub lh-ss nowrap fs-ss dib-sub" ui-scroll=":x y:hidden">
|
|
76
|
-
<p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-xs co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
|
|
77
|
-
<p class="bg-main-xs co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
|
|
76
|
+
<p v-for="(item, idx) in state.shortcuts" :key="idx" class="bg-main-o-xs co-main r-xl" ui-btn="@a xs none :round" @click="item?.func">{{ item?.text }}</p>
|
|
77
|
+
<p class="bg-main-o-xs co-main r-xl" ui-btn="@a xs none :round"><Icon class="co-main" name="more" /></p>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
80
|
<div v-else> </div>
|
|
@@ -101,20 +101,20 @@
|
|
|
101
101
|
text: '昨天',
|
|
102
102
|
func() {
|
|
103
103
|
change({ date: idate(new Date().setDate(new Date().getDate() - 1)).format('YYYY-MM-DD') });
|
|
104
|
-
}
|
|
104
|
+
},
|
|
105
105
|
},
|
|
106
106
|
today: {
|
|
107
107
|
text: '今天',
|
|
108
108
|
func() {
|
|
109
109
|
change({ date: idate(new Date()).format('YYYY-MM-DD') });
|
|
110
|
-
}
|
|
110
|
+
},
|
|
111
111
|
},
|
|
112
112
|
tomorrow: {
|
|
113
113
|
text: '明天',
|
|
114
114
|
func() {
|
|
115
115
|
change({ date: idate(new Date().setDate(new Date().getDate() + 1)).format('YYYY-MM-DD') });
|
|
116
|
-
}
|
|
117
|
-
}
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
const emits: any = defineEmits(['update:modelValue', 'change']);
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
// 节假日
|
|
153
153
|
holiday: () => ({}),
|
|
154
154
|
// 范围时间
|
|
155
|
-
rangeValue: ''
|
|
155
|
+
rangeValue: '',
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
// 内部数据
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
return props.shortcuts.map((item: any) => {
|
|
175
175
|
return isString(item) ? shortcutsList[item] : item;
|
|
176
176
|
});
|
|
177
|
-
})
|
|
177
|
+
}),
|
|
178
178
|
});
|
|
179
179
|
|
|
180
180
|
watch(
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
state.date = value || '';
|
|
184
184
|
state.value = value || '';
|
|
185
185
|
},
|
|
186
|
-
{ deep: true, immediate: true }
|
|
186
|
+
{ deep: true, immediate: true },
|
|
187
187
|
);
|
|
188
188
|
// 范围时间值
|
|
189
189
|
watch(
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
(value: any) => {
|
|
192
192
|
state.rangeValue = value;
|
|
193
193
|
},
|
|
194
|
-
{ deep: true, immediate: true }
|
|
194
|
+
{ deep: true, immediate: true },
|
|
195
195
|
);
|
|
196
196
|
|
|
197
197
|
// 更新时间
|