@fmdevui/fm-dev 1.0.17 → 1.0.19

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.
Files changed (29) hide show
  1. package/es/core/ui/components/dragVerify/dragVerifyImgRotate.vue.d.ts +247 -0
  2. package/es/core/ui/components/index.d.ts +246 -1
  3. package/es/index.d.ts +3 -0
  4. package/es/index.mjs +4 -1
  5. package/es/packages/core/index.mjs +1 -1
  6. package/es/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue.mjs +118 -0
  7. package/es/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue2.mjs +266 -0
  8. package/es/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue3.mjs +3 -0
  9. package/es/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue4.mjs +3 -0
  10. package/es/packages/core/ui/components/index.mjs +3 -1
  11. package/{lib/index.css → es/version.css} +3 -1
  12. package/index.css +113 -1
  13. package/index.js +669 -25
  14. package/index.min.css +1 -0
  15. package/index.min.js +28 -24
  16. package/index.min.mjs +29 -25
  17. package/index.mjs +656 -23
  18. package/lib/core/ui/components/dragVerify/dragVerifyImgRotate.vue.d.ts +247 -0
  19. package/lib/core/ui/components/index.d.ts +246 -1
  20. package/{es → lib}/defaults.css +5 -4
  21. package/lib/index.d.ts +3 -0
  22. package/lib/index.js +14 -0
  23. package/lib/packages/core/index.js +1 -0
  24. package/lib/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue.js +122 -0
  25. package/lib/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue2.js +270 -0
  26. package/lib/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue3.js +7 -0
  27. package/lib/packages/core/ui/components/dragVerify/dragVerifyImgRotate.vue4.js +7 -0
  28. package/lib/packages/core/ui/components/index.js +3 -0
  29. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- /*! fm-dev v1.0.17 */
2
- import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, resolveDynamicComponent, effectScope, shallowRef, isRef as isRef$1, getCurrentInstance, h, inject, onUnmounted, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, unref, isReactive as isReactive$1, toRef, getCurrentScope, onScopeDispose, toRefs, resolveDirective } from 'vue';
1
+ /*! fm-dev v1.0.19 */
2
+ import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, resolveDynamicComponent, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective } from 'vue';
3
+ import { ElMessage, dayjs } from 'element-plus';
3
4
  import crypto from 'crypto';
4
5
  import require$$0 from 'url';
5
6
  import require$$1 from 'http';
@@ -8,19 +9,18 @@ import util from 'util';
8
9
  import stream, { Readable } from 'stream';
9
10
  import require$$4 from 'assert';
10
11
  import zlib from 'zlib';
11
- import { ElMessage, dayjs } from 'element-plus';
12
12
 
13
- const _hoisted_1$2 = { class: "fm-transfer-panel" };
14
- const _hoisted_2$1 = { class: "fm-transfer-panel__header" };
15
- const _hoisted_3 = { class: "fm-transfer-panel__body" };
16
- const _hoisted_4 = { class: "fm-transfer-buttons__item" };
13
+ const _hoisted_1$3 = { class: "fm-transfer-panel" };
14
+ const _hoisted_2$2 = { class: "fm-transfer-panel__header" };
15
+ const _hoisted_3$1 = { class: "fm-transfer-panel__body" };
16
+ const _hoisted_4$1 = { class: "fm-transfer-buttons__item" };
17
17
  const _hoisted_5 = { class: "fm-transfer-buttons__item" };
18
18
  const _hoisted_6 = { class: "fm-transfer-buttons__item" };
19
19
  const _hoisted_7 = { class: "fm-transfer-buttons__item" };
20
20
  const _hoisted_8 = { class: "fm-transfer-panel" };
21
21
  const _hoisted_9 = { class: "fm-transfer-panel__header" };
22
22
  const _hoisted_10 = { class: "fm-transfer-panel__body" };
