@xjw_/vue2-npm-system 1.0.78 → 1.0.80

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 (215) hide show
  1. package/README.md +379 -379
  2. package/dist/@xjw_/vue2-npm-system.js +1 -1
  3. package/dist/@xjw_/vue2-npm-system.js.map +1 -1
  4. package/dist/jc-vue-components.min.js +2 -1
  5. package/dist/jc-vue-components.min.js.map +1 -0
  6. package/lib/_virtual/_commonjsHelpers.js +2 -1
  7. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  8. package/lib/_virtual/_vue.js +1 -0
  9. package/lib/_virtual/_vue.js.map +1 -0
  10. package/lib/_virtual/dom.js +1 -0
  11. package/lib/_virtual/dom.js.map +1 -0
  12. package/lib/_virtual/index.js +1 -0
  13. package/lib/_virtual/index.js.map +1 -0
  14. package/lib/_virtual/merge.js +1 -0
  15. package/lib/_virtual/merge.js.map +1 -0
  16. package/lib/_virtual/popup-manager.js +1 -0
  17. package/lib/_virtual/popup-manager.js.map +1 -0
  18. package/lib/_virtual/scrollbar-width.js +1 -0
  19. package/lib/_virtual/scrollbar-width.js.map +1 -0
  20. package/lib/_virtual/types.js +1 -0
  21. package/lib/_virtual/types.js.map +1 -0
  22. package/lib/_virtual/util.js +1 -0
  23. package/lib/_virtual/util.js.map +1 -0
  24. package/lib/_virtual/vdom.js +1 -0
  25. package/lib/_virtual/vdom.js.map +1 -0
  26. package/lib/assets/svg/filter.svg.js +2 -0
  27. package/lib/assets/svg/filter.svg.js.map +1 -0
  28. package/lib/assets/svg/print.svg.js +2 -0
  29. package/lib/assets/svg/print.svg.js.map +1 -0
  30. package/lib/assets/svg/search.svg.js +2 -0
  31. package/lib/assets/svg/search.svg.js.map +1 -0
  32. package/lib/assets/svg/upload.svg.js +2 -0
  33. package/lib/assets/svg/upload.svg.js.map +1 -0
  34. package/lib/components/SvgIcon.js +2 -1
  35. package/lib/components/SvgIcon.map_script.js +1 -0
  36. package/lib/components/SvgIcon.vue +65 -0
  37. package/lib/components/SvgIcon.vue.js.map +1 -0
  38. package/lib/components/SvgIcon.vue_rollup-plugin-vue_script.js +2 -0
  39. package/lib/components/SvgIcon.vue_rollup-plugin-vue_styles.0.js +2 -0
  40. package/lib/components/SvgIcon.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  41. package/lib/components/XBusinessLog.js +2 -1
  42. package/lib/components/XBusinessLog.map_script.js +1 -0
  43. package/lib/components/XBusinessLog.vue +275 -0
  44. package/lib/components/XBusinessLog.vue.js.map +1 -0
  45. package/lib/components/XBusinessLog.vue_rollup-plugin-vue_script.js +2 -0
  46. package/lib/components/XBusinessLog.vue_rollup-plugin-vue_styles.0.js +2 -0
  47. package/lib/components/XBusinessLog.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  48. package/lib/components/XDatePicker.js +2 -1
  49. package/lib/components/XDatePicker.map_script.js +1 -0
  50. package/lib/components/XDatePicker.vue +229 -0
  51. package/lib/components/XDatePicker.vue.js.map +1 -0
  52. package/lib/components/XDatePicker.vue_rollup-plugin-vue_script.js +2 -0
  53. package/lib/components/XDatePicker.vue_rollup-plugin-vue_styles.0.js +2 -0
  54. package/lib/components/XDatePicker.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  55. package/lib/components/XElForm.js +2 -1
  56. package/lib/components/XElForm.map_script.js +1 -0
  57. package/lib/components/XElForm.vue +164 -0
  58. package/lib/components/XElForm.vue.js.map +1 -0
  59. package/lib/components/XElForm.vue_rollup-plugin-vue_script.js +2 -0
  60. package/lib/components/XElForm.vue_rollup-plugin-vue_styles.0.js +2 -0
  61. package/lib/components/XElForm.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  62. package/lib/components/XElFormItem.js +2 -1
  63. package/lib/components/XElFormItem.map_script.js +1 -0
  64. package/lib/components/XElFormItem.vue +113 -0
  65. package/lib/components/XElFormItem.vue.js.map +1 -0
  66. package/lib/components/XElFormItem.vue_rollup-plugin-vue_script.js +2 -0
  67. package/lib/components/XElFormItem.vue_rollup-plugin-vue_styles.0.js +2 -0
  68. package/lib/components/XElFormItem.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  69. package/lib/components/XElOption.js +2 -1
  70. package/lib/components/XElOption.map_script.js +1 -0
  71. package/lib/components/XElOption.vue +99 -0
  72. package/lib/components/XElOption.vue.js.map +1 -0
  73. package/lib/components/XElOption.vue_rollup-plugin-vue_script.js +2 -0
  74. package/lib/components/XElOption.vue_rollup-plugin-vue_styles.0.js +2 -0
  75. package/lib/components/XElOption.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  76. package/lib/components/XElSelect.js +2 -1
  77. package/lib/components/XElSelect.map_script.js +1 -0
  78. package/lib/components/XElSelect.vue +164 -0
  79. package/lib/components/XElSelect.vue.js.map +1 -0
  80. package/lib/components/XElSelect.vue_rollup-plugin-vue_script.js +2 -0
  81. package/lib/components/XElSelect.vue_rollup-plugin-vue_styles.0.js +2 -0
  82. package/lib/components/XElSelect.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  83. package/lib/components/XPagination.js +2 -1
  84. package/lib/components/XPagination.map_script.js +1 -0
  85. package/lib/components/XPagination.vue +102 -0
  86. package/lib/components/XPagination.vue.js.map +1 -0
  87. package/lib/components/XPagination.vue_rollup-plugin-vue_script.js +2 -0
  88. package/lib/components/XPagination.vue_rollup-plugin-vue_styles.0.js +2 -0
  89. package/lib/components/XPagination.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  90. package/lib/components/XReportTable.js +2 -1
  91. package/lib/components/XReportTable.map_script.js +1 -0
  92. package/lib/components/XReportTable.vue +477 -0
  93. package/lib/components/XReportTable.vue.js.map +1 -0
  94. package/lib/components/XReportTable.vue_rollup-plugin-vue_script.js +2 -0
  95. package/lib/components/XReportTable.vue_rollup-plugin-vue_styles.0.js +2 -0
  96. package/lib/components/XReportTable.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  97. package/lib/components/XSearchBar.js +2 -1
  98. package/lib/components/XSearchBar.map_script.js +1 -0
  99. package/lib/components/XSearchBar.vue +494 -0
  100. package/lib/components/XSearchBar.vue.js.map +1 -0
  101. package/lib/components/XSearchBar.vue_rollup-plugin-vue_script.js +2 -0
  102. package/lib/components/XSearchBar.vue_rollup-plugin-vue_styles.0.js +2 -0
  103. package/lib/components/XSearchBar.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  104. package/lib/components/XVxeColumn.js +2 -1
  105. package/lib/components/XVxeColumn.map_script.js +1 -0
  106. package/lib/components/XVxeColumn.vue +49 -0
  107. package/lib/components/XVxeColumn.vue.js.map +1 -0
  108. package/lib/components/XVxeColumn.vue_rollup-plugin-vue_script.js +2 -0
  109. package/lib/components/XVxeColumn.vue_rollup-plugin-vue_styles.0.js +2 -0
  110. package/lib/components/XVxeColumn.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  111. package/lib/components/XVxeTable.js +2 -1
  112. package/lib/components/XVxeTable.map_script.js +1 -0
  113. package/lib/components/XVxeTable.vue +426 -0
  114. package/lib/components/XVxeTable.vue.js.map +1 -0
  115. package/lib/components/XVxeTable.vue_rollup-plugin-vue_script.js +2 -0
  116. package/lib/components/XVxeTable.vue_rollup-plugin-vue_styles.0.js +2 -0
  117. package/lib/components/XVxeTable.vue_rollup-plugin-vue_styles.0.vue.js.map +1 -0
  118. package/lib/index.css +1 -1
  119. package/lib/index.js +172 -1
  120. package/lib/index.js.map +1 -0
  121. package/lib/node_modules/@babel/runtime/helpers/defineProperty.js +1 -0
  122. package/lib/node_modules/@babel/runtime/helpers/defineProperty.js.map +1 -0
  123. package/lib/node_modules/@babel/runtime/helpers/typeof.js +1 -0
  124. package/lib/node_modules/@babel/runtime/helpers/typeof.js.map +1 -0
  125. package/lib/node_modules/element-ui/lib/message.js +1 -0
  126. package/lib/node_modules/element-ui/lib/message.js.map +1 -0
  127. package/lib/node_modules/element-ui/lib/theme-chalk/base.css.js +2 -0
  128. package/lib/node_modules/element-ui/lib/theme-chalk/base.css.js.map +1 -0
  129. package/lib/node_modules/element-ui/lib/theme-chalk/message.css.js +2 -0
  130. package/lib/node_modules/element-ui/lib/theme-chalk/message.css.js.map +1 -0
  131. package/lib/node_modules/element-ui/lib/utils/dom.js +1 -0
  132. package/lib/node_modules/element-ui/lib/utils/dom.js.map +1 -0
  133. package/lib/node_modules/element-ui/lib/utils/merge.js +1 -0
  134. package/lib/node_modules/element-ui/lib/utils/merge.js.map +1 -0
  135. package/lib/node_modules/element-ui/lib/utils/popup/index.js +1 -0
  136. package/lib/node_modules/element-ui/lib/utils/popup/index.js.map +1 -0
  137. package/lib/node_modules/element-ui/lib/utils/popup/popup-manager.js +1 -0
  138. package/lib/node_modules/element-ui/lib/utils/popup/popup-manager.js.map +1 -0
  139. package/lib/node_modules/element-ui/lib/utils/scrollbar-width.js +1 -0
  140. package/lib/node_modules/element-ui/lib/utils/scrollbar-width.js.map +1 -0
  141. package/lib/node_modules/element-ui/lib/utils/types.js +1 -0
  142. package/lib/node_modules/element-ui/lib/utils/types.js.map +1 -0
  143. package/lib/node_modules/element-ui/lib/utils/util.js +1 -0
  144. package/lib/node_modules/element-ui/lib/utils/util.js.map +1 -0
  145. package/lib/node_modules/element-ui/lib/utils/vdom.js +1 -0
  146. package/lib/node_modules/element-ui/lib/utils/vdom.js.map +1 -0
  147. package/lib/node_modules/style-inject/dist/style-inject.es.js +1 -0
  148. package/lib/node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js +1 -0
  149. package/lib/node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js.map +1 -0
  150. package/lib/plugins/svg-icon.js +145 -1
  151. package/lib/plugins/svg-icon.js.map +1 -0
  152. package/lib/styles/x-ui.scss +159 -159
  153. package/lib/styles/x-ui.scss.js +2 -0
  154. package/lib/styles/x-ui.scss.js.map +1 -0
  155. package/lib/styles.js +2 -0
  156. package/lib/styles.js.map +1 -0
  157. package/lib/utils/LuoFormat.js +65 -1
  158. package/lib/utils/LuoFormat.js.map +1 -0
  159. package/lib/utils/format.js +55 -1
  160. package/lib/utils/format.js.map +1 -0
  161. package/lib/utils/request.js +252 -1
  162. package/lib/utils/request.js.map +1 -0
  163. package/lib/utils/validate.js +14 -1
  164. package/lib/utils/validate.js.map +1 -0
  165. package/package.json +6 -21
  166. package/dist/jc-vue-components.js +0 -2
  167. package/dist/jc-vue-components.js.map +0 -1
  168. package/dist/jc-vue-components.min.css +0 -1
  169. package/es/_virtual/_commonjsHelpers.js +0 -1
  170. package/es/_virtual/_vue.js +0 -1
  171. package/es/_virtual/dom.js +0 -1
  172. package/es/_virtual/index.js +0 -1
  173. package/es/_virtual/merge.js +0 -1
  174. package/es/_virtual/popup-manager.js +0 -1
  175. package/es/_virtual/scrollbar-width.js +0 -1
  176. package/es/_virtual/types.js +0 -1
  177. package/es/_virtual/util.js +0 -1
  178. package/es/_virtual/vdom.js +0 -1
  179. package/es/assets/svg/filter.svg +0 -3
  180. package/es/assets/svg/print.svg +0 -1
  181. package/es/assets/svg/search.svg +0 -1
  182. package/es/assets/svg/upload.svg +0 -1
  183. package/es/components/SvgIcon.js +0 -1
  184. package/es/components/XBusinessLog.js +0 -1
  185. package/es/components/XDatePicker.js +0 -1
  186. package/es/components/XElForm.js +0 -1
  187. package/es/components/XElFormItem.js +0 -1
  188. package/es/components/XElOption.js +0 -1
  189. package/es/components/XElSelect.js +0 -1
  190. package/es/components/XPagination.js +0 -1
  191. package/es/components/XReportTable.js +0 -1
  192. package/es/components/XSearchBar.js +0 -1
  193. package/es/components/XVxeColumn.js +0 -1
  194. package/es/components/XVxeTable.js +0 -1
  195. package/es/index.css +0 -1
  196. package/es/index.js +0 -1
  197. package/es/node_modules/@babel/runtime/helpers/defineProperty.js +0 -1
  198. package/es/node_modules/@babel/runtime/helpers/typeof.js +0 -1
  199. package/es/node_modules/element-ui/lib/message.js +0 -1
  200. package/es/node_modules/element-ui/lib/utils/dom.js +0 -1
  201. package/es/node_modules/element-ui/lib/utils/merge.js +0 -1
  202. package/es/node_modules/element-ui/lib/utils/popup/index.js +0 -1
  203. package/es/node_modules/element-ui/lib/utils/popup/popup-manager.js +0 -1
  204. package/es/node_modules/element-ui/lib/utils/scrollbar-width.js +0 -1
  205. package/es/node_modules/element-ui/lib/utils/types.js +0 -1
  206. package/es/node_modules/element-ui/lib/utils/util.js +0 -1
  207. package/es/node_modules/element-ui/lib/utils/vdom.js +0 -1
  208. package/es/node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js +0 -1
  209. package/es/plugins/svg-icon.js +0 -1
  210. package/es/styles/variables.scss +0 -56
  211. package/es/styles/x-ui.scss +0 -160
  212. package/es/utils/LuoFormat.js +0 -1
  213. package/es/utils/format.js +0 -1
  214. package/es/utils/request.js +0 -1
  215. package/es/utils/validate.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XDatePicker.vue_rollup-plugin-vue_script.js","sources":["../../src/components/XDatePicker.vue"],"sourcesContent":["<template>\n <div class=\"x-date-picker\">\n <el-date-picker\n :value=\"internalValue\"\n :type=\"xType\"\n :placeholder=\"currentPlaceholder\"\n :start-placeholder=\"currentStartPlaceholder\"\n :end-placeholder=\"currentEndPlaceholder\"\n :range-separator=\"xRangeSeparator\"\n :value-format=\"currentValueFormat\"\n :default-time=\"currentDefaultTime\"\n @input=\"handleUpdate\"\n />\n </div>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-date-picker 的二次封装,根据 type 自动设置 placeholder 和 value-format\n */\n\nexport default {\n name: 'XDatePicker',\n \n inheritAttrs: false,\n \n props: {\n // 时间选择器类型\n xType: {\n type: String,\n default: 'date',\n validator: (val) => [\n 'year', 'years', \n 'month', 'months', \n 'date', 'dates', \n 'datetime', \n 'week', \n 'datetimerange', \n 'daterange', \n 'monthrange', \n 'yearrange'\n ].includes(val)\n },\n \n // 自定义值格式,如果有则以 prop 为准\n xValueFormat: {\n type: String,\n default: null\n },\n \n // 占位符\n xPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择开始占位符\n xStartPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择结束占位符\n xEndPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择分隔符\n xRangeSeparator: {\n type: String,\n default: '至'\n },\n \n // 日期时间范围选择的默认时间\n xDefaultTime: {\n type: [String, Array],\n default: null\n },\n \n // 双向绑定的值\n value: {\n type: [String, Number, Array, Date],\n default: ''\n }\n },\n \n data() {\n return {\n internalValue: this.value\n }\n },\n \n computed: {\n // 计算当前使用的占位符\n currentPlaceholder() {\n if (this.xPlaceholder !== null) {\n return this.xPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (isRange) {\n return undefined // 范围选择使用 start-placeholder 和 end-placeholder\n }\n \n return this.getDefaultPlaceholder(this.xType)\n },\n \n // 计算开始占位符\n currentStartPlaceholder() {\n if (this.xStartPlaceholder !== null) {\n return this.xStartPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (!isRange) {\n return undefined\n }\n \n const defaults = this.getDefaultPlaceholder(this.xType)\n return defaults.start\n },\n \n // 计算结束占位符\n currentEndPlaceholder() {\n if (this.xEndPlaceholder !== null) {\n return this.xEndPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (!isRange) {\n return undefined\n }\n \n const defaults = this.getDefaultPlaceholder(this.xType)\n return defaults.end\n },\n \n // 计算当前使用的值格式\n currentValueFormat() {\n // 如果传入了自定义格式,使用自定义格式\n if (this.xValueFormat !== null && this.xValueFormat !== undefined) {\n return this.xValueFormat\n }\n // 否则根据类型自动匹配默认格式\n return this.getDefaultFormat(this.xType)\n },\n \n // 计算默认时间\n currentDefaultTime() {\n // 如果传入了自定义默认时间,使用自定义值\n if (this.xDefaultTime !== null && this.xDefaultTime !== undefined) {\n return this.xDefaultTime\n }\n // 如果是 datetimerange 类型,设置默认时间为 ['00:00:00', '23:59:59']\n if (this.xType === 'datetimerange') {\n return ['00:00:00', '23:59:59']\n }\n return undefined\n }\n },\n \n watch: {\n value(newVal) {\n this.internalValue = newVal\n }\n },\n \n methods: {\n // 获取默认格式\n getDefaultFormat(type) {\n const formatMap = {\n 'year': 'yyyy',\n 'years': 'yyyy',\n 'month': 'yyyy-MM',\n 'months': 'yyyy-MM',\n 'date': 'yyyy-MM-dd',\n 'dates': 'yyyy-MM-dd',\n 'datetime': 'yyyy-MM-dd HH:mm:ss',\n 'week': 'yyyy-MM-dd',\n 'datetimerange': 'yyyy-MM-dd HH:mm:ss',\n 'daterange': 'yyyy-MM-dd',\n 'monthrange': 'yyyy-MM',\n 'yearrange': 'yyyy'\n }\n return formatMap[type] || 'yyyy-MM-dd'\n },\n \n // 获取默认占位符\n getDefaultPlaceholder(type) {\n const isRange = type.includes('range')\n const hasTime = type.includes('time')\n \n if (isRange) {\n return {\n start: hasTime ? '开始日期时间' : '开始日期',\n end: hasTime ? '结束日期时间' : '结束日期'\n }\n } else {\n if (type === 'year' || type === 'years') {\n return '选择年'\n } else if (type === 'month' || type === 'months') {\n return '选择月'\n } else if (type === 'week') {\n return '选择周'\n } else if (hasTime) {\n return '选择日期时间'\n } else {\n return '选择日期'\n }\n }\n },\n \n // 处理值更新\n handleUpdate(value) {\n this.internalValue = value\n this.$emit('input', value)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["injectCSSVariables","script","name","inheritAttrs","props","xType","type","String","default","validator","val","includes","xValueFormat","xPlaceholder","xStartPlaceholder","xEndPlaceholder","xRangeSeparator","xDefaultTime","Array","value","Number","Date","data","internalValue","this","computed","currentPlaceholder","getDefaultPlaceholder","currentStartPlaceholder","start","currentEndPlaceholder","end","currentValueFormat","undefined","getDefaultFormat","currentDefaultTime","watch","newVal","methods","year","years","month","months","date","dates","datetime","week","datetimerange","daterange","monthrange","yearrange","isRange","hasTime","handleUpdate","$emit"],"mappings":"8HAoBAA,qBAQA,IAAAC,EAAA,CACAC,KAAA,cAEAC,cAAA,EAEAC,MAAA,CAEAC,MAAA,CACAC,KAAAC,OACAC,QAAA,OACAC,UAAA,SAAAC,GAAA,MAAA,CACA,OAAA,QACA,QAAA,SACA,OAAA,QACA,WACA,OACA,gBACA,YACA,aACA,aACAC,SAAAD,EAAA,GAIAE,aAAA,CACAN,KAAAC,OACAC,QAAA,MAIAK,aAAA,CACAP,KAAAC,OACAC,QAAA,MAIAM,kBAAA,CACAR,KAAAC,OACAC,QAAA,MAIAO,gBAAA,CACAT,KAAAC,OACAC,QAAA,MAIAQ,gBAAA,CACAV,KAAAC,OACAC,QAAA,KAIAS,aAAA,CACAX,KAAA,CAAAC,OAAAW,OACAV,QAAA,MAIAW,MAAA,CACAb,KAAA,CAAAC,OAAAa,OAAAF,MAAAG,MACAb,QAAA,KAIAc,KAAA,WACA,MAAA,CACAC,cAAAC,KAAAL,MAEA,EAEAM,SAAA,CAEAC,mBAAA,WACA,OAAA,OAAAF,KAAAX,aACAW,KAAAX,aAGAW,KAAAnB,MAAAM,SAAA,cACA,EAIAa,KAAAG,sBAAAH,KAAAnB,MACA,EAGAuB,wBAAA,WACA,OAAA,OAAAJ,KAAAV,kBACAU,KAAAV,kBAGAU,KAAAnB,MAAAM,SAAA,SAKAa,KAAAG,sBAAAH,KAAAnB,OACAwB,WALA,CAMA,EAGAC,sBAAA,WACA,OAAA,OAAAN,KAAAT,gBACAS,KAAAT,gBAGAS,KAAAnB,MAAAM,SAAA,SAKAa,KAAAG,sBAAAH,KAAAnB,OACA0B,SALA,CAMA,EAGAC,mBAAA,WAEA,OAAA,OAAAR,KAAAZ,mBAAAqB,IAAAT,KAAAZ,aACAY,KAAAZ,aAGAY,KAAAU,iBAAAV,KAAAnB,MACA,EAGA8B,mBAAA,WAEA,OAAA,OAAAX,KAAAP,mBAAAgB,IAAAT,KAAAP,aACAO,KAAAP,aAGA,kBAAAO,KAAAnB,MACA,CAAA,WAAA,iBADA,CAIA,GAGA+B,MAAA,CACAjB,MAAAA,SAAAkB,GACAb,KAAAD,cAAAc,CACA,GAGAC,QAAA,CAEAJ,iBAAAA,SAAA5B,GAeA,MAdA,CACAiC,KAAA,OACAC,MAAA,OACAC,MAAA,UACAC,OAAA,UACAC,KAAA,aACAC,MAAA,aACAC,SAAA,sBACAC,KAAA,aACAC,cAAA,sBACAC,UAAA,aACAC,WAAA,UACAC,UAAA,QAEA5C,IAAA,YACA,EAGAqB,sBAAAA,SAAArB,GACA,IAAA6C,EAAA7C,EAAAK,SAAA,SACAyC,EAAA9C,EAAAK,SAAA,QAEA,OAAAwC,EACA,CACAtB,MAAAuB,EAAA,SAAA,OACArB,IAAAqB,EAAA,SAAA,QAGA,SAAA9C,GAAA,UAAAA,EACA,MACA,UAAAA,GAAA,WAAAA,EACA,MACA,SAAAA,EACA,MACA8C,EACA,SAEA,MAGA,EAGAC,aAAAA,SAAAlC,GACAK,KAAAD,cAAAJ,EACAK,KAAA8B,MAAA,QAAAnC,EACA"}
