@uxda/appkit 4.2.74 → 4.2.75
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/dist/appkit.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Grid, GridItem, Popup, ActionSheet, Checkbox, Button, Dialog, DatePicker, Form, FormItem, RadioGroup, Radio, Skeleton, Cell, Input, Steps, Step } from '@nutui/nutui-taro';
|
|
2
2
|
import '@nutui/nutui-taro/dist/packages/button/style/css';
|
|
3
3
|
import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
|
|
4
|
-
import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, createCommentVNode, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, withDirectives, vShow,
|
|
4
|
+
import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, createCommentVNode, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, withDirectives, vShow, mergeModels, useModel, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
|
|
5
5
|
import '@nutui/nutui-taro/dist/packages/grid/style/css';
|
|
6
6
|
import '@nutui/nutui-taro/dist/packages/griditem/style/css';
|
|
7
7
|
import Taro, { showModal, getSystemInfoSync, getMenuButtonBoundingClientRect, uploadFile, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, useRouter, useDidShow, getStorageSync } from '@tarojs/taro';
|
|
@@ -2648,6 +2648,7 @@ var script$u = /* @__PURE__ */ defineComponent({
|
|
|
2648
2648
|
setup(__props, { emit: __emit }) {
|
|
2649
2649
|
const props = __props;
|
|
2650
2650
|
const emit = __emit, state = usePopup();
|
|
2651
|
+
const result = reactive({ ...props });
|
|
2651
2652
|
watch(
|
|
2652
2653
|
() => `${props.from}${props.to}`,
|
|
2653
2654
|
() => {
|
|
@@ -2655,7 +2656,6 @@ var script$u = /* @__PURE__ */ defineComponent({
|
|
|
2655
2656
|
result.to = props.to;
|
|
2656
2657
|
}
|
|
2657
2658
|
);
|
|
2658
|
-
const result = reactive({ ...props });
|
|
2659
2659
|
const focused = ref("from");
|
|
2660
2660
|
const focusedDate = ref(props.from);
|
|
2661
2661
|
const minDate = ref();
|
|
@@ -2685,11 +2685,15 @@ var script$u = /* @__PURE__ */ defineComponent({
|
|
|
2685
2685
|
result.to = time;
|
|
2686
2686
|
}
|
|
2687
2687
|
datePickerOpen.value = false;
|
|
2688
|
-
state
|
|
2688
|
+
if (state) {
|
|
2689
|
+
state.couldClose = true;
|
|
2690
|
+
}
|
|
2689
2691
|
}
|
|
2690
2692
|
function onDatePickerCancel() {
|
|
2691
2693
|
datePickerOpen.value = false;
|
|
2692
|
-
state
|
|
2694
|
+
if (state) {
|
|
2695
|
+
state.couldClose = true;
|
|
2696
|
+
}
|
|
2693
2697
|
}
|
|
2694
2698
|
function switchDateInput(shift) {
|
|
2695
2699
|
if (shift === "from") {
|
|
@@ -2702,7 +2706,9 @@ var script$u = /* @__PURE__ */ defineComponent({
|
|
|
2702
2706
|
focusedDate.value = new Date(result[shift]);
|
|
2703
2707
|
focused.value = shift;
|
|
2704
2708
|
datePickerOpen.value = true;
|
|
2705
|
-
state
|
|
2709
|
+
if (state) {
|
|
2710
|
+
state.couldClose = false;
|
|
2711
|
+
}
|
|
2706
2712
|
}
|
|
2707
2713
|
return (_ctx, _cache) => {
|
|
2708
2714
|
const _component_nut_date_picker = DatePicker;
|
|
@@ -3129,6 +3135,8 @@ var script$q = /* @__PURE__ */ defineComponent({
|
|
|
3129
3135
|
});
|
|
3130
3136
|
function onDateReset() {
|
|
3131
3137
|
resetDateRange();
|
|
3138
|
+
datePickerOpen.value = false;
|
|
3139
|
+
restartSearch();
|
|
3132
3140
|
}
|
|
3133
3141
|
function resetDateRange() {
|
|
3134
3142
|
filtering.dateTo = dayjs().format("YYYY-MM-DD");
|
|
@@ -3704,60 +3712,87 @@ var script$o = /* @__PURE__ */ defineComponent({
|
|
|
3704
3712
|
},
|
|
3705
3713
|
"modelModifiers": {}
|
|
3706
3714
|
},
|
|
3707
|
-
emits: ["update:modelValue"],
|
|
3708
|
-
setup(__props) {
|
|
3709
|
-
|
|
3715
|
+
emits: /* @__PURE__ */ mergeModels(["complete", "reset"], ["update:modelValue"]),
|
|
3716
|
+
setup(__props, { emit: __emit }) {
|
|
3717
|
+
useNutshell();
|
|
3710
3718
|
const model = useModel(__props, "modelValue");
|
|
3711
|
-
const
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
// 不允许点击 overlay 关闭弹窗
|
|
3723
|
-
mask: true,
|
|
3724
|
-
onComplete(result) {
|
|
3725
|
-
model.value = {
|
|
3726
|
-
from: result.from,
|
|
3727
|
-
to: result.to
|
|
3728
|
-
};
|
|
3729
|
-
}
|
|
3730
|
-
});
|
|
3719
|
+
const datePickerOpen = ref(false);
|
|
3720
|
+
function openDateRangePicker() {
|
|
3721
|
+
datePickerOpen.value = true;
|
|
3722
|
+
}
|
|
3723
|
+
const onDateFilterComplete = (value) => {
|
|
3724
|
+
model.value = {
|
|
3725
|
+
from: value.from,
|
|
3726
|
+
to: value.to
|
|
3727
|
+
};
|
|
3728
|
+
datePickerOpen.value = false;
|
|
3729
|
+
emit("complete", model.value);
|
|
3731
3730
|
};
|
|
3731
|
+
function onDateReset() {
|
|
3732
|
+
model.value = {
|
|
3733
|
+
from: dayjs().add(-1, "M").format("YYYY-MM-DD"),
|
|
3734
|
+
to: dayjs().format("YYYY-MM-DD")
|
|
3735
|
+
};
|
|
3736
|
+
datePickerOpen.value = false;
|
|
3737
|
+
}
|
|
3738
|
+
const emit = __emit;
|
|
3732
3739
|
const dateRangeDisplay = computed(() => {
|
|
3733
3740
|
let startTime = (model.value.from || "").replace(/-/g, ".").substring(2);
|
|
3734
3741
|
let endTime = (model.value.to || "").replace(/-/g, ".").substring(2);
|
|
3735
3742
|
return startTime + "-" + endTime;
|
|
3736
3743
|
});
|
|
3737
3744
|
return (_ctx, _cache) => {
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
"div",
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3745
|
+
const _component_nut_popup = Popup;
|
|
3746
|
+
return openBlock(), createElementBlock(
|
|
3747
|
+
Fragment,
|
|
3748
|
+
null,
|
|
3749
|
+
[
|
|
3750
|
+
createElementVNode("div", {
|
|
3751
|
+
class: "date-range",
|
|
3752
|
+
onClick: openDateRangePicker
|
|
3753
|
+
}, [
|
|
3754
|
+
createElementVNode(
|
|
3755
|
+
"div",
|
|
3756
|
+
_hoisted_1$l,
|
|
3757
|
+
toDisplayString(dateRangeDisplay.value),
|
|
3758
|
+
1
|
|
3759
|
+
/* TEXT */
|
|
3760
|
+
),
|
|
3761
|
+
_cache[1] || (_cache[1] = createElementVNode(
|
|
3762
|
+
"img",
|
|
3763
|
+
{
|
|
3764
|
+
style: { "margin-top": "-2px" },
|
|
3765
|
+
class: "time-icon",
|
|
3766
|
+
src: "https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-down.png"
|
|
3767
|
+
},
|
|
3768
|
+
null,
|
|
3769
|
+
-1
|
|
3770
|
+
/* HOISTED */
|
|
3771
|
+
))
|
|
3772
|
+
]),
|
|
3773
|
+
createVNode(_component_nut_popup, {
|
|
3774
|
+
position: "bottom",
|
|
3775
|
+
style: { height: "40%" },
|
|
3776
|
+
round: "",
|
|
3777
|
+
"close-on-click-overlay": true,
|
|
3778
|
+
visible: datePickerOpen.value,
|
|
3779
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => datePickerOpen.value = $event)
|
|
3780
|
+
}, {
|
|
3781
|
+
default: withCtx(() => [
|
|
3782
|
+
createVNode(script$u, {
|
|
3783
|
+
from: model.value.from,
|
|
3784
|
+
to: model.value.to,
|
|
3785
|
+
onReset: onDateReset,
|
|
3786
|
+
onComplete: onDateFilterComplete
|
|
3787
|
+
}, null, 8, ["from", "to"])
|
|
3788
|
+
]),
|
|
3789
|
+
_: 1
|
|
3790
|
+
/* STABLE */
|
|
3791
|
+
}, 8, ["visible"])
|
|
3792
|
+
],
|
|
3793
|
+
64
|
|
3794
|
+
/* STABLE_FRAGMENT */
|
|
3795
|
+
);
|
|
3761
3796
|
};
|
|
3762
3797
|
}
|
|
3763
3798
|
});
|
package/package.json
CHANGED
|
@@ -40,6 +40,12 @@ const props = defineProps<DateFilterProps>()
|
|
|
40
40
|
const emit = defineEmits(['complete', 'reset']),
|
|
41
41
|
state = usePopup()
|
|
42
42
|
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 日期范围结果
|
|
46
|
+
*/
|
|
47
|
+
const result = reactive<DateFilterProps>({ ...props })
|
|
48
|
+
|
|
43
49
|
watch(
|
|
44
50
|
() => `${props.from}${props.to}`,
|
|
45
51
|
() => {
|
|
@@ -48,10 +54,6 @@ watch(
|
|
|
48
54
|
}
|
|
49
55
|
)
|
|
50
56
|
|
|
51
|
-
/**
|
|
52
|
-
* 日期范围结果
|
|
53
|
-
*/
|
|
54
|
-
const result = reactive<DateFilterProps>({ ...props })
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
* 目前激活的日期输入框
|
|
@@ -98,12 +100,16 @@ function onDatePickerComplete({ selectedValue, selectedOptions }) {
|
|
|
98
100
|
result.to = time
|
|
99
101
|
}
|
|
100
102
|
datePickerOpen.value = false
|
|
101
|
-
state
|
|
103
|
+
if (state) {
|
|
104
|
+
state.couldClose = true
|
|
105
|
+
}
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
function onDatePickerCancel() {
|
|
105
109
|
datePickerOpen.value = false
|
|
106
|
-
state
|
|
110
|
+
if (state) {
|
|
111
|
+
state.couldClose = true
|
|
112
|
+
}
|
|
107
113
|
}
|
|
108
114
|
|
|
109
115
|
/**
|
|
@@ -124,9 +130,12 @@ function switchDateInput(shift: string) {
|
|
|
124
130
|
focused.value = shift
|
|
125
131
|
datePickerOpen.value = true
|
|
126
132
|
// 不允许浮窗关闭
|
|
127
|
-
state
|
|
133
|
+
if (state) {
|
|
134
|
+
state.couldClose = false
|
|
135
|
+
}
|
|
128
136
|
}
|
|
129
137
|
</script>
|
|
138
|
+
|
|
130
139
|
<style lang="scss">
|
|
131
140
|
.appkit-date-filter {
|
|
132
141
|
height: 100%;
|
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
<img style="margin-top: -2px" class="time-icon"
|
|
5
5
|
src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-down.png" />
|
|
6
6
|
</div>
|
|
7
|
+
|
|
8
|
+
<nut-popup position="bottom" :style="{ height: '40%' }" round :close-on-click-overlay="true"
|
|
9
|
+
v-model:visible="datePickerOpen">
|
|
10
|
+
<date-filter :from="model.from" :to="model.to" @reset="onDateReset" @complete="onDateFilterComplete" />
|
|
11
|
+
</nut-popup>
|
|
7
12
|
</template>
|
|
8
13
|
|
|
9
14
|
<script lang="ts" setup>
|
|
10
|
-
import { computed, PropType, ref } from 'vue'
|
|
15
|
+
import { computed, PropType, ref, watch } from 'vue'
|
|
11
16
|
import { useNutshell } from '@uxda/nutshell/taro'
|
|
12
17
|
import DateFilter from './DateFilter.vue'
|
|
13
18
|
import dayjs from 'dayjs'
|
|
@@ -28,26 +33,51 @@ const model = defineModel({
|
|
|
28
33
|
}
|
|
29
34
|
})
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onComplete(result: any) {
|
|
44
|
-
model.value = {
|
|
45
|
-
from: result.from,
|
|
46
|
-
to: result.to
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
})
|
|
36
|
+
// 时间筛选
|
|
37
|
+
const datePickerOpen = ref<boolean>(false)
|
|
38
|
+
function openDateRangePicker() {
|
|
39
|
+
datePickerOpen.value = true
|
|
40
|
+
}
|
|
41
|
+
const onDateFilterComplete = (value) => {
|
|
42
|
+
model.value = {
|
|
43
|
+
from: value.from,
|
|
44
|
+
to: value.to
|
|
45
|
+
}
|
|
46
|
+
datePickerOpen.value = false
|
|
47
|
+
emit('complete', model.value)
|
|
50
48
|
}
|
|
49
|
+
function onDateReset() {
|
|
50
|
+
model.value = {
|
|
51
|
+
from: dayjs().add(-1, 'M').format('YYYY-MM-DD'),
|
|
52
|
+
to: dayjs().format('YYYY-MM-DD')
|
|
53
|
+
}
|
|
54
|
+
datePickerOpen.value = false
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const emit = defineEmits(['complete', 'reset'])
|
|
58
|
+
|
|
59
|
+
// const openDateRangePicker = () => {
|
|
60
|
+
// $n.sheet({
|
|
61
|
+
// component: DateFilter,
|
|
62
|
+
// class: 'ns-sheet-reset date-filter-sheet',
|
|
63
|
+
// props: {
|
|
64
|
+
// from: model.value.from,
|
|
65
|
+
// to: model.value.to,
|
|
66
|
+
// onReset() {
|
|
67
|
+
// model.value.from = dayjs().add(-1, 'M').format('YYYY-MM-DD')
|
|
68
|
+
// model.value.to = dayjs().format('YYYY-MM-DD')
|
|
69
|
+
// }
|
|
70
|
+
// },
|
|
71
|
+
// modal: true, // 不允许点击 overlay 关闭弹窗
|
|
72
|
+
// mask: true,
|
|
73
|
+
// onComplete(result: any) {
|
|
74
|
+
// model.value = {
|
|
75
|
+
// from: result.from,
|
|
76
|
+
// to: result.to
|
|
77
|
+
// }
|
|
78
|
+
// },
|
|
79
|
+
// })
|
|
80
|
+
// }
|
|
51
81
|
|
|
52
82
|
const dateRangeDisplay = computed(() => {
|
|
53
83
|
let startTime = (model.value.from || '').replace(/-/g, '.').substring(2)
|
|
@@ -64,6 +94,7 @@ const dateRangeDisplay = computed(() => {
|
|
|
64
94
|
flex: 1;
|
|
65
95
|
display: flex;
|
|
66
96
|
align-items: center;
|
|
97
|
+
justify-content: flex-end;
|
|
67
98
|
|
|
68
99
|
.text {
|
|
69
100
|
width: fit-content;
|