@web-utils/component 1.2.4 → 1.2.6

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 (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2995 -2078
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/b8305633.js +0 -1
  111. package/dist/chunks/e8547f66.js +0 -1
@@ -1,2 +1,391 @@
1
- import{copy,isInContainer}from"@web-utils/core";import ClickOutside from"element-ui/lib/utils/clickoutside";import{n as normalizeComponent}from"../../chunks/6499de3a.js";var render=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showPopover,expression:"showPopover"},{name:"click-outside",rawName:"v-click-outside",value:e.hidePopover,expression:"hidePopover"}],staticClass:"search-popover"},[t("div",{staticStyle:{padding:"10px"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.keyword,expression:"keyword"}],ref:"searchInput",staticClass:"search-input",attrs:{placeholder:e.currentItem?e.currentItem.name:"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22 ..."},domProps:{value:e.keyword},on:{input:function(o){o.target.composing||(e.keyword=o.target.value)}}})]),t("ul",{ref:"ul",staticStyle:{"list-style-type":"none",flex:"1",overflow:"auto"}},[e.filterList.length?e._l(e.filterList,function(o,s){return t("li",{key:o.name+s,staticClass:"search-li",attrs:{id:`item-${s}`},on:{mousemove:function(i){return e.mouseHoverItem(o,s)}}},[t("a",{class:["search-item",{active:e.currentIndex===s}],attrs:{target:o.url?"_blank":"",rel:"noopener noreferrer",href:o.url?o.url:"javascript:void(0)"},on:{click:function(i){return e.onItemClick(o)}}},[t("div",{staticClass:"search-icon"},[t("i",{class:o.icon||"el-icon-menu"})]),t("div",{staticStyle:{flex:"1","text-align":"left",padding:"0 10px","overflow-x":"hidden","box-sizing":"border-box"}},[t("p",{staticStyle:{"margin-bottom":"4px","font-size":"16px"}},[e._v(e._s(o.name))]),t("p",{staticClass:"url"},[e._v(e._s(o.url||o.path))])]),t("div",{staticClass:"search-icon search-action"},[t("svg",{staticClass:"action",attrs:{width:"20",height:"20",viewBox:"0 0 20 20"}},[t("g",{attrs:{stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"}},[t("path",{attrs:{d:"M18 3v4c0 2-2 4-4 4H2"}}),t("path",{attrs:{d:"M8 17l-6-6 6-6"}})])])])])])}):e.evalResult!==""?t("li",{staticClass:"search-li",on:{click:e.copyEvalResult,mousemove:function(o){return e.mouseHoverItem({},-1)}}},[t("a",{class:["search-item",{active:e.currentIndex===-1}],attrs:{rel:"noopener noreferrer",href:"javascript:void(0)"}},[e._m(0),t("div",{staticStyle:{flex:"1","text-align":"left",padding:"0 10px","overflow-x":"hidden","box-sizing":"border-box"}},[t("p",{staticStyle:{"margin-bottom":"4px","font-size":"16px"}},[e._v("Result: "+e._s(e.evalResult))]),t("p",{staticClass:"url"},[e._v("\u70B9\u51FB\u6216\u8FD9\u6309 Enter \u952E\u590D\u5236")])]),t("div",{staticClass:"search-icon search-action"},[t("svg",{staticClass:"action",attrs:{width:"20",height:"20",viewBox:"0 0 20 20"}},[t("g",{attrs:{stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"}},[t("path",{attrs:{d:"M18 3v4c0 2-2 4-4 4H2"}}),t("path",{attrs:{d:"M8 17l-6-6 6-6"}})])])])])]):t("li",{staticStyle:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"#808080"}},[e._v(" Sorry,no result ! ")])],2),t("div",{staticClass:"footer-tips"},[t("span",{staticClass:"keyboard-key"},[t("svg",{attrs:{width:"15",height:"15"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.2"}},[t("path",{attrs:{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}})])])]),t("span",{staticStyle:{"font-size":"12px","margin-right":"20px"}},[e._v("\u9009\u62E9")]),t("span",{staticClass:"keyboard-key"},[t("svg",{attrs:{width:"15",height:"15"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.2"}},[t("path",{attrs:{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}})])])]),t("span",{staticClass:"keyboard-key"},[t("svg",{attrs:{width:"15",height:"15"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.2"}},[t("path",{attrs:{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}})])])]),t("span",{staticStyle:{"font-size":"12px","margin-right":"20px"}},[e._v("\u5207\u6362")]),t("span",{staticClass:"keyboard-key"},[t("svg",{attrs:{width:"15",height:"15"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.2"}},[t("path",{attrs:{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}})])])]),t("span",{staticStyle:{"font-size":"12px"}},[e._v("\u5173\u95ED")])])])},staticRenderFns=[function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"search-icon"},[t("i",{staticClass:"fa fa-table"})])}],SearchPopover_vue_vue_type_style_index_0_lang=(()=>`.search-popover{border-radius:4px;z-index:100;position:fixed;overflow:hidden;background-color:#f5f6f7;display:inline-flex;flex-direction:column;border:1px solid #1989fa;width:560px;height:500px;top:0;left:0;transform:translate3d(calc((100vw - 560px)/2),15%,0);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACZJREFUeNpi/PTpEwMY8PLyMsFZnz9/ZoKzgAzG////Q1hAABBgAFeiDto+NxIZAAAAAElFTkSuQmCC);background-repeat:repeat}.search-popover .footer-tips{padding:10px;text-align:left;border-top:1px solid #1989fa}.search-popover .keyboard-key{align-items:center;background:linear-gradient(-225deg,#d5dbe4,#f8f8f8);border-radius:2px;box-shadow:inset 0 -2px #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;display:inline-flex;height:18px;justify-content:center;margin-right:.4em;padding-bottom:2px;width:20px}.search-popover .search-input{height:46px;border:1px solid #1989fa;appearance:none;border-radius:4px;outline:none;width:100%;box-sizing:border-box;padding:10px}.search-popover .search-li{padding:10px}.search-popover .search-icon{color:#969faf;flex-shrink:0;font-size:24px}.search-popover .search-item{box-shadow:0 1px 3px #d4d9e1;text-decoration:none;box-sizing:border-box;color:#000;padding:10px;display:flex;align-items:center;border-radius:4px;background-color:#fff;overflow-x:hidden}.search-popover .search-item .search-action{display:none}.search-popover .search-item .url{color:#969faf;text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow-x:hidden}.search-popover .search-item.active{color:#fff;background-color:#1989fa}.search-popover .search-item.active .url{color:#fff}.search-popover .search-item.active .search-action{display:inline-block}.search-popover .search-item.active .search-icon{color:#fff}
2
- `)();const __vue2_script={name:"SearchPopover",directives:{ClickOutside},props:{services:{type:Array,default:()=>[]}},data(){return{showPopover:!1,keyword:"",currentIndex:0,last:0}},computed:{filterList(){return this.services.filter(e=>e.name.indexOf(this.keyword)>-1)},currentItem(){var e;return(e=this.filterList)==null?void 0:e[this.currentIndex]},evalResult(){try{return eval(this.keyword)}catch(e){return""}}},watch:{keyword(){this.currentIndex=0,!this.currentItem&&this.currentIndex!==-1&&(this.currentIndex=-1)},showPopover(e){e?document.body.style.overflow="hidden":document.body.style.overflow=""}},mounted(){window.addEventListener("keydown",this.keydown)},destroyed(){window.removeEventListener("keydown",this.keydown)},methods:{async onItemClick(e){e.path&&(this.hidePopover(),await this.$router.push(e.path))},copyEvalResult(){return copy(this.evalResult)},hidePopover(){this.showPopover=!1},displayPopover(){this.showPopover=!0},mouseHoverItem(e,r){this.currentIndex=r},async keydown(e){if(e.key==="Shift"){const r=Date.now()-this.last;r>0&&r<500?(this.showPopover=!0,await this.$nextTick(),this.$refs.searchInput.focus()):this.last=Date.now()}this.showPopover===!0&&(e.key==="Escape"&&this.hidePopover(),e.key==="Enter"&&(this.currentItem?this.currentItem.url?(window.open(this.currentItem.url,"_blank"),this.hidePopover()):this.currentItem.path&&await this.onItemClick(this.currentItem):this.copyEvalResult()),e.key==="ArrowUp"&&(this.currentIndex--,this.currentIndex<0&&(this.currentIndex=this.filterList.length-1),this.scrollIntoView(this.currentIndex)),e.key==="ArrowDown"&&(this.currentIndex++,this.currentIndex>=this.filterList.length&&(this.currentIndex=0),this.scrollIntoView(this.currentIndex)))},scrollIntoView(e){if(e===0){this.$refs.ul.scrollTop=0;return}if(e===this.filterList.length){this.$refs.ul.scrollTop=this.$refs.ul.scrollHeight;return}const r=this.$refs.ul.querySelector(`#item-${e}`);isInContainer(r,this.$refs.ul,{topOffset:-78,bottomOffset:78})||(this.$refs.ul.scrollTop=r.offsetTop-r.clientHeight+20)}}},__cssModules={};var __component__=normalizeComponent(__vue2_script,render,staticRenderFns,!1,__vue2_injectStyles,null,null,null);function __vue2_injectStyles(e){for(let r in __cssModules)this[r]=__cssModules[r]}var SearchPopover=function(){return __component__.exports}();export{SearchPopover as default};
1
+ import { copy, isInContainer } from "@web-utils/core";
2
+ import ClickOutside from "element-ui/lib/utils/clickoutside";
3
+ import { n as normalizeComponent } from "../../chunks/6499de3a.js";
4
+ var render = function() {
5
+ var t = this, r = t.$createElement, e = t._self._c || r;
6
+ return e("div", {
7
+ directives: [{
8
+ name: "show",
9
+ rawName: "v-show",
10
+ value: t.showPopover,
11
+ expression: "showPopover"
12
+ }, {
13
+ name: "click-outside",
14
+ rawName: "v-click-outside",
15
+ value: t.hidePopover,
16
+ expression: "hidePopover"
17
+ }],
18
+ staticClass: "search-popover"
19
+ }, [e("div", {
20
+ staticStyle: {
21
+ padding: "10px"
22
+ }
23
+ }, [e("input", {
24
+ directives: [{
25
+ name: "model",
26
+ rawName: "v-model",
27
+ value: t.keyword,
28
+ expression: "keyword"
29
+ }],
30
+ ref: "searchInput",
31
+ staticClass: "search-input",
32
+ attrs: {
33
+ placeholder: t.currentItem ? t.currentItem.name : "\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22 ..."
34
+ },
35
+ domProps: {
36
+ value: t.keyword
37
+ },
38
+ on: {
39
+ input: function(s) {
40
+ s.target.composing || (t.keyword = s.target.value);
41
+ }
42
+ }
43
+ })]), e("ul", {
44
+ ref: "ul",
45
+ staticStyle: {
46
+ "list-style-type": "none",
47
+ flex: "1",
48
+ overflow: "auto"
49
+ }
50
+ }, [t.filterList.length ? t._l(t.filterList, function(s, o) {
51
+ return e("li", {
52
+ key: s.name + o,
53
+ staticClass: "search-li",
54
+ attrs: {
55
+ id: `item-${o}`
56
+ },
57
+ on: {
58
+ mousemove: function(i) {
59
+ return t.mouseHoverItem(s, o);
60
+ }
61
+ }
62
+ }, [e("a", {
63
+ class: ["search-item", {
64
+ active: t.currentIndex === o
65
+ }],
66
+ attrs: {
67
+ target: s.url ? "_blank" : "",
68
+ rel: "noopener noreferrer",
69
+ href: s.url ? s.url : "javascript:void(0)"
70
+ },
71
+ on: {
72
+ click: function(i) {
73
+ return t.onItemClick(s);
74
+ }
75
+ }
76
+ }, [e("div", {
77
+ staticClass: "search-icon"
78
+ }, [e("i", {
79
+ class: s.icon || "el-icon-menu"
80
+ })]), e("div", {
81
+ staticStyle: {
82
+ flex: "1",
83
+ "text-align": "left",
84
+ padding: "0 10px",
85
+ "overflow-x": "hidden",
86
+ "box-sizing": "border-box"
87
+ }
88
+ }, [e("p", {
89
+ staticStyle: {
90
+ "margin-bottom": "4px",
91
+ "font-size": "16px"
92
+ }
93
+ }, [t._v(t._s(s.name))]), e("p", {
94
+ staticClass: "url"
95
+ }, [t._v(t._s(s.url || s.path))])]), e("div", {
96
+ staticClass: "search-icon search-action"
97
+ }, [e("svg", {
98
+ staticClass: "action",
99
+ attrs: {
100
+ width: "20",
101
+ height: "20",
102
+ viewBox: "0 0 20 20"
103
+ }
104
+ }, [e("g", {
105
+ attrs: {
106
+ stroke: "currentColor",
107
+ fill: "none",
108
+ "fill-rule": "evenodd",
109
+ "stroke-linecap": "round",
110
+ "stroke-linejoin": "round"
111
+ }
112
+ }, [e("path", {
113
+ attrs: {
114
+ d: "M18 3v4c0 2-2 4-4 4H2"
115
+ }
116
+ }), e("path", {
117
+ attrs: {
118
+ d: "M8 17l-6-6 6-6"
119
+ }
120
+ })])])])])]);
121
+ }) : t.evalResult !== "" ? e("li", {
122
+ staticClass: "search-li",
123
+ on: {
124
+ click: t.copyEvalResult,
125
+ mousemove: function(s) {
126
+ return t.mouseHoverItem({}, -1);
127
+ }
128
+ }
129
+ }, [e("a", {
130
+ class: ["search-item", {
131
+ active: t.currentIndex === -1
132
+ }],
133
+ attrs: {
134
+ rel: "noopener noreferrer",
135
+ href: "javascript:void(0)"
136
+ }
137
+ }, [t._m(0), e("div", {
138
+ staticStyle: {
139
+ flex: "1",
140
+ "text-align": "left",
141
+ padding: "0 10px",
142
+ "overflow-x": "hidden",
143
+ "box-sizing": "border-box"
144
+ }
145
+ }, [e("p", {
146
+ staticStyle: {
147
+ "margin-bottom": "4px",
148
+ "font-size": "16px"
149
+ }
150
+ }, [t._v("Result: " + t._s(t.evalResult))]), e("p", {
151
+ staticClass: "url"
152
+ }, [t._v("\u70B9\u51FB\u6216\u8FD9\u6309 Enter \u952E\u590D\u5236")])]), e("div", {
153
+ staticClass: "search-icon search-action"
154
+ }, [e("svg", {
155
+ staticClass: "action",
156
+ attrs: {
157
+ width: "20",
158
+ height: "20",
159
+ viewBox: "0 0 20 20"
160
+ }
161
+ }, [e("g", {
162
+ attrs: {
163
+ stroke: "currentColor",
164
+ fill: "none",
165
+ "fill-rule": "evenodd",
166
+ "stroke-linecap": "round",
167
+ "stroke-linejoin": "round"
168
+ }
169
+ }, [e("path", {
170
+ attrs: {
171
+ d: "M18 3v4c0 2-2 4-4 4H2"
172
+ }
173
+ }), e("path", {
174
+ attrs: {
175
+ d: "M8 17l-6-6 6-6"
176
+ }
177
+ })])])])])]) : e("li", {
178
+ staticStyle: {
179
+ height: "100%",
180
+ display: "flex",
181
+ "align-items": "center",
182
+ "justify-content": "center",
183
+ color: "#808080"
184
+ }
185
+ }, [t._v(" Sorry,no result ! ")])], 2), e("div", {
186
+ staticClass: "footer-tips"
187
+ }, [e("span", {
188
+ staticClass: "keyboard-key"
189
+ }, [e("svg", {
190
+ attrs: {
191
+ width: "15",
192
+ height: "15"
193
+ }
194
+ }, [e("g", {
195
+ attrs: {
196
+ fill: "none",
197
+ stroke: "currentColor",
198
+ "stroke-linecap": "round",
199
+ "stroke-linejoin": "round",
200
+ "stroke-width": "1.2"
201
+ }
202
+ }, [e("path", {
203
+ attrs: {
204
+ d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
205
+ }
206
+ })])])]), e("span", {
207
+ staticStyle: {
208
+ "font-size": "12px",
209
+ "margin-right": "20px"
210
+ }
211
+ }, [t._v("\u9009\u62E9")]), e("span", {
212
+ staticClass: "keyboard-key"
213
+ }, [e("svg", {
214
+ attrs: {
215
+ width: "15",
216
+ height: "15"
217
+ }
218
+ }, [e("g", {
219
+ attrs: {
220
+ fill: "none",
221
+ stroke: "currentColor",
222
+ "stroke-linecap": "round",
223
+ "stroke-linejoin": "round",
224
+ "stroke-width": "1.2"
225
+ }
226
+ }, [e("path", {
227
+ attrs: {
228
+ d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
229
+ }
230
+ })])])]), e("span", {
231
+ staticClass: "keyboard-key"
232
+ }, [e("svg", {
233
+ attrs: {
234
+ width: "15",
235
+ height: "15"
236
+ }
237
+ }, [e("g", {
238
+ attrs: {
239
+ fill: "none",
240
+ stroke: "currentColor",
241
+ "stroke-linecap": "round",
242
+ "stroke-linejoin": "round",
243
+ "stroke-width": "1.2"
244
+ }
245
+ }, [e("path", {
246
+ attrs: {
247
+ d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
248
+ }
249
+ })])])]), e("span", {
250
+ staticStyle: {
251
+ "font-size": "12px",
252
+ "margin-right": "20px"
253
+ }
254
+ }, [t._v("\u5207\u6362")]), e("span", {
255
+ staticClass: "keyboard-key"
256
+ }, [e("svg", {
257
+ attrs: {
258
+ width: "15",
259
+ height: "15"
260
+ }
261
+ }, [e("g", {
262
+ attrs: {
263
+ fill: "none",
264
+ stroke: "currentColor",
265
+ "stroke-linecap": "round",
266
+ "stroke-linejoin": "round",
267
+ "stroke-width": "1.2"
268
+ }
269
+ }, [e("path", {
270
+ attrs: {
271
+ d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"
272
+ }
273
+ })])])]), e("span", {
274
+ staticStyle: {
275
+ "font-size": "12px"
276
+ }
277
+ }, [t._v("\u5173\u95ED")])])]);
278
+ }, staticRenderFns = [function() {
279
+ var t = this, r = t.$createElement, e = t._self._c || r;
280
+ return e("div", {
281
+ staticClass: "search-icon"
282
+ }, [e("i", {
283
+ staticClass: "fa fa-table"
284
+ })]);
285
+ }];
286
+ const SearchPopover_vue_vue_type_style_index_0_lang = "", __vue2_script = {
287
+ name: "SearchPopover",
288
+ directives: {
289
+ ClickOutside
290
+ },
291
+ props: {
292
+ services: {
293
+ type: Array,
294
+ default: () => []
295
+ }
296
+ },
297
+ data() {
298
+ return {
299
+ showPopover: !1,
300
+ keyword: "",
301
+ currentIndex: 0,
302
+ last: 0
303
+ };
304
+ },
305
+ computed: {
306
+ filterList() {
307
+ return this.services.filter((t) => t.name.indexOf(this.keyword) > -1);
308
+ },
309
+ currentItem() {
310
+ var t;
311
+ return (t = this.filterList) == null ? void 0 : t[this.currentIndex];
312
+ },
313
+ evalResult() {
314
+ try {
315
+ return eval(this.keyword);
316
+ } catch (t) {
317
+ return "";
318
+ }
319
+ }
320
+ },
321
+ watch: {
322
+ keyword() {
323
+ this.currentIndex = 0, !this.currentItem && this.currentIndex !== -1 && (this.currentIndex = -1);
324
+ },
325
+ showPopover(t) {
326
+ t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
327
+ }
328
+ },
329
+ mounted() {
330
+ window.addEventListener("keydown", this.keydown);
331
+ },
332
+ destroyed() {
333
+ window.removeEventListener("keydown", this.keydown);
334
+ },
335
+ methods: {
336
+ async onItemClick(t) {
337
+ t.path && (this.hidePopover(), await this.$router.push(t.path));
338
+ },
339
+ copyEvalResult() {
340
+ return copy(this.evalResult);
341
+ },
342
+ hidePopover() {
343
+ this.showPopover = !1;
344
+ },
345
+ displayPopover() {
346
+ this.showPopover = !0;
347
+ },
348
+ mouseHoverItem(t, r) {
349
+ this.currentIndex = r;
350
+ },
351
+ async keydown(t) {
352
+ if (t.key === "Shift") {
353
+ const r = Date.now() - this.last;
354
+ r > 0 && r < 500 ? (this.showPopover = !0, await this.$nextTick(), this.$refs.searchInput.focus()) : this.last = Date.now();
355
+ }
356
+ this.showPopover === !0 && (t.key === "Escape" && this.hidePopover(), t.key === "Enter" && (this.currentItem ? this.currentItem.url ? (window.open(this.currentItem.url, "_blank"), this.hidePopover()) : this.currentItem.path && await this.onItemClick(this.currentItem) : this.copyEvalResult()), t.key === "ArrowUp" && (this.currentIndex--, this.currentIndex < 0 && (this.currentIndex = this.filterList.length - 1), this.scrollIntoView(this.currentIndex)), t.key === "ArrowDown" && (this.currentIndex++, this.currentIndex >= this.filterList.length && (this.currentIndex = 0), this.scrollIntoView(this.currentIndex)));
357
+ },
358
+ scrollIntoView(t) {
359
+ if (t === 0) {
360
+ this.$refs.ul.scrollTop = 0;
361
+ return;
362
+ }
363
+ if (t === this.filterList.length) {
364
+ this.$refs.ul.scrollTop = this.$refs.ul.scrollHeight;
365
+ return;
366
+ }
367
+ const r = this.$refs.ul.querySelector(`#item-${t}`);
368
+ isInContainer(r, this.$refs.ul, { topOffset: -78, bottomOffset: 78 }) || (this.$refs.ul.scrollTop = r.offsetTop - r.clientHeight + 20);
369
+ }
370
+ }
371
+ }, __cssModules = {};
372
+ var __component__ = /* @__PURE__ */ normalizeComponent(
373
+ __vue2_script,
374
+ render,
375
+ staticRenderFns,
376
+ !1,
377
+ __vue2_injectStyles,
378
+ null,
379
+ null,
380
+ null
381
+ );
382
+ function __vue2_injectStyles(t) {
383
+ for (let r in __cssModules)
384
+ this[r] = __cssModules[r];
385
+ }
386
+ const SearchPopover = /* @__PURE__ */ function() {
387
+ return __component__.exports;
388
+ }();
389
+ export {
390
+ SearchPopover as default
391
+ };
@@ -1 +1,242 @@
1
- import{n as a}from"../../chunks/6499de3a.js";var o=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"sign-panel flex-column"},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.disabled&&t.edit,expression:"!disabled && edit"}],staticClass:"sign-edit"},[e("div",{staticClass:"sign-draw-area",style:{width:`${t.width+2}px`,height:`${t.height+2}px`}},[e("div",{staticClass:"sign-watermark",style:{fontSize:`${t.fontSize}px`}},[t._v(" "+t._s(t.text)+" ")]),e("canvas",{ref:"canvas",staticClass:"sign-canvas",attrs:{width:t.width,height:t.height},on:{touchstart:function(s){return s.stopPropagation(),t.touchstart.apply(null,arguments)},touchmove:function(s){return s.stopPropagation(),t.touchmove.apply(null,arguments)},mousedown:function(s){return s.stopPropagation(),t.down.apply(null,arguments)},touchend:function(s){return s.stopPropagation(),t.touchend.apply(null,arguments)},mouseup:function(s){return s.stopPropagation(),t.up.apply(null,arguments)}}},[t._v("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D ")])]),e("div",{staticClass:"sign-tool-bar"},[e("div",{staticClass:"sign-button flex-item",staticStyle:{color:"red"},on:{click:t.clear}},[e("i",{staticClass:"fa fa-trash"}),t._v(" \u6E05\u9664 ")]),e("div",{staticClass:"sign-button flex-item",staticStyle:{color:"red"},on:{click:t.cancel}},[e("i",{staticClass:"fa fa-close"}),t._v(" \u53D6\u6D88 ")]),e("div",{staticClass:"sign-button flex-item",staticStyle:{color:"orange"},on:{click:t.rollback}},[e("i",{staticClass:"fa fa-repeat"}),t._v(" \u64A4\u9500 ")]),e("div",{staticClass:"sign-button flex-item",staticStyle:{color:"green"},on:{click:t.save}},[e("i",{staticClass:"fa fa-check"}),t._v(" \u786E\u5B9A ")])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.disabled||!t.edit,expression:"disabled || !edit"}],staticClass:"sign-view",style:{cursor:t.disabled?"not-allowed":"pointer"},on:{click:t.showSign}},[t.value?e("img",{staticClass:"sign-image",attrs:{src:t.value,alt:"\u7B7E\u540D"}}):t._e(),t.value?t._e():e("p",{staticClass:"sign-tips",style:{color:!t.value&&t.disabled?"red":""}},[t._v(" "+t._s(t.disabled?"\u672A\u7B7E\u540D":"\u70B9\u51FB\u8FDB\u884C\u7B7E\u540D")+" ")]),t.disabled?t._e():e("i",{staticClass:"el-icon-edit-outline sign-edit-icon"})])])},l=[];const c={name:"SignPanel",props:{width:{type:Number,default:400},height:{type:Number,default:150},lineWidth:{type:Number,default:1},text:{type:String,default:"\u7B7E\u540D\u533A"},fontSize:{type:Number,default:20},value:{type:String},disabled:Boolean},data(){return{edit:!1}},mounted(){this.init()},methods:{init(){if(this.stack=[],this.canvas=this.$refs.canvas,!this.canvas.getContext){alert("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D");return}this.canvasInit()},rollback(){if(this.stack.length>0){const t=this.stack[this.stack.length-1];this.ctx.putImageData(t,0,0),this.stack.length=this.stack.length-1}},position(){this.restorePoint=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height);const t=this.canvas.getBoundingClientRect();this.start=t.left,this.end=t.top},canvasInit(){this.ctx=this.canvas.getContext("2d"),this.ctx.lineCap="round",this.ctx.lineWidth=this.lineWidth,this.ctx.clearRect(0,0,this.width,this.height),this.blank=this.canvas.toDataURL("image/png")},drawWaterMark(){this.ctx.font=`${this.fontSize}px bold \u9ED1\u4F53`,this.ctx.fillStyle="#eee",this.ctx.textAlign="center",this.ctx.shadowBlur=1,this.ctx.textBaseline="middle",this.ctx.fillText(this.text,this.width/2,this.height/2)},down(t){this.position(),this.startLine(t.clientX,t.clientY,t),this.target=t.target,this.target.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.up)},move(t){this.moveLine(t.clientX,t.clientY,t)},up(){this.target&&this.target.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.up),this.record()},touchstart(t){this.position(),this.startLine(t.changedTouches[0].clientX,t.changedTouches[0].clientY,t)},touchmove(t){this.moveLine(t.touches[0].clientX,t.touches[0].clientY,t)},startLine(t,i){this.ctx.beginPath(),t-=this.start,i-=this.end,this.ctx.moveTo(t,i)},moveLine(t,i,e){e&&e.preventDefault(),t-=this.start,i-=this.end,this.ctx.lineTo(t,i),this.ctx.stroke()},clear(){this.ctx.clearRect(0,0,this.width,this.height)},cancel(){this.clear(),this.edit=!1},touchend(){this.record()},record(){this.stack.push(this.restorePoint)},save(){const t=this.canvas.toDataURL("image/png");this.blank===t?this.$emit("input",""):this.$emit("input",t),this.edit=!1,this.stack.length=0,this.ctx.clearRect(0,0,this.width,this.height)},showSign(){this.disabled||(this.edit=!0)}}},n={};var r=a(c,o,l,!1,h,null,null,null);function h(t){for(let i in n)this[i]=n[i]}var d=function(){return r.exports}();export{d as default};
1
+ import { n } from "../../chunks/6499de3a.js";
2
+ var o = function() {
3
+ var t = this, e = t.$createElement, i = t._self._c || e;
4
+ return i("div", {
5
+ staticClass: "sign-panel flex-column"
6
+ }, [i("div", {
7
+ directives: [{
8
+ name: "show",
9
+ rawName: "v-show",
10
+ value: !t.disabled && t.edit,
11
+ expression: "!disabled && edit"
12
+ }],
13
+ staticClass: "sign-edit"
14
+ }, [i("div", {
15
+ staticClass: "sign-draw-area",
16
+ style: {
17
+ width: `${t.width + 2}px`,
18
+ height: `${t.height + 2}px`
19
+ }
20
+ }, [i("div", {
21
+ staticClass: "sign-watermark",
22
+ style: {
23
+ fontSize: `${t.fontSize}px`
24
+ }
25
+ }, [t._v(" " + t._s(t.text) + " ")]), i("canvas", {
26
+ ref: "canvas",
27
+ staticClass: "sign-canvas",
28
+ attrs: {
29
+ width: t.width,
30
+ height: t.height
31
+ },
32
+ on: {
33
+ touchstart: function(s) {
34
+ return s.stopPropagation(), t.touchstart.apply(null, arguments);
35
+ },
36
+ touchmove: function(s) {
37
+ return s.stopPropagation(), t.touchmove.apply(null, arguments);
38
+ },
39
+ mousedown: function(s) {
40
+ return s.stopPropagation(), t.down.apply(null, arguments);
41
+ },
42
+ touchend: function(s) {
43
+ return s.stopPropagation(), t.touchend.apply(null, arguments);
44
+ },
45
+ mouseup: function(s) {
46
+ return s.stopPropagation(), t.up.apply(null, arguments);
47
+ }
48
+ }
49
+ }, [t._v("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D ")])]), i("div", {
50
+ staticClass: "sign-tool-bar"
51
+ }, [i("div", {
52
+ staticClass: "sign-button flex-item",
53
+ staticStyle: {
54
+ color: "red"
55
+ },
56
+ on: {
57
+ click: t.clear
58
+ }
59
+ }, [i("i", {
60
+ staticClass: "fa fa-trash"
61
+ }), t._v(" \u6E05\u9664 ")]), i("div", {
62
+ staticClass: "sign-button flex-item",
63
+ staticStyle: {
64
+ color: "red"
65
+ },
66
+ on: {
67
+ click: t.cancel
68
+ }
69
+ }, [i("i", {
70
+ staticClass: "fa fa-close"
71
+ }), t._v(" \u53D6\u6D88 ")]), i("div", {
72
+ staticClass: "sign-button flex-item",
73
+ staticStyle: {
74
+ color: "orange"
75
+ },
76
+ on: {
77
+ click: t.rollback
78
+ }
79
+ }, [i("i", {
80
+ staticClass: "fa fa-repeat"
81
+ }), t._v(" \u64A4\u9500 ")]), i("div", {
82
+ staticClass: "sign-button flex-item",
83
+ staticStyle: {
84
+ color: "green"
85
+ },
86
+ on: {
87
+ click: t.save
88
+ }
89
+ }, [i("i", {
90
+ staticClass: "fa fa-check"
91
+ }), t._v(" \u786E\u5B9A ")])])]), i("div", {
92
+ directives: [{
93
+ name: "show",
94
+ rawName: "v-show",
95
+ value: t.disabled || !t.edit,
96
+ expression: "disabled || !edit"
97
+ }],
98
+ staticClass: "sign-view",
99
+ style: {
100
+ cursor: t.disabled ? "not-allowed" : "pointer"
101
+ },
102
+ on: {
103
+ click: t.showSign
104
+ }
105
+ }, [t.value ? i("img", {
106
+ staticClass: "sign-image",
107
+ attrs: {
108
+ src: t.value,
109
+ alt: "\u7B7E\u540D"
110
+ }
111
+ }) : t._e(), t.value ? t._e() : i("p", {
112
+ staticClass: "sign-tips",
113
+ style: {
114
+ color: !t.value && t.disabled ? "red" : ""
115
+ }
116
+ }, [t._v(" " + t._s(t.disabled ? "\u672A\u7B7E\u540D" : "\u70B9\u51FB\u8FDB\u884C\u7B7E\u540D") + " ")]), t.disabled ? t._e() : i("i", {
117
+ staticClass: "el-icon-edit-outline sign-edit-icon"
118
+ })])]);
119
+ }, l = [];
120
+ const c = {
121
+ name: "SignPanel",
122
+ props: {
123
+ width: {
124
+ type: Number,
125
+ default: 400
126
+ },
127
+ height: {
128
+ type: Number,
129
+ default: 150
130
+ },
131
+ lineWidth: {
132
+ type: Number,
133
+ default: 1
134
+ },
135
+ text: {
136
+ type: String,
137
+ default: "\u7B7E\u540D\u533A"
138
+ },
139
+ fontSize: {
140
+ type: Number,
141
+ default: 20
142
+ },
143
+ value: {
144
+ type: String
145
+ },
146
+ disabled: Boolean
147
+ },
148
+ data() {
149
+ return {
150
+ edit: !1
151
+ };
152
+ },
153
+ mounted() {
154
+ this.init();
155
+ },
156
+ methods: {
157
+ init() {
158
+ if (this.stack = [], this.canvas = this.$refs.canvas, !this.canvas.getContext) {
159
+ alert("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D");
160
+ return;
161
+ }
162
+ this.canvasInit();
163
+ },
164
+ rollback() {
165
+ if (this.stack.length > 0) {
166
+ const t = this.stack[this.stack.length - 1];
167
+ this.ctx.putImageData(t, 0, 0), this.stack.length = this.stack.length - 1;
168
+ }
169
+ },
170
+ position() {
171
+ this.restorePoint = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);
172
+ const t = this.canvas.getBoundingClientRect();
173
+ this.start = t.left, this.end = t.top;
174
+ },
175
+ canvasInit() {
176
+ this.ctx = this.canvas.getContext("2d"), this.ctx.lineCap = "round", this.ctx.lineWidth = this.lineWidth, this.ctx.clearRect(0, 0, this.width, this.height), this.blank = this.canvas.toDataURL("image/png");
177
+ },
178
+ drawWaterMark() {
179
+ this.ctx.font = `${this.fontSize}px bold \u9ED1\u4F53`, this.ctx.fillStyle = "#eee", this.ctx.textAlign = "center", this.ctx.shadowBlur = 1, this.ctx.textBaseline = "middle", this.ctx.fillText(this.text, this.width / 2, this.height / 2);
180
+ },
181
+ down(t) {
182
+ this.position(), this.startLine(t.clientX, t.clientY, t), this.target = t.target, this.target.addEventListener("mousemove", this.move), window.addEventListener("mouseup", this.up);
183
+ },
184
+ move(t) {
185
+ this.moveLine(t.clientX, t.clientY, t);
186
+ },
187
+ up() {
188
+ this.target && this.target.removeEventListener("mousemove", this.move), window.removeEventListener("mouseup", this.up), this.record();
189
+ },
190
+ touchstart(t) {
191
+ this.position(), this.startLine(t.changedTouches[0].clientX, t.changedTouches[0].clientY, t);
192
+ },
193
+ touchmove(t) {
194
+ this.moveLine(t.touches[0].clientX, t.touches[0].clientY, t);
195
+ },
196
+ startLine(t, e) {
197
+ this.ctx.beginPath(), t -= this.start, e -= this.end, this.ctx.moveTo(t, e);
198
+ },
199
+ moveLine(t, e, i) {
200
+ i && i.preventDefault(), t -= this.start, e -= this.end, this.ctx.lineTo(t, e), this.ctx.stroke();
201
+ },
202
+ clear() {
203
+ this.ctx.clearRect(0, 0, this.width, this.height);
204
+ },
205
+ cancel() {
206
+ this.clear(), this.edit = !1;
207
+ },
208
+ touchend() {
209
+ this.record();
210
+ },
211
+ record() {
212
+ this.stack.push(this.restorePoint);
213
+ },
214
+ save() {
215
+ const t = this.canvas.toDataURL("image/png");
216
+ this.blank === t ? this.$emit("input", "") : this.$emit("input", t), this.edit = !1, this.stack.length = 0, this.ctx.clearRect(0, 0, this.width, this.height);
217
+ },
218
+ showSign() {
219
+ this.disabled || (this.edit = !0);
220
+ }
221
+ }
222
+ }, a = {};
223
+ var h = /* @__PURE__ */ n(
224
+ c,
225
+ o,
226
+ l,
227
+ !1,
228
+ r,
229
+ null,
230
+ null,
231
+ null
232
+ );
233
+ function r(t) {
234
+ for (let e in a)
235
+ this[e] = a[e];
236
+ }
237
+ const u = /* @__PURE__ */ function() {
238
+ return h.exports;
239
+ }();
240
+ export {
241
+ u as default
242
+ };