giime 0.1.23 → 0.2.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/dist/index.css +82 -51
- package/es/components/src/base/button/Button.vue2.mjs +31 -35
- package/es/components/src/base/button/Button.vue2.mjs.map +1 -1
- package/es/components/src/composite/searchForm/SearchForm.vue.mjs +1 -1
- package/es/components/src/composite/searchForm/SearchForm.vue2.mjs +169 -59
- package/es/components/src/composite/searchForm/SearchForm.vue2.mjs.map +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue2.mjs +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue2.mjs.map +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue2.mjs +5 -5
- package/es/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue2.mjs.map +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue2.mjs +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue2.mjs.map +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs +5 -2
- package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +9 -0
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.mjs +1 -1
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue2.mjs +3 -2
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tablePagination/index.d.ts +9 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.d.ts +4 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.mjs +4 -0
- package/es/components/src/composite/tablePro/tablePagination/tablePagination.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.d.ts +12 -0
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.mjs +177 -134
- package/es/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.mjs.map +1 -1
- package/es/components/src/composite/tablePro/tableToolbar/index.d.ts +24 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.d.ts +12 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.mjs +12 -0
- package/es/components/src/composite/tablePro/tableToolbar/tableToolbar.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/index.css +82 -51
- package/lib/components/src/base/button/Button.vue2.js +31 -35
- package/lib/components/src/base/button/Button.vue2.js.map +1 -1
- package/lib/components/src/composite/searchForm/SearchForm.vue.js +1 -1
- package/lib/components/src/composite/searchForm/SearchForm.vue2.js +167 -57
- package/lib/components/src/composite/searchForm/SearchForm.vue2.js.map +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue2.js +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue2.js.map +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue2.js +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue2.js.map +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue2.js +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue2.js.map +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js +5 -2
- package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +9 -0
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.js +1 -1
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue2.js +3 -2
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/tablePagination/index.d.ts +9 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.d.ts +4 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.js +4 -0
- package/lib/components/src/composite/tablePro/tablePagination/tablePagination.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue.d.ts +12 -0
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.js +176 -133
- package/lib/components/src/composite/tablePro/tableToolbar/TableToolbar.vue2.js.map +1 -1
- package/lib/components/src/composite/tablePro/tableToolbar/index.d.ts +24 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.d.ts +12 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.js +12 -0
- package/lib/components/src/composite/tablePro/tableToolbar/tableToolbar.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/index.css +82 -51
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
.gm-range-number .el-form-item[data-v-11c39847] {
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.gm-flex-center[data-v-d1c6dac0] {
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.gm-flex-justify-between[data-v-d1c6dac0] {
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
[data-v-08f2c6ca] .gmSearchForm .el-form-item {
|
|
14
|
+
margin-right: 0;
|
|
15
|
+
margin-bottom: 4px;
|
|
16
|
+
}
|
|
17
|
+
[data-v-06213d16] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
18
|
+
border-right: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-v-06213d16] .gmTableNoBorder .el-table__inner-wrapper:before {
|
|
22
|
+
height: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-v-06213d16] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
|
|
26
|
+
height: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-v-06213d16] .gmTableNoBorder.el-table--border:after {
|
|
30
|
+
height: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-v-06213d16] .gmTableNoBorder.el-table--border:before {
|
|
34
|
+
height: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-v-06213d16] .gmTableNoBorder .el-table__border-left-patch {
|
|
38
|
+
height: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pagination-container[data-v-61e6554b] {
|
|
42
|
+
background: #fff;
|
|
43
|
+
padding: 32px 16px;
|
|
44
|
+
}
|
|
45
|
+
.pagination-container.hidden[data-v-61e6554b] {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
1
49
|
/*
|
|
2
50
|
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
|
|
3
51
|
*//*
|
|
@@ -492,12 +540,24 @@ video {
|
|
|
492
540
|
.gm-collapse {
|
|
493
541
|
visibility: collapse;
|
|
494
542
|
}
|
|
543
|
+
.gm-absolute {
|
|
544
|
+
position: absolute;
|
|
545
|
+
}
|
|
495
546
|
.gm-relative {
|
|
496
547
|
position: relative;
|
|
497
548
|
}
|
|
549
|
+
.gm-bottom-3 {
|
|
550
|
+
bottom: 0.75rem;
|
|
551
|
+
}
|
|
552
|
+
.gm-right-0 {
|
|
553
|
+
right: 0px;
|
|
554
|
+
}
|
|
498
555
|
.gm-top-\[1px\] {
|
|
499
556
|
top: 1px;
|
|
500
557
|
}
|
|
558
|
+
.-gm-z-10 {
|
|
559
|
+
z-index: -10;
|
|
560
|
+
}
|
|
501
561
|
.gm-m-2 {
|
|
502
562
|
margin: 0.5rem;
|
|
503
563
|
}
|
|
@@ -511,6 +571,9 @@ video {
|
|
|
511
571
|
.gm-mb-4 {
|
|
512
572
|
margin-bottom: 1rem;
|
|
513
573
|
}
|
|
574
|
+
.gm-mb-5 {
|
|
575
|
+
margin-bottom: 1.25rem;
|
|
576
|
+
}
|
|
514
577
|
.gm-ml-2 {
|
|
515
578
|
margin-left: 0.5rem;
|
|
516
579
|
}
|
|
@@ -544,12 +607,18 @@ video {
|
|
|
544
607
|
.gm-table-column {
|
|
545
608
|
display: table-column;
|
|
546
609
|
}
|
|
610
|
+
.gm-grid {
|
|
611
|
+
display: grid;
|
|
612
|
+
}
|
|
547
613
|
.gm-hidden {
|
|
548
614
|
display: none;
|
|
549
615
|
}
|
|
550
616
|
.gm-h-1 {
|
|
551
617
|
height: 0.25rem;
|
|
552
618
|
}
|
|
619
|
+
.gm-h-\[36px\] {
|
|
620
|
+
height: 36px;
|
|
621
|
+
}
|
|
553
622
|
.gm-h-\[600px\] {
|
|
554
623
|
height: 600px;
|
|
555
624
|
}
|
|
@@ -562,15 +631,15 @@ video {
|
|
|
562
631
|
.gm-w-\[120px\] {
|
|
563
632
|
width: 120px;
|
|
564
633
|
}
|
|
565
|
-
.gm-w-\[180px\] {
|
|
566
|
-
width: 180px;
|
|
567
|
-
}
|
|
568
634
|
.gm-w-full {
|
|
569
635
|
width: 100%;
|
|
570
636
|
}
|
|
571
637
|
.gm-min-w-\[200px\] {
|
|
572
638
|
min-width: 200px;
|
|
573
639
|
}
|
|
640
|
+
.gm-min-w-\[20px\] {
|
|
641
|
+
min-width: 20px;
|
|
642
|
+
}
|
|
574
643
|
.gm-flex-1 {
|
|
575
644
|
flex: 1 1 0%;
|
|
576
645
|
}
|
|
@@ -587,6 +656,9 @@ video {
|
|
|
587
656
|
.gm-items-center {
|
|
588
657
|
align-items: center;
|
|
589
658
|
}
|
|
659
|
+
.gm-justify-end {
|
|
660
|
+
justify-content: flex-end;
|
|
661
|
+
}
|
|
590
662
|
.gm-justify-center {
|
|
591
663
|
justify-content: center;
|
|
592
664
|
}
|
|
@@ -596,6 +668,9 @@ video {
|
|
|
596
668
|
.gm-gap-2 {
|
|
597
669
|
gap: 0.5rem;
|
|
598
670
|
}
|
|
671
|
+
.gm-overflow-hidden {
|
|
672
|
+
overflow: hidden;
|
|
673
|
+
}
|
|
599
674
|
.gm-rounded {
|
|
600
675
|
border-radius: 0.25rem;
|
|
601
676
|
}
|
|
@@ -649,6 +724,9 @@ video {
|
|
|
649
724
|
.gm-font-bold {
|
|
650
725
|
font-weight: 700;
|
|
651
726
|
}
|
|
727
|
+
.gm-leading-\[32px\] {
|
|
728
|
+
line-height: 32px;
|
|
729
|
+
}
|
|
652
730
|
.gm-leading-\[40px\] {
|
|
653
731
|
line-height: 40px;
|
|
654
732
|
}
|
|
@@ -686,51 +764,4 @@ video {
|
|
|
686
764
|
}
|
|
687
765
|
.gm-group:hover .group-hover\:gm-block {
|
|
688
766
|
display: block;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
.gm-range-number .el-form-item[data-v-11c39847] {
|
|
692
|
-
margin: 0;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
.gm-flex-center[data-v-d1c6dac0] {
|
|
696
|
-
align-items: center;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
.gm-flex-justify-between[data-v-d1c6dac0] {
|
|
700
|
-
justify-content: space-between;
|
|
701
|
-
}
|
|
702
|
-
[data-v-512cf874] .gmSearchForm .el-form-item {
|
|
703
|
-
margin-right: 8px;
|
|
704
|
-
margin-bottom: 8px;
|
|
705
|
-
}
|
|
706
|
-
[data-v-06213d16] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
707
|
-
border-right: none;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
[data-v-06213d16] .gmTableNoBorder .el-table__inner-wrapper:before {
|
|
711
|
-
height: 0;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
[data-v-06213d16] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
|
|
715
|
-
height: 0;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
[data-v-06213d16] .gmTableNoBorder.el-table--border:after {
|
|
719
|
-
height: 0;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
[data-v-06213d16] .gmTableNoBorder.el-table--border:before {
|
|
723
|
-
height: 0;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
[data-v-06213d16] .gmTableNoBorder .el-table__border-left-patch {
|
|
727
|
-
height: 0;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
.pagination-container[data-v-8a95ba6d] {
|
|
731
|
-
background: #fff;
|
|
732
|
-
padding: 32px 16px;
|
|
733
|
-
}
|
|
734
|
-
.pagination-container.hidden[data-v-8a95ba6d] {
|
|
735
|
-
display: none;
|
|
736
|
-
}
|
|
767
|
+
}
|
|
@@ -22,41 +22,37 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
});
|
|
23
23
|
return (_ctx, _cache) => {
|
|
24
24
|
const _component_el_button = resolveComponent("el-button");
|
|
25
|
-
return openBlock(), createBlock(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]),
|
|
57
|
-
1040
|
|
58
|
-
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
59
|
-
);
|
|
25
|
+
return openBlock(), createBlock(_component_el_button, mergeProps({
|
|
26
|
+
ref_key: "elRef",
|
|
27
|
+
ref: elRef
|
|
28
|
+
}, props, {
|
|
29
|
+
type: _ctx.disabled ? "info" : _ctx.type
|
|
30
|
+
}, toHandlers(unref(elEvents))), createSlots({
|
|
31
|
+
_: 2
|
|
32
|
+
/* DYNAMIC */
|
|
33
|
+
}, [
|
|
34
|
+
unref(slots).loading ? {
|
|
35
|
+
name: "loading",
|
|
36
|
+
fn: withCtx((slotValue) => [
|
|
37
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(slotValue)))
|
|
38
|
+
]),
|
|
39
|
+
key: "0"
|
|
40
|
+
} : void 0,
|
|
41
|
+
unref(slots).default ? {
|
|
42
|
+
name: "default",
|
|
43
|
+
fn: withCtx(() => [
|
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
|
45
|
+
]),
|
|
46
|
+
key: "1"
|
|
47
|
+
} : void 0,
|
|
48
|
+
unref(slots).icon ? {
|
|
49
|
+
name: "icon",
|
|
50
|
+
fn: withCtx((slotValue) => [
|
|
51
|
+
renderSlot(_ctx.$slots, "icon", normalizeProps(guardReactiveProps(slotValue)))
|
|
52
|
+
]),
|
|
53
|
+
key: "2"
|
|
54
|
+
} : void 0
|
|
55
|
+
]), 1040, ["type"]);
|
|
60
56
|
};
|
|
61
57
|
}
|
|
62
58
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.vue2.mjs","sources":["../../../../../../../packages/components/src/base/button/Button.vue"],"sourcesContent":["<template>\r\n <el-button ref=\"elRef\" v-bind=\"props\" v-on=\"elEvents\">\r\n <template v-if=\"slots.loading\" #loading=\"slotValue\">\r\n <slot name=\"loading\" v-bind=\"slotValue\" />\r\n </template>\r\n <template v-if=\"slots.default\" #default>\r\n <slot />\r\n </template>\r\n <template v-if=\"slots.icon\" #icon=\"slotValue\">\r\n <slot name=\"icon\" v-bind=\"slotValue\" />\r\n </template>\r\n </el-button>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { ref, useSlots } from 'vue';\r\nimport { getGmEvent } from '@giime/utils';\r\nimport { buttonEmits as elButtonEmits } from 'element-plus';\r\nimport { buttonEmits, buttonProps } from './button';\r\nimport type { ButtonInstance } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmButton',\r\n});\r\nconst slots = useSlots();\r\nconst props = defineProps(buttonProps);\r\nconst emit = defineEmits(buttonEmits);\r\n// 重发el的事件\r\nconst elEvents = getGmEvent(elButtonEmits, emit);\r\n\r\nconst elRef = ref<ButtonInstance>();\r\ndefineExpose({\r\n elRef,\r\n});\r\n</script>\r\n"],"names":["elButtonEmits"],"mappings":";;;;;;;;;;;;;;AAuBA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,QAAQ,GAAoB,EAAA,CAAA;AAClC,IAAa,QAAA,CAAA;AAAA,MACX,KAAA;AAAA,KACD,CAAA,CAAA
|
|
1
|
+
{"version":3,"file":"Button.vue2.mjs","sources":["../../../../../../../packages/components/src/base/button/Button.vue"],"sourcesContent":["<template>\r\n <el-button ref=\"elRef\" v-bind=\"props\" :type=\"disabled ? 'info' : type\" v-on=\"elEvents\">\r\n <template v-if=\"slots.loading\" #loading=\"slotValue\">\r\n <slot name=\"loading\" v-bind=\"slotValue\" />\r\n </template>\r\n <template v-if=\"slots.default\" #default>\r\n <slot />\r\n </template>\r\n <template v-if=\"slots.icon\" #icon=\"slotValue\">\r\n <slot name=\"icon\" v-bind=\"slotValue\" />\r\n </template>\r\n </el-button>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { ref, useSlots } from 'vue';\r\nimport { getGmEvent } from '@giime/utils';\r\nimport { buttonEmits as elButtonEmits } from 'element-plus';\r\nimport { buttonEmits, buttonProps } from './button';\r\nimport type { ButtonInstance } from 'element-plus';\r\n\r\ndefineOptions({\r\n name: 'GmButton',\r\n});\r\nconst slots = useSlots();\r\nconst props = defineProps(buttonProps);\r\nconst emit = defineEmits(buttonEmits);\r\n// 重发el的事件\r\nconst elEvents = getGmEvent(elButtonEmits, emit);\r\n\r\nconst elRef = ref<ButtonInstance>();\r\ndefineExpose({\r\n elRef,\r\n});\r\n</script>\r\n"],"names":["elButtonEmits"],"mappings":";;;;;;;;;;;;;;AAuBA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,QAAQ,GAAoB,EAAA,CAAA;AAClC,IAAa,QAAA,CAAA;AAAA,MACX,KAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import _sfc_main from './SearchForm.vue2.mjs';
|
|
|
2
2
|
import './SearchForm.vue3.mjs';
|
|
3
3
|
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
4
|
|
|
5
|
-
var SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
var SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-08f2c6ca"], ["__file", "SearchForm.vue"]]);
|
|
6
6
|
|
|
7
7
|
export { SearchForm as default };
|
|
8
8
|
//# sourceMappingURL=SearchForm.vue.mjs.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, provide, computed,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, mergeModels, useModel, provide, ref, computed, nextTick, resolveComponent, openBlock, createElementBlock, withDirectives, createVNode, withCtx, createElementVNode, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, renderSlot, unref, createTextVNode, toDisplayString, vShow } from 'vue';
|
|
2
|
+
import { useElementVisibility, useElementSize } from '@vueuse/core';
|
|
3
|
+
import { Search, Refresh, ArrowDown } from '@element-plus/icons-vue';
|
|
3
4
|
import { searchFormProps, searchFormEmits, searchFormItemList } from './searchForm.mjs';
|
|
4
5
|
import { queryParamsKey, searchFormHandleQueryKey } from './constants.mjs';
|
|
5
6
|
|
|
7
|
+
const itemGap = 8;
|
|
6
8
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
9
|
...{
|
|
8
10
|
name: "GmSearchForm"
|
|
@@ -20,6 +22,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
22
|
const queryParams = useModel(__props, "queryParams");
|
|
21
23
|
provide(queryParamsKey, queryParams);
|
|
22
24
|
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const queryDivRef = ref();
|
|
27
|
+
const visibilityMarkRef = ref();
|
|
28
|
+
const markIsVisibility = useElementVisibility(visibilityMarkRef);
|
|
29
|
+
const { width: queryDivWidth } = useElementSize(queryDivRef);
|
|
30
|
+
const colsCount = computed(() => Math.floor(queryDivWidth.value / 269));
|
|
31
|
+
const showMore = ref(false);
|
|
32
|
+
const notShowMore = computed(() => showMore.value === false && markIsVisibility.value === true);
|
|
33
|
+
const searchButtonItemStyle = computed(() => {
|
|
34
|
+
if (notShowMore.value) {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
gridColumn: colsCount.value,
|
|
39
|
+
gridRow: showMore.value ? void 0 : 1
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
const handleShowMoreChange = async () => {
|
|
43
|
+
showMore.value = !showMore.value;
|
|
44
|
+
const scrollEvent = new Event("resize");
|
|
45
|
+
await nextTick();
|
|
46
|
+
window.dispatchEvent(scrollEvent);
|
|
47
|
+
};
|
|
23
48
|
const optionsList = computed(() => {
|
|
24
49
|
return props.options.map((it) => {
|
|
25
50
|
const findComponent = searchFormItemList.find((item) => item.type === it.type);
|
|
@@ -29,7 +54,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
54
|
return it;
|
|
30
55
|
});
|
|
31
56
|
});
|
|
32
|
-
const emit = __emit;
|
|
33
57
|
const queryRef = ref();
|
|
34
58
|
const handleQuery = (...args) => {
|
|
35
59
|
emit("handleQuery", ...args);
|
|
@@ -41,64 +65,150 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
65
|
};
|
|
42
66
|
return (_ctx, _cache) => {
|
|
43
67
|
const _component_gm_button = resolveComponent("gm-button");
|
|
68
|
+
const _component_gm_icon = resolveComponent("gm-icon");
|
|
44
69
|
const _component_gm_form_item = resolveComponent("gm-form-item");
|
|
45
70
|
const _component_gm_form = resolveComponent("gm-form");
|
|
46
|
-
return openBlock(), createElementBlock(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
71
|
+
return openBlock(), createElementBlock(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
ref_key: "queryDivRef",
|
|
75
|
+
ref: queryDivRef,
|
|
76
|
+
class: "gm-mb-5"
|
|
77
|
+
},
|
|
78
|
+
[
|
|
79
|
+
withDirectives(createVNode(_component_gm_form, {
|
|
80
|
+
ref_key: "queryRef",
|
|
81
|
+
ref: queryRef,
|
|
82
|
+
model: queryParams.value,
|
|
83
|
+
inline: true,
|
|
84
|
+
class: "gmSearchForm"
|
|
85
|
+
}, {
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createElementVNode(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
class: normalizeClass(showMore.value ? "" : "gm-h-[36px] gm-overflow-hidden")
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
createElementVNode(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
class: "gm-relative gm-grid gm-w-full",
|
|
97
|
+
style: normalizeStyle({ gridTemplateColumns: `repeat(${colsCount.value}, minmax(0, 1fr))`, gap: itemGap + "px" })
|
|
98
|
+
},
|
|
99
|
+
[
|
|
100
|
+
(openBlock(true), createElementBlock(
|
|
101
|
+
Fragment,
|
|
102
|
+
null,
|
|
103
|
+
renderList(optionsList.value, (item, index) => {
|
|
104
|
+
return openBlock(), createBlock(resolveDynamicComponent(item.component), mergeProps({ key: index }, item.props, {
|
|
105
|
+
modelValue: queryParams.value[item.props.prop],
|
|
106
|
+
"onUpdate:modelValue": ($event) => queryParams.value[item.props.prop] = $event
|
|
107
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"]);
|
|
108
|
+
}),
|
|
109
|
+
128
|
|
110
|
+
/* KEYED_FRAGMENT */
|
|
111
|
+
)),
|
|
112
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
113
|
+
createVNode(_component_gm_form_item, {
|
|
114
|
+
style: normalizeStyle(searchButtonItemStyle.value)
|
|
115
|
+
}, {
|
|
116
|
+
default: withCtx(() => [
|
|
117
|
+
createElementVNode(
|
|
118
|
+
"div",
|
|
119
|
+
{
|
|
120
|
+
class: normalizeClass(["gm-flex gm-w-full", notShowMore.value ? "" : " gm-justify-end"])
|
|
121
|
+
},
|
|
122
|
+
[
|
|
123
|
+
createVNode(_component_gm_button, {
|
|
124
|
+
type: "primary",
|
|
125
|
+
icon: unref(Search),
|
|
126
|
+
class: "",
|
|
127
|
+
onClick: handleQuery
|
|
128
|
+
}, {
|
|
129
|
+
default: withCtx(() => [
|
|
130
|
+
createTextVNode("\u641C\u7D22")
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
/* STABLE */
|
|
134
|
+
}, 8, ["icon"]),
|
|
135
|
+
createVNode(_component_gm_button, {
|
|
136
|
+
icon: unref(Refresh),
|
|
137
|
+
onClick: resetQuery
|
|
138
|
+
}, {
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
createTextVNode("\u91CD\u7F6E")
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
/* STABLE */
|
|
144
|
+
}, 8, ["icon"]),
|
|
145
|
+
withDirectives(createVNode(
|
|
146
|
+
_component_gm_button,
|
|
147
|
+
{
|
|
148
|
+
type: "primary",
|
|
149
|
+
text: "",
|
|
150
|
+
onClick: handleShowMoreChange
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
createTextVNode(
|
|
155
|
+
toDisplayString(showMore.value ? "\u7F29\u8D77" : "\u5C55\u5F00") + " ",
|
|
156
|
+
1
|
|
157
|
+
/* TEXT */
|
|
158
|
+
),
|
|
159
|
+
createVNode(_component_gm_icon, { class: "el-icon--right" }, {
|
|
160
|
+
default: withCtx(() => [
|
|
161
|
+
createVNode(unref(ArrowDown))
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
/* STABLE */
|
|
165
|
+
})
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
/* STABLE */
|
|
169
|
+
},
|
|
170
|
+
512
|
|
171
|
+
/* NEED_PATCH */
|
|
172
|
+
), [
|
|
173
|
+
[vShow, !notShowMore.value]
|
|
174
|
+
])
|
|
175
|
+
],
|
|
176
|
+
2
|
|
177
|
+
/* CLASS */
|
|
178
|
+
)
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
/* STABLE */
|
|
182
|
+
}, 8, ["style"]),
|
|
183
|
+
createElementVNode(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
ref_key: "visibilityMarkRef",
|
|
187
|
+
ref: visibilityMarkRef,
|
|
188
|
+
class: "gm-absolute gm-bottom-3 gm-right-0 -gm-z-10 gm-h-1 gm-w-1"
|
|
189
|
+
},
|
|
190
|
+
null,
|
|
191
|
+
512
|
|
192
|
+
/* NEED_PATCH */
|
|
193
|
+
)
|
|
194
|
+
],
|
|
195
|
+
4
|
|
196
|
+
/* STYLE */
|
|
197
|
+
)
|
|
198
|
+
],
|
|
199
|
+
2
|
|
200
|
+
/* CLASS */
|
|
201
|
+
)
|
|
202
|
+
]),
|
|
203
|
+
_: 3
|
|
204
|
+
/* FORWARDED */
|
|
205
|
+
}, 8, ["model"]), [
|
|
206
|
+
[vShow, showSearch.value]
|
|
207
|
+
])
|
|
208
|
+
],
|
|
209
|
+
512
|
|
210
|
+
/* NEED_PATCH */
|
|
211
|
+
);
|
|
102
212
|
};
|
|
103
213
|
}
|
|
104
214
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.vue2.mjs","sources":["../../../../../../../packages/components/src/composite/searchForm/SearchForm.vue"],"sourcesContent":["<template>\r\n <div>\r\n <gm-form v-show=\"showSearch\" ref=\"queryRef\" :model=\"queryParams\" :inline=\"true\" class=\"gmSearchForm\">\r\n <template v-for=\"(item, index) in optionsList\" :key=\"index\">\r\n
|
|
1
|
+
{"version":3,"file":"SearchForm.vue2.mjs","sources":["../../../../../../../packages/components/src/composite/searchForm/SearchForm.vue"],"sourcesContent":["<script lang=\"ts\">\nconst itemGap = 8\n</script>\n<template>\r\n <div ref=\"queryDivRef\" class=\"gm-mb-5\">\r\n <gm-form v-show=\"showSearch\" ref=\"queryRef\" :model=\"queryParams\" :inline=\"true\" class=\"gmSearchForm\">\r\n <div :class=\"showMore ? '' : 'gm-h-[36px] gm-overflow-hidden'\">\r\n <div class=\"gm-relative gm-grid gm-w-full\" :style=\"{ gridTemplateColumns: `repeat(${colsCount}, minmax(0, 1fr))`, gap: itemGap + 'px' }\">\r\n <template v-for=\"(item, index) in optionsList\" :key=\"index\">\r\n <component :is=\"item.component\" v-bind=\"item.props\" v-model=\"queryParams[item.props.prop]\" />\r\n </template>\r\n <slot />\r\n <gm-form-item :style=\"searchButtonItemStyle\">\r\n <div class=\"gm-flex gm-w-full\" :class=\"notShowMore ? '' : ' gm-justify-end'\">\r\n <gm-button type=\"primary\" :icon=\"Search\" class=\"\" @click=\"handleQuery\">搜索</gm-button>\r\n <gm-button :icon=\"Refresh\" @click=\"resetQuery\">重置</gm-button>\r\n <gm-button v-show=\"!notShowMore\" type=\"primary\" text @click=\"handleShowMoreChange\">\r\n {{ showMore ? '缩起' : '展开' }} <gm-icon class=\"el-icon--right\"><ArrowDown /></gm-icon>\r\n </gm-button>\r\n </div>\r\n </gm-form-item>\r\n <div ref=\"visibilityMarkRef\" class=\"gm-absolute gm-bottom-3 gm-right-0 -gm-z-10 gm-h-1 gm-w-1\" />\r\n </div>\r\n </div>\r\n </gm-form>\r\n </div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { computed, nextTick, provide, ref } from 'vue';\r\nimport { useElementSize, useElementVisibility } from '@vueuse/core';\r\nimport { ArrowDown, Refresh, Search } from '@element-plus/icons-vue';\r\nimport { searchFormEmits, searchFormItemList, searchFormProps } from './searchForm';\r\nimport { queryParamsKey, searchFormHandleQueryKey } from './constants';\r\nimport type { CSSProperties } from 'vue';\r\nimport type { FormInstance } from '../../base/form';\r\ndefineOptions({\r\n name: 'GmSearchForm',\r\n});\r\nconst showSearch = defineModel<boolean>('showSearch', { default: true });\r\n\r\nconst queryParams = defineModel<Record<string, any>>('queryParams', { required: true });\r\n\r\nprovide(queryParamsKey, queryParams);\r\n\r\nconst props = defineProps(searchFormProps);\r\nconst emit = defineEmits(searchFormEmits);\r\n\r\nconst queryDivRef = ref<HTMLDivElement>();\r\nconst visibilityMarkRef = ref<HTMLDivElement>();\r\nconst markIsVisibility = useElementVisibility(visibilityMarkRef);\r\n\r\nconst { width: queryDivWidth } = useElementSize(queryDivRef);\r\n// 列个数\r\nconst colsCount = computed(() => Math.floor(queryDivWidth.value / 269));\r\nconst showMore = ref(false);\r\n// 当 showMore展开 为 false 时,标注为可见 则不显示展开按钮\r\nconst notShowMore = computed(() => showMore.value === false && markIsVisibility.value === true);\r\n\r\n/**搜索重置按钮组样式 */\r\nconst searchButtonItemStyle = computed<CSSProperties>(() => {\r\n if (notShowMore.value) {\r\n return {};\r\n }\r\n return {\r\n gridColumn: colsCount.value,\r\n gridRow: showMore.value ? undefined : 1,\r\n };\r\n});\r\nconst handleShowMoreChange = async () => {\r\n showMore.value = !showMore.value;\r\n // 手动触发 scroll 事件\r\n const scrollEvent = new Event('resize');\r\n await nextTick();\r\n // 手动触发事件\r\n window.dispatchEvent(scrollEvent);\r\n};\r\n\r\n// 通过json渲染组件\r\nconst optionsList = computed(() => {\r\n return props.options.map(it => {\r\n const findComponent = searchFormItemList.find(item => item.type === it.type);\r\n if (findComponent) {\r\n it.component = findComponent.component;\r\n }\r\n return it;\r\n });\r\n});\r\n\r\nconst queryRef = ref<FormInstance>();\r\n\r\nconst handleQuery = (...args: any[]) => {\r\n emit('handleQuery', ...args);\r\n};\r\nprovide(searchFormHandleQueryKey, handleQuery);\r\n\r\nconst resetQuery = () => {\r\n queryRef.value?.resetFields();\r\n emit('resetQuery');\r\n};\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n:deep(.gmSearchForm .el-form-item) {\r\n margin-right: 0;\r\n margin-bottom: 4px;\r\n}\r\n</style>\r\n"],"names":["_useModel"],"mappings":";;;;;;AACA,MAAM,OAAU,GAAA,CAAA,CAAA;;;;;;;;;;;;;;AAqChB,IAAM,MAAA,UAAA,GAAaA,QAAqB,CAAA,OAAA,EAAA,YAA+B,CAAA,CAAA;AAEvE,IAAM,MAAA,WAAA,GAAcA,QAAiC,CAAA,OAAA,EAAA,aAAiC,CAAA,CAAA;AAEtF,IAAA,OAAA,CAAQ,gBAAgB,WAAW,CAAA,CAAA;AAEnC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAA,MAAM,cAAc,GAAoB,EAAA,CAAA;AACxC,IAAA,MAAM,oBAAoB,GAAoB,EAAA,CAAA;AAC9C,IAAM,MAAA,gBAAA,GAAmB,qBAAqB,iBAAiB,CAAA,CAAA;AAE/D,IAAA,MAAM,EAAE,KAAA,EAAO,aAAc,EAAA,GAAI,eAAe,WAAW,CAAA,CAAA;AAE3D,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM,IAAA,CAAK,MAAM,aAAc,CAAA,KAAA,GAAQ,GAAG,CAAC,CAAA,CAAA;AACtE,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,WAAA,GAAc,SAAS,MAAM,QAAA,CAAS,UAAU,KAAS,IAAA,gBAAA,CAAiB,UAAU,IAAI,CAAA,CAAA;AAG9F,IAAM,MAAA,qBAAA,GAAwB,SAAwB,MAAM;AAC1D,MAAA,IAAI,YAAY,KAAO,EAAA;AACrB,QAAA,OAAO,EAAC,CAAA;AAAA,OACV;AACA,MAAO,OAAA;AAAA,QACL,YAAY,SAAU,CAAA,KAAA;AAAA,QACtB,OAAA,EAAS,QAAS,CAAA,KAAA,GAAQ,KAAY,CAAA,GAAA,CAAA;AAAA,OACxC,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAA,MAAM,uBAAuB,YAAY;AACvC,MAAS,QAAA,CAAA,KAAA,GAAQ,CAAC,QAAS,CAAA,KAAA,CAAA;AAE3B,MAAM,MAAA,WAAA,GAAc,IAAI,KAAA,CAAM,QAAQ,CAAA,CAAA;AACtC,MAAA,MAAM,QAAS,EAAA,CAAA;AAEf,MAAA,MAAA,CAAO,cAAc,WAAW,CAAA,CAAA;AAAA,KAClC,CAAA;AAGA,IAAM,MAAA,WAAA,GAAc,SAAS,MAAM;AACjC,MAAO,OAAA,KAAA,CAAM,OAAQ,CAAA,GAAA,CAAI,CAAM,EAAA,KAAA;AAC7B,QAAA,MAAM,gBAAgB,kBAAmB,CAAA,IAAA,CAAK,UAAQ,IAAK,CAAA,IAAA,KAAS,GAAG,IAAI,CAAA,CAAA;AAC3E,QAAA,IAAI,aAAe,EAAA;AACjB,UAAA,EAAA,CAAG,YAAY,aAAc,CAAA,SAAA,CAAA;AAAA,SAC/B;AACA,QAAO,OAAA,EAAA,CAAA;AAAA,OACR,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAED,IAAA,MAAM,WAAW,GAAkB,EAAA,CAAA;AAEnC,IAAM,MAAA,WAAA,GAAc,IAAI,IAAgB,KAAA;AACtC,MAAK,IAAA,CAAA,aAAA,EAAe,GAAG,IAAI,CAAA,CAAA;AAAA,KAC7B,CAAA;AACA,IAAA,OAAA,CAAQ,0BAA0B,WAAW,CAAA,CAAA;AAE7C,IAAA,MAAM,aAAa,MAAM;AACvB,MAAA,QAAA,CAAS,OAAO,WAAY,EAAA,CAAA;AAC5B,MAAA,IAAA,CAAK,YAAY,CAAA,CAAA;AAAA,KACnB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue2.mjs
CHANGED
|
@@ -35,7 +35,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
disabled: _ctx.disabled,
|
|
36
36
|
"collapse-tags": "",
|
|
37
37
|
"collapse-tags-tooltip": "",
|
|
38
|
-
class: "gm-w-
|
|
38
|
+
class: "gm-w-full",
|
|
39
39
|
placeholder: _ctx.label,
|
|
40
40
|
onChange
|
|
41
41
|
}, null, 8, ["modelValue", "options", "props", "disabled", "placeholder"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFormCascader.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-cascader\r\n v-model=\"modelValue\"\r\n :options=\"options\"\r\n :props=\"{ ...cascaderProps, expandTrigger: 'hover' }\"\r\n clearable\r\n filterable\r\n :disabled=\"disabled\"\r\n collapse-tags\r\n collapse-tags-tooltip\r\n class=\"gm-w-
|
|
1
|
+
{"version":3,"file":"SearchFormCascader.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-cascader\r\n v-model=\"modelValue\"\r\n :options=\"options\"\r\n :props=\"{ ...cascaderProps, expandTrigger: 'hover' }\"\r\n clearable\r\n filterable\r\n :disabled=\"disabled\"\r\n collapse-tags\r\n collapse-tags-tooltip\r\n class=\"gm-w-full\"\r\n :placeholder=\"label\"\r\n @change=\"onChange\"\r\n />\r\n </gm-form-item>\r\n</template>\r\n<script lang=\"ts\" setup>\r\n// import { inject } from 'vue';\r\nimport { useWatchModelChange } from '../../composables/useWatchModelChange';\r\n// import { searchFormHandleQueryKey } from '../../searchForm';\r\nimport { SearchFormCascaderName, searchFormCascaderEmits, searchFormCascaderProps } from './searchFormCascader';\r\nimport type { CascaderValue } from 'element-plus';\r\nimport type { CascaderProps } from '@giime/components/src/base/cascader';\r\ndefineOptions({\r\n name: SearchFormCascaderName,\r\n});\r\nconst modelValue = defineModel<CascaderProps['modelValue'] | undefined>();\r\nconst props = defineProps(searchFormCascaderProps);\r\nconst emit = defineEmits(searchFormCascaderEmits);\r\nuseWatchModelChange(modelValue, { prop: props.prop });\r\n// const handleQuery = inject(searchFormHandleQueryKey);\r\nconst onChange = (value: CascaderValue) => {\r\n // handleQuery?.();\r\n emit('change', value);\r\n};\r\n</script>\r\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;AA2BA,IAAM,MAAA,UAAA,GAAaA,QAAqD,CAAA,OAAA,EAAA,YAAA,CAAA,CAAA;AACxE,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,mBAAA,CAAoB,UAAY,EAAA,EAAE,IAAM,EAAA,KAAA,CAAM,MAAM,CAAA,CAAA;AAEpD,IAAM,MAAA,QAAA,GAAW,CAAC,KAAyB,KAAA;AAEzC,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeModels, useModel, computed, resolveComponent, openBlock, createBlock, withCtx, createVNode
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, resolveComponent, openBlock, createBlock, withCtx, createVNode } from 'vue';
|
|
2
2
|
import '../../../../../../utils/index.mjs';
|
|
3
3
|
import { useWatchModelChange } from '../../composables/useWatchModelChange.mjs';
|
|
4
4
|
import { SearchFormDatePickerName, searchFormDatePickerProps, searchFormDatePickerEmits } from './searchFormDatePicker.mjs';
|
|
@@ -40,14 +40,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
placeholder: _ctx.label,
|
|
41
41
|
"start-placeholder": `${_ctx.label}\u5F00\u59CB\u65E5\u671F`,
|
|
42
42
|
"end-placeholder": `${_ctx.label}\u7ED3\u675F\u65E5\u671F`,
|
|
43
|
-
style:
|
|
44
|
-
"--el-date-editor-width":
|
|
45
|
-
}
|
|
43
|
+
style: {
|
|
44
|
+
"--el-date-editor-width": "100%"
|
|
45
|
+
},
|
|
46
46
|
shortcuts: shortcutList.value,
|
|
47
47
|
defaultValue: _ctx.defaultValue,
|
|
48
48
|
defaultTime: _ctx.defaultTime,
|
|
49
49
|
onChange
|
|
50
|
-
}, null, 8, ["modelValue", "type", "value-format", "disabled", "placeholder", "start-placeholder", "end-placeholder", "
|
|
50
|
+
}, null, 8, ["modelValue", "type", "value-format", "disabled", "placeholder", "start-placeholder", "end-placeholder", "shortcuts", "defaultValue", "defaultTime"])
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
53
|
/* STABLE */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFormDatePicker.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-date-picker\r\n v-model=\"modelValue\"\r\n :type=\"type\"\r\n range-separator=\"-\"\r\n :value-format=\"valueFormat\"\r\n clearable\r\n :disabled=\"disabled\"\r\n :placeholder=\"label\"\r\n :start-placeholder=\"`${label}开始日期`\"\r\n :end-placeholder=\"`${label}结束日期`\"\r\n :style=\"{\r\n '--el-date-editor-width':
|
|
1
|
+
{"version":3,"file":"SearchFormDatePicker.vue2.mjs","sources":["../../../../../../../../../packages/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue"],"sourcesContent":["<template>\r\n <gm-form-item :prop=\"prop\">\r\n <gm-date-picker\r\n v-model=\"modelValue\"\r\n :type=\"type\"\r\n range-separator=\"-\"\r\n :value-format=\"valueFormat\"\r\n clearable\r\n :disabled=\"disabled\"\r\n :placeholder=\"label\"\r\n :start-placeholder=\"`${label}开始日期`\"\r\n :end-placeholder=\"`${label}结束日期`\"\r\n :style=\"{\r\n '--el-date-editor-width': '100%',\r\n }\"\r\n :shortcuts=\"shortcutList\"\r\n :defaultValue=\"defaultValue\"\r\n :defaultTime=\"defaultTime\"\r\n @change=\"onChange\"\r\n />\r\n </gm-form-item>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { computed } from 'vue';\r\nimport { getDateShortcuts } from '@giime/utils';\r\nimport { useWatchModelChange } from '../../composables/useWatchModelChange';\r\n// import { searchFormHandleQueryKey } from '../../searchForm';\r\nimport { SearchFormDatePickerName, searchFormDatePickerEmits, searchFormDatePickerProps } from './searchFormDatePicker';\r\nimport type { ModelValueType } from 'element-plus';\r\nimport type { DatePickerProps } from '@giime/components/src/base/datePicker';\r\ndefineOptions({\r\n name: SearchFormDatePickerName,\r\n});\r\nconst modelValue = defineModel<DatePickerProps['modelValue'] | undefined>();\r\nconst props = defineProps(searchFormDatePickerProps);\r\nconst emit = defineEmits(searchFormDatePickerEmits);\r\nuseWatchModelChange(modelValue, { prop: props.prop });\r\n\r\nconst isRangeType = computed(() => props.type === 'datetimerange' || props.type === 'daterange' || props.type === 'monthrange');\r\n/**\r\n * shortcuts赋予默认值\r\n */\r\nconst shortcutList = computed(() => (Array.isArray(props.shortcuts) ? props.shortcuts : getDateShortcuts(props.type)));\r\n// const handleQuery = inject(searchFormHandleQueryKey);\r\nconst onChange = (value: ModelValueType) => {\r\n // handleQuery?.();\r\n emit('change', value);\r\n};\r\n</script>\r\n"],"names":["_useModel"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,IAAM,MAAA,UAAA,GAAaA,QAAuD,CAAA,OAAA,EAAA,YAAA,CAAA,CAAA;AAC1E,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAA,mBAAA,CAAoB,UAAY,EAAA,EAAE,IAAM,EAAA,KAAA,CAAM,MAAM,CAAA,CAAA;AAEpD,IAAM,MAAA,WAAA,GAAc,QAAS,CAAA,MAAM,KAAM,CAAA,IAAA,KAAS,eAAmB,IAAA,KAAA,CAAM,IAAS,KAAA,WAAA,IAAe,KAAM,CAAA,IAAA,KAAS,YAAY,CAAA,CAAA;AAI9H,IAAA,MAAM,YAAe,GAAA,QAAA,CAAS,MAAO,KAAA,CAAM,OAAQ,CAAA,KAAA,CAAM,SAAS,CAAA,GAAI,KAAM,CAAA,SAAA,GAAY,gBAAiB,CAAA,KAAA,CAAM,IAAI,CAAE,CAAA,CAAA;AAErH,IAAM,MAAA,QAAA,GAAW,CAAC,KAA0B,KAAA;AAE1C,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|