@kyfe/fms-vue2-components 0.0.3 → 0.0.4

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 (154) hide show
  1. package/dist/assets/css/fms-ks-clamp-text.css +1 -0
  2. package/dist/assets/css/fms-ks-components.css +1 -0
  3. package/dist/assets/css/fms-ks-popover.css +1 -0
  4. package/dist/assets/css/fms-ks-search-tips-new.css +1 -0
  5. package/dist/assets/css/fms-ks-search-tips.css +1 -0
  6. package/dist/assets/css/fms-ks-select-box.css +1 -0
  7. package/dist/assets/css/fms-ks-select.css +1 -0
  8. package/dist/date-picker-bottom.17e75dc0.js +45 -0
  9. package/dist/date-picker-dropdown.1d8e9f00.js +34 -0
  10. package/dist/date-picker-right.b939e886.js +23 -0
  11. package/dist/date-picker-top.c38046f7.js +23 -0
  12. package/dist/date-range-select.647edaf6.js +69 -0
  13. package/dist/date-select.96eb3a9d.js +60 -0
  14. package/dist/date-week-month.169b98bc.js +57 -0
  15. package/dist/datetime-popup/index.js +411 -0
  16. package/dist/filter.c93f4ddb.js +45 -0
  17. package/dist/fms-copy-box/index.js +1 -1
  18. package/dist/fms-ks-block-title/index.js +38 -0
  19. package/dist/fms-ks-block-title/style.css +1 -0
  20. package/dist/fms-ks-clamp-text/index.js +9 -0
  21. package/dist/fms-ks-clamp-text.24eb5e8d.js +53 -0
  22. package/dist/fms-ks-components/index.js +9 -0
  23. package/dist/fms-ks-components.a5d9329b.js +4392 -0
  24. package/dist/fms-ks-decrypt/index.js +2 -2
  25. package/dist/fms-ks-decrypt.2f88e659.js +312 -0
  26. package/dist/fms-ks-file-upload/index.js +32 -31
  27. package/dist/fms-ks-file-upload/style.css +1 -1
  28. package/dist/fms-ks-form-grid/index.js +101 -0
  29. package/dist/fms-ks-form-grid/style.css +1 -0
  30. package/dist/fms-ks-more-lines/index.js +31 -0
  31. package/dist/fms-ks-more-lines/style.css +1 -0
  32. package/dist/fms-ks-page-popup/index.js +68 -0
  33. package/dist/fms-ks-page-popup/style.css +1 -0
  34. package/dist/fms-ks-picker/index.js +9 -0
  35. package/dist/fms-ks-picker.766b55f9.js +61 -0
  36. package/dist/fms-ks-popover/index.js +9 -0
  37. package/dist/fms-ks-popover.55ab4b82.js +95 -0
  38. package/dist/fms-ks-search-tips/index.js +9 -0
  39. package/dist/fms-ks-search-tips-new/index.js +9 -0
  40. package/dist/fms-ks-search-tips-new.7d08f710.js +125 -0
  41. package/dist/fms-ks-search-tips.d36859c3.js +142 -0
  42. package/dist/fms-ks-select/index.js +9 -0
  43. package/dist/fms-ks-select-box/index.js +9 -0
  44. package/dist/fms-ks-select-box.a00f0f08.js +43 -0
  45. package/dist/fms-ks-select.59416fd8.js +157 -0
  46. package/dist/fms-ks-warn-drawer/index.js +37 -0
  47. package/dist/fms-ks-warn-drawer/style.css +1 -0
  48. package/dist/fms-scroll-list/index.js +3 -1
  49. package/dist/index.js +30 -30
  50. package/dist/mixin.f4bc60f0.js +59 -0
  51. package/dist/month-range-select.374653da.js +97 -0
  52. package/dist/month-select.30ae7335.js +71 -0
  53. package/dist/oa-datetime-picker-new/style.css +1 -0
  54. package/dist/quarter-select.b6256880.js +73 -0
  55. package/dist/utils.159fba19.js +64 -0
  56. package/dist/week-select.27efca5c.js +70 -0
  57. package/package.json +31 -31
  58. package/src/assets/images/attachment/icon_default.svg +23 -0
  59. package/src/assets/images/attachment/icon_default_new.png +0 -0
  60. package/src/assets/images/attachment/icon_excel.svg +20 -0
  61. package/src/assets/images/attachment/icon_excel_new.png +0 -0
  62. package/src/assets/images/attachment/icon_file.png +0 -0
  63. package/src/assets/images/attachment/icon_pdf_new.png +0 -0
  64. package/src/assets/images/attachment/icon_ppt.svg +20 -0
  65. package/src/assets/images/attachment/icon_ppt_new.png +0 -0
  66. package/src/assets/images/attachment/icon_preview_file.png +0 -0
  67. package/src/assets/images/attachment/icon_txt.png +0 -0
  68. package/src/assets/images/attachment/icon_word.svg +19 -0
  69. package/src/assets/images/attachment/icon_word_new.png +0 -0
  70. package/src/assets/images/attachment/icon_xmind.png +0 -0
  71. package/src/assets/images/icon-arrow.png +0 -0
  72. package/src/assets/images/icon-forewarning.svg +1 -0
  73. package/src/components/date-picker/index.vue +205 -0
  74. package/src/components/datetime-picker-general/index.vue +161 -0
  75. package/src/components/datetime-popup/date-picker.js +217 -0
  76. package/src/components/datetime-popup/index.js +37 -0
  77. package/src/components/datetime-popup/index.vue +111 -0
  78. package/src/components/datetime-popup/mixin.js +125 -0
  79. package/src/components/datetime-popup/time-picker.js +102 -0
  80. package/src/components/datetime-popup/utils.js +124 -0
  81. package/src/components/datetime-popup//347/244/272/344/276/213/345/233/276.png +0 -0
  82. package/src/components/decrypt/README.md +0 -0
  83. package/src/components/decrypt/index.vue +73 -0
  84. package/src/components/fms-ks-block-title/fms-ks-block-title.vue +75 -0
  85. package/src/components/fms-ks-block-title/index.js +7 -0
  86. package/src/components/fms-ks-block-title//346/240/207/351/242/230.md +0 -0
  87. package/src/components/fms-ks-clamp-text/fms-ks-clamp-text.vue +66 -0
  88. package/src/components/fms-ks-clamp-text/images/icon-clamp.png +0 -0
  89. package/src/components/fms-ks-clamp-text/index.js +7 -0
  90. package/src/components/fms-ks-clamp-text//346/226/207/346/234/254/346/224/266/350/265/267/345/261/225/345/274/200.md +0 -0
  91. package/src/components/fms-ks-components/fms-ks-components.vue +699 -0
  92. package/src/components/fms-ks-components/index.js +7 -0
  93. package/src/components/fms-ks-components/money-directive.js +73 -0
  94. package/src/components/fms-ks-components//350/241/250/345/215/225/351/205/215/347/275/256/347/273/204/344/273/266/350/257/264/346/230/216.md +10 -0
  95. package/src/components/fms-ks-file-upload/fms-ks-file-upload.vue +8 -1
  96. package/src/components/fms-ks-form-grid/fields-conversion.js +107 -0
  97. package/src/components/fms-ks-form-grid/fms-ks-form-grid.vue +127 -0
  98. package/src/components/fms-ks-form-grid/index.js +7 -0
  99. package/src/components/fms-ks-more-lines/fms-ks-more-lines.vue +108 -0
  100. package/src/components/fms-ks-more-lines/index.js +7 -0
  101. package/src/components/fms-ks-more-lines//346/233/264/345/244/232.md +0 -0
  102. package/src/components/fms-ks-page-popup/fms-ks-page-popup.vue +153 -0
  103. package/src/components/fms-ks-page-popup/index.js +7 -0
  104. package/src/components/fms-ks-page-popup//345/274/271/345/207/272/345/261/202.md +0 -0
  105. package/src/components/fms-ks-picker/fms-ks-picker.vue +67 -0
  106. package/src/components/fms-ks-picker/index.js +7 -0
  107. package/src/components/fms-ks-picker//351/200/211/346/213/251/345/274/271/345/207/272/345/261/202.md +0 -0
  108. package/src/components/fms-ks-popover/click-outside.js +68 -0
  109. package/src/components/fms-ks-popover/fms-ks-popover.vue +89 -0
  110. package/src/components/fms-ks-popover/index.js +7 -0
  111. package/src/components/fms-ks-popover//345/274/271/345/207/272/345/261/202.md +0 -0
  112. package/src/components/fms-ks-search-tips/fms-ks-search-tips.vue +296 -0
  113. package/src/components/fms-ks-search-tips/index.js +7 -0
  114. package/src/components/fms-ks-search-tips//350/277/234/347/250/213/346/220/234/347/264/242.md +118 -0
  115. package/src/components/fms-ks-search-tips-new/fms-ks-search-tips-new.vue +242 -0
  116. package/src/components/fms-ks-search-tips-new/index.js +7 -0
  117. package/src/components/fms-ks-search-tips-new/style.less +137 -0
  118. package/src/components/fms-ks-search-tips-new//350/277/234/347/250/213/346/220/234/347/264/242-/346/226/260.md +118 -0
  119. package/src/components/fms-ks-select/fms-ks-select.vue +421 -0
  120. package/src/components/fms-ks-select/index.js +7 -0
  121. package/src/components/fms-ks-select//351/200/211/346/213/251/346/241/206.md +0 -0
  122. package/src/components/fms-ks-select-box/fms-ks-select-box.vue +84 -0
  123. package/src/components/fms-ks-select-box/index.js +7 -0
  124. package/src/components/fms-ks-select-box//344/270/215/351/234/200/350/246/201popup/347/232/204select.md +0 -0
  125. package/src/components/fms-ks-warn-drawer/fms-ks-warn-drawer.vue +111 -0
  126. package/src/components/fms-ks-warn-drawer/index.js +7 -0
  127. package/src/components/fms-ks-warn-drawer//351/242/204/350/255/246/346/217/220/347/244/272.md +0 -0
  128. package/src/components/ks-decrypt/README.md +140 -0
  129. package/src/components/ks-decrypt/index.vue +155 -0
  130. package/src/components/ks-popover/index.vue +483 -0
  131. package/src/components/ks-popover/mixin.js +28 -0
  132. package/src/components/ks-popover/utils.js +60 -0
  133. package/src/components/oa-datetime-picker/index.vue +169 -0
  134. package/src/components/oa-datetime-picker-new/components/date-picker/README.md +21 -0
  135. package/src/components/oa-datetime-picker-new/components/date-picker/date-picker-bottom.vue +121 -0
  136. package/src/components/oa-datetime-picker-new/components/date-picker/date-picker-dropdown.vue +78 -0
  137. package/src/components/oa-datetime-picker-new/components/date-picker/date-picker-right.vue +86 -0
  138. package/src/components/oa-datetime-picker-new/components/date-picker/date-picker-top.vue +82 -0
  139. package/src/components/oa-datetime-picker-new/components/date-picker/date-picker.js +12 -0
  140. package/src/components/oa-datetime-picker-new/components/date-picker/date-range-select.vue +106 -0
  141. package/src/components/oa-datetime-picker-new/components/date-picker/date-select.vue +66 -0
  142. package/src/components/oa-datetime-picker-new/components/date-picker/date-week-month.vue +131 -0
  143. package/src/components/oa-datetime-picker-new/components/date-picker/index.js +39 -0
  144. package/src/components/oa-datetime-picker-new/components/date-picker/mixin.js +85 -0
  145. package/src/components/oa-datetime-picker-new/components/date-picker/month-range-select.vue +127 -0
  146. package/src/components/oa-datetime-picker-new/components/date-picker/month-select.vue +87 -0
  147. package/src/components/oa-datetime-picker-new/components/date-picker/quarter-select.vue +95 -0
  148. package/src/components/oa-datetime-picker-new/components/date-picker/style.less +117 -0
  149. package/src/components/oa-datetime-picker-new/components/date-picker/utils.js +109 -0
  150. package/src/components/oa-datetime-picker-new/components/date-picker/week-select.vue +100 -0
  151. package/src/components/oa-datetime-picker-new/index.vue +212 -0
  152. package/src/index.js +8 -2
  153. package/vite.config.js +12 -1
  154. package/dist/fms-ks-decrypt.bcc12f44.js +0 -335