@@ -0,0 +1,229 @@
1
+ <template>
2
+ <el-date-picker
3
+ :value="internalValue"
4
+ :type="xType"
5
+ :placeholder="currentPlaceholder"
6
+ :start-placeholder="currentStartPlaceholder"
7
+ :end-placeholder="currentEndPlaceholder"
8
+ :range-separator="xRangeSeparator"
9
+ :value-format="currentValueFormat"
10
+ :default-time="currentDefaultTime"
11
+ v-bind="$attrs"
12
+ @input="handleUpdate"
13
+ />
14
+ </template>
15
+
16
+ <script>
17
+ /**
18
+ * @author xjw
19
+ * @since 2026/4/10
20
+ * @description 对 el-date-picker 的二次封装,根据 type 自动设置 placeholder 和 value-format
21
+ */
22
+
23
+ export default {
24
+ name: 'XDatePicker',
25
+
26
+ inheritAttrs: false,
27
+
28
+ props: {
29
+ // 时间选择器类型
30
+ xType: {
31
+ type: String,
32
+ default: 'date',
33
+ validator: (val) => [
34
+ 'year', 'years',
35
+ 'month', 'months',
36
+ 'date', 'dates',
37
+ 'datetime',
38
+ 'week',
39
+ 'datetimerange',
40
+ 'daterange',
41
+ 'monthrange',
42
+ 'yearrange'
43
+ ].includes(val)
44
+ },
45
+
46
+ // 自定义值格式,如果有则以 prop 为准
47
+ xValueFormat: {
48
+ type: String,
49
+ default: null
50
+ },
51
+
52
+ // 占位符
53
+ xPlaceholder: {
54
+ type: String,
55
+ default: null
56
+ },
57
+
58
+ // 范围选择开始占位符
59
+ xStartPlaceholder: {
60
+ type: String,
61
+ default: null
62
+ },
63
+
64
+ // 范围选择结束占位符
65
+ xEndPlaceholder: {
66
+ type: String,
67
+ default: null
68
+ },
69
+
70
+ // 范围选择分隔符
71
+ xRangeSeparator: {
72
+ type: String,
73
+ default: '至'
74
+ },
75
+
76
+ // 日期时间范围选择的默认时间
77
+ xDefaultTime: {
78
+ type: [String, Array],
79
+ default: null
80
+ },
81
+
82
+ // 双向绑定的值
83
+ value: {
84
+ type: [String, Number, Array, Date],
85
+ default: ''
86
+ }
87
+ },
88
+
89
+ data() {
90
+ return {
91
+ internalValue: this.value
92
+ }
93
+ },
94
+
95
+ computed: {
96
+ // 计算当前使用的占位符
97
+ currentPlaceholder() {
98
+ if (this.xPlaceholder !== null) {
99
+ return this.xPlaceholder
100
+ }
101
+
102
+ const isRange = this.xType.includes('range')
103
+ if (isRange) {
104
+ return undefined // 范围选择使用 start-placeholder 和 end-placeholder
105
+ }
106
+
107
+ return this.getDefaultPlaceholder(this.xType)
108
+ },
109
+
110
+ // 计算开始占位符
111
+ currentStartPlaceholder() {
112
+ if (this.xStartPlaceholder !== null) {
113
+ return this.xStartPlaceholder
114
+ }
115
+
116
+ const isRange = this.xType.includes('range')
117
+ if (!isRange) {
118
+ return undefined
119
+ }
120
+
121
+ const defaults = this.getDefaultPlaceholder(this.xType)
122
+ return defaults.start
123
+ },
124
+
125
+ // 计算结束占位符
126
+ currentEndPlaceholder() {
127
+ if (this.xEndPlaceholder !== null) {
128
+ return this.xEndPlaceholder
129
+ }
130
+
131
+ const isRange = this.xType.includes('range')
132
+ if (!isRange) {
133
+ return undefined
134
+ }
135
+
136
+ const defaults = this.getDefaultPlaceholder(this.xType)
137
+ return defaults.end
138
+ },
139
+
140
+ // 计算当前使用的值格式
141
+ currentValueFormat() {
142
+ // 如果传入了自定义格式,使用自定义格式
143
+ if (this.xValueFormat !== null && this.xValueFormat !== undefined) {
144
+ return this.xValueFormat
145
+ }
146
+ // 否则根据类型自动匹配默认格式
147
+ return this.getDefaultFormat(this.xType)
148
+ },
149
+
150
+ // 计算默认时间
151
+ currentDefaultTime() {
152
+ // 如果传入了自定义默认时间,使用自定义值
153
+ if (this.xDefaultTime !== null && this.xDefaultTime !== undefined) {
154
+ return this.xDefaultTime
155
+ }
156
+ // 如果是 datetimerange 类型,设置默认时间为 ['00:00:00', '23:59:59']
157
+ if (this.xType === 'datetimerange') {
158
+ return ['00:00:00', '23:59:59']
159
+ }
160
+ return undefined
161
+ }
162
+ },
163
+
164
+ watch: {
165
+ value(newVal) {
166
+ this.internalValue = newVal
167
+ }
168
+ },
169
+
170
+ methods: {
171
+ // 获取默认格式
172
+ getDefaultFormat(type) {
173
+ const formatMap = {
174
+ 'year': 'yyyy',
175
+ 'years': 'yyyy',
176
+ 'month': 'yyyy-MM',
177
+ 'months': 'yyyy-MM',
178
+ 'date': 'yyyy-MM-dd',
179
+ 'dates': 'yyyy-MM-dd',
180
+ 'datetime': 'yyyy-MM-dd HH:mm:ss',
181
+ 'week': 'yyyy-MM-dd',
182
+ 'datetimerange': 'yyyy-MM-dd HH:mm:ss',
183
+ 'daterange': 'yyyy-MM-dd',
184
+ 'monthrange': 'yyyy-MM',
185
+ 'yearrange': 'yyyy'
186
+ }
187
+ return formatMap[type] || 'yyyy-MM-dd'
188
+ },
189
+
190
+ // 获取默认占位符
191
+ getDefaultPlaceholder(type) {
192
+ const isRange = type.includes('range')
193
+ const hasTime = type.includes('time')
194
+
195
+ if (isRange) {
196
+ return {
197
+ start: hasTime ? '开始日期时间' : '开始日期',
198
+ end: hasTime ? '结束日期时间' : '结束日期'
199
+ }
200
+ } else {
201
+ if (type === 'year' || type === 'years') {
202
+ return '选择年'
203
+ } else if (type === 'month' || type === 'months') {
204
+ return '选择月'
205
+ } else if (type === 'week') {
206
+ return '选择周'
207
+ } else if (hasTime) {
208
+ return '选择日期时间'
209
+ } else {
210
+ return '选择日期'
211
+ }
212
+ }
213
+ },
214
+
215
+ // 处理值更新
216
+ handleUpdate(value) {
217
+ this.internalValue = value
218
+ this.$emit('input', value)
219
+ }
220
+ }
221
+ }
222
+ </script>
223
+
224
+ <style scoped lang="scss">
225
+ // 保持与 el-date-picker 一致的样式
226
+ ::v-deep .el-date-editor {
227
+ width: 100%;
228
+ }
229
+ </style>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XDatePicker.vue.js","sources":["../../src/components/XDatePicker.vue"],"sourcesContent":["<template>\n <div class=\"x-date-picker\">\n <el-date-picker\n :value=\"internalValue\"\n :type=\"xType\"\n :placeholder=\"currentPlaceholder\"\n :start-placeholder=\"currentStartPlaceholder\"\n :end-placeholder=\"currentEndPlaceholder\"\n :range-separator=\"xRangeSeparator\"\n :value-format=\"currentValueFormat\"\n :default-time=\"currentDefaultTime\"\n @input=\"handleUpdate\"\n />\n </div>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-date-picker 的二次封装,根据 type 自动设置 placeholder 和 value-format\n */\n\nexport default {\n name: 'XDatePicker',\n \n inheritAttrs: false,\n \n props: {\n // 时间选择器类型\n xType: {\n type: String,\n default: 'date',\n validator: (val) => [\n 'year', 'years', \n 'month', 'months', \n 'date', 'dates', \n 'datetime', \n 'week', \n 'datetimerange', \n 'daterange', \n 'monthrange', \n 'yearrange'\n ].includes(val)\n },\n \n // 自定义值格式,如果有则以 prop 为准\n xValueFormat: {\n type: String,\n default: null\n },\n \n // 占位符\n xPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择开始占位符\n xStartPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择结束占位符\n xEndPlaceholder: {\n type: String,\n default: null\n },\n \n // 范围选择分隔符\n xRangeSeparator: {\n type: String,\n default: '至'\n },\n \n // 日期时间范围选择的默认时间\n xDefaultTime: {\n type: [String, Array],\n default: null\n },\n \n // 双向绑定的值\n value: {\n type: [String, Number, Array, Date],\n default: ''\n }\n },\n \n data() {\n return {\n internalValue: this.value\n }\n },\n \n computed: {\n // 计算当前使用的占位符\n currentPlaceholder() {\n if (this.xPlaceholder !== null) {\n return this.xPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (isRange) {\n return undefined // 范围选择使用 start-placeholder 和 end-placeholder\n }\n \n return this.getDefaultPlaceholder(this.xType)\n },\n \n // 计算开始占位符\n currentStartPlaceholder() {\n if (this.xStartPlaceholder !== null) {\n return this.xStartPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (!isRange) {\n return undefined\n }\n \n const defaults = this.getDefaultPlaceholder(this.xType)\n return defaults.start\n },\n \n // 计算结束占位符\n currentEndPlaceholder() {\n if (this.xEndPlaceholder !== null) {\n return this.xEndPlaceholder\n }\n \n const isRange = this.xType.includes('range')\n if (!isRange) {\n return undefined\n }\n \n const defaults = this.getDefaultPlaceholder(this.xType)\n return defaults.end\n },\n \n // 计算当前使用的值格式\n currentValueFormat() {\n // 如果传入了自定义格式,使用自定义格式\n if (this.xValueFormat !== null && this.xValueFormat !== undefined) {\n return this.xValueFormat\n }\n // 否则根据类型自动匹配默认格式\n return this.getDefaultFormat(this.xType)\n },\n \n // 计算默认时间\n currentDefaultTime() {\n // 如果传入了自定义默认时间,使用自定义值\n if (this.xDefaultTime !== null && this.xDefaultTime !== undefined) {\n return this.xDefaultTime\n }\n // 如果是 datetimerange 类型,设置默认时间为 ['00:00:00', '23:59:59']\n if (this.xType === 'datetimerange') {\n return ['00:00:00', '23:59:59']\n }\n return undefined\n }\n },\n \n watch: {\n value(newVal) {\n this.internalValue = newVal\n }\n },\n \n methods: {\n // 获取默认格式\n getDefaultFormat(type) {\n const formatMap = {\n 'year': 'yyyy',\n 'years': 'yyyy',\n 'month': 'yyyy-MM',\n 'months': 'yyyy-MM',\n 'date': 'yyyy-MM-dd',\n 'dates': 'yyyy-MM-dd',\n 'datetime': 'yyyy-MM-dd HH:mm:ss',\n 'week': 'yyyy-MM-dd',\n 'datetimerange': 'yyyy-MM-dd HH:mm:ss',\n 'daterange': 'yyyy-MM-dd',\n 'monthrange': 'yyyy-MM',\n 'yearrange': 'yyyy'\n }\n return formatMap[type] || 'yyyy-MM-dd'\n },\n \n // 获取默认占位符\n getDefaultPlaceholder(type) {\n const isRange = type.includes('range')\n const hasTime = type.includes('time')\n \n if (isRange) {\n return {\n start: hasTime ? '开始日期时间' : '开始日期',\n end: hasTime ? '结束日期时间' : '结束日期'\n }\n } else {\n if (type === 'year' || type === 'years') {\n return '选择年'\n } else if (type === 'month' || type === 'months') {\n return '选择月'\n } else if (type === 'week') {\n return '选择周'\n } else if (hasTime) {\n return '选择日期时间'\n } else {\n return '选择日期'\n }\n }\n },\n \n // 处理值更新\n handleUpdate(value) {\n this.internalValue = value\n this.$emit('input', value)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["__vue_script__","script"],"mappings":"2RAEcA,EAAAC,EAAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../styles/x-ui.scss.js"),require("../styles.js").injectCSSVariables();var e={name:"XDatePicker",inheritAttrs:!1,props:{xType:{type:String,default:"date",validator:function(e){return["year","years","month","months","date","dates","datetime","week","datetimerange","daterange","monthrange","yearrange"].includes(e)}},xValueFormat:{type:String,default:null},xPlaceholder:{type:String,default:null},xStartPlaceholder:{type:String,default:null},xEndPlaceholder:{type:String,default:null},xRangeSeparator:{type:String,default:"至"},xDefaultTime:{type:[String,Array],default:null},value:{type:[String,Number,Array,Date],default:""}},data:function(){return{internalValue:this.value}},computed:{currentPlaceholder:function(){return null!==this.xPlaceholder?this.xPlaceholder:this.xType.includes("range")?void 0:this.getDefaultPlaceholder(this.xType)},currentStartPlaceholder:function(){return null!==this.xStartPlaceholder?this.xStartPlaceholder:this.xType.includes("range")?this.getDefaultPlaceholder(this.xType).start:void 0},currentEndPlaceholder:function(){return null!==this.xEndPlaceholder?this.xEndPlaceholder:this.xType.includes("range")?this.getDefaultPlaceholder(this.xType).end:void 0},currentValueFormat:function(){return null!==this.xValueFormat&&void 0!==this.xValueFormat?this.xValueFormat:this.getDefaultFormat(this.xType)},currentDefaultTime:function(){return null!==this.xDefaultTime&&void 0!==this.xDefaultTime?this.xDefaultTime:"datetimerange"===this.xType?["00:00:00","23:59:59"]:void 0}},watch:{value:function(e){this.internalValue=e}},methods:{getDefaultFormat:function(e){return{year:"yyyy",years:"yyyy",month:"yyyy-MM",months:"yyyy-MM",date:"yyyy-MM-dd",dates:"yyyy-MM-dd",datetime:"yyyy-MM-dd HH:mm:ss",week:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss",daterange:"yyyy-MM-dd",monthrange:"yyyy-MM",yearrange:"yyyy"}[e]||"yyyy-MM-dd"},getDefaultPlaceholder:function(e){var t=e.includes("range"),a=e.includes("time");return t?{start:a?"开始日期时间":"开始日期",end:a?"结束日期时间":"结束日期"}:"year"===e||"years"===e?"选择年":"month"===e||"months"===e?"选择月":"week"===e?"选择周":a?"选择日期时间":"选择日期"},handleUpdate:function(e){this.internalValue=e,this.$emit("input",e)}}};exports.default=e;
2
+ //# sourceMappingURL=XDatePicker.vue_rollup-plugin-vue_script.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJYRGF0ZVBpY2tlci52dWU/cm9sbHVwLXBsdWdpbi12dWU9c3R5bGVzLjAuY3NzIn0= */";if("undefined"!=typeof document&&document.head){const t=document.createElement("style");t.type="text/css",t.setAttribute("data-jc-components","true"),t.textContent=e,document.head.appendChild(t)}exports.default=e;
2
+ //# sourceMappingURL=XDatePicker.vue_rollup-plugin-vue_styles.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XDatePicker.vue_rollup-plugin-vue_styles.0.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElForm.vue_rollup-plugin-vue_script.vue.js"),t=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),i=e.default,s=t.default({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-form",e._b({ref:"formRef",staticStyle:{width:"100%"},attrs:{model:e.xModel,rules:e.xRules,inline:e.xInline,"label-width":e.xLabelWidth,"label-position":e.xLabelPosition,size:e.xSize,disabled:e.xDisabled,"show-message":e.xShowMessage,"inline-message":e.xInlineMessage,"status-icon":e.xStatusIcon,"validate-on-rule-change":e.xValidateOnRuleChange,"hide-required-asterisk":e.xHideRequiredAsterisk,"require-asterisk-position":e.xRequireAsteriskPosition}},"el-form",e.$attrs,!1),[i("el-row",{style:e.rowStyle,attrs:{gutter:e.xGutter}},[e._t("default")],2)],1)},staticRenderFns:[]},void 0,i,"data-v-737d5a7c",false,void 0,!1,void 0,void 0,void 0);exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElForm.vue_rollup-plugin-vue_script.js");require("./XElForm.vue_rollup-plugin-vue_styles.0.js");var t=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),l=e.default,r=t.default({render:function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-form",{ref:"formRef",staticClass:"x-el-form",staticStyle:{width:"100%"},attrs:{model:e.xModel,rules:e.xRules,inline:e.xInline,"label-width":e.xLabelWidth,"label-position":e.xLabelPosition,size:e.xSize,disabled:e.xDisabled}},[l("el-row",{style:e.rowStyle,attrs:{gutter:e.xGutter}},[e._t("default")],2)],1)},staticRenderFns:[]},void 0,l,"data-v-356020e6",false,void 0,!1,void 0,void 0,void 0);exports.default=r;
2
+ //# sourceMappingURL=XElForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElForm.vue_rollup-plugin-vue_script.js","sources":["../../src/components/XElForm.vue"],"sourcesContent":["\n<template>\n <el-form\n ref=\"formRef\"\n class=\"x-el-form\"\n :model=\"xModel\"\n :rules=\"xRules\"\n :inline=\"xInline\"\n :label-width=\"xLabelWidth\"\n :label-position=\"xLabelPosition\"\n :size=\"xSize\"\n :disabled=\"xDisabled\"\n style=\"width: 100%;\"\n >\n <el-row :gutter=\"xGutter\" :style=\"rowStyle\">\n <slot></slot>\n </el-row>\n </el-form>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-form 的二次封装,添加 el-row 布局支持\n */\n\nexport default {\n name: 'XElForm',\n \n inheritAttrs: true,\n \n props: {\n // el-form 原生属性\n xModel: {\n type: Object,\n default: () => ({})\n },\n xRules: {\n type: Object,\n default: () => ({})\n },\n xInline: {\n type: Boolean,\n default: false\n },\n xLabelWidth: {\n type: String,\n default: '120px'\n },\n xLabelPosition: {\n type: String,\n default: 'right',\n validator: (val) => ['left', 'right', 'top'].includes(val)\n },\n xSize: {\n type: String,\n default: undefined\n },\n xDisabled: {\n type: Boolean,\n default: false\n },\n \n // 自定义属性\n xSpan: {\n type: Number,\n default: 24\n },\n xGutter: {\n type: Number,\n default: 20\n }\n },\n \n computed: {\n // 计算 row 样式,移除负 margin\n rowStyle() {\n return {\n marginLeft: 0,\n marginRight: 0\n }\n }\n },\n \n provide() {\n return {\n formItemSpan: this.xSpan,\n formGutter: this.xGutter\n }\n },\n \n methods: {\n // 表单验证\n validate(callback) {\n return this.$refs.formRef?.validate(callback)\n },\n \n // 部分字段验证\n validateField(props, callback) {\n return this.$refs.formRef?.validateField(props, callback)\n },\n \n // 重置表单\n resetFields() {\n return this.$refs.formRef?.resetFields()\n },\n \n // 清除验证\n clearValidate(props) {\n return this.$refs.formRef?.clearValidate(props)\n },\n \n // 滚动到指定字段\n scrollToField(prop) {\n return this.$refs.formRef?.scrollToField(prop)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["injectCSSVariables","script","name","inheritAttrs","props","xModel","type","Object","default","xRules","xInline","Boolean","xLabelWidth","String","xLabelPosition","validator","val","includes","xSize","undefined","xDisabled","xSpan","Number","xGutter","computed","rowStyle","marginLeft","marginRight","provide","formItemSpan","this","formGutter","methods","validate","callback","_this$$refs$formRef","$refs","formRef","validateField","_this$$refs$formRef2","resetFields","_this$$refs$formRef3","clearValidate","_this$$refs$formRef4","scrollToField","prop","_this$$refs$formRef5"],"mappings":"8HAwBAA,qBAQA,IAAAC,EAAA,CACAC,KAAA,UAEAC,cAAA,EAEAC,MAAA,CAEAC,OAAA,CACAC,KAAAC,OACAC,QAAA,WAAA,MAAA,EAAA,GAEAC,OAAA,CACAH,KAAAC,OACAC,QAAA,WAAA,MAAA,EAAA,GAEAE,QAAA,CACAJ,KAAAK,QACAH,SAAA,GAEAI,YAAA,CACAN,KAAAO,OACAL,QAAA,SAEAM,eAAA,CACAR,KAAAO,OACAL,QAAA,QACAO,UAAA,SAAAC,GAAA,MAAA,CAAA,OAAA,QAAA,OAAAC,SAAAD,EAAA,GAEAE,MAAA,CACAZ,KAAAO,OACAL,aAAAW,GAEAC,UAAA,CACAd,KAAAK,QACAH,SAAA,GAIAa,MAAA,CACAf,KAAAgB,OACAd,QAAA,IAEAe,QAAA,CACAjB,KAAAgB,OACAd,QAAA,KAIAgB,SAAA,CAEAC,SAAA,WACA,MAAA,CACAC,WAAA,EACAC,YAAA,EAEA,GAGAC,QAAA,WACA,MAAA,CACAC,aAAAC,KAAAT,MACAU,WAAAD,KAAAP,QAEA,EAEAS,QAAA,CAEAC,SAAAA,SAAAC,GAAA,IAAAC,EACA,OAAAA,QAAAA,EAAAL,KAAAM,MAAAC,mBAAAF,SAAAA,EAAAF,SAAAC,EACA,EAGAI,uBAAAlC,EAAA8B,GAAA,IAAAK,EACA,OAAA,QAAAA,EAAAT,KAAAM,MAAAC,eAAA,IAAAE,OAAA,EAAAA,EAAAD,cAAAlC,EAAA8B,EACA,EAGAM,YAAA,WAAA,IAAAC,EACA,OAAAA,QAAAA,EAAAX,KAAAM,MAAAC,eAAAI,IAAAA,OAAAA,EAAAA,EAAAD,aACA,EAGAE,cAAAA,SAAAtC,GAAA,IAAAuC,EACA,OAAAA,QAAAA,EAAAb,KAAAM,MAAAC,mBAAAM,SAAAA,EAAAD,cAAAtC,EACA,EAGAwC,cAAAA,SAAAC,GAAA,IAAAC,EACA,OAAAA,QAAAA,EAAAhB,KAAAM,MAAAC,mBAAAS,SAAAA,EAAAF,cAAAC,EACA"}
@@ -0,0 +1,164 @@
1
+
2
+ <template>
3
+ <el-form
4
+ ref="formRef"
5
+ v-bind="$attrs"
6
+ :model="xModel"
7
+ :rules="xRules"
8
+ :inline="xInline"
9
+ :label-width="xLabelWidth"
10
+ :label-position="xLabelPosition"
11
+ :size="xSize"
12
+ :disabled="xDisabled"
13
+ :show-message="xShowMessage"
14
+ :inline-message="xInlineMessage"
15
+ :status-icon="xStatusIcon"
16
+ :validate-on-rule-change="xValidateOnRuleChange"
17
+ :hide-required-asterisk="xHideRequiredAsterisk"
18
+ :require-asterisk-position="xRequireAsteriskPosition"
19
+ style="width: 100%;"
20
+ >
21
+ <el-row :gutter="xGutter" :style="rowStyle">
22
+ <slot></slot>
23
+ </el-row>
24
+ </el-form>
25
+ </template>
26
+
27
+ <script>
28
+ /**
29
+ * @author xjw
30
+ * @since 2026/4/10
31
+ * @description 对 el-form 的二次封装,添加 el-row 布局支持
32
+ */
33
+
34
+ export default {
35
+ name: 'XElForm',
36
+
37
+ inheritAttrs: true,
38
+
39
+ props: {
40
+ // el-form 原生属性
41
+ xModel: {
42
+ type: Object,
43
+ default: () => ({})
44
+ },
45
+ xRules: {
46
+ type: Object,
47
+ default: () => ({})
48
+ },
49
+ xInline: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ xLabelWidth: {
54
+ type: String,
55
+ default: '120px'
56
+ },
57
+ xLabelPosition: {
58
+ type: String,
59
+ default: 'right',
60
+ validator: (val) => ['left', 'right', 'top'].includes(val)
61
+ },
62
+ xSize: {
63
+ type: String,
64
+ default: undefined
65
+ },
66
+ xDisabled: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ xShowMessage: {
71
+ type: Boolean,
72
+ default: true
73
+ },
74
+ xInlineMessage: {
75
+ type: Boolean,
76
+ default: false
77
+ },
78
+ xStatusIcon: {
79
+ type: Boolean,
80
+ default: false
81
+ },
82
+ xValidateOnRuleChange: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ xHideRequiredAsterisk: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ xRequireAsteriskPosition: {
91
+ type: String,
92
+ default: 'left',
93
+ validator: (val) => ['left', 'right'].includes(val)
94
+ },
95
+
96
+ // 自定义属性
97
+ xSpan: {
98
+ type: Number,
99
+ default: 24
100
+ },
101
+ xGutter: {
102
+ type: Number,
103
+ default: 20
104
+ }
105
+ },
106
+
107
+ computed: {
108
+ // 计算 row 样式,移除负 margin
109
+ rowStyle() {
110
+ return {
111
+ marginLeft: 0,
112
+ marginRight: 0
113
+ }
114
+ }
115
+ },
116
+
117
+ provide() {
118
+ return {
119
+ formItemSpan: this.xSpan,
120
+ formGutter: this.xGutter
121
+ }
122
+ },
123
+
124
+ methods: {
125
+ // 表单验证
126
+ validate(callback) {
127
+ return this.$refs.formRef?.validate(callback)
128
+ },
129
+
130
+ // 部分字段验证
131
+ validateField(props, callback) {
132
+ return this.$refs.formRef?.validateField(props, callback)
133
+ },
134
+
135
+ // 重置表单
136
+ resetFields() {
137
+ return this.$refs.formRef?.resetFields()
138
+ },
139
+
140
+ // 清除验证
141
+ clearValidate(props) {
142
+ return this.$refs.formRef?.clearValidate(props)
143
+ },
144
+
145
+ // 滚动到指定字段
146
+ scrollToField(prop) {
147
+ return this.$refs.formRef?.scrollToField(prop)
148
+ }
149
+ }
150
+ }
151
+ </script>
152
+
153
+ <style scoped lang="scss">
154
+ // 保持与 el-form 一致的样式
155
+ ::v-deep .el-form {
156
+ width: 100%;
157
+ }
158
+
159
+ // 移除 el-row 的负 margin,避免与外层容器 padding 冲突
160
+ ::v-deep .el-row {
161
+ margin-left: 0 !important;
162
+ margin-right: 0 !important;
163
+ }
164
+ </style>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElForm.vue.js","sources":["../../src/components/XElForm.vue"],"sourcesContent":["\n<template>\n <el-form\n ref=\"formRef\"\n class=\"x-el-form\"\n :model=\"xModel\"\n :rules=\"xRules\"\n :inline=\"xInline\"\n :label-width=\"xLabelWidth\"\n :label-position=\"xLabelPosition\"\n :size=\"xSize\"\n :disabled=\"xDisabled\"\n style=\"width: 100%;\"\n >\n <el-row :gutter=\"xGutter\" :style=\"rowStyle\">\n <slot></slot>\n </el-row>\n </el-form>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-form 的二次封装,添加 el-row 布局支持\n */\n\nexport default {\n name: 'XElForm',\n \n inheritAttrs: true,\n \n props: {\n // el-form 原生属性\n xModel: {\n type: Object,\n default: () => ({})\n },\n xRules: {\n type: Object,\n default: () => ({})\n },\n xInline: {\n type: Boolean,\n default: false\n },\n xLabelWidth: {\n type: String,\n default: '120px'\n },\n xLabelPosition: {\n type: String,\n default: 'right',\n validator: (val) => ['left', 'right', 'top'].includes(val)\n },\n xSize: {\n type: String,\n default: undefined\n },\n xDisabled: {\n type: Boolean,\n default: false\n },\n \n // 自定义属性\n xSpan: {\n type: Number,\n default: 24\n },\n xGutter: {\n type: Number,\n default: 20\n }\n },\n \n computed: {\n // 计算 row 样式,移除负 margin\n rowStyle() {\n return {\n marginLeft: 0,\n marginRight: 0\n }\n }\n },\n \n provide() {\n return {\n formItemSpan: this.xSpan,\n formGutter: this.xGutter\n }\n },\n \n methods: {\n // 表单验证\n validate(callback) {\n return this.$refs.formRef?.validate(callback)\n },\n \n // 部分字段验证\n validateField(props, callback) {\n return this.$refs.formRef?.validateField(props, callback)\n },\n \n // 重置表单\n resetFields() {\n return this.$refs.formRef?.resetFields()\n },\n \n // 清除验证\n clearValidate(props) {\n return this.$refs.formRef?.clearValidate(props)\n },\n \n // 滚动到指定字段\n scrollToField(prop) {\n return this.$refs.formRef?.scrollToField(prop)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["__vue_script__","script"],"mappings":"mRAEcA,EAAAC,EAAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../styles/x-ui.scss.js"),require("../styles.js").injectCSSVariables();var e={name:"XElForm",inheritAttrs:!0,props:{xModel:{type:Object,default:function(){return{}}},xRules:{type:Object,default:function(){return{}}},xInline:{type:Boolean,default:!1},xLabelWidth:{type:String,default:"120px"},xLabelPosition:{type:String,default:"right",validator:function(e){return["left","right","top"].includes(e)}},xSize:{type:String,default:void 0},xDisabled:{type:Boolean,default:!1},xSpan:{type:Number,default:24},xGutter:{type:Number,default:20}},computed:{rowStyle:function(){return{marginLeft:0,marginRight:0}}},provide:function(){return{formItemSpan:this.xSpan,formGutter:this.xGutter}},methods:{validate:function(e){var t;return null===(t=this.$refs.formRef)||void 0===t?void 0:t.validate(e)},validateField:function(e,t){var r;return null===(r=this.$refs.formRef)||void 0===r?void 0:r.validateField(e,t)},resetFields:function(){var e;return null===(e=this.$refs.formRef)||void 0===e?void 0:e.resetFields()},clearValidate:function(e){var t;return null===(t=this.$refs.formRef)||void 0===t?void 0:t.clearValidate(e)},scrollToField:function(e){var t;return null===(t=this.$refs.formRef)||void 0===t?void 0:t.scrollToField(e)}}};exports.default=e;
2
+ //# sourceMappingURL=XElForm.vue_rollup-plugin-vue_script.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJYRWxGb3JtLnZ1ZT9yb2xsdXAtcGx1Z2luLXZ1ZT1zdHlsZXMuMC5jc3MifQ== */";if("undefined"!=typeof document&&document.head){const t=document.createElement("style");t.type="text/css",t.setAttribute("data-jc-components","true"),t.textContent=e,document.head.appendChild(t)}exports.default=e;
2
+ //# sourceMappingURL=XElForm.vue_rollup-plugin-vue_styles.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElForm.vue_rollup-plugin-vue_styles.0.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElFormItem.vue_rollup-plugin-vue_script.vue.js"),r=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),t=e.default,s=r.default({render:function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-col",{attrs:{span:e.currentSpan}},[t("el-form-item",e._b({attrs:{label:e.xLabel,prop:e.xProp,"label-width":e.xLabelWidth,required:e.xRequired,rules:e.xRules,error:e.xError,"validate-status":e.xValidateStatus,"show-message":e.xShowMessage,"inline-message":e.xInlineMessage,size:e.xSize}},"el-form-item",e.$attrs,!1),[e._t("default")],2)],1)},staticRenderFns:[]},void 0,t,"data-v-e6222a20",false,void 0,!1,void 0,void 0,void 0);exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElFormItem.vue_rollup-plugin-vue_script.js");require("./XElFormItem.vue_rollup-plugin-vue_styles.0.js");var r=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),t=e.default,l=r.default({render:function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("el-col",{staticClass:"x-el-form-item",attrs:{span:e.currentSpan}},[t("el-form-item",{attrs:{label:e.xLabel,prop:e.xProp,"label-width":e.xLabelWidth,required:e.xRequired,size:e.xSize}},[e._t("default")],2)],1)},staticRenderFns:[]},void 0,t,"data-v-699c7d89",false,void 0,!1,void 0,void 0,void 0);exports.default=l;
2
+ //# sourceMappingURL=XElFormItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElFormItem.vue_rollup-plugin-vue_script.js","sources":["../../src/components/XElFormItem.vue"],"sourcesContent":["<template>\n <el-col :span=\"currentSpan\" class=\"x-el-form-item\">\n <el-form-item \n :label=\"xLabel\"\n :prop=\"xProp\"\n :label-width=\"xLabelWidth\"\n :required=\"xRequired\"\n :size=\"xSize\"\n >\n <slot></slot>\n </el-form-item>\n </el-col>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-form-item 的二次封装,支持栅格布局\n */\n\nexport default {\n name: 'XElFormItem',\n \n inheritAttrs: false,\n \n inject: {\n formItemSpan: {\n default: 24\n },\n formGutter: {\n default: 0\n }\n },\n \n props: {\n // el-form-item 原生属性\n xLabel: {\n type: String,\n default: undefined\n },\n xProp: {\n type: String,\n default: undefined\n },\n xLabelWidth: {\n type: [String, Number],\n default: undefined\n },\n xRequired: {\n type: Boolean,\n default: false\n },\n xSize: {\n type: String,\n default: undefined\n },\n \n // 自定义属性\n xSpan: {\n type: Number,\n default: null\n }\n },\n \n computed: {\n // 计算当前表单项的 span 值,优先使用自身的 span 属性\n currentSpan() {\n return this.xSpan !== null ? this.xSpan : this.formItemSpan\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["injectCSSVariables","script","name","inheritAttrs","inject","formItemSpan","default","formGutter","props","xLabel","type","String","undefined","xProp","xLabelWidth","Number","xRequired","Boolean","xSize","xSpan","computed","currentSpan","this"],"mappings":"8HAkBAA,qBAQA,IAAAC,EAAA,CACAC,KAAA,cAEAC,cAAA,EAEAC,OAAA,CACAC,aAAA,CACAC,QAAA,IAEAC,WAAA,CACAD,QAAA,IAIAE,MAAA,CAEAC,OAAA,CACAC,KAAAC,OACAL,aAAAM,GAEAC,MAAA,CACAH,KAAAC,OACAL,aAAAM,GAEAE,YAAA,CACAJ,KAAA,CAAAC,OAAAI,QACAT,aAAAM,GAEAI,UAAA,CACAN,KAAAO,QACAX,SAAA,GAEAY,MAAA,CACAR,KAAAC,OACAL,aAAAM,GAIAO,MAAA,CACAT,KAAAK,OACAT,QAAA,OAIAc,SAAA,CAEAC,YAAA,WACA,OAAA,OAAAC,KAAAH,MAAAG,KAAAH,MAAAG,KAAAjB,YACA"}
@@ -0,0 +1,113 @@
1
+ <template>
2
+ <el-col :span="currentSpan">
3
+ <el-form-item
4
+ v-bind="$attrs"
5
+ :label="xLabel"
6
+ :prop="xProp"
7
+ :label-width="xLabelWidth"
8
+ :required="xRequired"
9
+ :rules="xRules"
10
+ :error="xError"
11
+ :validate-status="xValidateStatus"
12
+ :show-message="xShowMessage"
13
+ :inline-message="xInlineMessage"
14
+ :size="xSize"
15
+ >
16
+ <slot></slot>
17
+ </el-form-item>
18
+ </el-col>
19
+ </template>
20
+
21
+ <script>
22
+ /**
23
+ * @author xjw
24
+ * @since 2026/4/10
25
+ * @description 对 el-form-item 的二次封装,支持栅格布局
26
+ */
27
+
28
+ export default {
29
+ name: 'XElFormItem',
30
+
31
+ inheritAttrs: false,
32
+
33
+ inject: {
34
+ formItemSpan: {
35
+ default: 24
36
+ },
37
+ formGutter: {
38
+ default: 0
39
+ }
40
+ },
41
+
42
+ props: {
43
+ // el-form-item 原生属性
44
+ xLabel: {
45
+ type: String,
46
+ default: undefined
47
+ },
48
+ xProp: {
49
+ type: String,
50
+ default: undefined
51
+ },
52
+ xLabelWidth: {
53
+ type: [String, Number],
54
+ default: undefined
55
+ },
56
+ xRequired: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ xRules: {
61
+ type: [Object, Array],
62
+ default: undefined
63
+ },
64
+ xError: {
65
+ type: String,
66
+ default: undefined
67
+ },
68
+ xValidateStatus: {
69
+ type: String,
70
+ default: undefined
71
+ },
72
+ xShowMessage: {
73
+ type: Boolean,
74
+ default: true
75
+ },
76
+ xInlineMessage: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ xSize: {
81
+ type: String,
82
+ default: undefined
83
+ },
84
+
85
+ // 自定义属性
86
+ xSpan: {
87
+ type: Number,
88
+ default: null
89
+ }
90
+ },
91
+
92
+ computed: {
93
+ // 计算当前表单项的 span 值,优先使用自身的 span 属性
94
+ currentSpan() {
95
+ return this.xSpan !== null ? this.xSpan : this.formItemSpan
96
+ }
97
+ }
98
+ }
99
+ </script>
100
+
101
+ <style scoped lang="scss">
102
+ // 保持与 el-form-item 一致的样式
103
+ ::v-deep .el-form-item {
104
+ margin-bottom: 16px;
105
+ }
106
+
107
+ ::v-deep .el-col {
108
+ padding: 0 8px;
109
+ }
110
+ ::v-deep .el-date-editor.el-input, .el-date-editor.el-input__inner {
111
+ width: 100% !important;
112
+ }
113
+ </style>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElFormItem.vue.js","sources":["../../src/components/XElFormItem.vue"],"sourcesContent":["<template>\n <el-col :span=\"currentSpan\" class=\"x-el-form-item\">\n <el-form-item \n :label=\"xLabel\"\n :prop=\"xProp\"\n :label-width=\"xLabelWidth\"\n :required=\"xRequired\"\n :size=\"xSize\"\n >\n <slot></slot>\n </el-form-item>\n </el-col>\n</template>\n\n<script>\nimport '../styles/x-ui.scss'\nimport { injectCSSVariables } from '../styles.js'\n\ninjectCSSVariables()\n\n/**\n * @author xjw\n * @since 2026/4/10\n * @description 对 el-form-item 的二次封装,支持栅格布局\n */\n\nexport default {\n name: 'XElFormItem',\n \n inheritAttrs: false,\n \n inject: {\n formItemSpan: {\n default: 24\n },\n formGutter: {\n default: 0\n }\n },\n \n props: {\n // el-form-item 原生属性\n xLabel: {\n type: String,\n default: undefined\n },\n xProp: {\n type: String,\n default: undefined\n },\n xLabelWidth: {\n type: [String, Number],\n default: undefined\n },\n xRequired: {\n type: Boolean,\n default: false\n },\n xSize: {\n type: String,\n default: undefined\n },\n \n // 自定义属性\n xSpan: {\n type: Number,\n default: null\n }\n },\n \n computed: {\n // 计算当前表单项的 span 值,优先使用自身的 span 属性\n currentSpan() {\n return this.xSpan !== null ? this.xSpan : this.formItemSpan\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n</style>\n"],"names":["__vue_script__","script"],"mappings":"2RAEcA,EAAAC,EAAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../styles/x-ui.scss.js"),require("../styles.js").injectCSSVariables();var e={name:"XElFormItem",inheritAttrs:!1,inject:{formItemSpan:{default:24},formGutter:{default:0}},props:{xLabel:{type:String,default:void 0},xProp:{type:String,default:void 0},xLabelWidth:{type:[String,Number],default:void 0},xRequired:{type:Boolean,default:!1},xSize:{type:String,default:void 0},xSpan:{type:Number,default:null}},computed:{currentSpan:function(){return null!==this.xSpan?this.xSpan:this.formItemSpan}}};exports.default=e;
2
+ //# sourceMappingURL=XElFormItem.vue_rollup-plugin-vue_script.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJYRWxGb3JtSXRlbS52dWU/cm9sbHVwLXBsdWdpbi12dWU9c3R5bGVzLjAuY3NzIn0= */";if("undefined"!=typeof document&&document.head){const t=document.createElement("style");t.type="text/css",t.setAttribute("data-jc-components","true"),t.textContent=e,document.head.appendChild(t)}exports.default=e;
2
+ //# sourceMappingURL=XElFormItem.vue_rollup-plugin-vue_styles.0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XElFormItem.vue_rollup-plugin-vue_styles.0.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElOption.vue_rollup-plugin-vue_script.vue.js"),t=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),r=e.default,l=t.default({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-option",e._b({attrs:{label:e.computedLabel,value:e.computedValue}},"el-option",e.$attrs,!1),[e._t("default")],2)},staticRenderFns:[]},void 0,r,"data-v-420f045f",false,void 0,!1,void 0,void 0,void 0);exports.default=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./XElOption.vue_rollup-plugin-vue_script.js");require("./XElOption.vue_rollup-plugin-vue_styles.0.js");var t=require("../node_modules/vue-runtime-helpers/dist/normalize-component.mjs.js"),l=e.default,u=t.default({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-option",{attrs:{label:e.computedLabel,value:e.computedValue,disabled:e.xDisabled}},[e._t("default")],2)},staticRenderFns:[]},void 0,l,"data-v-4001b472",false,void 0,!1,void 0,void 0,void 0);exports.default=u;
2
+ //# sourceMappingURL=XElOption.js.map