jobsys-explore 4.6.21 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/.eslintignore +3 -3
  2. package/CHANGELOG.md +542 -542
  3. package/README.md +41 -41
  4. package/TODOs.md +8 -8
  5. package/business-components/survey/ExSurvey.jsx +193 -193
  6. package/business-components/survey/index.js +5 -5
  7. package/business-components/survey/index.less +36 -36
  8. package/components/button/ExButton.jsx +120 -120
  9. package/components/button/index.js +4 -4
  10. package/components/button/index.less +7 -7
  11. package/components/decorator/ExDecorator.jsx +31 -31
  12. package/components/decorator/index.js +5 -5
  13. package/components/decorator/index.less +76 -76
  14. package/components/form/ExAddress.jsx +195 -195
  15. package/components/form/ExCascader.jsx +171 -171
  16. package/components/form/ExCheckbox.jsx +59 -59
  17. package/components/form/ExDate.jsx +143 -143
  18. package/components/form/ExDatetime.jsx +166 -166
  19. package/components/form/ExField.jsx +138 -138
  20. package/components/form/ExFieldUploader.jsx +50 -50
  21. package/components/form/ExForm.jsx +544 -544
  22. package/components/form/ExMatrixCheckbox.jsx +99 -99
  23. package/components/form/ExMatrixRadio.jsx +86 -86
  24. package/components/form/ExMatrixScale.jsx +97 -97
  25. package/components/form/ExNumber.jsx +51 -51
  26. package/components/form/ExRadio.jsx +58 -58
  27. package/components/form/ExRate.jsx +51 -51
  28. package/components/form/ExSelect.jsx +251 -251
  29. package/components/form/ExSlider.jsx +55 -55
  30. package/components/form/ExSwitch.jsx +51 -51
  31. package/components/form/ExTime.jsx +99 -99
  32. package/components/form/FormItem.jsx +307 -307
  33. package/components/form/PickerWrapper.jsx +120 -120
  34. package/components/form/index.js +46 -46
  35. package/components/form/index.less +178 -178
  36. package/components/form/utils.js +62 -62
  37. package/components/grid/ExGrid.jsx +53 -53
  38. package/components/grid/index.js +4 -4
  39. package/components/grid/index.less +2 -2
  40. package/components/index.js +12 -12
  41. package/components/pagination/ExPagination.jsx +457 -440
  42. package/components/pagination/index.js +5 -5
  43. package/components/pagination/index.less +3 -3
  44. package/components/provider/ExProvider.jsx +173 -173
  45. package/components/qrcode/ExQrcode.jsx +86 -86
  46. package/components/qrcode/index.js +5 -5
  47. package/components/qrcode/index.less +8 -8
  48. package/components/result/ExResult.jsx +122 -122
  49. package/components/result/index.js +5 -5
  50. package/components/result/index.less +59 -59
  51. package/components/search/ExSearch.jsx +370 -326
  52. package/components/search/components/Expand.jsx +77 -77
  53. package/components/search/components/Field.jsx +27 -27
  54. package/components/search/components/Quick.jsx +57 -57
  55. package/components/search/components/index.js +5 -5
  56. package/components/search/index.js +5 -5
  57. package/components/search/index.less +118 -118
  58. package/components/search/utils.js +30 -30
  59. package/components/sector/ExSector.jsx +52 -52
  60. package/components/sector/README.md +26 -26
  61. package/components/sector/index.js +5 -5
  62. package/components/sector/index.less +122 -122
  63. package/components/theme/ExTheme.jsx +10 -10
  64. package/components/theme/index.js +4 -4
  65. package/components/theme/index.less +98 -98
  66. package/components/uploader/ExUploader.jsx +293 -293
  67. package/components/uploader/index.js +5 -5
  68. package/components/utils.js +187 -187
  69. package/directives/auth.js +113 -113
  70. package/directives/index.js +4 -4
  71. package/dist/cipher-98df1050.cjs.map +1 -1
  72. package/dist/cipher-f2ed5ee6.js.map +1 -1
  73. package/dist/directives.cjs.map +1 -1
  74. package/dist/directives.js.map +1 -1
  75. package/dist/hooks.cjs.map +1 -1
  76. package/dist/hooks.js.map +1 -1
  77. package/dist/jobsys-explore.cjs +6 -6
  78. package/dist/jobsys-explore.cjs.map +1 -1
  79. package/dist/jobsys-explore.js +464 -407
  80. package/dist/jobsys-explore.js.map +1 -1
  81. package/docgen.config.js +15 -15
  82. package/docs/.vuepress/.cache/deps/_metadata.json +52 -52
  83. package/docs/.vuepress/.cache/deps/lodash-es.js +8442 -8442
  84. package/docs/.vuepress/.cache/deps/lodash-es.js.map +7 -7
  85. package/docs/.vuepress/.temp/internal/clientConfigs.js +17 -17
  86. package/docs/.vuepress/.temp/internal/pagesComponents.js +24 -24
  87. package/docs/.vuepress/.temp/internal/pagesData.js +22 -22
  88. package/docs/.vuepress/.temp/internal/pagesRoutes.js +12 -12
  89. package/docs/.vuepress/.temp/internal/themeData.js +1 -1
  90. package/docs/.vuepress/.temp/pages/components/decorator/ExDecorator.html.js +1 -1
  91. package/docs/.vuepress/.temp/pages/components/decorator/ExDecorator.html.vue +37 -37
  92. package/docs/.vuepress/.temp/pages/components/sector/ExSector.html.js +1 -1
  93. package/docs/.vuepress/.temp/pages/components/sector/ExSector.html.vue +71 -71
  94. package/docs/.vuepress/.temp/styles/index.scss +1 -1
  95. package/docs/.vuepress/config.js +61 -61
  96. package/docs/.vuepress/dist/404.html +33 -33
  97. package/docs/.vuepress/dist/assets/404.html-a0ce2184.js +1 -1
  98. package/docs/.vuepress/dist/assets/ExButton.html-ad283101.js +1 -1
  99. package/docs/.vuepress/dist/assets/ExDecorator.html-42d09114.js +1 -1
  100. package/docs/.vuepress/dist/assets/ExDecorator.html-c82c5fe8.js +1 -1
  101. package/docs/.vuepress/dist/assets/ExForm.html-9e3f8000.js +1 -1
  102. package/docs/.vuepress/dist/assets/ExProvider.html-78fdc6cd.js +1 -1
  103. package/docs/.vuepress/dist/assets/ExSearch.html-103f6f34.js +1 -1
  104. package/docs/.vuepress/dist/assets/ExSector.html-a1e24c3a.js +7 -7
  105. package/docs/.vuepress/dist/assets/ExSector.html-cff3fefd.js +1 -1
  106. package/docs/.vuepress/dist/assets/ExUploader.html-8310e424.js +1 -1
  107. package/docs/.vuepress/dist/assets/app-29fe8d1e.js +10 -10
  108. package/docs/.vuepress/dist/assets/hooks.html-90ccbc1a.js +1 -1
  109. package/docs/.vuepress/dist/assets/index.html-85b79c97.js +43 -43
  110. package/docs/.vuepress/dist/assets/style-46d7e227.css +1 -1
  111. package/docs/.vuepress/dist/components/button/ExButton.html +33 -33
  112. package/docs/.vuepress/dist/components/decorator/ExDecorator.html +33 -33
  113. package/docs/.vuepress/dist/components/form/ExForm.html +33 -33
  114. package/docs/.vuepress/dist/components/provider/ExProvider.html +33 -33
  115. package/docs/.vuepress/dist/components/search/ExSearch.html +33 -33
  116. package/docs/.vuepress/dist/components/sector/ExSector.html +39 -39
  117. package/docs/.vuepress/dist/components/uploader/ExUploader.html +33 -33
  118. package/docs/.vuepress/dist/hooks.html +33 -33
  119. package/docs/.vuepress/dist/index.html +75 -75
  120. package/docs/.vuepress/styles/index.scss +7 -7
  121. package/docs/components/decorator/ExDecorator.md +14 -14
  122. package/docs/components/sector/ExSector.md +43 -43
  123. package/docs/index.md +82 -82
  124. package/hooks/cipher.js +44 -44
  125. package/hooks/datetime.js +69 -69
  126. package/hooks/form.js +188 -188
  127. package/hooks/utils.js +282 -282
  128. package/index.html +17 -17
  129. package/package.json +1 -1
  130. package/playground/App.vue +191 -191
  131. package/playground/TestButton.vue +61 -61
  132. package/playground/TestCascader.vue +2442 -2442
  133. package/playground/TestDecorator.vue +14 -14
  134. package/playground/TestForm.vue +429 -429
  135. package/playground/TestFormItem.vue +110 -110
  136. package/playground/TestGrid.vue +22 -22
  137. package/playground/TestPagination.vue +1250 -1248
  138. package/playground/TestQrcode.vue +7 -7
  139. package/playground/TestResult.vue +12 -12
  140. package/playground/TestSearch.vue +115 -115
  141. package/playground/TestSector.vue +15 -15
  142. package/playground/TestSurvey.vue +27 -27
  143. package/playground/TestUploader.vue +14 -14
  144. package/playground/main.js +22 -22
  145. package/utils/style.js +13 -13
  146. package/vite.config.js +54 -54
  147. package/.changeset/blue-spiders-roll.md +0 -5
  148. package/.changeset/cyan-monkeys-draw.md +0 -5
  149. package/.changeset/dry-feet-float.md +0 -5
  150. package/.changeset/empty-mice-share.md +0 -5
  151. package/.changeset/famous-yaks-doubt.md +0 -5
  152. package/.changeset/five-fans-type.md +0 -5
  153. package/.changeset/funny-hats-drop.md +0 -5
  154. package/.changeset/khaki-cobras-bathe.md +0 -5
  155. package/.changeset/khaki-forks-shave.md +0 -5
  156. package/.changeset/lazy-yaks-crash.md +0 -5
  157. package/.changeset/light-cycles-flow.md +0 -5
  158. package/.changeset/loud-mirrors-explain.md +0 -5
  159. package/.changeset/lovely-balloons-protect.md +0 -5
  160. package/.changeset/mean-pens-travel.md +0 -5
  161. package/.changeset/moody-doors-grow.md +0 -5
  162. package/.changeset/moody-laws-change.md +0 -5
  163. package/.changeset/nasty-goats-joke.md +0 -5
  164. package/.changeset/odd-forks-drop.md +0 -5
  165. package/.changeset/olive-windows-suffer.md +0 -5
  166. package/.changeset/popular-carpets-jog.md +0 -5
  167. package/.changeset/popular-planets-play.md +0 -5
  168. package/.changeset/rare-gorillas-boil.md +0 -5
  169. package/.changeset/rare-moose-teach.md +0 -5
  170. package/.changeset/sharp-tools-hope.md +0 -5
  171. package/.changeset/slimy-sloths-refuse.md +0 -5
  172. package/.changeset/slow-boats-search.md +0 -5
  173. package/.changeset/small-experts-bake.md +0 -5
  174. package/.changeset/smooth-horses-tie.md +0 -5
  175. package/.changeset/tame-feet-reply.md +0 -5
  176. package/.changeset/tidy-items-reflect.md +0 -5
  177. package/.changeset/weak-chicken-admire.md +0 -5
  178. package/.changeset/weak-rockets-compare.md +0 -5
  179. package/.changeset/wild-glasses-bathe.md +0 -5
  180. package/.changeset/wise-ears-turn.md +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"jobsys-explore.cjs","sources":["../components/button/ExButton.jsx","../utils/withInstall.js","../components/button/index.js","../components/theme/ExTheme.jsx","../components/theme/index.js","../components/utils.js","../components/form/ExField.jsx","../components/form/PickerWrapper.jsx","../components/provider/ExProvider.jsx","../components/form/ExAddress.jsx","../components/form/ExCascader.jsx","../components/form/ExCheckbox.jsx","../../../node_modules/.pnpm/vant@4.6.6_vue@3.3.4/node_modules/vant/es/utils/format.mjs","../components/form/ExDate.jsx","../components/form/ExDatetime.jsx","../components/form/ExTime.jsx","../components/form/ExNumber.jsx","../components/form/ExRadio.jsx","../components/form/ExSelect.jsx","../components/form/ExSwitch.jsx","../components/form/ExRate.jsx","../components/form/ExSlider.jsx","../components/uploader/ExUploader.jsx","../components/form/ExFieldUploader.jsx","../components/form/ExMatrixRadio.jsx","../components/form/utils.js","../components/form/ExMatrixScale.jsx","../components/form/ExMatrixCheckbox.jsx","../components/form/FormItem.jsx","../components/form/ExForm.jsx","../components/form/index.js","../components/provider/index.js","../components/result/ExResult.jsx","../components/result/index.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js","../../../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js","../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js","../components/qrcode/ExQrcode.jsx","../components/qrcode/index.js","../utils/style.js","../components/grid/ExGrid.jsx","../components/search/components/Expand.jsx","../components/search/components/Quick.jsx","../components/search/components/Field.jsx","../components/search/ExSearch.jsx","../components/pagination/ExPagination.jsx","../components/pagination/index.js","../components/search/index.js","../components/uploader/index.js","../components/grid/index.js","../components/decorator/ExDecorator.jsx","../components/decorator/index.js","../components/sector/ExSector.jsx","../components/sector/index.js","../business-components/survey/ExSurvey.jsx","../business-components/survey/index.js","../index.js"],"sourcesContent":["import { defineComponent } from \"vue\"\r\nimport { Button } from \"vant\"\r\nimport \"./index.less\"\r\n\r\n/**\r\n * 主题组件\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExButton\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 按钮类型\r\n\t\t * @values primary, success, warning, danger\r\n\t\t */\r\n\t\ttype: { type: String, default: \"default\" },\r\n\r\n\t\t/**\r\n\t\t * 按钮大小\r\n\t\t * @values large, normal, small, mini\r\n\t\t */\r\n\t\tsize: { type: String, default: \"normal\" },\r\n\r\n\t\t/**\r\n\t\t * 失效状态\r\n\t\t */\r\n\t\tdisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否圆形按钮\r\n\t\t */\r\n\t\tround: { type: Boolean, default: true },\r\n\r\n\t\t/**\r\n\t\t * 是否块状按钮\r\n\t\t */\r\n\t\tblock: { type: Boolean, default: true },\r\n\r\n\t\t/**\r\n\t\t * 按钮标签\r\n\t\t */\r\n\t\ttext: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 按钮图标,需要使用\r\n\t\t *\r\n\t\t */\r\n\t\ticon: { type: Object, default: null },\r\n\r\n\t\t/**\r\n\t\t * 按钮图标位置\r\n\t\t * @values left, right\r\n\t\t */\r\n\t\ticonPosition: { type: String, default: \"left\" },\r\n\r\n\t\t/**\r\n\t\t * 请求状态控制器\r\n\t\t * @param {boolean} fetcher.loading 是否加载中\r\n\t\t */\r\n\t\tfetcher: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({ loading: false }),\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/button)\r\n\t\t */\r\n\t\tbuttonProps: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({}),\r\n\t\t},\r\n\t},\r\n\temits: [\r\n\t\t/**\r\n\t\t * @event click\r\n\t\t * @param {Event} event 点击事件\r\n\t\t */\r\n\t\t\"click\",\r\n\t],\r\n\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst onClick = (e) => {\r\n\t\t\t/**\r\n\t\t\t * @event click 点击事件\r\n\t\t\t */\r\n\t\t\temit(\"click\", e)\r\n\t\t}\r\n\r\n\t\tconst defaultLabel = () => {\r\n\t\t\treturn props.text || slots.default?.()\r\n\t\t}\r\n\r\n\t\tconst defaultSlot = () => {\r\n\t\t\tif (props.icon && props.iconPosition === \"left\") {\r\n\t\t\t\treturn [props.icon, defaultLabel()]\r\n\t\t\t} else if (props.icon && props.iconPosition === \"right\") {\r\n\t\t\t\treturn [defaultLabel(), props.icon]\r\n\t\t\t}\r\n\t\t\treturn [defaultLabel()]\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<Button\r\n\t\t\t\tclass={\"ex-button\"}\r\n\t\t\t\tloading={props.fetcher.loading}\r\n\t\t\t\ttype={props.type}\r\n\t\t\t\tsize={props.size}\r\n\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\tround={props.round}\r\n\t\t\t\tblock={props.block}\r\n\t\t\t\tonClick={onClick}\r\n\t\t\t\t{...props.buttonProps}\r\n\t\t\t>\r\n\t\t\t\t{{\r\n\t\t\t\t\tdefault: () => defaultSlot(),\r\n\t\t\t\t}}\r\n\t\t\t</Button>\r\n\t\t)\r\n\t},\r\n})\r\n","export default (component) => {\n\tcomponent.install = (app) => {\n\t\tconst name = component.name || component.__name\n\t\tapp.component(name, component)\n\t}\n\treturn component\n}\n","import _ExButton from \"./ExButton.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\nexport const ExButton = withInstall(_ExButton)\r\nexport default ExButton\r\n","import { defineComponent } from \"vue\"\r\nimport \"./index.less\"\r\n\r\n/**\r\n * 主题组件\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExTheme\",\r\n})\r\n","import _ExTheme from \"./ExTheme.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\nexport const ExTheme = withInstall(_ExTheme)\r\nexport default ExTheme\r\n","import { cloneDeep, isFunction, isNumber, isString } from \"lodash-es\"\r\nimport { watch } from \"vue\"\r\nimport { useCache, useFetch } from \"../hooks\"\r\n\r\n/**\r\n * 通用 field props\r\n */\r\nexport const defaultFieldProps = {\r\n\t/**\r\n\t * 输入框左侧文本\r\n\t */\r\n\tlabel: { type: String, default: \"\" },\r\n\r\n\t/**\r\n\t * 名称,作为提交表单时的标识符\r\n\t */\r\n\tname: { type: String, default: \"\" },\r\n\r\n\t/**\r\n\t * 输入框占位提示文字\r\n\t */\r\n\tplaceholder: { type: String, default: \"请填写\" },\r\n\r\n\t/**\r\n\t * 提示文案\r\n\t */\r\n\thelp: { type: [String, Function], default: \"\" },\r\n\r\n\t/**\r\n\t * 元素的append slot\r\n\t */\r\n\tappend: { type: [String, Function], default: \"\" },\r\n\r\n\t/**\r\n\t * 是否禁用输入框\r\n\t */\r\n\tdisabled: { type: Boolean, default: false },\r\n\r\n\t/**\r\n\t * 是否显示表单必填星号\r\n\t */\r\n\trequired: { type: Boolean, default: false },\r\n\r\n\t/**\r\n\t * 是否展示右侧箭头并开启点击反馈\r\n\t */\r\n\tisLink: { type: Boolean, default: false },\r\n\r\n\t/**\r\n\t * 是否为只读状态,只读状态下无法输入内容\r\n\t */\r\n\treadonly: { type: Boolean, default: false },\r\n\r\n\t/**\r\n\t * 表单校验规则\r\n\t */\r\n\trules: { type: Array, default: null },\r\n\r\n\t/**\r\n\t * 原生 [Field 配置](https://vant-contrib.gitee.io/vant/#/zh-CN/field)\r\n\t */\r\n\tfieldProps: { type: Object, default: () => ({}) },\r\n\r\n\t/**\r\n\t * 原生输入组件的 props\r\n\t */\r\n\tdefaultProps: { type: Object, default: () => ({}) },\r\n}\r\n\r\n/**\r\n * 原生 Field 的 slots\r\n * 用于从组合组件中挑选\r\n */\r\nexport const defaultFieldSlots = {\r\n\tlabel: () => null,\r\n\tinput: () => null,\r\n\t\"left-icon\": () => null,\r\n\t\"right-icon\": () => null,\r\n\tbutton: () => null,\r\n\t\"error-message\": () => null,\r\n\textra: () => null,\r\n}\r\n\r\n/**\r\n * 通用的 options props\r\n */\r\nexport const defaultOptionsProps = {\r\n\t/**\r\n\t * 选项\r\n\t */\r\n\toptions: { type: [Array, Function], default: () => [] },\r\n\r\n\t/**\r\n\t * 选项 url\r\n\t */\r\n\turl: { type: String, default: null },\r\n\r\n\t/**\r\n\t * 缓存url返回的数据\r\n\t */\r\n\turlCache: { type: Boolean, default: true },\r\n\r\n\t/**\r\n\t * 选项获取后的回调\r\n\t */\r\n\tafterFetched: { type: Function, default: null },\r\n}\r\n\r\n/**\r\n * Prepare options for select\r\n *\r\n * @param options\r\n * @return {Array}\r\n */\r\nexport const prepareOptions = (options) => {\r\n\toptions = isFunction(options) ? options() : options\r\n\toptions = cloneDeep(options).map((op) => {\r\n\t\tif (op.children?.length) {\r\n\t\t\top.children = prepareOptions(op.children)\r\n\t\t}\r\n\t\treturn isString(op) || isNumber(op) ? { value: op, label: op, text: op } : { text: op.label, ...op }\r\n\t})\r\n\treturn options\r\n}\r\n\r\n//内部方法,为了useOptionTrait实现单次请求,避免重复请求\r\nconst recordOptionsUrl = {}\r\nconst optionsFetcher = (props) => {\r\n\treturn new Promise((resolve) => {\r\n\t\tuseFetch()\r\n\t\t\t.get(props.url)\r\n\t\t\t.then((items) => {\r\n\t\t\t\tif (props.afterFetched) {\r\n\t\t\t\t\titems = props.afterFetched(items)\r\n\t\t\t\t}\r\n\t\t\t\tresolve(items)\r\n\t\t\t})\r\n\t})\r\n}\r\n/**\r\n * 初始化选项\r\n * @param options\r\n * @param props\r\n * @param {Array|Function} [defaultOptions]\r\n *\r\n * @return void\r\n */\r\nexport const useOptionTrait = async (options, props, defaultOptions) => {\r\n\toptions.value = prepareOptions(props.options)\r\n\r\n\tconst fetchData = async (props) => {\r\n\t\tif (recordOptionsUrl[props.url]) {\r\n\t\t\treturn recordOptionsUrl[props.url]\r\n\t\t}\r\n\t\trecordOptionsUrl[props.url] = optionsFetcher(props)\r\n\r\n\t\tconst result = await recordOptionsUrl[props.url]\r\n\t\trecordOptionsUrl[props.url] = null\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tresolve(result)\r\n\t\t})\r\n\t}\r\n\r\n\twatch(\r\n\t\t() => props.options,\r\n\t\t() => {\r\n\t\t\toptions.value = prepareOptions(props.options)\r\n\t\t},\r\n\t)\r\n\r\n\tif (!options.value.length) {\r\n\t\tif (props.url) {\r\n\t\t\tif (props.urlCache && useCache(props.url).get()) {\r\n\t\t\t\toptions.value = useCache(props.url).get()\r\n\t\t\t} else {\r\n\t\t\t\tfetchData(props).then((items) => {\r\n\t\t\t\t\toptions.value = items\r\n\t\t\t\t\tif (props.urlCache) {\r\n\t\t\t\t\t\tuseCache(props.url).set(items)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t} else if (defaultOptions) {\r\n\t\t\toptions.value = defaultOptions\r\n\t\t}\r\n\t}\r\n}\r\n","import { computed, defineComponent, getCurrentInstance, reactive, watch } from \"vue\"\r\nimport { Field, Icon, Popover } from \"vant\"\r\nimport { defaultFieldProps, defaultFieldSlots } from \"../utils\"\r\nimport { omit, pick, isString } from \"lodash-es\"\r\n\r\n/**\r\n * ExField 输入框\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExField\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\t/**\r\n\t\t * 输入框内容\r\n\t\t */\r\n\t\tmodelValue: { type: [String, Number, Array, Object, Boolean], default: () => \"\" },\r\n\r\n\t\t/**\r\n\t\t * 输入框类型, 支持原生 input 标签的所有\r\n\t\t */\r\n\t\ttype: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否作为 Picker 的 Trigger\r\n\t\t */\r\n\t\tmask: { type: Boolean, default: false },\r\n\t},\r\n\temits: [\"update:modelValue\", \"click\"],\r\n\tsetup(props, { slots, emit }) {\r\n\t\tconst instance = getCurrentInstance()\r\n\t\tconst displayText = instance.parent?.parent?.exposed?.displayText\r\n\r\n\t\tconst state = reactive({\r\n\t\t\tvalue: props.mask ? displayText : props.modelValue,\r\n\t\t\tshowHelp: false,\r\n\t\t})\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => {\r\n\t\t\t\tstate.value = props.modelValue\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst isLink = computed(() => (props.mask && !props.disabled && !props.readonly ? true : props.isLink))\r\n\t\tconst isReadonly = computed(() => (props.mask ? true : props.readonly))\r\n\r\n\t\tconst onUpdateValue = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\t/****************** render **********************/\r\n\r\n\t\tconst helpElem = () => {\r\n\t\t\tif (props.help) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<Popover v-model:show={state.showHelp} theme={\"dark\"} placement={\"bottom-start\"}>\r\n\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\tdefault: () => <div class={\"ex-field__help\"}>{isString(props.help) ? props.help : props.help()}</div>,\r\n\t\t\t\t\t\t\treference: () =>\r\n\t\t\t\t\t\t\t\tprops.help ? (\r\n\t\t\t\t\t\t\t\t\t<span class={\"ex-field__help-handler\"}>\r\n\t\t\t\t\t\t\t\t\t\t<Icon name={\"warning-o\"}></Icon>\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t) : null,\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t</Popover>\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t\treturn null\r\n\t\t}\r\n\t\tconst labelElem = () => (\r\n\t\t\t<div class={\"ex-field__label\"}>\r\n\t\t\t\t<span>{props.label || slots.label?.()}</span>\r\n\r\n\t\t\t\t{helpElem()}\r\n\t\t\t</div>\r\n\t\t)\r\n\r\n\t\tconst inputElem = () => {\r\n\t\t\tlet inputSlots = omit(slots, Object.keys(defaultFieldSlots))\r\n\t\t\tlet InputElem = slots.input ? slots.input() : null\r\n\r\n\t\t\tif (Object.keys(inputSlots).length) {\r\n\t\t\t\tif (InputElem.length > 1) {\r\n\t\t\t\t\tconsole.warn(\"More than one root element wrapped in ExField with input slots!\")\r\n\t\t\t\t}\r\n\t\t\t\tInputElem = InputElem[0]\r\n\t\t\t\treturn <InputElem>{inputSlots}</InputElem>\r\n\t\t\t}\r\n\t\t\treturn InputElem\r\n\t\t}\r\n\r\n\t\tconst appendElem = () => {\r\n\t\t\tif (props.append) {\r\n\t\t\t\tconst appendResult = isString(props.append) ? props.append : props.append()\r\n\t\t\t\treturn appendResult ? <div class={\"ex-field__append\"}>{appendResult}</div> : null\r\n\t\t\t}\r\n\t\t\treturn null\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\tlet fieldSlots = pick(slots, Object.keys(defaultFieldSlots))\r\n\t\t\tif (!fieldSlots.label) {\r\n\t\t\t\tfieldSlots.label = labelElem\r\n\t\t\t}\r\n\r\n\t\t\tif (fieldSlots.input) {\r\n\t\t\t\tfieldSlots.input = inputElem\r\n\t\t\t}\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div class={`ex-field`}>\r\n\t\t\t\t\t<Field\r\n\t\t\t\t\t\tv-model={state.value}\r\n\t\t\t\t\t\ttype={props.type}\r\n\t\t\t\t\t\tname={props.name}\r\n\t\t\t\t\t\tplaceholder={props.placeholder}\r\n\t\t\t\t\t\treadonly={isReadonly.value}\r\n\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\trequired={props.required}\r\n\t\t\t\t\t\tisLink={isLink.value}\r\n\t\t\t\t\t\trules={props.rules}\r\n\t\t\t\t\t\tonClickInput={() => emit(\"click\")}\r\n\t\t\t\t\t\tonUpdate:modelValue={onUpdateValue}\r\n\t\t\t\t\t\t{...props.fieldProps}\r\n\t\t\t\t\t\tshowWordLimit={isReadonly.value ? false : props.fieldProps?.showWordLimit}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ ...fieldSlots }}\r\n\t\t\t\t\t</Field>\r\n\t\t\t\t\t{appendElem()}\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\t},\r\n})\r\n","import { defineComponent, ref } from \"vue\"\r\nimport { Popup } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { omit, pick } from \"lodash-es\"\r\nimport { defaultFieldProps } from \"../utils\"\r\n\r\nexport default defineComponent({\r\n\tname: \"PickerWrapper\",\r\n\r\n\tprops: {\r\n\t\t/**\r\n\t\t * Picker 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否启用卡片模式\r\n\t\t */\r\n\t\tinset: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否会弹窗\r\n\t\t */\r\n\t\tdisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否显示关闭\r\n\t\t */\r\n\t\tcloseable: { type: Boolean, default: true },\r\n\t},\r\n\temits: [\"close\", \"open\"],\r\n\tsetup: (props, { emit, slots, expose }) => {\r\n\t\tconst showPopup = ref(false)\r\n\r\n\t\tconst onClickWrapper = () => {\r\n\t\t\tif (props.disabled) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tshowPopup.value = true\r\n\t\t\temit(\"open\")\r\n\t\t}\r\n\r\n\t\tconst close = () => {\r\n\t\t\tshowPopup.value = false\r\n\t\t\temit(\"close\")\r\n\t\t}\r\n\r\n\t\texpose({ close })\r\n\r\n\t\treturn () => {\r\n\t\t\t// 为了让 ExField 的 onClickInput 事件才触发 Popup\r\n\t\t\t// 所以会手动获取 trigger slot 的第一个组件来手动监听 onClick 事件\r\n\t\t\t// 如果以后有需要多个组件的情况,再做调整\r\n\r\n\t\t\tlet TriggerElem = slots.trigger ? slots.trigger() : null\r\n\r\n\t\t\tif (TriggerElem && TriggerElem.length) {\r\n\t\t\t\tTriggerElem = TriggerElem[0]\r\n\t\t\t}\r\n\r\n\t\t\treturn [\r\n\t\t\t\t<span class={\"ex-field-popup-wrapper\"}>\r\n\t\t\t\t\t<TriggerElem onClick={onClickWrapper}></TriggerElem>\r\n\t\t\t\t</span>,\r\n\r\n\t\t\t\t<Popup\r\n\t\t\t\t\tv-model:show={showPopup.value}\r\n\t\t\t\t\tcloseable={props.closeable}\r\n\t\t\t\t\tposition={\"bottom\"}\r\n\t\t\t\t\tround={true}\r\n\t\t\t\t\tteleport={\"body\"}\r\n\t\t\t\t\tcloseOnPopstate={true}\r\n\t\t\t\t\tclass={`ex-field-popup ${props.inset ? \"ex-field-popup-inset\" : \"\"}`}\r\n\t\t\t\t\tsafeAreaInsetBottom={true}\r\n\t\t\t\t\tsafeAreaInsetTop={true}\r\n\t\t\t\t\tonClickOverlay={close}\r\n\t\t\t\t\tonClickCloseIcon={close}\r\n\t\t\t\t>\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t\tprops.closeable ? (\r\n\t\t\t\t\t\t\t\t<div class={\"ex-field-popup__header\"}>\r\n\t\t\t\t\t\t\t\t\t<h2 class={\"ex-field-popup__title\"}>{props.title}</h2>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t) : null,\r\n\t\t\t\t\t\t\tslots.default?.(),\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t}}\r\n\t\t\t\t</Popup>,\r\n\t\t\t]\r\n\t\t}\r\n\t},\r\n})\r\n\r\nexport const pickerProps = (props) => {\r\n\treturn {\r\n\t\ttitle: props.title || `请选择${props.label}`,\r\n\t\tdisabled: props.readonly || props.disabled,\r\n\t}\r\n}\r\n\r\nexport const pickerSlots = (slots, props) => {\r\n\tlet triggerElem = slots.default ? slots.default() : null\r\n\r\n\tif (!triggerElem) {\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\t\t// default slot 是 trigger, 其它的 slots 全部传给 ExField\r\n\t\tconst fieldSlots = omit(slots, \"default\")\r\n\r\n\t\ttriggerElem = (\r\n\t\t\t<ExField {...fieldProps} mask={true}>\r\n\t\t\t\t{fieldSlots}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t}\r\n\r\n\treturn {\r\n\t\ttrigger: () => triggerElem,\r\n\t}\r\n}\r\n","import { defineComponent, provide } from \"vue\"\r\n\r\nexport const EX_UPLOADER = Symbol(\"EX_UPLOADER\")\r\nexport const EX_ADDRESS = Symbol(\"EX_ADDRESS\")\r\nexport const EX_FORM = Symbol(\"EX_FORM\")\r\nexport const EX_SEARCH = Symbol(\"EX_SEARCH\")\r\nexport const EX_PAGINATION = Symbol(\"EX_PAGINATION\")\r\n\r\n/**\r\n * Explore 配置组件\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExProvider\",\r\n\t/**\r\n\t * @typedef {Object} ProviderProps\r\n\t * @property {UploaderProviderProps} [uploader] `ExUploader` 配置\r\n\t * @property {AddressProviderProps} [address] `ExAddress` 配置\r\n\t * @property {FormProviderProps} [form] `ExForm` 配置\r\n\t * @property {SearchProviderProps} [search] `ExSearch` 配置\r\n\t * @property {PaginationProviderProps} [pagination] `ExPagination` 配置\r\n\t *\r\n\t */\r\n\tprops: {\r\n\t\t/**\r\n\t\t * @typedef {Object} UploaderProviderProps `ExUploader` 配置\r\n\t\t * @property {string} uploadUrl 上传地址\r\n\t\t * @property {UploadFileItem} defaultFileItem 默认文件项\r\n\t\t *\r\n\t\t * @typedef {Object} UploadFileItem 文件项\r\n\t\t * @property {string} [id] 文件 ID\r\n\t\t * @property {string} [name] 文件名\r\n\t\t * @property {string} defaultFileItem.url 文件地址\r\n\t\t * @property {string} defaultFileItem.path 文件路径\r\n\t\t * @property {string} [thumbUrl] 缩略图地址\r\n\t\t */\r\n\t\tuploader: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({\r\n\t\t\t\tuploadUrl: \"\",\r\n\t\t\t\tdefaultFileItem: {\r\n\t\t\t\t\tid: \"id\",\r\n\t\t\t\t\tname: \"name\",\r\n\t\t\t\t\turl: \"url\",\r\n\t\t\t\t\tpath: \"path\",\r\n\t\t\t\t\tthumbUrl: \"thumbUrl\",\r\n\t\t\t\t},\r\n\t\t\t}),\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @typedef {Object} AddressProviderProps `ExAddress` 配置\r\n\t\t * @property {string} addressUrl 选项请求地址\r\n\t\t * @property {string} displayTextType 显示值的类型。\"all\": 所有, last:最后选中的值\r\n\t\t * @property {Function} [afterFetched] 处理接口返回数据的函数\r\n\t\t * @property {AddressOptionKeys} optionKeys 地址选项键名\r\n\t\t *\r\n\t\t * @typedef {Object} AddressOptionKeys 地址选项键名\r\n\t\t * @property {string} optionKeys.value 选项对应的值\r\n\t\t * @property {string} optionKeys.text 选项文字\r\n\t\t * @property {string} optionKeys.children 子选项列表\r\n\t\t */\r\n\t\taddress: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({\r\n\t\t\t\taddressUrl: \"\",\r\n\t\t\t\tdisplayTextType: \"\",\r\n\t\t\t\tafterFetched: null,\r\n\t\t\t\toptionKeys: {\r\n\t\t\t\t\tvalue: \"code\",\r\n\t\t\t\t\ttext: \"name\",\r\n\t\t\t\t\tchildren: \"children\",\r\n\t\t\t\t},\r\n\t\t\t}),\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @typedef {Object} FormProviderProps `ExForm` 配置\r\n\t\t * @property {Object} [format] 格式化配置, 如 {date: true} 表示在提交表单时使用 `useFormFormat` 格式所有日期字段\r\n\t\t * @property {Function} [afterFetched] 处理接口返回数据的函数\r\n\t\t */\r\n\t\tform: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({\r\n\t\t\t\tformat: {},\r\n\t\t\t\tafterFetched: null,\r\n\t\t\t}),\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @typedef {Object} SearchProviderProps `ExSearch` 配置\r\n\t\t * @property {Object} [maskClass] 定制伪 Input 样式\r\n\t\t * @property {Object} [inputClass] 弹层中 Input 的样式\r\n\t\t */\r\n\t\tsearch: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({\r\n\t\t\t\tmaskClass: \"\",\r\n\t\t\t\tinputClass: \"\",\r\n\t\t\t}),\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @typedef {Object} PaginationRes\r\n\t\t * @property {Array} items 数据\r\n\t\t * @property {number} currentPage 当前页码\r\n\t\t * @property {number} totalSize 总条数\r\n\t\t * @property {String} [errorMessage] 错误信息\r\n\t\t */\r\n\r\n\t\t/**\r\n * @typedef {Object} PaginationProviderProps `ExPagination` 配置\r\n * @property {function():PaginationRes} [afterFetched] 处理接口返回数据的函数\r\n * @property {PaginationRequestKeys} [requestKeys] 请求参数键名\r\n * /\r\n\r\n /**\r\n * @typedef {Object} PaginationRequestKeys 请求参数键名\r\n * @property {string} [currentPage] 当前页码\r\n * @property {string} [pageSize] 每页条数\r\n */\r\n\t\tpagination: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({\r\n\t\t\t\tafterFetched: null,\r\n\t\t\t\trequestKeys: {\r\n\t\t\t\t\tcurrentPage: \"currentPage\",\r\n\t\t\t\t\tpageSize: \"pageSize\",\r\n\t\t\t\t},\r\n\t\t\t}),\r\n\t\t},\r\n\t},\r\n\tsetup(props, { slots }) {\r\n\t\tprovide(EX_UPLOADER, {\r\n\t\t\tuploadUrl: props.uploader?.uploadUrl || \"\",\r\n\t\t\tdefaultFileItem: {\r\n\t\t\t\tid: \"id\",\r\n\t\t\t\tname: \"name\",\r\n\t\t\t\turl: \"url\",\r\n\t\t\t\tpath: \"path\",\r\n\t\t\t\tthumbUrl: \"thumbUrl\",\r\n\t\t\t\t...props.uploader?.defaultFileItem,\r\n\t\t\t},\r\n\t\t})\r\n\t\tprovide(EX_ADDRESS, {\r\n\t\t\taddressUrl: props.address?.addressUrl || \"\",\r\n\t\t\tdisplayTextType: props.address?.displayTextType || \"\",\r\n\t\t\tafterFetched: props.address?.afterFetched,\r\n\t\t\toptionKeys: {\r\n\t\t\t\tvalue: \"code\",\r\n\t\t\t\ttext: \"name\",\r\n\t\t\t\tchildren: \"children\",\r\n\t\t\t\t...props.address?.optionKeys,\r\n\t\t\t},\r\n\t\t})\r\n\t\tprovide(EX_FORM, { format: {}, ...props.form })\r\n\t\tprovide(EX_SEARCH, {\r\n\t\t\tmaskClass: \"\",\r\n\t\t\tinputClass: \"\",\r\n\t\t\t...props.search,\r\n\t\t})\r\n\t\tprovide(EX_PAGINATION, {\r\n\t\t\tafterFetched: props.pagination?.afterFetched,\r\n\t\t\trequestKeys: {\r\n\t\t\t\tcurrentPage: \"currentPage\",\r\n\t\t\t\tpageSize: \"pageSize\",\r\n\t\t\t\t...props.pagination?.requestKeys,\r\n\t\t\t},\r\n\t\t})\r\n\r\n\t\treturn () => <div>{slots.default?.()}</div>\r\n\t},\r\n})\r\n","import { computed, defineComponent, inject, ref, watch } from \"vue\"\r\nimport { Cascader } from \"vant\"\r\nimport localData from \"./addressData.json\"\r\nimport PickerWrapper, { pickerProps, pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { cloneDeep, isArray, last } from \"lodash-es\"\r\nimport { useFindTextsFromPath } from \"../../hooks\"\r\nimport { EX_ADDRESS } from \"../provider/ExProvider.jsx\"\r\n\r\n/**\r\n * 地址组件\r\n *\r\n * 数据优先级:`dataSource` > `url` > `本地数据`\r\n *\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExAddress\",\r\n\tprops: {\r\n\t\t...defaultOptionsProps,\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [String, Number, Array], default: () => [] },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 生成哪个级别的数据\r\n\t\t * 1: 省, 2: 省市, 3: 省市区\r\n\t\t */\r\n\t\tlevel: { type: Number, default: 3 },\r\n\r\n\t\t/**\r\n\t\t * 显示值的类型\r\n\t\t * 空值或all: 所有, last:最后\r\n\t\t */\r\n\t\tdisplayTextType: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否把选项的值返回到modelValue\r\n\t\t */\r\n\t\ttextInValue: { type: Boolean, default: false },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots, expose }) {\r\n\t\tconst addressProvider = inject(EX_ADDRESS, () => ({}))\r\n\t\tconst defaultAddressUrl = addressProvider.addressUrl || \"\"\r\n\t\tconst defaultDisplayTextType = addressProvider.displayTextType || \"\"\r\n\t\tconst defaultAfterFetched = addressProvider.afterFetched || \"\"\r\n\t\tconst optionKeys = addressProvider.optionKeys || {}\r\n\r\n\t\tconst { text: textKey, value: valueKey, children: childrenKey } = optionKeys\r\n\r\n\t\tconst componentValue = ref(\"\")\r\n\r\n\t\tconst setModelValue = () => {\r\n\t\t\tlet value = isArray(props.modelValue) ? last(props.modelValue) : props.modelValue\r\n\t\t\tif (props.textInValue && value) {\r\n\t\t\t\tvalue = value[valueKey]\r\n\t\t\t}\r\n\t\t\tcomponentValue.value = value\r\n\t\t}\r\n\t\tsetModelValue()\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => setModelValue(),\r\n\t\t)\r\n\r\n\t\tconst pickerRef = ref(null)\r\n\t\tconst options = ref([])\r\n\r\n\t\tconst displayText = computed(() => {\r\n\t\t\tif (props.modelValue.length === 0) {\r\n\t\t\t\treturn \"\"\r\n\t\t\t}\r\n\t\t\tconst displayTextType = props.displayTextType || defaultDisplayTextType\r\n\r\n\t\t\t//textInValue状态下的初始值\r\n\t\t\tif (props.textInValue && props.modelValue && props.modelValue.length === 1) {\r\n\t\t\t\treturn last(props.modelValue)[textKey]\r\n\t\t\t}\r\n\r\n\t\t\t//反向赋值\r\n\t\t\tconst mValue = props.textInValue ? props.modelValue.map((item) => item[valueKey]) : props.modelValue\r\n\t\t\tconst optionsTexts = useFindTextsFromPath(options.value, mValue, {\r\n\t\t\t\tvalue: valueKey,\r\n\t\t\t\tchildren: childrenKey,\r\n\t\t\t\tlabel: textKey,\r\n\t\t\t})\r\n\r\n\t\t\treturn displayTextType === \"last\" ? last(optionsTexts) : optionsTexts.join(\"/\")\r\n\t\t})\r\n\r\n\t\t//把默认值赋值给props\r\n\t\tconst cloneProps = cloneDeep(props)\r\n\t\tif (!cloneProps.url && defaultAddressUrl) {\r\n\t\t\tcloneProps.url = defaultAddressUrl\r\n\t\t}\r\n\t\tif (!cloneProps.afterFetched && defaultAfterFetched) {\r\n\t\t\tcloneProps.afterFetched = defaultAfterFetched\r\n\t\t}\r\n\t\t//先处理好 options\r\n\t\tconst dealOptions = () => {\r\n\t\t\tuseOptionTrait(options, cloneProps, localData)\r\n\t\t}\r\n\t\tdealOptions()\r\n\r\n\t\twatch(\r\n\t\t\t() => props.options,\r\n\t\t\t() => {\r\n\t\t\t\tdealOptions()\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst onFinish = ({ selectedOptions }) => {\r\n\t\t\tpickerRef.value.close()\r\n\t\t\temit(\"update:modelValue\", props.textInValue ? selectedOptions : selectedOptions.map((item) => item[valueKey]))\r\n\t\t}\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\t/********** render **********/\r\n\r\n\t\treturn () => (\r\n\t\t\t<PickerWrapper ref={pickerRef} {...pickerProps(props)}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t<Cascader\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tfieldNames={{ text: textKey, value: valueKey, children: childrenKey }}\r\n\t\t\t\t\t\t\tcloseable={false}\r\n\t\t\t\t\t\t\tshowHeader={false}\r\n\t\t\t\t\t\t\toptions={options.value}\r\n\t\t\t\t\t\t\tonFinish={onFinish}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</PickerWrapper>\r\n\t\t)\r\n\t},\r\n})\r\n\r\n/**\r\n *\r\n * 根据地址编码获取完整的地址编码\r\n *\r\n * @param code\r\n * @param {number} [level] 地址级别: 1: 省, 2: 省市, 3: 省市区\r\n * @return {string[]|(string|*)[]|*[]}\r\n */\r\nexport function useAddressFullCode(code, level) {\r\n\tcode += \"\"\r\n\tif (code && code.length === 6) {\r\n\t\tif (!level) {\r\n\t\t\tif (/0000$/.test(code)) {\r\n\t\t\t\tlevel = 1\r\n\t\t\t} else if (/00$/.test(code)) {\r\n\t\t\t\tlevel = 2\r\n\t\t\t} else {\r\n\t\t\t\tlevel = 3\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (level === 1) {\r\n\t\t\treturn [`${code.substr(0, 2)}0000`]\r\n\t\t}\r\n\t\tif (level === 2) {\r\n\t\t\treturn [`${code.substr(0, 2)}0000`, `${code.substr(0, 4)}00`]\r\n\t\t}\r\n\t\tif (level === 3) {\r\n\t\t\treturn [`${code.substr(0, 2)}0000`, `${code.substr(0, 4)}00`, code]\r\n\t\t}\r\n\t}\r\n\treturn []\r\n}\r\n\r\n/**\r\n * 根据地址编码获取完整的地址名称\r\n * @param code\r\n * @param {number} [level] 地址级别: 1: 省, 2: 省市, 3: 省市区\r\n * @return {*[]}\r\n */\r\nexport function useAddressNameFormCode(code, level) {\r\n\tif (!isArray(code)) {\r\n\t\tcode = useAddressFullCode(code, level)\r\n\t}\r\n\treturn useFindTextsFromPath(localData, code, { value: \"code\", label: \"name\", children: \"children\" })\r\n}\r\n\r\nexport const addressData = localData\r\n","import { computed, defineComponent, ref, watch } from \"vue\"\r\nimport PickerWrapper, { pickerProps, pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { Button, Cascader, Search } from \"vant\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { useFindParentLabels } from \"../../hooks\"\r\nimport { cloneDeep, isArray, last } from \"lodash-es\"\r\n\r\n/**\r\n * ExCascader 级联选择\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExCascader\",\r\n\tprops: {\r\n\t\t...defaultOptionsProps,\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Array, String], default: () => [] },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否显示清除按钮\r\n\t\t */\r\n\t\tclearable: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 显示值的类型\r\n\t\t * 空值或all: 所有, last:最后\r\n\t\t */\r\n\t\tdisplayTextType: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否把选项的值返回到modelValue\r\n\t\t */\r\n\t\ttextInValue: { type: Boolean, default: false },\r\n\t},\r\n\temits: [\"update:modelValue\", \"change\"],\r\n\tsetup(props, { emit, slots, expose }) {\r\n\t\tconst componentValue = ref(\"\")\r\n\r\n\t\tconst setModelValue = () => {\r\n\t\t\tlet value = isArray(props.modelValue) ? last(props.modelValue) : props.modelValue\r\n\t\t\tif (props.textInValue && value) {\r\n\t\t\t\tvalue = value.value\r\n\t\t\t}\r\n\t\t\tcomponentValue.value = value\r\n\t\t}\r\n\t\tsetModelValue()\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => setModelValue(),\r\n\t\t)\r\n\r\n\t\tconst pickerRef = ref(null)\r\n\r\n\t\tconst options = ref([]) //整理后的原始 Options\r\n\t\tconst shownOptions = ref([]) //根据 keyword 过滤后的 Options\r\n\t\tconst keyword = ref(\"\")\r\n\r\n\t\t//先处理好 options\r\n\t\tconst dealOptions = () => {\r\n\t\t\tuseOptionTrait(options, props)\r\n\t\t\tshownOptions.value = options.value\r\n\t\t}\r\n\t\tdealOptions()\r\n\r\n\t\twatch(\r\n\t\t\t() => props.options,\r\n\t\t\t() => {\r\n\t\t\t\tdealOptions()\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\twatch(\r\n\t\t\t() => keyword.value,\r\n\t\t\t(keyword) => {\r\n\t\t\t\tcomponentValue.value = \"\"\r\n\t\t\t\tif (keyword) {\r\n\t\t\t\t\tshownOptions.value = filterByText(cloneDeep(options.value), keyword)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshownOptions.value = options.value\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst filterByText = (data, keyword) => {\r\n\t\t\t// 递归函数,用于过滤每一层级的数据\r\n\t\t\tfunction filterRecursively(items) {\r\n\t\t\t\treturn items.filter((item) => {\r\n\t\t\t\t\t// 判断是否包含关键字\r\n\t\t\t\t\tlet hasKeyword = item.text.toLowerCase().includes(keyword.toLowerCase())\r\n\t\t\t\t\tif (item.children && item.children.length) {\r\n\t\t\t\t\t\titem.children = filterRecursively(item.children)\r\n\t\t\t\t\t\tif (item.children.length) {\r\n\t\t\t\t\t\t\thasKeyword = true\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// 如果包含关键字,或者有子级包含关键字,则保留该项\r\n\t\t\t\t\treturn hasKeyword\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\t// 调用递归函数开始过滤\r\n\t\t\treturn filterRecursively(data)\r\n\t\t}\r\n\r\n\t\tconst displayText = computed(() => {\r\n\t\t\tif (!componentValue.value) {\r\n\t\t\t\treturn \"\"\r\n\t\t\t}\r\n\r\n\t\t\tconst labels = useFindParentLabels(options.value, componentValue.value, props.defaultProps?.fieldNames)\r\n\r\n\t\t\treturn labels ? (props.displayTextType === \"last\" ? last(labels) : labels.join(\"/\")) : \"\"\r\n\t\t})\r\n\r\n\t\tconst onFinish = ({ selectedOptions }) => {\r\n\t\t\tconst value = props.textInValue ? selectedOptions : selectedOptions.map((item) => item.value)\r\n\t\t\temit(\"change\", value)\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t\tpickerRef.value.close()\r\n\t\t}\r\n\r\n\t\tconst onClear = () => {\r\n\t\t\temit(\"change\", [])\r\n\t\t\temit(\"update:modelValue\", [])\r\n\t\t\tpickerRef.value.close()\r\n\t\t}\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\treturn () => (\r\n\t\t\t<PickerWrapper ref={pickerRef} {...pickerProps(props)}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t<Cascader\r\n\t\t\t\t\t\t\tclass={\"ex-cascader\"}\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tcloseable={false}\r\n\t\t\t\t\t\t\tshowHeader={true}\r\n\t\t\t\t\t\t\toptions={shownOptions.value}\r\n\t\t\t\t\t\t\tonFinish={onFinish}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\ttitle: () => {\r\n\t\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t\t<Search shape={\"round\"} placeholder={\"选项搜索\"} v-model={keyword.value} style={{ width: \"100%\" }}></Search>\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</Cascader>,\r\n\t\t\t\t\t\tprops.clearable ? (\r\n\t\t\t\t\t\t\t<div class={\"ex-field-popup__clear-btn\"}>\r\n\t\t\t\t\t\t\t\t<Button block type={\"primary\"} plain={true} round={true} onClick={onClear}>\r\n\t\t\t\t\t\t\t\t\t清除\r\n\t\t\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t) : null,\r\n\t\t\t\t\t],\r\n\t\t\t\t}}\r\n\t\t\t</PickerWrapper>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { Checkbox, CheckboxGroup } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExCheckbox 多选\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExCheckbox\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\t\t...defaultOptionsProps,\r\n\r\n\t\tmodelValue: { type: Array, default: () => [] },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst options = ref([])\r\n\r\n\t\tuseOptionTrait(options, props)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<CheckboxGroup\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tdefault: () =>\r\n\t\t\t\t\t\t\t\t\toptions.value.map((option) => <Checkbox name={option.value}>{{ default: () => option.text }}</Checkbox>),\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</CheckboxGroup>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { inBrowser } from \"./basic.mjs\";\nimport { windowWidth, windowHeight } from \"./dom.mjs\";\nimport { isDef, isNumeric } from \"./basic.mjs\";\nfunction addUnit(value) {\n if (isDef(value)) {\n return isNumeric(value) ? `${value}px` : String(value);\n }\n return void 0;\n}\nfunction getSizeStyle(originSize) {\n if (isDef(originSize)) {\n if (Array.isArray(originSize)) {\n return {\n width: addUnit(originSize[0]),\n height: addUnit(originSize[1])\n };\n }\n const size = addUnit(originSize);\n return {\n width: size,\n height: size\n };\n }\n}\nfunction getZIndexStyle(zIndex) {\n const style = {};\n if (zIndex !== void 0) {\n style.zIndex = +zIndex;\n }\n return style;\n}\nlet rootFontSize;\nfunction getRootFontSize() {\n if (!rootFontSize) {\n const doc = document.documentElement;\n const fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;\n rootFontSize = parseFloat(fontSize);\n }\n return rootFontSize;\n}\nfunction convertRem(value) {\n value = value.replace(/rem/g, \"\");\n return +value * getRootFontSize();\n}\nfunction convertVw(value) {\n value = value.replace(/vw/g, \"\");\n return +value * windowWidth.value / 100;\n}\nfunction convertVh(value) {\n value = value.replace(/vh/g, \"\");\n return +value * windowHeight.value / 100;\n}\nfunction unitToPx(value) {\n if (typeof value === \"number\") {\n return value;\n }\n if (inBrowser) {\n if (value.includes(\"rem\")) {\n return convertRem(value);\n }\n if (value.includes(\"vw\")) {\n return convertVw(value);\n }\n if (value.includes(\"vh\")) {\n return convertVh(value);\n }\n }\n return parseFloat(value);\n}\nconst camelizeRE = /-(\\w)/g;\nconst camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());\nconst kebabCase = (str) => str.replace(/([A-Z])/g, \"-$1\").toLowerCase().replace(/^-/, \"\");\nfunction padZero(num, targetLength = 2) {\n let str = num + \"\";\n while (str.length < targetLength) {\n str = \"0\" + str;\n }\n return str;\n}\nconst clamp = (num, min, max) => Math.min(Math.max(num, min), max);\nfunction trimExtraChar(value, char, regExp) {\n const index = value.indexOf(char);\n if (index === -1) {\n return value;\n }\n if (char === \"-\" && index !== 0) {\n return value.slice(0, index);\n }\n return value.slice(0, index + 1) + value.slice(index).replace(regExp, \"\");\n}\nfunction formatNumber(value, allowDot = true, allowMinus = true) {\n if (allowDot) {\n value = trimExtraChar(value, \".\", /\\./g);\n } else {\n value = value.split(\".\")[0];\n }\n if (allowMinus) {\n value = trimExtraChar(value, \"-\", /-/g);\n } else {\n value = value.replace(/-/, \"\");\n }\n const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;\n return value.replace(regExp, \"\");\n}\nfunction addNumber(num1, num2) {\n const cardinal = 10 ** 10;\n return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nexport {\n addNumber,\n addUnit,\n camelize,\n clamp,\n formatNumber,\n getSizeStyle,\n getZIndexStyle,\n kebabCase,\n padZero,\n unitToPx\n};\n","import { computed, defineComponent, ref, watch } from \"vue\"\r\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { DatePicker } from \"vant\"\r\nimport { padZero } from \"vant/es/utils\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { isUndefined } from \"lodash-es\"\r\nimport { isDayjs } from \"dayjs\"\r\n\r\n/**\r\n * ExDate 日期选择\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExDate\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Date, String, Object], default: () => null },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"选择日期\" },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots, expose }) {\r\n\t\tconst columnsType = props.defaultProps?.columnsType || [\"year\", \"month\", \"day\"]\r\n\r\n\t\tconst getYear = (value) => {\r\n\t\t\treturn isDayjs(value) ? value.year() : value.getFullYear()\r\n\t\t}\r\n\t\tconst getMonth = (value) => {\r\n\t\t\treturn isDayjs(value) ? value.month() + 1 : value.getMonth() + 1\r\n\t\t}\r\n\t\tconst getDate = (value) => {\r\n\t\t\treturn isDayjs(value) ? value.date() : value.getDate()\r\n\t\t}\r\n\r\n\t\tconst _setValueByColumns = (columnsType, value, date) => {\r\n\t\t\tcolumnsType.forEach((column) => {\r\n\t\t\t\tif (column === \"year\") {\r\n\t\t\t\t\tvalue.push(getYear(date))\r\n\t\t\t\t} else if (column === \"month\") {\r\n\t\t\t\t\tvalue.push(getMonth(date))\r\n\t\t\t\t} else if (column === \"day\") {\r\n\t\t\t\t\tvalue.push(getDate(date))\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn value\r\n\t\t}\r\n\t\tconst prepareDate = (date) => {\r\n\t\t\tconst value = []\r\n\r\n\t\t\tif (!date) {\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\r\n\t\t\treturn _setValueByColumns(columnsType, value, date)\r\n\t\t}\r\n\r\n\t\tlet defaultValue = prepareDate(props.modelValue)\r\n\r\n\t\tif (!defaultValue.length) {\r\n\t\t\tconst now = new Date()\r\n\t\t\tdefaultValue = _setValueByColumns(columnsType, defaultValue, now)\r\n\t\t}\r\n\r\n\t\tconst componentValue = ref(defaultValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => {\r\n\t\t\t\tcomponentValue.value = prepareDate(props.modelValue)\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst pickerRef = ref(null)\r\n\r\n\t\tconst displayText = computed(() => {\r\n\t\t\tif (props.modelValue) {\r\n\t\t\t\tlet text = \"\"\r\n\t\t\t\tcolumnsType.forEach((column) => {\r\n\t\t\t\t\tif (column === \"year\") {\r\n\t\t\t\t\t\ttext += getYear(props.modelValue)\r\n\t\t\t\t\t} else if (column === \"month\") {\r\n\t\t\t\t\t\tif (text) {\r\n\t\t\t\t\t\t\ttext += \"/\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttext += padZero(getMonth(props.modelValue), 2)\r\n\t\t\t\t\t} else if (column === \"day\") {\r\n\t\t\t\t\t\tif (text) {\r\n\t\t\t\t\t\t\ttext += \"/\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttext += padZero(getDate(props.modelValue), 2)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\treturn text\r\n\t\t\t}\r\n\r\n\t\t\treturn \"\"\r\n\t\t})\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\tconst onConfirm = ({ selectedValues }) => {\r\n\t\t\tpickerRef.value.close()\r\n\r\n\t\t\tconst now = new Date()\r\n\t\t\tlet date = {}\r\n\t\t\tcolumnsType.forEach((column, index) => {\r\n\t\t\t\tif (column === \"year\") {\r\n\t\t\t\t\tdate.year = selectedValues[index]\r\n\t\t\t\t} else if (column === \"month\") {\r\n\t\t\t\t\tdate.month = selectedValues[index] - 1\r\n\t\t\t\t} else if (column === \"day\") {\r\n\t\t\t\t\tdate.date = selectedValues[index]\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\t\t\temit(\r\n\t\t\t\t\"update:modelValue\",\r\n\t\t\t\tnew Date(date.year || now.getFullYear(), isUndefined(date.month) ? now.getMonth() : date.month, date.date || now.getDate()),\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} disabled={props.disabled || props.readonly}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t<DatePicker\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tonConfirm={onConfirm}\r\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\r\n\t\t\t\t\t\t\ttitle={props.title}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</PickerWrapper>\r\n\t\t)\r\n\t},\r\n})\r\n","import PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { ref, defineComponent, computed, watch } from \"vue\"\r\nimport { Calendar, Collapse, CollapseItem, TimePicker } from \"vant\"\r\nimport ExButton from \"../button/ExButton.jsx\"\r\nimport { padZero } from \"vant/es/utils\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { cloneDeep } from \"lodash-es\"\r\n\r\n/**\r\n * ExDatetime 日期时间选择器\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExDatetime\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: Date, default: () => null },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { slots, emit, expose }) {\r\n\t\tconst dateValue = ref(null)\r\n\t\tconst timeValue = ref(null)\r\n\t\tconst displayText = ref(null)\r\n\t\tconst pickerRef = ref()\r\n\r\n\t\tconst activeName = ref(\"date\")\r\n\r\n\t\tconst minDate = new Date(2010, 0, 1)\r\n\t\tconst maxDate = new Date(2045, 11, 31)\r\n\r\n\t\tconst weekdays = [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\r\n\t\tconst dateText = computed(() => {\r\n\t\t\tif (dateValue.value) {\r\n\t\t\t\treturn `${dateValue.value.getFullYear()}/${dateValue.value.getMonth() + 1}/${dateValue.value.getDate()} 星期${\r\n\t\t\t\t\tweekdays[dateValue.value.getDay()]\r\n\t\t\t\t}`\r\n\t\t\t}\r\n\t\t\treturn \"请选择日期\"\r\n\t\t})\r\n\t\tconst timeText = computed(() => {\r\n\t\t\tif (timeValue.value) {\r\n\t\t\t\treturn timeValue.value\r\n\t\t\t}\r\n\t\t\treturn \"请选择时间\"\r\n\t\t})\r\n\t\tconst timeModel = computed(() => {\r\n\t\t\tif (timeValue.value) {\r\n\t\t\t\tconst [hours, minutes] = timeValue.value.split(\":\")\r\n\t\t\t\treturn [hours, minutes]\r\n\t\t\t}\r\n\t\t\treturn []\r\n\t\t})\r\n\r\n\t\tconst defaultDate = ref(props.modelValue || new Date())\r\n\r\n\t\tconst setDisplayText = () => {\r\n\t\t\tdisplayText.value = dateValue.value && timeValue.value ? `${dateText.value} ${timeText.value}` : \"\"\r\n\t\t}\r\n\t\t/**\r\n\t\t *\r\n\t\t * @param {Date|null} date\r\n\t\t */\r\n\t\tconst prepareDate = (date) => {\r\n\t\t\tif (date) {\r\n\t\t\t\tdateValue.value = cloneDeep(date)\r\n\t\t\t\ttimeValue.value = `${padZero(date.getHours(), 2)}:${padZero(date.getMinutes(), 2)}`\r\n\t\t\t}\r\n\t\t\tsetDisplayText()\r\n\t\t}\r\n\r\n\t\tprepareDate(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => prepareDate(props.modelValue),\r\n\t\t)\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\tconst onSelectDate = (date) => {\r\n\t\t\tdateValue.value = date\r\n\t\t}\r\n\r\n\t\tconst onTimeChange = ({ selectedValues }) => {\r\n\t\t\ttimeValue.value = selectedValues.join(\":\")\r\n\t\t}\r\n\r\n\t\tconst onConfirm = () => {\r\n\t\t\tif (!dateValue.value) {\r\n\t\t\t\tdateValue.value = new Date()\r\n\t\t\t}\r\n\t\t\tlet dateString = `${dateValue.value.getFullYear()}/${dateValue.value.getMonth() + 1}/${dateValue.value.getDate()}`\r\n\r\n\t\t\tif (!timeValue.value) {\r\n\t\t\t\tdateString += ` 00:00:00`\r\n\t\t\t} else {\r\n\t\t\t\tdateString += ` ${timeValue.value}`\r\n\t\t\t}\r\n\r\n\t\t\tpickerRef.value.close()\r\n\t\t\tsetDisplayText()\r\n\r\n\t\t\temit(\"update:modelValue\", new Date(dateString))\r\n\t\t}\r\n\r\n\t\treturn () => {\r\n\t\t\treturn (\r\n\t\t\t\t<PickerWrapper ref={pickerRef} inset={true} disabled={props.disabled || props.readonly}>\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t\t<Collapse accordion={true} v-model={activeName.value} border={false} class={\"ex-datetime_collapse\"}>\r\n\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t\t\t\t\t<CollapseItem name={\"date\"} icon={\"calendar-o\"} value={dateText.value} isLink={false}>\r\n\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: () => <span style={{ fontWeight: \"bold\" }}>日期</span>,\r\n\t\t\t\t\t\t\t\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div style={{ height: \"300px\" }}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Calendar\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tminDate={minDate}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaxDate={maxDate}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowSubtitle={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowConfirm={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultDate={defaultDate.value}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoppable={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowTitle={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlazyRender={true}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trowHeight={36}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={onSelectDate}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...props.defaultProps.calendarProps}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Calendar>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t</CollapseItem>,\r\n\t\t\t\t\t\t\t\t\t\t<CollapseItem name={\"time\"} icon={\"clock-o\"} isLink={false} value={timeText.value}>\r\n\t\t\t\t\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: () => <span style={{ fontWeight: \"bold\" }}>时间</span>,\r\n\t\t\t\t\t\t\t\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TimePicker\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodelValue={timeModel.value}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowToolbar={false}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={onTimeChange}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...props.defaultProps.timeProps}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t></TimePicker>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t</CollapseItem>,\r\n\t\t\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t</Collapse>,\r\n\t\t\t\t\t\t\t<ExButton type={\"primary\"} style={{ margin: \"20px 0\" }} onClick={onConfirm}>\r\n\t\t\t\t\t\t\t\t确定\r\n\t\t\t\t\t\t\t</ExButton>,\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t}}\r\n\t\t\t\t</PickerWrapper>\r\n\t\t\t)\r\n\t\t}\r\n\t},\r\n})\r\n","import { computed, defineComponent, ref, watch } from \"vue\"\r\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { TimePicker } from \"vant\"\r\nimport { defaultFieldProps } from \"../utils\"\r\n\r\n/**\r\n * ExTime 日期选择\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExTime\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"选择时间\" },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots, expose }) {\r\n\t\tconst columnsType = props.defaultProps?.columnsType || [\"hour\", \"minute\"]\r\n\t\tconst prepareDate = (time) => {\r\n\t\t\tconst value = []\r\n\r\n\t\t\tif (time) {\r\n\t\t\t\ttime = time.split(\":\")\r\n\t\t\t} else {\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\r\n\t\t\tcolumnsType.forEach((column, index) => {\r\n\t\t\t\tvalue.push(time[index])\r\n\t\t\t})\r\n\r\n\t\t\treturn value\r\n\t\t}\r\n\r\n\t\tconst defaultValue = prepareDate(props.modelValue)\r\n\r\n\t\tconst componentValue = ref(defaultValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => {\r\n\t\t\t\tcomponentValue.value = prepareDate(props.modelValue)\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst pickerRef = ref(null)\r\n\r\n\t\tconst displayText = computed(() => {\r\n\t\t\tif (props.modelValue) {\r\n\t\t\t\tlet text = \"\"\r\n\t\t\t\tcolumnsType.forEach((column, index) => {\r\n\t\t\t\t\tlet times = prepareDate(props.modelValue)\r\n\r\n\t\t\t\t\tif (column === \"hour\") {\r\n\t\t\t\t\t\ttext += `${times[index]}`\r\n\t\t\t\t\t} else if (column === \"minute\") {\r\n\t\t\t\t\t\ttext += `:${times[index]}`\r\n\t\t\t\t\t} else if (column === \"second\") {\r\n\t\t\t\t\t\ttext += `:${times[index]}`\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\r\n\t\t\t\treturn text\r\n\t\t\t}\r\n\r\n\t\t\treturn \"\"\r\n\t\t})\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\tconst onConfirm = ({ selectedValues }) => {\r\n\t\t\tpickerRef.value.close()\r\n\t\t\temit(\"update:modelValue\", selectedValues.join(\":\"))\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} disabled={props.disabled || props.readonly}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t<TimePicker\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tonConfirm={onConfirm}\r\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\r\n\t\t\t\t\t\t\ttitle={props.title}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</PickerWrapper>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { Stepper } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExNumber 数字\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExNumber\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Number, String], default: null },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", Number(value))\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<Stepper\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\r\n\t\t\t\t\t\t\ttheme={\"round\"}\r\n\t\t\t\t\t\t\tbuttonSize={22}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t></Stepper>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { Radio, RadioGroup } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExRadio 单选\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExRadio\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\t\t...defaultOptionsProps,\r\n\r\n\t\tmodelValue: { type: [Number, String], default: \"\" },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst options = ref([])\r\n\r\n\t\tuseOptionTrait(options, props)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<RadioGroup\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tdefault: () => options.value.map((option) => <Radio name={option.value}>{{ default: () => option.text }}</Radio>),\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</RadioGroup>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { computed, defineComponent, ref, watch } from \"vue\"\r\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\r\nimport { Button, Form, Picker, Search } from \"vant\"\r\nimport { defaultFieldProps, defaultOptionsProps } from \"../utils\"\r\nimport { useFetch } from \"../../hooks\"\r\nimport { cloneDeep, find, isArray, isFunction, isNumber, isString } from \"lodash-es\"\r\n\r\n/**\r\n * ExSelect 下拉选择\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSelect\",\r\n\tprops: {\r\n\t\t...defaultOptionsProps,\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Array, String, Number, Object], default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否显示清除按钮\r\n\t\t */\r\n\t\tclearable: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否把选项的值返回到modelValue\r\n\t\t */\r\n\t\ttextInValue: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否可以搜索\r\n\t\t */\r\n\t\tfilterable: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 搜索链接\r\n\t\t */\r\n\t\tfilterUrl: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 自定义渲染选项\r\n\t\t */\r\n\t\toptionRender: { type: Function, default: null },\r\n\t},\r\n\temits: [\"update:modelValue\", \"change\"],\r\n\tsetup(props, { emit, slots, expose }) {\r\n\t\tconst componentValue = ref([])\r\n\t\tconst options = ref([])\r\n\t\tconst recordOptions = ref([]) // 缓存 options\r\n\t\tlet columns = 1 //根据子项的数组数来确定 Picker 的列数,默认为1列\r\n\t\tconst pickerRef = ref()\r\n\t\tconst keyword = ref(\"\")\r\n\t\tconst fetcher = ref({ loading: false })\r\n\r\n\t\tconst setModelValue = () => {\r\n\t\t\tlet value = isArray(props.modelValue) ? props.modelValue : [props.modelValue]\r\n\t\t\tif (props.textInValue && value.length) {\r\n\t\t\t\tvalue = value.map((item) => item.value)\r\n\t\t\t}\r\n\t\t\tcomponentValue.value = value\r\n\t\t}\r\n\t\tsetModelValue()\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => setModelValue(),\r\n\t\t)\r\n\r\n\t\tconst displayText = computed(() => {\r\n\t\t\tif (!props.modelValue || (isArray(props.modelValue) && !props.modelValue.length)) {\r\n\t\t\t\treturn \"\"\r\n\t\t\t}\r\n\t\t\tlet modelValue = isArray(props.modelValue) ? props.modelValue : [props.modelValue]\r\n\t\t\treturn modelValue\r\n\t\t\t\t.map((value, index) => {\r\n\t\t\t\t\tif (props.textInValue) {\r\n\t\t\t\t\t\tvalue = value.value\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (columns === 1) {\r\n\t\t\t\t\t\treturn find(options.value, { value })?.text\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn find(options.value[index], { value })?.text\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t?.join(\"/\")\r\n\t\t})\r\n\r\n\t\tconst fetchData = () =>\r\n\t\t\tnew Promise((resolve) => {\r\n\t\t\t\tuseFetch()\r\n\t\t\t\t\t.get(props.url)\r\n\t\t\t\t\t.then((items) => {\r\n\t\t\t\t\t\tif (props.afterFetched) {\r\n\t\t\t\t\t\t\titems = props.afterFetched(items)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tresolve(items)\r\n\t\t\t\t\t})\r\n\t\t\t})\r\n\r\n\t\tconst prepareOptions = async (options) => {\r\n\t\t\toptions = isFunction(options) ? options() : options\r\n\t\t\tif (options && options.length) {\r\n\t\t\t\tcolumns = options.filter((option) => isArray(option)).length || 1\r\n\t\t\t} else if (props.url) {\r\n\t\t\t\toptions = await fetchData()\r\n\t\t\t}\r\n\r\n\t\t\toptions = options.map((option) => {\r\n\t\t\t\tif (isArray(option)) {\r\n\t\t\t\t\treturn option.map((op) => {\r\n\t\t\t\t\t\treturn isString(op) || isNumber(op) ? { value: op, label: op, text: op } : { text: op.label, ...op }\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn isString(option) ? { value: option, label: option, text: option } : { text: option.label, ...option }\r\n\t\t\t})\r\n\r\n\t\t\trecordOptions.value = cloneDeep(options)\r\n\r\n\t\t\treturn options\r\n\t\t}\r\n\r\n\t\tprepareOptions(props.options).then((opts) => {\r\n\t\t\toptions.value = opts\r\n\t\t})\r\n\r\n\t\twatch(\r\n\t\t\t() => props.options,\r\n\t\t\t() => prepareOptions(props.options).then((opts) => (options.value = opts)),\r\n\t\t)\r\n\r\n\t\tconst filterOnlineDataByKeyword = async () => {\r\n\t\t\tlet res = await useFetch(fetcher.value).get(props.filterUrl, { params: { keyword: keyword.value } })\r\n\t\t\tif (props.afterFetched) {\r\n\t\t\t\tres = props.afterFetched(res)\r\n\t\t\t}\r\n\t\t\tprepareOptions(res).then((opts) => (options.value = opts))\r\n\t\t}\r\n\r\n\t\tconst filterLocalDataByKeyword = () => {\r\n\t\t\toptions.value = recordOptions.value.filter((item) => item.text.includes(keyword.value))\r\n\t\t}\r\n\r\n\t\t// @hack\r\n\t\t// 由于在 Picker 清除 model value 后再次打开 Picker 在不重新选择新选项的情况下无法选中之前的选项\r\n\t\t// 所以这里手动重新赋一次值给 model value\r\n\t\tconst onOpenWrapper = () => {\r\n\t\t\tif (columns === 1 && !componentValue.value?.[0]) {\r\n\t\t\t\tcomponentValue.value = [options.value[0]?.value]\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst onConfirm = ({ selectedOptions }) => {\r\n\t\t\tlet value = props.textInValue ? selectedOptions : selectedOptions.map((item) => item.value)\r\n\t\t\tvalue = columns === 1 ? value[0] : value\r\n\t\t\temit(\"change\", value)\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t\tpickerRef.value.close()\r\n\t\t}\r\n\r\n\t\tconst onSearch = () => {\r\n\t\t\tif (keyword.value) {\r\n\t\t\t\tif (props.filterUrl) {\r\n\t\t\t\t\tfilterOnlineDataByKeyword()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfilterLocalDataByKeyword()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (props.filterUrl) {\r\n\t\t\t\t\tfilterOnlineDataByKeyword()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfilterLocalDataByKeyword()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst onSearchClear = () => {\r\n\t\t\tif (props.filterUrl) {\r\n\t\t\t\tfilterOnlineDataByKeyword()\r\n\t\t\t} else {\r\n\t\t\t\tfilterLocalDataByKeyword()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst onClear = () => {\r\n\t\t\tconst value = columns === 1 ? null : []\r\n\t\t\temit(\"change\", value)\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t\tpickerRef.value.close()\r\n\t\t}\r\n\r\n\t\texpose({ displayText })\r\n\r\n\t\t/********** render **********/\r\n\r\n\t\tconst pickerSlotElem = () => {\r\n\t\t\tconst elem = {}\r\n\t\t\tif (props.filterable) {\r\n\t\t\t\telem[\"columns-top\"] = () => (\r\n\t\t\t\t\t<Form action=\"/\">\r\n\t\t\t\t\t\t<Search\r\n\t\t\t\t\t\t\tshape={\"round\"}\r\n\t\t\t\t\t\t\tplaceholder={\"搜索\"}\r\n\t\t\t\t\t\t\tv-model={keyword.value}\r\n\t\t\t\t\t\t\tonSearch={onSearch}\r\n\t\t\t\t\t\t\tonUpdate:modelValue={onSearch}\r\n\t\t\t\t\t\t\tonClear={onSearchClear}\r\n\t\t\t\t\t\t\tstyle={{ width: \"100%\" }}\r\n\t\t\t\t\t\t></Search>\r\n\t\t\t\t\t</Form>\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t\tif (props.optionRender) {\r\n\t\t\t\telem[\"option\"] = (option, index) => props.optionRender(option, index)\r\n\t\t\t}\r\n\t\t\treturn elem\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} onOpen={onOpenWrapper} disabled={props.readonly || props.disabled}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...pickerSlots(slots, props),\r\n\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t<Picker\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tcolumns={options.value}\r\n\t\t\t\t\t\t\tonConfirm={onConfirm}\r\n\t\t\t\t\t\t\tloading={fetcher.value.loading}\r\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{pickerSlotElem()}\r\n\t\t\t\t\t\t</Picker>,\r\n\t\t\t\t\t\tprops.clearable ? (\r\n\t\t\t\t\t\t\t<div class={\"ex-field-popup__clear-btn\"}>\r\n\t\t\t\t\t\t\t\t<Button block type={\"primary\"} plain={true} round={true} onClick={onClear}>\r\n\t\t\t\t\t\t\t\t\t清除\r\n\t\t\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t) : null,\r\n\t\t\t\t\t],\r\n\t\t\t\t}}\r\n\t\t\t</PickerWrapper>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { Switch } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExSwitch 开关\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSwitch\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: Boolean, default: false },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", Boolean(value))\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<Switch\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\ttheme={\"round\"}\r\n\t\t\t\t\t\t\tsize={\"22px\"}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t></Switch>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { Rate } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExRate 评分\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExRate\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: Number, default: null },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", Number(value))\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<Rate\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\treadonly={props.readonly}\r\n\t\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\t\tclearable={true}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t></Rate>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport { Slider } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExSlider 评分\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSlider\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Number, Array], default: 2 },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<Slider\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\treadonly={props.readonly}\r\n\t\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\t\tclearable={true}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tbutton: () => <div class=\"ex-slider-button\">{componentValue.value}</div>,\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</Slider>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { computed, defineComponent, inject, onMounted, reactive, watch } from \"vue\"\r\nimport { Button, showToast, Uploader } from \"vant\"\r\nimport { findIndex, isArray, isEqual, isFunction, map, pick, random } from \"lodash-es\"\r\nimport { STATUS, useFetch } from \"../../hooks\"\r\nimport { EX_UPLOADER } from \"../provider/ExProvider.jsx\"\r\n\r\n/**\r\n * ExUploader 文件上传\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExUploader\",\r\n\tprops: {\r\n\t\tmodelValue: { type: [Object, Array], default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 上传文件字段名\r\n\t\t */\r\n\t\tname: { type: String, default: \"file\" },\r\n\r\n\t\t/**\r\n\t\t * 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)\r\n\t\t */\r\n\t\taccept: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 设置上传的请求头部,IE10 以上有效\r\n\t\t */\r\n\t\theaders: { type: Object, default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 上传列表的基本样式 text, picture\r\n\t\t *\r\n\t\t * @values text, picture\r\n\t\t */\r\n\t\ttype: { type: String, default: \"picture\" },\r\n\r\n\t\t/**\r\n\t\t * 是否禁用\r\n\t\t */\r\n\t\tdisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否只读\r\n\t\t */\r\n\t\treadonly: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 单个文件大小上限,单位为 MB\r\n\t\t */\r\n\t\tmaxSize: { type: Number, default: 10 },\r\n\r\n\t\t/**\r\n\t\t * 上传文件个数上限\r\n\t\t */\r\n\t\tmaxNum: { type: Number, default: 1 },\r\n\r\n\t\t/**\r\n\t\t * 是否支持多选文件\r\n\t\t */\r\n\t\tmultiple: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 上传文件的服务器地址\r\n\t\t */\r\n\t\taction: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 上传后的数据处理回调\r\n\t\t */\r\n\t\tafterUpload: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t * 上传时的附加参数\r\n\t\t */\r\n\t\textraData: { type: Object, default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 上传按钮文本\r\n\t\t */\r\n\t\tuploadText: { type: String, default: \"上传\" },\r\n\r\n\t\t/**\r\n\t\t * 上传区域图标名称或图片链接,等同于 Icon 组件的 name 属性\r\n\t\t */\r\n\t\tuploadIcon: { type: String, default: \"photograph\" },\r\n\r\n\t\t/**\r\n\t\t * 上传盘符标志,可以灵活配合后台使用\r\n\t\t */\r\n\t\tdisk: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/uploader)\r\n\t\t */\r\n\t\tuploaderProps: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: () => ({}),\r\n\t\t},\r\n\t},\r\n\temits: [\"update:modelValue\", \"success\", \"change\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\r\n\t\tconst defaultUploadUrl = uploaderProvider.uploadUrl || \"\"\r\n\t\tconst defaultFileItem = uploaderProvider.defaultFileItem || {}\r\n\r\n\t\tconst { url: urlKey, path: pathKey, name: nameKey } = defaultFileItem\r\n\r\n\t\tconst state = reactive({\r\n\t\t\tfileList: [],\r\n\t\t})\r\n\r\n\t\tconst maxSize = computed(() => props.maxSize * 1024 * 1024)\r\n\r\n\t\tconst isImage = computed(() => props.type === \"picture\")\r\n\r\n\t\tconst isSingle = computed(() => props.maxNum === 1)\r\n\r\n\t\tconst processFileList = (fileList) => {\r\n\t\t\tif (!fileList) {\r\n\t\t\t\treturn []\r\n\t\t\t}\r\n\t\t\tfileList = isArray(fileList) ? fileList : [fileList]\r\n\r\n\t\t\tfileList = fileList.filter((item) => item.status === \"done\" || !!item[nameKey] || !!item[pathKey])\r\n\t\t\tfileList = fileList.map((item) => ({\r\n\t\t\t\t...pick(item, Object.values(defaultFileItem)),\r\n\t\t\t\t_type: \"file\",\r\n\t\t\t\t_disk: props.disk,\r\n\t\t\t}))\r\n\t\t\tif (isSingle.value) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\tfileList[0] || {\r\n\t\t\t\t\t\t[pathKey]: \"\",\r\n\t\t\t\t\t\t[urlKey]: \"\",\r\n\t\t\t\t\t\t_type: \"file\",\r\n\t\t\t\t\t}\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst submitFile = () => {\r\n\t\t\tconst fileList = processFileList(state.fileList)\r\n\t\t\temit(\"update:modelValue\", fileList)\r\n\t\t\temit(\"change\", fileList)\r\n\t\t}\r\n\r\n\t\tconst prepareFileList = (fileList) => {\r\n\t\t\tif (!fileList) {\r\n\t\t\t\treturn []\r\n\t\t\t}\r\n\r\n\t\t\tfileList = isArray(fileList) ? fileList : [fileList]\r\n\r\n\t\t\tstate.fileList = fileList\r\n\t\t\t\t.filter((item) => item[urlKey] || item[pathKey])\r\n\t\t\t\t.map((item) => ({\r\n\t\t\t\t\tuid: random(1, 10000000),\r\n\t\t\t\t\turl: item[urlKey],\r\n\t\t\t\t\tstatus: \"done\",\r\n\t\t\t\t\tisImage: isImage.value,\r\n\t\t\t\t\t_type: \"file\",\r\n\t\t\t\t\t...item,\r\n\t\t\t\t}))\r\n\r\n\t\t\t//由于初始值可能不符合文件结构,处理后再次触发更新\r\n\t\t\temit(\"update:modelValue\", processFileList(state.fileList))\r\n\t\t}\r\n\r\n\t\tonMounted(() => prepareFileList(props.modelValue))\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t(fileList) => {\r\n\t\t\t\tif (fileList && !isArray(fileList)) {\r\n\t\t\t\t\tfileList = [fileList]\r\n\t\t\t\t}\r\n\t\t\t\tfileList = fileList.filter((item) => item[urlKey] || item[pathKey])\r\n\t\t\t\tif (!isEqual(map(fileList, pathKey).sort(), map(state.fileList, pathKey).sort())) {\r\n\t\t\t\t\tprepareFileList(fileList)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst onOversize = () => {\r\n\t\t\tshowToast(`文件大小不能超过 ${props.maxSize}mb`)\r\n\t\t}\r\n\r\n\t\tconst onSuccess = (file, result) => {\r\n\t\t\tfile.status = \"done\"\r\n\t\t\tfile.message = \"上传成功\"\r\n\t\t\tfile = { ...file, ...pick(result, Object.values(defaultFileItem)) }\r\n\t\t\tfile.url = file[urlKey]\r\n\r\n\t\t\tconst fileIndex = findIndex(state.fileList, { uid: file.uid })\r\n\r\n\t\t\tstate.fileList[fileIndex] = file\r\n\r\n\t\t\tsubmitFile()\r\n\r\n\t\t\temit(\"success\", { file, response: result })\r\n\t\t}\r\n\r\n\t\tconst onError = (file, result) => {\r\n\t\t\tfile.status = \"failed\"\r\n\t\t\tfile.message = result || \"上传失败\"\r\n\t\t}\r\n\r\n\t\tconst onDelete = () => {\r\n\t\t\tsubmitFile()\r\n\t\t}\r\n\r\n\t\tconst onSubmit = async (files) => {\r\n\t\t\tif (!isArray(files)) {\r\n\t\t\t\tfiles = [files]\r\n\t\t\t}\r\n\r\n\t\t\tfor (let file of files) {\r\n\t\t\t\tfile.uid = random(1, 10000000)\r\n\t\t\t\tfile.status = \"uploading\"\r\n\t\t\t\tfile.message = \"上传中...\"\r\n\r\n\t\t\t\tconst formData = new FormData()\r\n\t\t\t\tObject.keys(props.extraData).forEach((key) => {\r\n\t\t\t\t\tformData.append(key, props.extraData[key])\r\n\t\t\t\t})\r\n\r\n\t\t\t\tif (props.disk) {\r\n\t\t\t\t\tformData.append(\"_disk\", props.disk)\r\n\t\t\t\t}\r\n\r\n\t\t\t\tformData.append(props.name, file.file)\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlet res = await useFetch().post(props.action || defaultUploadUrl, formData, {\r\n\t\t\t\t\t\twithCredentials: true,\r\n\t\t\t\t\t\theaders: props.headers,\r\n\t\t\t\t\t})\r\n\r\n\t\t\t\t\tlet result = res.result\r\n\r\n\t\t\t\t\tif (res.status !== STATUS.STATE_CODE_SUCCESS) {\r\n\t\t\t\t\t\tonError(file, result)\r\n\t\t\t\t\t\treturn\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (props.afterUpload && isFunction(props.afterUpload)) {\r\n\t\t\t\t\t\tresult = props.afterUpload(res)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tonSuccess(file, result)\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tonError(file)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst customSlot = () => {\r\n\t\t\tif (!isImage.value) {\r\n\t\t\t\tslots.default = () => (\r\n\t\t\t\t\t<Button icon=\"plus\" type=\"primary\" size={\"small\"}>\r\n\t\t\t\t\t\t{props.uploadText}\r\n\t\t\t\t\t</Button>\r\n\t\t\t\t)\r\n\t\t\t}\r\n\t\t\treturn slots\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<div class={\"ex-uploader\"}>\r\n\t\t\t\t<Uploader\r\n\t\t\t\t\tv-model={state.fileList}\r\n\t\t\t\t\tmaxCount={props.maxNum}\r\n\t\t\t\t\tmaxSize={maxSize.value}\r\n\t\t\t\t\taccetp={props.accept}\r\n\t\t\t\t\tuploadText={props.uploadText}\r\n\t\t\t\t\tuploadIcon={props.uploadIcon}\r\n\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\treadonly={props.readonly}\r\n\t\t\t\t\tdeletable={!(props.readonly || props.disabled)}\r\n\t\t\t\t\tshowUpload={!props.readonly && !props.disabled}\r\n\t\t\t\t\tafterRead={onSubmit}\r\n\t\t\t\t\tonOversize={onOversize}\r\n\t\t\t\t\tonDelete={onDelete}\r\n\t\t\t\t\tmultiple={props.multiple}\r\n\t\t\t\t\t{...props.uploaderProps}\r\n\t\t\t\t>\r\n\t\t\t\t\t{customSlot()}\r\n\t\t\t\t</Uploader>\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps } from \"../utils\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { pick } from \"lodash-es\"\r\nimport ExUploader from \"../uploader/ExUploader.jsx\"\r\n\r\n/**\r\n * ExFieldUploader Uploader in form\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExFieldUploader\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\r\n\t\tmodelValue: { type: [Array, Object], default: () => [] },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst onChange = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<ExUploader\r\n\t\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\t\treadonly={props.readonly}\r\n\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\tonChange={onChange}\r\n\t\t\t\t\t\t></ExUploader>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { Radio, RadioGroup } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { isFunction, pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExMatrixRadio 矩阵单选\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExMatrixRadio\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\t\t...defaultOptionsProps,\r\n\r\n\t\t/**\r\n\t\t * 行标题\r\n\t\t */\r\n\t\trows: { type: [Array, Function], default: () => [] },\r\n\t\tmodelValue: { type: Object, default: () => ({}) },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst options = ref([])\r\n\r\n\t\tuseOptionTrait(options, props)\r\n\r\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\r\n\r\n\t\tconst onChange = () => {\r\n\t\t\temit(\"update:modelValue\", componentValue.value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\r\n\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroup onChange={onChange} v-model={componentValue.value[row]}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{() => <Radio name={option.value}></Radio>}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</RadioGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { isArray, isDate, isFunction, isUndefined } from \"lodash-es\"\r\nimport { useAddressFullCode } from \"./ExAddress.jsx\"\r\nimport { isDayjs } from \"dayjs\"\r\n\r\n/**\r\n * 初始化表单项默认值\r\n * @param {FormItemConfig} item\r\n * @param {Object} existingData\r\n * @param {Object} submitForm\r\n * @param {Object} provider\r\n */\r\nconst initItemDefaultValue = (item, existingData, submitForm, provider) => {\r\n\tlet value = \"\"\r\n\r\n\tconst { uploaderProvider } = provider\r\n\r\n\tif (existingData && !isUndefined(existingData[item.key])) {\r\n\t\tvalue = existingData[item.key]\r\n\t} else if (!isUndefined(item.defaultValue)) {\r\n\t\tvalue = isFunction(item.defaultValue) ? item.defaultValue(submitForm) : item.defaultValue\r\n\t}\r\n\r\n\tif (item.init && isFunction(item.init)) {\r\n\t\tvalue = item.init({ submitForm, value, existingData })\r\n\t}\r\n\r\n\tif (item.type === \"number\" || item.type === \"rate\") {\r\n\t\tvalue = value ? Number(value) : null\r\n\t} else if (item.type === \"slider\") {\r\n\t\tvalue = item.defaultProps && item.defaultProps.range ? value || [0, 100] : value ? Number(value) : 0\r\n\t} else if (item.type === \"switch\") {\r\n\t\tvalue = value === \"true\" || value === 1 || value === \"1\" || value === true\r\n\t} else if (item.type === \"date\" || item.type === \"datetime\") {\r\n\t\tvalue = isDate(value) || isDayjs(value) ? value : null\r\n\t} else if (item.type === \"checkbox\" || item.type === \"group\" || item.type === \"cascade\") {\r\n\t\tvalue = value || []\r\n\t} else if (item.type === \"address\") {\r\n\t\tvalue = value || []\r\n\t\tif (!isArray(value)) {\r\n\t\t\tvalue = useAddressFullCode(value)\r\n\t\t}\r\n\t} else if (item.type === \"uploader\") {\r\n\t\tif (item.defaultProps && item.defaultProps.maxNum && item.defaultProps.maxNum > 1) {\r\n\t\t\tvalue = value || []\r\n\t\t} else {\r\n\t\t\tvalue = value || {\r\n\t\t\t\t[uploaderProvider?.defaultFileItem?.path]: \"\",\r\n\t\t\t\t[uploaderProvider?.defaultFileItem?.url]: \"\",\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (item.type === \"matrix-radio\") {\r\n\t\tvalue = value || {}\r\n\t} else if (item.type === \"matrix-scale\") {\r\n\t\tvalue = value || {}\r\n\t} else if (item.type === \"matrix-checkbox\") {\r\n\t\tvalue = value || {}\r\n\t}\r\n\r\n\treturn value\r\n}\r\n\r\nexport { initItemDefaultValue }\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { Radio, RadioGroup } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { isFunction, pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExMatrixScale 矩阵量表\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExMatrixScale\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\t\t...defaultOptionsProps,\r\n\r\n\t\t/**\r\n\t\t * 行标题\r\n\t\t */\r\n\t\trows: { type: [Array, Function], default: () => [] },\r\n\t\tmodelValue: { type: Object, default: () => ({}) },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tlet options = ref([])\r\n\r\n\t\tuseOptionTrait(options, props)\r\n\r\n\t\tconst level = props.defaultProps?.level || 5\r\n\r\n\t\tif (options.value.length > level) {\r\n\t\t\toptions.value = options.value.slice(0, level)\r\n\t\t} else if (options.value.length < level) {\r\n\t\t\t//如果选项不及量表等级则补全\r\n\t\t\tfor (let i = options.value.length; i < level; i += 1) {\r\n\t\t\t\toptions.value.push({ text: i + 1, value: i + 1 })\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\r\n\r\n\t\tconst onChange = () => {\r\n\t\t\temit(\"update:modelValue\", componentValue.value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\r\n\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option, index) => (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroup onChange={onChange} v-model={componentValue.value[row]}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{() => <Radio name={index + 1}></Radio>}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</RadioGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, ref, watch } from \"vue\"\r\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\r\nimport { Checkbox } from \"vant\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport { isFunction, pick, remove } from \"lodash-es\"\r\n\r\n/**\r\n * ExMatrixRadio 矩阵单选\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExMatrixRadio\",\r\n\tprops: {\r\n\t\t...defaultFieldProps,\r\n\t\t...defaultOptionsProps,\r\n\r\n\t\t/**\r\n\t\t * 行标题\r\n\t\t */\r\n\t\trows: { type: [Array, Function], default: () => [] },\r\n\t\tmodelValue: { type: Object, default: () => ({}) },\r\n\t},\r\n\temits: [\"update:modelValue\"],\r\n\tsetup(props, { emit, slots }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => (componentValue.value = props.modelValue),\r\n\t\t)\r\n\r\n\t\tconst options = ref([])\r\n\r\n\t\tuseOptionTrait(options, props)\r\n\r\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\r\n\r\n\t\tconst onChange = (row, value) => {\r\n\t\t\tif (!componentValue.value[row]) {\r\n\t\t\t\tcomponentValue.value[row] = []\r\n\t\t\t}\r\n\t\t\tif (componentValue.value[row].includes(value)) {\r\n\t\t\t\tremove(componentValue.value[row], (item) => item === value)\r\n\t\t\t} else {\r\n\t\t\t\tcomponentValue.value[row].push(value)\r\n\t\t\t}\r\n\t\t\temit(\"update:modelValue\", componentValue.value)\r\n\t\t}\r\n\r\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\r\n\r\n\t\treturn () => (\r\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\r\n\t\t\t\t{{\r\n\t\t\t\t\t...slots,\r\n\t\t\t\t\tinput: () => (\r\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\r\n\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst checked = ref(componentValue.value[row]?.includes(option.value))\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv-model={checked.value}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshape={\"square\"}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => onChange(row, option.value)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Checkbox>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</ExField>\r\n\t\t)\r\n\t},\r\n})\r\n","import { inject } from \"vue\"\r\nimport { EX_UPLOADER } from \"../provider/ExProvider.jsx\"\r\nimport { isBoolean, isFunction, isString, merge, pick } from \"lodash-es\"\r\nimport ExField from \"./ExField.jsx\"\r\nimport ExSelect from \"./ExSelect.jsx\"\r\nimport ExDate from \"./ExDate.jsx\"\r\nimport ExSwitch from \"./ExSwitch.jsx\"\r\nimport ExCheckbox from \"./ExCheckbox.jsx\"\r\nimport ExRadio from \"./ExRadio.jsx\"\r\nimport ExDatetime from \"./ExDatetime.jsx\"\r\nimport ExNumber from \"./ExNumber.jsx\"\r\nimport ExRate from \"./ExRate.jsx\"\r\nimport ExSlider from \"./ExSlider.jsx\"\r\nimport ExAddress from \"./ExAddress.jsx\"\r\nimport ExCascader from \"./ExCascader.jsx\"\r\nimport ExTime from \"./ExTime.jsx\"\r\nimport ExFieldUploader from \"./ExFieldUploader.jsx\"\r\nimport ExMatrixRadio from \"./ExMatrixRadio.jsx\"\r\nimport ExMatrixScale from \"./ExMatrixScale.jsx\"\r\nimport ExMatrixCheckbox from \"./ExMatrixCheckbox.jsx\"\r\nimport { Divider } from \"vant\"\r\n\r\n/**\r\n *\r\n * @param {FormItemConfig} item\r\n * @param {Object} submitForm\r\n * @param {Object} [props]\r\n * @param {Object} [slots]\r\n * @return {*|JSX.Element}\r\n */\r\nconst render = (item, submitForm, { props, slots }) => {\r\n\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\r\n\r\n\tconst pickerTypes = [\"select\", \"date\", \"datetime\", \"time\", \"address\", \"cascade\"]\r\n\tconst isPicker = pickerTypes.includes(item.type)\r\n\r\n\t// ExField 的 props\r\n\tconst fieldPropsList = [\"placeholder\", \"help\", \"append\", \"required\", \"disabled\", \"rules\", \"readonly\", \"isLink\", \"fieldProps\"]\r\n\tlet fieldProps = pick(item, fieldPropsList)\r\n\r\n\tfieldProps.required = isFunction(fieldProps.required) ? fieldProps.required(submitForm) : fieldProps.required\r\n\tfieldProps.disabled = isFunction(fieldProps.disabled) ? fieldProps.disabled(submitForm) : fieldProps.disabled\r\n\r\n\tfieldProps = { readonly: props.readonly, disabled: props.disabled, ...fieldProps }\r\n\r\n\tif (fieldProps.readonly || fieldProps.disabled) {\r\n\t\tfieldProps.required = false\r\n\t}\r\n\r\n\tfieldProps.label = item.title\r\n\tfieldProps.name = item.key\r\n\tfieldProps.placeholder = fieldProps.placeholder || (isPicker ? `请选择${item.title}` : `请填写${item.title}`)\r\n\tfieldProps.rules = fieldProps.rules?.length\r\n\t\t? fieldProps.rules.map((rule) =>\r\n\t\t\t\trule.pattern\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\t...rule,\r\n\t\t\t\t\t\t\tpattern: new RegExp(rule.pattern),\r\n\t\t\t\t\t }\r\n\t\t\t\t\t: { ...rule },\r\n\t\t )\r\n\t\t: []\r\n\r\n\t// 具体组件的 props\r\n\tconst componentProps = merge(pick(item, [\"options\", \"defaultProps\", \"rows\"]), item.exProps || {})\r\n\r\n\t//混合了Field和input slot组件的slots组合\r\n\tconst componentSlots = item.defaultSlots || {}\r\n\r\n\titem.type = item.type ? item.type.toLowerCase() : item.type\r\n\r\n\t//特殊:readonly 的情况下不显示 required\r\n\tif (fieldProps.required) {\r\n\t\tfieldProps.rules.push({\r\n\t\t\trequired: true,\r\n\t\t\tmessage: isPicker ? `请选择${item.title}` : `请填写${item.title}`,\r\n\t\t\ttrigger: isPicker ? \"onChange\" : \"onBlur\", //特意\r\n\t\t})\r\n\t}\r\n\r\n\t//特殊:readonly 情况下不显示 placeholder\r\n\tif (fieldProps.readonly || fieldProps.disabled) {\r\n\t\tfieldProps.placeholder = \"--\"\r\n\t}\r\n\r\n\tlet renderItem = null\r\n\r\n\t// 处理 hidden\r\n\tif ((isFunction(item.hidden) && item.hidden(submitForm)) || (isBoolean(item.hidden) && item.hidden)) {\r\n\t\treturn null\r\n\t} else if (item.type === \"slot\" && slots[item.key]) {\r\n\t\treturn slots[item.key]({ submitForm })\r\n\t} else if (item.customRender) {\r\n\t\trenderItem = item.customRender({ submitForm, item })\r\n\t\tif (!renderItem) {\r\n\t\t\treturn null\r\n\t\t}\r\n\t} else if (item.match) {\r\n\t\t// 匹配模式, 合并选项后需要移除 match\r\n\t\tconst matchItem = { ...item, ...item.match(submitForm), match: null }\r\n\t\treturn render(matchItem, submitForm, { props, slots })\r\n\t} else {\r\n\t\tswitch (item.type) {\r\n\t\t\tcase \"select\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExSelect v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExSelect>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"date\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExDate v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExDate>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"datetime\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExDatetime v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExDatetime>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"time\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExTime v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExTime>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"switch\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExSwitch v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExSwitch>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"radio\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExRadio v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExRadio>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"checkbox\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExCheckbox v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExCheckbox>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"address\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExAddress v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExAddress>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"cascade\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExCascader v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExCascader>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"number\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExNumber v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExNumber>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"rate\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExRate v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExRate>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"slider\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExSlider v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExSlider>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"uploader\":\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExFieldUploader v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExFieldUploader>\r\n\t\t\t\t)\r\n\t\t\t\tif (item.required) {\r\n\t\t\t\t\tif (!Object.keys(uploaderProvider).length) {\r\n\t\t\t\t\t\tconsole.error(\"请在根组件中注入 NEWBIE_UPLOADER 配置项\")\r\n\t\t\t\t\t\trenderItem = null\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*if (item.defaultProps?.maxNum && item.defaultProps?.maxNum > 1) {\r\n rules.type = \"array\"\r\n rules.message = `请上传${item.title}`\r\n } else {\r\n rules = {\r\n type: \"object\",\r\n required: true,\r\n message: `请上传${item.title}`,\r\n fields: {\r\n [uploaderProvider.path]: {\r\n type: \"string\",\r\n required: true,\r\n message: `请上传${item.title}`,\r\n },\r\n },\r\n }\r\n }*/\r\n\t\t\t\t}\r\n\t\t\t\tbreak\r\n\t\t\t/* case \"html\":\r\n renderItem = Fields.createHtml(item, submitForm)\r\n break\r\n\r\n case \"text\":\r\n renderItem = Fields.createText(item, submitForm)\r\n break\r\n case \"group\":\r\n renderItem = Fields.createGroup(item, submitForm, { provider: { uploaderProvider } })\r\n break*/\r\n\t\t\tcase \"textarea\":\r\n\t\t\t\tfieldProps.type = \"textarea\"\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExField>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"password\":\r\n\t\t\t\tfieldProps.type = \"password\"\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExField>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t\tcase \"matrix-radio\": {\r\n\t\t\t\tif (item.required) {\r\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\r\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\r\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\r\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trenderItem = <ExMatrixRadio v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\r\n\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t\tcase \"matrix-scale\": {\r\n\t\t\t\tif (item.required) {\r\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\r\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\r\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\r\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trenderItem = <ExMatrixScale v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\r\n\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t\tcase \"matrix-checkbox\": {\r\n\t\t\t\tif (item.required) {\r\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\r\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\r\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\r\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trenderItem = <ExMatrixCheckbox v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\r\n\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t\trenderItem = (\r\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\r\n\t\t\t\t\t\t{componentSlots}\r\n\t\t\t\t\t</ExField>\r\n\t\t\t\t)\r\n\t\t\t\tbreak\r\n\t\t}\r\n\t}\r\n\r\n\tconst formItem = [renderItem]\r\n\r\n\tif (item.break) {\r\n\t\tformItem.unshift(<Divider {...props.dividerProps}>{{ default: () => (isString(item.break) ? item.break : null) }}</Divider>)\r\n\t}\r\n\r\n\treturn formItem\r\n}\r\n\r\nexport default render\r\n","import { computed, defineComponent, inject, nextTick, onMounted, reactive, ref, watch } from \"vue\"\r\nimport { EX_UPLOADER, EX_FORM } from \"../provider/ExProvider.jsx\"\r\nimport { cloneDeep, every, isEqual, isFunction, isObject, isString, pick } from \"lodash-es\"\r\nimport { initItemDefaultValue } from \"./utils\"\r\nimport { useCache, useFetch, useFormFail, useFormFormat, useProcessStatusSuccess } from \"../../hooks\"\r\nimport { CellGroup, Form, showConfirmDialog, showSuccessToast, Skeleton } from \"vant\"\r\nimport createFormItem from \"./FormItem.jsx\"\r\nimport ExButton from \"../button/ExButton.jsx\"\r\n\r\n/**\r\n * ExForm 表单\r\n *\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExForm\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 表单标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 表单项 label 宽度,默认单位为px\r\n\t\t */\r\n\t\tlabelWidth: { type: [String, Number], default: \"6.2em\" },\r\n\r\n\t\t/**\r\n\t\t * 是否在 label 后面添加冒号\r\n\t\t */\r\n\t\tcolon: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否使用卡片模式\r\n\t\t */\r\n\t\tinset: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 表单数据,用于初始化表单,并会进行 Watch\r\n\t\t */\r\n\t\tdata: { type: [Object, String], default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否自动加载\r\n\t\t * true: 表示自动加载数据\r\n\t\t * Array,String: 表示会对 `extraData` 数据中的相关字段进行非空验证,不为空再加载数据\r\n\t\t */\r\n\t\tautoLoad: {\r\n\t\t\t//自动加载数据,在fetchData里找\r\n\t\t\ttype: [Boolean, Array, String],\r\n\t\t\tdefault: true,\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * 获取表单数据的URL\r\n\t\t */\r\n\t\tfetchUrl: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 额外的数据,在提交时会合并到表单数据中并一起提交\r\n\t\t */\r\n\t\textraData: { type: Object, default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 是否禁用表单\r\n\t\t */\r\n\t\tdisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否只读\r\n\t\t */\r\n\t\treadonly: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * submit button 是否固定在底部\r\n\t\t */\r\n\t\tfixed: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 提交数据URL\r\n\t\t */\r\n\t\tsubmitUrl: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 提交按钮文字\r\n\t\t */\r\n\t\tsubmitButtonText: { type: String, default: \"保存\" },\r\n\r\n\t\t/**\r\n\t\t * 提交确认提示内容\r\n\t\t */\r\n\t\tsubmitConfirmText: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否禁用提交按钮\r\n\t\t */\r\n\t\tsubmitDisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否显示关闭按钮\r\n\t\t */\r\n\t\tclosable: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 取消按钮文字\r\n\t\t */\r\n\t\tcancelButtonText: { type: String, default: \"取消\" },\r\n\r\n\t\t/**\r\n\t\t * 点击关闭时的动作\r\n\t\t */\r\n\t\tclose: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t * 当有分割线时,分割线的配置\r\n\t\t */\r\n\t\tdividerProps: { type: Object, default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 是否缓存表单数据\r\n\t\t * 开启后,该数据会缓存在 localStorage\r\n\t\t */\r\n\t\tcacheable: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * 表单配置\r\n\t\t *\r\n\t\t * @typedef {Object} FormItemConfig\r\n\t\t * @property {string} key 数据库关联名称\r\n\t\t * @property {string} title 显示的名字\r\n\t\t * @property {string} [type] 类型,默认是input\r\n\t\t * @property {array|Function} [options] 组件选项\r\n\t\t * @property {array|Function} [rows] 矩阵组件行标题\r\n\t\t * @property {string} [placeholder] 组件里的提示\r\n\t\t * @property {string|Function} [help] ExField 里的提示\r\n\t\t * @property {string|Function} [append] ExField 外的提示\r\n\t\t * @property {array} [rules] 验证规则\r\n\t\t * @property {boolean} [isLink] 是否展示右侧箭头并开启点击反馈\r\n\t\t * @property {boolean} [readonly] 是否只读\r\n\t\t * @property {boolean|Function} [required] 是否必填,默认是false\r\n\t\t * @property {boolean|Function} [disabled] 组件不可编辑状态,默认是false\r\n\t\t * @property {boolean|Function} [hidden] 组件是否隐藏\r\n\t\t * @property {Function} [match] 支持根据条件返回不同的配置进行动态渲染\r\n\t\t * @property {Function} [init] 初始化函数,用于初始化表单项的值\r\n\t\t * @property {Function} [beforeSubmit] 在提交前修改表单项的值,该函数会在 ExForm 的 beforeSubmit 之前调用\r\n\t\t * @property {boolean|string} [break] 新起一行,默认为false,如果为 String 则以 Divider 分割\r\n\t\t * @property {Object} [fieldProps] ExField 的原生配置\r\n\t\t * @property {Object} [exProps] Ex组件配置\r\n\t\t * @property {Object} [defaultProps] 原生 Vant 组件的配置\r\n\t\t * @property {Object} [defaultSlots] 混合 Field 和 input slot 组件的 slots 组合\r\n\t\t * @property {*} [defaultValue] 默认值,默认是空字符串\r\n\t\t * @property {*} [_temp] 临时数据,内部使用\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * 表单配置,[见下表](#form-表单配置)\r\n\t\t */\r\n\t\tform: {\r\n\t\t\ttype: Array,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn []\r\n\t\t\t},\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * fetch 返回数据处理函数\r\n\t\t * @return {Object} 返回处理后的数据,将用于初始化表单\r\n\t\t */\r\n\t\tafterFetched: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * @typedef {Object} ExposedFormData\r\n\t\t * @property {Object} formatForm Format后的表单数据\r\n\t\t * @property {Object} originalForm 原生的表单数据\r\n\t\t *\r\n\t\t *\r\n\t\t * 提交数据处理函数\r\n\t\t * @param {ExposedFormData} data\r\n\t\t * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据\r\n\t\t *\r\n\t\t */\r\n\t\tbeforeSubmit: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t * 提交成功后的回调\r\n\t\t */\r\n\t\tafterSubmit: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/form)\r\n\t\t */\r\n\t\tformProps: { type: Object, default: () => ({}) },\r\n\t},\r\n\temits: [\"success\"],\r\n\r\n\tsetup(props, { expose, emit, slots }) {\r\n\t\tconst formRef = ref(null) //表单容器\r\n\r\n\t\tconst state = reactive({\r\n\t\t\ttemporary: {}, // 用于存放一些临时数据\r\n\t\t\tsubmitFetcher: {\r\n\t\t\t\tloading: false,\r\n\t\t\t},\r\n\t\t\tisInitializing: true, //是否正在初始化\r\n\t\t\trules: {},\r\n\t\t\tsubmitForm: {}, //提交表单,初始化数据后会生成\r\n\t\t\tsubmitFormBackup: {}, //初始化后的表单数据备份,用于重置表单以及脏数据判断\r\n\t\t})\r\n\r\n\t\tconst formItems = computed(() => props.form)\r\n\r\n\t\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\r\n\t\tconst formProvider = inject(EX_FORM, () => ({}))\r\n\r\n\t\twatch(\r\n\t\t\t() => props.data,\r\n\t\t\t(newV) => {\r\n\t\t\t\tinitFormData(newV || false)\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\twatch(\r\n\t\t\t() => state.submitForm,\r\n\t\t\t() => {\r\n\t\t\t\tif (props.cacheable) {\r\n\t\t\t\t\tuseCache(props.cacheable, localStorage).set(state.submitForm)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{ deep: true },\r\n\t\t)\r\n\r\n\t\twatch(\r\n\t\t\t() => formItems.value,\r\n\t\t\t() => {\r\n\t\t\t\tinitFormData(props.data || false)\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst init = (data) => {\r\n\t\t\tstate.isInitializing = false\r\n\t\t\tinitFormData(data || props.data || false)\r\n\t\t}\r\n\r\n\t\tonMounted(() => {\r\n\t\t\tif (props.autoLoad && props.fetchUrl) {\r\n\t\t\t\tlet auto = true\r\n\t\t\t\tif (props.autoLoad && isObject(props.autoLoad)) {\r\n\t\t\t\t\tauto = every(Object.values(pick(props.extraData, Object.keys(props.autoLoad))))\r\n\t\t\t\t} else if (props.autoLoad && isString(props.autoLoad)) {\r\n\t\t\t\t\tauto = !!props.extraData[props.autoLoad]\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (auto) {\r\n\t\t\t\t\tfetchItem()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinit()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (props.cacheable) {\r\n\t\t\t\t\tconst cachedData = useCache(props.cacheable, localStorage).get()\r\n\t\t\t\t\tif (cachedData) {\r\n\t\t\t\t\t\tshowConfirmDialog({ message: \"存在未提交的数据,是否恢复?\", lockScroll: false })\r\n\t\t\t\t\t\t\t.then(() => {\r\n\t\t\t\t\t\t\t\tinit(cachedData)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t.catch(() => {\r\n\t\t\t\t\t\t\t\tuseCache(props.cacheable, localStorage).remove()\r\n\t\t\t\t\t\t\t\tinit()\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tinit()\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinit()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\t/**\r\n\t\t * 初始化表单数据\r\n\t\t *\r\n\t\t * @param {Object} formData 表单数据\r\n\t\t */\r\n\t\tconst initFormData = (formData) => {\r\n\t\t\t// 如果有 FormData, 则从中提取 FormItem 中有定义的数据,并进行初始化后存放于 extractFormData\r\n\t\t\t// 无 FromData 则直接使用 FormItem 的 defaultValue\r\n\t\t\tlet extractFormData = {}\r\n\t\t\tlet existingData = formData ? cloneDeep(formData) : false\r\n\t\t\tformItems.value.forEach((item) => {\r\n\t\t\t\textractFormData[item.key] = initItemDefaultValue(item, existingData, state.submitForm, { uploaderProvider })\r\n\t\t\t})\r\n\r\n\t\t\tif (existingData) {\r\n\t\t\t\t// 将初始化后的数据覆盖原有数据,并保留不在 FormItems 中的数据\r\n\t\t\t\textractFormData = { ...existingData, ...extractFormData }\r\n\t\t\t}\r\n\r\n\t\t\tstate.submitForm = extractFormData\r\n\t\t\tstate.submitFormBackup = cloneDeep(extractFormData)\r\n\t\t}\r\n\r\n\t\t//远程拿数据模式\r\n\t\tconst fetchItem = () => {\r\n\t\t\tif (props.fetchUrl) {\r\n\t\t\t\tstate.isInitializing = false\r\n\t\t\t\tuseFetch()\r\n\t\t\t\t\t.get(props.fetchUrl, { params: props.extraData })\r\n\t\t\t\t\t.then((res) => {\r\n\t\t\t\t\t\tstate.isInitializing = true\r\n\t\t\t\t\t\tuseProcessStatusSuccess(res, () => {\r\n\t\t\t\t\t\t\tif (props.afterFetched && isFunction(props.afterFetched)) {\r\n\t\t\t\t\t\t\t\tres = props.afterFetched(res)\r\n\t\t\t\t\t\t\t} else if (formProvider.afterFetched && isFunction(formProvider.afterFetched)) {\r\n\t\t\t\t\t\t\t\tres = formProvider.afterFetched(res)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//有可能出现 isInitializing 未生效 skeleton 还未关闭的情况\r\n\t\t\t\t\t\t\tnextTick(() => {\r\n\t\t\t\t\t\t\t\tinitFormData(res)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.finally(() => {\r\n\t\t\t\t\t\tstate.isInitializing = false\r\n\t\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst onSubmit = async () => {\r\n\t\t\tawait formRef.value.validate()\r\n\r\n\t\t\tif (props.submitConfirmText) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tawait showConfirmDialog({ message: props.submitConfirmText })\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// 为了在 item 中也能定制 beforeSubmit 这里和下面的 useFormFormat 会重复 copy 一次 submitForm\r\n\t\t\tlet form = cloneDeep(state.submitForm)\r\n\r\n\t\t\tconst itemsWithBeforeSubmit = formItems.value\r\n\t\t\t\t.map((item) => {\r\n\t\t\t\t\tif (item.match) {\r\n\t\t\t\t\t\t// match 的属性需要在这里处理\r\n\t\t\t\t\t\treturn { ...item, ...item.match(form) }\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn item\r\n\t\t\t\t})\r\n\t\t\t\t.filter((item) => item.beforeSubmit && isFunction(item.beforeSubmit))\r\n\r\n\t\t\tfor (const item of itemsWithBeforeSubmit) {\r\n\t\t\t\tform[item.key] = await item.beforeSubmit({\r\n\t\t\t\t\tvalue: form[item.key],\r\n\t\t\t\t\tsubmitForm: form, //改成将 form 传出去,这样可以在 form 中添加参数\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\tform = useFormFormat(form, formProvider.format || {})\r\n\r\n\t\t\tif (props.beforeSubmit && isFunction(props.beforeSubmit)) {\r\n\t\t\t\tform = await props.beforeSubmit({ formatForm: form, originalForm: state.submitForm })\r\n\t\t\t\tif (form === false) {\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tlet res = await useFetch(state.submitFetcher).post(props.submitUrl, form)\r\n\r\n\t\t\t\t//提交后再次备份表单数据,isDirty 检测即为 false\r\n\t\t\t\tstate.submitFormBackup = cloneDeep(state.submitForm)\r\n\r\n\t\t\t\tif (props.cacheable) {\r\n\t\t\t\t\tuseCache(props.cacheable, localStorage).remove()\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (props.afterSubmit) {\r\n\t\t\t\t\tprops.afterSubmit(res)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tuseProcessStatusSuccess(res, () => {\r\n\t\t\t\t\t\tshowSuccessToast(`${props.submitButtonText}成功`)\r\n\t\t\t\t\t\temit(\"success\", res)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tuseFormFail(e)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/********** exposes **********/\r\n\r\n\t\t/**\r\n\t\t * 获取复制的表单数据\r\n\t\t * @return {*}\r\n\t\t */\r\n\t\tconst getFormStandalone = () => cloneDeep(state.submitForm)\r\n\r\n\t\t/**\r\n\t\t * 获取表单实时数据,慎用,会改变内部的值\r\n\t\t * @return {*}\r\n\t\t */\r\n\t\tconst getFormRealtime = () => state.submitForm\r\n\r\n\t\t/**\r\n\t\t * 获取表单的字段值\r\n\t\t * @param {String} key\r\n\t\t * @return {*}\r\n\t\t */\r\n\t\tconst getField = (key) => cloneDeep(state.submitForm[key])\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * 设置表单数据\r\n\t\t * @param {Object} fields\r\n\t\t */\r\n\t\tconst setForm = (fields) => {\r\n\t\t\tObject.keys(fields).forEach((key) => {\r\n\t\t\t\tstate.submitForm[key] = fields[key]\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 判断表单是否被修改\r\n\t\t * @return {boolean}\r\n\t\t */\r\n\t\tconst isDirty = () => {\r\n\t\t\treturn !isEqual(state.submitForm, state.submitFormBackup)\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 重置表单\r\n\t\t * @param {Object} formData 表单数据\r\n\t\t */\r\n\t\tconst reset = (formData) => {\r\n\t\t\tinitFormData(formData)\r\n\t\t\tnextTick(() => {\r\n\t\t\t\tformRef.value.resetValidation()\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\texpose({\r\n\t\t\tgetForm: getFormStandalone,\r\n\t\t\tgetFormStandalone,\r\n\t\t\tgetFormRealtime,\r\n\t\t\tgetField,\r\n\t\t\tsetForm,\r\n\t\t\tisDirty,\r\n\t\t\tfetchItem,\r\n\t\t\treset,\r\n\t\t})\r\n\r\n\t\t/********** render **********/\r\n\r\n\t\tconst formItemElems = () =>\r\n\t\t\tformItems.value.map((formItem) =>\r\n\t\t\t\tcreateFormItem(formItem, state.submitForm, {\r\n\t\t\t\t\tprops,\r\n\t\t\t\t\tslots,\r\n\t\t\t\t}),\r\n\t\t\t)\r\n\r\n\t\tconst skeletonElem = () => (\r\n\t\t\t<Skeleton row={10} title loading={state.isInitializing}>\r\n\t\t\t\t{{\r\n\t\t\t\t\tdefault: () => formItemElems(),\r\n\t\t\t\t}}\r\n\t\t\t</Skeleton>\r\n\t\t)\r\n\r\n\t\tconst footerElem = () => {\r\n\t\t\tif (state.isInitializing) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t\tif (slots.footer) {\r\n\t\t\t\treturn <div class={\"ex-form__footer\"}>{slots.footer()}</div>\r\n\t\t\t}\r\n\t\t\treturn null\r\n\t\t}\r\n\r\n\t\tconst buttonsElem = () => {\r\n\t\t\tif (state.isInitializing) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t\tif (props.readonly) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\r\n\t\t\tconst cancelBtn = (\r\n\t\t\t\t<ExButton\r\n\t\t\t\t\tclass={\"ex-form__cancel-btn\"}\r\n\t\t\t\t\ttype={\"default\"}\r\n\t\t\t\t\tplain\r\n\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\tif (props.close && isFunction(props.close)) {\r\n\t\t\t\t\t\t\tprops.close()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{() => props.cancelButtonText}\r\n\t\t\t\t</ExButton>\r\n\t\t\t)\r\n\r\n\t\t\tconst submitBtn = (\r\n\t\t\t\t<ExButton disabled={props.submitDisabled} type={\"primary\"} fetcher={state.submitFetcher} buttonProps={{ nativeType: \"submit\" }}>\r\n\t\t\t\t\t{() => props.submitButtonText}\r\n\t\t\t\t</ExButton>\r\n\t\t\t)\r\n\r\n\t\t\tif (props.fixed) {\r\n\t\t\t\treturn <div class={\"ex-form__btn-wrapper-fixed van-hairline--top\"}>{[props.closable ? cancelBtn : null, submitBtn]}</div>\r\n\t\t\t}\r\n\r\n\t\t\treturn <div class={\"ex-form__btn-wrapper\"}>{[props.closable ? cancelBtn : null, submitBtn]}</div>\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<Form\r\n\t\t\t\tref={formRef}\r\n\t\t\t\tlabelWidth={props.labelWidth}\r\n\t\t\t\tcolon={props.colon}\r\n\t\t\t\tclass={`ex-form ${props.fixed ? \"ex-form__fixed\" : \"\"}`}\r\n\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\treadonly={props.readonly}\r\n\t\t\t\tscrollToError={true}\r\n\t\t\t\tvalidateFirst={true}\r\n\t\t\t\tonSubmit={onSubmit}\r\n\t\t\t\t{...props.formProps}\r\n\t\t\t>\r\n\t\t\t\t{{\r\n\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t<CellGroup inset={props.inset} title={props.title}>\r\n\t\t\t\t\t\t\t{{ default: () => skeletonElem() }}\r\n\t\t\t\t\t\t</CellGroup>,\r\n\t\t\t\t\t\tfooterElem(),\r\n\t\t\t\t\t\tbuttonsElem(),\r\n\t\t\t\t\t],\r\n\t\t\t\t}}\r\n\t\t\t</Form>\r\n\t\t)\r\n\t},\r\n})\r\n","import \"./index.less\"\r\n\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nimport _ExField from \"./ExField.jsx\"\r\nimport _ExAddress, {\r\n\taddressData as _addressData,\r\n\tuseAddressFullCode as _useAddressFullCode,\r\n\tuseAddressNameFormCode as _useAddressNameFormCode,\r\n} from \"./ExAddress.jsx\"\r\nimport _ExCascader from \"./ExCascader.jsx\"\r\nimport _ExCheckbox from \"./ExCheckbox.jsx\"\r\nimport _ExDate from \"./ExDate.jsx\"\r\nimport _ExDatetime from \"./ExDatetime.jsx\"\r\nimport _ExTime from \"./ExTime.jsx\"\r\nimport _ExNumber from \"./ExNumber.jsx\"\r\nimport _ExRadio from \"./ExRadio.jsx\"\r\nimport _ExSelect from \"./ExSelect.jsx\"\r\nimport _ExSwitch from \"./ExSwitch.jsx\"\r\nimport _ExRate from \"./ExRate.jsx\"\r\nimport _ExSlider from \"./ExSlider.jsx\"\r\nimport _ExFieldUploader from \"./ExFieldUploader.jsx\"\r\nimport _ExMatrixRadio from \"./ExMatrixRadio.jsx\"\r\n\r\nimport _ExForm from \"./ExForm.jsx\"\r\n\r\nexport const useAddressFullCode = _useAddressFullCode\r\nexport const useAddressNameFormCode = _useAddressNameFormCode\r\nexport const addressData = _addressData\r\nexport const ExAddress = withInstall(_ExAddress)\r\nexport const ExField = withInstall(_ExField)\r\nexport const ExCascader = withInstall(_ExCascader)\r\nexport const ExCheckbox = withInstall(_ExCheckbox)\r\nexport const ExDate = withInstall(_ExDate)\r\nexport const ExDatetime = withInstall(_ExDatetime)\r\nexport const ExTime = withInstall(_ExTime)\r\nexport const ExNumber = withInstall(_ExNumber)\r\nexport const ExRadio = withInstall(_ExRadio)\r\nexport const ExSelect = withInstall(_ExSelect)\r\nexport const ExSwitch = withInstall(_ExSwitch)\r\nexport const ExRate = withInstall(_ExRate)\r\nexport const ExSlider = withInstall(_ExSlider)\r\nexport const ExFieldUploader = withInstall(_ExFieldUploader)\r\nexport const ExMatrixRadio = withInstall(_ExMatrixRadio)\r\n\r\nexport const ExForm = withInstall(_ExForm)\r\n","import _ExProvider from \"./ExProvider.jsx\"\nimport withInstall from \"../../utils/withInstall\"\nexport const ExProvider = withInstall(_ExProvider)\nexport default ExProvider\n","import { defineComponent } from \"vue\"\r\nimport \"./index.less\"\r\n\r\n/**\r\n * ExResult 结果页\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExResult\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 结果类型\r\n\t\t * @values 'success', 'error', 'info', 'warning'\r\n\t\t */\r\n\t\ttype: { type: String, default: \"success\" },\r\n\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 描述\r\n\t\t */\r\n\t\tdescription: { type: String, default: \"\" },\r\n\t},\r\n\tsetup(props, { slots }) {\r\n\t\tconst iconElem = () => {\r\n\t\t\tlet elem = null\r\n\r\n\t\t\tif (slots.icon) {\r\n\t\t\t\telem = slots.icon()\r\n\t\t\t} else {\r\n\t\t\t\tswitch (props.type) {\r\n\t\t\t\t\tcase \"success\":\r\n\t\t\t\t\t\telem = (\r\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\r\n\t\t\t\t\t\t\t\t<svg\r\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\r\n\t\t\t\t\t\t\t\t\tdata-icon=\"check-circle\"\r\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\r\n\t\t\t\t\t\t\t\t\theight=\"1em\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z\"></path>\r\n\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\tbreak\r\n\r\n\t\t\t\t\tcase \"info\":\r\n\t\t\t\t\t\telem = (\r\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\r\n\t\t\t\t\t\t\t\t<svg\r\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\r\n\t\t\t\t\t\t\t\t\tdata-icon=\"exclamation-circle\"\r\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\r\n\t\t\t\t\t\t\t\t\theight=\"1em\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z\"></path>\r\n\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\tbreak\r\n\r\n\t\t\t\t\tcase \"warning\":\r\n\t\t\t\t\t\telem = (\r\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\r\n\t\t\t\t\t\t\t\t<svg\r\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\r\n\t\t\t\t\t\t\t\t\tdata-icon=\"warning\"\r\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\r\n\t\t\t\t\t\t\t\t\theight=\"1em\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<path d=\"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z\"></path>\r\n\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\tbreak\r\n\r\n\t\t\t\t\tcase \"error\":\r\n\t\t\t\t\t\telem = (\r\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\r\n\t\t\t\t\t\t\t\t<svg\r\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\r\n\t\t\t\t\t\t\t\t\tdata-icon=\"close-circle\"\r\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\r\n\t\t\t\t\t\t\t\t\theight=\"1em\"\r\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\r\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z\"></path>\r\n\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn elem\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<div class={`ex-result ex-result__${props.type}`}>\r\n\t\t\t\t<div class={\"ex-result-icon\"}>{iconElem()}</div>\r\n\t\t\t\t<div class={\"ex-result-title\"}>{slots.title ? slots.title?.() : props.title}</div>\r\n\t\t\t\t<div class={\"ex-result-description\"}>{slots.description ? slots.description?.() : props.description}</div>\r\n\t\t\t\t<div class={\"ex-result-extra\"}>{slots.extra?.()}</div>\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import _ExResult from \"./ExResult.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExResult = withInstall(_ExResult)\r\nexport default ExResult\r\n","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","'use strict'\n\nmodule.exports = function encodeUtf8 (input) {\n var result = []\n var size = input.length\n\n for (var index = 0; index < size; index++) {\n var point = input.charCodeAt(index)\n\n if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {\n var second = input.charCodeAt(index + 1)\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000\n index += 1\n }\n }\n\n // US-ASCII\n if (point < 0x80) {\n result.push(point)\n continue\n }\n\n // 2-byte UTF-8\n if (point < 0x800) {\n result.push((point >> 6) | 192)\n result.push((point & 63) | 128)\n continue\n }\n\n // 3-byte UTF-8\n if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {\n result.push((point >> 12) | 224)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // 4-byte UTF-8\n if (point >= 0x10000 && point <= 0x10FFFF) {\n result.push((point >> 18) | 240)\n result.push(((point >> 12) & 63) | 128)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // Invalid character\n result.push(0xEF, 0xBF, 0xBD)\n }\n\n return new Uint8Array(result).buffer\n}\n","const encodeUtf8 = require('encode-utf8')\nconst Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n data = encodeUtf8(data)\n }\n this.data = new Uint8Array(data)\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : '<path ' + getColorAttrib(opts.color.light, 'fill') +\n ' d=\"M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z\"/>'\n\n const path =\n '<path ' + getColorAttrib(opts.color.dark, 'stroke') +\n ' d=\"' + qrToPath(data, size, opts.margin) + '\"/>'\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '<svg xmlns=\"http://www.w3.org/2000/svg\" ' + width + viewBox + ' shape-rendering=\"crispEdges\">' + bg + path + '</svg>\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","import { defineComponent, onBeforeUpdate, onMounted, ref, watch } from \"vue\"\r\nimport QRCode from \"qrcode\"\r\nimport \"./index.less\"\r\n\r\n/**\r\n * ExQrcode 二维码\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExQrcode\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 是否居中显示\r\n\t\t */\r\n\t\tcenter: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 二维码内容\r\n\t\t */\r\n\t\ttext: { type: [String, Number], default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 二维码尺寸\r\n\t\t */\r\n\t\tsize: { type: Number, default: 120 },\r\n\r\n\t\t/**\r\n\t\t * 边距\r\n\t\t */\r\n\t\tmargin: { type: Number, default: 0 },\r\n\r\n\t\t/**\r\n\t\t * 前景色\r\n\t\t */\r\n\t\tcolorDark: { type: String, default: \"#000000\" },\r\n\r\n\t\t/**\r\n\t\t * 背景色\r\n\t\t */\r\n\t\tcolorLight: { type: String, default: \"#FFFFFF\" },\r\n\r\n\t\t/**\r\n\t\t * 纠错级别\r\n\t\t * @values L, M, Q, H\r\n\t\t */\r\n\t\tcorrectLevel: { type: String, default: \"H\" },\r\n\t},\r\n\r\n\tsetup(props) {\r\n\t\tconst containerRef = ref()\r\n\r\n\t\tconst create = () => {\r\n\t\t\tQRCode.toDataURL(containerRef.value, String(props.text), {\r\n\t\t\t\terrorCorrectionLevel: props.correctLevel,\r\n\t\t\t\tcolor: {\r\n\t\t\t\t\tdark: props.colorDark,\r\n\t\t\t\t\tlight: props.colorLight,\r\n\t\t\t\t},\r\n\t\t\t\twidth: props.size,\r\n\t\t\t\tmargin: props.margin,\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\twatch(\r\n\t\t\t() => props,\r\n\t\t\t() => {\r\n\t\t\t\tcreate()\r\n\t\t\t},\r\n\t\t\t{ deep: true },\r\n\t\t)\r\n\r\n\t\tonBeforeUpdate(() => {\r\n\t\t\tcontainerRef.value = null\r\n\t\t})\r\n\r\n\t\tonMounted(() => {\r\n\t\t\tcreate()\r\n\t\t})\r\n\r\n\t\treturn () => (\r\n\t\t\t<div class={`ex-qrcode ${props.center ? \"ex-qrcode__center\" : \"\"}`}>\r\n\t\t\t\t<canvas ref={containerRef}></canvas>\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import _ExQrcode from \"./ExQrcode.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExQrcode = withInstall(_ExQrcode)\r\nexport default ExQrcode\r\n","import { isNull, isUndefined } from \"lodash-es\"\r\n\r\nconst genPixel = (num) => {\r\n\tif (isNull(num) || isUndefined(num)) {\r\n\t\treturn \"auto\"\r\n\t} else if (!isNaN(num)) {\r\n\t\treturn `${num}px`\r\n\t}\r\n\r\n\treturn num\r\n}\r\n\r\nexport { genPixel }\r\n","import { defineComponent } from \"vue\"\r\nimport \"./index.less\"\r\nimport { isArray } from \"lodash-es\"\r\nimport { genPixel } from \"../../utils/style\"\r\n\r\n/**\r\n * Grid 布局组件\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExGrid\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 间距方向\r\n\t\t * @values vertical, horizontal\r\n\t\t */\r\n\t\tdirection: { type: String, default: \"horizontal\" },\r\n\r\n\t\t/**\r\n\t\t * 列数,如果没有定义将会把元素置于同一行\r\n\t\t */\r\n\t\tcolumns: { type: Number, default: 0 },\r\n\r\n\t\t/**\r\n\t\t * 间距大小,如 20px 2em,默认单位为 px,支持数组形式来分别设置横向和纵向间距\r\n\t\t */\r\n\t\tgutter: { type: [Array, Number, String], default: 20 },\r\n\t},\r\n\tsetup(props, { slots }) {\r\n\t\treturn () => {\r\n\t\t\tconst columns = props.columns || slots.default()?.length\r\n\r\n\t\t\tlet gridTemplateColumns = \"\"\r\n\r\n\t\t\tfor (let i = 0; i < columns; i++) {\r\n\t\t\t\tgridTemplateColumns += \" 1fr\"\r\n\t\t\t}\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass={\"ex-grid\"}\r\n\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\tgridAutoFlow: props.direction === \"horizontal\" ? \"row\" : \"column\",\r\n\t\t\t\t\t\tgridRowGap: isArray(props.gutter) ? genPixel(props.gutter?.[1]) : \"0\",\r\n\t\t\t\t\t\tgridColumnGap: isArray(props.gutter) ? genPixel(props.gutter?.[0]) : genPixel(props.gutter),\r\n\t\t\t\t\t\tgridTemplateColumns,\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t{slots.default?.()}\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\t},\r\n})\r\n","import { isUndefined } from \"lodash-es\"\r\nimport { reactive } from \"vue\"\r\nimport { Button, Collapse, CollapseItem } from \"vant\"\r\nimport ExGrid from \"../../grid/ExGrid.jsx\"\r\n\r\nconst render = (item, queryForm) => {\r\n\tif (isUndefined(item._temp)) {\r\n\t\titem._temp = reactive({\r\n\t\t\tactiveNames: item.key,\r\n\t\t})\r\n\t}\r\n\r\n\tconst toggleChooseOption = (value) => {\r\n\t\tif (item.expandable === \"multiple\") {\r\n\t\t\tif (!queryForm[item.key] || !queryForm[item.key]?.length) {\r\n\t\t\t\tqueryForm[item.key] = [value]\r\n\t\t\t} else {\r\n\t\t\t\tconst index = queryForm[item.key].indexOf(value)\r\n\t\t\t\tif (index === -1) {\r\n\t\t\t\t\tqueryForm[item.key].push(value)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueryForm[item.key].splice(index, 1)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tqueryForm[item.key] = queryForm[item.key] === value ? \"\" : value\r\n\t\t}\r\n\t}\r\n\r\n\tconst isOptionActive = (value) => {\r\n\t\tif (item.expandable === \"multiple\") {\r\n\t\t\treturn queryForm[item.key]?.includes(value)\r\n\t\t} else {\r\n\t\t\treturn queryForm[item.key] === value\r\n\t\t}\r\n\t}\r\n\r\n\tconst optionElems = () => (\r\n\t\t<ExGrid columns={3}>\r\n\t\t\t{{\r\n\t\t\t\tdefault: () =>\r\n\t\t\t\t\titem.options.map((option) => (\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\tclass={`ex-search__expand-option`}\r\n\t\t\t\t\t\t\ttype={`${isOptionActive(option.value) ? \"primary\" : \"default\"}`}\r\n\t\t\t\t\t\t\thairline={true}\r\n\t\t\t\t\t\t\tround={true}\r\n\t\t\t\t\t\t\tsize={\"small\"}\r\n\t\t\t\t\t\t\tonClick={() => toggleChooseOption(option.value)}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{option.text}\r\n\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t)),\r\n\t\t\t}}\r\n\t\t</ExGrid>\r\n\t)\r\n\r\n\treturn (\r\n\t\t<div class={\"ex-search__popup-item ex-search__expand-item\"}>\r\n\t\t\t<Collapse v-model={item._temp.activeNames} border={false} accordion={true}>\r\n\t\t\t\t{{\r\n\t\t\t\t\tdefault: () => (\r\n\t\t\t\t\t\t<CollapseItem name={item.key}>\r\n\t\t\t\t\t\t\t{{\r\n\t\t\t\t\t\t\t\tdefault: () => <div class={\"ex-search__expand-options\"}>{optionElems()}</div>,\r\n\t\t\t\t\t\t\t\ttitle: () => <span class={\"ex-search__expand-title\"}>{item.title}</span>,\r\n\t\t\t\t\t\t\t\tvalue: () => <span class={\"ex-search__expand-trigger\"}>展开</span>,\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t</CollapseItem>\r\n\t\t\t\t\t),\r\n\t\t\t\t}}\r\n\t\t\t</Collapse>\r\n\t\t</div>\r\n\t)\r\n}\r\n\r\nexport default render\r\n","import { ref } from \"vue\"\r\nimport ExSelect from \"../../form/ExSelect.jsx\"\r\nimport ExCascader from \"../../form/ExCascader.jsx\"\r\nimport { Icon } from \"vant\"\r\n\r\nconst render = (item, queryForm, onSearch) => {\r\n\tconst selectRef = ref()\r\n\tconst cascadeRef = ref()\r\n\r\n\tlet renderItem\r\n\tif (item.type === \"select\") {\r\n\t\trenderItem = (\r\n\t\t\t<ExSelect\r\n\t\t\t\tref={selectRef}\r\n\t\t\t\tv-model={queryForm[item.key]}\r\n\t\t\t\toptions={item.options}\r\n\t\t\t\tclearable={true}\r\n\t\t\t\tonChange={onSearch}\r\n\t\t\t\tdefaultProps={item.defaultProps}\r\n\t\t\t>\r\n\t\t\t\t{() => (\r\n\t\t\t\t\t<div class={`ex-search__quick-trigger ${queryForm[item.key] ? \"active\" : \"\"}`}>\r\n\t\t\t\t\t\t<span class={\"ex-search__quick-label\"}>{selectRef.value?.displayText || item.title}</span>\r\n\t\t\t\t\t\t<span class={\"ex-search__quick-icon\"}>\r\n\t\t\t\t\t\t\t<Icon name={\"arrow-down\"}></Icon>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</ExSelect>\r\n\t\t)\r\n\t} else if (item.type === \"cascade\") {\r\n\t\trenderItem = (\r\n\t\t\t<ExCascader\r\n\t\t\t\tref={cascadeRef}\r\n\t\t\t\tv-model={queryForm[item.key]}\r\n\t\t\t\toptions={item.options}\r\n\t\t\t\tclearable={true}\r\n\t\t\t\ttitle={`搜索${item.title}`}\r\n\t\t\t\tonChange={onSearch}\r\n\t\t\t\tdefaultProps={item.defaultProps}\r\n\t\t\t>\r\n\t\t\t\t{() => (\r\n\t\t\t\t\t<div class={`ex-search__quick-trigger ${queryForm[item.key]?.length ? \"active\" : \"\"}`}>\r\n\t\t\t\t\t\t<span class={\"ex-search__quick-label\"}>{cascadeRef.value?.displayText || item.title}</span>\r\n\t\t\t\t\t\t<span class={\"ex-search__quick-icon\"}>\r\n\t\t\t\t\t\t\t<Icon name={\"arrow-down\"}></Icon>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</ExCascader>\r\n\t\t)\r\n\t}\r\n\r\n\treturn <div class={\"ex-search__quick-item\"}>{renderItem}</div>\r\n}\r\n\r\nexport default render\r\n","import ExSelect from \"../../form/ExSelect.jsx\"\r\nimport ExDate from \"../../form/ExDate.jsx\"\r\nimport ExDatetime from \"../../form/ExDatetime.jsx\"\r\nimport ExField from \"../../form/ExField.jsx\"\r\nimport ExNumber from \"../../form/ExNumber.jsx\"\r\n\r\nconst render = (item, queryForm) => {\r\n\tconst fieldElem = () => {\r\n\t\tconst fieldProps = { label: item.title, name: item.key, placeholder: `搜索${item.title}` }\r\n\r\n\t\tif (item.type === \"select\") {\r\n\t\t\treturn <ExSelect v-model={queryForm[item.key]} clearable={true} options={item.options} {...fieldProps} {...item.inputProps}></ExSelect>\r\n\t\t} else if (item.type === \"date\") {\r\n\t\t\treturn <ExDate v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExDate>\r\n\t\t} else if (item.type === \"datetime\") {\r\n\t\t\treturn <ExDatetime v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExDatetime>\r\n\t\t} else if (item.type === \"number\") {\r\n\t\t\treturn <ExNumber v-model={queryForm[item.key]} {...fieldProps} {...item.props}></ExNumber>\r\n\t\t}\r\n\r\n\t\treturn <ExField v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExField>\r\n\t}\r\n\r\n\treturn <div class={\"ex-search__popup-item ex-search__field-item\"}>{fieldElem()}</div>\r\n}\r\n\r\nexport default render\r\n","import { find, isArray, isBoolean, isFunction, isUndefined } from \"lodash-es\"\r\nimport { Button, Icon, Popup, Search } from \"vant\"\r\nimport { computed, defineComponent, nextTick, onMounted, reactive, ref, watch } from \"vue\"\r\nimport ExGrid from \"../grid/ExGrid.jsx\"\r\nimport { createExpand, createField, createQuick } from \"./components\"\r\nimport \"./index.less\"\r\nimport { useSm3, useCache } from \"../../hooks\"\r\n\r\n/**\r\n * ExSearch 搜索组件\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSearch\",\r\n\tprops: {\r\n\t\tmodelValue: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * @typedef {Object} ExSearchItemConfig 搜索项\r\n\t\t * @property {string} key 搜索项的 key\r\n\t\t * @property {string} title 搜索项的标题\r\n\t\t * @property {string} type 搜索项的类型\r\n\t\t * @property {boolean} [quick] 为 true 展示为快速检索项\r\n\t\t * @property {boolean|Object} [expandable] 搜索项是否展开\r\n\t\t * @property {Array|Function} [options] 搜索项的选项\r\n\t\t * @property {Object} [inputProps] 搜索项的输入框属性\r\n\t\t * @property {Function} [beforeSubmit] 在提交前修改搜索项的值\r\n\t\t * @property {*} [defaultValue] 搜索项的值\r\n\t\t * @property {*} [_temp] 搜索项的临时值[内部使用]\r\n\t\t * */\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * 搜索项的配置, 详见 [ExSearchItemConfig](#exsearchitemconfig-配置)\r\n\t\t *\r\n\t\t */\r\n\t\tcolumns: { type: Array, default: () => [] },\r\n\r\n\t\t/**\r\n\t\t * 占位提示文字\r\n\t\t */\r\n\t\tplaceholder: { type: String, default: \"请输入搜索关键词\" },\r\n\r\n\t\t/**\r\n\t\t * 名称,作为提交表单时的标识符\r\n\t\t */\r\n\t\tkeyword: { type: String, default: \"keyword\" },\r\n\r\n\t\t/**\r\n\t\t * 搜索框左侧文本\r\n\t\t */\r\n\t\tlabel: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 是否将输入框设为只读状态,只读状态下无法输入内容\r\n\t\t */\r\n\t\treadonly: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否禁用输入框\r\n\t\t */\r\n\t\tdisabled: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * 输入框内容对齐方式\r\n\t\t * @values left, right, center\r\n\t\t */\r\n\t\tinputAlign: { type: String, default: \"left\" },\r\n\r\n\t\t/**\r\n\t\t * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key\r\n\t\t */\r\n\t\tpersistence: { type: [Boolean, String], default: false },\r\n\r\n\t\t/**\r\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/search)\r\n\t\t */\r\n\t\tsearchProps: { type: Object, default: () => ({}) },\r\n\t},\r\n\temits: [\"update:modelValue\", \"search\"],\r\n\tsetup(props, { expose, emit }) {\r\n\t\tconst componentValue = ref(props.modelValue)\r\n\r\n\t\twatch(\r\n\t\t\t() => props.modelValue,\r\n\t\t\t() => {\r\n\t\t\t\tcomponentValue.value = props.modelValue\r\n\t\t\t},\r\n\t\t)\r\n\r\n\t\tconst state = reactive({\r\n\t\t\tqueryForm: {}, // 搜索表单\r\n\t\t\tshowFilterPopup: false,\r\n\t\t})\r\n\r\n\t\tconst genPersistenceKey = (prefix) => {\r\n\t\t\tif (!props.persistence) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t\tprefix = prefix || \"\"\r\n\t\t\tif (isBoolean(props.persistence)) {\r\n\t\t\t\treturn `exSearch_${prefix}` + useSm3(location.href)\r\n\t\t\t}\r\n\r\n\t\t\treturn `exSearch_${prefix}` + useSm3(location.pathname + \"_\" + props.persistence)\r\n\t\t}\r\n\r\n\t\tconst searchItemDefaultValue = (item) => {\r\n\t\t\tlet value = \"\"\r\n\t\t\t//如果是展开显示的,那么默认值为空字符串\r\n\t\t\t//如果展开为多选,那么默认值为 []\r\n\t\t\tif (item.expandable === \"multiple\" || item.type === \"cascade\") {\r\n\t\t\t\tvalue = []\r\n\t\t\t}\r\n\r\n\t\t\tif (item.defaultValue) {\r\n\t\t\t\tvalue = isFunction(item.defaultValue) ? item.defaultValue() : item.defaultValue\r\n\t\t\t}\r\n\r\n\t\t\tif ((item.type === \"date\" || item.type === \"datetime\") && !value) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\r\n\t\t\treturn value\r\n\t\t}\r\n\r\n\t\t//快速检索项\r\n\t\tconst quickColumns = computed(() => {\r\n\t\t\treturn props.columns.filter((item) => item.quick)\r\n\t\t})\r\n\r\n\t\t//表单搜索项\r\n\t\tconst fieldColumns = computed(() => {\r\n\t\t\treturn props.columns.filter((item) => !item.quick)\r\n\t\t})\r\n\r\n\t\tconst initQueryForm = () => {\r\n\t\t\tconst form = {}\r\n\r\n\t\t\tconst persistenceSearchData = props.persistence ? useCache(genPersistenceKey()).get({}) : {}\r\n\r\n\t\t\tprops.columns.forEach((item) => {\r\n\t\t\t\tlet value\r\n\t\t\t\tif (!isUndefined(persistenceSearchData[item.key])) {\r\n\t\t\t\t\tvalue = persistenceSearchData[item.key]\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalue = searchItemDefaultValue(item)\r\n\t\t\t\t}\r\n\t\t\t\tform[item.key] = value\r\n\t\t\t})\r\n\t\t\tstate.queryForm = form\r\n\t\t}\r\n\r\n\t\tinitQueryForm()\r\n\r\n\t\tconst onUpdateValue = (value) => {\r\n\t\t\temit(\"update:modelValue\", value)\r\n\t\t}\r\n\r\n\t\tconst getQueryForm = () => {\r\n\t\t\tconst form = {}\r\n\t\t\tObject.keys(state.queryForm).forEach((key) => {\r\n\t\t\t\tlet value = state.queryForm[key]\r\n\r\n\t\t\t\tlet filedItem = find(props.columns, { key })\r\n\t\t\t\tif (filedItem && filedItem.beforeSubmit && isFunction(filedItem.beforeSubmit)) {\r\n\t\t\t\t\tvalue = filedItem.beforeSubmit({\r\n\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\tqueryForm: state.queryForm, //改成将 form 传出去,这样可以在 form 中添加参数\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value && (!isArray(value) || value.length)) {\r\n\t\t\t\t\tform[key] = value\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\t\t\tif (componentValue.value) {\r\n\t\t\t\tform[props.keyword] = componentValue.value\r\n\t\t\t}\r\n\r\n\t\t\treturn form\r\n\t\t}\r\n\r\n\t\tconst onOpenFilter = () => {\r\n\t\t\tstate.showFilterPopup = true\r\n\t\t}\r\n\r\n\t\tconst onCloseFilter = () => {\r\n\t\t\tstate.showFilterPopup = false\r\n\t\t}\r\n\r\n\t\tconst onSearch = () => {\r\n\t\t\tnextTick(() => {\r\n\t\t\t\tconst form = getQueryForm()\r\n\t\t\t\tif (props.persistence) {\r\n\t\t\t\t\tuseCache(genPersistenceKey()).set(form)\r\n\t\t\t\t}\r\n\t\t\t\temit(\"search\", form)\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tconst onFieldSearch = () => {\r\n\t\t\tstate.showFilterPopup = false\r\n\t\t\tonSearch()\r\n\t\t}\r\n\r\n\t\tconst onClearFields = () => {\r\n\t\t\tfieldColumns.value.forEach((item) => {\r\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tconst reset = () => {\r\n\t\t\tfieldColumns.value.forEach((item) => {\r\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\r\n\t\t\t})\r\n\t\t\tquickColumns.value.forEach((item) => {\r\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\r\n\t\t\t})\r\n\t\t\tcomponentValue.value = \"\"\r\n\t\t}\r\n\r\n\t\tonMounted(() => {\r\n\t\t\tif (props.persistence) {\r\n\t\t\t\temit(\"search\", { persistence: true, ...getQueryForm() })\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\texpose({ reset, getQueryForm })\r\n\r\n\t\t/******************* render *********************/\r\n\r\n\t\tconst quickElems = () => {\r\n\t\t\treturn quickColumns.value.map((item) => createQuick(item, state.queryForm, onSearch))\r\n\t\t}\r\n\r\n\t\tconst popupHeaderElem = () => (\r\n\t\t\t<div class={\"ex-search-popup__header van-hairline--bottom\"}>\r\n\t\t\t\t<h2 class={\"ex-search-popup__title\"}>{props.title}</h2>\r\n\t\t\t\t<span class={\"ex-search-popup__closer\"}>\r\n\t\t\t\t\t<Icon\r\n\t\t\t\t\t\tname={\"cross\"}\r\n\t\t\t\t\t\tclass={\"van-badge__wrapper van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback\"}\r\n\t\t\t\t\t\tonClick={() => (state.showFilterPopup = false)}\r\n\t\t\t\t\t></Icon>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t)\r\n\r\n\t\tconst fieldElems = () => (\r\n\t\t\t<div class={\"ex-search-popup__content\"}>\r\n\t\t\t\t{fieldColumns.value.map((item) => (item.expandable ? createExpand(item, state.queryForm) : createField(item, state.queryForm)))}\r\n\t\t\t</div>\r\n\t\t)\r\n\r\n\t\tconst popupFooterElem = () => (\r\n\t\t\t<div class={\"ex-search-popup__footer van-hairline--top\"}>\r\n\t\t\t\t<ExGrid>\r\n\t\t\t\t\t{{\r\n\t\t\t\t\t\tdefault: () => [\r\n\t\t\t\t\t\t\t<Button type={\"default\"} size={\"small\"} round={true} onClick={onClearFields}>\r\n\t\t\t\t\t\t\t\t清除\r\n\t\t\t\t\t\t\t</Button>,\r\n\t\t\t\t\t\t\t<Button type={\"primary\"} size={\"small\"} round={true} onClick={onFieldSearch}>\r\n\t\t\t\t\t\t\t\t搜索\r\n\t\t\t\t\t\t\t</Button>,\r\n\t\t\t\t\t\t],\r\n\t\t\t\t\t}}\r\n\t\t\t\t</ExGrid>\r\n\t\t\t</div>\r\n\t\t)\r\n\r\n\t\tconst quickBarElem = () => {\r\n\t\t\tif (!quickColumns.value?.length && !fieldColumns.value?.length) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t\treturn (\r\n\t\t\t\t<div class={\"ex-search__quick-bar\"}>\r\n\t\t\t\t\t<div class={\"ex-search__quick-container\"}>{quickElems()}</div>\r\n\t\t\t\t\t{fieldColumns.value?.length ? (\r\n\t\t\t\t\t\t<div class={\"ex-search__filter\"} onClick={onOpenFilter}>\r\n\t\t\t\t\t\t\t筛选<Icon name={\"filter-o\"}></Icon>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t) : null}\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<div class=\"ex-search\">\r\n\t\t\t\t<form action=\"/\">\r\n\t\t\t\t\t<Search\r\n\t\t\t\t\t\tv-model={componentValue.value}\r\n\t\t\t\t\t\tname={props.keyword}\r\n\t\t\t\t\t\tshape={\"round\"}\r\n\t\t\t\t\t\tlabel={props.label}\r\n\t\t\t\t\t\tinputAlign={props.inputAlign}\r\n\t\t\t\t\t\tdisabled={props.disabled}\r\n\t\t\t\t\t\treadonly={props.readonly}\r\n\t\t\t\t\t\tplaceholder={props.placeholder}\r\n\t\t\t\t\t\tonUpdate:modelValue={onUpdateValue}\r\n\t\t\t\t\t\tonSearch={onSearch}\r\n\t\t\t\t\t\t{...props.searchProps}\r\n\t\t\t\t\t></Search>\r\n\t\t\t\t</form>\r\n\t\t\t\t{quickBarElem()}\r\n\t\t\t\t<Popup\r\n\t\t\t\t\tv-model:show={state.showFilterPopup}\r\n\t\t\t\t\tcloseable={false}\r\n\t\t\t\t\tposition={\"bottom\"}\r\n\t\t\t\t\tround={true}\r\n\t\t\t\t\tteleport={\"body\"}\r\n\t\t\t\t\tcloseOnPopstate={true}\r\n\t\t\t\t\tclass={`ex-search-popup`}\r\n\t\t\t\t\tsafeAreaInsetBottom={true}\r\n\t\t\t\t\tsafeAreaInsetTop={true}\r\n\t\t\t\t\tonClickOverlay={onCloseFilter}\r\n\t\t\t\t\tonClickCloseIcon={onCloseFilter}\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ default: () => [popupHeaderElem(), fieldElems(), popupFooterElem()] }}\r\n\t\t\t\t</Popup>\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import { defineComponent, inject, reactive, nextTick, ref, onMounted, onUnmounted } from \"vue\"\r\nimport { useFetch, useCache, useSm3 } from \"../../hooks\"\r\nimport { closeToast, Empty, List, Pagination, PullRefresh, showLoadingToast, Sticky } from \"vant\"\r\nimport ExSearch from \"../search/ExSearch.jsx\"\r\nimport \"./index.less\"\r\nimport { EX_PAGINATION } from \"../provider/ExProvider.jsx\"\r\nimport { isBoolean, isFunction, isObject, isUndefined, pick } from \"lodash-es\"\r\n\r\n/**\r\n * ExPagination 翻页\r\n *\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExPagination\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 下拉刷新的配置\r\n\t\t * true:表示启用下拉刷新\r\n\t\t * Object:用于PullRefresh组件的配置\r\n\t\t * [PullRefresh配置](https://vant-contrib.gitee.io/vant/#/zh-CN/pull-refresh)\r\n\t\t */\r\n\t\tpullRefresh: { type: [Boolean, Object], default: true },\r\n\r\n\t\t/**\r\n\t\t * ExSearch 搜索配置\r\n\t\t */\r\n\t\tsearch: { type: Object, default: null },\r\n\r\n\t\t/**\r\n\t\t * 是否Fix搜索栏\r\n\t\t * true:表示自动吸顶\r\n\t\t * Object:用于Sticky组件的配置,常用属性`offsetTop`\r\n\t\t * [Sticky配置](https://vant-contrib.gitee.io/vant/#/zh-CN/sticky)\r\n\t\t */\r\n\t\tsearchFixed: { type: [Boolean, Object], default: true },\r\n\r\n\t\t/**\r\n\t\t * 请求数据URL\r\n\t\t *\r\n\t\t */\r\n\t\turl: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 请求时的附带参数\r\n\t\t */\r\n\t\textraData: { type: Object, default: () => ({}) },\r\n\r\n\t\t/**\r\n\t\t * 是否自动加载\r\n\t\t */\r\n\t\tautoLoad: { type: Boolean, default: true },\r\n\r\n\t\t/**\r\n\t\t * 每页条数\r\n\t\t */\r\n\t\tpageSize: { type: Number, default: 10 },\r\n\r\n\t\t/**\r\n\t\t * 加载后数据的回调函数\r\n\t\t */\r\n\t\tafterFetched: { type: Function, default: null },\r\n\r\n\t\t/**\r\n\t\t * 数据为空文案\r\n\t\t */\r\n\t\temptyText: { type: String, default: \"暂无内容\" },\r\n\r\n\t\t/**\r\n\t\t * 加载完毕文案\r\n\t\t */\r\n\t\tfinishText: { type: String, default: \"加载完毕\" },\r\n\r\n\t\t/**\r\n\t\t * 加载错误文案\r\n\t\t */\r\n\t\terrorText: { type: String, default: \"加载失败,点击重新加载\" },\r\n\r\n\t\t/**\r\n\t\t * 滚动条与底部距离小于 offset 时触发 load 事件\r\n\t\t */\r\n\t\toffset: { type: [Number, String], default: 300 },\r\n\r\n\t\t/**\r\n\t\t * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key\r\n\t\t */\r\n\t\tpersistence: { type: [Boolean, String], default: false },\r\n\r\n\t\t/**\r\n\t\t * 是否单页模式\r\n\t\t */\r\n\t\tsinglePage: { type: Boolean, default: false },\r\n\r\n\t\t/**\r\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/list)\r\n\t\t */\r\n\t\tdefaultProps: { type: Object, default: () => ({}) },\r\n\t},\r\n\tsetup(props, { expose, slots }) {\r\n\t\tconst paginationProvider = inject(EX_PAGINATION, () => ({}))\r\n\t\tconst searchRef = ref(null)\r\n\r\n\t\tconst { currentPage: currentPageKey, pageSize: pageSizeKey } = paginationProvider.requestKeys\r\n\r\n\t\tconst genPersistenceKey = (prefix) => {\r\n\t\t\tif (!props.persistence) {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t\tprefix = prefix || \"\"\r\n\t\t\tif (isBoolean(props.persistence)) {\r\n\t\t\t\treturn `exPagination_${prefix}` + useSm3(location.href)\r\n\t\t\t}\r\n\r\n\t\t\treturn `exPagination_${prefix}` + useSm3(location.pathname + \"_\" + props.persistence)\r\n\t\t}\r\n\r\n\t\tlet persistencePagination = props.persistence ? useCache(genPersistenceKey()).get({}) : {}\r\n\r\n\t\tconst state = reactive({\r\n\t\t\titems: props.singlePage ? [] : persistencePagination.items || [],\r\n\t\t\tloading: false,\r\n\t\t\terror: persistencePagination.error || false,\r\n\t\t\terrorMessage: \"\",\r\n\t\t\ttotalSize: persistencePagination.totalSize || 0,\r\n\t\t\tcurrentPage: persistencePagination.currentPage || 1,\r\n\t\t\tfinished: persistencePagination.finished || false,\r\n\t\t\tempty: persistencePagination.empty || false,\r\n\t\t\tsearchParams: {},\r\n\t\t\toffsetTop: 0,\r\n\t\t\trefreshLoading: false,\r\n\t\t\tisFirstLoad: true,\r\n\t\t})\r\n\r\n\t\t/**\r\n\t\t * 持久化翻页与滚动\r\n\t\t */\r\n\t\tconst onPersistence = () => {\r\n\t\t\tif (!props.persistence) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\tconst data = {\r\n\t\t\t\tempty: state.empty,\r\n\t\t\t\tfinished: state.finished,\r\n\t\t\t\tcurrentPage: state.currentPage,\r\n\t\t\t\ttotalSize: state.totalSize,\r\n\t\t\t\terror: state.error,\r\n\t\t\t}\r\n\r\n\t\t\tif (!props.singlePage) {\r\n\t\t\t\tdata.items = state.items\r\n\t\t\t}\r\n\r\n\t\t\tuseCache(genPersistenceKey()).set(data)\r\n\t\t}\r\n\r\n\t\tconst onScroll = () => {\r\n\t\t\tif (props.persistence && !state.loading) {\r\n\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).set(window.scrollY)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tonMounted(() => {\r\n\t\t\twindow.addEventListener(\"scroll\", onScroll)\r\n\t\t})\r\n\r\n\t\tonUnmounted(() => {\r\n\t\t\twindow.removeEventListener(\"scroll\", onScroll)\r\n\t\t})\r\n\r\n\t\tconst loadMore = async (refresh) => {\r\n\t\t\tif (refresh) {\r\n\t\t\t\tstate.items = []\r\n\t\t\t\tstate.currentPage = 1\r\n\t\t\t\tstate.error = false\r\n\t\t\t\tstate.errorMessage = \"\"\r\n\t\t\t\tif (props.persistence) {\r\n\t\t\t\t\tuseCache(genPersistenceKey()).remove()\r\n\t\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).remove()\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet currentPage = state.currentPage ? state.currentPage : 1\r\n\r\n\t\t\t//如果是错误状态,重新加载时,从当前页开始加载\r\n\t\t\tif (state.error) {\r\n\t\t\t\tcurrentPage = state.currentPage || 1\r\n\t\t\t}\r\n\r\n\t\t\tif (props.singlePage) {\r\n\t\t\t\tshowLoadingToast({\r\n\t\t\t\t\tmessage: \"加载中...\",\r\n\t\t\t\t\tforbidClick: true,\r\n\t\t\t\t})\r\n\t\t\t}\r\n\r\n\t\t\tlet res\r\n\t\t\ttry {\r\n\t\t\t\tstate.loading = true\r\n\t\t\t\tres = await useFetch().get(props.url, {\r\n\t\t\t\t\tparams: {\r\n\t\t\t\t\t\t[currentPageKey]: currentPage,\r\n\t\t\t\t\t\t[pageSizeKey]: props.pageSize,\r\n\t\t\t\t\t\t...props.extraData,\r\n\t\t\t\t\t\t...state.searchParams,\r\n\t\t\t\t\t},\r\n\t\t\t\t})\r\n\t\t\t} catch (e) {\r\n\t\t\t\tstate.error = true\r\n\t\t\t\tstate.errorMessage = \"加载失败\"\r\n\t\t\t\tif (props.persistence) {\r\n\t\t\t\t\tonPersistence()\r\n\t\t\t\t}\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * @var {PaginationRes} res\r\n\t\t\t */\r\n\r\n\t\t\tif (props.afterFetched && isFunction(props.afterFetched)) {\r\n\t\t\t\tres = props.afterFetched(res)\r\n\t\t\t} else if (paginationProvider.afterFetched && isFunction(paginationProvider.afterFetched)) {\r\n\t\t\t\tres = paginationProvider.afterFetched(res)\r\n\t\t\t}\r\n\r\n\t\t\tif (res.errorMessage) {\r\n\t\t\t\tstate.error = true\r\n\t\t\t\tstate.errorMessage = res.errorMessage\r\n\t\t\t\tif (props.persistence) {\r\n\t\t\t\t\tonPersistence()\r\n\t\t\t\t}\r\n\t\t\t\treturn\r\n\t\t\t} else {\r\n\t\t\t\tstate.error = false\r\n\t\t\t\tstate.errorMessage = \"\"\r\n\t\t\t}\r\n\r\n\t\t\tstate.items = props.singlePage ? res.items : [...state.items, ...res.items]\r\n\t\t\tstate.currentPage = res.currentPage\r\n\t\t\tstate.empty = res.totalSize === 0\r\n\t\t\tstate.finished = res.totalSize <= state.items.length\r\n\t\t\tstate.totalSize = res.totalSize\r\n\r\n\t\t\tif (props.persistence) {\r\n\t\t\t\tonPersistence()\r\n\t\t\t}\r\n\r\n\t\t\tif (props.singlePage) {\r\n\t\t\t\tif (!state.isFirstLoad) {\r\n\t\t\t\t\t//如果有 persistence 则重置 scroll 来回到顶部\r\n\t\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).set(0)\r\n\t\t\t\t\twindow.scrollTo({ top: 0 })\r\n\t\t\t\t}\r\n\t\t\t\tcloseToast()\r\n\t\t\t}\r\n\r\n\t\t\tnextTick(() => {\r\n\t\t\t\tstate.isFirstLoad = false\r\n\t\t\t\tstate.refreshLoading = false\r\n\t\t\t\tstate.loading = false\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tconst onSearch = (searchData) => {\r\n\t\t\tconst isPersistence = !isUndefined(searchData.persistence) && searchData.persistence\r\n\r\n\t\t\tif (isPersistence) {\r\n\t\t\t\tdelete searchData.persistence\r\n\t\t\t}\r\n\r\n\t\t\tstate.searchParams = searchData\r\n\r\n\t\t\tloadMore(!isPersistence)\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 是否自动加载第一页数据\r\n\t\t * @returns {boolean}\r\n\t\t */\r\n\t\tconst onImmediateCheck = () => {\r\n\t\t\tif (!props.autoLoad) {\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\r\n\t\t\tif (state.isFirstLoad && props.persistence && state.items.length) {\r\n\t\t\t\treturn false\r\n\t\t\t}\r\n\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 瀑布形式自动加载\r\n\t\t */\r\n\t\tconst onLoad = () => {\r\n\t\t\t//state.searchParams = searchRef.value?.getQueryForm() || {}\r\n\t\t\tif (!state.isFirstLoad || (state.isFirstLoad && state.currentPage !== 1)) {\r\n\t\t\t\tstate.currentPage += 1\r\n\t\t\t}\r\n\t\t\tloadMore(false)\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 如果没有下拉刷新,并且自动加载,则手动加载一次\r\n\t\t * 如果是带 Search ,则由 Search 挂载后加载\r\n\t\t */\r\n\t\tif (props.singlePage && props.autoLoad && !props.search) {\r\n\t\t\tloadMore(!props.persistence)\r\n\t\t}\r\n\r\n\t\t/****************** exposed ******************/\r\n\r\n\t\t/**\r\n\t\t * 获取列表数据\r\n\t\t * @returns Array\r\n\t\t */\r\n\t\tconst items = () => {\r\n\t\t\treturn state.items || []\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * 设置列表数据\r\n\t\t * @param items\r\n\t\t */\r\n\t\tconst setItems = (items) => {\r\n\t\t\tstate.items = items\r\n\t\t}\r\n\r\n\t\texpose({\r\n\t\t\tloadMore,\r\n\t\t\titems,\r\n\t\t\tsetItems,\r\n\t\t\tpagination: pick(state, [\"loading\", \"finished\", \"empty\", \"error\", \"currentPage\"]),\r\n\t\t})\r\n\r\n\t\t/****************** render ******************/\r\n\t\tconst searchElem = () => {\r\n\t\t\tif (props.search) {\r\n\t\t\t\tif (props.searchFixed) {\r\n\t\t\t\t\tconst stickyObj = isObject(props.searchFixed) ? props.searchFixed : {}\r\n\t\t\t\t\t//给list添加一个top属性,用于计算顶部距离\r\n\t\t\t\t\tif (isObject(props.searchFixed) && props.searchFixed.offsetTop) {\r\n\t\t\t\t\t\tstate.offsetTop = props.searchFixed.offsetTop\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<Sticky {...stickyObj}>\r\n\t\t\t\t\t\t\t<div class={`ex-pagination__search`}>\r\n\t\t\t\t\t\t\t\t<ExSearch ref={searchRef} persistence={props.persistence} {...props.search} onSearch={onSearch}></ExSearch>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</Sticky>\r\n\t\t\t\t\t)\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<div class={`ex-pagination__search`}>\r\n\t\t\t\t\t\t\t<ExSearch ref={searchRef} persistence={props.persistence} {...props.search} onSearch={onSearch}></ExSearch>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn null\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst renderItems = () => {\r\n\t\t\tconst elems = state.items\r\n\t\t\t\t? state.items.map((item, index) =>\r\n\t\t\t\t\t\tslots.renderItem\r\n\t\t\t\t\t\t\t? slots.renderItem({\r\n\t\t\t\t\t\t\t\t\titem,\r\n\t\t\t\t\t\t\t\t\tindex,\r\n\t\t\t\t\t\t\t })\r\n\t\t\t\t\t\t\t: null,\r\n\t\t\t\t )\r\n\t\t\t\t: null\r\n\r\n\t\t\tnextTick(() => {\r\n\t\t\t\tif (props.persistence) {\r\n\t\t\t\t\tconst scrollY = useCache(genPersistenceKey(\"scroll\")).get(0)\r\n\t\t\t\t\twindow.scrollTo({ top: scrollY })\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\t\t\treturn elems\r\n\t\t}\r\n\r\n\t\tconst paginationElem = () => {\r\n\t\t\treturn (\r\n\t\t\t\t<div class={`ex-pagination`}>\r\n\t\t\t\t\t{searchElem()}\r\n\t\t\t\t\t{slots.prepend?.()}\r\n\r\n\t\t\t\t\t<div class={`ex-pagination__list`} style={{ paddingTop: `${state.offsetTop}px` }}>\r\n\t\t\t\t\t\t{state.empty ? (\r\n\t\t\t\t\t\t\t<Empty description={props.emptyText}></Empty>\r\n\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t<List\r\n\t\t\t\t\t\t\t\t\tv-model:loading={state.loading}\r\n\t\t\t\t\t\t\t\t\tv-model:error={state.error}\r\n\t\t\t\t\t\t\t\t\timmediateCheck={onImmediateCheck()}\r\n\t\t\t\t\t\t\t\t\tdisabled={props.singlePage}\r\n\t\t\t\t\t\t\t\t\tfinished={state.finished}\r\n\t\t\t\t\t\t\t\t\tfinishedText={props.finishText}\r\n\t\t\t\t\t\t\t\t\terrorText={state.errorMessage || props.errorText}\r\n\t\t\t\t\t\t\t\t\tonLoad={onLoad}\r\n\t\t\t\t\t\t\t\t\toffset={props.offset}\r\n\t\t\t\t\t\t\t\t\t{...props.defaultProps}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t{() => renderItems()}\r\n\t\t\t\t\t\t\t\t</List>\r\n\t\t\t\t\t\t\t\t{props.singlePage ? (\r\n\t\t\t\t\t\t\t\t\t<Pagination\r\n\t\t\t\t\t\t\t\t\t\tv-model={state.currentPage}\r\n\t\t\t\t\t\t\t\t\t\ttotalItems={state.totalSize}\r\n\t\t\t\t\t\t\t\t\t\tonChange={() => loadMore(false)}\r\n\t\t\t\t\t\t\t\t\t></Pagination>\r\n\t\t\t\t\t\t\t\t) : null}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\tconst refreshElem = () => {\r\n\t\t\tif (props.pullRefresh) {\r\n\t\t\t\tconst pullRefreshObj = isObject(props.pullRefresh) ? props.pullRefresh : {}\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<PullRefresh v-model={state.refreshLoading} class={`ex-pagination__refresh`} onRefresh={() => loadMore(true)} {...pullRefreshObj}>\r\n\t\t\t\t\t\t{() => paginationElem()}\r\n\t\t\t\t\t</PullRefresh>\r\n\t\t\t\t)\r\n\t\t\t} else {\r\n\t\t\t\treturn paginationElem()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn () => refreshElem()\r\n\t},\r\n})\r\n","import _ExPagination from \"./ExPagination.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExPagination = withInstall(_ExPagination)\r\nexport default ExPagination\r\n","import _ExSearch from \"./ExSearch.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExSearch = withInstall(_ExSearch)\r\nexport default ExSearch\r\n","import _ExUploader from \"./ExUploader.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExUploader = withInstall(_ExUploader)\r\nexport default ExUploader\r\n","import _ExGrid from \"./ExGrid.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\nexport const ExGrid = withInstall(_ExGrid)\r\nexport default ExGrid\r\n","import { defineComponent } from \"vue\"\r\nimport \"./index.less\"\r\nimport { genPixel } from \"../../utils/style.js\"\r\n\r\n/**\r\n * 装饰组件\r\n *\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExDecorator\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 自定义颜色\r\n\t\t * @values green, blue, black, orange\r\n\t\t */\r\n\t\tcolor: { type: String, default: \"green\" },\r\n\r\n\t\t/**\r\n\t\t * 高度\r\n\t\t */\r\n\t\theight: { type: [Number, String], default: \"auto\" },\r\n\t},\r\n\tsetup(props, { slots }) {\r\n\t\treturn () => (\r\n\t\t\t<div class={`ex-decorator ex-decorator__${props.color}`} style={{ height: genPixel(props.height) }}>\r\n\t\t\t\t{slots.default?.()}\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import _ExDecorator from \"./ExDecorator.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExDecorator = withInstall(_ExDecorator)\r\nexport default ExDecorator\r\n","import { defineComponent } from \"vue\"\r\nimport \"./index.less\"\r\nimport { genPixel } from \"../../utils/style\"\r\n\r\n/**\r\n * 块状导航\r\n *\r\n * @version 1.0.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSector\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 自定义颜色\r\n\t\t * @values green, blue, orange, red\r\n\t\t */\r\n\t\tcolor: { type: String, default: \"green\" },\r\n\t\t/**\r\n\t\t * 高度\r\n\t\t */\r\n\t\theight: { type: [Number, String], default: \"100px\" },\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\t\t/**\r\n\t\t * 副标题\r\n\t\t */\r\n\t\tsubtitle: { type: String, default: \"\" },\r\n\t},\r\n\tsetup(props, { slots }) {\r\n\t\tconst titleElem = () => {\r\n\t\t\tif (slots.title || props.title) {\r\n\t\t\t\treturn <div class={\"ex-sector__title\"}>{slots.title?.() || props.title}</div>\r\n\t\t\t}\r\n\t\t\treturn null\r\n\t\t}\r\n\t\tconst subtitleElem = () => {\r\n\t\t\tif (slots.subtitle || props.title) {\r\n\t\t\t\treturn <div class={\"ex-sector__subtitle\"}>{slots.subtitle?.() || props.subtitle}</div>\r\n\t\t\t}\r\n\t\t\treturn null\r\n\t\t}\r\n\r\n\t\treturn () => (\r\n\t\t\t<div class={`ex-sector ex-sector__${props.color}`} style={{ height: genPixel(props.height) }}>\r\n\t\t\t\t{titleElem()}\r\n\t\t\t\t{subtitleElem()}\r\n\t\t\t</div>\r\n\t\t)\r\n\t},\r\n})\r\n","import _ExSector from \"./ExSector.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExSector = withInstall(_ExSector)\r\nexport default ExSector\r\n","import { computed, defineComponent, nextTick, reactive, watch } from \"vue\"\r\nimport { Progress } from \"vant\"\r\nimport \"./index.less\"\r\nimport { ExButton, ExForm } from \"../../components\"\r\nimport { cloneDeep } from \"lodash-es\"\r\nimport { useProcessStatusSuccess } from \"../../hooks\"\r\n\r\n/**\r\n * 调查问卷\r\n * @version 4.4.0\r\n */\r\nexport default defineComponent({\r\n\tname: \"ExSurvey\",\r\n\tprops: {\r\n\t\t/**\r\n\t\t * 标题\r\n\t\t */\r\n\t\ttitle: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 问卷 slug\r\n\t\t */\r\n\t\tslug: { type: [Number, String], default: \"\", required: true },\r\n\t\t/**\r\n\t\t * 开场语\r\n\t\t */\r\n\t\tintro: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 结束语\r\n\t\t */\r\n\t\toutro: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t * 从哪个章节开始做\r\n\t\t */\r\n\t\tstartChapter: { type: Number, default: 0 },\r\n\r\n\t\t/**\r\n\t\t * 表单项\r\n\t\t */\r\n\t\tformItems: { type: Array, default: () => [], required: true },\r\n\r\n\t\t/**\r\n\t\t * 提交地址\r\n\t\t */\r\n\t\tsubmitUrl: { type: String, default: \"\" },\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * @typedef {Object} ExposedFormData\r\n\t\t * @property {Object} formatForm Format后的表单数据\r\n\t\t *\r\n\t\t *\r\n\t\t * 提交数据处理函数\r\n\t\t * @param {ExposedFormData} data\r\n\t\t * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据\r\n\t\t *\r\n\t\t */\r\n\t\tbeforeSubmit: { type: Function, default: null },\r\n\t},\r\n\temits: [\r\n\t\t/**\r\n\t\t * @event click\r\n\t\t * @param {Event} event 完结事件\r\n\t\t */\r\n\t\t\"finish\",\r\n\t],\r\n\r\n\tsetup(props, { emit }) {\r\n\t\tconst state = reactive({\r\n\t\t\tcurrentStep: \"intro\",\r\n\t\t\tformChapters: [], //二维数组,按章节存储\r\n\t\t\tcurrentChapter: 0, //当前章节\r\n\t\t})\r\n\r\n\t\tconst isLastChapter = computed(() => state.currentChapter === state.formChapters.length)\r\n\t\tconst progress = computed(() => (!state.formChapters.length ? 0 : (state.currentChapter / state.formChapters.length) * 100))\r\n\r\n\t\t// 将 props.formItems 按 break 划分成章节\r\n\t\tconst prepareFormItems = () => {\r\n\t\t\tlet chapter = [] //存储章节的数组\r\n\t\t\tconst formItems = cloneDeep(props.formItems)\r\n\t\t\tfor (let i = 0; i < formItems.length; i += 1) {\r\n\t\t\t\tconst item = formItems[i] // 这个是用于渲染的配置\r\n\t\t\t\titem.defaultSlots = {\r\n\t\t\t\t\tlabel: () => (\r\n\t\t\t\t\t\t<span style={{ marginBottom: \"10px\" }}>\r\n\t\t\t\t\t\t\t{i + 1}.{item.title}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t),\r\n\t\t\t\t}\r\n\t\t\t\tif (item.break) {\r\n\t\t\t\t\tif (chapter.length) {\r\n\t\t\t\t\t\tstate.formChapters.push(chapter)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdelete item.break\r\n\t\t\t\t\tchapter = [item]\r\n\t\t\t\t} else {\r\n\t\t\t\t\tchapter.push(item)\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (i === formItems.length - 1) {\r\n\t\t\t\t\tstate.formChapters.push(chapter)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twatch(\r\n\t\t\t() => props.formItems,\r\n\t\t\t() => {\r\n\t\t\t\tprepareFormItems()\r\n\t\t\t\tnextTick(() => {\r\n\t\t\t\t\tif (props.startChapter) {\r\n\t\t\t\t\t\tstate.currentChapter = Math.min(props.startChapter - 1, state.formChapters.length - 1)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t{ immediate: true },\r\n\t\t)\r\n\r\n\t\tconst onBeforeSubmit = ({ formatForm }) => {\r\n\t\t\tlet data = { slug: props.slug, answers: formatForm }\r\n\t\t\tif (props.beforeSubmit) {\r\n\t\t\t\treturn props.beforeSubmit(data)\r\n\t\t\t}\r\n\t\t\treturn data\r\n\t\t}\r\n\r\n\t\tconst onAfterSubmit = (res) => {\r\n\t\t\tuseProcessStatusSuccess(res, () => {\r\n\t\t\t\tstate.currentChapter += 1\r\n\t\t\t\tif (state.currentChapter === state.formChapters.length) {\r\n\t\t\t\t\tstate.currentStep = \"outro\"\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tconst onFinish = () => {\r\n\t\t\temit(\"finish\")\r\n\t\t}\r\n\r\n\t\tconst progressElem = () => {\r\n\t\t\treturn state.formChapters.length <= 1 || state.currentStep !== \"form\" ? null : (\r\n\t\t\t\t<div class={`ex-survey__progress`}>\r\n\t\t\t\t\t<Progress showPivot={false} percentage={progress.value}></Progress>\r\n\t\t\t\t</div>\r\n\t\t\t)\r\n\t\t}\r\n\r\n\t\tconst introElem = () =>\r\n\t\t\t(props.title || props.intro) && state.currentStep === \"intro\" ? (\r\n\t\t\t\t<div class={`ex-survey__intro`}>\r\n\t\t\t\t\t{props.title ? <div class={`ex-survey__title`}>{props.title}</div> : null}\r\n\t\t\t\t\t{props.intro || null}\r\n\t\t\t\t\t<ExButton type={\"primary\"} class={\"ex-survey__start-btn\"} onClick={() => (state.currentStep = \"form\")}>\r\n\t\t\t\t\t\t{() => \"开始\"}\r\n\t\t\t\t\t</ExButton>\r\n\t\t\t\t</div>\r\n\t\t\t) : null\r\n\r\n\t\tconst outroElem = () =>\r\n\t\t\tprops.intro && state.currentStep === \"outro\" ? (\r\n\t\t\t\t<div class={`ex-survey__outro`}>\r\n\t\t\t\t\t{props.outro || \"谢谢您的参与,祝您有美好的一天!\"}\r\n\t\t\t\t\t<ExButton type={\"primary\"} class={\"ex-survey__finish-btn\"} onClick={onFinish}>\r\n\t\t\t\t\t\t{() => \"完成\"}\r\n\t\t\t\t\t</ExButton>\r\n\t\t\t\t</div>\r\n\t\t\t) : null\r\n\r\n\t\tconst formElem = () => {\r\n\t\t\treturn state.currentStep === \"form\" ? (\r\n\t\t\t\t<div class={`ex-survey__form`}>\r\n\t\t\t\t\t<ExForm\r\n\t\t\t\t\t\tform={state.formChapters[state.currentChapter]}\r\n\t\t\t\t\t\tlabelWidth={\"100%\"}\r\n\t\t\t\t\t\tfixed={true}\r\n\t\t\t\t\t\tsubmitUrl={props.submitUrl}\r\n\t\t\t\t\t\tclosable={!isLastChapter.value && state.currentChapter !== 0}\r\n\t\t\t\t\t\tclose={() => (state.currentChapter -= 1)}\r\n\t\t\t\t\t\tcancelButtonText={\"上一步\"}\r\n\t\t\t\t\t\tsubmitButtonText={\"确定\"}\r\n\t\t\t\t\t\tbeforeSubmit={onBeforeSubmit}\r\n\t\t\t\t\t\tafterSubmit={onAfterSubmit}\r\n\t\t\t\t\t></ExForm>\r\n\t\t\t\t</div>\r\n\t\t\t) : null\r\n\t\t}\r\n\r\n\t\treturn () => <div class={`ex-survey`}>{[introElem(), progressElem(), formElem(), outroElem()]}</div>\r\n\t},\r\n})\r\n","import _ExSurvey from \"./ExSurvey.jsx\"\r\nimport withInstall from \"../../utils/withInstall\"\r\n\r\nexport const ExSurvey = withInstall(_ExSurvey)\r\nexport default ExSurvey\r\n","import * as components from \"./components\"\nimport * as businessComponents from \"./business-components\"\nimport { _configStatus } from \"./hooks\"\n\nexport * from \"./components\"\nexport * from \"./business-components\"\n\nconst totalComponents = Object.assign({}, components, businessComponents)\n\nexport default {\n\tinstall(app) {\n\t\tfor (const componentKey in totalComponents) {\n\t\t\t// eslint-disable-next-line import/namespace\n\t\t\tconst component = totalComponents[componentKey]\n\t\t\t//一些 hooks 和 数据并不需要 install\n\t\t\tif (component && component.install) {\n\t\t\t\tapp.use(component)\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * 用于配置一些全局的工具参数\n\t * @param httpStatus\n\t */\n\tconfig({ httpStatus }) {\n\t\tif (httpStatus && Object.keys(httpStatus).length) {\n\t\t\t_configStatus(httpStatus)\n\t\t}\n\t},\n}\n"],"names":["defineComponent","name","props","type","String","default","size","disabled","Boolean","round","block","text","icon","Object","iconPosition","fetcher","loading","buttonProps","emits","setup","emit","slots","onClick","e","defaultLabel","defaultSlot","_createVNode","Button","_mergeProps","withInstall","component","app","ExButton","_ExButton","ExTheme","_ExTheme","defaultFieldProps","defaultFieldSlots","defaultOptionsProps","prepareOptions","options","isFunction","cloneDeep","op","_a","isString","isNumber","recordOptionsUrl","optionsFetcher","resolve","useFetch","items","useOptionTrait","defaultOptions","fetchData","result","watch","useCache","_isSlot","s","prototype","toString","call","_isVNode","modelValue","Number","Array","mask","displayText","instance","getCurrentInstance","parent","exposed","state","reactive","value","showHelp","isLink","computed","readonly","isReadonly","onUpdateValue","helpElem","help","Popover","$event","reference","Icon","labelElem","label","inputElem","inputSlots","omit","keys","InputElem","input","length","console","warn","appendElem","append","appendResult","fieldSlots","pick","Field","placeholder","required","rules","onClickInput","fieldProps","showWordLimit","title","inset","closeable","expose","showPopup","ref","onClickWrapper","close","TriggerElem","trigger","Popup","pickerProps","pickerSlots","triggerElem","ExField","EX_UPLOADER","Symbol","EX_ADDRESS","EX_FORM","EX_SEARCH","EX_PAGINATION","uploader","uploadUrl","defaultFileItem","id","url","path","thumbUrl","address","addressUrl","displayTextType","afterFetched","optionKeys","children","form","format","search","maskClass","inputClass","pagination","requestKeys","currentPage","pageSize","provide","level","textInValue","addressProvider","inject","defaultAddressUrl","defaultDisplayTextType","defaultAfterFetched","textKey","valueKey","childrenKey","componentValue","setModelValue","isArray","last","pickerRef","mValue","map","item","optionsTexts","useFindTextsFromPath","join","cloneProps","dealOptions","localData","onFinish","selectedOptions","PickerWrapper","Cascader","defaultProps","useAddressFullCode","code","test","substr","useAddressNameFormCode","addressData","clearable","shownOptions","keyword","filterByText","data","filterRecursively","filter","hasKeyword","toLowerCase","includes","labels","useFindParentLabels","fieldNames","onClear","Search","width","_createTextVNode","onChange","CheckboxGroup","option","Checkbox","padZero","num","targetLength","str","Date","columnsType","getYear","isDayjs","year","getFullYear","getMonth","month","getDate","date","_setValueByColumns","forEach","column","push","prepareDate","defaultValue","onConfirm","selectedValues","now","index","isUndefined","DatePicker","onCancel","dateValue","timeValue","activeName","minDate","maxDate","weekdays","dateText","getDay","timeText","timeModel","hours","minutes","split","defaultDate","setDisplayText","getHours","getMinutes","onSelectDate","onTimeChange","dateString","Collapse","CollapseItem","fontWeight","height","Calendar","calendarProps","TimePicker","timeProps","margin","time","times","Stepper","RadioGroup","Radio","filterable","filterUrl","optionRender","Function","recordOptions","columns","find","Promise","get","then","opts","filterOnlineDataByKeyword","res","params","filterLocalDataByKeyword","onOpenWrapper","onSearch","onSearchClear","pickerSlotElem","elem","Form","_slot","Picker","Switch","Rate","Slider","button","accept","headers","maxSize","maxNum","multiple","action","afterUpload","extraData","uploadText","uploadIcon","disk","uploaderProps","uploaderProvider","defaultUploadUrl","urlKey","pathKey","nameKey","fileList","isImage","isSingle","processFileList","status","values","_type","_disk","submitFile","prepareFileList","uid","random","onMounted","isEqual","sort","onOversize","showToast","onSuccess","file","message","fileIndex","findIndex","response","onError","onDelete","onSubmit","files","formData","FormData","key","post","withCredentials","STATUS","STATE_CODE_SUCCESS","customSlot","Uploader","ExUploader","rows","row","initItemDefaultValue","existingData","submitForm","provider","isDate","_b","slice","i","remove","checked","render","isPicker","fieldPropsList","rule","pattern","RegExp","componentProps","merge","exProps","componentSlots","defaultSlots","renderItem","hidden","isBoolean","customRender","match","matchItem","ExSelect","ExDate","ExDatetime","ExTime","ExSwitch","ExRadio","ExCheckbox","ExAddress","ExCascader","ExNumber","ExRate","ExSlider","ExFieldUploader","error","validator","ExMatrixRadio","ExMatrixScale","ExMatrixCheckbox","formItem","break","unshift","Divider","dividerProps","labelWidth","colon","autoLoad","fetchUrl","fixed","submitUrl","submitButtonText","submitConfirmText","submitDisabled","closable","cancelButtonText","cacheable","beforeSubmit","afterSubmit","formProps","formRef","temporary","submitFetcher","isInitializing","submitFormBackup","formItems","formProvider","newV","initFormData","localStorage","set","deep","init","auto","isObject","every","fetchItem","cachedData","showConfirmDialog","lockScroll","catch","extractFormData","useProcessStatusSuccess","nextTick","finally","validate","itemsWithBeforeSubmit","useFormFormat","formatForm","originalForm","showSuccessToast","useFormFail","getFormStandalone","getForm","getFormRealtime","getField","setForm","fields","isDirty","reset","resetValidation","formItemElems","createFormItem","skeletonElem","Skeleton","footerElem","footer","buttonsElem","cancelBtn","submitBtn","nativeType","CellGroup","_useAddressFullCode","_useAddressNameFormCode","_addressData","_ExAddress","_ExField","_ExCascader","_ExCheckbox","_ExDate","_ExDatetime","_ExTime","_ExNumber","_ExRadio","_ExSelect","_ExSwitch","_ExRate","_ExSlider","_ExFieldUploader","_ExMatrixRadio","ExForm","_ExForm","ExProvider","_ExProvider","description","iconElem","extra","ExResult","_ExResult","canPromise","toSJISFunction","CODEWORDS_COUNT","utils","version","digit","f","kanji","exports","fromString","string","BitBuffer","bufIndex","bit","bitBuffer","BitMatrix","col","reserved","bitMatrix","getSymbolSize","require$$0","posCount","intervals","positions","coords","pos","posLength","j","FINDER_PATTERN_SIZE","finderPattern","PenaltyScores","points","sameCountCol","sameCountRow","lastCol","lastRow","module","bitsCol","bitsRow","darkCount","modulesCount","getMaskAt","maskPattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","p","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","errorCorrectionLevel","EXP_TABLE","LOG_TABLE","x","galoisField","y","GF","p1","p2","coeff","divident","divisor","offset","degree","poly","Polynomial","ReedSolomonEncoder","paddedData","remainder","start","buff","reedSolomonEncoder","versionCheck","numeric","alphanumeric","byte","regex","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","VersionCheck","Regex","require$$1","mode","dataStr","Utils","ECCode","require$$2","Mode","require$$3","require$$4","G18","G18_BCH","getBestVersionForDataLength","currentVersion","getReservedBitsCount","getTotalBitsFromDataArray","segments","totalBits","reservedBits","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","seg","ecl","d","G15","G15_MASK","G15_BCH","formatInfo","NumericData","group","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","encodeUtf8","point","second","ByteData","l","byteData","KanjiData","kanjiData","dijkstra","graph","predecessors","costs","open","closest","v","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","msg","nodes","u","T","t","a","b","cost","require$$5","require$$6","require$$7","getStringByteLength","getSegments","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","s1","s2","obj","getSegmentBitsLength","mergeSegments","segs","acc","curr","prevSeg","buildNodes","buildGraph","table","prevNodeIds","nodeGroup","currentNodeIds","node","n","prevNodeId","buildSingleSegment","modesHint","bestMode","array","optimizedSegs","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","matrix","c","setupTimingPattern","r","setupAlignmentPattern","setupVersionInfo","bits","mod","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","buffer","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","hex2rgba","hex","hexCode","hexValue","scale","qrSize","imgData","qr","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","ctx","canvas","getCanvasElement","qrData","canvasEl","image","rendererOpts","getColorAttrib","color","attrib","alpha","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","svgTag","cb","qrcodesize","bg","viewBox","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","args","argsNum","isLastArgCb","reject","browser","_","center","colorDark","colorLight","correctLevel","containerRef","create","toDataURL","light","onBeforeUpdate","ExQrcode","_ExQrcode","genPixel","isNull","direction","gutter","gridTemplateColumns","gridAutoFlow","gridRowGap","gridColumnGap","queryForm","_temp","activeNames","toggleChooseOption","expandable","indexOf","splice","isOptionActive","optionElems","ExGrid","selectRef","cascadeRef","fieldElem","inputProps","inputAlign","persistence","searchProps","showFilterPopup","genPersistenceKey","prefix","useSm3","location","href","pathname","searchItemDefaultValue","quickColumns","quick","fieldColumns","initQueryForm","persistenceSearchData","getQueryForm","filedItem","onOpenFilter","onCloseFilter","onFieldSearch","onClearFields","quickElems","createQuick","popupHeaderElem","fieldElems","createExpand","createField","popupFooterElem","quickBarElem","pullRefresh","searchFixed","emptyText","finishText","errorText","singlePage","paginationProvider","searchRef","currentPageKey","pageSizeKey","persistencePagination","errorMessage","totalSize","finished","empty","searchParams","offsetTop","refreshLoading","isFirstLoad","onPersistence","onScroll","window","scrollY","addEventListener","onUnmounted","removeEventListener","loadMore","refresh","showLoadingToast","forbidClick","scrollTo","top","closeToast","searchData","isPersistence","onImmediateCheck","onLoad","setItems","searchElem","stickyObj","Sticky","ExSearch","renderItems","elems","paginationElem","prepend","paddingTop","Empty","List","Pagination","refreshElem","pullRefreshObj","PullRefresh","onRefresh","ExPagination","_ExPagination","_ExSearch","_ExUploader","_ExGrid","ExDecorator","_ExDecorator","subtitle","titleElem","subtitleElem","ExSector","_ExSector","slug","intro","outro","startChapter","currentStep","formChapters","currentChapter","isLastChapter","progress","prepareFormItems","chapter","marginBottom","Math","min","immediate","onBeforeSubmit","answers","onAfterSubmit","progressElem","Progress","introElem","outroElem","formElem","ExSurvey","_ExSurvey","totalComponents","components","businessComponents","componentKey","httpStatus","_configStatus"],"mappings":"oPAQA,MAAeA,qBAAgB,CAC9BC,KAAM,WACNC,MAAO,CAKNC,KAAM,CAAEA,KAAMC,OAAQC,QAAS,SAAW,EAM1CC,KAAM,CAAEH,KAAMC,OAAQC,QAAS,QAAU,EAKzCE,SAAU,CAAEJ,KAAMK,QAASH,QAAS,EAAO,EAK3CI,MAAO,CAAEN,KAAMK,QAASH,QAAS,EAAM,EAKvCK,MAAO,CAAEP,KAAMK,QAASH,QAAS,EAAM,EAKvCM,KAAM,CAAER,KAAMC,OAAQC,QAAS,EAAI,EAMnCO,KAAM,CAAET,KAAMU,OAAQR,QAAS,IAAM,EAMrCS,aAAc,CAAEX,KAAMC,OAAQC,QAAS,MAAQ,EAM/CU,QAAS,CACRZ,KAAMU,OACNR,QAASA,KAAO,CAAEW,QAAS,IAC3B,EAKDC,YAAa,CACZd,KAAMU,OACNR,QAASA,KAAO,CAAA,EACjB,CACA,EACDa,MAAO,CAKN,OAAO,EAGRC,MAAMjB,EAAO,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wZ,UAAS,SAChB,CAAC6f,EAAc50B,OAASF,EAAM60B,iBAAmB,EAAC,MACrDhyB,IAAO7C,EAAM60B,gBAAkB,EAAE,iBACtB,MAAK,iBACL,KAAI,aACRS,EAAc,YACfE,CAAa,EAAA,IAAA,CAAA,CAAA,EAGzB,KAGL,MAAO,IAAAv4B,EAAA,YAAA,MAAA,CAAA,MAAmB,WAAU,EAAA,CAAG,CAAC04B,EAAS,EAAIF,EAAY,EAAII,IAAYD,GAAW,CAAC,CAAO,CACrG,CACD,CAAC,EC7LYE,GAAW14B,EAAY24B,EAAS,4GCIvCC,GAAkB,OAAO,OAAO,CAAA,EAAIC,GAAYC,EAAkB,EAEzDjsB,GAAA,CACd,QAAQ3M,EAAK,CACZ,UAAW64B,KAAgBH,GAAiB,CAE3C,MAAM34B,EAAY24B,GAAgBG,CAAY,EAE1C94B,GAAaA,EAAU,SAC1BC,EAAI,IAAID,CAAS,CAElB,CACD,EAMD,OAAO,CAAE,WAAA+4B,GAAc,CAClBA,GAAc,OAAO,KAAKA,CAAU,EAAE,QACzCC,EAAAA,cAAcD,CAAU,CAEzB,CACF","x_google_ignoreList":[12,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62]}
1
+ {"version":3,"file":"jobsys-explore.cjs","sources":["../components/button/ExButton.jsx","../utils/withInstall.js","../components/button/index.js","../components/theme/ExTheme.jsx","../components/theme/index.js","../components/utils.js","../components/form/ExField.jsx","../components/form/PickerWrapper.jsx","../components/provider/ExProvider.jsx","../components/form/ExAddress.jsx","../components/form/ExCascader.jsx","../components/form/ExCheckbox.jsx","../../../node_modules/.pnpm/vant@4.6.6_vue@3.4.38_typescript@4.9.5_/node_modules/vant/es/utils/format.mjs","../components/form/ExDate.jsx","../components/form/ExDatetime.jsx","../components/form/ExTime.jsx","../components/form/ExNumber.jsx","../components/form/ExRadio.jsx","../components/form/ExSelect.jsx","../components/form/ExSwitch.jsx","../components/form/ExRate.jsx","../components/form/ExSlider.jsx","../components/uploader/ExUploader.jsx","../components/form/ExFieldUploader.jsx","../components/form/ExMatrixRadio.jsx","../components/form/utils.js","../components/form/ExMatrixScale.jsx","../components/form/ExMatrixCheckbox.jsx","../components/form/FormItem.jsx","../components/form/ExForm.jsx","../components/form/index.js","../components/provider/index.js","../components/result/ExResult.jsx","../components/result/index.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/can-promise.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/utils.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-level.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-buffer.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/bit-matrix.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alignment-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/finder-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mask-pattern.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/error-correction-code.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/galois-field.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/polynomial.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/reed-solomon-encoder.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version-check.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/regex.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/mode.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/version.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/format-info.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/numeric-data.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/alphanumeric-data.js","../../../node_modules/.pnpm/encode-utf8@1.0.3/node_modules/encode-utf8/index.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/byte-data.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/kanji-data.js","../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/segments.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/core/qrcode.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/utils.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/canvas.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/renderer/svg-tag.js","../../../node_modules/.pnpm/qrcode@1.5.3/node_modules/qrcode/lib/browser.js","../components/qrcode/ExQrcode.jsx","../components/qrcode/index.js","../utils/style.js","../components/grid/ExGrid.jsx","../components/search/components/Expand.jsx","../components/search/components/Quick.jsx","../components/search/components/Field.jsx","../components/search/ExSearch.jsx","../components/pagination/ExPagination.jsx","../components/pagination/index.js","../components/search/index.js","../components/uploader/index.js","../components/grid/index.js","../components/decorator/ExDecorator.jsx","../components/decorator/index.js","../components/sector/ExSector.jsx","../components/sector/index.js","../business-components/survey/ExSurvey.jsx","../business-components/survey/index.js","../index.js"],"sourcesContent":["import { defineComponent } from \"vue\"\nimport { Button } from \"vant\"\nimport \"./index.less\"\n\n/**\n * 主题组件\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExButton\",\n\tprops: {\n\t\t/**\n\t\t * 按钮类型\n\t\t * @values primary, success, warning, danger\n\t\t */\n\t\ttype: { type: String, default: \"default\" },\n\n\t\t/**\n\t\t * 按钮大小\n\t\t * @values large, normal, small, mini\n\t\t */\n\t\tsize: { type: String, default: \"normal\" },\n\n\t\t/**\n\t\t * 失效状态\n\t\t */\n\t\tdisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否圆形按钮\n\t\t */\n\t\tround: { type: Boolean, default: true },\n\n\t\t/**\n\t\t * 是否块状按钮\n\t\t */\n\t\tblock: { type: Boolean, default: true },\n\n\t\t/**\n\t\t * 按钮标签\n\t\t */\n\t\ttext: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 按钮图标,需要使用\n\t\t *\n\t\t */\n\t\ticon: { type: Object, default: null },\n\n\t\t/**\n\t\t * 按钮图标位置\n\t\t * @values left, right\n\t\t */\n\t\ticonPosition: { type: String, default: \"left\" },\n\n\t\t/**\n\t\t * 请求状态控制器\n\t\t * @param {boolean} fetcher.loading 是否加载中\n\t\t */\n\t\tfetcher: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ loading: false }),\n\t\t},\n\n\t\t/**\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/button)\n\t\t */\n\t\tbuttonProps: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\temits: [\n\t\t/**\n\t\t * @event click\n\t\t * @param {Event} event 点击事件\n\t\t */\n\t\t\"click\",\n\t],\n\n\tsetup(props, { emit, slots }) {\n\t\tconst onClick = (e) => {\n\t\t\t/**\n\t\t\t * @event click 点击事件\n\t\t\t */\n\t\t\temit(\"click\", e)\n\t\t}\n\n\t\tconst defaultLabel = () => {\n\t\t\treturn props.text || slots.default?.()\n\t\t}\n\n\t\tconst defaultSlot = () => {\n\t\t\tif (props.icon && props.iconPosition === \"left\") {\n\t\t\t\treturn [props.icon, defaultLabel()]\n\t\t\t} else if (props.icon && props.iconPosition === \"right\") {\n\t\t\t\treturn [defaultLabel(), props.icon]\n\t\t\t}\n\t\t\treturn [defaultLabel()]\n\t\t}\n\n\t\treturn () => (\n\t\t\t<Button\n\t\t\t\tclass={\"ex-button\"}\n\t\t\t\tloading={props.fetcher.loading}\n\t\t\t\ttype={props.type}\n\t\t\t\tsize={props.size}\n\t\t\t\tdisabled={props.disabled}\n\t\t\t\tround={props.round}\n\t\t\t\tblock={props.block}\n\t\t\t\tonClick={onClick}\n\t\t\t\t{...props.buttonProps}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () => defaultSlot(),\n\t\t\t\t}}\n\t\t\t</Button>\n\t\t)\n\t},\n})\n","export default (component) => {\n\tcomponent.install = (app) => {\n\t\tconst name = component.name || component.__name\n\t\tapp.component(name, component)\n\t}\n\treturn component\n}\n","import _ExButton from \"./ExButton.jsx\"\nimport withInstall from \"../../utils/withInstall\"\nexport const ExButton = withInstall(_ExButton)\nexport default ExButton\n","import { defineComponent } from \"vue\"\nimport \"./index.less\"\n\n/**\n * 主题组件\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExTheme\",\n})\n","import _ExTheme from \"./ExTheme.jsx\"\nimport withInstall from \"../../utils/withInstall\"\nexport const ExTheme = withInstall(_ExTheme)\nexport default ExTheme\n","import { cloneDeep, isFunction, isNumber, isString } from \"lodash-es\"\nimport { watch } from \"vue\"\nimport { useCache, useFetch } from \"../hooks\"\n\n/**\n * 通用 field props\n */\nexport const defaultFieldProps = {\n\t/**\n\t * 输入框左侧文本\n\t */\n\tlabel: { type: String, default: \"\" },\n\n\t/**\n\t * 名称,作为提交表单时的标识符\n\t */\n\tname: { type: String, default: \"\" },\n\n\t/**\n\t * 输入框占位提示文字\n\t */\n\tplaceholder: { type: String, default: \"请填写\" },\n\n\t/**\n\t * 提示文案\n\t */\n\thelp: { type: [String, Function], default: \"\" },\n\n\t/**\n\t * 元素的append slot\n\t */\n\tappend: { type: [String, Function], default: \"\" },\n\n\t/**\n\t * 是否禁用输入框\n\t */\n\tdisabled: { type: Boolean, default: false },\n\n\t/**\n\t * 是否显示表单必填星号\n\t */\n\trequired: { type: Boolean, default: false },\n\n\t/**\n\t * 是否展示右侧箭头并开启点击反馈\n\t */\n\tisLink: { type: Boolean, default: false },\n\n\t/**\n\t * 是否为只读状态,只读状态下无法输入内容\n\t */\n\treadonly: { type: Boolean, default: false },\n\n\t/**\n\t * 表单校验规则\n\t */\n\trules: { type: Array, default: null },\n\n\t/**\n\t * 原生 [Field 配置](https://vant-contrib.gitee.io/vant/#/zh-CN/field)\n\t */\n\tfieldProps: { type: Object, default: () => ({}) },\n\n\t/**\n\t * 原生输入组件的 props\n\t */\n\tdefaultProps: { type: Object, default: () => ({}) },\n}\n\n/**\n * 原生 Field 的 slots\n * 用于从组合组件中挑选\n */\nexport const defaultFieldSlots = {\n\tlabel: () => null,\n\tinput: () => null,\n\t\"left-icon\": () => null,\n\t\"right-icon\": () => null,\n\tbutton: () => null,\n\t\"error-message\": () => null,\n\textra: () => null,\n}\n\n/**\n * 通用的 options props\n */\nexport const defaultOptionsProps = {\n\t/**\n\t * 选项\n\t */\n\toptions: { type: [Array, Function], default: () => [] },\n\n\t/**\n\t * 选项 url\n\t */\n\turl: { type: String, default: null },\n\n\t/**\n\t * 缓存url返回的数据\n\t */\n\turlCache: { type: Boolean, default: true },\n\n\t/**\n\t * 选项获取后的回调\n\t */\n\tafterFetched: { type: Function, default: null },\n}\n\n/**\n * Prepare options for select\n *\n * @param options\n * @return {Array}\n */\nexport const prepareOptions = (options) => {\n\toptions = isFunction(options) ? options() : options\n\toptions = cloneDeep(options).map((op) => {\n\t\tif (op.children?.length) {\n\t\t\top.children = prepareOptions(op.children)\n\t\t}\n\t\treturn isString(op) || isNumber(op) ? { value: op, label: op, text: op } : { text: op.label, ...op }\n\t})\n\treturn options\n}\n\n//内部方法,为了useOptionTrait实现单次请求,避免重复请求\nconst recordOptionsUrl = {}\nconst optionsFetcher = (props) => {\n\treturn new Promise((resolve) => {\n\t\tuseFetch()\n\t\t\t.get(props.url)\n\t\t\t.then((items) => {\n\t\t\t\tif (props.afterFetched) {\n\t\t\t\t\titems = props.afterFetched(items)\n\t\t\t\t}\n\t\t\t\tresolve(items)\n\t\t\t})\n\t})\n}\n/**\n * 初始化选项\n * @param options\n * @param props\n * @param {Array|Function} [defaultOptions]\n *\n * @return void\n */\nexport const useOptionTrait = async (options, props, defaultOptions) => {\n\toptions.value = prepareOptions(props.options)\n\n\tconst fetchData = async (props) => {\n\t\tif (recordOptionsUrl[props.url]) {\n\t\t\treturn recordOptionsUrl[props.url]\n\t\t}\n\t\trecordOptionsUrl[props.url] = optionsFetcher(props)\n\n\t\tconst result = await recordOptionsUrl[props.url]\n\t\trecordOptionsUrl[props.url] = null\n\t\treturn new Promise((resolve) => {\n\t\t\tresolve(result)\n\t\t})\n\t}\n\n\twatch(\n\t\t() => props.options,\n\t\t() => {\n\t\t\toptions.value = prepareOptions(props.options)\n\t\t},\n\t)\n\n\tif (!options.value.length) {\n\t\tif (props.url) {\n\t\t\tif (props.urlCache && useCache(props.url).get()) {\n\t\t\t\toptions.value = useCache(props.url).get()\n\t\t\t} else {\n\t\t\t\tfetchData(props).then((items) => {\n\t\t\t\t\toptions.value = items\n\t\t\t\t\tif (props.urlCache) {\n\t\t\t\t\t\tuseCache(props.url).set(items)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} else if (defaultOptions) {\n\t\t\toptions.value = defaultOptions\n\t\t}\n\t}\n}\n","import { computed, defineComponent, getCurrentInstance, reactive, watch } from \"vue\"\nimport { Field, Icon, Popover } from \"vant\"\nimport { defaultFieldProps, defaultFieldSlots } from \"../utils\"\nimport { omit, pick, isString } from \"lodash-es\"\n\n/**\n * ExField 输入框\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExField\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\t/**\n\t\t * 输入框内容\n\t\t */\n\t\tmodelValue: { type: [String, Number, Array, Object, Boolean], default: () => \"\" },\n\n\t\t/**\n\t\t * 输入框类型, 支持原生 input 标签的所有\n\t\t */\n\t\ttype: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否作为 Picker 的 Trigger\n\t\t */\n\t\tmask: { type: Boolean, default: false },\n\t},\n\temits: [\"update:modelValue\", \"click\"],\n\tsetup(props, { slots, emit }) {\n\t\tconst instance = getCurrentInstance()\n\t\tconst displayText = instance.parent?.parent?.exposed?.displayText\n\n\t\tconst state = reactive({\n\t\t\tvalue: props.mask ? displayText : props.modelValue,\n\t\t\tshowHelp: false,\n\t\t})\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => {\n\t\t\t\tstate.value = props.modelValue\n\t\t\t},\n\t\t)\n\n\t\tconst isLink = computed(() => (props.mask && !props.disabled && !props.readonly ? true : props.isLink))\n\t\tconst isReadonly = computed(() => (props.mask ? true : props.readonly))\n\n\t\tconst onUpdateValue = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\t/****************** render **********************/\n\n\t\tconst helpElem = () => {\n\t\t\tif (props.help) {\n\t\t\t\treturn (\n\t\t\t\t\t<Popover v-model:show={state.showHelp} theme={\"dark\"} placement={\"bottom-start\"}>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: () => <div class={\"ex-field__help\"}>{isString(props.help) ? props.help : props.help()}</div>,\n\t\t\t\t\t\t\treference: () =>\n\t\t\t\t\t\t\t\tprops.help ? (\n\t\t\t\t\t\t\t\t\t<span class={\"ex-field__help-handler\"}>\n\t\t\t\t\t\t\t\t\t\t<Icon name={\"warning-o\"}></Icon>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null,\n\t\t\t\t\t\t}}\n\t\t\t\t\t</Popover>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\t\tconst labelElem = () => (\n\t\t\t<div class={\"ex-field__label\"}>\n\t\t\t\t<span>{props.label || slots.label?.()}</span>\n\n\t\t\t\t{helpElem()}\n\t\t\t</div>\n\t\t)\n\n\t\tconst inputElem = () => {\n\t\t\tlet inputSlots = omit(slots, Object.keys(defaultFieldSlots))\n\t\t\tlet InputElem = slots.input ? slots.input() : null\n\n\t\t\tif (Object.keys(inputSlots).length) {\n\t\t\t\tif (InputElem.length > 1) {\n\t\t\t\t\tconsole.warn(\"More than one root element wrapped in ExField with input slots!\")\n\t\t\t\t}\n\t\t\t\tInputElem = InputElem[0]\n\t\t\t\treturn <InputElem>{inputSlots}</InputElem>\n\t\t\t}\n\t\t\treturn InputElem\n\t\t}\n\n\t\tconst appendElem = () => {\n\t\t\tif (props.append) {\n\t\t\t\tconst appendResult = isString(props.append) ? props.append : props.append()\n\t\t\t\treturn appendResult ? <div class={\"ex-field__append\"}>{appendResult}</div> : null\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\n\t\treturn () => {\n\t\t\tlet fieldSlots = pick(slots, Object.keys(defaultFieldSlots))\n\t\t\tif (!fieldSlots.label) {\n\t\t\t\tfieldSlots.label = labelElem\n\t\t\t}\n\n\t\t\tif (fieldSlots.input) {\n\t\t\t\tfieldSlots.input = inputElem\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div class={`ex-field`}>\n\t\t\t\t\t<Field\n\t\t\t\t\t\tv-model={state.value}\n\t\t\t\t\t\ttype={props.type}\n\t\t\t\t\t\tname={props.name}\n\t\t\t\t\t\tplaceholder={props.placeholder}\n\t\t\t\t\t\treadonly={isReadonly.value}\n\t\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\t\trequired={props.required}\n\t\t\t\t\t\tisLink={isLink.value}\n\t\t\t\t\t\trules={props.rules}\n\t\t\t\t\t\tonClickInput={() => emit(\"click\")}\n\t\t\t\t\t\tonUpdate:modelValue={onUpdateValue}\n\t\t\t\t\t\t{...props.fieldProps}\n\t\t\t\t\t\tshowWordLimit={isReadonly.value ? false : props.fieldProps?.showWordLimit}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ ...fieldSlots }}\n\t\t\t\t\t</Field>\n\t\t\t\t\t{appendElem()}\n\t\t\t\t</div>\n\t\t\t)\n\t\t}\n\t},\n})\n","import { defineComponent, ref } from \"vue\"\nimport { Popup } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { omit, pick } from \"lodash-es\"\nimport { defaultFieldProps } from \"../utils\"\n\nexport default defineComponent({\n\tname: \"PickerWrapper\",\n\n\tprops: {\n\t\t/**\n\t\t * Picker 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否启用卡片模式\n\t\t */\n\t\tinset: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否会弹窗\n\t\t */\n\t\tdisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否显示关闭\n\t\t */\n\t\tcloseable: { type: Boolean, default: true },\n\t},\n\temits: [\"close\", \"open\"],\n\tsetup: (props, { emit, slots, expose }) => {\n\t\tconst showPopup = ref(false)\n\n\t\tconst onClickWrapper = () => {\n\t\t\tif (props.disabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tshowPopup.value = true\n\t\t\temit(\"open\")\n\t\t}\n\n\t\tconst close = () => {\n\t\t\tshowPopup.value = false\n\t\t\temit(\"close\")\n\t\t}\n\n\t\texpose({ close })\n\n\t\treturn () => {\n\t\t\t// 为了让 ExField 的 onClickInput 事件才触发 Popup\n\t\t\t// 所以会手动获取 trigger slot 的第一个组件来手动监听 onClick 事件\n\t\t\t// 如果以后有需要多个组件的情况,再做调整\n\n\t\t\tlet TriggerElem = slots.trigger ? slots.trigger() : null\n\n\t\t\tif (TriggerElem && TriggerElem.length) {\n\t\t\t\tTriggerElem = TriggerElem[0]\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t<span class={\"ex-field-popup-wrapper\"}>\n\t\t\t\t\t<TriggerElem onClick={onClickWrapper}></TriggerElem>\n\t\t\t\t</span>,\n\n\t\t\t\t<Popup\n\t\t\t\t\tv-model:show={showPopup.value}\n\t\t\t\t\tcloseable={props.closeable}\n\t\t\t\t\tposition={\"bottom\"}\n\t\t\t\t\tround={true}\n\t\t\t\t\tteleport={\"body\"}\n\t\t\t\t\tcloseOnPopstate={true}\n\t\t\t\t\tclass={`ex-field-popup ${props.inset ? \"ex-field-popup-inset\" : \"\"}`}\n\t\t\t\t\tsafeAreaInsetBottom={true}\n\t\t\t\t\tsafeAreaInsetTop={true}\n\t\t\t\t\tonClickOverlay={close}\n\t\t\t\t\tonClickCloseIcon={close}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t\tprops.closeable ? (\n\t\t\t\t\t\t\t\t<div class={\"ex-field-popup__header\"}>\n\t\t\t\t\t\t\t\t\t<h2 class={\"ex-field-popup__title\"}>{props.title}</h2>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null,\n\t\t\t\t\t\t\tslots.default?.(),\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t</Popup>,\n\t\t\t]\n\t\t}\n\t},\n})\n\nexport const pickerProps = (props) => {\n\treturn {\n\t\ttitle: props.title || `请选择${props.label}`,\n\t\tdisabled: props.readonly || props.disabled,\n\t}\n}\n\nexport const pickerSlots = (slots, props) => {\n\tlet triggerElem = slots.default ? slots.default() : null\n\n\tif (!triggerElem) {\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\t\t// default slot 是 trigger, 其它的 slots 全部传给 ExField\n\t\tconst fieldSlots = omit(slots, \"default\")\n\n\t\ttriggerElem = (\n\t\t\t<ExField {...fieldProps} mask={true}>\n\t\t\t\t{fieldSlots}\n\t\t\t</ExField>\n\t\t)\n\t}\n\n\treturn {\n\t\ttrigger: () => triggerElem,\n\t}\n}\n","import { defineComponent, provide } from \"vue\"\n\nexport const EX_UPLOADER = Symbol(\"EX_UPLOADER\")\nexport const EX_ADDRESS = Symbol(\"EX_ADDRESS\")\nexport const EX_FORM = Symbol(\"EX_FORM\")\nexport const EX_SEARCH = Symbol(\"EX_SEARCH\")\nexport const EX_PAGINATION = Symbol(\"EX_PAGINATION\")\n\n/**\n * Explore 配置组件\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExProvider\",\n\t/**\n\t * @typedef {Object} ProviderProps\n\t * @property {UploaderProviderProps} [uploader] `ExUploader` 配置\n\t * @property {AddressProviderProps} [address] `ExAddress` 配置\n\t * @property {FormProviderProps} [form] `ExForm` 配置\n\t * @property {SearchProviderProps} [search] `ExSearch` 配置\n\t * @property {PaginationProviderProps} [pagination] `ExPagination` 配置\n\t *\n\t */\n\tprops: {\n\t\t/**\n\t\t * @typedef {Object} UploaderProviderProps `ExUploader` 配置\n\t\t * @property {string} uploadUrl 上传地址\n\t\t * @property {UploadFileItem} defaultFileItem 默认文件项\n\t\t *\n\t\t * @typedef {Object} UploadFileItem 文件项\n\t\t * @property {string} [id] 文件 ID\n\t\t * @property {string} [name] 文件名\n\t\t * @property {string} defaultFileItem.url 文件地址\n\t\t * @property {string} defaultFileItem.path 文件路径\n\t\t * @property {string} [thumbUrl] 缩略图地址\n\t\t */\n\t\tuploader: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tuploadUrl: \"\",\n\t\t\t\tdefaultFileItem: {\n\t\t\t\t\tid: \"id\",\n\t\t\t\t\tname: \"name\",\n\t\t\t\t\turl: \"url\",\n\t\t\t\t\tpath: \"path\",\n\t\t\t\t\tthumbUrl: \"thumbUrl\",\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * @typedef {Object} AddressProviderProps `ExAddress` 配置\n\t\t * @property {string} addressUrl 选项请求地址\n\t\t * @property {string} displayTextType 显示值的类型。\"all\": 所有, last:最后选中的值\n\t\t * @property {Function} [afterFetched] 处理接口返回数据的函数\n\t\t * @property {AddressOptionKeys} optionKeys 地址选项键名\n\t\t *\n\t\t * @typedef {Object} AddressOptionKeys 地址选项键名\n\t\t * @property {string} optionKeys.value 选项对应的值\n\t\t * @property {string} optionKeys.text 选项文字\n\t\t * @property {string} optionKeys.children 子选项列表\n\t\t */\n\t\taddress: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\taddressUrl: \"\",\n\t\t\t\tdisplayTextType: \"\",\n\t\t\t\tafterFetched: null,\n\t\t\t\toptionKeys: {\n\t\t\t\t\tvalue: \"code\",\n\t\t\t\t\ttext: \"name\",\n\t\t\t\t\tchildren: \"children\",\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * @typedef {Object} FormProviderProps `ExForm` 配置\n\t\t * @property {Object} [format] 格式化配置, 如 {date: true} 表示在提交表单时使用 `useFormFormat` 格式所有日期字段\n\t\t * @property {Function} [afterFetched] 处理接口返回数据的函数\n\t\t */\n\t\tform: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tformat: {},\n\t\t\t\tafterFetched: null,\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * @typedef {Object} SearchProviderProps `ExSearch` 配置\n\t\t * @property {Object} [maskClass] 定制伪 Input 样式\n\t\t * @property {Object} [inputClass] 弹层中 Input 的样式\n\t\t */\n\t\tsearch: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tmaskClass: \"\",\n\t\t\t\tinputClass: \"\",\n\t\t\t}),\n\t\t},\n\n\t\t/**\n\t\t * @typedef {Object} PaginationRes\n\t\t * @property {Array} items 数据\n\t\t * @property {number} currentPage 当前页码\n\t\t * @property {number} totalSize 总条数\n\t\t * @property {String} [errorMessage] 错误信息\n\t\t */\n\n\t\t/**\n * @typedef {Object} PaginationProviderProps `ExPagination` 配置\n * @property {function():PaginationRes} [afterFetched] 处理接口返回数据的函数\n * @property {PaginationRequestKeys} [requestKeys] 请求参数键名\n * /\n\n /**\n * @typedef {Object} PaginationRequestKeys 请求参数键名\n * @property {string} [currentPage] 当前页码\n * @property {string} [pageSize] 每页条数\n */\n\t\tpagination: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({\n\t\t\t\tafterFetched: null,\n\t\t\t\trequestKeys: {\n\t\t\t\t\tcurrentPage: \"currentPage\",\n\t\t\t\t\tpageSize: \"pageSize\",\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t},\n\tsetup(props, { slots }) {\n\t\tprovide(EX_UPLOADER, {\n\t\t\tuploadUrl: props.uploader?.uploadUrl || \"\",\n\t\t\tdefaultFileItem: {\n\t\t\t\tid: \"id\",\n\t\t\t\tname: \"name\",\n\t\t\t\turl: \"url\",\n\t\t\t\tpath: \"path\",\n\t\t\t\tthumbUrl: \"thumbUrl\",\n\t\t\t\t...props.uploader?.defaultFileItem,\n\t\t\t},\n\t\t})\n\t\tprovide(EX_ADDRESS, {\n\t\t\taddressUrl: props.address?.addressUrl || \"\",\n\t\t\tdisplayTextType: props.address?.displayTextType || \"\",\n\t\t\tafterFetched: props.address?.afterFetched,\n\t\t\toptionKeys: {\n\t\t\t\tvalue: \"code\",\n\t\t\t\ttext: \"name\",\n\t\t\t\tchildren: \"children\",\n\t\t\t\t...props.address?.optionKeys,\n\t\t\t},\n\t\t})\n\t\tprovide(EX_FORM, { format: {}, ...props.form })\n\t\tprovide(EX_SEARCH, {\n\t\t\tmaskClass: \"\",\n\t\t\tinputClass: \"\",\n\t\t\t...props.search,\n\t\t})\n\t\tprovide(EX_PAGINATION, {\n\t\t\tafterFetched: props.pagination?.afterFetched,\n\t\t\trequestKeys: {\n\t\t\t\tcurrentPage: \"currentPage\",\n\t\t\t\tpageSize: \"pageSize\",\n\t\t\t\t...props.pagination?.requestKeys,\n\t\t\t},\n\t\t})\n\n\t\treturn () => <div>{slots.default?.()}</div>\n\t},\n})\n","import { computed, defineComponent, inject, ref, watch } from \"vue\"\nimport { Cascader } from \"vant\"\nimport localData from \"./addressData.json\"\nimport PickerWrapper, { pickerProps, pickerSlots } from \"./PickerWrapper.jsx\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { cloneDeep, isArray, last } from \"lodash-es\"\nimport { useFindTextsFromPath } from \"../../hooks\"\nimport { EX_ADDRESS } from \"../provider/ExProvider.jsx\"\n\n/**\n * 地址组件\n *\n * 数据优先级:`dataSource` > `url` > `本地数据`\n *\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExAddress\",\n\tprops: {\n\t\t...defaultOptionsProps,\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [String, Number, Array], default: () => [] },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 生成哪个级别的数据\n\t\t * 1: 省, 2: 省市, 3: 省市区\n\t\t */\n\t\tlevel: { type: Number, default: 3 },\n\n\t\t/**\n\t\t * 显示值的类型\n\t\t * 空值或all: 所有, last:最后\n\t\t */\n\t\tdisplayTextType: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否把选项的值返回到modelValue\n\t\t */\n\t\ttextInValue: { type: Boolean, default: false },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots, expose }) {\n\t\tconst addressProvider = inject(EX_ADDRESS, () => ({}))\n\t\tconst defaultAddressUrl = addressProvider.addressUrl || \"\"\n\t\tconst defaultDisplayTextType = addressProvider.displayTextType || \"\"\n\t\tconst defaultAfterFetched = addressProvider.afterFetched || \"\"\n\t\tconst optionKeys = addressProvider.optionKeys || {}\n\n\t\tconst { text: textKey, value: valueKey, children: childrenKey } = optionKeys\n\n\t\tconst componentValue = ref(\"\")\n\n\t\tconst setModelValue = () => {\n\t\t\tlet value = isArray(props.modelValue) ? last(props.modelValue) : props.modelValue\n\t\t\tif (props.textInValue && value) {\n\t\t\t\tvalue = value[valueKey]\n\t\t\t}\n\t\t\tcomponentValue.value = value\n\t\t}\n\t\tsetModelValue()\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => setModelValue(),\n\t\t)\n\n\t\tconst pickerRef = ref(null)\n\t\tconst options = ref([])\n\n\t\tconst displayText = computed(() => {\n\t\t\tif (props.modelValue.length === 0) {\n\t\t\t\treturn \"\"\n\t\t\t}\n\t\t\tconst displayTextType = props.displayTextType || defaultDisplayTextType\n\n\t\t\t//textInValue状态下的初始值\n\t\t\tif (props.textInValue && props.modelValue && props.modelValue.length === 1) {\n\t\t\t\treturn last(props.modelValue)[textKey]\n\t\t\t}\n\n\t\t\t//反向赋值\n\t\t\tconst mValue = props.textInValue ? props.modelValue.map((item) => item[valueKey]) : props.modelValue\n\t\t\tconst optionsTexts = useFindTextsFromPath(options.value, mValue, {\n\t\t\t\tvalue: valueKey,\n\t\t\t\tchildren: childrenKey,\n\t\t\t\tlabel: textKey,\n\t\t\t})\n\n\t\t\treturn displayTextType === \"last\" ? last(optionsTexts) : optionsTexts.join(\"/\")\n\t\t})\n\n\t\t//把默认值赋值给props\n\t\tconst cloneProps = cloneDeep(props)\n\t\tif (!cloneProps.url && defaultAddressUrl) {\n\t\t\tcloneProps.url = defaultAddressUrl\n\t\t}\n\t\tif (!cloneProps.afterFetched && defaultAfterFetched) {\n\t\t\tcloneProps.afterFetched = defaultAfterFetched\n\t\t}\n\t\t//先处理好 options\n\t\tconst dealOptions = () => {\n\t\t\tuseOptionTrait(options, cloneProps, localData)\n\t\t}\n\t\tdealOptions()\n\n\t\twatch(\n\t\t\t() => props.options,\n\t\t\t() => {\n\t\t\t\tdealOptions()\n\t\t\t},\n\t\t)\n\n\t\tconst onFinish = ({ selectedOptions }) => {\n\t\t\tpickerRef.value.close()\n\t\t\temit(\"update:modelValue\", props.textInValue ? selectedOptions : selectedOptions.map((item) => item[valueKey]))\n\t\t}\n\n\t\texpose({ displayText })\n\n\t\t/********** render **********/\n\n\t\treturn () => (\n\t\t\t<PickerWrapper ref={pickerRef} {...pickerProps(props)}>\n\t\t\t\t{{\n\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t<Cascader\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tfieldNames={{ text: textKey, value: valueKey, children: childrenKey }}\n\t\t\t\t\t\t\tcloseable={false}\n\t\t\t\t\t\t\tshowHeader={false}\n\t\t\t\t\t\t\toptions={options.value}\n\t\t\t\t\t\t\tonFinish={onFinish}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</PickerWrapper>\n\t\t)\n\t},\n})\n\n/**\n *\n * 根据地址编码获取完整的地址编码\n *\n * @param code\n * @param {number} [level] 地址级别: 1: 省, 2: 省市, 3: 省市区\n * @return {string[]|(string|*)[]|*[]}\n */\nexport function useAddressFullCode(code, level) {\n\tcode += \"\"\n\tif (code && code.length === 6) {\n\t\tif (!level) {\n\t\t\tif (/0000$/.test(code)) {\n\t\t\t\tlevel = 1\n\t\t\t} else if (/00$/.test(code)) {\n\t\t\t\tlevel = 2\n\t\t\t} else {\n\t\t\t\tlevel = 3\n\t\t\t}\n\t\t}\n\t\tif (level === 1) {\n\t\t\treturn [`${code.substr(0, 2)}0000`]\n\t\t}\n\t\tif (level === 2) {\n\t\t\treturn [`${code.substr(0, 2)}0000`, `${code.substr(0, 4)}00`]\n\t\t}\n\t\tif (level === 3) {\n\t\t\treturn [`${code.substr(0, 2)}0000`, `${code.substr(0, 4)}00`, code]\n\t\t}\n\t}\n\treturn []\n}\n\n/**\n * 根据地址编码获取完整的地址名称\n * @param code\n * @param {number} [level] 地址级别: 1: 省, 2: 省市, 3: 省市区\n * @return {*[]}\n */\nexport function useAddressNameFormCode(code, level) {\n\tif (!isArray(code)) {\n\t\tcode = useAddressFullCode(code, level)\n\t}\n\treturn useFindTextsFromPath(localData, code, { value: \"code\", label: \"name\", children: \"children\" })\n}\n\nexport const addressData = localData\n","import { computed, defineComponent, ref, watch } from \"vue\"\nimport PickerWrapper, { pickerProps, pickerSlots } from \"./PickerWrapper.jsx\"\nimport { Button, Cascader, Search } from \"vant\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { useFindParentLabels } from \"../../hooks\"\nimport { cloneDeep, isArray, last } from \"lodash-es\"\n\n/**\n * ExCascader 级联选择\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExCascader\",\n\tprops: {\n\t\t...defaultOptionsProps,\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Array, String], default: () => [] },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否显示清除按钮\n\t\t */\n\t\tclearable: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 显示值的类型\n\t\t * 空值或all: 所有, last:最后\n\t\t */\n\t\tdisplayTextType: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否把选项的值返回到modelValue\n\t\t */\n\t\ttextInValue: { type: Boolean, default: false },\n\t},\n\temits: [\"update:modelValue\", \"change\"],\n\tsetup(props, { emit, slots, expose }) {\n\t\tconst componentValue = ref(\"\")\n\n\t\tconst setModelValue = () => {\n\t\t\tlet value = isArray(props.modelValue) ? last(props.modelValue) : props.modelValue\n\t\t\tif (props.textInValue && value) {\n\t\t\t\tvalue = value.value\n\t\t\t}\n\t\t\tcomponentValue.value = value\n\t\t}\n\t\tsetModelValue()\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => setModelValue(),\n\t\t)\n\n\t\tconst pickerRef = ref(null)\n\n\t\tconst options = ref([]) //整理后的原始 Options\n\t\tconst shownOptions = ref([]) //根据 keyword 过滤后的 Options\n\t\tconst keyword = ref(\"\")\n\n\t\t//先处理好 options\n\t\tconst dealOptions = () => {\n\t\t\tuseOptionTrait(options, props)\n\t\t\tshownOptions.value = options.value\n\t\t}\n\t\tdealOptions()\n\n\t\twatch(\n\t\t\t() => props.options,\n\t\t\t() => {\n\t\t\t\tdealOptions()\n\t\t\t},\n\t\t)\n\n\t\twatch(\n\t\t\t() => keyword.value,\n\t\t\t(keyword) => {\n\t\t\t\tcomponentValue.value = \"\"\n\t\t\t\tif (keyword) {\n\t\t\t\t\tshownOptions.value = filterByText(cloneDeep(options.value), keyword)\n\t\t\t\t} else {\n\t\t\t\t\tshownOptions.value = options.value\n\t\t\t\t}\n\t\t\t},\n\t\t)\n\n\t\tconst filterByText = (data, keyword) => {\n\t\t\t// 递归函数,用于过滤每一层级的数据\n\t\t\tfunction filterRecursively(items) {\n\t\t\t\treturn items.filter((item) => {\n\t\t\t\t\t// 判断是否包含关键字\n\t\t\t\t\tlet hasKeyword = item.text.toLowerCase().includes(keyword.toLowerCase())\n\t\t\t\t\tif (item.children && item.children.length) {\n\t\t\t\t\t\titem.children = filterRecursively(item.children)\n\t\t\t\t\t\tif (item.children.length) {\n\t\t\t\t\t\t\thasKeyword = true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// 如果包含关键字,或者有子级包含关键字,则保留该项\n\t\t\t\t\treturn hasKeyword\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// 调用递归函数开始过滤\n\t\t\treturn filterRecursively(data)\n\t\t}\n\n\t\tconst displayText = computed(() => {\n\t\t\tif (!componentValue.value) {\n\t\t\t\treturn \"\"\n\t\t\t}\n\n\t\t\tconst labels = useFindParentLabels(options.value, componentValue.value, props.defaultProps?.fieldNames)\n\n\t\t\treturn labels ? (props.displayTextType === \"last\" ? last(labels) : labels.join(\"/\")) : \"\"\n\t\t})\n\n\t\tconst onFinish = ({ selectedOptions }) => {\n\t\t\tconst value = props.textInValue ? selectedOptions : selectedOptions.map((item) => item.value)\n\t\t\temit(\"change\", value)\n\t\t\temit(\"update:modelValue\", value)\n\t\t\tpickerRef.value.close()\n\t\t}\n\n\t\tconst onClear = () => {\n\t\t\temit(\"change\", [])\n\t\t\temit(\"update:modelValue\", [])\n\t\t\tpickerRef.value.close()\n\t\t}\n\n\t\texpose({ displayText })\n\n\t\treturn () => (\n\t\t\t<PickerWrapper ref={pickerRef} {...pickerProps(props)}>\n\t\t\t\t{{\n\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t<Cascader\n\t\t\t\t\t\t\tclass={\"ex-cascader\"}\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tcloseable={false}\n\t\t\t\t\t\t\tshowHeader={true}\n\t\t\t\t\t\t\toptions={shownOptions.value}\n\t\t\t\t\t\t\tonFinish={onFinish}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\ttitle: () => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<Search shape={\"round\"} placeholder={\"选项搜索\"} v-model={keyword.value} style={{ width: \"100%\" }}></Search>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</Cascader>,\n\t\t\t\t\t\tprops.clearable ? (\n\t\t\t\t\t\t\t<div class={\"ex-field-popup__clear-btn\"}>\n\t\t\t\t\t\t\t\t<Button block type={\"primary\"} plain={true} round={true} onClick={onClear}>\n\t\t\t\t\t\t\t\t\t清除\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null,\n\t\t\t\t\t],\n\t\t\t\t}}\n\t\t\t</PickerWrapper>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { Checkbox, CheckboxGroup } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExCheckbox 多选\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExCheckbox\",\n\tprops: {\n\t\t...defaultFieldProps,\n\t\t...defaultOptionsProps,\n\n\t\tmodelValue: { type: Array, default: () => [] },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst options = ref([])\n\n\t\tuseOptionTrait(options, props)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<CheckboxGroup\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\t\t\toptions.value.map((option) => <Checkbox name={option.value}>{{ default: () => option.text }}</Checkbox>),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</CheckboxGroup>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { inBrowser } from \"./basic.mjs\";\nimport { windowWidth, windowHeight } from \"./dom.mjs\";\nimport { isDef, isNumeric } from \"./basic.mjs\";\nfunction addUnit(value) {\n if (isDef(value)) {\n return isNumeric(value) ? `${value}px` : String(value);\n }\n return void 0;\n}\nfunction getSizeStyle(originSize) {\n if (isDef(originSize)) {\n if (Array.isArray(originSize)) {\n return {\n width: addUnit(originSize[0]),\n height: addUnit(originSize[1])\n };\n }\n const size = addUnit(originSize);\n return {\n width: size,\n height: size\n };\n }\n}\nfunction getZIndexStyle(zIndex) {\n const style = {};\n if (zIndex !== void 0) {\n style.zIndex = +zIndex;\n }\n return style;\n}\nlet rootFontSize;\nfunction getRootFontSize() {\n if (!rootFontSize) {\n const doc = document.documentElement;\n const fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;\n rootFontSize = parseFloat(fontSize);\n }\n return rootFontSize;\n}\nfunction convertRem(value) {\n value = value.replace(/rem/g, \"\");\n return +value * getRootFontSize();\n}\nfunction convertVw(value) {\n value = value.replace(/vw/g, \"\");\n return +value * windowWidth.value / 100;\n}\nfunction convertVh(value) {\n value = value.replace(/vh/g, \"\");\n return +value * windowHeight.value / 100;\n}\nfunction unitToPx(value) {\n if (typeof value === \"number\") {\n return value;\n }\n if (inBrowser) {\n if (value.includes(\"rem\")) {\n return convertRem(value);\n }\n if (value.includes(\"vw\")) {\n return convertVw(value);\n }\n if (value.includes(\"vh\")) {\n return convertVh(value);\n }\n }\n return parseFloat(value);\n}\nconst camelizeRE = /-(\\w)/g;\nconst camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());\nconst kebabCase = (str) => str.replace(/([A-Z])/g, \"-$1\").toLowerCase().replace(/^-/, \"\");\nfunction padZero(num, targetLength = 2) {\n let str = num + \"\";\n while (str.length < targetLength) {\n str = \"0\" + str;\n }\n return str;\n}\nconst clamp = (num, min, max) => Math.min(Math.max(num, min), max);\nfunction trimExtraChar(value, char, regExp) {\n const index = value.indexOf(char);\n if (index === -1) {\n return value;\n }\n if (char === \"-\" && index !== 0) {\n return value.slice(0, index);\n }\n return value.slice(0, index + 1) + value.slice(index).replace(regExp, \"\");\n}\nfunction formatNumber(value, allowDot = true, allowMinus = true) {\n if (allowDot) {\n value = trimExtraChar(value, \".\", /\\./g);\n } else {\n value = value.split(\".\")[0];\n }\n if (allowMinus) {\n value = trimExtraChar(value, \"-\", /-/g);\n } else {\n value = value.replace(/-/, \"\");\n }\n const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;\n return value.replace(regExp, \"\");\n}\nfunction addNumber(num1, num2) {\n const cardinal = 10 ** 10;\n return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nexport {\n addNumber,\n addUnit,\n camelize,\n clamp,\n formatNumber,\n getSizeStyle,\n getZIndexStyle,\n kebabCase,\n padZero,\n unitToPx\n};\n","import { computed, defineComponent, ref, watch } from \"vue\"\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\nimport { DatePicker } from \"vant\"\nimport { padZero } from \"vant/es/utils\"\nimport { defaultFieldProps } from \"../utils\"\nimport { isUndefined } from \"lodash-es\"\nimport { isDayjs } from \"dayjs\"\n\n/**\n * ExDate 日期选择\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExDate\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Date, String, Object], default: () => null },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"选择日期\" },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots, expose }) {\n\t\tconst columnsType = props.defaultProps?.columnsType || [\"year\", \"month\", \"day\"]\n\n\t\tconst getYear = (value) => {\n\t\t\treturn isDayjs(value) ? value.year() : value.getFullYear()\n\t\t}\n\t\tconst getMonth = (value) => {\n\t\t\treturn isDayjs(value) ? value.month() + 1 : value.getMonth() + 1\n\t\t}\n\t\tconst getDate = (value) => {\n\t\t\treturn isDayjs(value) ? value.date() : value.getDate()\n\t\t}\n\n\t\tconst _setValueByColumns = (columnsType, value, date) => {\n\t\t\tcolumnsType.forEach((column) => {\n\t\t\t\tif (column === \"year\") {\n\t\t\t\t\tvalue.push(getYear(date))\n\t\t\t\t} else if (column === \"month\") {\n\t\t\t\t\tvalue.push(getMonth(date))\n\t\t\t\t} else if (column === \"day\") {\n\t\t\t\t\tvalue.push(getDate(date))\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn value\n\t\t}\n\t\tconst prepareDate = (date) => {\n\t\t\tconst value = []\n\n\t\t\tif (!date) {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn _setValueByColumns(columnsType, value, date)\n\t\t}\n\n\t\tlet defaultValue = prepareDate(props.modelValue)\n\n\t\tif (!defaultValue.length) {\n\t\t\tconst now = new Date()\n\t\t\tdefaultValue = _setValueByColumns(columnsType, defaultValue, now)\n\t\t}\n\n\t\tconst componentValue = ref(defaultValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => {\n\t\t\t\tcomponentValue.value = prepareDate(props.modelValue)\n\t\t\t},\n\t\t)\n\n\t\tconst pickerRef = ref(null)\n\n\t\tconst displayText = computed(() => {\n\t\t\tif (props.modelValue) {\n\t\t\t\tlet text = \"\"\n\t\t\t\tcolumnsType.forEach((column) => {\n\t\t\t\t\tif (column === \"year\") {\n\t\t\t\t\t\ttext += getYear(props.modelValue)\n\t\t\t\t\t} else if (column === \"month\") {\n\t\t\t\t\t\tif (text) {\n\t\t\t\t\t\t\ttext += \"/\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttext += padZero(getMonth(props.modelValue), 2)\n\t\t\t\t\t} else if (column === \"day\") {\n\t\t\t\t\t\tif (text) {\n\t\t\t\t\t\t\ttext += \"/\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttext += padZero(getDate(props.modelValue), 2)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn text\n\t\t\t}\n\n\t\t\treturn \"\"\n\t\t})\n\n\t\texpose({ displayText })\n\n\t\tconst onConfirm = ({ selectedValues }) => {\n\t\t\tpickerRef.value.close()\n\n\t\t\tconst now = new Date()\n\t\t\tlet date = {}\n\t\t\tcolumnsType.forEach((column, index) => {\n\t\t\t\tif (column === \"year\") {\n\t\t\t\t\tdate.year = selectedValues[index]\n\t\t\t\t} else if (column === \"month\") {\n\t\t\t\t\tdate.month = selectedValues[index] - 1\n\t\t\t\t} else if (column === \"day\") {\n\t\t\t\t\tdate.date = selectedValues[index]\n\t\t\t\t}\n\t\t\t})\n\n\t\t\temit(\n\t\t\t\t\"update:modelValue\",\n\t\t\t\tnew Date(date.year || now.getFullYear(), isUndefined(date.month) ? now.getMonth() : date.month, date.date || now.getDate()),\n\t\t\t)\n\t\t}\n\n\t\treturn () => (\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} disabled={props.disabled || props.readonly}>\n\t\t\t\t{{\n\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tonConfirm={onConfirm}\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\n\t\t\t\t\t\t\ttitle={props.title}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</PickerWrapper>\n\t\t)\n\t},\n})\n","import PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\nimport { ref, defineComponent, computed, watch } from \"vue\"\nimport { Calendar, Collapse, CollapseItem, TimePicker } from \"vant\"\nimport ExButton from \"../button/ExButton.jsx\"\nimport { padZero } from \"vant/es/utils\"\nimport { defaultFieldProps } from \"../utils\"\nimport { cloneDeep } from \"lodash-es\"\n\n/**\n * ExDatetime 日期时间选择器\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExDatetime\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: Date, default: () => null },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst dateValue = ref(null)\n\t\tconst timeValue = ref(null)\n\t\tconst displayText = ref(null)\n\t\tconst pickerRef = ref()\n\n\t\tconst activeName = ref(\"date\")\n\n\t\tconst minDate = new Date(2010, 0, 1)\n\t\tconst maxDate = new Date(2045, 11, 31)\n\n\t\tconst weekdays = [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\n\n\t\tconst dateText = computed(() => {\n\t\t\tif (dateValue.value) {\n\t\t\t\treturn `${dateValue.value.getFullYear()}/${dateValue.value.getMonth() + 1}/${dateValue.value.getDate()} 星期${\n\t\t\t\t\tweekdays[dateValue.value.getDay()]\n\t\t\t\t}`\n\t\t\t}\n\t\t\treturn \"请选择日期\"\n\t\t})\n\t\tconst timeText = computed(() => {\n\t\t\tif (timeValue.value) {\n\t\t\t\treturn timeValue.value\n\t\t\t}\n\t\t\treturn \"请选择时间\"\n\t\t})\n\t\tconst timeModel = computed(() => {\n\t\t\tif (timeValue.value) {\n\t\t\t\tconst [hours, minutes] = timeValue.value.split(\":\")\n\t\t\t\treturn [hours, minutes]\n\t\t\t}\n\t\t\treturn []\n\t\t})\n\n\t\tconst defaultDate = ref(props.modelValue || new Date())\n\n\t\tconst setDisplayText = () => {\n\t\t\tdisplayText.value = dateValue.value && timeValue.value ? `${dateText.value} ${timeText.value}` : \"\"\n\t\t}\n\t\t/**\n\t\t *\n\t\t * @param {Date|null} date\n\t\t */\n\t\tconst prepareDate = (date) => {\n\t\t\tif (date) {\n\t\t\t\tdateValue.value = cloneDeep(date)\n\t\t\t\ttimeValue.value = `${padZero(date.getHours(), 2)}:${padZero(date.getMinutes(), 2)}`\n\t\t\t}\n\t\t\tsetDisplayText()\n\t\t}\n\n\t\tprepareDate(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => prepareDate(props.modelValue),\n\t\t)\n\n\t\texpose({ displayText })\n\n\t\tconst onSelectDate = (date) => {\n\t\t\tdateValue.value = date\n\t\t}\n\n\t\tconst onTimeChange = ({ selectedValues }) => {\n\t\t\ttimeValue.value = selectedValues.join(\":\")\n\t\t}\n\n\t\tconst onConfirm = () => {\n\t\t\tif (!dateValue.value) {\n\t\t\t\tdateValue.value = new Date()\n\t\t\t}\n\t\t\tlet dateString = `${dateValue.value.getFullYear()}/${dateValue.value.getMonth() + 1}/${dateValue.value.getDate()}`\n\n\t\t\tif (!timeValue.value) {\n\t\t\t\tdateString += ` 00:00:00`\n\t\t\t} else {\n\t\t\t\tdateString += ` ${timeValue.value}`\n\t\t\t}\n\n\t\t\tpickerRef.value.close()\n\t\t\tsetDisplayText()\n\n\t\t\temit(\"update:modelValue\", new Date(dateString))\n\t\t}\n\n\t\treturn () => {\n\t\t\treturn (\n\t\t\t\t<PickerWrapper ref={pickerRef} inset={true} disabled={props.disabled || props.readonly}>\n\t\t\t\t\t{{\n\t\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t\t<Collapse accordion={true} v-model={activeName.value} border={false} class={\"ex-datetime_collapse\"}>\n\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t\t\t\t\t<CollapseItem name={\"date\"} icon={\"calendar-o\"} value={dateText.value} isLink={false}>\n\t\t\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: () => <span style={{ fontWeight: \"bold\" }}>日期</span>,\n\t\t\t\t\t\t\t\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div style={{ height: \"300px\" }}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tminDate={minDate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaxDate={maxDate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowSubtitle={false}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowConfirm={false}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdefaultDate={defaultDate.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoppable={false}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowTitle={false}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlazyRender={true}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trowHeight={36}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonSelect={onSelectDate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...props.defaultProps.calendarProps}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Calendar>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t</CollapseItem>,\n\t\t\t\t\t\t\t\t\t\t<CollapseItem name={\"time\"} icon={\"clock-o\"} isLink={false} value={timeText.value}>\n\t\t\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\t\t\ttitle: () => <span style={{ fontWeight: \"bold\" }}>时间</span>,\n\t\t\t\t\t\t\t\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TimePicker\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodelValue={timeModel.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowToolbar={false}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={onTimeChange}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...props.defaultProps.timeProps}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t></TimePicker>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t</CollapseItem>,\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t</Collapse>,\n\t\t\t\t\t\t\t<ExButton type={\"primary\"} style={{ margin: \"20px 0\" }} onClick={onConfirm}>\n\t\t\t\t\t\t\t\t确定\n\t\t\t\t\t\t\t</ExButton>,\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t</PickerWrapper>\n\t\t\t)\n\t\t}\n\t},\n})\n","import { computed, defineComponent, ref, watch } from \"vue\"\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\nimport { TimePicker } from \"vant\"\nimport { defaultFieldProps } from \"../utils\"\n\n/**\n * ExTime 日期选择\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExTime\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"选择时间\" },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots, expose }) {\n\t\tconst columnsType = props.defaultProps?.columnsType || [\"hour\", \"minute\"]\n\t\tconst prepareDate = (time) => {\n\t\t\tconst value = []\n\n\t\t\tif (time) {\n\t\t\t\ttime = time.split(\":\")\n\t\t\t} else {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\tcolumnsType.forEach((column, index) => {\n\t\t\t\tvalue.push(time[index])\n\t\t\t})\n\n\t\t\treturn value\n\t\t}\n\n\t\tconst defaultValue = prepareDate(props.modelValue)\n\n\t\tconst componentValue = ref(defaultValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => {\n\t\t\t\tcomponentValue.value = prepareDate(props.modelValue)\n\t\t\t},\n\t\t)\n\n\t\tconst pickerRef = ref(null)\n\n\t\tconst displayText = computed(() => {\n\t\t\tif (props.modelValue) {\n\t\t\t\tlet text = \"\"\n\t\t\t\tcolumnsType.forEach((column, index) => {\n\t\t\t\t\tlet times = prepareDate(props.modelValue)\n\n\t\t\t\t\tif (column === \"hour\") {\n\t\t\t\t\t\ttext += `${times[index]}`\n\t\t\t\t\t} else if (column === \"minute\") {\n\t\t\t\t\t\ttext += `:${times[index]}`\n\t\t\t\t\t} else if (column === \"second\") {\n\t\t\t\t\t\ttext += `:${times[index]}`\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\treturn text\n\t\t\t}\n\n\t\t\treturn \"\"\n\t\t})\n\n\t\texpose({ displayText })\n\n\t\tconst onConfirm = ({ selectedValues }) => {\n\t\t\tpickerRef.value.close()\n\t\t\temit(\"update:modelValue\", selectedValues.join(\":\"))\n\t\t}\n\n\t\treturn () => (\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} disabled={props.disabled || props.readonly}>\n\t\t\t\t{{\n\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t<TimePicker\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tonConfirm={onConfirm}\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\n\t\t\t\t\t\t\ttitle={props.title}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</PickerWrapper>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps } from \"../utils\"\nimport { Stepper } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExNumber 数字\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExNumber\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Number, String], default: null },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", Number(value))\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<Stepper\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\n\t\t\t\t\t\t\ttheme={\"round\"}\n\t\t\t\t\t\t\tbuttonSize={22}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t></Stepper>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { Radio, RadioGroup } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExRadio 单选\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExRadio\",\n\tprops: {\n\t\t...defaultFieldProps,\n\t\t...defaultOptionsProps,\n\n\t\tmodelValue: { type: [Number, String], default: \"\" },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst options = ref([])\n\n\t\tuseOptionTrait(options, props)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tdefault: () => options.value.map((option) => <Radio name={option.value}>{{ default: () => option.text }}</Radio>),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { computed, defineComponent, ref, watch } from \"vue\"\nimport PickerWrapper, { pickerSlots } from \"./PickerWrapper.jsx\"\nimport { Button, Form, Picker, Search } from \"vant\"\nimport { defaultFieldProps, defaultOptionsProps } from \"../utils\"\nimport { useFetch } from \"../../hooks\"\nimport { cloneDeep, find, isArray, isFunction, isNumber, isString } from \"lodash-es\"\n\n/**\n * ExSelect 下拉选择\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExSelect\",\n\tprops: {\n\t\t...defaultOptionsProps,\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Array, String, Number, Object], default: \"\" },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否显示清除按钮\n\t\t */\n\t\tclearable: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否把选项的值返回到modelValue\n\t\t */\n\t\ttextInValue: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否可以搜索\n\t\t */\n\t\tfilterable: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 搜索链接\n\t\t */\n\t\tfilterUrl: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 自定义渲染选项\n\t\t */\n\t\toptionRender: { type: Function, default: null },\n\t},\n\temits: [\"update:modelValue\", \"change\"],\n\tsetup(props, { emit, slots, expose }) {\n\t\tconst componentValue = ref([])\n\t\tconst options = ref([])\n\t\tconst recordOptions = ref([]) // 缓存 options\n\t\tlet columns = 1 //根据子项的数组数来确定 Picker 的列数,默认为1列\n\t\tconst pickerRef = ref()\n\t\tconst keyword = ref(\"\")\n\t\tconst fetcher = ref({ loading: false })\n\n\t\tconst setModelValue = () => {\n\t\t\tlet value = isArray(props.modelValue) ? props.modelValue : [props.modelValue]\n\t\t\tif (props.textInValue && value.length) {\n\t\t\t\tvalue = value.map((item) => item.value)\n\t\t\t}\n\t\t\tcomponentValue.value = value\n\t\t}\n\t\tsetModelValue()\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => setModelValue(),\n\t\t)\n\n\t\tconst displayText = computed(() => {\n\t\t\tif (!props.modelValue || (isArray(props.modelValue) && !props.modelValue.length)) {\n\t\t\t\treturn \"\"\n\t\t\t}\n\t\t\tlet modelValue = isArray(props.modelValue) ? props.modelValue : [props.modelValue]\n\t\t\treturn modelValue\n\t\t\t\t.map((value, index) => {\n\t\t\t\t\tif (props.textInValue) {\n\t\t\t\t\t\tvalue = value.value\n\t\t\t\t\t}\n\t\t\t\t\tif (columns === 1) {\n\t\t\t\t\t\treturn find(options.value, { value })?.text\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn find(options.value[index], { value })?.text\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t?.join(\"/\")\n\t\t})\n\n\t\tconst fetchData = () =>\n\t\t\tnew Promise((resolve) => {\n\t\t\t\tuseFetch()\n\t\t\t\t\t.get(props.url)\n\t\t\t\t\t.then((items) => {\n\t\t\t\t\t\tif (props.afterFetched) {\n\t\t\t\t\t\t\titems = props.afterFetched(items)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve(items)\n\t\t\t\t\t})\n\t\t\t})\n\n\t\tconst prepareOptions = async (options) => {\n\t\t\toptions = isFunction(options) ? options() : options\n\t\t\tif (options && options.length) {\n\t\t\t\tcolumns = options.filter((option) => isArray(option)).length || 1\n\t\t\t} else if (props.url) {\n\t\t\t\toptions = await fetchData()\n\t\t\t}\n\n\t\t\toptions = options.map((option) => {\n\t\t\t\tif (isArray(option)) {\n\t\t\t\t\treturn option.map((op) => {\n\t\t\t\t\t\treturn isString(op) || isNumber(op) ? { value: op, label: op, text: op } : { text: op.label, ...op }\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\treturn isString(option) ? { value: option, label: option, text: option } : { text: option.label, ...option }\n\t\t\t})\n\n\t\t\trecordOptions.value = cloneDeep(options)\n\n\t\t\treturn options\n\t\t}\n\n\t\tprepareOptions(props.options).then((opts) => {\n\t\t\toptions.value = opts\n\t\t})\n\n\t\twatch(\n\t\t\t() => props.options,\n\t\t\t() => prepareOptions(props.options).then((opts) => (options.value = opts)),\n\t\t)\n\n\t\tconst filterOnlineDataByKeyword = async () => {\n\t\t\tlet res = await useFetch(fetcher.value).get(props.filterUrl, { params: { keyword: keyword.value } })\n\t\t\tif (props.afterFetched) {\n\t\t\t\tres = props.afterFetched(res)\n\t\t\t}\n\t\t\tprepareOptions(res).then((opts) => (options.value = opts))\n\t\t}\n\n\t\tconst filterLocalDataByKeyword = () => {\n\t\t\toptions.value = recordOptions.value.filter((item) => item.text.includes(keyword.value))\n\t\t}\n\n\t\t// @hack\n\t\t// 由于在 Picker 清除 model value 后再次打开 Picker 在不重新选择新选项的情况下无法选中之前的选项\n\t\t// 所以这里手动重新赋一次值给 model value\n\t\tconst onOpenWrapper = () => {\n\t\t\tif (columns === 1 && !componentValue.value?.[0]) {\n\t\t\t\tcomponentValue.value = [options.value[0]?.value]\n\t\t\t}\n\t\t}\n\n\t\tconst onConfirm = ({ selectedOptions }) => {\n\t\t\tlet value = props.textInValue ? selectedOptions : selectedOptions.map((item) => item.value)\n\t\t\tvalue = columns === 1 ? value[0] : value\n\t\t\temit(\"change\", value)\n\t\t\temit(\"update:modelValue\", value)\n\t\t\tpickerRef.value.close()\n\t\t}\n\n\t\tconst onSearch = () => {\n\t\t\tif (keyword.value) {\n\t\t\t\tif (props.filterUrl) {\n\t\t\t\t\tfilterOnlineDataByKeyword()\n\t\t\t\t} else {\n\t\t\t\t\tfilterLocalDataByKeyword()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (props.filterUrl) {\n\t\t\t\t\tfilterOnlineDataByKeyword()\n\t\t\t\t} else {\n\t\t\t\t\tfilterLocalDataByKeyword()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst onSearchClear = () => {\n\t\t\tif (props.filterUrl) {\n\t\t\t\tfilterOnlineDataByKeyword()\n\t\t\t} else {\n\t\t\t\tfilterLocalDataByKeyword()\n\t\t\t}\n\t\t}\n\n\t\tconst onClear = () => {\n\t\t\tconst value = columns === 1 ? null : []\n\t\t\temit(\"change\", value)\n\t\t\temit(\"update:modelValue\", value)\n\t\t\tpickerRef.value.close()\n\t\t}\n\n\t\texpose({ displayText })\n\n\t\t/********** render **********/\n\n\t\tconst pickerSlotElem = () => {\n\t\t\tconst elem = {}\n\t\t\tif (props.filterable) {\n\t\t\t\telem[\"columns-top\"] = () => (\n\t\t\t\t\t<Form action=\"/\">\n\t\t\t\t\t\t<Search\n\t\t\t\t\t\t\tshape={\"round\"}\n\t\t\t\t\t\t\tplaceholder={\"搜索\"}\n\t\t\t\t\t\t\tv-model={keyword.value}\n\t\t\t\t\t\t\tonSearch={onSearch}\n\t\t\t\t\t\t\tonUpdate:modelValue={onSearch}\n\t\t\t\t\t\t\tonClear={onSearchClear}\n\t\t\t\t\t\t\tstyle={{ width: \"100%\" }}\n\t\t\t\t\t\t></Search>\n\t\t\t\t\t</Form>\n\t\t\t\t)\n\t\t\t}\n\t\t\tif (props.optionRender) {\n\t\t\t\telem[\"option\"] = (option, index) => props.optionRender(option, index)\n\t\t\t}\n\t\t\treturn elem\n\t\t}\n\n\t\treturn () => (\n\t\t\t<PickerWrapper ref={pickerRef} closeable={false} onOpen={onOpenWrapper} disabled={props.readonly || props.disabled}>\n\t\t\t\t{{\n\t\t\t\t\t...pickerSlots(slots, props),\n\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t<Picker\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tcolumns={options.value}\n\t\t\t\t\t\t\tonConfirm={onConfirm}\n\t\t\t\t\t\t\tloading={fetcher.value.loading}\n\t\t\t\t\t\t\tonCancel={() => pickerRef.value.close()}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{pickerSlotElem()}\n\t\t\t\t\t\t</Picker>,\n\t\t\t\t\t\tprops.clearable ? (\n\t\t\t\t\t\t\t<div class={\"ex-field-popup__clear-btn\"}>\n\t\t\t\t\t\t\t\t<Button block type={\"primary\"} plain={true} round={true} onClick={onClear}>\n\t\t\t\t\t\t\t\t\t清除\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null,\n\t\t\t\t\t],\n\t\t\t\t}}\n\t\t\t</PickerWrapper>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps } from \"../utils\"\nimport { Switch } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExSwitch 开关\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExSwitch\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: Boolean, default: false },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", Boolean(value))\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tdisabled={props.disabled || props.readonly}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\ttheme={\"round\"}\n\t\t\t\t\t\t\tsize={\"22px\"}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t></Switch>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps } from \"../utils\"\nimport { Rate } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExRate 评分\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExRate\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: Number, default: null },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", Number(value))\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<Rate\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\treadonly={props.readonly}\n\t\t\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\t\t\tclearable={true}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t></Rate>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps } from \"../utils\"\nimport { Slider } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\n\n/**\n * ExSlider 评分\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExSlider\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Number, Array], default: 2 },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<Slider\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\treadonly={props.readonly}\n\t\t\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\t\t\tclearable={true}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tbutton: () => <div class=\"ex-slider-button\">{componentValue.value}</div>,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</Slider>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { computed, defineComponent, inject, onMounted, reactive, watch } from \"vue\"\nimport { Button, showToast, Uploader } from \"vant\"\nimport { findIndex, isArray, isEqual, isFunction, map, pick, random } from \"lodash-es\"\nimport { STATUS, useFetch } from \"../../hooks\"\nimport { EX_UPLOADER } from \"../provider/ExProvider.jsx\"\n\n/**\n * ExUploader 文件上传\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExUploader\",\n\tprops: {\n\t\tmodelValue: { type: [Object, Array], default: () => ({}) },\n\n\t\t/**\n\t\t * 上传文件字段名\n\t\t */\n\t\tname: { type: String, default: \"file\" },\n\n\t\t/**\n\t\t * 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)\n\t\t */\n\t\taccept: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 设置上传的请求头部,IE10 以上有效\n\t\t */\n\t\theaders: { type: Object, default: () => ({}) },\n\n\t\t/**\n\t\t * 上传列表的基本样式 text, picture\n\t\t *\n\t\t * @values text, picture\n\t\t */\n\t\ttype: { type: String, default: \"picture\" },\n\n\t\t/**\n\t\t * 是否禁用\n\t\t */\n\t\tdisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否只读\n\t\t */\n\t\treadonly: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 单个文件大小上限,单位为 MB\n\t\t */\n\t\tmaxSize: { type: Number, default: 10 },\n\n\t\t/**\n\t\t * 上传文件个数上限\n\t\t */\n\t\tmaxNum: { type: Number, default: 1 },\n\n\t\t/**\n\t\t * 是否支持多选文件\n\t\t */\n\t\tmultiple: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 上传文件的服务器地址\n\t\t */\n\t\taction: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 上传后的数据处理回调\n\t\t */\n\t\tafterUpload: { type: Function, default: null },\n\n\t\t/**\n\t\t * 上传时的附加参数\n\t\t */\n\t\textraData: { type: Object, default: () => ({}) },\n\n\t\t/**\n\t\t * 上传按钮文本\n\t\t */\n\t\tuploadText: { type: String, default: \"上传\" },\n\n\t\t/**\n\t\t * 上传区域图标名称或图片链接,等同于 Icon 组件的 name 属性\n\t\t */\n\t\tuploadIcon: { type: String, default: \"photograph\" },\n\n\t\t/**\n\t\t * 上传盘符标志,可以灵活配合后台使用\n\t\t */\n\t\tdisk: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/uploader)\n\t\t */\n\t\tuploaderProps: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\temits: [\"update:modelValue\", \"success\", \"change\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\n\t\tconst defaultUploadUrl = uploaderProvider.uploadUrl || \"\"\n\t\tconst defaultFileItem = uploaderProvider.defaultFileItem || {}\n\n\t\tconst { url: urlKey, path: pathKey, name: nameKey } = defaultFileItem\n\n\t\tconst state = reactive({\n\t\t\tfileList: [],\n\t\t})\n\n\t\tconst maxSize = computed(() => props.maxSize * 1024 * 1024)\n\n\t\tconst isImage = computed(() => props.type === \"picture\")\n\n\t\tconst isSingle = computed(() => props.maxNum === 1)\n\n\t\tconst processFileList = (fileList) => {\n\t\t\tif (!fileList) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tfileList = isArray(fileList) ? fileList : [fileList]\n\n\t\t\tfileList = fileList.filter((item) => item.status === \"done\" || !!item[nameKey] || !!item[pathKey])\n\t\t\tfileList = fileList.map((item) => ({\n\t\t\t\t...pick(item, Object.values(defaultFileItem)),\n\t\t\t\t_type: \"file\",\n\t\t\t\t_disk: props.disk,\n\t\t\t}))\n\t\t\tif (isSingle.value) {\n\t\t\t\treturn (\n\t\t\t\t\tfileList[0] || {\n\t\t\t\t\t\t[pathKey]: \"\",\n\t\t\t\t\t\t[urlKey]: \"\",\n\t\t\t\t\t\t_type: \"file\",\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tconst submitFile = () => {\n\t\t\tconst fileList = processFileList(state.fileList)\n\t\t\temit(\"update:modelValue\", fileList)\n\t\t\temit(\"change\", fileList)\n\t\t}\n\n\t\tconst prepareFileList = (fileList) => {\n\t\t\tif (!fileList) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tfileList = isArray(fileList) ? fileList : [fileList]\n\n\t\t\tstate.fileList = fileList\n\t\t\t\t.filter((item) => item[urlKey] || item[pathKey])\n\t\t\t\t.map((item) => ({\n\t\t\t\t\tuid: random(1, 10000000),\n\t\t\t\t\turl: item[urlKey],\n\t\t\t\t\tstatus: \"done\",\n\t\t\t\t\tisImage: isImage.value,\n\t\t\t\t\t_type: \"file\",\n\t\t\t\t\t...item,\n\t\t\t\t}))\n\n\t\t\t//由于初始值可能不符合文件结构,处理后再次触发更新\n\t\t\temit(\"update:modelValue\", processFileList(state.fileList))\n\t\t}\n\n\t\tonMounted(() => prepareFileList(props.modelValue))\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(fileList) => {\n\t\t\t\tif (fileList && !isArray(fileList)) {\n\t\t\t\t\tfileList = [fileList]\n\t\t\t\t}\n\t\t\t\tfileList = fileList.filter((item) => item[urlKey] || item[pathKey])\n\t\t\t\tif (!isEqual(map(fileList, pathKey).sort(), map(state.fileList, pathKey).sort())) {\n\t\t\t\t\tprepareFileList(fileList)\n\t\t\t\t}\n\t\t\t},\n\t\t)\n\n\t\tconst onOversize = () => {\n\t\t\tshowToast(`文件大小不能超过 ${props.maxSize}mb`)\n\t\t}\n\n\t\tconst onSuccess = (file, result) => {\n\t\t\tfile.status = \"done\"\n\t\t\tfile.message = \"上传成功\"\n\t\t\tfile = { ...file, ...pick(result, Object.values(defaultFileItem)) }\n\t\t\tfile.url = file[urlKey]\n\n\t\t\tconst fileIndex = findIndex(state.fileList, { uid: file.uid })\n\n\t\t\tstate.fileList[fileIndex] = file\n\n\t\t\tsubmitFile()\n\n\t\t\temit(\"success\", { file, response: result })\n\t\t}\n\n\t\tconst onError = (file, result) => {\n\t\t\tfile.status = \"failed\"\n\t\t\tfile.message = result || \"上传失败\"\n\t\t}\n\n\t\tconst onDelete = () => {\n\t\t\tsubmitFile()\n\t\t}\n\n\t\tconst onSubmit = async (files) => {\n\t\t\tif (!isArray(files)) {\n\t\t\t\tfiles = [files]\n\t\t\t}\n\n\t\t\tfor (let file of files) {\n\t\t\t\tfile.uid = random(1, 10000000)\n\t\t\t\tfile.status = \"uploading\"\n\t\t\t\tfile.message = \"上传中...\"\n\n\t\t\t\tconst formData = new FormData()\n\t\t\t\tObject.keys(props.extraData).forEach((key) => {\n\t\t\t\t\tformData.append(key, props.extraData[key])\n\t\t\t\t})\n\n\t\t\t\tif (props.disk) {\n\t\t\t\t\tformData.append(\"_disk\", props.disk)\n\t\t\t\t}\n\n\t\t\t\tformData.append(props.name, file.file)\n\n\t\t\t\ttry {\n\t\t\t\t\tlet res = await useFetch().post(props.action || defaultUploadUrl, formData, {\n\t\t\t\t\t\twithCredentials: true,\n\t\t\t\t\t\theaders: props.headers,\n\t\t\t\t\t})\n\n\t\t\t\t\tlet result = res.result\n\n\t\t\t\t\tif (res.status !== STATUS.STATE_CODE_SUCCESS) {\n\t\t\t\t\t\tonError(file, result)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tif (props.afterUpload && isFunction(props.afterUpload)) {\n\t\t\t\t\t\tresult = props.afterUpload(res)\n\t\t\t\t\t}\n\n\t\t\t\t\tonSuccess(file, result)\n\t\t\t\t} catch (e) {\n\t\t\t\t\tonError(file)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst customSlot = () => {\n\t\t\tif (!isImage.value) {\n\t\t\t\tslots.default = () => (\n\t\t\t\t\t<Button icon=\"plus\" type=\"primary\" size={\"small\"}>\n\t\t\t\t\t\t{props.uploadText}\n\t\t\t\t\t</Button>\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn slots\n\t\t}\n\n\t\treturn () => (\n\t\t\t<div class={\"ex-uploader\"}>\n\t\t\t\t<Uploader\n\t\t\t\t\tv-model={state.fileList}\n\t\t\t\t\tmaxCount={props.maxNum}\n\t\t\t\t\tmaxSize={maxSize.value}\n\t\t\t\t\taccetp={props.accept}\n\t\t\t\t\tuploadText={props.uploadText}\n\t\t\t\t\tuploadIcon={props.uploadIcon}\n\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\treadonly={props.readonly}\n\t\t\t\t\tdeletable={!(props.readonly || props.disabled)}\n\t\t\t\t\tshowUpload={!props.readonly && !props.disabled}\n\t\t\t\t\tafterRead={onSubmit}\n\t\t\t\t\tonOversize={onOversize}\n\t\t\t\t\tonDelete={onDelete}\n\t\t\t\t\tmultiple={props.multiple}\n\t\t\t\t\t{...props.uploaderProps}\n\t\t\t\t>\n\t\t\t\t\t{customSlot()}\n\t\t\t\t</Uploader>\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps } from \"../utils\"\nimport ExField from \"./ExField.jsx\"\nimport { pick } from \"lodash-es\"\nimport ExUploader from \"../uploader/ExUploader.jsx\"\n\n/**\n * ExFieldUploader Uploader in form\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExFieldUploader\",\n\tprops: {\n\t\t...defaultFieldProps,\n\n\t\tmodelValue: { type: [Array, Object], default: () => [] },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst onChange = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<ExUploader\n\t\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\t\t\treadonly={props.readonly}\n\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t></ExUploader>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { Radio, RadioGroup } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { isFunction, pick } from \"lodash-es\"\n\n/**\n * ExMatrixRadio 矩阵单选\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExMatrixRadio\",\n\tprops: {\n\t\t...defaultFieldProps,\n\t\t...defaultOptionsProps,\n\n\t\t/**\n\t\t * 行标题\n\t\t */\n\t\trows: { type: [Array, Function], default: () => [] },\n\t\tmodelValue: { type: Object, default: () => ({}) },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst options = ref([])\n\n\t\tuseOptionTrait(options, props)\n\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\n\n\t\tconst onChange = () => {\n\t\t\temit(\"update:modelValue\", componentValue.value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\n\t\t\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\n\t\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroup onChange={onChange} v-model={componentValue.value[row]}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{() => <Radio name={option.value}></Radio>}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { isArray, isDate, isFunction, isUndefined } from \"lodash-es\"\nimport { useAddressFullCode } from \"./ExAddress.jsx\"\nimport { isDayjs } from \"dayjs\"\n\n/**\n * 初始化表单项默认值\n * @param {FormItemConfig} item\n * @param {Object} existingData\n * @param {Object} submitForm\n * @param {Object} provider\n */\nconst initItemDefaultValue = (item, existingData, submitForm, provider) => {\n\tlet value = \"\"\n\n\tconst { uploaderProvider } = provider\n\n\tif (existingData && !isUndefined(existingData[item.key])) {\n\t\tvalue = existingData[item.key]\n\t} else if (!isUndefined(item.defaultValue)) {\n\t\tvalue = isFunction(item.defaultValue) ? item.defaultValue(submitForm) : item.defaultValue\n\t}\n\n\tif (item.init && isFunction(item.init)) {\n\t\tvalue = item.init({ submitForm, value, existingData })\n\t}\n\n\tif (item.type === \"number\" || item.type === \"rate\") {\n\t\tvalue = value ? Number(value) : null\n\t} else if (item.type === \"slider\") {\n\t\tvalue = item.defaultProps && item.defaultProps.range ? value || [0, 100] : value ? Number(value) : 0\n\t} else if (item.type === \"switch\") {\n\t\tvalue = value === \"true\" || value === 1 || value === \"1\" || value === true\n\t} else if (item.type === \"date\" || item.type === \"datetime\") {\n\t\tvalue = isDate(value) || isDayjs(value) ? value : null\n\t} else if (item.type === \"checkbox\" || item.type === \"group\" || item.type === \"cascade\") {\n\t\tvalue = value || []\n\t} else if (item.type === \"address\") {\n\t\tvalue = value || []\n\t\tif (!isArray(value)) {\n\t\t\tvalue = useAddressFullCode(value)\n\t\t}\n\t} else if (item.type === \"uploader\") {\n\t\tif (item.defaultProps && item.defaultProps.maxNum && item.defaultProps.maxNum > 1) {\n\t\t\tvalue = value || []\n\t\t} else {\n\t\t\tvalue = value || {\n\t\t\t\t[uploaderProvider?.defaultFileItem?.path]: \"\",\n\t\t\t\t[uploaderProvider?.defaultFileItem?.url]: \"\",\n\t\t\t}\n\t\t}\n\t} else if (item.type === \"matrix-radio\") {\n\t\tvalue = value || {}\n\t} else if (item.type === \"matrix-scale\") {\n\t\tvalue = value || {}\n\t} else if (item.type === \"matrix-checkbox\") {\n\t\tvalue = value || {}\n\t}\n\n\treturn value\n}\n\nexport { initItemDefaultValue }\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { Radio, RadioGroup } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { isFunction, pick } from \"lodash-es\"\n\n/**\n * ExMatrixScale 矩阵量表\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExMatrixScale\",\n\tprops: {\n\t\t...defaultFieldProps,\n\t\t...defaultOptionsProps,\n\n\t\t/**\n\t\t * 行标题\n\t\t */\n\t\trows: { type: [Array, Function], default: () => [] },\n\t\tmodelValue: { type: Object, default: () => ({}) },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tlet options = ref([])\n\n\t\tuseOptionTrait(options, props)\n\n\t\tconst level = props.defaultProps?.level || 5\n\n\t\tif (options.value.length > level) {\n\t\t\toptions.value = options.value.slice(0, level)\n\t\t} else if (options.value.length < level) {\n\t\t\t//如果选项不及量表等级则补全\n\t\t\tfor (let i = options.value.length; i < level; i += 1) {\n\t\t\t\toptions.value.push({ text: i + 1, value: i + 1 })\n\t\t\t}\n\t\t}\n\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\n\n\t\tconst onChange = () => {\n\t\t\temit(\"update:modelValue\", componentValue.value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\n\t\t\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\n\t\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RadioGroup onChange={onChange} v-model={componentValue.value[row]}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{() => <Radio name={index + 1}></Radio>}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { defineComponent, ref, watch } from \"vue\"\nimport { defaultFieldProps, defaultOptionsProps, useOptionTrait } from \"../utils\"\nimport { Checkbox } from \"vant\"\nimport ExField from \"./ExField.jsx\"\nimport { isFunction, pick, remove } from \"lodash-es\"\n\n/**\n * ExMatrixRadio 矩阵单选\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExMatrixRadio\",\n\tprops: {\n\t\t...defaultFieldProps,\n\t\t...defaultOptionsProps,\n\n\t\t/**\n\t\t * 行标题\n\t\t */\n\t\trows: { type: [Array, Function], default: () => [] },\n\t\tmodelValue: { type: Object, default: () => ({}) },\n\t},\n\temits: [\"update:modelValue\"],\n\tsetup(props, { emit, slots }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => (componentValue.value = props.modelValue),\n\t\t)\n\n\t\tconst options = ref([])\n\n\t\tuseOptionTrait(options, props)\n\n\t\tconst rows = isFunction(props.rows) ? props.rows() : props.rows\n\n\t\tconst onChange = (row, value) => {\n\t\t\tif (!componentValue.value[row]) {\n\t\t\t\tcomponentValue.value[row] = []\n\t\t\t}\n\t\t\tif (componentValue.value[row].includes(value)) {\n\t\t\t\tremove(componentValue.value[row], (item) => item === value)\n\t\t\t} else {\n\t\t\t\tcomponentValue.value[row].push(value)\n\t\t\t}\n\t\t\temit(\"update:modelValue\", componentValue.value)\n\t\t}\n\n\t\tconst fieldProps = pick(props, Object.keys(defaultFieldProps))\n\n\t\treturn () => (\n\t\t\t<ExField class={\"ex-matrix\"} {...fieldProps}>\n\t\t\t\t{{\n\t\t\t\t\t...slots,\n\t\t\t\t\tinput: () => (\n\t\t\t\t\t\t<div class={\"ex-matrix-container\"}>\n\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t\t\t\t\t{options.value.map((item) => (\n\t\t\t\t\t\t\t\t\t\t\t<th>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>{item.text}</div>\n\t\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t{rows.map((row) => (\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-row\"}>{row}</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t{options.value.map((option) => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst checked = ref(componentValue.value[row]?.includes(option.value))\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class={\"ex-matrix-option\"}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv-model={checked.value}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshape={\"square\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => onChange(row, option.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t></Checkbox>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ExField>\n\t\t)\n\t},\n})\n","import { inject } from \"vue\"\nimport { EX_UPLOADER } from \"../provider/ExProvider.jsx\"\nimport { isBoolean, isFunction, isString, merge, pick } from \"lodash-es\"\nimport ExField from \"./ExField.jsx\"\nimport ExSelect from \"./ExSelect.jsx\"\nimport ExDate from \"./ExDate.jsx\"\nimport ExSwitch from \"./ExSwitch.jsx\"\nimport ExCheckbox from \"./ExCheckbox.jsx\"\nimport ExRadio from \"./ExRadio.jsx\"\nimport ExDatetime from \"./ExDatetime.jsx\"\nimport ExNumber from \"./ExNumber.jsx\"\nimport ExRate from \"./ExRate.jsx\"\nimport ExSlider from \"./ExSlider.jsx\"\nimport ExAddress from \"./ExAddress.jsx\"\nimport ExCascader from \"./ExCascader.jsx\"\nimport ExTime from \"./ExTime.jsx\"\nimport ExFieldUploader from \"./ExFieldUploader.jsx\"\nimport ExMatrixRadio from \"./ExMatrixRadio.jsx\"\nimport ExMatrixScale from \"./ExMatrixScale.jsx\"\nimport ExMatrixCheckbox from \"./ExMatrixCheckbox.jsx\"\nimport { Divider } from \"vant\"\n\n/**\n *\n * @param {FormItemConfig} item\n * @param {Object} submitForm\n * @param {Object} [props]\n * @param {Object} [slots]\n * @return {*|JSX.Element}\n */\nconst render = (item, submitForm, { props, slots }) => {\n\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\n\n\tconst pickerTypes = [\"select\", \"date\", \"datetime\", \"time\", \"address\", \"cascade\"]\n\tconst isPicker = pickerTypes.includes(item.type)\n\n\t// ExField 的 props\n\tconst fieldPropsList = [\"placeholder\", \"help\", \"append\", \"required\", \"disabled\", \"rules\", \"readonly\", \"isLink\", \"fieldProps\"]\n\tlet fieldProps = pick(item, fieldPropsList)\n\n\tfieldProps.required = isFunction(fieldProps.required) ? fieldProps.required(submitForm) : fieldProps.required\n\tfieldProps.disabled = isFunction(fieldProps.disabled) ? fieldProps.disabled(submitForm) : fieldProps.disabled\n\n\tfieldProps = { readonly: props.readonly, disabled: props.disabled, ...fieldProps }\n\n\tif (fieldProps.readonly || fieldProps.disabled) {\n\t\tfieldProps.required = false\n\t}\n\n\tfieldProps.label = item.title\n\tfieldProps.name = item.key\n\tfieldProps.placeholder = fieldProps.placeholder || (isPicker ? `请选择${item.title}` : `请填写${item.title}`)\n\tfieldProps.rules = fieldProps.rules?.length\n\t\t? fieldProps.rules.map((rule) =>\n\t\t\t\trule.pattern\n\t\t\t\t\t? {\n\t\t\t\t\t\t\t...rule,\n\t\t\t\t\t\t\tpattern: new RegExp(rule.pattern),\n\t\t\t\t\t }\n\t\t\t\t\t: { ...rule },\n\t\t )\n\t\t: []\n\n\t// 具体组件的 props\n\tconst componentProps = merge(pick(item, [\"options\", \"defaultProps\", \"rows\"]), item.exProps || {})\n\n\t//混合了Field和input slot组件的slots组合\n\tconst componentSlots = item.defaultSlots || {}\n\n\titem.type = item.type ? item.type.toLowerCase() : item.type\n\n\t//特殊:readonly 的情况下不显示 required\n\tif (fieldProps.required) {\n\t\tfieldProps.rules.push({\n\t\t\trequired: true,\n\t\t\tmessage: isPicker ? `请选择${item.title}` : `请填写${item.title}`,\n\t\t\ttrigger: isPicker ? \"onChange\" : \"onBlur\", //特意\n\t\t})\n\t}\n\n\t//特殊:readonly 情况下不显示 placeholder\n\tif (fieldProps.readonly || fieldProps.disabled) {\n\t\tfieldProps.placeholder = \"--\"\n\t}\n\n\tlet renderItem = null\n\n\t// 处理 hidden\n\tif ((isFunction(item.hidden) && item.hidden(submitForm)) || (isBoolean(item.hidden) && item.hidden)) {\n\t\treturn null\n\t} else if (item.type === \"slot\" && slots[item.key]) {\n\t\treturn slots[item.key]({ submitForm })\n\t} else if (item.customRender) {\n\t\trenderItem = item.customRender({ submitForm, item })\n\t\tif (!renderItem) {\n\t\t\treturn null\n\t\t}\n\t} else if (item.match) {\n\t\t// 匹配模式, 合并选项后需要移除 match\n\t\tconst matchItem = { ...item, ...item.match(submitForm), match: null }\n\t\treturn render(matchItem, submitForm, { props, slots })\n\t} else {\n\t\tswitch (item.type) {\n\t\t\tcase \"select\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExSelect v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExSelect>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"date\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExDate v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExDate>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"datetime\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExDatetime v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExDatetime>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"time\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExTime v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExTime>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"switch\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExSwitch v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExSwitch>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"radio\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExRadio v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExRadio>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"checkbox\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExCheckbox v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExCheckbox>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"address\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExAddress v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExAddress>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"cascade\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExCascader v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExCascader>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"number\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExNumber v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExNumber>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"rate\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExRate v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExRate>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"slider\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExSlider v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExSlider>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"uploader\":\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExFieldUploader v-model={submitForm[item.key]} {...componentProps} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExFieldUploader>\n\t\t\t\t)\n\t\t\t\tif (item.required) {\n\t\t\t\t\tif (!Object.keys(uploaderProvider).length) {\n\t\t\t\t\t\tconsole.error(\"请在根组件中注入 NEWBIE_UPLOADER 配置项\")\n\t\t\t\t\t\trenderItem = null\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\n\t\t\t\t\t/*if (item.defaultProps?.maxNum && item.defaultProps?.maxNum > 1) {\n rules.type = \"array\"\n rules.message = `请上传${item.title}`\n } else {\n rules = {\n type: \"object\",\n required: true,\n message: `请上传${item.title}`,\n fields: {\n [uploaderProvider.path]: {\n type: \"string\",\n required: true,\n message: `请上传${item.title}`,\n },\n },\n }\n }*/\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t/* case \"html\":\n renderItem = Fields.createHtml(item, submitForm)\n break\n\n case \"text\":\n renderItem = Fields.createText(item, submitForm)\n break\n case \"group\":\n renderItem = Fields.createGroup(item, submitForm, { provider: { uploaderProvider } })\n break*/\n\t\t\tcase \"textarea\":\n\t\t\t\tfieldProps.type = \"textarea\"\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExField>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"password\":\n\t\t\t\tfieldProps.type = \"password\"\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExField>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\tcase \"matrix-radio\": {\n\t\t\t\tif (item.required) {\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trenderItem = <ExMatrixRadio v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase \"matrix-scale\": {\n\t\t\t\tif (item.required) {\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trenderItem = <ExMatrixScale v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase \"matrix-checkbox\": {\n\t\t\t\tif (item.required) {\n\t\t\t\t\tfieldProps.rules[fieldProps.rules.length - 1].validator = () => {\n\t\t\t\t\t\tfor (let i = 0; i < item.rows.length; i++) {\n\t\t\t\t\t\t\tif (!submitForm[item.key][item.rows[i]]) {\n\t\t\t\t\t\t\t\treturn `请选择${item.rows[i]}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trenderItem = <ExMatrixCheckbox v-model={submitForm[item.key]} {...componentProps} {...fieldProps} />\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\trenderItem = (\n\t\t\t\t\t<ExField v-model={submitForm[item.key]} {...fieldProps}>\n\t\t\t\t\t\t{componentSlots}\n\t\t\t\t\t</ExField>\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tconst formItem = [renderItem]\n\n\tif (item.break) {\n\t\tformItem.unshift(<Divider {...props.dividerProps}>{{ default: () => (isString(item.break) ? item.break : null) }}</Divider>)\n\t}\n\n\treturn formItem\n}\n\nexport default render\n","import { computed, defineComponent, inject, nextTick, onMounted, reactive, ref, watch } from \"vue\"\nimport { EX_UPLOADER, EX_FORM } from \"../provider/ExProvider.jsx\"\nimport { cloneDeep, every, isEqual, isFunction, isObject, isString, pick } from \"lodash-es\"\nimport { initItemDefaultValue } from \"./utils\"\nimport { useCache, useFetch, useFormFail, useFormFormat, useProcessStatusSuccess } from \"../../hooks\"\nimport { CellGroup, Form, showConfirmDialog, showSuccessToast, Skeleton } from \"vant\"\nimport createFormItem from \"./FormItem.jsx\"\nimport ExButton from \"../button/ExButton.jsx\"\n\n/**\n * ExForm 表单\n *\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExForm\",\n\tprops: {\n\t\t/**\n\t\t * 表单标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 表单项 label 宽度,默认单位为px\n\t\t */\n\t\tlabelWidth: { type: [String, Number], default: \"6.2em\" },\n\n\t\t/**\n\t\t * 是否在 label 后面添加冒号\n\t\t */\n\t\tcolon: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否使用卡片模式\n\t\t */\n\t\tinset: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 表单数据,用于初始化表单,并会进行 Watch\n\t\t */\n\t\tdata: { type: [Object, String], default: \"\" },\n\n\t\t/**\n\t\t * 是否自动加载\n\t\t * true: 表示自动加载数据\n\t\t * Array,String: 表示会对 `extraData` 数据中的相关字段进行非空验证,不为空再加载数据\n\t\t */\n\t\tautoLoad: {\n\t\t\t//自动加载数据,在fetchData里找\n\t\t\ttype: [Boolean, Array, String],\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * 获取表单数据的URL\n\t\t */\n\t\tfetchUrl: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 额外的数据,在提交时会合并到表单数据中并一起提交\n\t\t */\n\t\textraData: { type: Object, default: () => ({}) },\n\n\t\t/**\n\t\t * 是否禁用表单\n\t\t */\n\t\tdisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否只读\n\t\t */\n\t\treadonly: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * submit button 是否固定在底部\n\t\t */\n\t\tfixed: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 提交数据URL\n\t\t */\n\t\tsubmitUrl: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 提交按钮文字\n\t\t */\n\t\tsubmitButtonText: { type: String, default: \"保存\" },\n\n\t\t/**\n\t\t * 提交确认提示内容\n\t\t */\n\t\tsubmitConfirmText: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否禁用提交按钮\n\t\t */\n\t\tsubmitDisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否显示关闭按钮\n\t\t */\n\t\tclosable: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 取消按钮文字\n\t\t */\n\t\tcancelButtonText: { type: String, default: \"取消\" },\n\n\t\t/**\n\t\t * 点击关闭时的动作\n\t\t */\n\t\tclose: { type: Function, default: null },\n\n\t\t/**\n\t\t * 当有分割线时,分割线的配置\n\t\t */\n\t\tdividerProps: { type: Object, default: () => ({}) },\n\n\t\t/**\n\t\t * 是否缓存表单数据\n\t\t * 开启后,该数据会缓存在 localStorage\n\t\t */\n\t\tcacheable: { type: String, default: \"\" },\n\n\t\t/**\n\t\t *\n\t\t * 表单配置\n\t\t *\n\t\t * @typedef {Object} FormItemConfig\n\t\t * @property {string} key 数据库关联名称\n\t\t * @property {string} title 显示的名字\n\t\t * @property {string} [type] 类型,默认是input\n\t\t * @property {array|Function} [options] 组件选项\n\t\t * @property {array|Function} [rows] 矩阵组件行标题\n\t\t * @property {string} [placeholder] 组件里的提示\n\t\t * @property {string|Function} [help] ExField 里的提示\n\t\t * @property {string|Function} [append] ExField 外的提示\n\t\t * @property {array} [rules] 验证规则\n\t\t * @property {boolean} [isLink] 是否展示右侧箭头并开启点击反馈\n\t\t * @property {boolean} [readonly] 是否只读\n\t\t * @property {boolean|Function} [required] 是否必填,默认是false\n\t\t * @property {boolean|Function} [disabled] 组件不可编辑状态,默认是false\n\t\t * @property {boolean|Function} [hidden] 组件是否隐藏\n\t\t * @property {Function} [match] 支持根据条件返回不同的配置进行动态渲染\n\t\t * @property {Function} [init] 初始化函数,用于初始化表单项的值\n\t\t * @property {Function} [beforeSubmit] 在提交前修改表单项的值,该函数会在 ExForm 的 beforeSubmit 之前调用\n\t\t * @property {boolean|string} [break] 新起一行,默认为false,如果为 String 则以 Divider 分割\n\t\t * @property {Object} [fieldProps] ExField 的原生配置\n\t\t * @property {Object} [exProps] Ex组件配置\n\t\t * @property {Object} [defaultProps] 原生 Vant 组件的配置\n\t\t * @property {Object} [defaultSlots] 混合 Field 和 input slot 组件的 slots 组合\n\t\t * @property {*} [defaultValue] 默认值,默认是空字符串\n\t\t * @property {*} [_temp] 临时数据,内部使用\n\t\t */\n\n\t\t/**\n\t\t * 表单配置,[见下表](#form-表单配置)\n\t\t */\n\t\tform: {\n\t\t\ttype: Array,\n\t\t\tdefault() {\n\t\t\t\treturn []\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * fetch 返回数据处理函数\n\t\t * @return {Object} 返回处理后的数据,将用于初始化表单\n\t\t */\n\t\tafterFetched: { type: Function, default: null },\n\n\t\t/**\n\t\t *\n\t\t * @typedef {Object} ExposedFormData\n\t\t * @property {Object} formatForm Format后的表单数据\n\t\t * @property {Object} originalForm 原生的表单数据\n\t\t *\n\t\t *\n\t\t * 提交数据处理函数\n\t\t * @param {ExposedFormData} data\n\t\t * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据\n\t\t *\n\t\t */\n\t\tbeforeSubmit: { type: Function, default: null },\n\n\t\t/**\n\t\t * 提交成功后的回调\n\t\t */\n\t\tafterSubmit: { type: Function, default: null },\n\n\t\t/**\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/form)\n\t\t */\n\t\tformProps: { type: Object, default: () => ({}) },\n\t},\n\temits: [\"success\"],\n\n\tsetup(props, { expose, emit, slots }) {\n\t\tconst formRef = ref(null) //表单容器\n\n\t\tconst state = reactive({\n\t\t\ttemporary: {}, // 用于存放一些临时数据\n\t\t\tsubmitFetcher: {\n\t\t\t\tloading: false,\n\t\t\t},\n\t\t\tisInitializing: true, //是否正在初始化\n\t\t\trules: {},\n\t\t\tsubmitForm: {}, //提交表单,初始化数据后会生成\n\t\t\tsubmitFormBackup: {}, //初始化后的表单数据备份,用于重置表单以及脏数据判断\n\t\t})\n\n\t\tconst formItems = computed(() => props.form)\n\n\t\tconst uploaderProvider = inject(EX_UPLOADER, () => ({}))\n\t\tconst formProvider = inject(EX_FORM, () => ({}))\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t(newV) => {\n\t\t\t\tinitFormData(newV || false)\n\t\t\t},\n\t\t)\n\n\t\twatch(\n\t\t\t() => state.submitForm,\n\t\t\t() => {\n\t\t\t\tif (props.cacheable) {\n\t\t\t\t\tuseCache(props.cacheable, localStorage).set(state.submitForm)\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true },\n\t\t)\n\n\t\twatch(\n\t\t\t() => formItems.value,\n\t\t\t() => {\n\t\t\t\tinitFormData(props.data || false)\n\t\t\t},\n\t\t)\n\n\t\tconst init = (data) => {\n\t\t\tstate.isInitializing = false\n\t\t\tinitFormData(data || props.data || false)\n\t\t}\n\n\t\tonMounted(() => {\n\t\t\tif (props.autoLoad && props.fetchUrl) {\n\t\t\t\tlet auto = true\n\t\t\t\tif (props.autoLoad && isObject(props.autoLoad)) {\n\t\t\t\t\tauto = every(Object.values(pick(props.extraData, Object.keys(props.autoLoad))))\n\t\t\t\t} else if (props.autoLoad && isString(props.autoLoad)) {\n\t\t\t\t\tauto = !!props.extraData[props.autoLoad]\n\t\t\t\t}\n\n\t\t\t\tif (auto) {\n\t\t\t\t\tfetchItem()\n\t\t\t\t} else {\n\t\t\t\t\tinit()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (props.cacheable) {\n\t\t\t\t\tconst cachedData = useCache(props.cacheable, localStorage).get()\n\t\t\t\t\tif (cachedData) {\n\t\t\t\t\t\tshowConfirmDialog({ message: \"存在未提交的数据,是否恢复?\", lockScroll: false })\n\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\tinit(cachedData)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\t\tuseCache(props.cacheable, localStorage).remove()\n\t\t\t\t\t\t\t\tinit()\n\t\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\tinit()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tinit()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t/**\n\t\t * 初始化表单数据\n\t\t *\n\t\t * @param {Object} formData 表单数据\n\t\t */\n\t\tconst initFormData = (formData) => {\n\t\t\t// 如果有 FormData, 则从中提取 FormItem 中有定义的数据,并进行初始化后存放于 extractFormData\n\t\t\t// 无 FromData 则直接使用 FormItem 的 defaultValue\n\t\t\tlet extractFormData = {}\n\t\t\tlet existingData = formData ? cloneDeep(formData) : false\n\t\t\tformItems.value.forEach((item) => {\n\t\t\t\textractFormData[item.key] = initItemDefaultValue(item, existingData, state.submitForm, { uploaderProvider })\n\t\t\t})\n\n\t\t\tif (existingData) {\n\t\t\t\t// 将初始化后的数据覆盖原有数据,并保留不在 FormItems 中的数据\n\t\t\t\textractFormData = { ...existingData, ...extractFormData }\n\t\t\t}\n\n\t\t\tstate.submitForm = extractFormData\n\t\t\tstate.submitFormBackup = cloneDeep(extractFormData)\n\t\t}\n\n\t\t//远程拿数据模式\n\t\tconst fetchItem = () => {\n\t\t\tif (props.fetchUrl) {\n\t\t\t\tstate.isInitializing = false\n\t\t\t\tuseFetch()\n\t\t\t\t\t.get(props.fetchUrl, { params: props.extraData })\n\t\t\t\t\t.then((res) => {\n\t\t\t\t\t\tstate.isInitializing = true\n\t\t\t\t\t\tuseProcessStatusSuccess(res, () => {\n\t\t\t\t\t\t\tif (props.afterFetched && isFunction(props.afterFetched)) {\n\t\t\t\t\t\t\t\tres = props.afterFetched(res)\n\t\t\t\t\t\t\t} else if (formProvider.afterFetched && isFunction(formProvider.afterFetched)) {\n\t\t\t\t\t\t\t\tres = formProvider.afterFetched(res)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//有可能出现 isInitializing 未生效 skeleton 还未关闭的情况\n\t\t\t\t\t\t\tnextTick(() => {\n\t\t\t\t\t\t\t\tinitFormData(res)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tstate.isInitializing = false\n\t\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst onSubmit = async () => {\n\t\t\tawait formRef.value.validate()\n\n\t\t\tif (props.submitConfirmText) {\n\t\t\t\ttry {\n\t\t\t\t\tawait showConfirmDialog({ message: props.submitConfirmText })\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 为了在 item 中也能定制 beforeSubmit 这里和下面的 useFormFormat 会重复 copy 一次 submitForm\n\t\t\tlet form = cloneDeep(state.submitForm)\n\n\t\t\tconst itemsWithBeforeSubmit = formItems.value\n\t\t\t\t.map((item) => {\n\t\t\t\t\tif (item.match) {\n\t\t\t\t\t\t// match 的属性需要在这里处理\n\t\t\t\t\t\treturn { ...item, ...item.match(form) }\n\t\t\t\t\t}\n\t\t\t\t\treturn item\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.beforeSubmit && isFunction(item.beforeSubmit))\n\n\t\t\tfor (const item of itemsWithBeforeSubmit) {\n\t\t\t\tform[item.key] = await item.beforeSubmit({\n\t\t\t\t\tvalue: form[item.key],\n\t\t\t\t\tsubmitForm: form, //改成将 form 传出去,这样可以在 form 中添加参数\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tform = useFormFormat(form, formProvider.format || {})\n\n\t\t\tif (props.beforeSubmit && isFunction(props.beforeSubmit)) {\n\t\t\t\tform = await props.beforeSubmit({ formatForm: form, originalForm: state.submitForm })\n\t\t\t\tif (form === false) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tlet res = await useFetch(state.submitFetcher).post(props.submitUrl, form)\n\n\t\t\t\t//提交后再次备份表单数据,isDirty 检测即为 false\n\t\t\t\tstate.submitFormBackup = cloneDeep(state.submitForm)\n\n\t\t\t\tif (props.cacheable) {\n\t\t\t\t\tuseCache(props.cacheable, localStorage).remove()\n\t\t\t\t}\n\n\t\t\t\tif (props.afterSubmit) {\n\t\t\t\t\tprops.afterSubmit(res)\n\t\t\t\t} else {\n\t\t\t\t\tuseProcessStatusSuccess(res, () => {\n\t\t\t\t\t\tshowSuccessToast(`${props.submitButtonText}成功`)\n\t\t\t\t\t\temit(\"success\", res)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tuseFormFail(e)\n\t\t\t}\n\t\t}\n\n\t\t/********** exposes **********/\n\n\t\t/**\n\t\t * 获取复制的表单数据\n\t\t * @return {*}\n\t\t */\n\t\tconst getFormStandalone = () => cloneDeep(state.submitForm)\n\n\t\t/**\n\t\t * 获取表单实时数据,慎用,会改变内部的值\n\t\t * @return {*}\n\t\t */\n\t\tconst getFormRealtime = () => state.submitForm\n\n\t\t/**\n\t\t * 获取表单的字段值\n\t\t * @param {String} key\n\t\t * @return {*}\n\t\t */\n\t\tconst getField = (key) => cloneDeep(state.submitForm[key])\n\n\t\t/**\n\t\t *\n\t\t * 设置表单数据\n\t\t * @param {Object} fields\n\t\t */\n\t\tconst setForm = (fields) => {\n\t\t\tObject.keys(fields).forEach((key) => {\n\t\t\t\tstate.submitForm[key] = fields[key]\n\t\t\t})\n\t\t}\n\n\t\t/**\n\t\t * 判断表单是否被修改\n\t\t * @return {boolean}\n\t\t */\n\t\tconst isDirty = () => {\n\t\t\treturn !isEqual(state.submitForm, state.submitFormBackup)\n\t\t}\n\n\t\t/**\n\t\t * 重置表单\n\t\t * @param {Object} formData 表单数据\n\t\t */\n\t\tconst reset = (formData) => {\n\t\t\tinitFormData(formData)\n\t\t\tnextTick(() => {\n\t\t\t\tformRef.value.resetValidation()\n\t\t\t})\n\t\t}\n\n\t\texpose({\n\t\t\tgetForm: getFormStandalone,\n\t\t\tgetFormStandalone,\n\t\t\tgetFormRealtime,\n\t\t\tgetField,\n\t\t\tsetForm,\n\t\t\tisDirty,\n\t\t\tfetchItem,\n\t\t\treset,\n\t\t})\n\n\t\t/********** render **********/\n\n\t\tconst formItemElems = () =>\n\t\t\tformItems.value.map((formItem) =>\n\t\t\t\tcreateFormItem(formItem, state.submitForm, {\n\t\t\t\t\tprops,\n\t\t\t\t\tslots,\n\t\t\t\t}),\n\t\t\t)\n\n\t\tconst skeletonElem = () => (\n\t\t\t<Skeleton row={10} title loading={state.isInitializing}>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () => formItemElems(),\n\t\t\t\t}}\n\t\t\t</Skeleton>\n\t\t)\n\n\t\tconst footerElem = () => {\n\t\t\tif (state.isInitializing) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (slots.footer) {\n\t\t\t\treturn <div class={\"ex-form__footer\"}>{slots.footer()}</div>\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\n\t\tconst buttonsElem = () => {\n\t\t\tif (state.isInitializing) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (props.readonly) {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\tconst cancelBtn = (\n\t\t\t\t<ExButton\n\t\t\t\t\tclass={\"ex-form__cancel-btn\"}\n\t\t\t\t\ttype={\"default\"}\n\t\t\t\t\tplain\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tif (props.close && isFunction(props.close)) {\n\t\t\t\t\t\t\tprops.close()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{() => props.cancelButtonText}\n\t\t\t\t</ExButton>\n\t\t\t)\n\n\t\t\tconst submitBtn = (\n\t\t\t\t<ExButton disabled={props.submitDisabled} type={\"primary\"} fetcher={state.submitFetcher} buttonProps={{ nativeType: \"submit\" }}>\n\t\t\t\t\t{() => props.submitButtonText}\n\t\t\t\t</ExButton>\n\t\t\t)\n\n\t\t\tif (props.fixed) {\n\t\t\t\treturn <div class={\"ex-form__btn-wrapper-fixed van-hairline--top\"}>{[props.closable ? cancelBtn : null, submitBtn]}</div>\n\t\t\t}\n\n\t\t\treturn <div class={\"ex-form__btn-wrapper\"}>{[props.closable ? cancelBtn : null, submitBtn]}</div>\n\t\t}\n\n\t\treturn () => (\n\t\t\t<Form\n\t\t\t\tref={formRef}\n\t\t\t\tlabelWidth={props.labelWidth}\n\t\t\t\tcolon={props.colon}\n\t\t\t\tclass={`ex-form ${props.fixed ? \"ex-form__fixed\" : \"\"}`}\n\t\t\t\tdisabled={props.disabled}\n\t\t\t\treadonly={props.readonly}\n\t\t\t\tscrollToError={true}\n\t\t\t\tvalidateFirst={true}\n\t\t\t\tonSubmit={onSubmit}\n\t\t\t\t{...props.formProps}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t<CellGroup inset={props.inset} title={props.title}>\n\t\t\t\t\t\t\t{{ default: () => skeletonElem() }}\n\t\t\t\t\t\t</CellGroup>,\n\t\t\t\t\t\tfooterElem(),\n\t\t\t\t\t\tbuttonsElem(),\n\t\t\t\t\t],\n\t\t\t\t}}\n\t\t\t</Form>\n\t\t)\n\t},\n})\n","import \"./index.less\"\n\nimport withInstall from \"../../utils/withInstall\"\n\nimport _ExField from \"./ExField.jsx\"\nimport _ExAddress, {\n\taddressData as _addressData,\n\tuseAddressFullCode as _useAddressFullCode,\n\tuseAddressNameFormCode as _useAddressNameFormCode,\n} from \"./ExAddress.jsx\"\nimport _ExCascader from \"./ExCascader.jsx\"\nimport _ExCheckbox from \"./ExCheckbox.jsx\"\nimport _ExDate from \"./ExDate.jsx\"\nimport _ExDatetime from \"./ExDatetime.jsx\"\nimport _ExTime from \"./ExTime.jsx\"\nimport _ExNumber from \"./ExNumber.jsx\"\nimport _ExRadio from \"./ExRadio.jsx\"\nimport _ExSelect from \"./ExSelect.jsx\"\nimport _ExSwitch from \"./ExSwitch.jsx\"\nimport _ExRate from \"./ExRate.jsx\"\nimport _ExSlider from \"./ExSlider.jsx\"\nimport _ExFieldUploader from \"./ExFieldUploader.jsx\"\nimport _ExMatrixRadio from \"./ExMatrixRadio.jsx\"\n\nimport _ExForm from \"./ExForm.jsx\"\n\nexport const useAddressFullCode = _useAddressFullCode\nexport const useAddressNameFormCode = _useAddressNameFormCode\nexport const addressData = _addressData\nexport const ExAddress = withInstall(_ExAddress)\nexport const ExField = withInstall(_ExField)\nexport const ExCascader = withInstall(_ExCascader)\nexport const ExCheckbox = withInstall(_ExCheckbox)\nexport const ExDate = withInstall(_ExDate)\nexport const ExDatetime = withInstall(_ExDatetime)\nexport const ExTime = withInstall(_ExTime)\nexport const ExNumber = withInstall(_ExNumber)\nexport const ExRadio = withInstall(_ExRadio)\nexport const ExSelect = withInstall(_ExSelect)\nexport const ExSwitch = withInstall(_ExSwitch)\nexport const ExRate = withInstall(_ExRate)\nexport const ExSlider = withInstall(_ExSlider)\nexport const ExFieldUploader = withInstall(_ExFieldUploader)\nexport const ExMatrixRadio = withInstall(_ExMatrixRadio)\n\nexport const ExForm = withInstall(_ExForm)\n","import _ExProvider from \"./ExProvider.jsx\"\nimport withInstall from \"../../utils/withInstall\"\nexport const ExProvider = withInstall(_ExProvider)\nexport default ExProvider\n","import { defineComponent } from \"vue\"\nimport \"./index.less\"\n\n/**\n * ExResult 结果页\n */\nexport default defineComponent({\n\tname: \"ExResult\",\n\tprops: {\n\t\t/**\n\t\t * 结果类型\n\t\t * @values 'success', 'error', 'info', 'warning'\n\t\t */\n\t\ttype: { type: String, default: \"success\" },\n\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 描述\n\t\t */\n\t\tdescription: { type: String, default: \"\" },\n\t},\n\tsetup(props, { slots }) {\n\t\tconst iconElem = () => {\n\t\t\tlet elem = null\n\n\t\t\tif (slots.icon) {\n\t\t\t\telem = slots.icon()\n\t\t\t} else {\n\t\t\t\tswitch (props.type) {\n\t\t\t\t\tcase \"success\":\n\t\t\t\t\t\telem = (\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\n\t\t\t\t\t\t\t\t\tdata-icon=\"check-circle\"\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\n\t\t\t\t\t\t\t\t\theight=\"1em\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z\"></path>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\n\t\t\t\t\tcase \"info\":\n\t\t\t\t\t\telem = (\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\n\t\t\t\t\t\t\t\t\tdata-icon=\"exclamation-circle\"\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\n\t\t\t\t\t\t\t\t\theight=\"1em\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z\"></path>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\n\t\t\t\t\tcase \"warning\":\n\t\t\t\t\t\telem = (\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\n\t\t\t\t\t\t\t\t\tdata-icon=\"warning\"\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\n\t\t\t\t\t\t\t\t\theight=\"1em\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d=\"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z\"></path>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\n\t\t\t\t\tcase \"error\":\n\t\t\t\t\t\telem = (\n\t\t\t\t\t\t\t<i class={\"exicon\"}>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tviewBox=\"64 64 896 896\"\n\t\t\t\t\t\t\t\t\tdata-icon=\"close-circle\"\n\t\t\t\t\t\t\t\t\twidth=\"1em\"\n\t\t\t\t\t\t\t\t\theight=\"1em\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d=\"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z\"></path>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn elem\n\t\t}\n\n\t\treturn () => (\n\t\t\t<div class={`ex-result ex-result__${props.type}`}>\n\t\t\t\t<div class={\"ex-result-icon\"}>{iconElem()}</div>\n\t\t\t\t<div class={\"ex-result-title\"}>{slots.title ? slots.title?.() : props.title}</div>\n\t\t\t\t<div class={\"ex-result-description\"}>{slots.description ? slots.description?.() : props.description}</div>\n\t\t\t\t<div class={\"ex-result-extra\"}>{slots.extra?.()}</div>\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import _ExResult from \"./ExResult.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExResult = withInstall(_ExResult)\nexport default ExResult\n","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","'use strict'\n\nmodule.exports = function encodeUtf8 (input) {\n var result = []\n var size = input.length\n\n for (var index = 0; index < size; index++) {\n var point = input.charCodeAt(index)\n\n if (point >= 0xD800 && point <= 0xDBFF && size > index + 1) {\n var second = input.charCodeAt(index + 1)\n\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n point = (point - 0xD800) * 0x400 + second - 0xDC00 + 0x10000\n index += 1\n }\n }\n\n // US-ASCII\n if (point < 0x80) {\n result.push(point)\n continue\n }\n\n // 2-byte UTF-8\n if (point < 0x800) {\n result.push((point >> 6) | 192)\n result.push((point & 63) | 128)\n continue\n }\n\n // 3-byte UTF-8\n if (point < 0xD800 || (point >= 0xE000 && point < 0x10000)) {\n result.push((point >> 12) | 224)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // 4-byte UTF-8\n if (point >= 0x10000 && point <= 0x10FFFF) {\n result.push((point >> 18) | 240)\n result.push(((point >> 12) & 63) | 128)\n result.push(((point >> 6) & 63) | 128)\n result.push((point & 63) | 128)\n continue\n }\n\n // Invalid character\n result.push(0xEF, 0xBF, 0xBD)\n }\n\n return new Uint8Array(result).buffer\n}\n","const encodeUtf8 = require('encode-utf8')\nconst Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n data = encodeUtf8(data)\n }\n this.data = new Uint8Array(data)\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : '<path ' + getColorAttrib(opts.color.light, 'fill') +\n ' d=\"M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z\"/>'\n\n const path =\n '<path ' + getColorAttrib(opts.color.dark, 'stroke') +\n ' d=\"' + qrToPath(data, size, opts.margin) + '\"/>'\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '<svg xmlns=\"http://www.w3.org/2000/svg\" ' + width + viewBox + ' shape-rendering=\"crispEdges\">' + bg + path + '</svg>\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","import { defineComponent, onBeforeUpdate, onMounted, ref, watch } from \"vue\"\nimport QRCode from \"qrcode\"\nimport \"./index.less\"\n\n/**\n * ExQrcode 二维码\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExQrcode\",\n\tprops: {\n\t\t/**\n\t\t * 是否居中显示\n\t\t */\n\t\tcenter: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 二维码内容\n\t\t */\n\t\ttext: { type: [String, Number], default: \"\" },\n\n\t\t/**\n\t\t * 二维码尺寸\n\t\t */\n\t\tsize: { type: Number, default: 120 },\n\n\t\t/**\n\t\t * 边距\n\t\t */\n\t\tmargin: { type: Number, default: 0 },\n\n\t\t/**\n\t\t * 前景色\n\t\t */\n\t\tcolorDark: { type: String, default: \"#000000\" },\n\n\t\t/**\n\t\t * 背景色\n\t\t */\n\t\tcolorLight: { type: String, default: \"#FFFFFF\" },\n\n\t\t/**\n\t\t * 纠错级别\n\t\t * @values L, M, Q, H\n\t\t */\n\t\tcorrectLevel: { type: String, default: \"H\" },\n\t},\n\n\tsetup(props) {\n\t\tconst containerRef = ref()\n\n\t\tconst create = () => {\n\t\t\tQRCode.toDataURL(containerRef.value, String(props.text), {\n\t\t\t\terrorCorrectionLevel: props.correctLevel,\n\t\t\t\tcolor: {\n\t\t\t\t\tdark: props.colorDark,\n\t\t\t\t\tlight: props.colorLight,\n\t\t\t\t},\n\t\t\t\twidth: props.size,\n\t\t\t\tmargin: props.margin,\n\t\t\t})\n\t\t}\n\n\t\twatch(\n\t\t\t() => props,\n\t\t\t() => {\n\t\t\t\tcreate()\n\t\t\t},\n\t\t\t{ deep: true },\n\t\t)\n\n\t\tonBeforeUpdate(() => {\n\t\t\tcontainerRef.value = null\n\t\t})\n\n\t\tonMounted(() => {\n\t\t\tcreate()\n\t\t})\n\n\t\treturn () => (\n\t\t\t<div class={`ex-qrcode ${props.center ? \"ex-qrcode__center\" : \"\"}`}>\n\t\t\t\t<canvas ref={containerRef}></canvas>\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import _ExQrcode from \"./ExQrcode.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExQrcode = withInstall(_ExQrcode)\nexport default ExQrcode\n","import { isNull, isUndefined } from \"lodash-es\"\n\nconst genPixel = (num) => {\n\tif (isNull(num) || isUndefined(num)) {\n\t\treturn \"auto\"\n\t} else if (!isNaN(num)) {\n\t\treturn `${num}px`\n\t}\n\n\treturn num\n}\n\nexport { genPixel }\n","import { defineComponent } from \"vue\"\nimport \"./index.less\"\nimport { isArray } from \"lodash-es\"\nimport { genPixel } from \"../../utils/style\"\n\n/**\n * Grid 布局组件\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExGrid\",\n\tprops: {\n\t\t/**\n\t\t * 间距方向\n\t\t * @values vertical, horizontal\n\t\t */\n\t\tdirection: { type: String, default: \"horizontal\" },\n\n\t\t/**\n\t\t * 列数,如果没有定义将会把元素置于同一行\n\t\t */\n\t\tcolumns: { type: Number, default: 0 },\n\n\t\t/**\n\t\t * 间距大小,如 20px 2em,默认单位为 px,支持数组形式来分别设置横向和纵向间距\n\t\t */\n\t\tgutter: { type: [Array, Number, String], default: 20 },\n\t},\n\tsetup(props, { slots }) {\n\t\treturn () => {\n\t\t\tconst columns = props.columns || slots.default()?.length\n\n\t\t\tlet gridTemplateColumns = \"\"\n\n\t\t\tfor (let i = 0; i < columns; i++) {\n\t\t\t\tgridTemplateColumns += \" 1fr\"\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclass={\"ex-grid\"}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tgridAutoFlow: props.direction === \"horizontal\" ? \"row\" : \"column\",\n\t\t\t\t\t\tgridRowGap: isArray(props.gutter) ? genPixel(props.gutter?.[1]) : \"0\",\n\t\t\t\t\t\tgridColumnGap: isArray(props.gutter) ? genPixel(props.gutter?.[0]) : genPixel(props.gutter),\n\t\t\t\t\t\tgridTemplateColumns,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{slots.default?.()}\n\t\t\t\t</div>\n\t\t\t)\n\t\t}\n\t},\n})\n","import { isUndefined } from \"lodash-es\"\nimport { reactive } from \"vue\"\nimport { Button, Collapse, CollapseItem } from \"vant\"\nimport ExGrid from \"../../grid/ExGrid.jsx\"\n\nconst render = (item, queryForm) => {\n\tif (isUndefined(item._temp)) {\n\t\titem._temp = reactive({\n\t\t\tactiveNames: item.key,\n\t\t})\n\t}\n\n\tconst toggleChooseOption = (value) => {\n\t\tif (item.expandable === \"multiple\") {\n\t\t\tif (!queryForm[item.key] || !queryForm[item.key]?.length) {\n\t\t\t\tqueryForm[item.key] = [value]\n\t\t\t} else {\n\t\t\t\tconst index = queryForm[item.key].indexOf(value)\n\t\t\t\tif (index === -1) {\n\t\t\t\t\tqueryForm[item.key].push(value)\n\t\t\t\t} else {\n\t\t\t\t\tqueryForm[item.key].splice(index, 1)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tqueryForm[item.key] = queryForm[item.key] === value ? \"\" : value\n\t\t}\n\t}\n\n\tconst isOptionActive = (value) => {\n\t\tif (item.expandable === \"multiple\") {\n\t\t\treturn queryForm[item.key]?.includes(value)\n\t\t} else {\n\t\t\treturn queryForm[item.key] === value\n\t\t}\n\t}\n\n\tconst optionElems = () => (\n\t\t<ExGrid columns={3}>\n\t\t\t{{\n\t\t\t\tdefault: () =>\n\t\t\t\t\titem.options.map((option) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclass={`ex-search__expand-option`}\n\t\t\t\t\t\t\ttype={`${isOptionActive(option.value) ? \"primary\" : \"default\"}`}\n\t\t\t\t\t\t\thairline={true}\n\t\t\t\t\t\t\tround={true}\n\t\t\t\t\t\t\tsize={\"small\"}\n\t\t\t\t\t\t\tonClick={() => toggleChooseOption(option.value)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{option.text}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)),\n\t\t\t}}\n\t\t</ExGrid>\n\t)\n\n\treturn (\n\t\t<div class={\"ex-search__popup-item ex-search__expand-item\"}>\n\t\t\t<Collapse v-model={item._temp.activeNames} border={false} accordion={true}>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () => (\n\t\t\t\t\t\t<CollapseItem name={item.key}>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\tdefault: () => <div class={\"ex-search__expand-options\"}>{optionElems()}</div>,\n\t\t\t\t\t\t\t\ttitle: () => <span class={\"ex-search__expand-title\"}>{item.title}</span>,\n\t\t\t\t\t\t\t\tvalue: () => <span class={\"ex-search__expand-trigger\"}>展开</span>,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</CollapseItem>\n\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</Collapse>\n\t\t</div>\n\t)\n}\n\nexport default render\n","import { ref } from \"vue\"\nimport ExSelect from \"../../form/ExSelect.jsx\"\nimport ExCascader from \"../../form/ExCascader.jsx\"\nimport { Icon } from \"vant\"\n\nconst render = (item, queryForm, onSearch) => {\n\tconst selectRef = ref()\n\tconst cascadeRef = ref()\n\n\tlet renderItem\n\tif (item.type === \"select\") {\n\t\trenderItem = (\n\t\t\t<ExSelect\n\t\t\t\tref={selectRef}\n\t\t\t\tv-model={queryForm[item.key]}\n\t\t\t\toptions={item.options}\n\t\t\t\tclearable={true}\n\t\t\t\tonChange={onSearch}\n\t\t\t\tdefaultProps={item.defaultProps}\n\t\t\t>\n\t\t\t\t{() => (\n\t\t\t\t\t<div class={`ex-search__quick-trigger ${queryForm[item.key] ? \"active\" : \"\"}`}>\n\t\t\t\t\t\t<span class={\"ex-search__quick-label\"}>{selectRef.value?.displayText || item.title}</span>\n\t\t\t\t\t\t<span class={\"ex-search__quick-icon\"}>\n\t\t\t\t\t\t\t<Icon name={\"arrow-down\"}></Icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</ExSelect>\n\t\t)\n\t} else if (item.type === \"cascade\") {\n\t\trenderItem = (\n\t\t\t<ExCascader\n\t\t\t\tref={cascadeRef}\n\t\t\t\tv-model={queryForm[item.key]}\n\t\t\t\toptions={item.options}\n\t\t\t\tclearable={true}\n\t\t\t\ttitle={`搜索${item.title}`}\n\t\t\t\tonChange={onSearch}\n\t\t\t\tdefaultProps={item.defaultProps}\n\t\t\t>\n\t\t\t\t{() => (\n\t\t\t\t\t<div class={`ex-search__quick-trigger ${queryForm[item.key]?.length ? \"active\" : \"\"}`}>\n\t\t\t\t\t\t<span class={\"ex-search__quick-label\"}>{cascadeRef.value?.displayText || item.title}</span>\n\t\t\t\t\t\t<span class={\"ex-search__quick-icon\"}>\n\t\t\t\t\t\t\t<Icon name={\"arrow-down\"}></Icon>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</ExCascader>\n\t\t)\n\t}\n\n\treturn <div class={\"ex-search__quick-item\"}>{renderItem}</div>\n}\n\nexport default render\n","import ExSelect from \"../../form/ExSelect.jsx\"\nimport ExDate from \"../../form/ExDate.jsx\"\nimport ExDatetime from \"../../form/ExDatetime.jsx\"\nimport ExField from \"../../form/ExField.jsx\"\nimport ExNumber from \"../../form/ExNumber.jsx\"\n\nconst render = (item, queryForm) => {\n\tconst fieldElem = () => {\n\t\tconst fieldProps = { label: item.title, name: item.key, placeholder: `搜索${item.title}` }\n\n\t\tif (item.type === \"select\") {\n\t\t\treturn <ExSelect v-model={queryForm[item.key]} clearable={true} options={item.options} {...fieldProps} {...item.inputProps}></ExSelect>\n\t\t} else if (item.type === \"date\") {\n\t\t\treturn <ExDate v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExDate>\n\t\t} else if (item.type === \"datetime\") {\n\t\t\treturn <ExDatetime v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExDatetime>\n\t\t} else if (item.type === \"number\") {\n\t\t\treturn <ExNumber v-model={queryForm[item.key]} {...fieldProps} {...item.props}></ExNumber>\n\t\t}\n\n\t\treturn <ExField v-model={queryForm[item.key]} {...fieldProps} {...item.inputProps}></ExField>\n\t}\n\n\treturn <div class={\"ex-search__popup-item ex-search__field-item\"}>{fieldElem()}</div>\n}\n\nexport default render\n","import { cloneDeep, find, isArray, isBoolean, isFunction, isUndefined } from \"lodash-es\"\nimport { Button, Icon, Popup, Search } from \"vant\"\nimport { computed, defineComponent, nextTick, onMounted, reactive, ref, watch } from \"vue\"\nimport ExGrid from \"../grid/ExGrid.jsx\"\nimport { createExpand, createField, createQuick } from \"./components\"\nimport \"./index.less\"\nimport { useSm3, useCache } from \"../../hooks\"\n\n/**\n * ExSearch 搜索组件\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExSearch\",\n\tprops: {\n\t\tmodelValue: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * @typedef {Object} ExSearchItemConfig 搜索项\n\t\t * @property {string} key 搜索项的 key\n\t\t * @property {string} title 搜索项的标题\n\t\t * @property {string} type 搜索项的类型\n\t\t * @property {boolean} [quick] 为 true 展示为快速检索项\n\t\t * @property {boolean|Object} [expandable] 搜索项是否展开\n\t\t * @property {Array|Function} [options] 搜索项的选项\n\t\t * @property {Object} [inputProps] 搜索项的输入框属性\n\t\t * @property {Function} [beforeSubmit] 在提交前修改搜索项的值\n\t\t * @property {*} [defaultValue] 搜索项的值\n\t\t * @property {*} [_temp] 搜索项的临时值[内部使用]\n\t\t * */\n\n\t\t/**\n\t\t *\n\t\t * 搜索项的配置, 详见 [ExSearchItemConfig](#exsearchitemconfig-配置)\n\t\t *\n\t\t */\n\t\tcolumns: { type: Array, default: () => [] },\n\n\t\t/**\n\t\t * 占位提示文字\n\t\t */\n\t\tplaceholder: { type: String, default: \"请输入搜索关键词\" },\n\n\t\t/**\n\t\t * 名称,作为提交表单时的标识符\n\t\t */\n\t\tkeyword: { type: String, default: \"keyword\" },\n\n\t\t/**\n\t\t * 搜索框左侧文本\n\t\t */\n\t\tlabel: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 是否将输入框设为只读状态,只读状态下无法输入内容\n\t\t */\n\t\treadonly: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 是否禁用输入框\n\t\t */\n\t\tdisabled: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * 输入框内容对齐方式\n\t\t * @values left, right, center\n\t\t */\n\t\tinputAlign: { type: String, default: \"left\" },\n\n\t\t/**\n\t\t * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key\n\t\t */\n\t\tpersistence: { type: [Boolean, String], default: false },\n\n\t\t/**\n\t\t * @typedef {Object} SearchFormData\n\t\t * @property {Object} searchForm 搜索表单\n\t\t *\n\t\t *\n\t\t * 搜索数据处理函数\n\t\t * @param {SearchFormData} data\n\t\t * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据\n\t\t */\n\t\tbeforeSearch: { type: Function, default: null },\n\n\t\t/**\n\t\t * 适配器,目前仅支持 newbie\n\t\t * @values newbie\n\t\t */\n\t\tadapter: { type: String, default: null },\n\n\t\t/**\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/search)\n\t\t */\n\t\tsearchProps: { type: Object, default: () => ({}) },\n\t},\n\temits: [\"update:modelValue\", \"search\"],\n\tsetup(props, { expose, emit }) {\n\t\tconst componentValue = ref(props.modelValue)\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t() => {\n\t\t\t\tcomponentValue.value = props.modelValue\n\t\t\t},\n\t\t)\n\n\t\tconst state = reactive({\n\t\t\tqueryForm: {}, // 搜索表单\n\t\t\tshowFilterPopup: false,\n\t\t})\n\n\t\tconst genPersistenceKey = (prefix) => {\n\t\t\tif (!props.persistence) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tprefix = prefix || \"\"\n\t\t\tif (isBoolean(props.persistence)) {\n\t\t\t\treturn `exSearch_${prefix}` + useSm3(location.href)\n\t\t\t}\n\n\t\t\treturn `exSearch_${prefix}` + useSm3(location.pathname + \"_\" + props.persistence)\n\t\t}\n\n\t\tconst searchItemDefaultValue = (item) => {\n\t\t\tlet value = \"\"\n\t\t\t//如果是展开显示的,那么默认值为空字符串\n\t\t\t//如果展开为多选,那么默认值为 []\n\t\t\tif (item.expandable === \"multiple\" || item.type === \"cascade\") {\n\t\t\t\tvalue = []\n\t\t\t}\n\n\t\t\tif (item.defaultValue) {\n\t\t\t\tvalue = isFunction(item.defaultValue) ? item.defaultValue() : item.defaultValue\n\t\t\t}\n\n\t\t\tif ((item.type === \"date\" || item.type === \"datetime\") && !value) {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\treturn value\n\t\t}\n\n\t\t//快速检索项\n\t\tconst quickColumns = computed(() => {\n\t\t\treturn props.columns.filter((item) => item.quick)\n\t\t})\n\n\t\t//表单搜索项\n\t\tconst fieldColumns = computed(() => {\n\t\t\treturn props.columns.filter((item) => !item.quick)\n\t\t})\n\n\t\tconst initQueryForm = () => {\n\t\t\tconst form = {}\n\n\t\t\tconst persistenceSearchData = props.persistence ? useCache(genPersistenceKey()).get({}) : {}\n\n\t\t\tprops.columns.forEach((item) => {\n\t\t\t\tlet value\n\t\t\t\tif (!isUndefined(persistenceSearchData[item.key])) {\n\t\t\t\t\tvalue = persistenceSearchData[item.key]\n\t\t\t\t} else {\n\t\t\t\t\tvalue = searchItemDefaultValue(item)\n\t\t\t\t}\n\t\t\t\tform[item.key] = value\n\t\t\t})\n\t\t\tstate.queryForm = form\n\t\t}\n\n\t\tinitQueryForm()\n\n\t\tconst onUpdateValue = (value) => {\n\t\t\temit(\"update:modelValue\", value)\n\t\t}\n\n\t\tconst getQueryForm = () => {\n\t\t\tconst form = {}\n\t\t\tObject.keys(state.queryForm).forEach((key) => {\n\t\t\t\tlet value = state.queryForm[key]\n\n\t\t\t\tlet filedItem = find(props.columns, { key })\n\t\t\t\tif (filedItem && filedItem.beforeSubmit && isFunction(filedItem.beforeSubmit)) {\n\t\t\t\t\tvalue = filedItem.beforeSubmit({\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tqueryForm: state.queryForm, //改成将 form 传出去,这样可以在 form 中添加参数\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif (value && (!isArray(value) || value.length)) {\n\t\t\t\t\tform[key] = value\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (componentValue.value) {\n\t\t\t\tform[props.keyword] = componentValue.value\n\t\t\t}\n\n\t\t\treturn form\n\t\t}\n\n\t\tconst onOpenFilter = () => {\n\t\t\tstate.showFilterPopup = true\n\t\t}\n\n\t\tconst onCloseFilter = () => {\n\t\t\tstate.showFilterPopup = false\n\t\t}\n\n\t\tconst onSearch = () => {\n\t\t\tnextTick(() => {\n\t\t\t\tdebugger\n\t\t\t\tlet form = cloneDeep(getQueryForm())\n\t\t\t\tif (props.persistence) {\n\t\t\t\t\tuseCache(genPersistenceKey()).set(form)\n\t\t\t\t}\n\n\t\t\t\tif (props.adapter === \"newbie\") {\n\t\t\t\t\tconst data = {}\n\n\t\t\t\t\tObject.keys(form).forEach((key) => {\n\t\t\t\t\t\tconst column = find(props.columns, { key })\n\t\t\t\t\t\tdata[key] = {\n\t\t\t\t\t\t\t//condition\n\t\t\t\t\t\t\tc: key === props.keyword ? \"in\" : column?.condition || \"=\", //keyword 条件固定为 include(即 like), 其它的默认为 equal\n\t\t\t\t\t\t\t//type\n\t\t\t\t\t\t\tt: column?.type || \"i\", //默认为 input\n\t\t\t\t\t\t\t//value\n\t\t\t\t\t\t\tv: form[key],\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tform = { _q: data }\n\t\t\t\t}\n\n\t\t\t\tif (props.beforeSearch && isFunction(props.beforeSearch)) {\n\t\t\t\t\tform = props.beforeSearch({ searchForm: form })\n\t\t\t\t\t//如果为 false 则不触发搜索\n\t\t\t\t\tif (form !== false) {\n\t\t\t\t\t\temit(\"search\", form)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\temit(\"search\", form)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tconst onFieldSearch = () => {\n\t\t\tstate.showFilterPopup = false\n\t\t\tonSearch()\n\t\t}\n\n\t\tconst onClearFields = () => {\n\t\t\tfieldColumns.value.forEach((item) => {\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\n\t\t\t})\n\t\t}\n\n\t\tconst reset = () => {\n\t\t\tfieldColumns.value.forEach((item) => {\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\n\t\t\t})\n\t\t\tquickColumns.value.forEach((item) => {\n\t\t\t\tstate.queryForm[item.key] = searchItemDefaultValue(item)\n\t\t\t})\n\t\t\tcomponentValue.value = \"\"\n\t\t}\n\n\t\tonMounted(() => {\n\t\t\tif (props.persistence) {\n\t\t\t\temit(\"search\", { persistence: true, ...getQueryForm() })\n\t\t\t}\n\t\t})\n\n\t\texpose({ reset, getQueryForm })\n\n\t\t/******************* render *********************/\n\n\t\tconst quickElems = () => {\n\t\t\treturn quickColumns.value.map((item) => createQuick(item, state.queryForm, onSearch))\n\t\t}\n\n\t\tconst popupHeaderElem = () => (\n\t\t\t<div class={\"ex-search-popup__header van-hairline--bottom\"}>\n\t\t\t\t<h2 class={\"ex-search-popup__title\"}>{props.title}</h2>\n\t\t\t\t<span class={\"ex-search-popup__closer\"}>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tname={\"cross\"}\n\t\t\t\t\t\tclass={\"van-badge__wrapper van-popup__close-icon van-popup__close-icon--top-right van-haptics-feedback\"}\n\t\t\t\t\t\tonClick={() => (state.showFilterPopup = false)}\n\t\t\t\t\t></Icon>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t)\n\n\t\tconst fieldElems = () => (\n\t\t\t<div class={\"ex-search-popup__content\"}>\n\t\t\t\t{fieldColumns.value.map((item) => (item.expandable ? createExpand(item, state.queryForm) : createField(item, state.queryForm)))}\n\t\t\t</div>\n\t\t)\n\n\t\tconst popupFooterElem = () => (\n\t\t\t<div class={\"ex-search-popup__footer van-hairline--top\"}>\n\t\t\t\t<ExGrid>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () => [\n\t\t\t\t\t\t\t<Button type={\"default\"} size={\"small\"} round={true} onClick={onClearFields}>\n\t\t\t\t\t\t\t\t清除\n\t\t\t\t\t\t\t</Button>,\n\t\t\t\t\t\t\t<Button type={\"primary\"} size={\"small\"} round={true} onClick={onFieldSearch}>\n\t\t\t\t\t\t\t\t搜索\n\t\t\t\t\t\t\t</Button>,\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t</ExGrid>\n\t\t\t</div>\n\t\t)\n\n\t\tconst quickBarElem = () => {\n\t\t\tif (!quickColumns.value?.length && !fieldColumns.value?.length) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<div class={\"ex-search__quick-bar\"}>\n\t\t\t\t\t<div class={\"ex-search__quick-container\"}>{quickElems()}</div>\n\t\t\t\t\t{fieldColumns.value?.length ? (\n\t\t\t\t\t\t<div class={\"ex-search__filter\"} onClick={onOpenFilter}>\n\t\t\t\t\t\t\t筛选<Icon name={\"filter-o\"}></Icon>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t)\n\t\t}\n\n\t\treturn () => (\n\t\t\t<div class=\"ex-search\">\n\t\t\t\t<form action=\"/\">\n\t\t\t\t\t<Search\n\t\t\t\t\t\tv-model={componentValue.value}\n\t\t\t\t\t\tname={props.keyword}\n\t\t\t\t\t\tshape={\"round\"}\n\t\t\t\t\t\tlabel={props.label}\n\t\t\t\t\t\tinputAlign={props.inputAlign}\n\t\t\t\t\t\tdisabled={props.disabled}\n\t\t\t\t\t\treadonly={props.readonly}\n\t\t\t\t\t\tplaceholder={props.placeholder}\n\t\t\t\t\t\tonUpdate:modelValue={onUpdateValue}\n\t\t\t\t\t\tonSearch={onSearch}\n\t\t\t\t\t\t{...props.searchProps}\n\t\t\t\t\t></Search>\n\t\t\t\t</form>\n\t\t\t\t{quickBarElem()}\n\t\t\t\t<Popup\n\t\t\t\t\tv-model:show={state.showFilterPopup}\n\t\t\t\t\tcloseable={false}\n\t\t\t\t\tposition={\"bottom\"}\n\t\t\t\t\tround={true}\n\t\t\t\t\tteleport={\"body\"}\n\t\t\t\t\tcloseOnPopstate={true}\n\t\t\t\t\tclass={`ex-search-popup`}\n\t\t\t\t\tsafeAreaInsetBottom={true}\n\t\t\t\t\tsafeAreaInsetTop={true}\n\t\t\t\t\tonClickOverlay={onCloseFilter}\n\t\t\t\t\tonClickCloseIcon={onCloseFilter}\n\t\t\t\t>\n\t\t\t\t\t{{ default: () => [popupHeaderElem(), fieldElems(), popupFooterElem()] }}\n\t\t\t\t</Popup>\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import { defineComponent, inject, reactive, nextTick, ref, onMounted, onUnmounted } from \"vue\"\nimport { useFetch, useCache, useSm3 } from \"../../hooks\"\nimport { closeToast, Empty, List, Pagination, PullRefresh, showLoadingToast, Sticky } from \"vant\"\nimport ExSearch from \"../search/ExSearch.jsx\"\nimport \"./index.less\"\nimport { EX_PAGINATION } from \"../provider/ExProvider.jsx\"\nimport { isBoolean, isFunction, isObject, isUndefined, pick } from \"lodash-es\"\n\n/**\n * ExPagination 翻页\n *\n */\nexport default defineComponent({\n\tname: \"ExPagination\",\n\tprops: {\n\t\t/**\n\t\t * 下拉刷新的配置\n\t\t * true:表示启用下拉刷新\n\t\t * Object:用于PullRefresh组件的配置\n\t\t * [PullRefresh配置](https://vant-contrib.gitee.io/vant/#/zh-CN/pull-refresh)\n\t\t */\n\t\tpullRefresh: { type: [Boolean, Object], default: true },\n\n\t\t/**\n\t\t * ExSearch 搜索配置\n\t\t */\n\t\tsearch: { type: Object, default: null },\n\n\t\t/**\n\t\t * 是否Fix搜索栏\n\t\t * true:表示自动吸顶\n\t\t * Object:用于Sticky组件的配置,常用属性`offsetTop`\n\t\t * [Sticky配置](https://vant-contrib.gitee.io/vant/#/zh-CN/sticky)\n\t\t */\n\t\tsearchFixed: { type: [Boolean, Object], default: true },\n\n\t\t/**\n\t\t * 请求数据URL\n\t\t *\n\t\t */\n\t\turl: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 请求方式,默认为 GET\n\t\t *\n\t\t * @values get, post\n\t\t */\n\t\tmethod: { type: String, default: \"get\" },\n\n\t\t/**\n\t\t * 请求时的附带参数\n\t\t */\n\t\textraData: { type: Object, default: () => ({}) },\n\n\t\t/**\n\t\t * 是否自动加载\n\t\t */\n\t\tautoLoad: { type: Boolean, default: true },\n\n\t\t/**\n\t\t * 每页条数\n\t\t */\n\t\tpageSize: { type: Number, default: 10 },\n\n\t\t/**\n\t\t * 加载后数据的回调函数\n\t\t */\n\t\tafterFetched: { type: Function, default: null },\n\n\t\t/**\n\t\t * 数据为空文案\n\t\t */\n\t\temptyText: { type: String, default: \"暂无内容\" },\n\n\t\t/**\n\t\t * 加载完毕文案\n\t\t */\n\t\tfinishText: { type: String, default: \"加载完毕\" },\n\n\t\t/**\n\t\t * 加载错误文案\n\t\t */\n\t\terrorText: { type: String, default: \"加载失败,点击重新加载\" },\n\n\t\t/**\n\t\t * 滚动条与底部距离小于 offset 时触发 load 事件\n\t\t */\n\t\toffset: { type: [Number, String], default: 300 },\n\n\t\t/**\n\t\t * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key\n\t\t */\n\t\tpersistence: { type: [Boolean, String], default: false },\n\n\t\t/**\n\t\t * 是否单页模式\n\t\t */\n\t\tsinglePage: { type: Boolean, default: false },\n\n\t\t/**\n\t\t * [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/list)\n\t\t */\n\t\tdefaultProps: { type: Object, default: () => ({}) },\n\t},\n\tsetup(props, { expose, slots }) {\n\t\tconst paginationProvider = inject(EX_PAGINATION, () => ({}))\n\t\tconst searchRef = ref(null)\n\n\t\tconst { currentPage: currentPageKey, pageSize: pageSizeKey } = paginationProvider.requestKeys\n\n\t\tconst genPersistenceKey = (prefix) => {\n\t\t\tif (!props.persistence) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tprefix = prefix || \"\"\n\t\t\tif (isBoolean(props.persistence)) {\n\t\t\t\treturn `exPagination_${prefix}` + useSm3(location.href)\n\t\t\t}\n\n\t\t\treturn `exPagination_${prefix}` + useSm3(location.pathname + \"_\" + props.persistence)\n\t\t}\n\n\t\tlet persistencePagination = props.persistence ? useCache(genPersistenceKey()).get({}) : {}\n\n\t\tconst state = reactive({\n\t\t\titems: props.singlePage ? [] : persistencePagination.items || [],\n\t\t\tloading: false,\n\t\t\terror: persistencePagination.error || false,\n\t\t\terrorMessage: \"\",\n\t\t\ttotalSize: persistencePagination.totalSize || 0,\n\t\t\tcurrentPage: persistencePagination.currentPage || 1,\n\t\t\tfinished: persistencePagination.finished || false,\n\t\t\tempty: persistencePagination.empty || false,\n\t\t\tsearchParams: {},\n\t\t\toffsetTop: 0,\n\t\t\trefreshLoading: false,\n\t\t\tisFirstLoad: true,\n\t\t})\n\n\t\t/**\n\t\t * 持久化翻页与滚动\n\t\t */\n\t\tconst onPersistence = () => {\n\t\t\tif (!props.persistence) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst data = {\n\t\t\t\tempty: state.empty,\n\t\t\t\tfinished: state.finished,\n\t\t\t\tcurrentPage: state.currentPage,\n\t\t\t\ttotalSize: state.totalSize,\n\t\t\t\terror: state.error,\n\t\t\t}\n\n\t\t\tif (!props.singlePage) {\n\t\t\t\tdata.items = state.items\n\t\t\t}\n\n\t\t\tuseCache(genPersistenceKey()).set(data)\n\t\t}\n\n\t\tconst onScroll = () => {\n\t\t\tif (props.persistence && !state.loading) {\n\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).set(window.scrollY)\n\t\t\t}\n\t\t}\n\n\t\tonMounted(() => {\n\t\t\twindow.addEventListener(\"scroll\", onScroll)\n\t\t})\n\n\t\tonUnmounted(() => {\n\t\t\twindow.removeEventListener(\"scroll\", onScroll)\n\t\t})\n\n\t\tconst loadMore = async (refresh) => {\n\t\t\tif (refresh) {\n\t\t\t\tstate.items = []\n\t\t\t\tstate.currentPage = 1\n\t\t\t\tstate.error = false\n\t\t\t\tstate.errorMessage = \"\"\n\t\t\t\tif (props.persistence) {\n\t\t\t\t\tuseCache(genPersistenceKey()).remove()\n\t\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).remove()\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet currentPage = state.currentPage ? state.currentPage : 1\n\n\t\t\t//如果是错误状态,重新加载时,从当前页开始加载\n\t\t\tif (state.error) {\n\t\t\t\tcurrentPage = state.currentPage || 1\n\t\t\t}\n\n\t\t\tif (props.singlePage) {\n\t\t\t\tshowLoadingToast({\n\t\t\t\t\tmessage: \"加载中...\",\n\t\t\t\t\tforbidClick: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tlet res,\n\t\t\t\tdata = {}\n\t\t\ttry {\n\t\t\t\tstate.loading = true\n\n\t\t\t\tconst method = props.method\n\n\t\t\t\tconst params = {\n\t\t\t\t\t[currentPageKey]: currentPage,\n\t\t\t\t\t[pageSizeKey]: props.pageSize,\n\t\t\t\t\t...props.extraData,\n\t\t\t\t\t...state.searchParams,\n\t\t\t\t}\n\n\t\t\t\tif (method === \"get\") {\n\t\t\t\t\tdata = { params }\n\t\t\t\t} else if (method === \"post\") {\n\t\t\t\t\tdata = { ...params }\n\t\t\t\t}\n\n\t\t\t\tres = await useFetch()[method](props.url, data)\n\t\t\t} catch (e) {\n\t\t\t\tstate.error = true\n\t\t\t\tstate.errorMessage = \"加载失败\"\n\t\t\t\tif (props.persistence) {\n\t\t\t\t\tonPersistence()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @var {PaginationRes} res\n\t\t\t */\n\n\t\t\tif (props.afterFetched && isFunction(props.afterFetched)) {\n\t\t\t\tres = props.afterFetched(res)\n\t\t\t} else if (paginationProvider.afterFetched && isFunction(paginationProvider.afterFetched)) {\n\t\t\t\tres = paginationProvider.afterFetched(res)\n\t\t\t}\n\n\t\t\tif (res.errorMessage) {\n\t\t\t\tstate.error = true\n\t\t\t\tstate.errorMessage = res.errorMessage\n\t\t\t\tif (props.persistence) {\n\t\t\t\t\tonPersistence()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t} else {\n\t\t\t\tstate.error = false\n\t\t\t\tstate.errorMessage = \"\"\n\t\t\t}\n\n\t\t\tstate.items = props.singlePage ? res.items : [...state.items, ...res.items]\n\t\t\tstate.currentPage = res.currentPage\n\t\t\tstate.empty = res.totalSize === 0\n\t\t\tstate.finished = res.totalSize <= state.items.length\n\t\t\tstate.totalSize = res.totalSize\n\n\t\t\tif (props.persistence) {\n\t\t\t\tonPersistence()\n\t\t\t}\n\n\t\t\tif (props.singlePage) {\n\t\t\t\tif (!state.isFirstLoad) {\n\t\t\t\t\t//如果有 persistence 则重置 scroll 来回到顶部\n\t\t\t\t\tuseCache(genPersistenceKey(\"scroll\")).set(0)\n\t\t\t\t\twindow.scrollTo({ top: 0 })\n\t\t\t\t}\n\t\t\t\tcloseToast()\n\t\t\t}\n\n\t\t\tnextTick(() => {\n\t\t\t\tstate.isFirstLoad = false\n\t\t\t\tstate.refreshLoading = false\n\t\t\t\tstate.loading = false\n\t\t\t})\n\t\t}\n\n\t\tconst onSearch = (searchData) => {\n\t\t\tconst isPersistence = !isUndefined(searchData.persistence) && searchData.persistence\n\n\t\t\tif (isPersistence) {\n\t\t\t\tdelete searchData.persistence\n\t\t\t}\n\n\t\t\tstate.searchParams = searchData\n\n\t\t\tloadMore(!isPersistence)\n\t\t}\n\n\t\t/**\n\t\t * 是否自动加载第一页数据\n\t\t * @returns {boolean}\n\t\t */\n\t\tconst onImmediateCheck = () => {\n\t\t\tif (!props.autoLoad) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif (state.isFirstLoad && props.persistence && state.items.length) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\treturn true\n\t\t}\n\n\t\t/**\n\t\t * 瀑布形式自动加载\n\t\t */\n\t\tconst onLoad = () => {\n\t\t\t//state.searchParams = searchRef.value?.getQueryForm() || {}\n\t\t\tif (!state.isFirstLoad || (state.isFirstLoad && state.currentPage !== 1)) {\n\t\t\t\tstate.currentPage += 1\n\t\t\t}\n\t\t\tloadMore(false)\n\t\t}\n\n\t\t/**\n\t\t * 如果没有下拉刷新,并且自动加载,则手动加载一次\n\t\t * 如果是带 Search ,则由 Search 挂载后加载\n\t\t */\n\t\tif (props.singlePage && props.autoLoad && !props.search) {\n\t\t\tloadMore(!props.persistence)\n\t\t}\n\n\t\t/****************** exposed ******************/\n\n\t\t/**\n\t\t * 获取列表数据\n\t\t * @returns Array\n\t\t */\n\t\tconst items = () => {\n\t\t\treturn state.items || []\n\t\t}\n\n\t\t/**\n\t\t * 设置列表数据\n\t\t * @param items\n\t\t */\n\t\tconst setItems = (items) => {\n\t\t\tstate.items = items\n\t\t}\n\n\t\texpose({\n\t\t\tloadMore,\n\t\t\titems,\n\t\t\tsetItems,\n\t\t\tpagination: pick(state, [\"loading\", \"finished\", \"empty\", \"error\", \"currentPage\"]),\n\t\t})\n\n\t\t/****************** render ******************/\n\t\tconst searchElem = () => {\n\t\t\tif (props.search) {\n\t\t\t\tif (props.searchFixed) {\n\t\t\t\t\tconst stickyObj = isObject(props.searchFixed) ? props.searchFixed : {}\n\t\t\t\t\t//给list添加一个top属性,用于计算顶部距离\n\t\t\t\t\tif (isObject(props.searchFixed) && props.searchFixed.offsetTop) {\n\t\t\t\t\t\tstate.offsetTop = props.searchFixed.offsetTop\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Sticky {...stickyObj}>\n\t\t\t\t\t\t\t<div class={`ex-pagination__search`}>\n\t\t\t\t\t\t\t\t<ExSearch ref={searchRef} persistence={props.persistence} {...props.search} onSearch={onSearch}></ExSearch>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Sticky>\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div class={`ex-pagination__search`}>\n\t\t\t\t\t\t\t<ExSearch ref={searchRef} persistence={props.persistence} {...props.search} onSearch={onSearch}></ExSearch>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null\n\t\t\t}\n\t\t}\n\n\t\tconst renderItems = () => {\n\t\t\tconst elems = state.items\n\t\t\t\t? state.items.map((item, index) =>\n\t\t\t\t\t\tslots.renderItem\n\t\t\t\t\t\t\t? slots.renderItem({\n\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t )\n\t\t\t\t: null\n\n\t\t\tnextTick(() => {\n\t\t\t\tif (props.persistence) {\n\t\t\t\t\tconst scrollY = useCache(genPersistenceKey(\"scroll\")).get(0)\n\t\t\t\t\twindow.scrollTo({ top: scrollY })\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn elems\n\t\t}\n\n\t\tconst paginationElem = () => {\n\t\t\treturn (\n\t\t\t\t<div class={`ex-pagination`}>\n\t\t\t\t\t{searchElem()}\n\t\t\t\t\t{slots.prepend?.()}\n\n\t\t\t\t\t<div class={`ex-pagination__list`} style={{ paddingTop: `${state.offsetTop}px` }}>\n\t\t\t\t\t\t{state.empty ? (\n\t\t\t\t\t\t\t<Empty description={props.emptyText}></Empty>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<List\n\t\t\t\t\t\t\t\t\tv-model:loading={state.loading}\n\t\t\t\t\t\t\t\t\tv-model:error={state.error}\n\t\t\t\t\t\t\t\t\timmediateCheck={onImmediateCheck()}\n\t\t\t\t\t\t\t\t\tdisabled={props.singlePage}\n\t\t\t\t\t\t\t\t\tfinished={state.finished}\n\t\t\t\t\t\t\t\t\tfinishedText={props.finishText}\n\t\t\t\t\t\t\t\t\terrorText={state.errorMessage || props.errorText}\n\t\t\t\t\t\t\t\t\tonLoad={onLoad}\n\t\t\t\t\t\t\t\t\toffset={props.offset}\n\t\t\t\t\t\t\t\t\t{...props.defaultProps}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{() => renderItems()}\n\t\t\t\t\t\t\t\t</List>\n\t\t\t\t\t\t\t\t{props.singlePage ? (\n\t\t\t\t\t\t\t\t\t<Pagination\n\t\t\t\t\t\t\t\t\t\tv-model={state.currentPage}\n\t\t\t\t\t\t\t\t\t\ttotalItems={state.totalSize}\n\t\t\t\t\t\t\t\t\t\tonChange={() => loadMore(false)}\n\t\t\t\t\t\t\t\t\t></Pagination>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)\n\t\t}\n\n\t\tconst refreshElem = () => {\n\t\t\tif (props.pullRefresh) {\n\t\t\t\tconst pullRefreshObj = isObject(props.pullRefresh) ? props.pullRefresh : {}\n\t\t\t\treturn (\n\t\t\t\t\t<PullRefresh v-model={state.refreshLoading} class={`ex-pagination__refresh`} onRefresh={() => loadMore(true)} {...pullRefreshObj}>\n\t\t\t\t\t\t{() => paginationElem()}\n\t\t\t\t\t</PullRefresh>\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\treturn paginationElem()\n\t\t\t}\n\t\t}\n\n\t\treturn () => refreshElem()\n\t},\n})\n","import _ExPagination from \"./ExPagination.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExPagination = withInstall(_ExPagination)\nexport default ExPagination\n","import _ExSearch from \"./ExSearch.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExSearch = withInstall(_ExSearch)\nexport default ExSearch\n","import _ExUploader from \"./ExUploader.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExUploader = withInstall(_ExUploader)\nexport default ExUploader\n","import _ExGrid from \"./ExGrid.jsx\"\nimport withInstall from \"../../utils/withInstall\"\nexport const ExGrid = withInstall(_ExGrid)\nexport default ExGrid\n","import { defineComponent } from \"vue\"\nimport \"./index.less\"\nimport { genPixel } from \"../../utils/style.js\"\n\n/**\n * 装饰组件\n *\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExDecorator\",\n\tprops: {\n\t\t/**\n\t\t * 自定义颜色\n\t\t * @values green, blue, black, orange\n\t\t */\n\t\tcolor: { type: String, default: \"green\" },\n\n\t\t/**\n\t\t * 高度\n\t\t */\n\t\theight: { type: [Number, String], default: \"auto\" },\n\t},\n\tsetup(props, { slots }) {\n\t\treturn () => (\n\t\t\t<div class={`ex-decorator ex-decorator__${props.color}`} style={{ height: genPixel(props.height) }}>\n\t\t\t\t{slots.default?.()}\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import _ExDecorator from \"./ExDecorator.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExDecorator = withInstall(_ExDecorator)\nexport default ExDecorator\n","import { defineComponent } from \"vue\"\nimport \"./index.less\"\nimport { genPixel } from \"../../utils/style\"\n\n/**\n * 块状导航\n *\n * @version 1.0.0\n */\nexport default defineComponent({\n\tname: \"ExSector\",\n\tprops: {\n\t\t/**\n\t\t * 自定义颜色\n\t\t * @values green, blue, orange, red\n\t\t */\n\t\tcolor: { type: String, default: \"green\" },\n\t\t/**\n\t\t * 高度\n\t\t */\n\t\theight: { type: [Number, String], default: \"100px\" },\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\t\t/**\n\t\t * 副标题\n\t\t */\n\t\tsubtitle: { type: String, default: \"\" },\n\t},\n\tsetup(props, { slots }) {\n\t\tconst titleElem = () => {\n\t\t\tif (slots.title || props.title) {\n\t\t\t\treturn <div class={\"ex-sector__title\"}>{slots.title?.() || props.title}</div>\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\t\tconst subtitleElem = () => {\n\t\t\tif (slots.subtitle || props.title) {\n\t\t\t\treturn <div class={\"ex-sector__subtitle\"}>{slots.subtitle?.() || props.subtitle}</div>\n\t\t\t}\n\t\t\treturn null\n\t\t}\n\n\t\treturn () => (\n\t\t\t<div class={`ex-sector ex-sector__${props.color}`} style={{ height: genPixel(props.height) }}>\n\t\t\t\t{titleElem()}\n\t\t\t\t{subtitleElem()}\n\t\t\t</div>\n\t\t)\n\t},\n})\n","import _ExSector from \"./ExSector.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExSector = withInstall(_ExSector)\nexport default ExSector\n","import { computed, defineComponent, nextTick, reactive, watch } from \"vue\"\nimport { Progress } from \"vant\"\nimport \"./index.less\"\nimport { ExButton, ExForm } from \"../../components\"\nimport { cloneDeep } from \"lodash-es\"\nimport { useProcessStatusSuccess } from \"../../hooks\"\n\n/**\n * 调查问卷\n * @version 4.4.0\n */\nexport default defineComponent({\n\tname: \"ExSurvey\",\n\tprops: {\n\t\t/**\n\t\t * 标题\n\t\t */\n\t\ttitle: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 问卷 slug\n\t\t */\n\t\tslug: { type: [Number, String], default: \"\", required: true },\n\t\t/**\n\t\t * 开场语\n\t\t */\n\t\tintro: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 结束语\n\t\t */\n\t\toutro: { type: String, default: \"\" },\n\n\t\t/**\n\t\t * 从哪个章节开始做\n\t\t */\n\t\tstartChapter: { type: Number, default: 0 },\n\n\t\t/**\n\t\t * 表单项\n\t\t */\n\t\tformItems: { type: Array, default: () => [], required: true },\n\n\t\t/**\n\t\t * 提交地址\n\t\t */\n\t\tsubmitUrl: { type: String, default: \"\" },\n\n\t\t/**\n\t\t *\n\t\t * @typedef {Object} ExposedFormData\n\t\t * @property {Object} formatForm Format后的表单数据\n\t\t *\n\t\t *\n\t\t * 提交数据处理函数\n\t\t * @param {ExposedFormData} data\n\t\t * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据\n\t\t *\n\t\t */\n\t\tbeforeSubmit: { type: Function, default: null },\n\t},\n\temits: [\n\t\t/**\n\t\t * @event click\n\t\t * @param {Event} event 完结事件\n\t\t */\n\t\t\"finish\",\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst state = reactive({\n\t\t\tcurrentStep: \"intro\",\n\t\t\tformChapters: [], //二维数组,按章节存储\n\t\t\tcurrentChapter: 0, //当前章节\n\t\t})\n\n\t\tconst isLastChapter = computed(() => state.currentChapter === state.formChapters.length)\n\t\tconst progress = computed(() => (!state.formChapters.length ? 0 : (state.currentChapter / state.formChapters.length) * 100))\n\n\t\t// 将 props.formItems 按 break 划分成章节\n\t\tconst prepareFormItems = () => {\n\t\t\tlet chapter = [] //存储章节的数组\n\t\t\tconst formItems = cloneDeep(props.formItems)\n\t\t\tfor (let i = 0; i < formItems.length; i += 1) {\n\t\t\t\tconst item = formItems[i] // 这个是用于渲染的配置\n\t\t\t\titem.defaultSlots = {\n\t\t\t\t\tlabel: () => (\n\t\t\t\t\t\t<span style={{ marginBottom: \"10px\" }}>\n\t\t\t\t\t\t\t{i + 1}.{item.title}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t),\n\t\t\t\t}\n\t\t\t\tif (item.break) {\n\t\t\t\t\tif (chapter.length) {\n\t\t\t\t\t\tstate.formChapters.push(chapter)\n\t\t\t\t\t}\n\t\t\t\t\tdelete item.break\n\t\t\t\t\tchapter = [item]\n\t\t\t\t} else {\n\t\t\t\t\tchapter.push(item)\n\t\t\t\t}\n\n\t\t\t\tif (i === formItems.length - 1) {\n\t\t\t\t\tstate.formChapters.push(chapter)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twatch(\n\t\t\t() => props.formItems,\n\t\t\t() => {\n\t\t\t\tprepareFormItems()\n\t\t\t\tnextTick(() => {\n\t\t\t\t\tif (props.startChapter) {\n\t\t\t\t\t\tstate.currentChapter = Math.min(props.startChapter - 1, state.formChapters.length - 1)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t{ immediate: true },\n\t\t)\n\n\t\tconst onBeforeSubmit = ({ formatForm }) => {\n\t\t\tlet data = { slug: props.slug, answers: formatForm }\n\t\t\tif (props.beforeSubmit) {\n\t\t\t\treturn props.beforeSubmit(data)\n\t\t\t}\n\t\t\treturn data\n\t\t}\n\n\t\tconst onAfterSubmit = (res) => {\n\t\t\tuseProcessStatusSuccess(res, () => {\n\t\t\t\tstate.currentChapter += 1\n\t\t\t\tif (state.currentChapter === state.formChapters.length) {\n\t\t\t\t\tstate.currentStep = \"outro\"\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tconst onFinish = () => {\n\t\t\temit(\"finish\")\n\t\t}\n\n\t\tconst progressElem = () => {\n\t\t\treturn state.formChapters.length <= 1 || state.currentStep !== \"form\" ? null : (\n\t\t\t\t<div class={`ex-survey__progress`}>\n\t\t\t\t\t<Progress showPivot={false} percentage={progress.value}></Progress>\n\t\t\t\t</div>\n\t\t\t)\n\t\t}\n\n\t\tconst introElem = () =>\n\t\t\t(props.title || props.intro) && state.currentStep === \"intro\" ? (\n\t\t\t\t<div class={`ex-survey__intro`}>\n\t\t\t\t\t{props.title ? <div class={`ex-survey__title`}>{props.title}</div> : null}\n\t\t\t\t\t{props.intro || null}\n\t\t\t\t\t<ExButton type={\"primary\"} class={\"ex-survey__start-btn\"} onClick={() => (state.currentStep = \"form\")}>\n\t\t\t\t\t\t{() => \"开始\"}\n\t\t\t\t\t</ExButton>\n\t\t\t\t</div>\n\t\t\t) : null\n\n\t\tconst outroElem = () =>\n\t\t\tprops.intro && state.currentStep === \"outro\" ? (\n\t\t\t\t<div class={`ex-survey__outro`}>\n\t\t\t\t\t{props.outro || \"谢谢您的参与,祝您有美好的一天!\"}\n\t\t\t\t\t<ExButton type={\"primary\"} class={\"ex-survey__finish-btn\"} onClick={onFinish}>\n\t\t\t\t\t\t{() => \"完成\"}\n\t\t\t\t\t</ExButton>\n\t\t\t\t</div>\n\t\t\t) : null\n\n\t\tconst formElem = () => {\n\t\t\treturn state.currentStep === \"form\" ? (\n\t\t\t\t<div class={`ex-survey__form`}>\n\t\t\t\t\t<ExForm\n\t\t\t\t\t\tform={state.formChapters[state.currentChapter]}\n\t\t\t\t\t\tlabelWidth={\"100%\"}\n\t\t\t\t\t\tfixed={true}\n\t\t\t\t\t\tsubmitUrl={props.submitUrl}\n\t\t\t\t\t\tclosable={!isLastChapter.value && state.currentChapter !== 0}\n\t\t\t\t\t\tclose={() => (state.currentChapter -= 1)}\n\t\t\t\t\t\tcancelButtonText={\"上一步\"}\n\t\t\t\t\t\tsubmitButtonText={\"确定\"}\n\t\t\t\t\t\tbeforeSubmit={onBeforeSubmit}\n\t\t\t\t\t\tafterSubmit={onAfterSubmit}\n\t\t\t\t\t></ExForm>\n\t\t\t\t</div>\n\t\t\t) : null\n\t\t}\n\n\t\treturn () => <div class={`ex-survey`}>{[introElem(), progressElem(), formElem(), outroElem()]}</div>\n\t},\n})\n","import _ExSurvey from \"./ExSurvey.jsx\"\nimport withInstall from \"../../utils/withInstall\"\n\nexport const ExSurvey = withInstall(_ExSurvey)\nexport default ExSurvey\n","import * as components from \"./components\"\nimport * as businessComponents from \"./business-components\"\nimport { _configStatus } from \"./hooks\"\n\nexport * from \"./components\"\nexport * from \"./business-components\"\n\nconst totalComponents = Object.assign({}, components, businessComponents)\n\nexport default {\n\tinstall(app) {\n\t\tfor (const componentKey in totalComponents) {\n\t\t\t// eslint-disable-next-line import/namespace\n\t\t\tconst component = totalComponents[componentKey]\n\t\t\t//一些 hooks 和 数据并不需要 install\n\t\t\tif (component && component.install) {\n\t\t\t\tapp.use(component)\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * 用于配置一些全局的工具参数\n\t * @param httpStatus\n\t */\n\tconfig({ httpStatus }) {\n\t\tif (httpStatus && Object.keys(httpStatus).length) {\n\t\t\t_configStatus(httpStatus)\n\t\t}\n\t},\n}\n"],"names":["defineComponent","name","props","type","String","default","size","disabled","Boolean","round","block","text","icon","Object","iconPosition","fetcher","loading","buttonProps","emits","setup","emit","slots","onClick","e","defaultLabel","defaultSlot","_createVNode","Button","_mergeProps","withInstall","component","app","ExButton","_ExButton","ExTheme","_ExTheme","defaultFieldProps","defaultFieldSlots","defaultOptionsProps","prepareOptions","options","isFunction","cloneDeep","op","_a","isString","isNumber","recordOptionsUrl","optionsFetcher","resolve","useFetch","items","useOptionTrait","defaultOptions","fetchData","result","watch","useCache","_isSlot","s","prototype","toString","call","_isVNode","modelValue","Number","Array","mask","displayText","instance","getCurrentInstance","parent","exposed","state","reactive","value","showHelp","isLink","computed","readonly","isReadonly","onUpdateValue","helpElem","help","Popover","$event","reference","Icon","labelElem","label","inputElem","inputSlots","omit","keys","InputElem","input","length","console","warn","appendElem","append","appendResult","fieldSlots","pick","Field","placeholder","required","rules","onClickInput","fieldProps","showWordLimit","title","inset","closeable","expose","showPopup","ref","onClickWrapper","close","TriggerElem","trigger","Popup","pickerProps","pickerSlots","triggerElem","ExField","EX_UPLOADER","Symbol","EX_ADDRESS","EX_FORM","EX_SEARCH","EX_PAGINATION","uploader","uploadUrl","defaultFileItem","id","url","path","thumbUrl","address","addressUrl","displayTextType","afterFetched","optionKeys","children","form","format","search","maskClass","inputClass","pagination","requestKeys","currentPage","pageSize","provide","level","textInValue","addressProvider","inject","defaultAddressUrl","defaultDisplayTextType","defaultAfterFetched","textKey","valueKey","childrenKey","componentValue","setModelValue","isArray","last","pickerRef","mValue","map","item","optionsTexts","useFindTextsFromPath","join","cloneProps","dealOptions","localData","onFinish","selectedOptions","PickerWrapper","Cascader","defaultProps","useAddressFullCode","code","test","substr","useAddressNameFormCode","addressData","clearable","shownOptions","keyword","filterByText","data","filterRecursively","filter","hasKeyword","toLowerCase","includes","labels","useFindParentLabels","fieldNames","onClear","Search","width","_createTextVNode","onChange","CheckboxGroup","option","Checkbox","padZero","num","targetLength","str","Date","columnsType","getYear","isDayjs","year","getFullYear","getMonth","month","getDate","date","_setValueByColumns","forEach","column","push","prepareDate","defaultValue","onConfirm","selectedValues","now","index","isUndefined","DatePicker","onCancel","dateValue","timeValue","activeName","minDate","maxDate","weekdays","dateText","getDay","timeText","timeModel","hours","minutes","split","defaultDate","setDisplayText","getHours","getMinutes","onSelectDate","onTimeChange","dateString","Collapse","CollapseItem","fontWeight","height","Calendar","calendarProps","TimePicker","timeProps","margin","time","times","Stepper","RadioGroup","Radio","filterable","filterUrl","optionRender","Function","recordOptions","columns","find","Promise","get","then","opts","filterOnlineDataByKeyword","res","params","filterLocalDataByKeyword","onOpenWrapper","onSearch","onSearchClear","pickerSlotElem","elem","Form","_slot","Picker","Switch","Rate","Slider","button","accept","headers","maxSize","maxNum","multiple","action","afterUpload","extraData","uploadText","uploadIcon","disk","uploaderProps","uploaderProvider","defaultUploadUrl","urlKey","pathKey","nameKey","fileList","isImage","isSingle","processFileList","status","values","_type","_disk","submitFile","prepareFileList","uid","random","onMounted","isEqual","sort","onOversize","showToast","onSuccess","file","message","fileIndex","findIndex","response","onError","onDelete","onSubmit","files","formData","FormData","key","post","withCredentials","STATUS","STATE_CODE_SUCCESS","customSlot","Uploader","ExUploader","rows","row","initItemDefaultValue","existingData","submitForm","provider","isDate","_b","slice","i","remove","checked","render","isPicker","fieldPropsList","rule","pattern","RegExp","componentProps","merge","exProps","componentSlots","defaultSlots","renderItem","hidden","isBoolean","customRender","match","matchItem","ExSelect","ExDate","ExDatetime","ExTime","ExSwitch","ExRadio","ExCheckbox","ExAddress","ExCascader","ExNumber","ExRate","ExSlider","ExFieldUploader","error","validator","ExMatrixRadio","ExMatrixScale","ExMatrixCheckbox","formItem","break","unshift","Divider","dividerProps","labelWidth","colon","autoLoad","fetchUrl","fixed","submitUrl","submitButtonText","submitConfirmText","submitDisabled","closable","cancelButtonText","cacheable","beforeSubmit","afterSubmit","formProps","formRef","temporary","submitFetcher","isInitializing","submitFormBackup","formItems","formProvider","newV","initFormData","localStorage","set","deep","init","auto","isObject","every","fetchItem","cachedData","showConfirmDialog","lockScroll","catch","extractFormData","useProcessStatusSuccess","nextTick","finally","validate","itemsWithBeforeSubmit","useFormFormat","formatForm","originalForm","showSuccessToast","useFormFail","getFormStandalone","getForm","getFormRealtime","getField","setForm","fields","isDirty","reset","resetValidation","formItemElems","createFormItem","skeletonElem","Skeleton","footerElem","footer","buttonsElem","cancelBtn","submitBtn","nativeType","CellGroup","_useAddressFullCode","_useAddressNameFormCode","_addressData","_ExAddress","_ExField","_ExCascader","_ExCheckbox","_ExDate","_ExDatetime","_ExTime","_ExNumber","_ExRadio","_ExSelect","_ExSwitch","_ExRate","_ExSlider","_ExFieldUploader","_ExMatrixRadio","ExForm","_ExForm","ExProvider","_ExProvider","description","iconElem","extra","ExResult","_ExResult","canPromise","toSJISFunction","CODEWORDS_COUNT","utils","version","digit","f","kanji","exports","fromString","string","BitBuffer","bufIndex","bit","bitBuffer","BitMatrix","col","reserved","bitMatrix","getSymbolSize","require$$0","posCount","intervals","positions","coords","pos","posLength","j","FINDER_PATTERN_SIZE","finderPattern","PenaltyScores","points","sameCountCol","sameCountRow","lastCol","lastRow","module","bitsCol","bitsRow","darkCount","modulesCount","getMaskAt","maskPattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","p","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","errorCorrectionLevel","EXP_TABLE","LOG_TABLE","x","galoisField","y","GF","p1","p2","coeff","divident","divisor","offset","degree","poly","Polynomial","ReedSolomonEncoder","paddedData","remainder","start","buff","reedSolomonEncoder","versionCheck","numeric","alphanumeric","byte","regex","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","VersionCheck","Regex","require$$1","mode","dataStr","Utils","ECCode","require$$2","Mode","require$$3","require$$4","G18","G18_BCH","getBestVersionForDataLength","currentVersion","getReservedBitsCount","getTotalBitsFromDataArray","segments","totalBits","reservedBits","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","seg","ecl","d","G15","G15_MASK","G15_BCH","formatInfo","NumericData","group","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","encodeUtf8","point","second","ByteData","l","byteData","KanjiData","kanjiData","dijkstra","graph","predecessors","costs","open","closest","v","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","msg","nodes","u","T","t","a","b","cost","require$$5","require$$6","require$$7","getStringByteLength","getSegments","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","s1","s2","obj","getSegmentBitsLength","mergeSegments","segs","acc","curr","prevSeg","buildNodes","buildGraph","table","prevNodeIds","nodeGroup","currentNodeIds","node","n","prevNodeId","buildSingleSegment","modesHint","bestMode","array","optimizedSegs","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","matrix","c","setupTimingPattern","r","setupAlignmentPattern","setupVersionInfo","bits","mod","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","buffer","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","hex2rgba","hex","hexCode","hexValue","scale","qrSize","imgData","qr","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","ctx","canvas","getCanvasElement","qrData","canvasEl","image","rendererOpts","getColorAttrib","color","attrib","alpha","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","svgTag","cb","qrcodesize","bg","viewBox","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","args","argsNum","isLastArgCb","reject","browser","_","center","colorDark","colorLight","correctLevel","containerRef","create","toDataURL","light","onBeforeUpdate","ExQrcode","_ExQrcode","genPixel","isNull","direction","gutter","gridTemplateColumns","gridAutoFlow","gridRowGap","gridColumnGap","queryForm","_temp","activeNames","toggleChooseOption","expandable","indexOf","splice","isOptionActive","optionElems","ExGrid","selectRef","cascadeRef","fieldElem","inputProps","inputAlign","persistence","beforeSearch","adapter","searchProps","showFilterPopup","genPersistenceKey","prefix","useSm3","location","href","pathname","searchItemDefaultValue","quickColumns","quick","fieldColumns","initQueryForm","persistenceSearchData","getQueryForm","filedItem","onOpenFilter","onCloseFilter","condition","_q","searchForm","onFieldSearch","onClearFields","quickElems","createQuick","popupHeaderElem","fieldElems","createExpand","createField","popupFooterElem","quickBarElem","pullRefresh","searchFixed","method","emptyText","finishText","errorText","singlePage","paginationProvider","searchRef","currentPageKey","pageSizeKey","persistencePagination","errorMessage","totalSize","finished","empty","searchParams","offsetTop","refreshLoading","isFirstLoad","onPersistence","onScroll","window","scrollY","addEventListener","onUnmounted","removeEventListener","loadMore","refresh","showLoadingToast","forbidClick","scrollTo","top","closeToast","searchData","isPersistence","onImmediateCheck","onLoad","setItems","searchElem","stickyObj","Sticky","ExSearch","renderItems","elems","paginationElem","prepend","paddingTop","Empty","List","Pagination","refreshElem","pullRefreshObj","PullRefresh","onRefresh","ExPagination","_ExPagination","_ExSearch","_ExUploader","_ExGrid","ExDecorator","_ExDecorator","subtitle","titleElem","subtitleElem","ExSector","_ExSector","slug","intro","outro","startChapter","currentStep","formChapters","currentChapter","isLastChapter","progress","prepareFormItems","chapter","marginBottom","Math","min","immediate","onBeforeSubmit","answers","onAfterSubmit","progressElem","Progress","introElem","outroElem","formElem","ExSurvey","_ExSurvey","totalComponents","components","businessComponents","componentKey","httpStatus","_configStatus"],"mappings":"oPAQA,MAAeA,qBAAgB,CAC9BC,KAAM,WACNC,MAAO,CAKNC,KAAM,CAAEA,KAAMC,OAAQC,QAAS,SAAW,EAM1CC,KAAM,CAAEH,KAAMC,OAAQC,QAAS,QAAU,EAKzCE,SAAU,CAAEJ,KAAMK,QAASH,QAAS,EAAO,EAK3CI,MAAO,CAAEN,KAAMK,QAASH,QAAS,EAAM,EAKvCK,MAAO,CAAEP,KAAMK,QAASH,QAAS,EAAM,EAKvCM,KAAM,CAAER,KAAMC,OAAQC,QAAS,EAAI,EAMnCO,KAAM,CAAET,KAAMU,OAAQR,QAAS,IAAM,EAMrCS,aAAc,CAAEX,KAAMC,OAAQC,QAAS,MAAQ,EAM/CU,QAAS,CACRZ,KAAMU,OACNR,QAASA,KAAO,CAAEW,QAAS,IAC3B,EAKDC,YAAa,CACZd,KAAMU,OACNR,QAASA,KAAO,CAAA,EACjB,CACA,EACDa,MAAO,CAKN,OAAO,EAGRC,MAAMjB,EAAO,CAAEkB,KAAAA,EAAMC,MAAAA,CAAM,EAAG,CAC7B,MAAMC,EAAWC,GAAM,CAItBH,EAAK,QAASG,CAAC,GAGVC,EAAeA,IAAM,OAC1B,OAAOtB,EAAMS,QAAQU,EAAAA,EAAMhB,UAANgB,YAAAA,EAAAA,KAAAA,KAGhBI,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