@@ -0,0 +1,68 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { n as i } from "../plugin-vue2_normalizer.ed7092a9.js";
3
+ import './style.css';const l = {
4
+ name: "FmsKsPagePopup",
5
+ model: {
6
+ prop: "show",
7
+ event: "update:show"
8
+ },
9
+ props: {
10
+ show: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ isDraftRN: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ title: {
19
+ type: String,
20
+ default: ""
21
+ }
22
+ },
23
+ computed: {
24
+ showDetailSelect: {
25
+ get() {
26
+ return this.show;
27
+ },
28
+ set(s) {
29
+ this.$emit("update:show", s);
30
+ }
31
+ }
32
+ },
33
+ data() {
34
+ return {
35
+ isNoData: !1
36
+ };
37
+ },
38
+ methods: {
39
+ back() {
40
+ this.isDraftRN ? ks.forceBack() : this.$emit("update:show", !1);
41
+ },
42
+ closePop() {
43
+ this.$emit("update:show", !1);
44
+ }
45
+ }
46
+ };
47
+ var p = function() {
48
+ var t = this, e = t._self._c;
49
+ return e("div", { staticClass: "flow-fms__page-popup" }, [e("van-popup", { staticClass: "apply-pop apply-style", style: { width: "100%", height: "100%" }, attrs: { position: "right", "get-container": "#ksui-app", duration: t.isDraftRN ? 0 : 0.3 }, model: { value: t.showDetailSelect, callback: function(o) {
50
+ t.showDetailSelect = o;
51
+ }, expression: "showDetailSelect" } }, [e("div", { staticClass: "fms-popup-box" }, [e("div", { staticClass: "fms-popup-header" }, [e("div", { staticClass: "back-btn", on: { click: t.back } }, [e("van-icon", { staticStyle: { "padding-right": "5px", display: "inline-block", "vertical-align": "middle" }, attrs: { size: "24", name: "arrow-left" } }), t._v(" " + t._s(t.title) + " ")], 1)]), e("div", { staticClass: "fms-popup-content" }, [t._t("default")], 2), e("div", { staticClass: "fms-popup-inset-bottom" })])])], 1);
52
+ }, n = [], c = /* @__PURE__ */ i(
53
+ l,
54
+ p,
55
+ n,
56
+ !1,
57
+ null,
58
+ "8ec0687c",
59
+ null,
60
+ null
61
+ );
62
+ const a = c.exports;
63
+ a.install = function(s) {
64
+ s.component(a.name, a);
65
+ };
66
+ export {
67
+ a as default
68
+ };
@@ -0,0 +1 @@
1
+ .ios .fms-popup-header[data-v-8ec0687c]{padding-top:20px!important}.ipx .fms-popup-header[data-v-8ec0687c]{padding-top:46px!important}.ipx .fms-footer-btn[data-v-8ec0687c]{padding-bottom:24px}.ipx .fms-popup-box .invoice-folder__btn[data-v-8ec0687c]{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.fms-popup-box[data-v-8ec0687c]{height:100%;width:100%;display:flex;flex-direction:column;background-color:#f3f4f6;font-size:12px}.fms-popup-box .fms-popup-header[data-v-8ec0687c]{width:100%;display:flex;flex-shrink:0;padding:0 16px 17px;font-size:18px;justify-content:space-between;align-items:center;font-family:PingFangSC-Medium;font-weight:500;background-color:#7972fe;color:#fff}.fms-popup-box .fms-popup-header .back-btn[data-v-8ec0687c]{display:flex;align-items:center;height:44px}.fms-popup-box .fms-popup-header .img-box[data-v-8ec0687c]{width:40px;height:40px;display:flex;flex-direction:row-reverse;align-items:center;line-height:40px}.fms-popup-box .fms-popup-header img[data-v-8ec0687c]{width:22px;height:22px}.fms-popup-box .fms-popup-content[data-v-8ec0687c]{flex-grow:1;overflow:scroll}.fms-popup-box .fms-popup-inset-bottom[data-v-8ec0687c]{width:100%;height:0;background:#f3f4f6;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-picker.766b55f9.js";
3
+ import { F as e } from "../fms-ks-picker.766b55f9.js";
4
+ o.install = function(m) {
5
+ m.component(o.name, o);
6
+ };
7
+ export {
8
+ e as default
9
+ };
@@ -0,0 +1,61 @@
1
+ import { n as i } from "./plugin-vue2_normalizer.ed7092a9.js";
2
+ const l = {
3
+ name: "FmsKsPicker",
4
+ props: {
5
+ value: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ label: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ placeholder: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ columns: {
18
+ type: Array,
19
+ default: () => []
20
+ },
21
+ required: {
22
+ type: Boolean,
23
+ default: !1
24
+ }
25
+ },
26
+ data() {
27
+ return {
28
+ showPicker: !1
29
+ };
30
+ },
31
+ methods: {
32
+ showPickerFn() {
33
+ this.showPicker = !0;
34
+ },
35
+ onConfirm(s) {
36
+ const { code: e = "" } = s;
37
+ this.$emit("input", e, s), this.showPicker = !1;
38
+ }
39
+ }
40
+ };
41
+ var t = function() {
42
+ var e = this, r = e._self._c;
43
+ return r("div", { staticClass: "pick-box" }, [r("div", { staticClass: "pick-field-box", on: { click: e.showPickerFn } }, [r("ks-field", { attrs: { readonly: "", clickable: "", "input-align": "right", "error-message-align": "right", required: e.required, name: "picker", value: e.value, label: e.label, "right-icon": "arrow", rules: [{ required: e.required, message: `\u8BF7\u9009\u62E9${e.label}` }], placeholder: e.placeholder } })], 1), r("ks-popup", { attrs: { position: "bottom" }, model: { value: e.showPicker, callback: function(o) {
44
+ e.showPicker = o;
45
+ }, expression: "showPicker" } }, [r("ks-picker", { attrs: { "show-toolbar": "", columns: e.columns }, on: { confirm: e.onConfirm, cancel: function(o) {
46
+ e.showPicker = !1;
47
+ } } })], 1)], 1);
48
+ }, n = [], a = /* @__PURE__ */ i(
49
+ l,
50
+ t,
51
+ n,
52
+ !1,
53
+ null,
54
+ null,
55
+ null,
56
+ null
57
+ );
58
+ const u = a.exports;
59
+ export {
60
+ u as F
61
+ };
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-popover.55ab4b82.js";
3
+ import { F as e } from "../fms-ks-popover.55ab4b82.js";
4
+ o.install = function(m) {
5
+ m.component(o.name, o);
6
+ };
7
+ export {
8
+ e as default
9
+ };
@@ -0,0 +1,95 @@
1
+ import { n as i } from "./plugin-vue2_normalizer.ed7092a9.js";
2
+ import './assets/css/fms-ks-popover.css';function a(t) {
3
+ return typeof t.value == "function";
4
+ }
5
+ function u(t, e) {
6
+ if (!t || !e)
7
+ return !1;
8
+ for (var n = 0, o = e.length; n < o; n++)
9
+ try {
10
+ if (t.contains(e[n]))
11
+ return !0;
12
+ if (e[n].contains(t))
13
+ return !1;
14
+ } catch {
15
+ return !1;
16
+ }
17
+ return !1;
18
+ }
19
+ function l(t) {
20
+ return typeof t.componentInstance < "u" && t.componentInstance.$isServer;
21
+ }
22
+ const _ = {
23
+ bind: function(t, e, n) {
24
+ if (!a(e))
25
+ return;
26
+ function o(s) {
27
+ if (!!n.context) {
28
+ var c = s.path || s.composedPath && s.composedPath();
29
+ c && c.length > 0 && c.unshift(s.target), !(t.contains(s.target) || u(n.context.popupItem, c)) && t.__vueClickOutside__.callback(s);
30
+ }
31
+ }
32
+ t.__vueClickOutside__ = {
33
+ handler: o,
34
+ callback: e.value
35
+ };
36
+ const r = "ontouchstart" in document.documentElement ? "touchstart" : "click";
37
+ !l(n) && document.addEventListener(r, o);
38
+ },
39
+ update: function(t, e) {
40
+ a(e) && (t.__vueClickOutside__.callback = e.value);
41
+ },
42
+ unbind: function(t, e, n) {
43
+ const o = "ontouchstart" in document.documentElement ? "touchstart" : "click";
44
+ !l(n) && t.__vueClickOutside__ && document.removeEventListener(o, t.__vueClickOutside__.handler), delete t.__vueClickOutside__;
45
+ }
46
+ };
47
+ const f = {
48
+ name: "FmsKsPopover",
49
+ directives: {
50
+ clickoutside: _
51
+ },
52
+ props: {
53
+ content: String,
54
+ showHtml: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ show: {
59
+ type: Boolean,
60
+ default: !1
61
+ },
62
+ popoverStyle: {
63
+ type: Object,
64
+ default: () => {
65
+ }
66
+ },
67
+ arrowStyle: {
68
+ type: Object,
69
+ default: () => {
70
+ }
71
+ }
72
+ },
73
+ methods: {
74
+ close(t) {
75
+ console.log("122--"), t.stopPropagation(), this.$emit("update:show", !1), this.$emit("close", !1);
76
+ }
77
+ }
78
+ };
79
+ var d = function() {
80
+ var e = this, n = e._self._c;
81
+ return n("div", { directives: [{ name: "clickoutside", rawName: "v-clickoutside", value: e.close, expression: "close" }], staticClass: "flow-fms-popover" }, [e.show ? n("div", { staticClass: "flow-fms-popover-content", style: e.popoverStyle, on: { click: e.close } }, [e.showHtml ? n("div", { domProps: { innerHTML: e._s(e.content) } }) : n("div", [e._v(e._s(e.content))])]) : e._e(), e.show ? n("div", { staticClass: "flow-fms-popover-arrow", style: e.arrowStyle, on: { click: e.close } }) : e._e(), e._t("default")], 2);
82
+ }, v = [], p = /* @__PURE__ */ i(
83
+ f,
84
+ d,
85
+ v,
86
+ !1,
87
+ null,
88
+ "b92a9a8b",
89
+ null,
90
+ null
91
+ );
92
+ const h = p.exports;
93
+ export {
94
+ h as F
95
+ };
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-search-tips.d36859c3.js";
3
+ import { F as t } from "../fms-ks-search-tips.d36859c3.js";
4
+ o.install = function(a) {
5
+ a.component(o.name, o);
6
+ };
7
+ export {
8
+ t as default
9
+ };
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-search-tips-new.7d08f710.js";
3
+ import { F as s } from "../fms-ks-search-tips-new.7d08f710.js";
4
+ o.install = function(a) {
5
+ a.component(o.name, o);
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,125 @@
1
+ import { n } from "./plugin-vue2_normalizer.ed7092a9.js";
2
+ import './assets/css/fms-ks-search-tips-new.css';const a = window.vant && window.vant.Toast, i = {
3
+ name: "FmsKsSearchTipsNew",
4
+ props: {
5
+ label: String,
6
+ disabled: Boolean,
7
+ formatData: Function,
8
+ formatResult: Function,
9
+ inputAlign: String,
10
+ inputLength: {
11
+ type: Number,
12
+ default: 2
13
+ },
14
+ keys: Array,
15
+ message: String,
16
+ placeholder: String,
17
+ required: Boolean,
18
+ url: String,
19
+ value: String,
20
+ valueKey: String,
21
+ appkey: String,
22
+ getDefault: Function,
23
+ popupHeight: {
24
+ type: String,
25
+ default: () => "60%"
26
+ },
27
+ popupStyle: {
28
+ type: Object,
29
+ default: () => ({})
30
+ },
31
+ rules: Object,
32
+ isLink: {
33
+ type: Boolean,
34
+ default: () => !0
35
+ },
36
+ noEmptyMessage: Boolean,
37
+ isFullPopup: Boolean,
38
+ maxlength: -1
39
+ },
40
+ data() {
41
+ return {
42
+ show: !1,
43
+ searchStr: "",
44
+ searchList: [],
45
+ loading: !1
46
+ };
47
+ },
48
+ methods: {
49
+ showPopup() {
50
+ this.disabled || (this.show = !0);
51
+ },
52
+ hidePopup() {
53
+ this.show = !1;
54
+ },
55
+ async onOpened() {
56
+ let s = this.$refs.search.$el;
57
+ if (s && s.querySelector("input").focus(), this.getDefault)
58
+ try {
59
+ this.loading = !0, this.searchList = await this.getDefault();
60
+ } catch (e) {
61
+ console.error(e);
62
+ } finally {
63
+ this.loading = !1;
64
+ }
65
+ },
66
+ onClose() {
67
+ this.searchList = [];
68
+ let s = this.$refs.search, t = s.$el.querySelector("input");
69
+ t.value = "", this.searchStr = "", s.inputValue = "";
70
+ },
71
+ async onChange(s) {
72
+ let e = s.length;
73
+ if (this.searchStr = s, e !== 0)
74
+ if (e >= this.inputLength && this.url && this.appkey)
75
+ try {
76
+ this.loading = !0;
77
+ let t = this.formatData(s), l = await this.$http(this.url, this.appkey, t) || [];
78
+ l = this.formatResult ? this.formatResult(l, s) : l, l.length === 0 && !this.noEmptyMessage && a(this.message || "\u641C\u7D22\u7ED3\u679C\u4E3A\u7A7A"), this.searchList = l;
79
+ } catch {
80
+ this.onClose();
81
+ } finally {
82
+ this.loading = !1;
83
+ }
84
+ else
85
+ a(`\u5B57\u6570\u4E0D\u5C11\u4E8E${this.inputLength}`);
86
+ },
87
+ getValue(s) {
88
+ return this.keys.reduce((t, l) => (t.push(s[l]), t), []).join(", ");
89
+ },
90
+ onSelect(s) {
91
+ this.$emit("select", s), this.$emit("selectItem", s), this.hidePopup(), this.onClose();
92
+ },
93
+ onClear() {
94
+ this.$emit("selectItem", null), this.$emit("select", null), this.hidePopup();
95
+ },
96
+ getContainer() {
97
+ return document.body;
98
+ }
99
+ }
100
+ };
101
+ var o = function() {
102
+ var e = this, t = e._self._c;
103
+ return t("div", { staticClass: "fms-search-tips-new" }, [t("van-field", { attrs: { required: e.required, inputAlign: e.inputAlign, placeholder: e.placeholder, value: e.value, rules: e.rules, label: e.label, maxlength: e.maxlength, "is-link": e.isLink, readonly: "" }, on: { click: e.showPopup } }, [e.$slots.label ? t("template", { slot: "label" }, [e._t("label")], 2) : e._e(), e.$slots.rightIcon ? t("template", { slot: "right-icon" }, [e._t("rightIcon")], 2) : e._e()], 2), t("van-popup", { staticClass: "fms-search-tips-new__content", class: { "is-full-popup": e.isFullPopup }, style: { height: e.isFullPopup ? "100%" : e.popupHeight, ...e.popupStyle }, attrs: { position: "bottom", "get-container": e.getContainer }, on: { opened: e.onOpened, close: e.onClose }, model: { value: e.show, callback: function(l) {
104
+ e.show = l;
105
+ }, expression: "show" } }, [e.isFullPopup ? t("div", { staticClass: "fms-search-tips-new__content-title close-left" }, [t("van-icon", { attrs: { name: "arrow-left", color: "#333", size: "20" }, on: { click: e.hidePopup } }), e._v(" " + e._s(e.label) + " ")], 1) : t("div", { staticClass: "fms-search-tips-new__content-title" }, [e._v(" " + e._s(e.label) + " "), t("van-icon", { attrs: { name: "cross", color: "#A2A2AD" }, on: { click: e.hidePopup } })], 1), t("form", { attrs: { action: "/" } }, [t("ks-input-search", { ref: "search", staticClass: "fms-search-tips-new__content-search", class: { "has-action": e.$scopedSlots.action }, attrs: { placeholder: e.placeholder, "show-action": !!e.$scopedSlots.action, maxlength: e.maxlength }, on: { change: e.onChange }, model: { value: e.searchStr, callback: function(l) {
106
+ e.searchStr = l;
107
+ }, expression: "searchStr" } }, [e._t("action", null, { slot: "action", input: e.searchStr, close: e.hidePopup })], 2)], 1), e._t("default", null, { list: e.searchList, input: e.searchStr, loading: e.loading }), e.$scopedSlots.default ? e._e() : [e.value ? t("div", { staticClass: "fms-search-tips-new__content-current" }, [t("div", { staticClass: "current-title" }, [e._v("\u5F53\u524D\u9009\u62E9")]), t("div", { staticClass: "current-value" }, [t("span", { staticClass: "current-value__text" }, [e._v(e._s(e.value))]), t("i", { staticClass: "current-value__line" }), t("van-icon", { staticClass: "currnet-value__icon", attrs: { name: "cross", color: "#A2A2AD" }, on: { click: e.onClear } })], 1)]) : e._e(), t("div", { staticClass: "fms-search-tips-new__content-list" }, [e.loading ? t("div", { staticClass: "fms-search-tips-new__content-loading" }, [t("van-loading", { attrs: { size: "36px" } })], 1) : e._l(e.searchList, function(l) {
108
+ return t("div", { key: l[e.valueKey], staticClass: "list-item", on: { click: function(u) {
109
+ return e.onSelect(l);
110
+ } } }, [e._v(" " + e._s(e.getValue(l)) + " ")]);
111
+ })], 2)]], 2)], 1);
112
+ }, r = [], c = /* @__PURE__ */ n(
113
+ i,
114
+ o,
115
+ r,
116
+ !1,
117
+ null,
118
+ "39117cea",
119
+ null,
120
+ null
121
+ );
122
+ const p = c.exports;
123
+ export {
124
+ p as F
125
+ };
@@ -0,0 +1,142 @@
1
+ import { n as a } from "./plugin-vue2_normalizer.ed7092a9.js";
2
+ import './assets/css/fms-ks-search-tips.css';const r = window.vant && window.vant.Toast, n = {
3
+ name: "FmsKsSearchTips",
4
+ props: {
5
+ value: String,
6
+ employeeName: String,
7
+ label: String,
8
+ labelKey: String,
9
+ placeholder: String,
10
+ required: Boolean,
11
+ url: String,
12
+ appkey: String,
13
+ formatData: Function,
14
+ formatResult: Function,
15
+ valueKey: Array,
16
+ timeout: {
17
+ type: Boolean,
18
+ default: () => !1
19
+ },
20
+ blurClear: {
21
+ type: Boolean,
22
+ default: () => !0
23
+ },
24
+ searchNullClear: {
25
+ type: Boolean,
26
+ default: () => !0
27
+ },
28
+ inputLength: {
29
+ type: Number,
30
+ default: 2
31
+ },
32
+ isWatch: {
33
+ type: Boolean,
34
+ default: () => !0
35
+ },
36
+ triggerOnFocus: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ message: String
41
+ },
42
+ data() {
43
+ return {
44
+ fieldValue: "",
45
+ tipsList: [],
46
+ loading: !1,
47
+ showTips: !1,
48
+ hasSelected: !1
49
+ };
50
+ },
51
+ watch: {
52
+ value(e) {
53
+ this.fieldValue = e, this.isWatch && (console.log(e, "watch\u89E6\u53D1"), this.inputChange(e));
54
+ }
55
+ },
56
+ computed: {
57
+ rules() {
58
+ return [
59
+ { required: this.required, message: `\u8BF7\u9009\u62E9${this.label}` },
60
+ ...this.$attrs.rules || []
61
+ ];
62
+ },
63
+ inputAlign() {
64
+ return this.$attrs["input-align"] || "right";
65
+ }
66
+ },
67
+ mounted() {
68
+ console.log(this.value, "mounted\u89E6\u53D1"), this.fieldValue = this.value;
69
+ },
70
+ methods: {
71
+ filterKeyLight(e) {
72
+ let t = e.name;
73
+ if (!this.fieldValue)
74
+ return t;
75
+ let s = t.replace(new RegExp(this.fieldValue, "g"), `<span class="primary_title" style="color:#7a77fb;font-weight:400;">${this.fieldValue}</span>`);
76
+ return s = `${s}`, s;
77
+ },
78
+ inputChange(e) {
79
+ if (this.hasSelected || this.timeout)
80
+ return;
81
+ let t = e;
82
+ this.$emit("input", e), this.fieldValue = t, t && t.length >= this.inputLength ? (this.tipsList = [], this.filterFunc(t)) : (this.tipsList = [], this.showTips = !1, this.$emit("search", null));
83
+ },
84
+ async filterFunc() {
85
+ console.log(9999), this.showTips = !0, this.loading = !0;
86
+ try {
87
+ this.tipsList = await this.getCompanyList(), this.tipsList.length <= 0 && this.searchNullClear && (r(this.message || `${this.label}\u641C\u7D22\u4E3A\u7A7A\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\uFF01`), this.showTips = !1, this.fieldValue = "", this.$emit("input", "")), this.tipsList.length <= 0 && !this.searchNullClear && (this.showTips = !1), this.$emit("search", this.tipsList, this.searchNullClear);
88
+ } catch (e) {
89
+ console.log("error", e), this.showTips = !1;
90
+ } finally {
91
+ this.loading = !1;
92
+ }
93
+ },
94
+ async getCompanyList() {
95
+ let e = await this.$http(this.url, this.appkey, this.formatData(this.fieldValue));
96
+ return typeof this.formatResult == "function" ? this.formatResult(e) : Array.isArray(e) ? e : e.rows;
97
+ },
98
+ blur() {
99
+ if (!this.showTips) {
100
+ this.blurClear && this.clear(), this.$emit("blur");
101
+ return;
102
+ }
103
+ this.blurClear && this.searchNullClear && this.clear(), setTimeout(() => {
104
+ this.showTips = !1, this.$emit("blur");
105
+ });
106
+ },
107
+ focus() {
108
+ this.triggerOnFocus && (this.tipsList = [], this.filterFunc()), this.hasSelected = !1;
109
+ },
110
+ clear() {
111
+ this.loading = !1, this.fieldValue = "", this.$emit("selectItem", {});
112
+ },
113
+ pick(e) {
114
+ this.fieldValue = e[this.labelKey], this.hasSelected = !0, this.$emit("selectItem", e);
115
+ }
116
+ }
117
+ };
118
+ var u = function() {
119
+ var t = this, s = t._self._c;
120
+ return s("div", { staticClass: "fms-search-tips-wrapper" }, [s("van-field", t._b({ attrs: { value: t.fieldValue, "input-align": t.inputAlign, "error-message-align": "right", required: t.required, rules: t.rules, placeholder: t.placeholder }, on: { focus: t.focus, input: t.inputChange, blur: t.blur }, scopedSlots: t._u([{ key: "right-icon", fn: function() {
121
+ return [t._t("default")];
122
+ }, proxy: !0 }], null, !0) }, "van-field", t.$attrs, !1), [s("template", { slot: "label" }, [t._v(" " + t._s(t.label) + " ")])], 2), s("transition", { attrs: { name: "van-fade" } }, [s("div", { directives: [{ name: "show", rawName: "v-show", value: t.showTips, expression: "showTips" }], staticClass: "tips-list" }, [s("div", { staticClass: "arrow" }), s("div", { staticClass: "content" }, [t.tipsList.length < 1 ? t._t("content") : t._e(), t.tipsList.length < 1 ? s("div", { staticClass: "holder" }, [t.loading ? s("van-loading", { attrs: { size: "24px" } }) : t._e(), t.loading ? t._e() : s("span", [t._v("\u6682\u65E0\u6570\u636E")])], 1) : t._e(), t._l(t.tipsList, function(i) {
123
+ return s("div", { key: i, staticClass: "items", on: { click: function(l) {
124
+ return t.pick(i);
125
+ } } }, t._l(t.valueKey, function(l) {
126
+ return s("span", { key: l }, [t._v(t._s(i[l]))]);
127
+ }), 0);
128
+ })], 2)])])], 1);
129
+ }, h = [], o = /* @__PURE__ */ a(
130
+ n,
131
+ u,
132
+ h,
133
+ !1,
134
+ null,
135
+ "d45a8c94",
136
+ null,
137
+ null
138
+ );
139
+ const p = o.exports;
140
+ export {
141
+ p as F
142
+ };
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-select.59416fd8.js";
3
+ import { F as a } from "../fms-ks-select.59416fd8.js";
4
+ o.install = function(t) {
5
+ t.component(o.name, o);
6
+ };
7
+ export {
8
+ a as default
9
+ };
@@ -0,0 +1,9 @@
1
+ import './../fms-copy-box/style.css';
2
+ import { F as o } from "../fms-ks-select-box.a00f0f08.js";
3
+ import { F as a } from "../fms-ks-select-box.a00f0f08.js";
4
+ o.install = function(t) {
5
+ t.component(o.name, o);
6
+ };
7
+ export {
8
+ a as default
9
+ };
@@ -0,0 +1,43 @@
1
+ import { n as s } from "./plugin-vue2_normalizer.ed7092a9.js";
2
+ import './assets/css/fms-ks-select-box.css';const a = {
3
+ name: "FmsKsSelectBox",
4
+ props: [
5
+ "value",
6
+ "required",
7
+ "label",
8
+ "columns"
9
+ ],
10
+ data() {
11
+ return {};
12
+ },
13
+ methods: {
14
+ change(t, e) {
15
+ console.log("val", t), e !== this.value ? (this.$emit("input", t), this.$emit("change", t)) : this.$emit("input", t);
16
+ }
17
+ }
18
+ };
19
+ var r = function() {
20
+ var e = this, n = e._self._c;
21
+ return n("van-field", { staticClass: "fms-select-box", attrs: { name: e.label, "input-align": "right", "error-message-align": "right", readonly: "", required: e.required, rules: [{ required: e.required, message: `\u8BF7\u9009\u62E9${e.label}` }], value: e.value, label: e.label }, scopedSlots: e._u([{ key: "label", fn: function() {
22
+ return [e._t("label")];
23
+ }, proxy: !0 }, { key: "input", fn: function() {
24
+ return [n("div", { staticClass: "list", attrs: { value: e.value } }, e._l(e.columns, function(l) {
25
+ return n("div", { key: l.code, staticClass: "item", class: { active: e.value === l.text }, on: { click: function(o) {
26
+ return e.change(l.code, l.text);
27
+ } } }, [e._v(" " + e._s(l.text) + " ")]);
28
+ }), 0)];
29
+ }, proxy: !0 }], null, !0) });
30
+ }, u = [], i = /* @__PURE__ */ s(
31
+ a,
32
+ r,
33
+ u,
34
+ !1,
35
+ null,
36
+ "9ae12a10",
37
+ null,
38
+ null
39
+ );
40
+ const _ = i.exports;
41
+ export {
42
+ _ as F
43
+ };