23
- var _sfc_main$3 = /* @__PURE__ */ defineComponent({
23
+ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
24
24
  ...{
25
25
  name: "FmTransfer"
26
26
  },
@@ -180,8 +180,8 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
180
180
  default: withCtx(() => [
181
181
  createVNode(_component_el_col, { span: 10 }, {
182
182
  default: withCtx(() => [
183
- createElementVNode("div", _hoisted_1$2, [
184
- createElementVNode("p", _hoisted_2$1, [
183
+ createElementVNode("div", _hoisted_1$3, [
184
+ createElementVNode("p", _hoisted_2$2, [
185
185
  createVNode(_component_el_checkbox, {
186
186
  modelValue: state.leftAllChecked,
187
187
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.leftAllChecked = $event),
@@ -207,7 +207,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
207
207
  /* TEXT */
208
208
  )
209
209
  ]),
210
- createElementVNode("div", _hoisted_3, [
210
+ createElementVNode("div", _hoisted_3$1, [
211
211
  createVNode(_component_el_input, {
212
212
  class: "transfer-panel__filter",
213
213
  modelValue: state.leftKeyword,
@@ -258,7 +258,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
258
258
  class: "fm-transfer-buttons"
259
259
  }, {
260
260
  default: withCtx(() => [
261
- createElementVNode("div", _hoisted_4, [
261
+ createElementVNode("div", _hoisted_4$1, [
262
262
  createVNode(_component_el_button, {
263
263
  type: "primary",
264
264
  style: {},
@@ -377,9 +377,9 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
377
377
  }
378
378
  });
379
379
 
380
- const _hoisted_1$1 = { class: "notice-bar-warp-text-box" };
381
- const _hoisted_2 = ["innerHTML"];
382
- var _sfc_main$2 = /* @__PURE__ */ defineComponent({
380
+ const _hoisted_1$2 = { class: "notice-bar-warp-text-box" };
381
+ const _hoisted_2$1 = ["innerHTML"];
382
+ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
383
383
  ...{
384
384
  name: "FmNoticeBar"
385
385
  },
@@ -470,7 +470,7 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
470
470
  2
471
471
  /* CLASS */
472
472
  )) : createCommentVNode("v-if", true),
473
- createElementVNode("div", _hoisted_1$1, [
473
+ createElementVNode("div", _hoisted_1$2, [
474
474
  createElementVNode(
475
475
  "div",
476
476
  {
@@ -482,7 +482,7 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
482
482
  createElementVNode("div", {
483
483
  innerHTML: props.text,
484
484
  "data-slate-editor": ""
485
- }, null, 8, _hoisted_2)
485
+ }, null, 8, _hoisted_2$1)
486
486
  ],
487
487
  512
488
488
  /* NEED_PATCH */
@@ -502,6 +502,390 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
502
502
  }
503
503
  });
504
504
 
505
+ var _sfc_main$2 = {
506
+ name: "dragVerify",
507
+ props: {
508
+ isPassing: {
509
+ type: Boolean,
510
+ default: false
511
+ },
512
+ width: {
513
+ type: Number,
514
+ default: 250
515
+ },
516
+ height: {
517
+ type: Number,
518
+ default: 40
519
+ },
520
+ text: {
521
+ type: String,
522
+ default: "swiping to the right side"
523
+ },
524
+ successText: {
525
+ type: String,
526
+ default: "success"
527
+ },
528
+ background: {
529
+ type: String,
530
+ default: "#eee"
531
+ },
532
+ progressBarBg: {
533
+ type: String,
534
+ default: "#76c61d"
535
+ },
536
+ completedBg: {
537
+ type: String,
538
+ default: "#76c61d"
539
+ },
540
+ circle: {
541
+ type: Boolean,
542
+ default: false
543
+ },
544
+ radius: {
545
+ type: String,
546
+ default: "4px"
547
+ },
548
+ handlerIcon: {
549
+ type: String
550
+ },
551
+ successIcon: {
552
+ type: String
553
+ },
554
+ handlerBg: {
555
+ type: String,
556
+ default: "#fff"
557
+ },
558
+ textSize: {
559
+ type: String,
560
+ default: "14px"
561
+ },
562
+ textColor: {
563
+ type: String,
564
+ default: "#333"
565
+ },
566
+ imgsrc: {
567
+ type: String
568
+ },
569
+ showTips: {
570
+ type: Boolean,
571
+ default: true
572
+ },
573
+ successTip: {
574
+ type: String,
575
+ default: "\u9A8C\u8BC1\u901A\u8FC7"
576
+ },
577
+ failTip: {
578
+ type: String,
579
+ default: "\u9A8C\u8BC1\u5931\u8D25"
580
+ },
581
+ diffDegree: {
582
+ type: Number,
583
+ default: 10
584
+ },
585
+ minDegree: {
586
+ type: Number,
587
+ default: 90
588
+ },
589
+ maxDegree: {
590
+ type: Number,
591
+ default: 270
592
+ }
593
+ },
594
+ mounted: function() {
595
+ const dragEl = this.$refs.dragVerify;
596
+ dragEl.style.setProperty("--textColor", this.textColor);
597
+ dragEl.style.setProperty("--width", Math.floor(this.width / 2) + "px");
598
+ dragEl.style.setProperty("--pwidth", -Math.floor(this.width / 2) + "px");
599
+ },
600
+ computed: {
601
+ handlerStyle: function() {
602
+ return {
603
+ width: this.height + "px",
604
+ height: this.height + "px",
605
+ background: this.handlerBg
606
+ };
607
+ },
608
+ message: function() {
609
+ return this.isPassing ? "" : this.text;
610
+ },
611
+ successMessage: function() {
612
+ return this.isPassing ? this.successText : "";
613
+ },
614
+ dragVerifyStyle: function() {
615
+ return {
616
+ width: this.width + "px",
617
+ height: this.height + "px",
618
+ lineHeight: this.height + "px",
619
+ marginTop: "20px",
620
+ background: this.background,
621
+ borderRadius: this.circle ? this.height / 2 + "px" : this.radius
622
+ };
623
+ },
624
+ dragVerifyImgStyle: function() {
625
+ return {
626
+ width: this.width + "px",
627
+ height: this.width + "px",
628
+ position: "relative",
629
+ overflow: "hidden",
630
+ "border-radius": "50%"
631
+ };
632
+ },
633
+ progressBarStyle: function() {
634
+ return {
635
+ background: this.progressBarBg,
636
+ height: this.height + "px",
637
+ borderRadius: this.circle ? this.height / 2 + "px 0 0 " + this.height / 2 + "px" : this.radius
638
+ };
639
+ },
640
+ textStyle: function() {
641
+ return {
642
+ height: this.height + "px",
643
+ width: this.width + "px",
644
+ fontSize: this.textSize
645
+ };
646
+ },
647
+ factor: function() {
648
+ if (this.minDegree == this.maxDegree) {
649
+ return Math.floor(1 + Math.random() * 6) / 10 + 1;
650
+ }
651
+ return 1;
652
+ }
653
+ },
654
+ data() {
655
+ return {
656
+ isMoving: false,
657
+ x: 0,
658
+ isOk: false,
659
+ showBar: false,
660
+ showErrorTip: false,
661
+ ranRotate: 0,
662
+ cRotate: 0,
663
+ imgStyle: {}
664
+ };
665
+ },
666
+ methods: {
667
+ checkimgLoaded: function() {
668
+ var minDegree = this.minDegree;
669
+ var maxDegree = this.maxDegree;
670
+ var ranRotate = Math.floor(minDegree + Math.random() * (maxDegree - minDegree));
671
+ this.ranRotate = ranRotate;
672
+ this.imgStyle = {
673
+ transform: `rotateZ(${ranRotate}deg)`
674
+ };
675
+ },
676
+ dragStart: function(e) {
677
+ if (!this.isPassing) {
678
+ this.isMoving = true;
679
+ this.x = e.pageX || e.touches[0].pageX;
680
+ }
681
+ this.showBar = true;
682
+ this.showErrorTip = false;
683
+ this.$emit("handlerMove");
684
+ },
685
+ dragMoving: function(e) {
686
+ if (this.isMoving && !this.isPassing) {
687
+ var _x = (e.pageX || e.touches[0].pageX) - this.x;
688
+ var handler = this.$refs.handler;
689
+ handler.style.left = _x + "px";
690
+ var progressBar = this.$refs.progressBar;
691
+ progressBar.style.width = _x + this.height / 2 + "px";
692
+ var cRotate = Math.ceil(_x / (this.width - this.height) * this.maxDegree * this.factor);
693
+ this.cRotate = cRotate;
694
+ var rotate = this.ranRotate - cRotate;
695
+ this.imgStyle = {
696
+ transform: `rotateZ(${rotate}deg)`
697
+ };
698
+ }
699
+ },
700
+ dragFinish: function(e) {
701
+ if (this.isMoving && !this.isPassing) {
702
+ if (Math.abs(this.ranRotate - this.cRotate) > this.diffDegree) {
703
+ this.isOk = true;
704
+ this.imgStyle = {
705
+ transform: `rotateZ(${this.ranRotate}deg)`
706
+ };
707
+ var that = this;
708
+ setTimeout(function() {
709
+ var handler = that.$refs.handler;
710
+ var progressBar = that.$refs.progressBar;
711
+ handler.style.left = "0";
712
+ progressBar.style.width = "0";
713
+ that.isOk = false;
714
+ }, 500);
715
+ this.showErrorTip = true;
716
+ this.$emit("passfail");
717
+ } else {
718
+ this.passVerify();
719
+ }
720
+ this.isMoving = false;
721
+ }
722
+ },
723
+ passVerify: function() {
724
+ this.$emit("update:isPassing", true);
725
+ this.isMoving = false;
726
+ var handler = this.$refs.handler;
727
+ handler.children[0].className = this.successIcon;
728
+ this.$refs.progressBar.style.background = this.completedBg;
729
+ this.$refs.message.style["-webkit-text-fill-color"] = "unset";
730
+ this.$refs.message.style.animation = "slidetounlock2 3s infinite";
731
+ this.$refs.progressBar.style.color = "#fff";
732
+ this.$refs.progressBar.style.fontSize = this.textSize;
733
+ this.$emit("passcallback");
734
+ },
735
+ reset: function() {
736
+ this.reImg();
737
+ this.checkimgLoaded();
738
+ },
739
+ reImg: function() {
740
+ this.$emit("update:isPassing", false);
741
+ const oriData = this.$options.data();
742
+ for (const key in oriData) {
743
+ if (Object.prototype.hasOwnProperty.call(oriData, key)) {
744
+ this[key] = oriData[key];
745
+ }
746
+ }
747
+ var handler = this.$refs.handler;
748
+ var message = this.$refs.message;
749
+ handler.style.left = "0";
750
+ this.$refs.progressBar.style.width = "0";
751
+ handler.children[0].className = this.handlerIcon;
752
+ message.style["-webkit-text-fill-color"] = "transparent";
753
+ message.style.animation = "slidetounlock 3s infinite";
754
+ message.style.color = this.background;
755
+ },
756
+ refreshimg: function() {
757
+ this.$emit("refresh");
758
+ }
759
+ },
760
+ watch: {
761
+ imgsrc: {
762
+ immediate: false,
763
+ handler: function() {
764
+ this.reImg();
765
+ }
766
+ }
767
+ }
768
+ };
769
+
770
+ var _export_sfc = (sfc, props) => {
771
+ const target = sfc.__vccOpts || sfc;
772
+ for (const [key, val] of props) {
773
+ target[key] = val;
774
+ }
775
+ return target;
776
+ };
777
+
778
+ const _hoisted_1$1 = { class: "drag-verify-container" };
779
+ const _hoisted_2 = ["src"];
780
+ const _hoisted_3 = {
781
+ key: 0,
782
+ class: "tips success"
783
+ };
784
+ const _hoisted_4 = {
785
+ key: 1,
786
+ class: "tips danger"
787
+ };
788
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
789
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
790
+ createElementVNode(
791
+ "div",
792
+ {
793
+ style: normalizeStyle([$options.dragVerifyImgStyle, { "background-color": "var(--el-color-primary)" }])
794
+ },
795
+ [
796
+ createElementVNode("img", {
797
+ ref: "checkImg",
798
+ src: $props.imgsrc,
799
+ class: normalizeClass(["check-img", { goOrigin: $data.isOk }]),
800
+ onLoad: _cache[0] || (_cache[0] = (...args) => $options.checkimgLoaded && $options.checkimgLoaded(...args)),
801
+ style: normalizeStyle($data.imgStyle),
802
+ alt: ""
803
+ }, null, 46, _hoisted_2),
804
+ $props.showTips && $props.isPassing ? (openBlock(), createElementBlock(
805
+ "div",
806
+ _hoisted_3,
807
+ toDisplayString$1($props.successTip),
808
+ 1
809
+ /* TEXT */
810
+ )) : createCommentVNode("v-if", true),
811
+ $props.showTips && !$props.isPassing && $data.showErrorTip ? (openBlock(), createElementBlock(
812
+ "div",
813
+ _hoisted_4,
814
+ toDisplayString$1($props.failTip),
815
+ 1
816
+ /* TEXT */
817
+ )) : createCommentVNode("v-if", true)
818
+ ],
819
+ 4
820
+ /* STYLE */
821
+ ),
822
+ createElementVNode(
823
+ "div",
824
+ {
825
+ ref: "dragVerify",
826
+ class: "drag_verify",
827
+ style: normalizeStyle($options.dragVerifyStyle),
828
+ onMousemove: _cache[3] || (_cache[3] = (...args) => $options.dragMoving && $options.dragMoving(...args)),
829
+ onMouseup: _cache[4] || (_cache[4] = (...args) => $options.dragFinish && $options.dragFinish(...args)),
830
+ onMouseleave: _cache[5] || (_cache[5] = (...args) => $options.dragFinish && $options.dragFinish(...args)),
831
+ onTouchmove: _cache[6] || (_cache[6] = withModifiers((...args) => $options.dragMoving && $options.dragMoving(...args), ["prevent"])),
832
+ onTouchend: _cache[7] || (_cache[7] = withModifiers((...args) => $options.dragFinish && $options.dragFinish(...args), ["prevent"]))
833
+ },
834
+ [
835
+ createElementVNode(
836
+ "div",
837
+ {
838
+ class: normalizeClass(["dv_progress_bar", { goFirst2: $data.isOk }]),
839
+ ref: "progressBar",
840
+ style: normalizeStyle($options.progressBarStyle)
841
+ },
842
+ toDisplayString$1($options.successMessage),
843
+ 7
844
+ /* TEXT, CLASS, STYLE */
845
+ ),
846
+ createElementVNode(
847
+ "div",
848
+ {
849
+ class: "dv_text",
850
+ style: normalizeStyle($options.textStyle),
851
+ ref: "message"
852
+ },
853
+ toDisplayString$1($options.message),
854
+ 5
855
+ /* TEXT, STYLE */
856
+ ),
857
+ createElementVNode(
858
+ "div",
859
+ {
860
+ class: normalizeClass(["dv_handler dv_handler_bg", { goFirst: $data.isOk }]),
861
+ onMousedown: _cache[1] || (_cache[1] = (...args) => $options.dragStart && $options.dragStart(...args)),
862
+ onTouchstart: _cache[2] || (_cache[2] = withModifiers((...args) => $options.dragStart && $options.dragStart(...args), ["prevent"])),
863
+ ref: "handler",
864
+ style: normalizeStyle([$options.handlerStyle, { "background-color": "var(--el-color-primary)" }])
865
+ },
866
+ [
867
+ createElementVNode(
868
+ "i",
869
+ {
870
+ class: normalizeClass($props.handlerIcon),
871
+ style: { "color": "#fff" }
872
+ },
873
+ null,
874
+ 2
875
+ /* CLASS */
876
+ )
877
+ ],
878
+ 38
879
+ /* CLASS, STYLE, NEED_HYDRATION */
880
+ )
881
+ ],
882
+ 36
883
+ /* STYLE, NEED_HYDRATION */
884
+ )
885
+ ]);
886
+ }
887
+ var dragimg = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__scopeId", "data-v-9e8c9ed2"]]);
888
+
505
889
  /*! Element Plus Icons Vue v2.3.1 */
506
890
 
507
891
  var add_location_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -6659,8 +7043,9 @@ function elSvg(app) {
6659
7043
  }
6660
7044
  }
6661
7045
 
6662
- const FmTransfer = _sfc_main$3;
6663
- const FmNoticeBar = _sfc_main$2;
7046
+ const FmTransfer = _sfc_main$4;
7047
+ const FmNoticeBar = _sfc_main$3;
7048
+ const FmDragImg = dragimg;
6664
7049
 
6665
7050
  const makeInstaller = (components = []) => {
6666
7051
  const install = (app) => {
@@ -29793,7 +30178,7 @@ function basename(filename, ext) {
29793
30178
  return baseNameWithExt.substring(0, extIndex);
29794
30179
  }
29795
30180
  }
29796
- var deepClone = (0, import_rfdc.default)({ circles: true });
30181
+ var deepClone$1 = (0, import_rfdc.default)({ circles: true });
29797
30182
 
29798
30183
  const DEBOUNCE_DEFAULTS = {
29799
30184
  trailing: true
@@ -32955,8 +33340,8 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
32955
33340
  console.warn = () => {
32956
33341
  };
32957
33342
  target[ROUTER_INFO_KEY] = {
32958
- currentRoute: currentRoute ? deepClone(currentRoute) : {},
32959
- routes: deepClone(routes)
33343
+ currentRoute: currentRoute ? deepClone$1(currentRoute) : {},
33344
+ routes: deepClone$1(routes)
32960
33345
  };
32961
33346
  target[ROUTER_KEY] = router;
32962
33347
  console.warn = c;
@@ -35711,6 +36096,42 @@ id, setup, setupOptions) {
35711
36096
  return useStore;
35712
36097
  }
35713
36098
 
36099
+ /**
36100
+ * Creates an object of references with all the state, getters, and plugin-added
36101
+ * state properties of the store. Similar to `toRefs()` but specifically
36102
+ * designed for Pinia stores so methods and non reactive properties are
36103
+ * completely ignored.
36104
+ *
36105
+ * @param store - store to extract the refs from
36106
+ */
36107
+ function storeToRefs(store) {
36108
+ const rawStore = toRaw$1(store);
36109
+ const refs = {};
36110
+ for (const key in rawStore) {
36111
+ const value = rawStore[key];
36112
+ // There is no native method to check for a computed
36113
+ // https://github.com/vuejs/core/pull/4165
36114
+ if (value.effect) {
36115
+ // @ts-expect-error: too hard to type correctly
36116
+ refs[key] =
36117
+ // ...
36118
+ computed({
36119
+ get: () => store[key],
36120
+ set(value) {
36121
+ store[key] = value;
36122
+ },
36123
+ });
36124
+ }
36125
+ else if (isRef$1(value) || isReactive$1(value)) {
36126
+ // @ts-expect-error: the key is state or getter
36127
+ refs[key] =
36128
+ // ---
36129
+ toRef(store, key);
36130
+ }
36131
+ }
36132
+ return refs;
36133
+ }
36134
+
35714
36135
  const pinia = createPinia();
35715
36136
 
35716
36137
  const useKeepALiveNames = defineStore("keepALiveNames", {
@@ -51687,8 +52108,220 @@ const useVxeTable = (opt, extras) => {
51687
52108
  return extras ? merge(options, extras) : options;
51688
52109
  };
51689
52110
 
52111
+ /*!
52112
+ * vue-router v4.5.1
52113
+ * (c) 2025 Eduardo San Martin Morote
52114
+ * @license MIT
52115
+ */
52116
+
52117
+ var NavigationType;
52118
+ (function (NavigationType) {
52119
+ NavigationType["pop"] = "pop";
52120
+ NavigationType["push"] = "push";
52121
+ })(NavigationType || (NavigationType = {}));
52122
+ var NavigationDirection;
52123
+ (function (NavigationDirection) {
52124
+ NavigationDirection["back"] = "back";
52125
+ NavigationDirection["forward"] = "forward";
52126
+ NavigationDirection["unknown"] = "";
52127
+ })(NavigationDirection || (NavigationDirection = {}));
52128
+
52129
+ Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');
52130
+ /**
52131
+ * Enumeration with all possible types for navigation failures. Can be passed to
52132
+ * {@link isNavigationFailure} to check for specific failures.
52133
+ */
52134
+ var NavigationFailureType;
52135
+ (function (NavigationFailureType) {
52136
+ /**
52137
+ * An aborted navigation is a navigation that failed because a navigation
52138
+ * guard returned `false` or called `next(false)`
52139
+ */
52140
+ NavigationFailureType[NavigationFailureType["aborted"] = 4] = "aborted";
52141
+ /**
52142
+ * A cancelled navigation is a navigation that failed because a more recent
52143
+ * navigation finished started (not necessarily finished).
52144
+ */
52145
+ NavigationFailureType[NavigationFailureType["cancelled"] = 8] = "cancelled";
52146
+ /**
52147
+ * A duplicated navigation is a navigation that failed because it was
52148
+ * initiated while already being at the exact same location.
52149
+ */
52150
+ NavigationFailureType[NavigationFailureType["duplicated"] = 16] = "duplicated";
52151
+ })(NavigationFailureType || (NavigationFailureType = {}));
52152
+
52153
+ /**
52154
+ * RouteRecord being rendered by the closest ancestor Router View. Used for
52155
+ * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View
52156
+ * Location Matched
52157
+ *
52158
+ * @internal
52159
+ */
52160
+ Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');
52161
+ /**
52162
+ * Allows overriding the router view depth to control which component in
52163
+ * `matched` is rendered. rvd stands for Router View Depth
52164
+ *
52165
+ * @internal
52166
+ */
52167
+ Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');
52168
+ /**
52169
+ * Allows overriding the router instance returned by `useRouter` in tests. r
52170
+ * stands for router
52171
+ *
52172
+ * @internal
52173
+ */
52174
+ const routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');
52175
+ /**
52176
+ * Allows overriding the current route returned by `useRoute` in tests. rl
52177
+ * stands for route location
52178
+ *
52179
+ * @internal
52180
+ */
52181
+ Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');
52182
+ /**
52183
+ * Allows overriding the current route used by router-view. Internally this is
52184
+ * used when the `route` prop is passed.
52185
+ *
52186
+ * @internal
52187
+ */
52188
+ Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');
52189
+
52190
+ /**
52191
+ * Returns the router instance. Equivalent to using `$router` inside
52192
+ * templates.
52193
+ */
52194
+ function useRouter() {
52195
+ return inject(routerKey);
52196
+ }
52197
+
52198
+ function useTitle() {
52199
+ const stores = useThemeConfig(pinia);
52200
+ const { themeConfig } = storeToRefs(stores);
52201
+ const router = useRouter();
52202
+ nextTick(() => {
52203
+ let webTitle = "";
52204
+ let globalTitle = themeConfig.value.globalTitle;
52205
+ const { path, meta } = router.currentRoute.value;
52206
+ if (path === "/login") {
52207
+ webTitle = meta.title;
52208
+ } else {
52209
+ webTitle = setTagsViewNameI18n(router.currentRoute.value);
52210
+ }
52211
+ document.title = `${webTitle} - ${globalTitle}` || globalTitle;
52212
+ });
52213
+ }
52214
+ function setTagsViewNameI18n(item) {
52215
+ let tagsViewName = "";
52216
+ const { query, params, meta } = item;
52217
+ const i18n = useI18n();
52218
+ const pattern = /^\{("(zh-CN|en|zh-TW)":"[^,]+",?){1,3}}$/;
52219
+ if (query?.tagsViewName || params?.tagsViewName) {
52220
+ if (pattern.test(query?.tagsViewName) || pattern.test(params?.tagsViewName)) {
52221
+ const urlTagsParams = query?.tagsViewName && JSON.parse(query?.tagsViewName) || params?.tagsViewName && JSON.parse(params?.tagsViewName);
52222
+ tagsViewName = urlTagsParams[i18n.locale.value];
52223
+ } else {
52224
+ tagsViewName = query?.tagsViewName || params?.tagsViewName;
52225
+ }
52226
+ } else {
52227
+ tagsViewName = i18n.t(`message.menu.${meta.title}`);
52228
+ }
52229
+ return tagsViewName;
52230
+ }
52231
+ const lazyImg = (el, arr) => {
52232
+ const io = new IntersectionObserver((res) => {
52233
+ res.forEach((v) => {
52234
+ if (v.isIntersecting) {
52235
+ const { img, key } = v.target.dataset;
52236
+ v.target.src = img;
52237
+ v.target.onload = () => {
52238
+ io.unobserve(v.target);
52239
+ arr[key]["loading"] = false;
52240
+ };
52241
+ }
52242
+ });
52243
+ });
52244
+ nextTick(() => {
52245
+ document.querySelectorAll(el).forEach((img) => io.observe(img));
52246
+ });
52247
+ };
52248
+ const globalComponentSize = () => {
52249
+ const stores = useThemeConfig(pinia);
52250
+ const { themeConfig } = storeToRefs(stores);
52251
+ return Local.get("themeConfig")?.globalComponentSize || themeConfig.value?.globalComponentSize;
52252
+ };
52253
+ function deepClone(obj) {
52254
+ let newObj;
52255
+ try {
52256
+ newObj = obj.push ? [] : {};
52257
+ } catch (error) {
52258
+ newObj = {};
52259
+ }
52260
+ for (let attr in obj) {
52261
+ if (obj[attr] && typeof obj[attr] === "object") {
52262
+ newObj[attr] = deepClone(obj[attr]);
52263
+ } else {
52264
+ newObj[attr] = obj[attr];
52265
+ }
52266
+ }
52267
+ return newObj;
52268
+ }
52269
+ function isMobile() {
52270
+ if (navigator.userAgent.match(/('phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone')/i)) {
52271
+ return true;
52272
+ } else {
52273
+ return false;
52274
+ }
52275
+ }
52276
+ function handleEmpty(list) {
52277
+ const arr = [];
52278
+ for (const i in list) {
52279
+ const d = [];
52280
+ for (const j in list[i]) {
52281
+ d.push(list[i][j]);
52282
+ }
52283
+ const leng = d.filter((item) => item === "").length;
52284
+ if (leng !== d.length) {
52285
+ arr.push(list[i]);
52286
+ }
52287
+ }
52288
+ return arr;
52289
+ }
52290
+ function handleOpenLink(val) {
52291
+ const { origin, pathname } = window.location;
52292
+ const router = useRouter();
52293
+ router.push(val.path);
52294
+ if (verifyUrl(val.meta?.isLink)) window.open(val.meta?.isLink);
52295
+ else window.open(`${origin}${pathname}#${val.meta?.isLink}`);
52296
+ }
52297
+
52298
+ const cssCdnUrlList = [
52299
+ // 调整为从本地引入,注释下面的 url
52300
+ // '//at.alicdn.com/t/c/font_2298093_rnp72ifj3ba.css',
52301
+ // '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
52302
+ ];
52303
+ const jsCdnUrlList = [];
52304
+ function setCssCdn() {
52305
+ if (cssCdnUrlList.length <= 0) return false;
52306
+ cssCdnUrlList.map((v) => {
52307
+ let link = document.createElement("link");
52308
+ link.rel = "stylesheet";
52309
+ link.href = v;
52310
+ link.crossOrigin = "anonymous";
52311
+ document.getElementsByTagName("head")[0].appendChild(link);
52312
+ });
52313
+ }
52314
+ function setJsCdn() {
52315
+ if (jsCdnUrlList.length <= 0) return false;
52316
+ jsCdnUrlList.map((v) => {
52317
+ let link = document.createElement("script");
52318
+ link.src = v;
52319
+ document.body.appendChild(link);
52320
+ });
52321
+ }
52322
+
51690
52323
  const version = "1.0.0";
51691
52324
 
51692
52325
  const install = installer.install;
51693
52326
 
51694
- export { FmLogin, FmNoticeBar, FmTransfer, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setupI18n, signatureByKSort, tansParams, urlToBase64, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
52327
+ export { FmDragImg, FmLogin, FmNoticeBar, FmTransfer, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, dataURLtoBlob, decryptJWT, deepClone, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, globalComponentSize, hAuth, hAuthAll, hAuths, handleEmpty, handleOpenLink, i18n, install, isMobile, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, lazyImg, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setCssCdn, setJsCdn, setTagsViewNameI18n, setupI18n, signatureByKSort, tansParams, urlToBase64, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useTitle, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };