orion-design 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. package/README.md +5 -0
  2. package/dist/components/Button/Button.vue.d.ts +2 -0
  3. package/dist/components/Button/index.d.ts +4 -0
  4. package/dist/components/Button/index.js +27 -0
  5. package/dist/components/Button/index.js.map +1 -0
  6. package/dist/components/Flex/Col.d.ts +4 -4
  7. package/dist/components/Flex/Item.d.ts +4 -4
  8. package/dist/components/Flex/Row.d.ts +4 -4
  9. package/dist/components/Flex/index.d.ts +4 -4
  10. package/dist/components/Flex/index.js +95 -127
  11. package/dist/components/Flex/index.js.map +1 -0
  12. package/dist/components/Form/Form.d.ts +21 -0
  13. package/dist/components/Form/Form.js +5 -0
  14. package/dist/components/Form/Form.js.map +1 -0
  15. package/dist/components/Form/Form.vue.d.ts +465 -0
  16. package/dist/components/Form/PasswordInput/PasswordInput.d.ts +15 -0
  17. package/dist/components/Form/PasswordInput/PasswordInput.js +2 -0
  18. package/dist/components/Form/PasswordInput/PasswordInput.js.map +1 -0
  19. package/dist/components/Form/PasswordInput/PasswordInput.vue.d.ts +3 -0
  20. package/dist/components/Form/PasswordInput/index.d.ts +1 -0
  21. package/dist/components/Form/PasswordInput/index.js +2 -0
  22. package/dist/components/Form/PasswordInput/index.js.map +1 -0
  23. package/dist/components/Form/StringInput/StringInput.d.ts +15 -0
  24. package/dist/components/Form/StringInput/StringInput.js +2 -0
  25. package/dist/components/Form/StringInput/StringInput.js.map +1 -0
  26. package/dist/components/Form/StringInput/StringInput.vue.d.ts +3 -0
  27. package/dist/components/Form/StringInput/index.d.ts +1 -0
  28. package/dist/components/Form/StringInput/index.js +2 -0
  29. package/dist/components/Form/StringInput/index.js.map +1 -0
  30. package/dist/components/Form/Textarea/Textarea.d.ts +16 -0
  31. package/dist/components/Form/Textarea/Textarea.js +2 -0
  32. package/dist/components/Form/Textarea/Textarea.js.map +1 -0
  33. package/dist/components/Form/Textarea/Textarea.vue.d.ts +3 -0
  34. package/dist/components/Form/Textarea/index.d.ts +1 -0
  35. package/dist/components/Form/Textarea/index.js +2 -0
  36. package/dist/components/Form/Textarea/index.js.map +1 -0
  37. package/dist/components/Form/hooks/useForm.d.ts +4 -0
  38. package/dist/components/Form/hooks/useForm.js +21 -0
  39. package/dist/components/Form/hooks/useForm.js.map +1 -0
  40. package/dist/components/Form/index.d.ts +273 -0
  41. package/dist/components/Form/index.js +194 -0
  42. package/dist/components/Form/index.js.map +1 -0
  43. package/dist/components/Modal/index.d.ts +1 -14
  44. package/dist/components/Modal/useModal.d.ts +1 -1
  45. package/dist/components/Modal/useModal.js +7 -7
  46. package/dist/components/Modal/useModal.js.map +1 -0
  47. package/dist/components/Pagetable/Pagetable.d.ts +79 -0
  48. package/dist/components/Pagetable/columns/PagetableDatecolumn.d.ts +88 -0
  49. package/dist/components/Pagetable/columns/PagetableStringcolumn.d.ts +62 -0
  50. package/dist/components/Pagetable/index.d.ts +60 -0
  51. package/dist/components/Pagetable/index.js +144 -0
  52. package/dist/components/Pagetable/index.js.map +1 -0
  53. package/dist/components/Pagetable/interface.d.ts +10 -0
  54. package/dist/components/Pagetable/interface.js +2 -0
  55. package/dist/components/Pagetable/interface.js.map +1 -0
  56. package/dist/components/Space/index.d.ts +9 -9
  57. package/dist/components/_util/arrays.d.ts +5 -0
  58. package/dist/components/_util/arrays.js +8 -0
  59. package/dist/components/_util/arrays.js.map +1 -0
  60. package/dist/components/_util/browser.d.ts +3 -0
  61. package/dist/components/_util/browser.js +9 -0
  62. package/dist/components/_util/browser.js.map +1 -0
  63. package/dist/components/_util/classNames.js +20 -27
  64. package/dist/components/_util/classNames.js.map +1 -0
  65. package/dist/components/_util/dom/aria.d.ts +30 -0
  66. package/dist/components/_util/dom/aria.js +46 -0
  67. package/dist/components/_util/dom/aria.js.map +1 -0
  68. package/dist/components/_util/dom/element.d.ts +3 -0
  69. package/dist/components/_util/dom/element.js +18 -0
  70. package/dist/components/_util/dom/element.js.map +1 -0
  71. package/dist/components/_util/dom/event.d.ts +6 -0
  72. package/dist/components/_util/dom/event.js +10 -0
  73. package/dist/components/_util/dom/event.js.map +1 -0
  74. package/dist/components/_util/dom/index.d.ts +6 -0
  75. package/dist/components/_util/dom/index.js +39 -0
  76. package/dist/components/_util/dom/index.js.map +1 -0
  77. package/dist/components/_util/dom/position.d.ts +7 -0
  78. package/dist/components/_util/dom/position.js +30 -0
  79. package/dist/components/_util/dom/position.js.map +1 -0
  80. package/dist/components/_util/dom/scroll.d.ts +11 -0
  81. package/dist/components/_util/dom/scroll.js +78 -0
  82. package/dist/components/_util/dom/scroll.js.map +1 -0
  83. package/dist/components/_util/dom/style.d.ts +9 -0
  84. package/dist/components/_util/dom/style.js +58 -0
  85. package/dist/components/_util/dom/style.js.map +1 -0
  86. package/dist/components/_util/easings.d.ts +1 -0
  87. package/dist/components/_util/easings.js +8 -0
  88. package/dist/components/_util/easings.js.map +1 -0
  89. package/dist/components/_util/error.d.ts +3 -0
  90. package/dist/components/_util/error.js +22 -0
  91. package/dist/components/_util/error.js.map +1 -0
  92. package/dist/components/_util/functions.d.ts +1 -0
  93. package/dist/components/_util/functions.js +6 -0
  94. package/dist/components/_util/functions.js.map +1 -0
  95. package/dist/components/_util/i18n.d.ts +1 -0
  96. package/dist/components/_util/i18n.js +5 -0
  97. package/dist/components/_util/i18n.js.map +1 -0
  98. package/dist/components/_util/index.d.ts +15 -0
  99. package/dist/components/_util/index.js +140 -0
  100. package/dist/components/_util/index.js.map +1 -0
  101. package/dist/components/_util/isValid.js +4 -4
  102. package/dist/components/_util/isValid.js.map +1 -0
  103. package/dist/components/_util/objects.d.ts +8 -0
  104. package/dist/components/_util/objects.js +17 -0
  105. package/dist/components/_util/objects.js.map +1 -0
  106. package/dist/components/_util/props-util/index.d.ts +4 -4
  107. package/dist/components/_util/props-util/index.js +23 -50
  108. package/dist/components/_util/props-util/index.js.map +1 -0
  109. package/dist/components/_util/props-util/initDefaultProps.d.ts +2 -2
  110. package/dist/components/_util/props-util/initDefaultProps.js +13 -24
  111. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -0
  112. package/dist/components/_util/raf.d.ts +2 -0
  113. package/dist/components/_util/raf.js +7 -0
  114. package/dist/components/_util/raf.js.map +1 -0
  115. package/dist/components/_util/rand.d.ts +12 -0
  116. package/dist/components/_util/rand.js +6 -0
  117. package/dist/components/_util/rand.js.map +1 -0
  118. package/dist/components/_util/strings.d.ts +6 -0
  119. package/dist/components/_util/strings.js +11 -0
  120. package/dist/components/_util/strings.js.map +1 -0
  121. package/dist/components/_util/throttleByRaf.d.ts +4 -0
  122. package/dist/components/_util/throttleByRaf.js +16 -0
  123. package/dist/components/_util/throttleByRaf.js.map +1 -0
  124. package/dist/components/_util/type.d.ts +1 -1
  125. package/dist/components/_util/type.js +48 -65
  126. package/dist/components/_util/type.js.map +1 -0
  127. package/dist/components/_util/types.d.ts +10 -0
  128. package/dist/components/_util/types.js +25 -0
  129. package/dist/components/_util/types.js.map +1 -0
  130. package/dist/components/_util/typescript.d.ts +12 -0
  131. package/dist/components/_util/typescript.js +5 -0
  132. package/dist/components/_util/typescript.js.map +1 -0
  133. package/dist/components/_util/util.d.ts +1 -1
  134. package/dist/components/_util/util.js +46 -74
  135. package/dist/components/_util/util.js.map +1 -0
  136. package/dist/components/_util/vue/global-node.d.ts +3 -0
  137. package/dist/components/_util/vue/global-node.js +21 -0
  138. package/dist/components/_util/vue/global-node.js.map +1 -0
  139. package/dist/components/_util/vue/icon.d.ts +23 -0
  140. package/dist/components/_util/vue/icon.js +154 -0
  141. package/dist/components/_util/vue/icon.js.map +1 -0
  142. package/dist/components/_util/vue/index.d.ts +9 -0
  143. package/dist/components/_util/vue/index.js +44 -0
  144. package/dist/components/_util/vue/index.js.map +1 -0
  145. package/dist/components/_util/vue/install.d.ts +6 -0
  146. package/dist/components/_util/vue/install.js +21 -0
  147. package/dist/components/_util/vue/install.js.map +1 -0
  148. package/dist/components/_util/vue/props/index.d.ts +3 -0
  149. package/dist/components/_util/vue/props/index.js +9 -0
  150. package/dist/components/_util/vue/props/index.js.map +1 -0
  151. package/dist/components/_util/vue/props/runtime.d.ts +29 -0
  152. package/dist/components/_util/vue/props/runtime.js +37 -0
  153. package/dist/components/_util/vue/props/runtime.js.map +1 -0
  154. package/dist/components/_util/vue/props/types.d.ts +120 -0
  155. package/dist/components/_util/vue/props/types.js +2 -0
  156. package/dist/components/_util/vue/props/types.js.map +1 -0
  157. package/dist/components/_util/vue/props/util.d.ts +8 -0
  158. package/dist/components/_util/vue/props/util.js +2 -0
  159. package/dist/components/_util/vue/props/util.js.map +1 -0
  160. package/dist/components/_util/vue/refs.d.ts +3 -0
  161. package/dist/components/_util/vue/refs.js +12 -0
  162. package/dist/components/_util/vue/refs.js.map +1 -0
  163. package/dist/components/_util/vue/size.d.ts +2 -0
  164. package/dist/components/_util/vue/size.js +6 -0
  165. package/dist/components/_util/vue/size.js.map +1 -0
  166. package/dist/components/_util/vue/typescript.d.ts +5 -0
  167. package/dist/components/_util/vue/typescript.js +2 -0
  168. package/dist/components/_util/vue/typescript.js.map +1 -0
  169. package/dist/components/_util/vue/validator.d.ts +3 -0
  170. package/dist/components/_util/vue/validator.js +7 -0
  171. package/dist/components/_util/vue/validator.js.map +1 -0
  172. package/dist/components/_util/vue/vnode.d.ts +50 -0
  173. package/dist/components/_util/vue/vnode.js +68 -0
  174. package/dist/components/_util/vue/vnode.js.map +1 -0
  175. package/dist/components/_util/vue-types/index.d.ts +3 -3
  176. package/dist/components/_util/vue-types/index.js +275 -417
  177. package/dist/components/_util/vue-types/index.js.map +1 -0
  178. package/dist/components/components.d.ts +4 -0
  179. package/dist/components/components.js +18 -12
  180. package/dist/components/components.js.map +1 -0
  181. package/dist/components/index.d.ts +1 -1
  182. package/dist/components/index.js +25 -24
  183. package/dist/components/index.js.map +1 -0
  184. package/dist/components-BZukhWDk.js +106 -0
  185. package/dist/components-BZukhWDk.js.map +1 -0
  186. package/dist/error/OrionError.js +7 -12
  187. package/dist/error/OrionError.js.map +1 -0
  188. package/dist/functions-DzLqXvGt.js +33 -0
  189. package/dist/functions-DzLqXvGt.js.map +1 -0
  190. package/dist/index-C8JNJPWW.js +8 -0
  191. package/dist/index-C8JNJPWW.js.map +1 -0
  192. package/dist/index.css +1 -44
  193. package/dist/index.d.ts +1 -1
  194. package/dist/index.js +24 -14
  195. package/dist/index.js.map +1 -0
  196. package/dist/print/LodopFuncs.js +48 -111
  197. package/dist/print/LodopFuncs.js.map +1 -0
  198. package/dist/print/index.d.ts +2 -2
  199. package/dist/print/index.js +111 -220
  200. package/dist/print/index.js.map +1 -0
  201. package/dist/request/ErrorHandlerChain.js +17 -15
  202. package/dist/request/ErrorHandlerChain.js.map +1 -0
  203. package/dist/request/RequestFilterChain.d.ts +1 -1
  204. package/dist/request/RequestFilterChain.js +16 -14
  205. package/dist/request/RequestFilterChain.js.map +1 -0
  206. package/dist/request/ResponseParserChain.d.ts +1 -1
  207. package/dist/request/ResponseParserChain.js +17 -15
  208. package/dist/request/ResponseParserChain.js.map +1 -0
  209. package/dist/request/disivion/DateSerializer.js +25 -46
  210. package/dist/request/disivion/DateSerializer.js.map +1 -0
  211. package/dist/request/disivion/DivisionErrorHandler.d.ts +1 -1
  212. package/dist/request/disivion/DivisionErrorHandler.js +30 -52
  213. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -0
  214. package/dist/request/disivion/DivisionResponseParser.d.ts +2 -2
  215. package/dist/request/disivion/DivisionResponseParser.js +13 -25
  216. package/dist/request/disivion/DivisionResponseParser.js.map +1 -0
  217. package/dist/request/disivion/index.d.ts +3 -3
  218. package/dist/request/disivion/index.js +230 -480
  219. package/dist/request/disivion/index.js.map +1 -0
  220. package/dist/request/error/BizExceptionResponseError.d.ts +2 -2
  221. package/dist/request/error/BizExceptionResponseError.js +8 -15
  222. package/dist/request/error/BizExceptionResponseError.js.map +1 -0
  223. package/dist/request/error/ExceptionResponseError.d.ts +2 -2
  224. package/dist/request/error/ExceptionResponseError.js +8 -15
  225. package/dist/request/error/ExceptionResponseError.js.map +1 -0
  226. package/dist/request/error/ResponseError.d.ts +1 -1
  227. package/dist/request/error/ResponseError.js +7 -14
  228. package/dist/request/error/ResponseError.js.map +1 -0
  229. package/dist/request/error/SessionExceptionResponseError.d.ts +2 -2
  230. package/dist/request/error/SessionExceptionResponseError.js +8 -15
  231. package/dist/request/error/SessionExceptionResponseError.js.map +1 -0
  232. package/dist/request/index.js +11 -17
  233. package/dist/request/index.js.map +1 -0
  234. package/dist/style/index.d.ts +0 -3
  235. package/dist/style/index.js +1 -0
  236. package/dist/style/index.js.map +1 -0
  237. package/dist/utils/DateUtil.js +36 -50
  238. package/dist/utils/DateUtil.js.map +1 -0
  239. package/dist/utils/NumberUtil.js +9 -8
  240. package/dist/utils/NumberUtil.js.map +1 -0
  241. package/dist/utils/cloneDeep.js +5 -1
  242. package/dist/utils/cloneDeep.js.map +1 -0
  243. package/dist/utils/delay.js +6 -4
  244. package/dist/utils/delay.js.map +1 -0
  245. package/dist/utils/functions.d.ts +1 -0
  246. package/dist/utils/functions.js +6 -0
  247. package/dist/utils/functions.js.map +1 -0
  248. package/dist/utils/index.js +15 -9
  249. package/dist/utils/index.js.map +1 -0
  250. package/dist/utils/md5.js +121 -244
  251. package/dist/utils/md5.js.map +1 -0
  252. package/dist/utils/uuid.js +28 -58
  253. package/dist/utils/uuid.js.map +1 -0
  254. package/dist/utils/vue/install.d.ts +6 -0
  255. package/dist/utils/vue/install.js +21 -0
  256. package/dist/utils/vue/install.js.map +1 -0
  257. package/dist/utils/vue/typescript.d.ts +5 -0
  258. package/dist/utils/vue/typescript.js +2 -0
  259. package/dist/utils/vue/typescript.js.map +1 -0
  260. package/dist/version/index.d.ts +1 -1
  261. package/dist/version/index.js +5 -6
  262. package/dist/version/index.js.map +1 -0
  263. package/dist/version/version.d.ts +1 -1
  264. package/dist/version/version.js +5 -3
  265. package/dist/version/version.js.map +1 -0
  266. package/dist/vite.svg +1 -0
  267. package/global.d.ts +6 -0
  268. package/package.json +52 -63
  269. package/dist/components-DhjIbmR3.js +0 -128
@@ -0,0 +1,21 @@
1
+ import { inject as a, getCurrentInstance as c } from "vue";
2
+ import { formContextKey as f } from "../Form.js";
3
+ import { castArray as m } from "lodash-es";
4
+ const l = () => a(f), C = () => {
5
+ const r = l(), { props: e } = c();
6
+ return e.span ? e.span : r.itemSpan;
7
+ }, b = () => {
8
+ const r = l(), { props: e } = c(), { name: s, label: n, required: i } = e, t = [];
9
+ let o = !0;
10
+ return i && (e.rules && (t.push(...m(e.rules)), o = !t.some((u) => Object.keys(u).includes("required"))), r.rules && r.rules[s] && (o = !m(r.rules[s]).some((p) => Object.keys(p).includes("required")))), o && t.push({
11
+ required: !0,
12
+ message: `必填项[${n || s}]不能为空`,
13
+ trigger: "blur"
14
+ }), t;
15
+ };
16
+ export {
17
+ l as useFormContext,
18
+ b as useFormRules,
19
+ C as useFormSpan
20
+ };
21
+ //# sourceMappingURL=useForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForm.js","sources":["../../../../src/components/Form/hooks/useForm.ts"],"sourcesContent":["import { inject, getCurrentInstance } from 'vue'\r\nimport { formContextKey, FormItemRule } from '../Form'\r\nimport { castArray } from 'lodash-es'\r\n\r\nconst useFormContext = () => {\r\n return inject(formContextKey)\r\n}\r\n\r\nconst useFormSpan = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n\r\n let span = props.span ? (props.span as number) : formContext.itemSpan\r\n\r\n return span\r\n}\r\n\r\nconst useFormRules = () => {\r\n const formContext = useFormContext()!\r\n const { props } = getCurrentInstance()!\r\n const { name, label, required } = props\r\n\r\n const rules: FormItemRule[] = []\r\n let flag = true\r\n\r\n if (required) {\r\n if (props.rules) {\r\n rules.push(...castArray(props.rules))\r\n flag = !rules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n if (formContext.rules && formContext.rules[name as string]) {\r\n const formRules = castArray(formContext.rules[name as string])\r\n flag = !formRules.some((rule) => Object.keys(rule).includes('required'))\r\n }\r\n }\r\n\r\n if (flag) {\r\n rules.push({\r\n required: true,\r\n message: `必填项[${label ? label : name}]不能为空`,\r\n trigger: 'blur'\r\n })\r\n }\r\n\r\n return rules\r\n}\r\n\r\nexport { useFormContext, useFormSpan, useFormRules }\r\n"],"names":["useFormContext","inject","formContextKey","useFormSpan","formContext","props","getCurrentInstance","useFormRules","name","label","required","rules","flag","castArray","rule"],"mappings":";;;AAIA,MAAMA,IAAiB,MACdC,EAAOC,CAAc,GAGxBC,IAAc,MAAM;AACxB,QAAMC,IAAcJ,KACd,EAAE,OAAAK,MAAUC;AAIX,SAFID,EAAM,OAAQA,EAAM,OAAkBD,EAAY;AAG/D,GAEMG,IAAe,MAAM;AACzB,QAAMH,IAAcJ,KACd,EAAE,OAAAK,MAAUC,KACZ,EAAE,MAAAE,GAAM,OAAAC,GAAO,UAAAC,EAAA,IAAaL,GAE5BM,IAAwB,CAAA;AAC9B,MAAIC,IAAO;AAEX,SAAIF,MACEL,EAAM,UACRM,EAAM,KAAK,GAAGE,EAAUR,EAAM,KAAK,CAAC,GAC7BO,IAAA,CAACD,EAAM,KAAK,CAACG,MAAS,OAAO,KAAKA,CAAI,EAAE,SAAS,UAAU,CAAC,IAEjEV,EAAY,SAASA,EAAY,MAAMI,CAAc,MAEhDI,IAAA,CADWC,EAAUT,EAAY,MAAMI,CAAc,CAAC,EAC3C,KAAK,CAACM,MAAS,OAAO,KAAKA,CAAI,EAAE,SAAS,UAAU,CAAC,KAIvEF,KACFD,EAAM,KAAK;AAAA,IACT,UAAU;AAAA,IACV,SAAS,OAAOF,KAAgBD,CAAI;AAAA,IACpC,SAAS;AAAA,EAAA,CACV,GAGIG;AACT;"}
@@ -0,0 +1,273 @@
1
+ import { default as StringInput } from './StringInput/StringInput.vue';
2
+ import { default as PasswordInput } from './PasswordInput/PasswordInput.vue';
3
+ import { default as Textarea } from './Textarea/Textarea.vue';
4
+ declare const _default: import('../../utils/vue/typescript').SFCWithInstall<{
5
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
6
+ modelValue?: Record<string, any>;
7
+ } & import('./Form').FormProps> & Readonly<{
8
+ "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
9
+ }>, {
10
+ validate: () => Promise<boolean>;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ "update:modelValue": (modelValue: Record<string, any>) => any;
13
+ }, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{
14
+ modelValue?: Record<string, any>;
15
+ } & import('./Form').FormProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
17
+ }>, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
18
+ formRef: ({
19
+ $: import('vue').ComponentInternalInstance;
20
+ $data: {};
21
+ $props: Partial<{
22
+ readonly inline: boolean;
23
+ readonly disabled: boolean;
24
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
25
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
26
+ readonly inlineMessage: boolean;
27
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
28
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "left" | "right", unknown>;
29
+ readonly labelSuffix: string;
30
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
31
+ readonly statusIcon: boolean;
32
+ readonly hideRequiredAsterisk: boolean;
33
+ readonly scrollToError: boolean;
34
+ }> & Omit<{
35
+ readonly disabled: boolean;
36
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "left" | "right" | "top", unknown>;
37
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "left" | "right", unknown>;
38
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
39
+ readonly labelSuffix: string;
40
+ readonly inline: boolean;
41
+ readonly inlineMessage: boolean;
42
+ readonly statusIcon: boolean;
43
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
44
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
45
+ readonly hideRequiredAsterisk: boolean;
46
+ readonly scrollToError: boolean;
47
+ readonly size?: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown> | undefined;
48
+ readonly rules?: Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>> | undefined;
49
+ readonly model?: Record<string, any> | undefined;
50
+ readonly scrollIntoViewOptions?: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown> | undefined;
51
+ onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
52
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
53
+ readonly model: ObjectConstructor;
54
+ readonly rules: {
55
+ readonly type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
56
+ readonly required: false;
57
+ readonly validator: ((val: unknown) => boolean) | undefined;
58
+ __epPropKey: true;
59
+ };
60
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
61
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
62
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
63
+ readonly labelSuffix: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
64
+ readonly inline: BooleanConstructor;
65
+ readonly inlineMessage: BooleanConstructor;
66
+ readonly statusIcon: BooleanConstructor;
67
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
68
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
69
+ readonly hideRequiredAsterisk: BooleanConstructor;
70
+ readonly scrollToError: BooleanConstructor;
71
+ readonly scrollIntoViewOptions: {
72
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
73
+ readonly required: false;
74
+ readonly validator: ((val: unknown) => boolean) | undefined;
75
+ __epPropKey: true;
76
+ };
77
+ readonly size: {
78
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
79
+ readonly required: false;
80
+ readonly validator: ((val: unknown) => boolean) | undefined;
81
+ __epPropKey: true;
82
+ };
83
+ readonly disabled: BooleanConstructor;
84
+ }>> & {
85
+ onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
86
+ }, "disabled" | "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "inline" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">;
87
+ $attrs: {
88
+ [x: string]: unknown;
89
+ };
90
+ $refs: {
91
+ [x: string]: unknown;
92
+ };
93
+ $slots: Readonly<{
94
+ [name: string]: import('vue').Slot<any> | undefined;
95
+ }>;
96
+ $root: import('vue').ComponentPublicInstance | null;
97
+ $parent: import('vue').ComponentPublicInstance | null;
98
+ $host: Element | null;
99
+ $emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
100
+ $el: any;
101
+ $options: import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
102
+ readonly model: ObjectConstructor;
103
+ readonly rules: {
104
+ readonly type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
105
+ readonly required: false;
106
+ readonly validator: ((val: unknown) => boolean) | undefined;
107
+ __epPropKey: true;
108
+ };
109
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
110
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
111
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
112
+ readonly labelSuffix: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
113
+ readonly inline: BooleanConstructor;
114
+ readonly inlineMessage: BooleanConstructor;
115
+ readonly statusIcon: BooleanConstructor;
116
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
117
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
118
+ readonly hideRequiredAsterisk: BooleanConstructor;
119
+ readonly scrollToError: BooleanConstructor;
120
+ readonly scrollIntoViewOptions: {
121
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
122
+ readonly required: false;
123
+ readonly validator: ((val: unknown) => boolean) | undefined;
124
+ __epPropKey: true;
125
+ };
126
+ readonly size: {
127
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
128
+ readonly required: false;
129
+ readonly validator: ((val: unknown) => boolean) | undefined;
130
+ __epPropKey: true;
131
+ };
132
+ readonly disabled: BooleanConstructor;
133
+ }>> & {
134
+ onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
135
+ }, {
136
+ validate: (callback?: import('element-plus').FormValidateCallback | undefined) => import('element-plus').FormValidationResult;
137
+ validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined, callback?: import('element-plus').FormValidateCallback | undefined) => import('element-plus').FormValidationResult;
138
+ resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined) => void;
139
+ clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined) => void;
140
+ scrollToField: (prop: import('element-plus').FormItemProp) => void;
141
+ fields: import('element-plus').FormItemContext[];
142
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
143
+ validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
144
+ }, string, {
145
+ readonly inline: boolean;
146
+ readonly disabled: boolean;
147
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
148
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
149
+ readonly inlineMessage: boolean;
150
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
151
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "left" | "right", unknown>;
152
+ readonly labelSuffix: string;
153
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
154
+ readonly statusIcon: boolean;
155
+ readonly hideRequiredAsterisk: boolean;
156
+ readonly scrollToError: boolean;
157
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
158
+ beforeCreate?: (() => void) | (() => void)[];
159
+ created?: (() => void) | (() => void)[];
160
+ beforeMount?: (() => void) | (() => void)[];
161
+ mounted?: (() => void) | (() => void)[];
162
+ beforeUpdate?: (() => void) | (() => void)[];
163
+ updated?: (() => void) | (() => void)[];
164
+ activated?: (() => void) | (() => void)[];
165
+ deactivated?: (() => void) | (() => void)[];
166
+ beforeDestroy?: (() => void) | (() => void)[];
167
+ beforeUnmount?: (() => void) | (() => void)[];
168
+ destroyed?: (() => void) | (() => void)[];
169
+ unmounted?: (() => void) | (() => void)[];
170
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
171
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
172
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
173
+ };
174
+ $forceUpdate: () => void;
175
+ $nextTick: typeof import('vue').nextTick;
176
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
177
+ } & Readonly<{
178
+ readonly inline: boolean;
179
+ readonly disabled: boolean;
180
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
181
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "top" | "left" | "right", unknown>;
182
+ readonly inlineMessage: boolean;
183
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
184
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "left" | "right", unknown>;
185
+ readonly labelSuffix: string;
186
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
187
+ readonly statusIcon: boolean;
188
+ readonly hideRequiredAsterisk: boolean;
189
+ readonly scrollToError: boolean;
190
+ }> & Omit<Readonly<import('vue').ExtractPropTypes<{
191
+ readonly model: ObjectConstructor;
192
+ readonly rules: {
193
+ readonly type: import('vue').PropType<Partial<Record<string, import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemRule>>>>;
194
+ readonly required: false;
195
+ readonly validator: ((val: unknown) => boolean) | undefined;
196
+ __epPropKey: true;
197
+ };
198
+ readonly labelPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
199
+ readonly requireAsteriskPosition: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
200
+ readonly labelWidth: import('element-plus/es/utils/index.mjs').EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
201
+ readonly labelSuffix: import('element-plus/es/utils/index.mjs').EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
202
+ readonly inline: BooleanConstructor;
203
+ readonly inlineMessage: BooleanConstructor;
204
+ readonly statusIcon: BooleanConstructor;
205
+ readonly showMessage: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
206
+ readonly validateOnRuleChange: import('element-plus/es/utils/index.mjs').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
207
+ readonly hideRequiredAsterisk: BooleanConstructor;
208
+ readonly scrollToError: BooleanConstructor;
209
+ readonly scrollIntoViewOptions: {
210
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [ObjectConstructor, BooleanConstructor], unknown, unknown>>;
211
+ readonly required: false;
212
+ readonly validator: ((val: unknown) => boolean) | undefined;
213
+ __epPropKey: true;
214
+ };
215
+ readonly size: {
216
+ readonly type: import('vue').PropType<import('element-plus/es/utils/index.mjs').EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", unknown>>;
217
+ readonly required: false;
218
+ readonly validator: ((val: unknown) => boolean) | undefined;
219
+ __epPropKey: true;
220
+ };
221
+ readonly disabled: BooleanConstructor;
222
+ }>> & {
223
+ onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
224
+ }, "disabled" | "validate" | "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "inline" | "inlineMessage" | "statusIcon" | "showMessage" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "fields"> & import('vue').ShallowUnwrapRef<{
225
+ validate: (callback?: import('element-plus').FormValidateCallback | undefined) => import('element-plus').FormValidationResult;
226
+ validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined, callback?: import('element-plus').FormValidateCallback | undefined) => import('element-plus').FormValidationResult;
227
+ resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined) => void;
228
+ clearValidate: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp> | undefined) => void;
229
+ scrollToField: (prop: import('element-plus').FormItemProp) => void;
230
+ fields: import('element-plus').FormItemContext[];
231
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
232
+ $slots: {
233
+ default?(_: {}): any;
234
+ };
235
+ }) | null;
236
+ }, any, import('vue').ComponentProvideOptions, {
237
+ P: {};
238
+ B: {};
239
+ D: {};
240
+ C: {};
241
+ M: {};
242
+ Defaults: {};
243
+ }, Readonly<{
244
+ modelValue?: Record<string, any>;
245
+ } & import('./Form').FormProps> & Readonly<{
246
+ "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
247
+ }>, {
248
+ validate: () => Promise<boolean>;
249
+ }, {}, {}, {}, {}>;
250
+ __isFragment?: never;
251
+ __isTeleport?: never;
252
+ __isSuspense?: never;
253
+ } & import('vue').ComponentOptionsBase<Readonly<{
254
+ modelValue?: Record<string, any>;
255
+ } & import('./Form').FormProps> & Readonly<{
256
+ "onUpdate:modelValue"?: ((modelValue: Record<string, any>) => any) | undefined;
257
+ }>, {
258
+ validate: () => Promise<boolean>;
259
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
260
+ "update:modelValue": (modelValue: Record<string, any>) => any;
261
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
262
+ $slots: {
263
+ default?(_: {}): any;
264
+ };
265
+ })> & {
266
+ StringInput: typeof StringInput;
267
+ PasswordInput: typeof PasswordInput;
268
+ Textarea: typeof Textarea;
269
+ };
270
+ export default _default;
271
+ export * from './Form';
272
+ export * from './StringInput';
273
+ export * from './PasswordInput';
@@ -0,0 +1,194 @@
1
+ import { withInstall as B } from "../../utils/vue/install.js";
2
+ import { defineComponent as p, mergeModels as S, useModel as F, useTemplateRef as R, provide as C, openBlock as b, createBlock as f, unref as a, withCtx as t, createVNode as m, renderSlot as W, computed as i, toRef as y } from "vue";
3
+ import { ElForm as c, ElRow as z, ElCol as h, ElFormItem as v, ElInput as w } from "element-plus";
4
+ import { formContextKey as I } from "./Form.js";
5
+ import { useFormSpan as g, useFormRules as V, useFormContext as q } from "./hooks/useForm.js";
6
+ const M = /* @__PURE__ */ p({
7
+ name: "OForm",
8
+ __name: "Form",
9
+ props: /* @__PURE__ */ S({
10
+ rules: {},
11
+ itemSpan: { default: 8 },
12
+ itemLabelWidth: { default: "auto" },
13
+ disabled: { type: Boolean, default: !1 }
14
+ }, {
15
+ modelValue: {},
16
+ modelModifiers: {}
17
+ }),
18
+ emits: ["update:modelValue"],
19
+ setup(o, { expose: u }) {
20
+ const r = F(o, "modelValue"), n = R("formRef");
21
+ return u({
22
+ validate: async () => await n.value.validate()
23
+ }), C(I, {
24
+ model: r.value,
25
+ rules: o.rules,
26
+ itemSpan: o.itemSpan
27
+ }), (e, l) => (b(), f(a(c), {
28
+ ref_key: "formRef",
29
+ ref: n,
30
+ modelValue: r.value,
31
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => r.value = s),
32
+ model: r.value,
33
+ rules: e.rules,
34
+ "label-width": o.itemLabelWidth,
35
+ disabled: e.disabled
36
+ }, {
37
+ default: t(() => [
38
+ m(a(z), { gutter: 16 }, {
39
+ default: t(() => [
40
+ W(e.$slots, "default")
41
+ ]),
42
+ _: 3
43
+ })
44
+ ]),
45
+ _: 3
46
+ }, 8, ["modelValue", "model", "rules", "label-width", "disabled"]));
47
+ }
48
+ }), E = /* @__PURE__ */ p({
49
+ name: "OFormString",
50
+ __name: "StringInput",
51
+ props: {
52
+ name: {},
53
+ label: {},
54
+ span: {},
55
+ labelWidth: {},
56
+ required: { type: Boolean },
57
+ rules: {},
58
+ maxlength: {},
59
+ placeholder: {},
60
+ disabled: { type: Boolean },
61
+ readonly: { type: Boolean },
62
+ style: {}
63
+ },
64
+ setup(o) {
65
+ const u = i(() => g()), r = i(() => V()), n = q(), d = y(n.model, o.name);
66
+ return (e, l) => (b(), f(a(h), { span: u.value }, {
67
+ default: t(() => [
68
+ m(a(v), {
69
+ prop: e.name,
70
+ label: e.label,
71
+ "label-width": e.labelWidth,
72
+ required: e.required,
73
+ rules: r.value
74
+ }, {
75
+ default: t(() => [
76
+ m(a(w), {
77
+ modelValue: d.value,
78
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => d.value = s),
79
+ maxlength: e.maxlength,
80
+ placeholder: e.placeholder,
81
+ disabled: e.disabled,
82
+ readonly: e.readonly,
83
+ "input-style": e.style
84
+ }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "input-style"])
85
+ ]),
86
+ _: 1
87
+ }, 8, ["prop", "label", "label-width", "required", "rules"])
88
+ ]),
89
+ _: 1
90
+ }, 8, ["span"]));
91
+ }
92
+ }), O = /* @__PURE__ */ p({
93
+ name: "OFormPassword",
94
+ __name: "PasswordInput",
95
+ props: {
96
+ name: {},
97
+ label: {},
98
+ span: {},
99
+ labelWidth: {},
100
+ required: { type: Boolean },
101
+ rules: {},
102
+ maxlength: {},
103
+ placeholder: {},
104
+ disabled: { type: Boolean },
105
+ readonly: { type: Boolean },
106
+ style: {}
107
+ },
108
+ setup(o) {
109
+ const u = i(() => g()), r = i(() => V()), n = q(), d = y(n.model, o.name);
110
+ return (e, l) => (b(), f(a(h), { span: u.value }, {
111
+ default: t(() => [
112
+ m(a(v), {
113
+ prop: e.name,
114
+ label: e.label,
115
+ "label-width": e.labelWidth,
116
+ required: e.required,
117
+ rules: r.value
118
+ }, {
119
+ default: t(() => [
120
+ m(a(w), {
121
+ modelValue: d.value,
122
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => d.value = s),
123
+ maxlength: e.maxlength,
124
+ placeholder: e.placeholder,
125
+ disabled: e.disabled,
126
+ readonly: e.readonly,
127
+ "input-style": e.style,
128
+ type: "password"
129
+ }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "input-style"])
130
+ ]),
131
+ _: 1
132
+ }, 8, ["prop", "label", "label-width", "required", "rules"])
133
+ ]),
134
+ _: 1
135
+ }, 8, ["span"]));
136
+ }
137
+ }), T = /* @__PURE__ */ p({
138
+ name: "OFormTextarea",
139
+ __name: "Textarea",
140
+ props: {
141
+ name: {},
142
+ label: {},
143
+ span: {},
144
+ labelWidth: {},
145
+ required: { type: Boolean },
146
+ rules: {},
147
+ maxlength: {},
148
+ placeholder: {},
149
+ disabled: { type: Boolean },
150
+ readonly: { type: Boolean },
151
+ style: {},
152
+ rows: {}
153
+ },
154
+ setup(o) {
155
+ const u = i(() => g()), r = i(() => V()), n = q(), d = y(n.model, o.name);
156
+ return (e, l) => (b(), f(a(h), { span: u.value }, {
157
+ default: t(() => [
158
+ m(a(v), {
159
+ prop: e.name,
160
+ label: e.label,
161
+ "label-width": e.labelWidth,
162
+ required: e.required,
163
+ rules: r.value
164
+ }, {
165
+ default: t(() => [
166
+ m(a(w), {
167
+ modelValue: d.value,
168
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => d.value = s),
169
+ maxlength: e.maxlength,
170
+ placeholder: e.placeholder,
171
+ disabled: e.disabled,
172
+ readonly: e.readonly,
173
+ "input-style": e.style,
174
+ type: "textarea",
175
+ rows: e.rows,
176
+ resize: "none"
177
+ }, null, 8, ["modelValue", "maxlength", "placeholder", "disabled", "readonly", "input-style", "rows"])
178
+ ]),
179
+ _: 1
180
+ }, 8, ["prop", "label", "label-width", "required", "rules"])
181
+ ]),
182
+ _: 1
183
+ }, 8, ["span"]));
184
+ }
185
+ }), K = B(M, {
186
+ StringInput: E,
187
+ PasswordInput: O,
188
+ Textarea: T
189
+ });
190
+ export {
191
+ K as default,
192
+ I as formContextKey
193
+ };
194
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Form/Form.vue","../../../src/components/Form/StringInput/StringInput.vue","../../../src/components/Form/PasswordInput/PasswordInput.vue","../../../src/components/Form/Textarea/Textarea.vue","../../../src/components/Form/index.ts"],"sourcesContent":["<template>\r\n <el-form\r\n ref=\"formRef\"\r\n v-model=\"model\"\r\n :model=\"model\"\r\n :rules=\"rules\"\r\n :label-width=\"labelWidth\"\r\n :disabled=\"disabled\"\r\n >\r\n <el-row :gutter=\"16\">\r\n <slot></slot>\r\n </el-row>\r\n </el-form>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { provide, useTemplateRef } from 'vue'\r\nimport { ElForm, ElRow } from 'element-plus'\r\nimport { type FormProps, type FormExpose, formContextKey } from './Form'\r\n\r\ndefineOptions({ name: 'OForm' })\r\n\r\nconst {\r\n rules,\r\n itemSpan = 8,\r\n itemLabelWidth: labelWidth = 'auto',\r\n disabled = false\r\n} = defineProps<FormProps>()\r\nconst model = defineModel<Record<string, any>>()\r\n\r\nconst formRef = useTemplateRef('formRef')\r\n\r\nconst validate: FormExpose['validate'] = async () => {\r\n return await formRef.value!.validate()\r\n}\r\n\r\ndefineExpose({\r\n validate\r\n})\r\n\r\nprovide(formContextKey, {\r\n model: model.value!,\r\n rules,\r\n itemSpan\r\n})\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"itemModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :input-style=\"style\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { StringInputProps } from './StringInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormString' })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, style } =\r\n defineProps<StringInputProps>()\r\nconst normalizedSpan = computed(() => {\r\n return useFormSpan()\r\n})\r\nconst normalizedRules = computed(() => {\r\n return useFormRules()\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"itemModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :input-style=\"style\"\r\n type=\"password\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { PasswordInputProps } from './PasswordInput'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormPassword' })\r\n\r\nconst { name, label, labelWidth, required, maxlength, placeholder, disabled, readonly, style } =\r\n defineProps<PasswordInputProps>()\r\nconst normalizedSpan = computed(() => {\r\n return useFormSpan()\r\n})\r\nconst normalizedRules = computed(() => {\r\n return useFormRules()\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\n</script>\r\n","<template>\r\n <el-col :span=\"normalizedSpan\">\r\n <el-form-item\r\n :prop=\"name\"\r\n :label=\"label\"\r\n :label-width=\"labelWidth\"\r\n :required=\"required\"\r\n :rules=\"normalizedRules\"\r\n >\r\n <el-input\r\n v-model=\"itemModel\"\r\n :maxlength=\"maxlength\"\r\n :placeholder=\"placeholder\"\r\n :disabled=\"disabled\"\r\n :readonly=\"readonly\"\r\n :input-style=\"style\"\r\n type=\"textarea\"\r\n :rows=\"rows\"\r\n :resize=\"'none'\"\r\n />\r\n </el-form-item>\r\n </el-col>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { computed, toRef } from 'vue'\r\nimport { ElCol, ElFormItem, ElInput } from 'element-plus'\r\nimport type { TextareaProps } from './Textarea'\r\nimport { useFormContext, useFormSpan, useFormRules } from '../hooks/useForm'\r\n\r\ndefineOptions({ name: 'OFormTextarea' })\r\n\r\nconst {\r\n name,\r\n label,\r\n labelWidth,\r\n required,\r\n maxlength,\r\n placeholder,\r\n disabled,\r\n readonly,\r\n style,\r\n rows\r\n} = defineProps<TextareaProps>()\r\nconst normalizedSpan = computed(() => {\r\n return useFormSpan()\r\n})\r\nconst normalizedRules = computed(() => {\r\n return useFormRules()\r\n})\r\n\r\nconst formContext = useFormContext()!\r\nconst itemModel = toRef(formContext.model, name)\r\n</script>\r\n","import { withInstall } from '../../utils/vue/install'\r\n\r\nimport Form from './Form.vue'\r\nimport StringInput from './StringInput/StringInput.vue'\r\nimport PasswordInput from './PasswordInput/PasswordInput.vue'\r\nimport Textarea from './Textarea/Textarea.vue'\r\n\r\nexport default withInstall<\r\n typeof Form,\r\n {\r\n StringInput: typeof StringInput\r\n PasswordInput: typeof PasswordInput\r\n Textarea: typeof Textarea\r\n }\r\n>(Form, {\r\n StringInput,\r\n PasswordInput,\r\n Textarea\r\n})\r\n\r\nexport * from './Form'\r\nexport * from './StringInput'\r\nexport * from './PasswordInput'\r\n"],"names":["model","_useModel","__props","formRef","useTemplateRef","__expose","provide","formContextKey","normalizedSpan","computed","useFormSpan","normalizedRules","useFormRules","formContext","useFormContext","itemModel","toRef","index","withInstall","Form","StringInput","PasswordInput","Textarea"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BM,UAAAA,IAAQC,EAAgCC,GAAA,YAAC,GAEzCC,IAAUC,EAAe,SAAS;AAM3B,WAAAC,EAAA;AAAA,MACX,UALuC,YAChC,MAAMF,EAAQ,MAAO;IAI5B,CACD,GAEDG,EAAQC,GAAgB;AAAA,MACtB,OAAOP,EAAM;AAAA,MACb,OAAIE,EAAA;AAAA,MACJ,UAAOA,EAAA;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbK,UAAAM,IAAiBC,EAAS,MACvBC,EAAY,CACpB,GACKC,IAAkBF,EAAS,MACxBG,EAAa,CACrB,GAEKC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOX,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPzC,UAAAM,IAAiBC,EAAS,MACvBC,EAAY,CACpB,GACKC,IAAkBF,EAAS,MACxBG,EAAa,CACrB,GAEKC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOX,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIzC,UAAAM,IAAiBC,EAAS,MACvBC,EAAY,CACpB,GACKC,IAAkBF,EAAS,MACxBG,EAAa,CACrB,GAEKC,IAAcC,KACdC,IAAYC,EAAMH,EAAY,OAAOX,EAAA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC7ChCe,IAAAC,EAObC,GAAM;AAAA,EAAA,aACNC;AAAAA,EAAA,eACAC;AAAAA,EAAA,UACAC;AACF,CAAC;"}
@@ -1,15 +1,2 @@
1
- import type { Plugin } from 'vue';
2
- declare const _default: {
3
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{}> & Readonly<{}>, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
4
- P: {};
5
- B: {};
6
- D: {};
7
- C: {};
8
- M: {};
9
- Defaults: {};
10
- }, Readonly<{}> & Readonly<{}>, () => any, {}, {}, {}, {}>;
11
- __isFragment?: never;
12
- __isTeleport?: never;
13
- __isSuspense?: never;
14
- } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Plugin;
1
+ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>> & Record<string, any>;
15
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  export default function useModal(): {
2
2
  close: (params: Record<string, any>) => void;
3
- };
3
+ } | undefined;
@@ -1,8 +1,8 @@
1
- import { inject } from 'vue';
2
-
3
- function useModal() {
4
- const $$Modal = inject('$$Modal');
5
- return $$Modal;
1
+ import { inject as o } from "vue";
2
+ function $() {
3
+ return o("$$Modal");
6
4
  }
7
-
8
- export { useModal as default };
5
+ export {
6
+ $ as default
7
+ };
8
+ //# sourceMappingURL=useModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModal.js","sources":["../../../src/components/Modal/useModal.ts"],"sourcesContent":["import { inject } from 'vue'\r\n\r\nexport default function useModal() {\r\n const $$Modal = inject<{\r\n close: (params: Record<string, any>) => void\r\n }>('$$Modal')\r\n return $$Modal\r\n}\r\n"],"names":["useModal","inject"],"mappings":";AAEA,SAAwBA,IAAW;AAI1B,SAHSC,EAEb,SAAS;AAEd;"}
@@ -0,0 +1,79 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ export declare const pagetableProps: () => {
3
+ gutter: {
4
+ default: string | boolean;
5
+ type: PropType<string | boolean>;
6
+ };
7
+ height: StringConstructor;
8
+ data: {
9
+ type: PropType<any[]>;
10
+ default: any[];
11
+ };
12
+ pagination: {
13
+ type: PropType<{
14
+ currentPage?: number;
15
+ pageSize?: number;
16
+ total?: number;
17
+ }>;
18
+ default: {
19
+ currentPage?: number;
20
+ pageSize?: number;
21
+ total?: number;
22
+ };
23
+ };
24
+ };
25
+ export type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>;
26
+ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
27
+ gutter: {
28
+ default: string | boolean;
29
+ type: PropType<string | boolean>;
30
+ };
31
+ height: StringConstructor;
32
+ data: {
33
+ type: PropType<any[]>;
34
+ default: any[];
35
+ };
36
+ pagination: {
37
+ type: PropType<{
38
+ currentPage?: number;
39
+ pageSize?: number;
40
+ total?: number;
41
+ }>;
42
+ default: {
43
+ currentPage?: number;
44
+ pageSize?: number;
45
+ total?: number;
46
+ };
47
+ };
48
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtractPropTypes<{
49
+ gutter: {
50
+ default: string | boolean;
51
+ type: PropType<string | boolean>;
52
+ };
53
+ height: StringConstructor;
54
+ data: {
55
+ type: PropType<any[]>;
56
+ default: any[];
57
+ };
58
+ pagination: {
59
+ type: PropType<{
60
+ currentPage?: number;
61
+ pageSize?: number;
62
+ total?: number;
63
+ }>;
64
+ default: {
65
+ currentPage?: number;
66
+ pageSize?: number;
67
+ total?: number;
68
+ };
69
+ };
70
+ }>> & Readonly<{}>, {
71
+ data: any[];
72
+ gutter: string | boolean;
73
+ pagination: {
74
+ currentPage?: number;
75
+ pageSize?: number;
76
+ total?: number;
77
+ };
78
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
79
+ export default _default;