fast-element-plus 1.0.0-alpha.9 → 1.0.1
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.
- package/dist/index.full.js +3180 -4581
- package/dist/index.full.js.map +1 -1
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3180 -4581
- package/dist/index.full.mjs.map +1 -1
- package/dist/styles/index.css +2 -2
- package/es/components/avatar/index.d.ts +1 -1
- package/es/components/avatar/index.mjs.map +1 -1
- package/es/components/avatar/src/avatar.d.ts +18 -102
- package/es/components/avatar/src/avatar.mjs +1 -2
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/button/index.d.ts +1 -1
- package/es/components/button/index.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +35 -180
- package/es/components/button/src/button.mjs +14 -4
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/carNumber/src/carNumber.d.ts +58 -194
- package/es/components/contextMenu/src/contextMenu.mjs +1 -1
- package/es/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +45 -297
- package/es/components/drawer/src/drawer.d.ts +72 -450
- package/es/components/form/src/form.d.ts +28 -133
- package/es/components/form/src/formItem.d.ts +32 -137
- package/es/components/iconSelector/src/iconSelector.mjs +2 -2
- package/es/components/iconSelector/src/iconSelector.mjs.map +1 -1
- package/es/components/image/src/image.d.ts +43 -253
- package/es/components/select/src/select.d.ts +25 -81
- package/es/components/select/src/select.mjs +1 -0
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/selectPage/src/selectPage.d.ts +19 -61
- package/es/components/selectV2/src/selectV2.d.ts +25 -81
- package/es/components/selectV2/src/selectV2.mjs +1 -0
- package/es/components/selectV2/src/selectV2.mjs.map +1 -1
- package/es/components/table/src/table.d.ts +5 -12
- package/es/components/table/src/table.mjs +4 -6
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.state.d.ts +1 -1
- package/es/components/table/src/table.type.d.ts +4 -1
- package/es/components/table/src/table.type.mjs.map +1 -1
- package/es/components/table/src/tableColumn.d.ts +1 -1
- package/es/components/table/src/tableColumn.mjs +7 -7
- package/es/components/table/src/tableColumn.mjs.map +1 -1
- package/es/components/table/src/tableSearchForm.d.ts +6 -4
- package/es/components/table/src/tableSearchForm.mjs +2 -2
- package/es/components/table/src/tableSearchForm.mjs.map +1 -1
- package/es/components/table/src/useTable.mjs +3 -3
- package/es/components/table/src/useTable.mjs.map +1 -1
- package/es/components/tree/src/tree.d.ts +23 -653
- package/es/components/tree/src/tree.mjs +1 -1
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree/src/tree.type.d.ts +1 -1
- package/es/components/treeSelect/src/treeSelect.d.ts +20 -62
- package/es/components/treeSelect/src/treeSelect.mjs +1 -0
- package/es/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +298 -460
- package/es/components/upload/src/useUpload.mjs +2 -2
- package/es/components/upload/src/useUpload.mjs.map +1 -1
- package/es/components/uploadImage/src/uploadImage.d.ts +295 -394
- package/es/components/uploadImage/src/uploadImage.mjs +1 -1
- package/es/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/es/components/uploadImages/src/uploadImages.d.ts +300 -420
- package/es/components/uploadImages/src/uploadImages.mjs +4 -4
- package/es/components/uploadImages/src/uploadImages.mjs.map +1 -1
- package/es/constants/regex.mjs +13 -13
- package/es/constants/regex.mjs.map +1 -1
- package/es/directive.d.ts +1 -1
- package/es/directives/click-copy/index.d.ts +1 -1
- package/es/directives/click-debounce/index.d.ts +1 -1
- package/es/directives/click-draggable/index.d.ts +1 -1
- package/es/directives/click-icon-copy/index.d.ts +1 -1
- package/es/directives/click-longpress/index.d.ts +1 -1
- package/es/directives/click-throttle/index.d.ts +1 -1
- package/es/element-plus.mjs +1 -1
- package/es/element-plus.mjs.map +1 -1
- package/es/make-installer.mjs +4 -0
- package/es/make-installer.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.d.ts +1 -1
- package/lib/components/avatar/index.js.map +1 -1
- package/lib/components/avatar/src/avatar.d.ts +18 -102
- package/lib/components/avatar/src/avatar.js +1 -1
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/button/index.d.ts +1 -1
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/button/src/button.d.ts +35 -180
- package/lib/components/button/src/button.js +1 -1
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/carNumber/src/carNumber.d.ts +58 -194
- package/lib/components/contextMenu/src/contextMenu.js +1 -1
- package/lib/components/contextMenu/src/contextMenu.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +45 -297
- package/lib/components/drawer/src/drawer.d.ts +72 -450
- package/lib/components/form/src/form.d.ts +28 -133
- package/lib/components/form/src/formItem.d.ts +32 -137
- package/lib/components/image/src/image.d.ts +43 -253
- package/lib/components/select/src/select.d.ts +25 -81
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/selectPage/src/selectPage.d.ts +19 -61
- package/lib/components/selectV2/src/selectV2.d.ts +25 -81
- package/lib/components/selectV2/src/selectV2.js +1 -1
- package/lib/components/selectV2/src/selectV2.js.map +1 -1
- package/lib/components/table/src/table.d.ts +5 -12
- package/lib/components/table/src/table.js +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.state.d.ts +1 -1
- package/lib/components/table/src/table.type.d.ts +4 -1
- package/lib/components/table/src/table.type.js.map +1 -1
- package/lib/components/table/src/tableColumn.d.ts +1 -1
- package/lib/components/table/src/tableColumn.js +1 -1
- package/lib/components/table/src/tableColumn.js.map +1 -1
- package/lib/components/table/src/tableSearchForm.d.ts +6 -4
- package/lib/components/table/src/tableSearchForm.js +1 -1
- package/lib/components/table/src/tableSearchForm.js.map +1 -1
- package/lib/components/table/src/useTable.js +1 -1
- package/lib/components/table/src/useTable.js.map +1 -1
- package/lib/components/tree/src/tree.d.ts +23 -653
- package/lib/components/tree/src/tree.js +1 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree/src/tree.type.d.ts +1 -1
- package/lib/components/treeSelect/src/treeSelect.d.ts +20 -62
- package/lib/components/treeSelect/src/treeSelect.js +1 -1
- package/lib/components/treeSelect/src/treeSelect.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +298 -460
- package/lib/components/upload/src/useUpload.js +1 -1
- package/lib/components/upload/src/useUpload.js.map +1 -1
- package/lib/components/uploadImage/src/uploadImage.d.ts +295 -394
- package/lib/components/uploadImage/src/uploadImage.js +1 -1
- package/lib/components/uploadImage/src/uploadImage.js.map +1 -1
- package/lib/components/uploadImages/src/uploadImages.d.ts +300 -420
- package/lib/components/uploadImages/src/uploadImages.js +1 -1
- package/lib/components/uploadImages/src/uploadImages.js.map +1 -1
- package/lib/constants/regex.js +1 -1
- package/lib/constants/regex.js.map +1 -1
- package/lib/directive.d.ts +1 -1
- package/lib/directives/click-copy/index.d.ts +1 -1
- package/lib/directives/click-debounce/index.d.ts +1 -1
- package/lib/directives/click-draggable/index.d.ts +1 -1
- package/lib/directives/click-icon-copy/index.d.ts +1 -1
- package/lib/directives/click-longpress/index.d.ts +1 -1
- package/lib/directives/click-throttle/index.d.ts +1 -1
- package/lib/element-plus.js +1 -1
- package/lib/element-plus.js.map +1 -1
- package/lib/make-installer.js +1 -1
- package/lib/make-installer.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +8 -8
- package/styles/components/contextMenu.scss +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),a=require("@element-plus/icons-vue"),t=require("../../upload/src/useUpload.js");require("../../../constants/index.js");const i=require("@fast-china/utils"),o=require("lodash-unified"),r=require("../../../constants/mime.js"),d={...l.uploadProps,accept:{type:String,default:()=>r.FaMimeType.Image},listType:{type:i.definePropType(String),default:"picture-card"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},modelValue:i.definePropType([
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),a=require("@element-plus/icons-vue"),t=require("../../upload/src/useUpload.js");require("../../../constants/index.js");const i=require("@fast-china/utils"),o=require("lodash-unified"),r=require("../../../constants/mime.js"),d={...l.uploadProps,accept:{type:String,default:()=>r.FaMimeType.Image},listType:{type:i.definePropType(String),default:"picture-card"},multiple:{type:Boolean,default:!0},limit:{type:Number,default:9},modelValue:i.definePropType([Array]),maxSize:{type:[String,Number],default:2048},uploadApi:{type:i.definePropType(Function)},uploadUrl:String},u={"update:modelValue":e=>o.isArray(e)||o.isNull(e),"update:fileList":e=>o.isArray(e),change:e=>o.isArray(e)||o.isNull(e)},s=e.defineComponent({name:"FaUploadImages",props:d,emits:u,slots:i.makeSlots(),setup(o,{attrs:r,slots:d,emit:u,expose:s}){const{fileList:n,loading:p,formContext:c,maxSizeMB:m,handleValue:v,handleHttpRequest:f,handleOnSuccess:g,handleOnError:N,handleOnExceed:V,handleOnUpload:h}=t.useUpload("FaUploadImages","图片",o,u,{maxSize:o.maxSize,uploadApi:o.uploadApi,uploadUrl:o.uploadUrl}),x=e.computed(()=>o.disabled||c?.disabled),y=e.reactive({uploadKey:`fa-upload-images__${i.stringUtil.generateRandomString(8)}`,preview:!1,previewIndex:-1,previewList:[]}),_=e.ref(),S=()=>{const e=document.querySelector(`.${y.uploadKey} .el-upload__input`);e&&e.dispatchEvent(new MouseEvent("click"))},w=e=>!!h(e)&&(!o.beforeUpload||o.beforeUpload(e)),E=i.useProps(o,l.uploadProps,["fileList","disabled","httpRequest","beforeUpload","onExceed","onSuccess","onError"]);return i.useRender(()=>e.createVNode(e.Fragment,null,[e.withDirectives(e.createVNode(l.ElUpload,e.mergeProps(E.value,{ref:_,class:["fa-upload-images",y.uploadKey,{"fa-upload-images__hidden-upload":n.value.length>=o.limit}],fileList:n.value,"onUpdate:fileList":e=>n.value=e,disabled:x.value,httpRequest:f,beforeUpload:w,onExceed:V,onSuccess:g,onError:N}),{default:()=>n.value.length<o.limit&&d.default?d.default():e.createVNode(l.ElIcon,null,{default:()=>[e.createVNode(a.Plus,null,null)]}),tip:()=>e.createVNode("div",{class:"el-upload__tip"},[e.createTextVNode("files with a size less than "),m.toString(),e.createTextVNode("MB")]),file:({file:t,index:i})=>e.createVNode("div",null,[e.createVNode("img",{class:"el-upload-list__item-thumbnail",src:t.url},null),e.createVNode("span",{class:"el-upload-list__item-actions"},[e.createVNode("span",{class:"el-upload-list__item-preview",onClick:()=>{return e=t,y.previewIndex=n.value.findIndex(l=>l.url===e.url),y.previewList=n.value.map(e=>e.url),void(y.preview=!0);var e},title:"查看"},[e.createVNode(l.ElIcon,null,{default:()=>[e.createVNode(a.ZoomIn,null,null)]})]),!x.value&&e.createVNode(e.Fragment,null,[e.createVNode("span",{class:"el-upload-list__item-icon",onClick:S,title:"编辑"},[e.createVNode(l.ElIcon,null,{default:()=>[e.createVNode(a.Edit,null,null)]})]),e.createVNode("span",{class:"el-upload-list__item-icon",onClick:()=>(e=>{n.value.splice(e,1),v()})(i),title:"删除"},[e.createVNode(l.ElIcon,null,{default:()=>[e.createVNode(a.Delete,null,null)]})])])])])}),[[e.resolveDirective("loading"),p.value]]),y.preview&&e.createVNode(l.ElImageViewer,{closeOnPressEscape:!0,hideOnClickModal:!0,teleported:!0,onClose:()=>y.preview=!1,urlList:y.previewList},null)])),i.useExpose(s,{abort:e.computed(()=>_.value?.abort),submit:e.computed(()=>_.value?.submit),clearFiles:e.computed(()=>_.value?.clearFiles),handleStart:e.computed(()=>_.value?.handleStart),handleRemove:e.computed(()=>_.value?.handleRemove),loading:p,fileList:n,preview:e.computed(()=>y.preview),previewList:e.computed(()=>y.previewList)})}});exports.default=s,exports.faUploadImagesEmits=u,exports.faUploadImagesProps=d;
|
|
2
2
|
//# sourceMappingURL=uploadImages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadImages.js","sources":["../../../../../packages/components/uploadImages/src/uploadImages.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, reactive, ref } from \"vue\";\nimport { ElIcon, ElImageViewer, ElUpload, uploadProps } from \"element-plus\";\nimport { Delete, Edit, Plus, ZoomIn } from \"@element-plus/icons-vue\";\nimport { useUpload } from \"@fast-element-plus/components/upload/src/useUpload\";\nimport { FaMimeType } from \"@fast-element-plus/constants\";\nimport { definePropType, makeSlots, stringUtil, useExpose, useProps, useRender } from \"@fast-china/utils\";\nimport { isArray, isNull, isString } from \"lodash-unified\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile, uploadListTypes } from \"element-plus\";\n\nexport const faUploadImagesProps = {\n\t...uploadProps,\n\t/** @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true` */\n\taccept: {\n\t\ttype: String,\n\t\tdefault: (): string => FaMimeType.Image,\n\t},\n\t/** @description type of file list */\n\tlistType: {\n\t\ttype: definePropType<(typeof uploadListTypes)[number]>(String),\n\t\tdefault: \"picture-card\",\n\t},\n\t/** @description whether uploading multiple files is permitted */\n\tmultiple: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 9,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | string[]>([String, Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: [String, Number],\n\t\tdefault: 2048,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\nexport const faUploadImagesEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | string[]): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]): boolean => isArray(value),\n\t/** @description 改变 */\n\tchange: (value: string | string[]): boolean => isString(value) || isArray(value) || isNull(value),\n};\n\ntype FaUploadImagesSlots = {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n};\n\nexport default defineComponent({\n\tname: \"FaUploadImages\",\n\tprops: faUploadImagesProps,\n\temits: faUploadImagesEmits,\n\tslots: makeSlots<FaUploadImagesSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleValue,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t} = useUpload(\"FaUploadImages\", \"图片\", props, emit, {\n\t\t\tmaxSize: props.maxSize,\n\t\t\tuploadApi: props.uploadApi,\n\t\t\tuploadUrl: props.uploadUrl,\n\t\t});\n\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled || formContext?.disabled;\n\t\t});\n\n\t\tconst state = reactive({\n\t\t\tuploadKey: `fa-upload-images__${stringUtil.generateRandomString(8)}`,\n\t\t\tpreview: false,\n\t\t\tpreviewIndex: -1,\n\t\t\tpreviewList: [],\n\t\t});\n\n\t\tconst uploadRef = ref<UploadInstance>();\n\n\t\tconst handleEdit = (): void => {\n\t\t\tconst uploadInputEl = document.querySelector(`.${state.uploadKey} .el-upload__input`);\n\t\t\tuploadInputEl && uploadInputEl.dispatchEvent(new MouseEvent(\"click\"));\n\t\t};\n\n\t\tconst handlePreview = (uploadFile: UploadFile): void => {\n\t\t\tstate.previewIndex = fileList.value.findIndex((f) => f.url === uploadFile.url);\n\t\t\tstate.previewList = fileList.value.map((m) => m.url);\n\t\t\tstate.preview = true;\n\t\t};\n\n\t\tconst handleRemove = (index: number): void => {\n\t\t\tfileList.value.splice(index, 1);\n\t\t\thandleValue();\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (props.beforeUpload) {\n\t\t\t\treturn props.beforeUpload(rawFile);\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t<ElUpload\n\t\t\t\t\t{...elUploadProps.value}\n\t\t\t\t\tref={uploadRef}\n\t\t\t\t\tclass={[\"fa-upload-images\", state.uploadKey, { \"fa-upload-images__hidden-upload\": fileList.value.length >= props.limit }]}\n\t\t\t\t\tvLoading={loading.value}\n\t\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\t\tdisabled={disabled.value}\n\t\t\t\t\thttpRequest={handleHttpRequest}\n\t\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\t\tonError={handleOnError}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\tfileList.value.length < props.limit && slots.default ? (\n\t\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t<Plus />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\ttip: () => <div class=\"el-upload__tip\">files with a size less than {maxSizeMB.toString()}MB</div>,\n\t\t\t\t\t\tfile: ({ file, index }: { file: UploadFile; index: number }) => (\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<img class=\"el-upload-list__item-thumbnail\" src={file.url} />\n\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-actions\">\n\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-preview\" onClick={() => handlePreview(file)} title=\"查看\">\n\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t<ZoomIn />\n\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{!disabled.value && (\n\t\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handleEdit} title=\"编辑\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Edit />\n\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={() => handleRemove(index)} title=\"删除\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Delete />\n\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t}}\n\t\t\t\t</ElUpload>\n\t\t\t\t{state.preview && (\n\t\t\t\t\t<ElImageViewer\n\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\tteleported\n\t\t\t\t\t\tonClose={() => (state.preview = false)}\n\t\t\t\t\t\turlList={state.previewList}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Fragment>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 取消上传请求 */\n\t\t\tabort: computed(() => uploadRef.value?.abort),\n\t\t\t/** @description 手动上传文件列表 */\n\t\t\tsubmit: computed(() => uploadRef.value?.submit),\n\t\t\t/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */\n\t\t\tclearFiles: computed(() => uploadRef.value?.clearFiles),\n\t\t\t/** @description 手动选择文件 */\n\t\t\thandleStart: computed(() => uploadRef.value?.handleStart),\n\t\t\t/** @description 手动移除文件。 file 和 rawFile 已被合并。 rawFile 将在 v2.2.0 中移除 */\n\t\t\thandleRemove: computed(() => uploadRef.value?.handleRemove),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading,\n\t\t\t/** @description 文件集合 */\n\t\t\tfileList,\n\t\t\t/** @description 预览 */\n\t\t\tpreview: computed(() => state.preview),\n\t\t\t/** @description 预览集合 */\n\t\t\tpreviewList: computed(() => state.previewList),\n\t\t});\n\t},\n});\n"],"names":["faUploadImagesProps","uploadProps","accept","type","String","default","FaMimeType","Image","listType","definePropType","multiple","Boolean","limit","Number","modelValue","Array","maxSize","uploadApi","Function","uploadUrl","faUploadImagesEmits","value","isString","isArray","isNull","change","UploadImages","name","props","emits","slots","makeSlots","setup","attrs","emit","expose","fileList","loading","formContext","maxSizeMB","handleValue","handleHttpRequest","handleOnSuccess","handleOnError","handleOnExceed","handleOnUpload","useUpload","disabled","computed","state","reactive","uploadKey","stringUtil","generateRandomString","preview","previewIndex","previewList","uploadRef","ref","handleEdit","uploadInputEl","document","querySelector","dispatchEvent","MouseEvent","handleBeforeUpload","rawFile","beforeUpload","elUploadProps","useProps","useRender","_createVNode","_Fragment","_withDirectives","ElUpload","_mergeProps","class","length","$event","httpRequest","onExceed","onSuccess","onError","ElIcon","Plus","tip","_createTextVNode","toString","file","index","src","url","onClick","handlePreview","uploadFile","findIndex","f","map","m","title","ZoomIn","Edit","splice","handleRemove","Delete","_resolveDirective","ElImageViewer","closeOnPressEscape","hideOnClickModal","teleported","onClose","urlList","useExpose","abort","submit","clearFiles","handleStart"],"mappings":"6XASaA,EAAsB,IAC/BC,EAAAA,YAEHC,OAAQ,CACPC,KAAMC,OACNC,QAASA,IAAcC,EAAAA,WAAWC,OAGnCC,SAAU,CACTL,KAAMM,EAAAA,eAAiDL,QACvDC,QAAS,gBAGVK,SAAU,CACTP,KAAMQ,QACNN,SAAS,GAGVO,MAAO,CACNT,KAAMU,OACNR,QAAS,GAGVS,WAAYL,EAAAA,eAAkC,CAACL,OAAQW,QAEvDC,QAAS,CACRb,KAAM,CAACC,OAAQS,QACfR,QAAS,MAGVY,UAAW,CACVd,KAAMM,EAAAA,eAAwDS,WAG/DC,UAAWf,QAGCgB,EAAsB,CAElC,oBAAsBC,GAAsCC,EAAAA,SAASD,IAAUE,EAAAA,QAAQF,IAAUG,EAAAA,OAAOH,GAExG,kBAAoBA,GAAqCE,EAAAA,QAAQF,GAEjEI,OAASJ,GAAsCC,EAAAA,SAASD,IAAUE,EAAAA,QAAQF,IAAUG,EAAAA,OAAOH,IAQ5FK,oBAA+B,CAC9BC,KAAM,iBACNC,MAAO5B,EACP6B,MAAOT,EACPU,MAAOC,EAAAA,YACPC,KAAAA,CAAMJ,GAAOK,MAAEA,EAAAA,MAAOH,EAAAA,KAAOI,EAAAA,OAAMC,IAClC,MAAMC,SACLA,EAAAA,QACAC,EAAAA,YACAC,EAAAA,UACAC,EAAAA,YACAC,EAAAA,kBACAC,EAAAA,gBACAC,EAAAA,cACAC,EAAAA,eACAC,EAAAA,eACAC,GACGC,EAAAA,UAAU,iBAAkB,KAAMlB,EAAOM,EAAM,CAClDlB,QAASY,EAAMZ,QACfC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D,EAAMO,aAAW,SAMvBwD,EAAAA,UAAU7E,EAAQ,CAExB8E,MAAOjE,EAAAA,SAAS,IAAMS,EAAUpC,OAAO4F,OAEvCC,OAAQlE,EAAAA,SAAS,IAAMS,EAAUpC,OAAO6F,QAExCC,WAAYnE,EAAAA,SAAS,IAAMS,EAAUpC,OAAO8F,YAE5CC,YAAapE,EAAAA,SAAS,IAAMS,EAAUpC,OAAO+F,aAE7Cb,aAAcvD,EAAAA,SAAS,IAAMS,EAAUpC,OAAOkF,cAE9ClE,UAEAD,WAEAkB,QAASN,EAAAA,SAAS,IAAMC,EAAMK,SAE9BE,YAAaR,EAAAA,SAAS,IAAMC,EAAMO,cAEpC"}
|
|
1
|
+
{"version":3,"file":"uploadImages.js","sources":["../../../../../packages/components/uploadImages/src/uploadImages.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, reactive, ref } from \"vue\";\nimport { ElIcon, ElImageViewer, ElUpload, uploadProps } from \"element-plus\";\nimport { Delete, Edit, Plus, ZoomIn } from \"@element-plus/icons-vue\";\nimport { useUpload } from \"@fast-element-plus/components/upload/src/useUpload\";\nimport { FaMimeType } from \"@fast-element-plus/constants\";\nimport { definePropType, makeSlots, stringUtil, useExpose, useProps, useRender } from \"@fast-china/utils\";\nimport { isArray, isNull } from \"lodash-unified\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile, uploadListTypes } from \"element-plus\";\n\nexport const faUploadImagesProps = {\n\t...uploadProps,\n\t/** @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true` */\n\taccept: {\n\t\ttype: String,\n\t\tdefault: (): string => FaMimeType.Image,\n\t},\n\t/** @description type of file list */\n\tlistType: {\n\t\ttype: definePropType<(typeof uploadListTypes)[number]>(String),\n\t\tdefault: \"picture-card\",\n\t},\n\t/** @description whether uploading multiple files is permitted */\n\tmultiple: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 9,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string[]>([Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: [String, Number],\n\t\tdefault: 2048,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\nexport const faUploadImagesEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string[]): boolean => isArray(value) || isNull(value),\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]): boolean => isArray(value),\n\t/** @description 改变 */\n\tchange: (value: string[]): boolean => isArray(value) || isNull(value),\n};\n\ntype FaUploadImagesSlots = {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n};\n\nexport default defineComponent({\n\tname: \"FaUploadImages\",\n\tprops: faUploadImagesProps,\n\temits: faUploadImagesEmits,\n\tslots: makeSlots<FaUploadImagesSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleValue,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t} = useUpload<string[]>(\"FaUploadImages\", \"图片\", props, emit, {\n\t\t\tmaxSize: props.maxSize,\n\t\t\tuploadApi: props.uploadApi,\n\t\t\tuploadUrl: props.uploadUrl,\n\t\t});\n\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled || formContext?.disabled;\n\t\t});\n\n\t\tconst state = reactive({\n\t\t\tuploadKey: `fa-upload-images__${stringUtil.generateRandomString(8)}`,\n\t\t\tpreview: false,\n\t\t\tpreviewIndex: -1,\n\t\t\tpreviewList: [],\n\t\t});\n\n\t\tconst uploadRef = ref<UploadInstance>();\n\n\t\tconst handleEdit = (): void => {\n\t\t\tconst uploadInputEl = document.querySelector(`.${state.uploadKey} .el-upload__input`);\n\t\t\tuploadInputEl && uploadInputEl.dispatchEvent(new MouseEvent(\"click\"));\n\t\t};\n\n\t\tconst handlePreview = (uploadFile: UploadFile): void => {\n\t\t\tstate.previewIndex = fileList.value.findIndex((f) => f.url === uploadFile.url);\n\t\t\tstate.previewList = fileList.value.map((m) => m.url);\n\t\t\tstate.preview = true;\n\t\t};\n\n\t\tconst handleRemove = (index: number): void => {\n\t\t\tfileList.value.splice(index, 1);\n\t\t\thandleValue();\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (props.beforeUpload) {\n\t\t\t\treturn props.beforeUpload(rawFile);\n\t\t\t}\n\t\t\treturn true;\n\t\t};\n\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t<ElUpload\n\t\t\t\t\t{...elUploadProps.value}\n\t\t\t\t\tref={uploadRef}\n\t\t\t\t\tclass={[\"fa-upload-images\", state.uploadKey, { \"fa-upload-images__hidden-upload\": fileList.value.length >= props.limit }]}\n\t\t\t\t\tvLoading={loading.value}\n\t\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\t\tdisabled={disabled.value}\n\t\t\t\t\thttpRequest={handleHttpRequest}\n\t\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\t\tonError={handleOnError}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\tfileList.value.length < props.limit && slots.default ? (\n\t\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t<Plus />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\ttip: () => <div class=\"el-upload__tip\">files with a size less than {maxSizeMB.toString()}MB</div>,\n\t\t\t\t\t\tfile: ({ file, index }: { file: UploadFile; index: number }) => (\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<img class=\"el-upload-list__item-thumbnail\" src={file.url} />\n\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-actions\">\n\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-preview\" onClick={() => handlePreview(file)} title=\"查看\">\n\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t<ZoomIn />\n\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{!disabled.value && (\n\t\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handleEdit} title=\"编辑\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Edit />\n\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={() => handleRemove(index)} title=\"删除\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Delete />\n\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t}}\n\t\t\t\t</ElUpload>\n\t\t\t\t{state.preview && (\n\t\t\t\t\t<ElImageViewer\n\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\tteleported\n\t\t\t\t\t\tonClose={() => (state.preview = false)}\n\t\t\t\t\t\turlList={state.previewList}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Fragment>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 取消上传请求 */\n\t\t\tabort: computed(() => uploadRef.value?.abort),\n\t\t\t/** @description 手动上传文件列表 */\n\t\t\tsubmit: computed(() => uploadRef.value?.submit),\n\t\t\t/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */\n\t\t\tclearFiles: computed(() => uploadRef.value?.clearFiles),\n\t\t\t/** @description 手动选择文件 */\n\t\t\thandleStart: computed(() => uploadRef.value?.handleStart),\n\t\t\t/** @description 手动移除文件。 file 和 rawFile 已被合并。 rawFile 将在 v2.2.0 中移除 */\n\t\t\thandleRemove: computed(() => uploadRef.value?.handleRemove),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading,\n\t\t\t/** @description 文件集合 */\n\t\t\tfileList,\n\t\t\t/** @description 预览 */\n\t\t\tpreview: computed(() => state.preview),\n\t\t\t/** @description 预览集合 */\n\t\t\tpreviewList: computed(() => state.previewList),\n\t\t});\n\t},\n});\n"],"names":["faUploadImagesProps","uploadProps","accept","type","String","default","FaMimeType","Image","listType","definePropType","multiple","Boolean","limit","Number","modelValue","Array","maxSize","uploadApi","Function","uploadUrl","faUploadImagesEmits","isArray","value","isNull","change","UploadImages","name","props","emits","slots","makeSlots","setup","attrs","emit","expose","fileList","loading","formContext","maxSizeMB","handleValue","handleHttpRequest","handleOnSuccess","handleOnError","handleOnExceed","handleOnUpload","useUpload","disabled","computed","state","reactive","uploadKey","stringUtil","generateRandomString","preview","previewIndex","previewList","uploadRef","ref","handleEdit","uploadInputEl","document","querySelector","dispatchEvent","MouseEvent","handleBeforeUpload","rawFile","beforeUpload","elUploadProps","useProps","useRender","_createVNode","_Fragment","_withDirectives","ElUpload","_mergeProps","class","length","$event","httpRequest","onExceed","onSuccess","onError","ElIcon","Plus","tip","_createTextVNode","toString","file","index","src","url","onClick","handlePreview","uploadFile","findIndex","f","map","m","title","ZoomIn","Edit","splice","handleRemove","Delete","_resolveDirective","ElImageViewer","closeOnPressEscape","hideOnClickModal","teleported","onClose","urlList","useExpose","abort","submit","clearFiles","handleStart"],"mappings":"6XASaA,EAAsB,IAC/BC,EAAAA,YAEHC,OAAQ,CACPC,KAAMC,OACNC,QAASA,IAAcC,EAAAA,WAAWC,OAGnCC,SAAU,CACTL,KAAMM,EAAAA,eAAiDL,QACvDC,QAAS,gBAGVK,SAAU,CACTP,KAAMQ,QACNN,SAAS,GAGVO,MAAO,CACNT,KAAMU,OACNR,QAAS,GAGVS,WAAYL,EAAAA,eAAyB,CAACM,QAEtCC,QAAS,CACRb,KAAM,CAACC,OAAQS,QACfR,QAAS,MAGVY,UAAW,CACVd,KAAMM,EAAAA,eAAwDS,WAG/DC,UAAWf,QAGCgB,EAAsB,CAElC,uBAAmDC,EAAAA,QAAQC,IAAUC,EAAAA,OAAOD,GAE5E,kBAAoBA,GAAqCD,EAAAA,QAAQC,GAEjEE,UAAsCH,EAAAA,QAAQC,IAAUC,EAAAA,OAAOD,IAQhEG,oBAA+B,CAC9BC,KAAM,iBACNC,MAAO3B,EACP4B,MAAOR,EACPS,MAAOC,EAAAA,YACPC,KAAAA,CAAMJ,GAAOK,MAAEA,EAAAA,MAAOH,EAAAA,KAAOI,EAAAA,OAAMC,IAClC,MAAMC,SACLA,EAAAA,QACAC,EAAAA,YACAC,EAAAA,UACAC,EAAAA,YACAC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B0B,EAAMK,SAAOiB,EAAAA,YAAAmC,EAAAA,cAAA,CAAAC,oBAAA,EAAAC,kBAAA,EAAAC,YAAA,EAAAC,QAKHA,IAAO7D,EAAMK,SAAU,EAAMyD,QAC7B9D,EAAMO,aAAW,SAMvBwD,EAAAA,UAAU7E,EAAQ,CAExB8E,MAAOjE,EAAAA,SAAS,IAAMS,EAAUlC,OAAO0F,OAEvCC,OAAQlE,EAAAA,SAAS,IAAMS,EAAUlC,OAAO2F,QAExCC,WAAYnE,EAAAA,SAAS,IAAMS,EAAUlC,OAAO4F,YAE5CC,YAAapE,EAAAA,SAAS,IAAMS,EAAUlC,OAAO6F,aAE7Cb,aAAcvD,EAAAA,SAAS,IAAMS,EAAUlC,OAAOgF,cAE9ClE,UAEAD,WAEAkB,QAASN,EAAAA,SAAS,IAAMC,EAAMK,SAE9BE,YAAaR,EAAAA,SAAS,IAAMC,EAAMO,cAEpC"}
|
package/lib/constants/regex.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.RegExps={UUID:/^[0-9a-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.RegExps={UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Mobile:/^(?:(?:\+|00)86)?1\d{10}$/,Phone:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,Email:/^[\w-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/,IdCard:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$)|(^[1-9]\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9X]$)/i,External:/^(https?:|mailto:|tel:|ftp:)/,Url:/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d?)(\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:\d+)*(\/($|[\w.,?'\\+&%$#=~-]+))*$/,CarNumber:/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/,NewEnergyCarNumber:/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z]((\d{5}[DF]$)|([A-E][A-HJ-NP-Z0-9]\d{3}[0-9挂学警港澳]$)|([FGHJK][A-HJ-NP-Z0-9]\d{3}[0-9挂学警港澳]$))/,PostCode:/^[1-9]\d{5}$/,Ipv4:/^([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])$/,Passport:/^[EG]\d{8}$/i,HKMacauPass:/^[HM]\d{8}$/i,Account:/^[a-z][a-z\d]{5,19}$/i,Password:/^[A-Z0-9]{6,18}$/i,StrongPassword:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[\s\S]{8,20}$/,Chinese:/^[\u4E00-\u9FA5]+$/,English:/^[a-z]+$/i};
|
|
2
2
|
//# sourceMappingURL=regex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sources":["../../../packages/constants/regex.ts"],"sourcesContent":["/**\n * @description 正则表达式\n */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-
|
|
1
|
+
{"version":3,"file":"regex.js","sources":["../../../packages/constants/regex.ts"],"sourcesContent":["/**\n * @description 正则表达式\n */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,\n\t/**\n\t * 手机号\n\t */\n\tMobile: /^(?:(?:\\+|00)86)?1\\d{10}$/,\n\t/**\n\t * 电话\n\t */\n\tPhone: /^(?:(?:\\d{3}-)?\\d{8}|(?:\\d{4}-)?\\d{7,8})(?:-\\d+)?$/,\n\t/**\n\t * 邮箱\n\t */\n\tEmail: /^[\\w-]+@([a-zA-Z0-9]+\\.)+(com|cn|net|org)$/,\n\t/**\n\t * 身份证\n\t */\n\tIdCard: /(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9X]$)/i,\n\t/**\n\t * 外部链接\n\t * 匹配http、https、mailto、tel和ftp开头的链接\n\t */\n\tExternal: /^(https?:|mailto:|tel:|ftp:)/,\n\t/**\n\t * Url\n\t */\n\tUrl: /^(https?|ftp):\\/\\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d?)(\\.(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){3}|([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:\\d+)*(\\/($|[\\w.,?'\\\\+&%$#=~-]+))*$/,\n\t/**\n\t * 车牌号\n\t */\n\tCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/,\n\t/**\n\t * 新能源车牌号\n\t */\n\tNewEnergyCarNumber:\n\t\t/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领][A-HJ-Z]((\\d{5}[DF]$)|([A-E][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$)|([FGHJK][A-HJ-NP-Z0-9]\\d{3}[0-9挂学警港澳]$))/,\n\t/**\n\t * 邮政编码\n\t */\n\tPostCode: /^[1-9]\\d{5}$/,\n\t/**\n\t * ipv4\n\t */\n\tIpv4: /^([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])$/,\n\t/**\n\t * 护照\n\t */\n\tPassport: /^[EG]\\d{8}$/i,\n\t/**\n\t * 港澳通行证\n\t */\n\tHKMacauPass: /^[HM]\\d{8}$/i,\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\tAccount: /^[a-z][a-z\\d]{5,19}$/i,\n\t/**\n\t * 弱密码(只包含字母和数字,长度为6到18位)\n\t */\n\tPassword: /^[A-Z0-9]{6,18}$/i,\n\t/**\n\t * 强密码(8到20位,包含大小写字母、数字及特殊字符)\n\t */\n\tStrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_])[\\s\\S]{8,20}$/,\n\t/**\n\t * 中文字符\n\t */\n\tChinese: /^[\\u4E00-\\u9FA5]+$/,\n\t/**\n\t * 英文字符\n\t */\n\tEnglish: /^[a-z]+$/i,\n};\n"],"names":["UUID","Mobile","Phone","Email","IdCard","External","Url","CarNumber","NewEnergyCarNumber","PostCode","Ipv4","Passport","HKMacauPass","Account","Password","StrongPassword","Chinese","English"],"mappings":"gGAGuB,CAItBA,KAAM,kEAINC,OAAQ,4BAIRC,MAAO,qDAIPC,MAAO,6CAIPC,OAAQ,0KAKRC,SAAU,+BAIVC,IAAK,gSAILC,UAAW,qFAIXC,mBACC,4IAIDC,SAAU,eAIVC,KAAM,uIAINC,SAAU,eAIVC,YAAa,eAIbC,QAAS,wBAITC,SAAU,oBAIVC,eAAgB,0DAIhBC,QAAS,qBAITC,QAAS"}
|
package/lib/directive.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
declare const _default: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>[];
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vCopy: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vCopy: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vCopy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vDebounce: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vDebounce: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vDebounce;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vDraggable: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vDraggable: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vDraggable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vIconCopy: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vIconCopy: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vIconCopy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vLongpress: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vLongpress: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vLongpress;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const vThrottle: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string,
|
|
1
|
+
export declare const vThrottle: import('@fast-china/utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, any>>;
|
|
2
2
|
export default vThrottle;
|
package/lib/element-plus.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("element-plus"),t=require("@element-plus/icons-vue");require("./hooks/index.js");const o=require("@fast-china/utils"),l=require("lodash-unified"),n=require("./hooks/use-overlay/index.js");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const s=a(t);e.ElDialog.props={...e.ElDialog.props,draggable:{type:Boolean,default:!0}},e.ElForm.props={...e.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelSuffix:{type:String,default:":"},scrollToError:{type:Boolean,default:!0}},e.ElInput.props={...e.ElInput.props,showWordLimit:{type:Boolean,default:!0}},e.ElInputNumber.props={...e.ElInputNumber.props,controls:{type:Boolean,default:!1}},e.ElSelect.props={...e.ElSelect.props,loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0}},e.ElTable.props={...e.ElTable.props,border:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!0},rowKey:{type:[String,Function],default:"id"}},e.ElTree.props={...e.ElTree.props,defaultExpandAll:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!0},highlightCurrent:{type:Boolean,default:!0}},e.ElTreeSelect.props={...e.ElTreeSelect.props,loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},defaultExpandAll:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!0},highlightCurrent:{type:Boolean,default:!0},expandOnClickNode:Boolean};const r=(t,a,s,r)=>{if(s=s??{},s?.title||(s.title="温馨提示"),l.isNil(s?.draggable)&&(s.draggable=!0),s?.cancelButtonText||(s.cancelButtonText="取消"),s?.confirmButtonText||(s.confirmButtonText="确定"),l.isNil(s?.closeOnClickModal)&&(s.closeOnClickModal=!1),l.isNil(s?.closeOnPressEscape)&&(s.closeOnPressEscape=!1)
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("element-plus"),t=require("@element-plus/icons-vue");require("./hooks/index.js");const o=require("@fast-china/utils"),l=require("lodash-unified"),n=require("./hooks/use-overlay/index.js");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const s=a(t);e.ElDialog.props={...e.ElDialog.props,draggable:{type:Boolean,default:!0}},e.ElForm.props={...e.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelSuffix:{type:String,default:":"},scrollToError:{type:Boolean,default:!0}},e.ElInput.props={...e.ElInput.props,showWordLimit:{type:Boolean,default:!0}},e.ElInputNumber.props={...e.ElInputNumber.props,controls:{type:Boolean,default:!1}},e.ElSelect.props={...e.ElSelect.props,loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0}},e.ElTable.props={...e.ElTable.props,border:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!0},rowKey:{type:[String,Function],default:"id"}},e.ElTree.props={...e.ElTree.props,defaultExpandAll:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!0},highlightCurrent:{type:Boolean,default:!0}},e.ElTreeSelect.props={...e.ElTreeSelect.props,loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},defaultExpandAll:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!0},highlightCurrent:{type:Boolean,default:!0},expandOnClickNode:Boolean};const r=(t,a,s,r)=>{if(s=s??{},s?.title||(s.title="温馨提示"),l.isNil(s?.draggable)&&(s.draggable=!0),s?.cancelButtonText||(s.cancelButtonText="取消"),s?.confirmButtonText||(s.confirmButtonText="确定"),l.isNil(s?.closeOnClickModal)&&(s.closeOnClickModal=!1),l.isNil(s?.closeOnPressEscape)&&(s.closeOnPressEscape=!1),!l.isNil(s?.beforeClose)){const e=s.beforeClose,t=s?.confirmButtonText,l=s?.showCancelButton;s.beforeClose=(a,s,r)=>{if("confirm"===a){n.useOverlay.show(0),s.confirmButtonLoading=!0,s.showCancelButton=!1,s.confirmButtonText="加载中...";const i=()=>{s.confirmButtonLoading=!1,s.showCancelButton=l,s.confirmButtonText=t,n.useOverlay.hide()},c=()=>{i(),r()};o.execFunction(e,a,s,c).then(()=>{c()}).catch(e=>{throw o.consoleError("MessageBox",e),i(),e})}else r()}}switch(t){case"alert":break;case"confirm":l.isNil(s?.showCancelButton)&&(s.showCancelButton=!0);break;case"prompt":null==s?.showCancelButton&&(s.showCancelButton=!0)}return e.ElMessageBox(Object.assign({message:a},s,{boxType:t}))},i={closeOnPressEscape:!1,closeOnClickModal:!1},c={showCancelButton:!0},p={showCancelButton:!0,showInput:!0};e.ElMessageBox.alert=(e,t,o,n)=>l.isString(t)?r("alert",e,Object.assign({title:t,...i},o)):r("alert",e,Object.assign(t,i,o)),e.ElMessageBox.prompt=(e,t,o,n)=>l.isString(t)?r("prompt",e,Object.assign({title:t,...p},o)):r("prompt",e,Object.assign(t,p,o)),e.ElMessageBox.confirm=(e,t,o,n)=>l.isString(t)?r("confirm",e,Object.assign({title:t,...c},o)):r("confirm",e,Object.assign(t,c,o));exports.installElementPlus=t=>{for(const[e,o]of Object.entries(s))t.component(`el-icon-${e}`,o);t.use(e)};
|
|
2
2
|
//# sourceMappingURL=element-plus.js.map
|
package/lib/element-plus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-plus.js","sources":["../../packages/element-plus.ts"],"sourcesContent":["/** Element Plus 组件全局配置 */\n\nimport ElementPlus, { ElDialog, ElForm, ElInput, ElInputNumber, ElMessageBox, ElSelect, ElTable, ElTree, ElTreeSelect } from \"element-plus\";\nimport * as ElementPlusIconsVue from \"@element-plus/icons-vue\";\nimport { useOverlay } from \"@fast-element-plus/hooks\";\nimport { consoleError, execFunction } from \"@fast-china/utils\";\nimport { isNil, isString } from \"lodash-unified\";\nimport type { Action, ElMessageBoxOptions, MessageBoxData, MessageBoxState, TableProps } from \"element-plus\";\nimport type { App, AppContext, PropType } from \"vue\";\n\nElDialog.props = {\n\t...ElDialog.props,\n\t/**\n\t * 默认拖拽\n\t * @description enable dragging feature for Dialog\n\t */\n\tdraggable: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElForm.props = {\n\t...ElForm.props,\n\t/** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */\n\tlabelWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"auto\",\n\t},\n\t/** @description Suffix of the label. */\n\tlabelSuffix: {\n\t\ttype: String,\n\t\tdefault: \":\",\n\t},\n\t/** @description When validation fails, scroll to the first error form entry. */\n\tscrollToError: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElInput.props = {\n\t...ElInput.props,\n\t/**\n\t * 默认显示统计字数\n\t * @description word count\n\t */\n\tshowWordLimit: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElInputNumber.props = {\n\t...ElInputNumber.props,\n\t/**\n\t * 默认不使用控制按钮\n\t * @description whether to enable the control buttons\n\t */\n\tcontrols: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n};\n\nElSelect.props = {\n\t...ElSelect.props,\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/**\n\t * 默认按文字形式展示\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认显示所有选中的标签\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElTable.props = {\n\t...ElTable.props,\n\t/**\n\t * 默认显示边框\n\t * @description whether Table has vertical border\n\t */\n\tborder: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮当前行\n\t * @description whether current row is highlighted\n\t */\n\thighlightCurrentRow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认行Key为 \"id\"\n\t * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n\t */\n\trowKey: {\n\t\ttype: [String, Function] as PropType<TableProps<any>[\"rowKey\"]>,\n\t\tdefault: \"id\",\n\t},\n};\n\nElTree.props = {\n\t...ElTree.props,\n\t/**\n\t * 默认展开所有节点\n\t * @description 是否默认展开所有节点\n\t */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击时选中节点\n\t * @description 是否在点击节点的时候选中节点\n\t */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮选中节点\n\t * @description 是否高亮当前选中节点\n\t */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElTreeSelect.props = {\n\t...ElTreeSelect.props,\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/**\n\t * 默认按文字形式展示\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认显示所有选中的标签\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认展开所有节点\n\t * @description 是否默认展开所有节点\n\t */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击时选中节点\n\t * @description 是否在点击节点的时候选中节点\n\t */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮选中节点\n\t * @description 是否高亮当前选中节点\n\t */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击节点不展开或收缩节点\n\t * @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。\n\t */\n\texpandOnClickNode: Boolean,\n};\n\n// ElMessageBox 默认配置\nconst elMessageBox = (\n\ttype: \"alert\" | \"confirm\" | \"prompt\",\n\tmessage: ElMessageBoxOptions[\"message\"],\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> => {\n\toptions = options ?? {};\n\tif (!options?.title) {\n\t\t// 默认提示\n\t\toptions.title = \"温馨提示\";\n\t}\n\tif (isNil(options?.draggable)) {\n\t\t// 默认拖拽\n\t\toptions.draggable = true;\n\t}\n\tif (!options?.cancelButtonText) {\n\t\t// 默认 取消按钮的文本内容\n\t\toptions.cancelButtonText = \"取消\";\n\t}\n\tif (!options?.confirmButtonText) {\n\t\t// 默认 确定按钮的文本内容\n\t\toptions.confirmButtonText = \"确定\";\n\t}\n\tif (isNil(options?.closeOnClickModal)) {\n\t\t// 默认 是否可通过点击遮罩层关闭 MessageBox\n\t\toptions.closeOnClickModal = false;\n\t}\n\tif (isNil(options?.closeOnPressEscape)) {\n\t\t// 默认 是否可通过按下 ESC 键关闭 MessageBox\n\t\toptions.closeOnPressEscape = false;\n\t}\n\n\t// 关闭之前的判断逻辑\n\tif (isNil(options?.beforeClose)) {\n\t\tconst localBeforeClose = options.beforeClose;\n\t\tconst localConfirmButtonText = options?.confirmButtonText;\n\t\tconst localShowCancelButton = options?.showCancelButton;\n\t\toptions.beforeClose = (action: Action, instance: MessageBoxState, done: () => void): void => {\n\t\t\tif (action === \"confirm\") {\n\t\t\t\tuseOverlay.show(0);\n\t\t\t\tinstance.confirmButtonLoading = true;\n\t\t\t\tinstance.showCancelButton = false;\n\t\t\t\tinstance.confirmButtonText = \"加载中...\";\n\n\t\t\t\tconst cancelLoading = (): void => {\n\t\t\t\t\tinstance.confirmButtonLoading = false;\n\t\t\t\t\tinstance.showCancelButton = localShowCancelButton;\n\t\t\t\t\tinstance.confirmButtonText = localConfirmButtonText;\n\t\t\t\t\tuseOverlay.hide();\n\t\t\t\t};\n\n\t\t\t\tconst newDone = (): void => {\n\t\t\t\t\tcancelLoading();\n\t\t\t\t\tdone();\n\t\t\t\t};\n\n\t\t\t\texecFunction(localBeforeClose, action, instance, newDone)\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tnewDone();\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tconsoleError(\"MessageBox\", error);\n\t\t\t\t\t\tcancelLoading();\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdone();\n\t\t\t}\n\t\t};\n\t}\n\n\t// 根据类型有一些判断\n\tswitch (type) {\n\t\tcase \"alert\":\n\t\t\tbreak;\n\t\tcase \"confirm\":\n\t\t\tif (isNil(options?.showCancelButton)) {\n\t\t\t\toptions.showCancelButton = true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"prompt\":\n\t\t\tif (options?.showCancelButton == undefined) {\n\t\t\t\toptions.showCancelButton = true;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn ElMessageBox(\n\t\tObject.assign(\n\t\t\t{\n\t\t\t\tmessage,\n\t\t\t},\n\t\t\toptions,\n\t\t\t{\n\t\t\t\tboxType: type,\n\t\t\t}\n\t\t)\n\t);\n};\n\ntype MESSAGE_BOX_TYPE = \"alert\" | \"confirm\" | \"prompt\";\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<MESSAGE_BOX_TYPE, Partial<ElMessageBoxOptions>> = {\n\talert: { closeOnPressEscape: false, closeOnClickModal: false },\n\tconfirm: { showCancelButton: true },\n\tprompt: { showCancelButton: true, showInput: true },\n};\n\nElMessageBox.alert = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"alert\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"alert\"] }, options), appContext)\n\t\t: elMessageBox(\"alert\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"alert\"], options), options as AppContext);\n\nElMessageBox.prompt = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"prompt\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"prompt\"] }, options), appContext)\n\t\t: elMessageBox(\"prompt\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"prompt\"], options), options as AppContext);\n\nElMessageBox.confirm = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: AppContext | ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"confirm\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"confirm\"] }, options), appContext)\n\t\t: elMessageBox(\"confirm\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"confirm\"], options), options as AppContext);\n\nexport const installElementPlus = (app: App): void => {\n\t/** 注册所有 Element Plus Icon */\n\tfor (const [key, component] of Object.entries(ElementPlusIconsVue)) {\n\t\t// 这里是给 FaIcon 使用的\n\t\tapp.component(`el-icon-${key}`, component);\n\t}\n\n\t/** Element Plus 组件完整引入 */\n\tapp.use(ElementPlus);\n};\n"],"names":["ElDialog","props","draggable","type","Boolean","default","ElForm","labelWidth","String","Number","labelSuffix","scrollToError","ElInput","showWordLimit","ElInputNumber","controls","ElSelect","loadingText","noMatchText","noDataText","collapseTags","collapseTagsTooltip","ElTable","border","highlightCurrentRow","rowKey","Function","ElTree","defaultExpandAll","checkOnClickNode","highlightCurrent","ElTreeSelect","expandOnClickNode","elMessageBox","message","options","appContext","title","isNil","cancelButtonText","confirmButtonText","closeOnClickModal","closeOnPressEscape","beforeClose","localBeforeClose","localConfirmButtonText","localShowCancelButton","showCancelButton","action","instance","done","useOverlay","show","confirmButtonLoading","cancelLoading","hide","newDone","execFunction","then","catch","error","consoleError","ElMessageBox","Object","assign","boxType","MESSAGE_BOX_DEFAULT_OPTS","showInput","alert","titleOrOptions","isString","prompt","confirm","app","key","component","entries","ElementPlusIconsVue","use","ElementPlus"],"mappings":"ojBAUAA,EAAAA,SAASC,MAAQ,IACbD,EAAAA,SAASC,MAKZC,UAAW,CACVC,KAAMC,QACNC,SAAS,IAIXC,EAAAA,OAAOL,MAAQ,IACXK,EAAAA,OAAOL,MAEVM,WAAY,CACXJ,KAAM,CAACK,OAAQC,QACfJ,QAAS,QAGVK,YAAa,CACZP,KAAMK,OACNH,QAAS,KAGVM,cAAe,CACdR,KAAMC,QACNC,SAAS,IAIXO,EAAAA,QAAQX,MAAQ,IACZW,EAAAA,QAAQX,MAKXY,cAAe,CACdV,KAAMC,QACNC,SAAS,IAIXS,EAAAA,cAAcb,MAAQ,IAClBa,EAAAA,cAAcb,MAKjBc,SAAU,CACTZ,KAAMC,QACNC,SAAS,IAIXW,EAAAA,SAASf,MA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Aa,QAASC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAmC/B,IAEpG2B,EAAAA,aAAaS,OAAS,CACrBrC,EACAmC,EACAlC,EACAC,IAEAkC,WAASD,GACNpC,EAAa,SAAUC,EAAS6B,OAAOC,OAAO,CAAE3B,MAAOgC,KAAmBH,GAAsC/B,IAChHF,EAAa,SAAUC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAoC/B,IAEtG2B,EAAAA,aAAaU,QAAU,CACtBtC,EACAmC,EACAlC,EACAC,IAEAkC,WAASD,GACNpC,EAAa,UAAWC,EAAS6B,OAAOC,OAAO,CAAE3B,MAAOgC,KAAmBH,GAAuC/B,IAClHF,EAAa,UAAWC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAqC/B,+BAErEsC,IAElC,IAAA,MAAYC,EAAKC,KAAcZ,OAAOa,QAAQC,GAE7CJ,EAAIE,UAAU,WAAWD,IAAOC,GAIjCF,EAAIK,IAAIC"}
|
|
1
|
+
{"version":3,"file":"element-plus.js","sources":["../../packages/element-plus.ts"],"sourcesContent":["/** Element Plus 组件全局配置 */\n\nimport ElementPlus, { ElDialog, ElForm, ElInput, ElInputNumber, ElMessageBox, ElSelect, ElTable, ElTree, ElTreeSelect } from \"element-plus\";\nimport * as ElementPlusIconsVue from \"@element-plus/icons-vue\";\nimport { useOverlay } from \"@fast-element-plus/hooks\";\nimport { consoleError, execFunction } from \"@fast-china/utils\";\nimport { isNil, isString } from \"lodash-unified\";\nimport type { Action, ElMessageBoxOptions, MessageBoxData, MessageBoxState, TableProps } from \"element-plus\";\nimport type { App, AppContext, PropType } from \"vue\";\n\nElDialog.props = {\n\t...ElDialog.props,\n\t/**\n\t * 默认拖拽\n\t * @description enable dragging feature for Dialog\n\t */\n\tdraggable: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElForm.props = {\n\t...ElForm.props,\n\t/** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */\n\tlabelWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"auto\",\n\t},\n\t/** @description Suffix of the label. */\n\tlabelSuffix: {\n\t\ttype: String,\n\t\tdefault: \":\",\n\t},\n\t/** @description When validation fails, scroll to the first error form entry. */\n\tscrollToError: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElInput.props = {\n\t...ElInput.props,\n\t/**\n\t * 默认显示统计字数\n\t * @description word count\n\t */\n\tshowWordLimit: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElInputNumber.props = {\n\t...ElInputNumber.props,\n\t/**\n\t * 默认不使用控制按钮\n\t * @description whether to enable the control buttons\n\t */\n\tcontrols: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n};\n\nElSelect.props = {\n\t...ElSelect.props,\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/**\n\t * 默认按文字形式展示\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认显示所有选中的标签\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElTable.props = {\n\t...ElTable.props,\n\t/**\n\t * 默认显示边框\n\t * @description whether Table has vertical border\n\t */\n\tborder: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮当前行\n\t * @description whether current row is highlighted\n\t */\n\thighlightCurrentRow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认行Key为 \"id\"\n\t * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n\t */\n\trowKey: {\n\t\ttype: [String, Function] as PropType<TableProps<any>[\"rowKey\"]>,\n\t\tdefault: \"id\",\n\t},\n};\n\nElTree.props = {\n\t...ElTree.props,\n\t/**\n\t * 默认展开所有节点\n\t * @description 是否默认展开所有节点\n\t */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击时选中节点\n\t * @description 是否在点击节点的时候选中节点\n\t */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮选中节点\n\t * @description 是否高亮当前选中节点\n\t */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\nElTreeSelect.props = {\n\t...ElTreeSelect.props,\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/**\n\t * 默认按文字形式展示\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认显示所有选中的标签\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认展开所有节点\n\t * @description 是否默认展开所有节点\n\t */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击时选中节点\n\t * @description 是否在点击节点的时候选中节点\n\t */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认高亮选中节点\n\t * @description 是否高亮当前选中节点\n\t */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 默认点击节点不展开或收缩节点\n\t * @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。\n\t */\n\texpandOnClickNode: Boolean,\n};\n\n// ElMessageBox 默认配置\nconst elMessageBox = (\n\ttype: \"alert\" | \"confirm\" | \"prompt\",\n\tmessage: ElMessageBoxOptions[\"message\"],\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> => {\n\toptions = options ?? {};\n\tif (!options?.title) {\n\t\t// 默认提示\n\t\toptions.title = \"温馨提示\";\n\t}\n\tif (isNil(options?.draggable)) {\n\t\t// 默认拖拽\n\t\toptions.draggable = true;\n\t}\n\tif (!options?.cancelButtonText) {\n\t\t// 默认 取消按钮的文本内容\n\t\toptions.cancelButtonText = \"取消\";\n\t}\n\tif (!options?.confirmButtonText) {\n\t\t// 默认 确定按钮的文本内容\n\t\toptions.confirmButtonText = \"确定\";\n\t}\n\tif (isNil(options?.closeOnClickModal)) {\n\t\t// 默认 是否可通过点击遮罩层关闭 MessageBox\n\t\toptions.closeOnClickModal = false;\n\t}\n\tif (isNil(options?.closeOnPressEscape)) {\n\t\t// 默认 是否可通过按下 ESC 键关闭 MessageBox\n\t\toptions.closeOnPressEscape = false;\n\t}\n\n\t// 关闭之前的判断逻辑\n\tif (!isNil(options?.beforeClose)) {\n\t\tconst localBeforeClose = options.beforeClose;\n\t\tconst localConfirmButtonText = options?.confirmButtonText;\n\t\tconst localShowCancelButton = options?.showCancelButton;\n\t\toptions.beforeClose = (action: Action, instance: MessageBoxState, done: () => void): void => {\n\t\t\tif (action === \"confirm\") {\n\t\t\t\tuseOverlay.show(0);\n\t\t\t\tinstance.confirmButtonLoading = true;\n\t\t\t\tinstance.showCancelButton = false;\n\t\t\t\tinstance.confirmButtonText = \"加载中...\";\n\n\t\t\t\tconst cancelLoading = (): void => {\n\t\t\t\t\tinstance.confirmButtonLoading = false;\n\t\t\t\t\tinstance.showCancelButton = localShowCancelButton;\n\t\t\t\t\tinstance.confirmButtonText = localConfirmButtonText;\n\t\t\t\t\tuseOverlay.hide();\n\t\t\t\t};\n\n\t\t\t\tconst newDone = (): void => {\n\t\t\t\t\tcancelLoading();\n\t\t\t\t\tdone();\n\t\t\t\t};\n\n\t\t\t\texecFunction(localBeforeClose, action, instance, newDone)\n\t\t\t\t\t.then(() => {\n\t\t\t\t\t\tnewDone();\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tconsoleError(\"MessageBox\", error);\n\t\t\t\t\t\tcancelLoading();\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdone();\n\t\t\t}\n\t\t};\n\t}\n\n\t// 根据类型有一些判断\n\tswitch (type) {\n\t\tcase \"alert\":\n\t\t\tbreak;\n\t\tcase \"confirm\":\n\t\t\tif (isNil(options?.showCancelButton)) {\n\t\t\t\toptions.showCancelButton = true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"prompt\":\n\t\t\tif (options?.showCancelButton == undefined) {\n\t\t\t\toptions.showCancelButton = true;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn ElMessageBox(\n\t\tObject.assign(\n\t\t\t{\n\t\t\t\tmessage,\n\t\t\t},\n\t\t\toptions,\n\t\t\t{\n\t\t\t\tboxType: type,\n\t\t\t}\n\t\t)\n\t);\n};\n\ntype MESSAGE_BOX_TYPE = \"alert\" | \"confirm\" | \"prompt\";\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<MESSAGE_BOX_TYPE, Partial<ElMessageBoxOptions>> = {\n\talert: { closeOnPressEscape: false, closeOnClickModal: false },\n\tconfirm: { showCancelButton: true },\n\tprompt: { showCancelButton: true, showInput: true },\n};\n\nElMessageBox.alert = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"alert\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"alert\"] }, options), appContext)\n\t\t: elMessageBox(\"alert\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"alert\"], options), options as AppContext);\n\nElMessageBox.prompt = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"prompt\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"prompt\"] }, options), appContext)\n\t\t: elMessageBox(\"prompt\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"prompt\"], options), options as AppContext);\n\nElMessageBox.confirm = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\ttitleOrOptions?: string | ElMessageBoxOptions,\n\toptions?: AppContext | ElMessageBoxOptions,\n\tappContext?: AppContext | null\n): Promise<MessageBoxData> =>\n\tisString(titleOrOptions)\n\t\t? elMessageBox(\"confirm\", message, Object.assign({ title: titleOrOptions, ...MESSAGE_BOX_DEFAULT_OPTS[\"confirm\"] }, options), appContext)\n\t\t: elMessageBox(\"confirm\", message, Object.assign(titleOrOptions, MESSAGE_BOX_DEFAULT_OPTS[\"confirm\"], options), options as AppContext);\n\nexport const installElementPlus = (app: App): void => {\n\t/** 注册所有 Element Plus Icon */\n\tfor (const [key, component] of Object.entries(ElementPlusIconsVue)) {\n\t\t// 这里是给 FaIcon 使用的\n\t\tapp.component(`el-icon-${key}`, component);\n\t}\n\n\t/** Element Plus 组件完整引入 */\n\tapp.use(ElementPlus);\n};\n"],"names":["ElDialog","props","draggable","type","Boolean","default","ElForm","labelWidth","String","Number","labelSuffix","scrollToError","ElInput","showWordLimit","ElInputNumber","controls","ElSelect","loadingText","noMatchText","noDataText","collapseTags","collapseTagsTooltip","ElTable","border","highlightCurrentRow","rowKey","Function","ElTree","defaultExpandAll","checkOnClickNode","highlightCurrent","ElTreeSelect","expandOnClickNode","elMessageBox","message","options","appContext","title","isNil","cancelButtonText","confirmButtonText","closeOnClickModal","closeOnPressEscape","beforeClose","localBeforeClose","localConfirmButtonText","localShowCancelButton","showCancelButton","action","instance","done","useOverlay","show","confirmButtonLoading","cancelLoading","hide","newDone","execFunction","then","catch","error","consoleError","ElMessageBox","Object","assign","boxType","MESSAGE_BOX_DEFAULT_OPTS","showInput","alert","titleOrOptions","isString","prompt","confirm","app","key","component","entries","ElementPlusIconsVue","use","ElementPlus"],"mappings":"ojBAUAA,EAAAA,SAASC,MAAQ,IACbD,EAAAA,SAASC,MAKZC,UAAW,CACVC,KAAMC,QACNC,SAAS,IAIXC,EAAAA,OAAOL,MAAQ,IACXK,EAAAA,OAAOL,MAEVM,WAAY,CACXJ,KAAM,CAACK,OAAQC,QACfJ,QAAS,QAGVK,YAAa,CACZP,KAAMK,OACNH,QAAS,KAGVM,cAAe,CACdR,KAAMC,QACNC,SAAS,IAIXO,EAAAA,QAAQX,MAAQ,IACZW,EAAAA,QAAQX,MAKXY,cAAe,CACdV,KAAMC,QACNC,SAAS,IAIXS,EAAAA,cAAcb,MAAQ,IAClBa,EAAAA,cAAcb,MAKjBc,SAAU,CACTZ,KAAMC,QACNC,SAAS,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H,GAAqC/B,IAC9GF,EAAa,QAASC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAmC/B,IAEpG2B,EAAAA,aAAaS,OAAS,CACrBrC,EACAmC,EACAlC,EACAC,IAEAkC,WAASD,GACNpC,EAAa,SAAUC,EAAS6B,OAAOC,OAAO,CAAE3B,MAAOgC,KAAmBH,GAAsC/B,IAChHF,EAAa,SAAUC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAoC/B,IAEtG2B,EAAAA,aAAaU,QAAU,CACtBtC,EACAmC,EACAlC,EACAC,IAEAkC,WAASD,GACNpC,EAAa,UAAWC,EAAS6B,OAAOC,OAAO,CAAE3B,MAAOgC,KAAmBH,GAAuC/B,IAClHF,EAAa,UAAWC,EAAS6B,OAAOC,OAAOK,EAAgBH,EAAqC/B,+BAErEsC,IAElC,IAAA,MAAYC,EAAKC,KAAcZ,OAAOa,QAAQC,GAE7CJ,EAAIE,UAAU,WAAWD,IAAOC,GAIjCF,EAAIK,IAAIC"}
|
package/lib/make-installer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./component.js"),r=require("./directive.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@fast-element-plus/icons-vue"),t=require("./component.js"),r=require("./directive.js"),o=require("./element-plus.js"),n=require("./version.js");function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const i=s(e),l=Symbol("INSTALLED_KEY");exports.INSTALLED_KEY=l,exports.makeInstaller=()=>({version:n.version,install:e=>{if(!e[l]){e[l]=!0,o.installElementPlus(e);for(const[t,r]of Object.entries(i))e.component(`fa-icon-${t}`,r);t.default.forEach(t=>e.use(t)),r.default.forEach(t=>e.use(t))}}});
|
|
2
2
|
//# sourceMappingURL=make-installer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-installer.js","sources":["../../packages/make-installer.ts"],"sourcesContent":["import FastElementPlusComponents from \"./component\";\nimport FastElementPlusDirectives from \"./directive\";\nimport { installElementPlus } from \"./element-plus\";\nimport { version } from \"./version\";\nimport type { App } from \"vue\";\n\nexport const INSTALLED_KEY = Symbol(\"INSTALLED_KEY\");\n\nexport const makeInstaller = (): {\n\tversion: string;\n\tinstall: (app: App) => void;\n} => {\n\tconst install = (app: App): void => {\n\t\tif (app[INSTALLED_KEY]) return;\n\n\t\tapp[INSTALLED_KEY] = true;\n\n\t\tinstallElementPlus(app);\n\n\t\tFastElementPlusComponents.forEach((c) => app.use(c));\n\n\t\tFastElementPlusDirectives.forEach((d) => app.use(d));\n\t};\n\n\treturn {\n\t\tversion,\n\t\tinstall,\n\t};\n};\n"],"names":["INSTALLED_KEY","Symbol","version","install","app","installElementPlus","FastElementPlusComponents","forEach","c","use","FastElementPlusDirectives","d"],"mappings":"
|
|
1
|
+
{"version":3,"file":"make-installer.js","sources":["../../packages/make-installer.ts"],"sourcesContent":["import * as FastElementPlusIconsVue from \"@fast-element-plus/icons-vue\";\nimport FastElementPlusComponents from \"./component\";\nimport FastElementPlusDirectives from \"./directive\";\nimport { installElementPlus } from \"./element-plus\";\nimport { version } from \"./version\";\nimport type { App } from \"vue\";\n\nexport const INSTALLED_KEY = Symbol(\"INSTALLED_KEY\");\n\nexport const makeInstaller = (): {\n\tversion: string;\n\tinstall: (app: App) => void;\n} => {\n\tconst install = (app: App): void => {\n\t\tif (app[INSTALLED_KEY]) return;\n\n\t\tapp[INSTALLED_KEY] = true;\n\n\t\tinstallElementPlus(app);\n\n\t\t/** 注册所有 Fast Element Plus Icon */\n\t\tfor (const [key, component] of Object.entries(FastElementPlusIconsVue)) {\n\t\t\t// 这里是给 FaIcon 使用的\n\t\t\tapp.component(`fa-icon-${key}`, component);\n\t\t}\n\n\t\tFastElementPlusComponents.forEach((c) => app.use(c));\n\n\t\tFastElementPlusDirectives.forEach((d) => app.use(d));\n\t};\n\n\treturn {\n\t\tversion,\n\t\tinstall,\n\t};\n};\n"],"names":["INSTALLED_KEY","Symbol","version","install","app","installElementPlus","key","component","Object","entries","FastElementPlusIconsVue","FastElementPlusComponents","forEach","c","use","FastElementPlusDirectives","d"],"mappings":"ygBAOaA,EAAgBC,OAAO,+DAEP,KAsBrB,CAAAC,QACNA,EAAAA,QACAC,QApBgBC,IAChB,IAAIA,EAAIJ,GAAR,CAEAI,EAAIJ,IAAiB,EAErBK,EAAAA,mBAAmBD,GAGnB,IAAA,MAAYE,EAAKC,KAAcC,OAAOC,QAAQC,GAE7CN,EAAIG,UAAU,WAAWD,IAAOC,GAGjCI,EAAAA,QAA0BC,QAASC,GAAMT,EAAIU,IAAID,IAEjDE,EAAAA,QAA0BH,QAASI,GAAMZ,EAAIU,IAAIE,GAdzB"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.1";
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.version="1.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.version="1.0.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../packages/version.ts"],"sourcesContent":["export const version = \"1.0.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../packages/version.ts"],"sourcesContent":["export const version = \"1.0.1\";\n"],"names":[],"mappings":"gGAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-element-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Fast 组件库.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@types/lodash": "^4.17",
|
|
98
98
|
"@types/lodash-es": "^4.17",
|
|
99
99
|
"@types/sortablejs": "^1.15",
|
|
100
|
-
"@vueuse/core": "^
|
|
100
|
+
"@vueuse/core": "^14",
|
|
101
101
|
"decimal.js": "^10",
|
|
102
102
|
"lodash": "^4.17",
|
|
103
103
|
"lodash-es": "^4.17",
|
|
@@ -112,19 +112,19 @@
|
|
|
112
112
|
"@fast-element-plus/icons-vue": "^1.0.17",
|
|
113
113
|
"@rollup/plugin-terser": "^0.4",
|
|
114
114
|
"@types/node": "^24",
|
|
115
|
-
"@vitejs/plugin-vue": "^
|
|
116
|
-
"@vitejs/plugin-vue-jsx": "^
|
|
117
|
-
"@vue/tsconfig": "^0.
|
|
115
|
+
"@vitejs/plugin-vue": "^6",
|
|
116
|
+
"@vitejs/plugin-vue-jsx": "^5",
|
|
117
|
+
"@vue/tsconfig": "^0.8",
|
|
118
118
|
"element-plus": "^2",
|
|
119
119
|
"eslint": "^9",
|
|
120
120
|
"prettier": "^3",
|
|
121
|
-
"sass": "^1
|
|
121
|
+
"sass": "^1",
|
|
122
122
|
"terser": "^5",
|
|
123
123
|
"typescript": "^5",
|
|
124
|
-
"vite": "^
|
|
124
|
+
"vite": "^7",
|
|
125
125
|
"vite-plugin-dts": "^4",
|
|
126
126
|
"vue": "^3.5",
|
|
127
|
-
"vue-tsc": "^
|
|
127
|
+
"vue-tsc": "^3"
|
|
128
128
|
},
|
|
129
129
|
"browserslist": {
|
|
130
130
|
"production": [
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
border: none;
|
|
6
6
|
.el-dropdown-menu {
|
|
7
7
|
.el-dropdown-menu__item {
|
|
8
|
-
font-size: var(--el-font-size-
|
|
8
|
+
font-size: var(--el-font-size-small);
|
|
9
9
|
.fa-icon {
|
|
10
10
|
margin-right: 5px;
|
|
11
11
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.fa-context-menu-small {
|
|
26
26
|
.el-dropdown-menu {
|
|
27
27
|
.el-dropdown-menu__item {
|
|
28
|
-
font-size:
|
|
28
|
+
font-size: var(--el-font-size-extra-small);
|
|
29
29
|
.fa-icon {
|
|
30
30
|
margin-right: 3px;
|
|
31
31
|
}
|