fast-element-plus 1.0.0-alpha.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +24 -121
- package/Fast.png +0 -0
- package/LICENSE +0 -201
- package/README.md +0 -158
- package/README.zh.md +0 -158
- package/dist/index.iife.js +0 -2
- package/dist/index.iife.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/es/components/icon/index.d.ts +0 -20
- package/es/components/icon/index.mjs +0 -9
- package/es/components/icon/index.mjs.map +0 -1
- package/es/components/icon/src/icon.d.ts +0 -61
- package/es/components/icon/src/icon.mjs +0 -81
- package/es/components/icon/src/icon.mjs.map +0 -1
- package/es/components/index.d.ts +0 -1
- package/es/components/index.mjs +0 -5
- package/es/components/index.mjs.map +0 -1
- package/es/constants/index.d.ts +0 -2
- package/es/constants/index.mjs +0 -7
- package/es/constants/index.mjs.map +0 -1
- package/es/constants/mime.d.ts +0 -61
- package/es/constants/mime.mjs +0 -62
- package/es/constants/mime.mjs.map +0 -1
- package/es/constants/regex.d.ts +0 -78
- package/es/constants/regex.mjs +0 -79
- package/es/constants/regex.mjs.map +0 -1
- package/es/directives/clickCopy/index.d.ts +0 -2
- package/es/directives/clickCopy/index.mjs +0 -39
- package/es/directives/clickCopy/index.mjs.map +0 -1
- package/es/directives/clickDebounce/index.d.ts +0 -2
- package/es/directives/clickDebounce/index.mjs +0 -21
- package/es/directives/clickDebounce/index.mjs.map +0 -1
- package/es/directives/clickDraggable/index.d.ts +0 -2
- package/es/directives/clickDraggable/index.mjs +0 -39
- package/es/directives/clickDraggable/index.mjs.map +0 -1
- package/es/directives/clickIconCopy/index.d.ts +0 -2
- package/es/directives/clickIconCopy/index.mjs +0 -57
- package/es/directives/clickIconCopy/index.mjs.map +0 -1
- package/es/directives/clickLongpress/index.d.ts +0 -2
- package/es/directives/clickLongpress/index.mjs +0 -43
- package/es/directives/clickLongpress/index.mjs.map +0 -1
- package/es/directives/clickThrottle/index.d.ts +0 -2
- package/es/directives/clickThrottle/index.mjs +0 -32
- package/es/directives/clickThrottle/index.mjs.map +0 -1
- package/es/directives/index.d.ts +0 -6
- package/es/directives/index.mjs +0 -15
- package/es/directives/index.mjs.map +0 -1
- package/es/fast-element-plus/component.d.ts +0 -3
- package/es/fast-element-plus/component.mjs +0 -6
- package/es/fast-element-plus/component.mjs.map +0 -1
- package/es/fast-element-plus/directive.d.ts +0 -2
- package/es/fast-element-plus/directive.mjs +0 -11
- package/es/fast-element-plus/directive.mjs.map +0 -1
- package/es/fast-element-plus/element-plus.d.ts +0 -2
- package/es/fast-element-plus/element-plus.mjs +0 -113
- package/es/fast-element-plus/element-plus.mjs.map +0 -1
- package/es/fast-element-plus/fast-element-plus.d.ts +0 -3
- package/es/fast-element-plus/fast-element-plus.mjs +0 -12
- package/es/fast-element-plus/fast-element-plus.mjs.map +0 -1
- package/es/fast-element-plus/make-installer.d.ts +0 -7
- package/es/fast-element-plus/make-installer.mjs +0 -30
- package/es/fast-element-plus/make-installer.mjs.map +0 -1
- package/es/fast-element-plus/version.d.ts +0 -4
- package/es/fast-element-plus/version.mjs +0 -5
- package/es/fast-element-plus/version.mjs.map +0 -1
- package/es/hooks/index.d.ts +0 -2
- package/es/hooks/index.mjs +0 -7
- package/es/hooks/index.mjs.map +0 -1
- package/es/hooks/useLoading/index.d.ts +0 -4
- package/es/hooks/useLoading/index.mjs +0 -35
- package/es/hooks/useLoading/index.mjs.map +0 -1
- package/es/hooks/useOverlay/index.d.ts +0 -4
- package/es/hooks/useOverlay/index.mjs +0 -27
- package/es/hooks/useOverlay/index.mjs.map +0 -1
- package/es/hooks/useScreenFull/index.d.ts +0 -0
- package/es/index.d.ts +0 -16
- package/es/index.es.d.ts +0 -6
- package/es/index.mjs +0 -82
- package/es/index.mjs.map +0 -1
- package/es/settings/index.d.ts +0 -79
- package/es/settings/index.mjs +0 -35
- package/es/settings/index.mjs.map +0 -1
- package/es/stores/index.d.ts +0 -4
- package/es/stores/index.mjs +0 -7
- package/es/stores/index.mjs.map +0 -1
- package/es/utils/base64.d.ts +0 -10
- package/es/utils/base64.mjs +0 -106
- package/es/utils/base64.mjs.map +0 -1
- package/es/utils/click.d.ts +0 -14
- package/es/utils/click.mjs +0 -35
- package/es/utils/click.mjs.map +0 -1
- package/es/utils/color.d.ts +0 -31
- package/es/utils/color.mjs +0 -73
- package/es/utils/color.mjs.map +0 -1
- package/es/utils/console.d.ts +0 -21
- package/es/utils/console.mjs +0 -19
- package/es/utils/console.mjs.map +0 -1
- package/es/utils/deviceId.d.ts +0 -9
- package/es/utils/deviceId.mjs +0 -27
- package/es/utils/deviceId.mjs.map +0 -1
- package/es/utils/errorHandler.d.ts +0 -4
- package/es/utils/errorHandler.mjs +0 -42
- package/es/utils/errorHandler.mjs.map +0 -1
- package/es/utils/form.d.ts +0 -78
- package/es/utils/form.mjs +0 -218
- package/es/utils/form.mjs.map +0 -1
- package/es/utils/index.d.ts +0 -10
- package/es/utils/index.mjs +0 -29
- package/es/utils/index.mjs.map +0 -1
- package/es/utils/storage.d.ts +0 -79
- package/es/utils/storage.mjs +0 -219
- package/es/utils/storage.mjs.map +0 -1
- package/es/utils/string.d.ts +0 -33
- package/es/utils/string.mjs +0 -119
- package/es/utils/string.mjs.map +0 -1
- package/es/utils/vue/func.d.ts +0 -7
- package/es/utils/vue/func.mjs +0 -17
- package/es/utils/vue/func.mjs.map +0 -1
- package/es/utils/vue/index.d.ts +0 -6
- package/es/utils/vue/index.mjs +0 -17
- package/es/utils/vue/index.mjs.map +0 -1
- package/es/utils/vue/install.d.ts +0 -5
- package/es/utils/vue/install.mjs +0 -31
- package/es/utils/vue/install.mjs.map +0 -1
- package/es/utils/vue/props.d.ts +0 -10
- package/es/utils/vue/props.mjs +0 -14
- package/es/utils/vue/props.mjs.map +0 -1
- package/es/utils/vue/slots.d.ts +0 -11
- package/es/utils/vue/slots.mjs +0 -7
- package/es/utils/vue/slots.mjs.map +0 -1
- package/es/utils/vue/useRender.d.ts +0 -7
- package/es/utils/vue/useRender.mjs +0 -12
- package/es/utils/vue/useRender.mjs.map +0 -1
- package/es/utils/vue/with.d.ts +0 -6
- package/es/utils/vue/with.mjs +0 -7
- package/es/utils/vue/with.mjs.map +0 -1
- package/global.d.ts +0 -3
- package/lib/components/icon/index.d.ts +0 -20
- package/lib/components/icon/index.js +0 -2
- package/lib/components/icon/index.js.map +0 -1
- package/lib/components/icon/src/icon.d.ts +0 -61
- package/lib/components/icon/src/icon.js +0 -2
- package/lib/components/icon/src/icon.js.map +0 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -2
- package/lib/components/index.js.map +0 -1
- package/lib/constants/index.d.ts +0 -2
- package/lib/constants/index.js +0 -2
- package/lib/constants/index.js.map +0 -1
- package/lib/constants/mime.d.ts +0 -61
- package/lib/constants/mime.js +0 -2
- package/lib/constants/mime.js.map +0 -1
- package/lib/constants/regex.d.ts +0 -78
- package/lib/constants/regex.js +0 -2
- package/lib/constants/regex.js.map +0 -1
- package/lib/directives/clickCopy/index.d.ts +0 -2
- package/lib/directives/clickCopy/index.js +0 -2
- package/lib/directives/clickCopy/index.js.map +0 -1
- package/lib/directives/clickDebounce/index.d.ts +0 -2
- package/lib/directives/clickDebounce/index.js +0 -2
- package/lib/directives/clickDebounce/index.js.map +0 -1
- package/lib/directives/clickDraggable/index.d.ts +0 -2
- package/lib/directives/clickDraggable/index.js +0 -2
- package/lib/directives/clickDraggable/index.js.map +0 -1
- package/lib/directives/clickIconCopy/index.d.ts +0 -2
- package/lib/directives/clickIconCopy/index.js +0 -2
- package/lib/directives/clickIconCopy/index.js.map +0 -1
- package/lib/directives/clickLongpress/index.d.ts +0 -2
- package/lib/directives/clickLongpress/index.js +0 -2
- package/lib/directives/clickLongpress/index.js.map +0 -1
- package/lib/directives/clickThrottle/index.d.ts +0 -2
- package/lib/directives/clickThrottle/index.js +0 -2
- package/lib/directives/clickThrottle/index.js.map +0 -1
- package/lib/directives/index.d.ts +0 -6
- package/lib/directives/index.js +0 -2
- package/lib/directives/index.js.map +0 -1
- package/lib/fast-element-plus/component.d.ts +0 -3
- package/lib/fast-element-plus/component.js +0 -2
- package/lib/fast-element-plus/component.js.map +0 -1
- package/lib/fast-element-plus/directive.d.ts +0 -2
- package/lib/fast-element-plus/directive.js +0 -2
- package/lib/fast-element-plus/directive.js.map +0 -1
- package/lib/fast-element-plus/element-plus.d.ts +0 -2
- package/lib/fast-element-plus/element-plus.js +0 -2
- package/lib/fast-element-plus/element-plus.js.map +0 -1
- package/lib/fast-element-plus/fast-element-plus.d.ts +0 -3
- package/lib/fast-element-plus/fast-element-plus.js +0 -2
- package/lib/fast-element-plus/fast-element-plus.js.map +0 -1
- package/lib/fast-element-plus/make-installer.d.ts +0 -7
- package/lib/fast-element-plus/make-installer.js +0 -2
- package/lib/fast-element-plus/make-installer.js.map +0 -1
- package/lib/fast-element-plus/version.d.ts +0 -4
- package/lib/fast-element-plus/version.js +0 -2
- package/lib/fast-element-plus/version.js.map +0 -1
- package/lib/hooks/index.d.ts +0 -2
- package/lib/hooks/index.js +0 -2
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/useLoading/index.d.ts +0 -4
- package/lib/hooks/useLoading/index.js +0 -2
- package/lib/hooks/useLoading/index.js.map +0 -1
- package/lib/hooks/useOverlay/index.d.ts +0 -4
- package/lib/hooks/useOverlay/index.js +0 -2
- package/lib/hooks/useOverlay/index.js.map +0 -1
- package/lib/hooks/useScreenFull/index.d.ts +0 -0
- package/lib/index.d.ts +0 -16
- package/lib/index.es.d.ts +0 -6
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/lib/settings/index.d.ts +0 -79
- package/lib/settings/index.js +0 -2
- package/lib/settings/index.js.map +0 -1
- package/lib/stores/index.d.ts +0 -4
- package/lib/stores/index.js +0 -2
- package/lib/stores/index.js.map +0 -1
- package/lib/utils/base64.d.ts +0 -10
- package/lib/utils/base64.js +0 -2
- package/lib/utils/base64.js.map +0 -1
- package/lib/utils/click.d.ts +0 -14
- package/lib/utils/click.js +0 -2
- package/lib/utils/click.js.map +0 -1
- package/lib/utils/color.d.ts +0 -31
- package/lib/utils/color.js +0 -2
- package/lib/utils/color.js.map +0 -1
- package/lib/utils/console.d.ts +0 -21
- package/lib/utils/console.js +0 -2
- package/lib/utils/console.js.map +0 -1
- package/lib/utils/deviceId.d.ts +0 -9
- package/lib/utils/deviceId.js +0 -2
- package/lib/utils/deviceId.js.map +0 -1
- package/lib/utils/errorHandler.d.ts +0 -4
- package/lib/utils/errorHandler.js +0 -2
- package/lib/utils/errorHandler.js.map +0 -1
- package/lib/utils/form.d.ts +0 -78
- package/lib/utils/form.js +0 -2
- package/lib/utils/form.js.map +0 -1
- package/lib/utils/index.d.ts +0 -10
- package/lib/utils/index.js +0 -2
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/storage.d.ts +0 -79
- package/lib/utils/storage.js +0 -2
- package/lib/utils/storage.js.map +0 -1
- package/lib/utils/string.d.ts +0 -33
- package/lib/utils/string.js +0 -2
- package/lib/utils/string.js.map +0 -1
- package/lib/utils/vue/func.d.ts +0 -7
- package/lib/utils/vue/func.js +0 -2
- package/lib/utils/vue/func.js.map +0 -1
- package/lib/utils/vue/index.d.ts +0 -6
- package/lib/utils/vue/index.js +0 -2
- package/lib/utils/vue/index.js.map +0 -1
- package/lib/utils/vue/install.d.ts +0 -5
- package/lib/utils/vue/install.js +0 -2
- package/lib/utils/vue/install.js.map +0 -1
- package/lib/utils/vue/props.d.ts +0 -10
- package/lib/utils/vue/props.js +0 -2
- package/lib/utils/vue/props.js.map +0 -1
- package/lib/utils/vue/slots.d.ts +0 -11
- package/lib/utils/vue/slots.js +0 -2
- package/lib/utils/vue/slots.js.map +0 -1
- package/lib/utils/vue/useRender.d.ts +0 -7
- package/lib/utils/vue/useRender.js +0 -2
- package/lib/utils/vue/useRender.js.map +0 -1
- package/lib/utils/vue/with.d.ts +0 -6
- package/lib/utils/vue/with.js +0 -2
- package/lib/utils/vue/with.js.map +0 -1
- package/types/env.d.ts +0 -45
- package/types/runtime-core.d.ts +0 -52
- package/types/shims-vue.d.ts +0 -20
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/components/icon/index.ts"],"sourcesContent":["import type { ExtractPropTypes } from \"vue\";\nimport { withInstall } from \"@fast-element-plus/utils\";\nimport type { faIconProps } from \"./src/icon\";\nimport Icon from \"./src/icon\";\n\nexport const FaIcon = withInstall(Icon);\nexport default FaIcon;\n\nexport type GIconInstance = InstanceType<typeof Icon>;\n\nexport type GIconProps = ExtractPropTypes<typeof faIconProps>;\n"],"names":["FaIcon","Icon","default"],"mappings":"6KAKaA,oDAAqBC,EAAIC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
export declare const faIconProps: {
|
|
3
|
-
/**
|
|
4
|
-
* 名称
|
|
5
|
-
* @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
|
|
6
|
-
* @requires 必填
|
|
7
|
-
*/
|
|
8
|
-
name: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
required: boolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* 大小
|
|
14
|
-
*/
|
|
15
|
-
size: PropType<number | string>;
|
|
16
|
-
/**
|
|
17
|
-
* 颜色
|
|
18
|
-
*/
|
|
19
|
-
color: StringConstructor;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* FaIcon 组件
|
|
23
|
-
*/
|
|
24
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
25
|
-
/**
|
|
26
|
-
* 名称
|
|
27
|
-
* @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
|
|
28
|
-
* @requires 必填
|
|
29
|
-
*/
|
|
30
|
-
name: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
required: boolean;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 大小
|
|
36
|
-
*/
|
|
37
|
-
size: PropType<number | string>;
|
|
38
|
-
/**
|
|
39
|
-
* 颜色
|
|
40
|
-
*/
|
|
41
|
-
color: StringConstructor;
|
|
42
|
-
}>, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
43
|
-
/**
|
|
44
|
-
* 名称
|
|
45
|
-
* @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
|
|
46
|
-
* @requires 必填
|
|
47
|
-
*/
|
|
48
|
-
name: {
|
|
49
|
-
type: StringConstructor;
|
|
50
|
-
required: boolean;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* 大小
|
|
54
|
-
*/
|
|
55
|
-
size: PropType<number | string>;
|
|
56
|
-
/**
|
|
57
|
-
* 颜色
|
|
58
|
-
*/
|
|
59
|
-
color: StringConstructor;
|
|
60
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
61
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constants/index.js"),require("../../../utils/index.js");const r=require("element-plus"),o=require("lodash-es"),s=require("../../../constants/regex.js"),t=require("../../../utils/vue/useRender.js");function n(r){return"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!e.isVNode(r)}const i={name:{type:String,required:!0},size:[Number,String],color:String},l=e.defineComponent({name:"FaIcon",props:i,setup(i,{attrs:l}){const c=e.reactive({isUrl:e.computed((()=>s.RegExps.External.test(i.name))),style:e.computed((()=>{const e={};return i.size&&(o.isNumber(i.size)?e.size=`${i.size}px`:e.size=i.size),i.color&&(e.color=i.color),c.isUrl&&(e.mask=`url(${i.name}) no-repeat 50% 50%`,e["-webkit-mask"]=`url(${i.name}) no-repeat 50% 50%`),e}))});t.useRender((()=>{let o,s;return 0===i.name.indexOf("el-icon-")?e.createVNode(r.ElIcon,e.mergeProps(l,i,{class:"fa-icon"}),n(o=e.h(e.resolveComponent(i.name)))?o:{default:()=>[o]}):0===i.name.indexOf("fa-icon")?e.createVNode(r.ElIcon,e.mergeProps(l,i,{class:"fa-icon"}),n(s=e.h(e.resolveComponent(i.name)))?s:{default:()=>[s]}):c.isUrl?e.createVNode("div",e.mergeProps(l,{class:"el-icon fa-icon url-icon",style:c.style}),null):e.createVNode("i",e.mergeProps(l,{class:[i.name,"el-icon fa-icon"],style:c.style}),null)}))}});exports.default=l,exports.faIconProps=i;
|
|
2
|
-
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../../packages/components/icon/src/icon.tsx"],"sourcesContent":["import type { CSSProperties, PropType } from \"vue\";\nimport { computed, defineComponent, h, reactive, resolveComponent } from \"vue\";\nimport { RegExps } from \"@fast-element-plus/constants\";\nimport { useRender } from \"@fast-element-plus/utils\";\nimport { ElIcon } from \"element-plus\";\nimport { isNumber } from \"lodash-es\";\n\nexport const faIconProps = {\n\t/**\n\t * 名称\n\t * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;\n\t * @requires 必填\n\t */\n\tname: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\t/**\n\t * 大小\n\t */\n\tsize: [Number, String] as PropType<number | string>,\n\t/**\n\t * 颜色\n\t */\n\tcolor: String,\n};\n\n/**\n * FaIcon 组件\n */\nexport default defineComponent({\n\tname: \"FaIcon\",\n\tprops: faIconProps,\n\tsetup(props, { attrs }) {\n\t\tconst state = reactive({\n\t\t\tisUrl: computed(() => RegExps.External.test(props.name)),\n\t\t\tstyle: computed((): CSSProperties => {\n\t\t\t\tconst result: any = {};\n\t\t\t\tif (props.size) {\n\t\t\t\t\tif (isNumber(props.size)) {\n\t\t\t\t\t\tresult.size = `${props.size}px`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.size = props.size;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (props.color) {\n\t\t\t\t\tresult.color = props.color;\n\t\t\t\t}\n\t\t\t\tif (state.isUrl) {\n\t\t\t\t\tresult.mask = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t\tresult[\"-webkit-mask\"] = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}),\n\t\t});\n\n\t\tuseRender(() =>\n\t\t\tprops.name.indexOf(\"el-icon-\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class=\"fa-icon\">\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : props.name.indexOf(\"fa-icon\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class=\"fa-icon\">\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : state.isUrl ? (\n\t\t\t\t<div {...attrs} class=\"el-icon fa-icon url-icon\" style={state.style} />\n\t\t\t) : (\n\t\t\t\t<i {...attrs} class={[props.name, \"el-icon fa-icon\"]} style={state.style} />\n\t\t\t)\n\t\t);\n\t},\n});\n"],"names":["_isSlot","s","_isVNode","Object","prototype","toString","call","isVNode","faIconProps","name","type","String","required","size","Number","color","defineComponent","props","setup","attrs","state","reactive","isUrl","computed","RegExps","External","test","style","result","isNumber","mask","useRender","_slot","_slot2","indexOf","_createVNode","ElIcon","_mergeProps","class","h","resolveComponent","default","createVNode","mergeProps"],"mappings":"0VAKqC,SAAAA,EAAAC,GAAA,MAAA,mBAAAA,GAAAC,oBAAAC,OAAAC,UAAAC,SAAAC,KAAAL,KAAAC,EAAAK,QAAAN,EAAA,CAE9B,MAAMO,EAAc,CAM1BC,KAAM,CACLC,KAAMC,OACNC,UAAU,GAKXC,KAAM,CAACC,OAAQH,QAIfI,MAAOJ,QAMOK,oBAAgB,CAC9BP,KAAM,SACNQ,MAAOT,EACPU,KAAAA,CAAMD,GAAOE,MAAEA,IACRC,MAAAA,EAAQC,EAAAA,SAAS,CACtBC,MAAOC,EAAQA,UAAC,IAAMC,EAAOA,QAACC,SAASC,KAAKT,EAAMR,QAClDkB,MAAOJ,EAAQA,UAAC,KACf,MAAMK,EAAc,CAAA,EAebA,OAdHX,EAAMJ,OACLgB,EAAQA,SAACZ,EAAMJ,MACXA,EAAAA,KAAO,GAAGI,EAAMJ,SAEvBe,EAAOf,KAAOI,EAAMJ,MAGlBI,EAAMF,QACTa,EAAOb,MAAQE,EAAMF,OAElBK,EAAME,QACFQ,EAAAA,KAAO,OAAOb,EAAMR,0BAC3BmB,EAAO,gBAAkB,OAAOX,EAAMR,2BAEhCmB,CAAAA,MAITG,EAAAA,WAAU,KAAA,IAAAC,EAAAC,EAAA,OAC0B,IAAnChB,EAAMR,KAAKyB,QAAQ,YAAiBC,EAAAA,YAAAC,EAAAA,OAAAC,aACvBlB,EAAWF,EAAK,CAAAqB,MAAA,YAAAtC,EAAAgC,EAC1BO,IAAEC,EAAAA,iBAAiBvB,EAAMR,QAAMuB,EAAA,CAAAS,QAAAA,IAAA,CAAAT,KAEI,IAAlCf,EAAMR,KAAKyB,QAAQ,WAAgBC,EAAAA,YAAAC,EAAAA,OAAAC,aAC1BlB,EAAWF,EAAK,CAAAqB,MAAA,YAAAtC,EAAAiC,EAC1BM,IAAEC,EAAAA,iBAAiBvB,EAAMR,QAAMwB,EAAA,CAAAQ,QAAAA,IAAA,CAAAR,KAE9Bb,EAAME,MAAKa,EAAAO,YAAAL,MAAAA,EAAAM,WACLxB,EAAK,CAAAmB,MAAA,2BAAAX,MAA0CP,EAAMO,QAAK,MAAAQ,EAAAA,YAAA,IAAAE,EAAAA,WAE5DlB,EAAK,CAAAmB,MAAS,CAACrB,EAAMR,KAAM,mBAAkBkB,MAASP,EAAMO,QACnE,KAAA,GAEH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './icon';
|
package/lib/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/constants/index.d.ts
DELETED
package/lib/constants/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/constants/mime.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIME 类型
|
|
3
|
-
*/
|
|
4
|
-
export declare const FaMimeType: {
|
|
5
|
-
/**
|
|
6
|
-
* PDF
|
|
7
|
-
*/
|
|
8
|
-
PDF: string;
|
|
9
|
-
/**
|
|
10
|
-
* 文本文件
|
|
11
|
-
*/
|
|
12
|
-
Text: string;
|
|
13
|
-
/**
|
|
14
|
-
* Word 和 DOCX(Word 2007 及以后版本)
|
|
15
|
-
*/
|
|
16
|
-
Word: string;
|
|
17
|
-
/**
|
|
18
|
-
* Excel 和 CSV
|
|
19
|
-
*/
|
|
20
|
-
Excel: string;
|
|
21
|
-
/**
|
|
22
|
-
* PowerPoint 和 PPTX(PowerPoint 2007 及以后版本)
|
|
23
|
-
*/
|
|
24
|
-
Powerpoint: string;
|
|
25
|
-
/**
|
|
26
|
-
* 压缩文件
|
|
27
|
-
*/
|
|
28
|
-
ZIP: string;
|
|
29
|
-
/**
|
|
30
|
-
* 图片
|
|
31
|
-
*/
|
|
32
|
-
Image: string;
|
|
33
|
-
/**
|
|
34
|
-
* 视频
|
|
35
|
-
*/
|
|
36
|
-
Video: string;
|
|
37
|
-
/**
|
|
38
|
-
* 音频
|
|
39
|
-
*/
|
|
40
|
-
Audio: string;
|
|
41
|
-
/**
|
|
42
|
-
* HTML
|
|
43
|
-
*/
|
|
44
|
-
Html: string;
|
|
45
|
-
/**
|
|
46
|
-
* CSS
|
|
47
|
-
*/
|
|
48
|
-
Css: string;
|
|
49
|
-
/**
|
|
50
|
-
* JavaScript
|
|
51
|
-
*/
|
|
52
|
-
JavaScript: string;
|
|
53
|
-
/**
|
|
54
|
-
* JSON
|
|
55
|
-
*/
|
|
56
|
-
Json: string;
|
|
57
|
-
/**
|
|
58
|
-
* XML
|
|
59
|
-
*/
|
|
60
|
-
XML: string;
|
|
61
|
-
};
|
package/lib/constants/mime.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.FaMimeType={PDF:"application/pdf",Text:"text/plain",Word:"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",Excel:"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv",Powerpoint:"application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",ZIP:"application/zip,application/x-zip-compressed",Image:"image/jpeg,image/png,image/gif",Video:"video/mp4,video/mpeg,video/quicktime",Audio:"audio/mpeg,audio/wav",Html:"text/html",Css:"text/css",JavaScript:"application/javascript,text/javascript",Json:"application/json",XML:"application/xml,text/xml"};
|
|
2
|
-
//# sourceMappingURL=mime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mime.js","sources":["../../../packages/constants/mime.ts"],"sourcesContent":["/**\n * MIME 类型\n */\nexport const FaMimeType = {\n\t/**\n\t * PDF\n\t */\n\tPDF: \"application/pdf\",\n\t/**\n\t * 文本文件\n\t */\n\tText: \"text/plain\",\n\t/**\n\t * Word 和 DOCX(Word 2007 及以后版本)\n\t */\n\tWord: \"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n\t/**\n\t * Excel 和 CSV\n\t */\n\tExcel: \"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv\",\n\t/**\n\t * PowerPoint 和 PPTX(PowerPoint 2007 及以后版本)\n\t */\n\tPowerpoint: \"application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n\t/**\n\t * 压缩文件\n\t */\n\tZIP: \"application/zip,application/x-zip-compressed\",\n\t/**\n\t * 图片\n\t */\n\tImage: \"image/jpeg,image/png,image/gif\",\n\t/**\n\t * 视频\n\t */\n\tVideo: \"video/mp4,video/mpeg,video/quicktime\",\n\t/**\n\t * 音频\n\t */\n\tAudio: \"audio/mpeg,audio/wav\",\n\t/**\n\t * HTML\n\t */\n\tHtml: \"text/html\",\n\t/**\n\t * CSS\n\t */\n\tCss: \"text/css\",\n\t/**\n\t * JavaScript\n\t */\n\tJavaScript: \"application/javascript,text/javascript\",\n\t/**\n\t * JSON\n\t */\n\tJson: \"application/json\",\n\t/**\n\t * XML\n\t */\n\tXML: \"application/xml,text/xml\",\n};\n"],"names":["PDF","Text","Word","Excel","Powerpoint","ZIP","Image","Video","Audio","Html","Css","JavaScript","Json","XML"],"mappings":"mGAG0B,CAIzBA,IAAK,kBAILC,KAAM,aAINC,KAAM,6FAINC,MAAO,sGAIPC,WAAY,0GAIZC,IAAK,+CAILC,MAAO,iCAIPC,MAAO,uCAIPC,MAAO,uBAIPC,KAAM,YAINC,IAAK,WAILC,WAAY,yCAIZC,KAAM,mBAINC,IAAK"}
|
package/lib/constants/regex.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 正则表达式
|
|
3
|
-
*/
|
|
4
|
-
export declare const RegExps: {
|
|
5
|
-
/**
|
|
6
|
-
* UUID
|
|
7
|
-
*/
|
|
8
|
-
UUID: RegExp;
|
|
9
|
-
/**
|
|
10
|
-
* 手机号
|
|
11
|
-
*/
|
|
12
|
-
Mobile: RegExp;
|
|
13
|
-
/**
|
|
14
|
-
* 电话
|
|
15
|
-
*/
|
|
16
|
-
Phone: RegExp;
|
|
17
|
-
/**
|
|
18
|
-
* 邮箱
|
|
19
|
-
*/
|
|
20
|
-
Email: RegExp;
|
|
21
|
-
/**
|
|
22
|
-
* 身份证
|
|
23
|
-
*/
|
|
24
|
-
IdCard: RegExp;
|
|
25
|
-
/**
|
|
26
|
-
* 外部链接
|
|
27
|
-
* 匹配http、https、mailto、tel和ftp开头的链接
|
|
28
|
-
*/
|
|
29
|
-
External: RegExp;
|
|
30
|
-
/**
|
|
31
|
-
* Url
|
|
32
|
-
*/
|
|
33
|
-
Url: RegExp;
|
|
34
|
-
/**
|
|
35
|
-
* 车牌号
|
|
36
|
-
*/
|
|
37
|
-
CarNumber: RegExp;
|
|
38
|
-
/**
|
|
39
|
-
* 新能源车牌号
|
|
40
|
-
*/
|
|
41
|
-
NewEnergyCarNumber: RegExp;
|
|
42
|
-
/**
|
|
43
|
-
* 邮政编码
|
|
44
|
-
*/
|
|
45
|
-
PostCode: RegExp;
|
|
46
|
-
/**
|
|
47
|
-
* ipv4
|
|
48
|
-
*/
|
|
49
|
-
Ipv4: RegExp;
|
|
50
|
-
/**
|
|
51
|
-
* 护照
|
|
52
|
-
*/
|
|
53
|
-
Passport: RegExp;
|
|
54
|
-
/**
|
|
55
|
-
* 港澳通行证
|
|
56
|
-
*/
|
|
57
|
-
HKMacauPass: RegExp;
|
|
58
|
-
/**
|
|
59
|
-
* 账号(6-20位字母或数字,必须以字母开头,不能全为数字)
|
|
60
|
-
*/
|
|
61
|
-
Account: RegExp;
|
|
62
|
-
/**
|
|
63
|
-
* 弱密码(只包含字母和数字,长度为6到18位)
|
|
64
|
-
*/
|
|
65
|
-
Password: RegExp;
|
|
66
|
-
/**
|
|
67
|
-
* 强密码(8到20位,包含大小写字母、数字及特殊字符)
|
|
68
|
-
*/
|
|
69
|
-
StrongPassword: RegExp;
|
|
70
|
-
/**
|
|
71
|
-
* 中文字符
|
|
72
|
-
*/
|
|
73
|
-
Chinese: RegExp;
|
|
74
|
-
/**
|
|
75
|
-
* 英文字符
|
|
76
|
-
*/
|
|
77
|
-
English: RegExp;
|
|
78
|
-
};
|
package/lib/constants/regex.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.RegExps={UUID:/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,Mobile:/^(?:(?:\+|00)86)?1\d{10}$/,Phone:/^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,Email:/^[a-zA-Z0-9_-]+@([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-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/,External:/^(https?:|mailto:|tel:|ftp:)/,Url:/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){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}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/,CarNumber:/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/,NewEnergyCarNumber:/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}(([0-9]{5}[DF]$)|([ABCDE][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$)|([FGHJK][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$))/,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:/^[EeGg]\d{8}$/,HKMacauPass:/^[HMhm]\d{8}$/,Account:/^[a-zA-Z][a-zA-Z\d]{5,19}$/,Password:/^[A-Za-z0-9]{6,18}$/,StrongPassword:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,20}$/,Chinese:/^[\u4E00-\u9FA5]+$/,English:/^[a-zA-Z]+$/};
|
|
2
|
-
//# sourceMappingURL=regex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sources":["../../../packages/constants/regex.ts"],"sourcesContent":["/**\n * 正则表达式\n */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\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: /^[a-zA-Z0-9_-]+@([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-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]$)/,\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][0-9]|1[0-9]{2}|[1-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){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}))(:[0-9]+)*(\\/($|[a-zA-Z0-9.,?'\\\\+&%$#=~_-]+))*$/,\n\t/**\n\t * 车牌号\n\t */\n\tCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/,\n\t/**\n\t * 新能源车牌号\n\t */\n\tNewEnergyCarNumber:\n\t\t/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}(([0-9]{5}[DF]$)|([ABCDE][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$)|([FGHJK][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$))/,\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: /^[EeGg]\\d{8}$/,\n\t/**\n\t * 港澳通行证\n\t */\n\tHKMacauPass: /^[HMhm]\\d{8}$/,\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\tAccount: /^[a-zA-Z][a-zA-Z\\d]{5,19}$/,\n\t/**\n\t * 弱密码(只包含字母和数字,长度为6到18位)\n\t */\n\tPassword: /^[A-Za-z0-9]{6,18}$/,\n\t/**\n\t * 强密码(8到20位,包含大小写字母、数字及特殊字符)\n\t */\n\tStrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_])[A-Za-z\\d\\W_]{8,20}$/,\n\t/**\n\t * 中文字符\n\t */\n\tChinese: /^[\\u4E00-\\u9FA5]+$/,\n\t/**\n\t * 英文字符\n\t */\n\tEnglish: /^[a-zA-Z]+$/,\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,gFAINC,OAAQ,4BAIRC,MAAO,sDAIPC,MAAO,qDAIPC,OAAQ,gLAKRC,SAAU,+BAIVC,IAAK,6TAILC,UAAW,8FAIXC,mBACC,mKAIDC,SAAU,eAIVC,KAAM,uIAINC,SAAU,gBAIVC,YAAa,gBAIbC,QAAS,6BAITC,SAAU,sBAIVC,eAAgB,iEAIhBC,QAAS,qBAITC,QAAS"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("../../utils/index.js");const e=require("element-plus"),t=require("../../utils/string.js"),s=require("../../utils/console.js"),i=require("../../utils/vue/install.js"),r={mounted(i,r){i.copyData=r.value,i.__handleClick__=async()=>{if(i.copyData)try{await t.stringUtil.copy(String(i.copyData)),e.ElMessage({type:"success",message:"复制成功"})}catch(r){e.ElMessage({type:"error",message:"复制失败"}),s.consoleError("CopyDirective","复制失败",r)}},i.addEventListener("click",i.__handleClick__)},updated(e,t){e.copyData=t.value},beforeUnmount(e){e.removeEventListener("click",e.__handleClick__)}},l=i.withInstallDirective(r,"copy");exports.default=l,exports.vCopy=l;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickCopy/index.ts"],"sourcesContent":["/**\n * v-copy\n * 复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport type { Directive, DirectiveBinding } from \"vue\";\nimport { consoleError, stringUtil, withInstallDirective } from \"@fast-element-plus/utils\";\nimport { ElMessage } from \"element-plus\";\n\ninterface ElType extends HTMLElement {\n\tcopyData: string | number;\n\t__handleClick__: () => void;\n}\n\nconst CopyDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\n\t\tel.__handleClick__ = async (): Promise<void> => {\n\t\t\tif (!el.copyData) return;\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tconsoleError(\"CopyDirective\", \"复制失败\", error);\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tupdated(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vCopy = withInstallDirective(CopyDirective, \"copy\");\nexport default vCopy;\n"],"names":["CopyDirective","mounted","el","binding","copyData","value","__handleClick__","async","stringUtil","copy","String","ElMessage","type","message","error","consoleError","addEventListener","updated","beforeUnmount","removeEventListener","vCopy","withInstallDirective"],"mappings":"2RAcMA,EAA2B,CAChC,OAAAC,CAAQC,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,MAEtBH,EAAGI,gBAAkBC,UAChB,GAACL,EAAGE,SACJ,UACGI,EAAAA,WAAWC,KAAKC,OAAOR,EAAGE,WACtBO,YAAA,CACTC,KAAM,UACNC,QAAS,eAEFC,GACEH,YAAA,CACTC,KAAM,QACNC,QAAS,SAEGE,EAAAA,aAAA,gBAAiB,OAAQD,EACvC,GAEEZ,EAAAc,iBAAiB,QAASd,EAAGI,gBACjC,EACA,OAAAW,CAAQf,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAAa,CAAchB,GACVA,EAAAiB,oBAAoB,QAASjB,EAAGI,gBACpC,GAGYc,EAAQC,EAAAA,qBAAqBrB,EAAe"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("../../utils/index.js");const e=require("../../utils/vue/install.js"),_={created(e,_,i){e.__debounce_originClick__=i.props.onClick,i.props.onClick=()=>{e.__debounce_timer__&&clearInterval(e.__debounce_timer__),e.__debounce_timer__=setTimeout((()=>{e.__debounce_originClick__()}),500)}}},i=e.withInstallDirective(_,"debounce");exports.default=i,exports.vDebounce=i;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickDebounce/index.ts"],"sourcesContent":["/**\n * v-debounce\n * 按钮防抖指令\n */\nimport type { Directive, DirectiveBinding, VNode } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\ninterface ElType extends HTMLElement {\n\t__debounce_timer__: NodeJS.Timeout;\n\t__debounce_originClick__: () => any;\n}\n\nconst DebounceDirective: Directive = {\n\tcreated(el: ElType, binding: DirectiveBinding, vNode: VNode) {\n\t\t// 记录原来的点击事件方法\n\t\tel.__debounce_originClick__ = vNode.props.onClick;\n\n\t\t// 替换原来的点击事件\n\t\tvNode.props.onClick = (): void => {\n\t\t\tif (el.__debounce_timer__) {\n\t\t\t\tclearInterval(el.__debounce_timer__);\n\t\t\t}\n\t\t\t// 防抖处理\n\t\t\tel.__debounce_timer__ = setTimeout(() => {\n\t\t\t\tel.__debounce_originClick__();\n\t\t\t}, 500);\n\t\t};\n\t},\n};\n\nexport const vDebounce = withInstallDirective(DebounceDirective, \"debounce\");\nexport default vDebounce;\n"],"names":["DebounceDirective","created","el","binding","vNode","__debounce_originClick__","props","onClick","__debounce_timer__","clearInterval","setTimeout","vDebounce","withInstallDirective"],"mappings":"0LAYMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,EAA2BC,GAE3CF,EAAAG,yBAA2BD,EAAME,MAAMC,QAGpCH,EAAAE,MAAMC,QAAU,KACjBL,EAAGM,oBACNC,cAAcP,EAAGM,oBAGfN,EAAAM,mBAAqBE,YAAW,KAClCR,EAAGG,0BAAyB,GAC1B,IAAG,CAER,GAGYM,EAAYC,EAAAA,qBAAqBZ,EAAmB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("../../utils/index.js");const e=require("../../utils/vue/install.js"),t={mounted(e){e.style.cursor="move",e.style.position="absolute",e.onmousedown=t=>{const o=t.pageX-e.offsetLeft,s=t.pageY-e.offsetTop;document.onmousemove=t=>{let u=t.pageX-o,l=t.pageY-s;const n=e.parentNode.offsetWidth-e.offsetWidth,i=e.parentNode.offsetHeight-e.offsetHeight;u<0?u=0:u>n&&(u=n),l<0?l=0:l>i&&(l=i),e.style.left=`${u}px`,e.style.top=`${l}px`},document.onmouseup=()=>{document.onmousemove=document.onmouseup=null}}}},o=e.withInstallDirective(t,"draggable");exports.default=o,exports.vDraggable=o;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickDraggable/index.ts"],"sourcesContent":["/*\n\t需求:实现一个拖拽指令,可在父元素区域任意拖拽元素。\n\n\t思路:\n\t\t1、设置需要拖拽的元素为absolute,其父元素为relative。\n\t\t2、鼠标按下(onmousedown)时记录目标元素当前的 left 和 top 值。\n\t\t3、鼠标移动(onmousemove)时计算每次移动的横向距离和纵向距离的变化值,并改变元素的 left 和 top 值\n\t\t4、鼠标松开(onmouseup)时完成一次拖拽\n\n\t使用:在 Dom 上加上 v-draggable 即可\n\t<div class=\"dialog-model\" v-draggable></div>\n*/\nimport type { Directive } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\ninterface ElType extends HTMLElement {\n\tparentNode: any;\n}\n\nconst DraggableDirective: Directive = {\n\tmounted(el: ElType) {\n\t\tel.style.cursor = \"move\";\n\t\tel.style.position = \"absolute\";\n\t\tel.onmousedown = (e): void => {\n\t\t\tconst disX = e.pageX - el.offsetLeft;\n\t\t\tconst disY = e.pageY - el.offsetTop;\n\t\t\tdocument.onmousemove = (e): void => {\n\t\t\t\tlet x = e.pageX - disX;\n\t\t\t\tlet y = e.pageY - disY;\n\t\t\t\tconst maxX = el.parentNode.offsetWidth - el.offsetWidth;\n\t\t\t\tconst maxY = el.parentNode.offsetHeight - el.offsetHeight;\n\t\t\t\tif (x < 0) {\n\t\t\t\t\tx = 0;\n\t\t\t\t} else if (x > maxX) {\n\t\t\t\t\tx = maxX;\n\t\t\t\t}\n\n\t\t\t\tif (y < 0) {\n\t\t\t\t\ty = 0;\n\t\t\t\t} else if (y > maxY) {\n\t\t\t\t\ty = maxY;\n\t\t\t\t}\n\t\t\t\tel.style.left = `${x}px`;\n\t\t\t\tel.style.top = `${y}px`;\n\t\t\t};\n\t\t\tdocument.onmouseup = (): void => {\n\t\t\t\tdocument.onmousemove = document.onmouseup = null;\n\t\t\t};\n\t\t};\n\t},\n};\n\nexport const vDraggable = withInstallDirective(DraggableDirective, \"draggable\");\nexport default vDraggable;\n"],"names":["DraggableDirective","mounted","el","style","cursor","position","onmousedown","e","disX","pageX","offsetLeft","disY","pageY","offsetTop","document","onmousemove","x","y","maxX","parentNode","offsetWidth","maxY","offsetHeight","left","top","onmouseup","vDraggable","withInstallDirective"],"mappings":"0LAmBMA,EAAgC,CACrC,OAAAC,CAAQC,GACPA,EAAGC,MAAMC,OAAS,OAClBF,EAAGC,MAAME,SAAW,WACjBH,EAAAI,YAAeC,IACX,MAAAC,EAAOD,EAAEE,MAAQP,EAAGQ,WACpBC,EAAOJ,EAAEK,MAAQV,EAAGW,UACjBC,SAAAC,YAAeR,IACnB,IAAAS,EAAIT,EAAEE,MAAQD,EACdS,EAAIV,EAAEK,MAAQD,EAClB,MAAMO,EAAOhB,EAAGiB,WAAWC,YAAclB,EAAGkB,YACtCC,EAAOnB,EAAGiB,WAAWG,aAAepB,EAAGoB,aACzCN,EAAI,EACHA,EAAA,EACMA,EAAIE,IACVF,EAAAE,GAGDD,EAAI,EACHA,EAAA,EACMA,EAAII,IACVJ,EAAAI,GAEFnB,EAAAC,MAAMoB,KAAO,GAAGP,MAChBd,EAAAC,MAAMqB,IAAM,GAAGP,KAAC,EAEpBH,SAASW,UAAY,KACXX,SAAAC,YAAcD,SAASW,UAAY,IAAA,CAAA,CAG/C,GAGYC,EAAaC,EAAAA,qBAAqB3B,EAAoB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@element-plus/icons-vue");require("../../utils/index.js");const r=require("element-plus"),o=require("../../utils/string.js"),s=require("../../utils/console.js"),i=require("../../utils/vue/install.js"),n={mounted(i,n){if(i.copyData=n.value,!i.copyData)return;const l=e.h(r.ElIcon,{class:"fa-icon-CopyDocument",title:"复制",onClick:async()=>{try{await o.stringUtil.copy(String(i.copyData)),r.ElMessage({type:"success",message:"复制成功"})}catch(e){r.ElMessage({type:"error",message:"复制失败"}),s.consoleError("CopyDirective","复制失败",e)}}},{default:()=>e.h(t.CopyDocument)}),c=document.createElement("div");e.render(l,c),i.__iconElement__=c.firstChild,i.parentElement.insertBefore(c.firstChild,i)},updated(e,t){e.copyData=t.value},beforeUnmount(e){e.__iconElement__&&e.parentElement.removeChild(e.__iconElement__)}},l=i.withInstallDirective(n,"iconCopy");exports.default=l,exports.vIconCopy=l;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickIconCopy/index.ts"],"sourcesContent":["/**\n * v-iconCopy\n * 左侧插入复制图标,复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport { type Directive, type DirectiveBinding, h, render } from \"vue\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { consoleError, stringUtil, withInstallDirective } from \"@fast-element-plus/utils\";\nimport { ElIcon, ElMessage } from \"element-plus\";\n\ninterface ElType extends HTMLElement {\n\tcopyData: string | number;\n\t__iconElement__: Node;\n}\n\nconst IconCopyDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\n\t\tif (!el.copyData) return;\n\n\t\tconst handleCopyClick = async (): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tconsoleError(\"CopyDirective\", \"复制失败\", error);\n\t\t\t}\n\t\t};\n\n\t\t// 创建 ELIcon 组件\n\t\tconst iconEl = h(\n\t\t\tElIcon,\n\t\t\t{\n\t\t\t\tclass: \"fa-icon-CopyDocument\",\n\t\t\t\ttitle: \"复制\",\n\t\t\t\tonClick: handleCopyClick,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdefault: () => h(CopyDocument),\n\t\t\t}\n\t\t);\n\n\t\tconst tempDiv = document.createElement(\"div\");\n\t\trender(iconEl, tempDiv);\n\n\t\tel.__iconElement__ = tempDiv.firstChild;\n\t\tel.parentElement.insertBefore(tempDiv.firstChild, el);\n\t},\n\tupdated(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tif (el.__iconElement__) {\n\t\t\tel.parentElement.removeChild(el.__iconElement__);\n\t\t}\n\t},\n};\n\nexport const vIconCopy = withInstallDirective(IconCopyDirective, \"iconCopy\");\nexport default vIconCopy;\n"],"names":["IconCopyDirective","mounted","el","binding","copyData","value","iconEl","h","ElIcon","class","title","onClick","async","stringUtil","copy","String","ElMessage","type","message","error","consoleError","default","CopyDocument","tempDiv","document","createElement","__iconElement__","firstChild","parentElement","insertBefore","updated","beforeUnmount","removeChild","vIconCopy","withInstallDirective"],"mappings":"uVAeMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,GAGf,GAFJD,EAAGE,SAAWD,EAAQE,OAEjBH,EAAGE,SAAU,OAElB,MAiBME,EAASC,EAAAA,EACdC,EAAAA,OACA,CACCC,MAAO,uBACPC,MAAO,KACPC,QAtBsBC,UACnB,UACGC,EAAAA,WAAWC,KAAKC,OAAOb,EAAGE,WACtBY,YAAA,CACTC,KAAM,UACNC,QAAS,eAEFC,GACEH,YAAA,CACTC,KAAM,QACNC,QAAS,SAEGE,EAAAA,aAAA,gBAAiB,OAAQD,EACvC,IAWA,CACCE,QAAS,IAAMd,EAAAA,EAAEe,kBAIbC,EAAUC,SAASC,cAAc,gBAChCnB,EAAQiB,GAEfrB,EAAGwB,gBAAkBH,EAAQI,WAC7BzB,EAAG0B,cAAcC,aAAaN,EAAQI,WAAYzB,EACnD,EACA,OAAA4B,CAAQ5B,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAA0B,CAAc7B,GACTA,EAAGwB,iBACHxB,EAAA0B,cAAcI,YAAY9B,EAAGwB,gBAElC,GAGYO,EAAYC,EAAAA,qBAAqBlC,EAAmB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("../../utils/index.js");const e=require("../../utils/vue/install.js"),t={mounted(e,t){if("function"!=typeof t.value)throw"callback must be a function";let n=null;const u=e=>{e.button&&"click"===e.type&&0!==e.button||null===n&&(n=setTimeout((()=>{(e=>{t.value(e)})(e)}),1e3))},l=()=>{null!==n&&(clearTimeout(n),n=null)};e.addEventListener("mousedown",u),e.addEventListener("touchstart",u),e.addEventListener("click",l),e.addEventListener("mouseout",l),e.addEventListener("touchend",l),e.addEventListener("touchcancel",l)}},n=e.withInstallDirective(t,"longpress");exports.default=n,exports.vLongpress=n;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickLongpress/index.ts"],"sourcesContent":["/**\n * v-longpress\n * 长按指令,长按时触发事件\n */\nimport type { Directive, DirectiveBinding } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\nconst LongpressDirective: Directive = {\n\tmounted(el: HTMLElement, binding: DirectiveBinding) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\n\t\t// 运行函数\n\t\tconst handler = (e: MouseEvent | TouchEvent): void => {\n\t\t\tbinding.value(e);\n\t\t};\n\n\t\t// 定义变量\n\t\tlet pressTimer: any = null;\n\t\t// 创建计时器( 2秒后执行函数 )\n\t\tconst start = (e: any): void => {\n\t\t\tif (e.button) {\n\t\t\t\tif (e.type === \"click\" && e.button !== 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pressTimer === null) {\n\t\t\t\tpressTimer = setTimeout(() => {\n\t\t\t\t\thandler(e);\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\t// 取消计时器\n\t\tconst cancel = (): void => {\n\t\t\tif (pressTimer !== null) {\n\t\t\t\tclearTimeout(pressTimer);\n\t\t\t\tpressTimer = null;\n\t\t\t}\n\t\t};\n\t\t// 添加事件监听器\n\t\tel.addEventListener(\"mousedown\", start);\n\t\tel.addEventListener(\"touchstart\", start);\n\t\t// 取消计时器\n\t\tel.addEventListener(\"click\", cancel);\n\t\tel.addEventListener(\"mouseout\", cancel);\n\t\tel.addEventListener(\"touchend\", cancel);\n\t\tel.addEventListener(\"touchcancel\", cancel);\n\t},\n};\n\nexport const vLongpress = withInstallDirective(LongpressDirective, \"longpress\");\nexport default vLongpress;\n"],"names":["LongpressDirective","mounted","el","binding","value","pressTimer","start","e","button","type","setTimeout","handler","cancel","clearTimeout","addEventListener","vLongpress","withInstallDirective"],"mappings":"0LAOMA,EAAgC,CACrC,OAAAC,CAAQC,EAAiBC,GACpB,GAAyB,mBAAlBA,EAAQC,MACZ,KAAA,8BASP,IAAIC,EAAkB,KAEhB,MAAAC,EAASC,IACVA,EAAEC,QACU,UAAXD,EAAEE,MAAiC,IAAbF,EAAEC,QAIV,OAAfH,IACHA,EAAaK,YAAW,KAdV,CAACH,IAChBJ,EAAQC,MAAMG,EAAC,EAcbI,CAAQJ,EAAC,GACP,KACJ,EAGKK,EAAS,KACK,OAAfP,IACHQ,aAAaR,GACAA,EAAA,KACd,EAGEH,EAAAY,iBAAiB,YAAaR,GAC9BJ,EAAAY,iBAAiB,aAAcR,GAE/BJ,EAAAY,iBAAiB,QAASF,GAC1BV,EAAAY,iBAAiB,WAAYF,GAC7BV,EAAAY,iBAAiB,WAAYF,GAC7BV,EAAAY,iBAAiB,cAAeF,EACpC,GAGYG,EAAaC,EAAAA,qBAAqBhB,EAAoB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("../../utils/index.js");const e=require("../../utils/vue/install.js"),t={mounted(e,t){if("function"!=typeof t.value)throw"callback must be a function";let l=null;e.__handleClick__=()=>{l&&clearTimeout(l),e.disabled||(e.disabled=!0,t.value(),l=setTimeout((()=>{e.disabled=!1}),1e3))},e.addEventListener("click",e.__handleClick__)},beforeUnmount(e){e.removeEventListener("click",e.__handleClick__)}},l=e.withInstallDirective(t,"throttle");exports.default=l,exports.vThrottle=l;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/directives/clickThrottle/index.ts"],"sourcesContent":["/*\n 需求:防止按钮在短时间内被多次点击,使用节流函数限制规定时间内只能点击一次。\n\n 思路:\n 1、第一次点击,立即调用方法并禁用按钮,等延迟结束再次激活按钮\n 2、将需要触发的方法绑定在指令上\n\n 使用:给 Dom 加上 v-throttle 及回调函数即可\n <button v-throttle=\"debounceClick\">节流提交</button>\n*/\nimport type { Directive, DirectiveBinding } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\ninterface ElType extends HTMLElement {\n\t__handleClick__: () => any;\n\tdisabled: boolean;\n}\n\nconst ThrottleDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\t\tlet timer: NodeJS.Timeout | null = null;\n\t\tel.__handleClick__ = (): void => {\n\t\t\tif (timer) {\n\t\t\t\tclearTimeout(timer);\n\t\t\t}\n\t\t\tif (!el.disabled) {\n\t\t\t\tel.disabled = true;\n\t\t\t\tbinding.value();\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tel.disabled = false;\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vThrottle = withInstallDirective(ThrottleDirective, \"throttle\");\nexport default vThrottle;\n"],"names":["ThrottleDirective","mounted","el","binding","value","timer","__handleClick__","clearTimeout","disabled","setTimeout","addEventListener","beforeUnmount","removeEventListener","vThrottle","withInstallDirective"],"mappings":"0LAkBMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,GACf,GAAyB,mBAAlBA,EAAQC,MACZ,KAAA,8BAEP,IAAIC,EAA+B,KACnCH,EAAGI,gBAAkB,KAChBD,GACHE,aAAaF,GAETH,EAAGM,WACPN,EAAGM,UAAW,EACdL,EAAQC,QACRC,EAAQI,YAAW,KAClBP,EAAGM,UAAW,CAAA,GACZ,KACJ,EAEEN,EAAAQ,iBAAiB,QAASR,EAAGI,gBACjC,EACA,aAAAK,CAAcT,GACVA,EAAAU,oBAAoB,QAASV,EAAGI,gBACpC,GAGYO,EAAYC,EAAAA,qBAAqBd,EAAmB"}
|
package/lib/directives/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./clickCopy/index.js"),r=require("./clickDebounce/index.js"),o=require("./clickDraggable/index.js"),s=require("./clickIconCopy/index.js"),c=require("./clickLongpress/index.js"),i=require("./clickThrottle/index.js");exports.vCopy=e.vCopy,exports.vDebounce=r.vDebounce,exports.vDraggable=o.vDraggable,exports.vIconCopy=s.vIconCopy,exports.vLongpress=c.vLongpress,exports.vThrottle=i.vThrottle;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../packages/fast-element-plus/component.ts"],"sourcesContent":["import type { Plugin } from \"vue\";\nimport { FaIcon } from \"@fast-element-plus/components/icon\";\n\nexport default [FaIcon] as Plugin[];\n"],"names":["FastElementPlusComponents"],"mappings":"kHAGeA,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../directives/clickCopy/index.js"),i=require("../directives/clickDebounce/index.js"),r=require("../directives/clickDraggable/index.js"),c=require("../directives/clickIconCopy/index.js"),s=require("../directives/clickLongpress/index.js"),o=require("../directives/clickThrottle/index.js"),t=[e.vCopy,i.vDebounce,r.vDraggable,c.vIconCopy,s.vLongpress,o.vThrottle];exports.default=t;
|
|
2
|
-
//# sourceMappingURL=directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directive.js","sources":["../../../packages/fast-element-plus/directive.ts"],"sourcesContent":["import { vCopy } from \"@fast-element-plus/directives/clickCopy\";\nimport { vDebounce } from \"@fast-element-plus/directives/clickDebounce\";\nimport { vDraggable } from \"@fast-element-plus/directives/clickDraggable\";\nimport { vIconCopy } from \"@fast-element-plus/directives/clickIconCopy\";\nimport { vLongpress } from \"@fast-element-plus/directives/clickLongpress\";\nimport { vThrottle } from \"@fast-element-plus/directives/clickThrottle\";\n\nexport default [vCopy, vDebounce, vDraggable, vIconCopy, vLongpress, vThrottle];\n"],"names":["FastElementPlusDirectives","vCopy","vDebounce","vDraggable","vIconCopy","vLongpress","vThrottle"],"mappings":"4ZAOAA,EAAe,CAACC,EAAAA,MAAOC,EAAAA,UAAWC,EAAAA,WAAYC,EAAAA,UAAWC,EAAAA,WAAYC,EAAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@element-plus/icons-vue");require("../hooks/index.js"),require("../utils/index.js");const o=require("element-plus"),t=require("../hooks/useOverlay/index.js"),l=require("../utils/vue/func.js"),n=require("../utils/console.js"),r=require("../utils/errorHandler.js");function s(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:()=>e[t]})}return o.default=e,Object.freeze(o)}const u=s(e);o.ElDialog.props={...o.ElDialog.props,draggable:{type:Boolean,default:!0}},o.ElInput.props={...o.ElInput.props,showWordLimit:{type:Boolean,default:!0}};const i=(e,s,u)=>{if((null==(s=s??{})?void 0:s.title)||(s.title="温馨提示"),null==(null==s?void 0:s.draggable)&&(s.draggable=!0),(null==s?void 0:s.cancelButtonText)||(s.cancelButtonText="取消"),(null==s?void 0:s.confirmButtonText)||(s.confirmButtonText="确定"),null==(null==s?void 0:s.closeOnClickModal)&&(s.closeOnClickModal=!1),null==(null==s?void 0:s.closeOnPressEscape)&&(s.closeOnPressEscape=!1),null!=(null==s?void 0:s.beforeClose)){const e=s.beforeClose,o=(null==s?void 0:s.confirmButtonText)??"确定",u=(null==s?void 0:s.showCancelButton)??!1;s.beforeClose=(s,i,c)=>{if("confirm"===s){t.useOverlay.show(0),i.confirmButtonLoading=!0,i.showCancelButton=!1,i.confirmButtonText="加载中...";const a=()=>{i.confirmButtonLoading=!1,i.showCancelButton=u,i.confirmButtonText=o,t.useOverlay.hide()},d=()=>{a(),c()};l.execAsyncFunction(e,s,i,d).then((()=>{d()})).catch((e=>{n.consoleError("MessageBox",e),a(),r.errorHandler(e)}))}else c()}}switch(u){case"alert":break;case"confirm":case"prompt":null==(null==s?void 0:s.showCancelButton)&&(s.showCancelButton=!0)}return o.ElMessageBox(Object.assign({message:e},s,{boxType:u}))};o.ElMessageBox.alert=(e,o)=>i(e,o,"alert"),o.ElMessageBox.prompt=(e,o)=>i(e,o,"prompt"),o.ElMessageBox.confirm=(e,o)=>i(e,o,"confirm");exports.installElementPlus=e=>{for(const[o,t]of Object.entries(u))e.component(`el-icon-${o}`,t);e.use(o)};
|
|
2
|
-
//# sourceMappingURL=element-plus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element-plus.js","sources":["../../../packages/fast-element-plus/element-plus.ts"],"sourcesContent":["/** Element Plus 组件全局配置 */\n\nimport type { App } from \"vue\";\nimport * as ElementPlusIconsVue from \"@element-plus/icons-vue\";\nimport { useOverlay } from \"@fast-element-plus/hooks\";\nimport { consoleError, errorHandler, execAsyncFunction } from \"@fast-element-plus/utils\";\nimport type { Action, ElMessageBoxOptions, MessageBoxData, MessageBoxState } from \"element-plus\";\nimport ElementPlus, { ElDialog, ElInput, ElMessageBox } from \"element-plus\";\n\n// ELDialog 默认拖拽\nElDialog.props = {\n\t...ElDialog.props,\n\tdraggable: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\n// ELInput 默认显示统计字数\nElInput.props = {\n\t...ElInput.props,\n\tshowWordLimit: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n};\n\n// ElMessageBox 默认配置\nconst elMessageBox = (\n\tmessage: ElMessageBoxOptions[\"message\"],\n\toptions: ElMessageBoxOptions,\n\ttype: \"alert\" | \"confirm\" | \"prompt\"\n): Promise<MessageBoxData> => {\n\toptions = options ?? {};\n\tif (!options?.title) {\n\t\t// 默认提示\n\t\toptions.title = \"温馨提示\";\n\t}\n\tif (options?.draggable == undefined) {\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 (options?.closeOnClickModal == undefined) {\n\t\t// 默认 是否可通过点击遮罩层关闭 MessageBox\n\t\toptions.closeOnClickModal = false;\n\t}\n\tif (options?.closeOnPressEscape == undefined) {\n\t\t// 默认 是否可通过按下 ESC 键关闭 MessageBox\n\t\toptions.closeOnPressEscape = false;\n\t}\n\n\t// 关闭之前的判断逻辑\n\tif (options?.beforeClose != undefined) {\n\t\tconst localBeforeClose = options.beforeClose;\n\t\tconst localConfirmButtonText = options?.confirmButtonText ?? \"确定\";\n\t\tconst localShowCancelButton = options?.showCancelButton ?? false;\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\texecAsyncFunction(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\terrorHandler(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 (options?.showCancelButton == undefined) {\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\nElMessageBox.alert = (message: ElMessageBoxOptions[\"message\"], options?: ElMessageBoxOptions): Promise<MessageBoxData> =>\n\telMessageBox(message, options, \"alert\");\n\nElMessageBox.prompt = (message: ElMessageBoxOptions[\"message\"], options?: ElMessageBoxOptions): Promise<MessageBoxData> =>\n\telMessageBox(message, options, \"prompt\");\n\nElMessageBox.confirm = (message: ElMessageBoxOptions[\"message\"], options?: ElMessageBoxOptions): Promise<MessageBoxData> =>\n\telMessageBox(message, options, \"confirm\");\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","ElInput","showWordLimit","elMessageBox","message","options","title","cancelButtonText","confirmButtonText","closeOnClickModal","closeOnPressEscape","beforeClose","localBeforeClose","localConfirmButtonText","localShowCancelButton","showCancelButton","action","instance","done","show","confirmButtonLoading","cancelLoading","useOverlay","hide","newDone","execAsyncFunction","then","catch","error","errorHandler","ElMessageBox","Object","assign","boxType","alert","prompt","confirm","app","key","component","entries","ElementPlusIconsVue","use","ElementPlus"],"mappings":"goBAUAA,EAAAA,SAASC,MAAQ,IACbD,EAASA,SAAAC,MACZC,UAAW,CACVC,KAAMC,QACNC,SAAS,IAKXC,EAAAA,QAAQL,MAAQ,IACZK,EAAQA,QAAAL,MACXM,cAAe,CACdJ,KAAMC,QACNC,SAAS,IAKX,MAAMG,EAAe,CACpBC,EACAC,EACAP,KA6BI,WA3BJO,EAAUA,GAAW,aACPC,SAEbD,EAAQC,MAAQ,QAES,OAAtB,MAAAD,OAAA,EAAAA,EAASR,aAEZQ,EAAQR,WAAY,UAEhBQ,WAASE,oBAEbF,EAAQE,iBAAmB,aAEvBF,WAASG,qBAEbH,EAAQG,kBAAoB,MAEK,OAA9B,MAAAH,OAAA,EAAAA,EAASI,qBAEZJ,EAAQI,mBAAoB,GAEM,OAA/B,MAAAJ,OAAA,EAAAA,EAASK,sBAEZL,EAAQK,oBAAqB,GAIF,OAAxB,MAAAL,OAAA,EAAAA,EAASM,aAA0B,CACtC,MAAMC,EAAmBP,EAAQM,YAC3BE,SAAyBR,WAASG,oBAAqB,KACvDM,SAAwBT,WAASU,oBAAoB,EAC3DV,EAAQM,YAAc,CAACK,EAAgBC,EAA2BC,KACjE,GAAe,YAAXF,EAAsB,cACdG,KAAK,GAChBF,EAASG,sBAAuB,EAChCH,EAASF,kBAAmB,EAC5BE,EAAST,kBAAoB,SAE7B,MAAMa,EAAgB,KACrBJ,EAASG,sBAAuB,EAChCH,EAASF,iBAAmBD,EAC5BG,EAAST,kBAAoBK,EAC7BS,EAAAA,WAAWC,MAAK,EAGXC,EAAU,cAKhBC,EAAAA,kBAAkBb,EAAkBI,EAAQC,EAAUO,GACpDE,MAAK,YAGLC,OAAOC,mBACM,aAAcA,OAE3BC,EAAAA,aAAaD,EAAK,GAClB,SAGH,CAEF,CAGA,OAAQ9B,GACP,IAAK,QACJ,MACD,IAAK,UAKL,IAAK,SAC6B,OAA7B,MAAAO,OAAA,EAAAA,EAASU,oBACZV,EAAQU,kBAAmB,GAKvB,OAAAe,EAAAA,aACNC,OAAOC,OACN,CACC5B,WAEDC,EACA,CACC4B,QAASnC,IAEX,EAIFgC,EAAAA,aAAaI,MAAQ,CAAC9B,EAAyCC,IAC9DF,EAAaC,EAASC,EAAS,SAEhCyB,EAAAA,aAAaK,OAAS,CAAC/B,EAAyCC,IAC/DF,EAAaC,EAASC,EAAS,UAEhCyB,EAAAA,aAAaM,QAAU,CAAChC,EAAyCC,IAChEF,EAAaC,EAASC,EAAS,sCAEGgC,IAElC,IAAA,MAAYC,EAAKC,KAAcR,OAAOS,QAAQC,GAE7CJ,EAAIE,UAAU,WAAWD,IAAOC,GAIjCF,EAAIK,IAAIC,EAAW"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@fast-element-plus/icons-vue"),t=require("./component.js"),s=require("./directive.js");exports.installFastElementPlus=r=>{r.use(e),t.default.forEach((e=>r.use(e))),s.default.forEach((e=>r.use(e)))};
|
|
2
|
-
//# sourceMappingURL=fast-element-plus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fast-element-plus.js","sources":["../../../packages/fast-element-plus/fast-element-plus.ts"],"sourcesContent":["import type { App } from \"vue\";\nimport FastElementPlusIconsVue from \"@fast-element-plus/icons-vue\";\nimport FastElementPlusComponents from \"./component\";\nimport FastElementPlusDirectives from \"./directive\";\n\nconst installFastElementPlus = (app: App): void => {\n\t/** 注册 Fast Icon 组件库 */\n\tapp.use(FastElementPlusIconsVue);\n\n\tFastElementPlusComponents.forEach((c) => app.use(c));\n\n\tFastElementPlusDirectives.forEach((d) => app.use(d));\n};\n\nexport { installFastElementPlus };\n"],"names":["app","use","FastElementPlusIconsVue","FastElementPlusComponents","default","forEach","c","FastElementPlusDirectives","d"],"mappings":"uNAKgCA,IAE/BA,EAAIC,IAAIC,GAERC,EAAAC,QAA0BC,SAASC,GAAMN,EAAIC,IAAIK,KAEjDC,EAAAH,QAA0BC,SAASG,GAAMR,EAAIC,IAAIO,IAAE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../settings/index.js");require("../utils/index.js");const r=require("./element-plus.js"),s=require("./fast-element-plus.js"),t=require("./version.js"),l=require("../utils/errorHandler.js"),i=require("../utils/deviceId.js"),n=Symbol("INSTALLED_KEY");exports.INSTALLED_KEY=n,exports.makeInstaller=()=>({version:t.fastElementPlusVersion,install:(t,o)=>{t[n]||(t[n]=!0,t.config.errorHandler=l.errorHandler,i.makeIdentity(),o&&e.setFastOptions(o),r.installElementPlus(t),s.installFastElementPlus(t))}});
|
|
2
|
-
//# sourceMappingURL=make-installer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"make-installer.js","sources":["../../../packages/fast-element-plus/make-installer.ts"],"sourcesContent":["import type { App } from \"vue\";\nimport { type FastOptions, setFastOptions } from \"@fast-element-plus/settings\";\nimport { errorHandler, makeIdentity } from \"@fast-element-plus/utils\";\nimport { installElementPlus } from \"./element-plus\";\nimport { installFastElementPlus } from \"./fast-element-plus\";\nimport { fastElementPlusVersion } from \"./version\";\n\nexport const INSTALLED_KEY = Symbol(\"INSTALLED_KEY\");\n\nexport const makeInstaller = (): {\n\tversion: string;\n\tinstall: (app: App, options?: FastOptions) => void;\n} => {\n\tconst install = (app: App, options?: FastOptions): void => {\n\t\tif (app[INSTALLED_KEY]) return;\n\n\t\tapp[INSTALLED_KEY] = true;\n\n\t\t// 全局异常捕获\n\t\tapp.config.errorHandler = errorHandler;\n\n\t\tmakeIdentity();\n\n\t\tif (options) {\n\t\t\tsetFastOptions(options);\n\t\t}\n\n\t\tinstallElementPlus(app);\n\t\tinstallFastElementPlus(app);\n\t};\n\n\treturn {\n\t\tversion: fastElementPlusVersion,\n\t\tinstall,\n\t};\n};\n"],"names":["INSTALLED_KEY","Symbol","version","fastElementPlusVersion","install","app","options","config","errorHandler","makeIdentity","setFastOptions","installElementPlus","installFastElementPlus"],"mappings":"gUAOaA,EAAgBC,OAAO,+DAEP,KAsBrB,CACNC,QAASC,EAAAA,uBACTC,QApBe,CAACC,EAAUC,KACtBD,EAAIL,KAERK,EAAIL,IAAiB,EAGjBK,EAAAE,OAAOC,aAAeA,eAEbC,EAAAA,eAETH,GACHI,EAAAA,eAAeJ,GAGhBK,EAAAA,mBAAmBN,GACnBO,EAAAA,uBAAuBP,GAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../packages/fast-element-plus/version.ts"],"sourcesContent":["/**\n * 组件库版本号\n */\nexport const fastElementPlusVersion = \"1.4.18\";\n"],"names":[],"mappings":"+GAGsC"}
|
package/lib/hooks/index.d.ts
DELETED
package/lib/hooks/index.js
DELETED
package/lib/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o={show:()=>{if(!window.loading){const e=document.body,o=document.createElement("div");o.className="__fa-loading",o.innerHTML='\n<div class="__fa-loading__box">\n\t<div class="__fa-loading__box-warp">\n\t\t\t<div class="__fa-loading__box-warp__item"></div>\n\t</div>\n</div>\n',e.insertBefore(o,e.childNodes[0]),window.loading=!0}},hide:()=>{window.loading&&e.nextTick((()=>{setTimeout((()=>{var e;const o=document.querySelector(".__fa-loading__box");o&&(null==(e=o.parentNode)||e.removeChild(o)),window.loading=!1}),500)}))}};exports.useLoading=o;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/hooks/useLoading/index.ts"],"sourcesContent":["import { nextTick } from \"vue\";\n\nexport const useLoading = {\n\tshow: (): void => {\n\t\t// 判断是否存在加载效果\n\t\tif (!window.loading) {\n\t\t\tconst bodyEl: Element = document.body;\n\t\t\tconst div = document.createElement(\"div\");\n\t\t\tdiv.className = \"__fa-loading\";\n\t\t\tdiv.innerHTML = `\n<div class=\"__fa-loading__box\">\n\t<div class=\"__fa-loading__box-warp\">\n\t\t\t<div class=\"__fa-loading__box-warp__item\"></div>\n\t</div>\n</div>\n`;\n\t\t\tbodyEl.insertBefore(div, bodyEl.childNodes[0]);\n\t\t\twindow.loading = true;\n\t\t}\n\t},\n\thide: (): void => {\n\t\t// 判断是否存在加载效果\n\t\tif (window.loading) {\n\t\t\tnextTick(() => {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tconst loadingEl = document.querySelector(\".__fa-loading__box\");\n\t\t\t\t\tloadingEl && loadingEl.parentNode?.removeChild(loadingEl);\n\t\t\t\t\twindow.loading = false;\n\t\t\t\t}, 500);\n\t\t\t});\n\t\t}\n\t},\n};\n"],"names":["useLoading","show","window","loading","bodyEl","document","body","div","createElement","className","innerHTML","insertBefore","childNodes","hide","nextTick","setTimeout","loadingEl","querySelector","_a","parentNode","removeChild"],"mappings":"uGAEaA,EAAa,CACzBC,KAAM,KAED,IAACC,OAAOC,QAAS,CACpB,MAAMC,EAAkBC,SAASC,KAC3BC,EAAMF,SAASG,cAAc,OACnCD,EAAIE,UAAY,eAChBF,EAAIG,UAAY,wJAOhBN,EAAOO,aAAaJ,EAAKH,EAAOQ,WAAW,IAC3CV,OAAOC,SAAU,CAClB,GAEDU,KAAM,KAEDX,OAAOC,SACVW,EAAAA,UAAS,KACRC,YAAW,WACJ,MAAAC,EAAYX,SAASY,cAAc,sBAC5BD,IAAA,OAAAE,EAAAF,EAAUG,aAAVD,EAAsBE,YAAYJ,IAC/Cd,OAAOC,SAAU,CAAA,GACf,IAAG,GAER"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o={show:(e=0)=>{if(!window.overlay){const o=document.body,r=document.createElement("div");r.className="__fa-overlay",r.style.backgroundColor=`rgba(0, 0, 0, ${e})`,o.insertBefore(r,o.childNodes[0]),window.overlay=!0}},hide:()=>{window.overlay&&e.nextTick((()=>{var e;const o=document.querySelector(".__fa-overlay");o&&(null==(e=o.parentNode)||e.removeChild(o)),window.overlay=!1}))}};exports.useOverlay=o;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/hooks/useOverlay/index.ts"],"sourcesContent":["import { nextTick } from \"vue\";\n\nexport const useOverlay = {\n\tshow: (transparent = 0): void => {\n\t\t// 判断是否存在遮罩层\n\t\tif (!window.overlay) {\n\t\t\tconst bodyEl: Element = document.body;\n\t\t\tconst div = document.createElement(\"div\");\n\t\t\tdiv.className = \"__fa-overlay\";\n\t\t\tdiv.style.backgroundColor = `rgba(0, 0, 0, ${transparent})`;\n\t\t\tbodyEl.insertBefore(div, bodyEl.childNodes[0]);\n\t\t\twindow.overlay = true;\n\t\t}\n\t},\n\thide: (): void => {\n\t\t// 判断是否存在遮罩层\n\t\tif (window.overlay) {\n\t\t\tnextTick(() => {\n\t\t\t\tconst loadingEl = document.querySelector(\".__fa-overlay\");\n\t\t\t\tloadingEl && loadingEl.parentNode?.removeChild(loadingEl);\n\t\t\t\twindow.overlay = false;\n\t\t\t});\n\t\t}\n\t},\n};\n"],"names":["useOverlay","show","transparent","window","overlay","bodyEl","document","body","div","createElement","className","style","backgroundColor","insertBefore","childNodes","hide","nextTick","loadingEl","querySelector","_a","parentNode","removeChild"],"mappings":"uGAEaA,EAAa,CACzBC,KAAM,CAACC,EAAc,KAEhB,IAACC,OAAOC,QAAS,CACpB,MAAMC,EAAkBC,SAASC,KAC3BC,EAAMF,SAASG,cAAc,OACnCD,EAAIE,UAAY,eACZF,EAAAG,MAAMC,gBAAkB,iBAAiBV,KAC7CG,EAAOQ,aAAaL,EAAKH,EAAOS,WAAW,IAC3CX,OAAOC,SAAU,CAClB,GAEDW,KAAM,KAEDZ,OAAOC,SACVY,EAAAA,UAAS,WACF,MAAAC,EAAYX,SAASY,cAAc,iBAC5BD,IAAA,OAAAE,EAAAF,EAAUG,aAAVD,EAAsBE,YAAYJ,IAC/Cd,OAAOC,SAAU,CAAA,GAEnB"}
|
|
File without changes
|
package/lib/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { INSTALLED_KEY } from './fast-element-plus';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './constants';
|
|
4
|
-
export * from './directives';
|
|
5
|
-
export * from './hooks';
|
|
6
|
-
export * from './settings';
|
|
7
|
-
export * from './stores';
|
|
8
|
-
export * from './utils';
|
|
9
|
-
export { INSTALLED_KEY };
|
|
10
|
-
declare const installer: {
|
|
11
|
-
version: string;
|
|
12
|
-
install: (app: import('vue').App, options?: import('./settings').FastOptions) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare const install: (app: import('vue').App, options?: import('./settings').FastOptions) => void;
|
|
15
|
-
export declare const version: string;
|
|
16
|
-
export default installer;
|