@fmdevui/fm-dev 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/es/core/index.d.ts +2 -0
  2. package/es/core/ui/components/index.d.ts +2 -0
  3. package/es/core/ui/components/noticeBar/index.vue.d.ts +114 -0
  4. package/es/core/ui/components/noticeBar/style/css.d.ts +1 -0
  5. package/es/core/ui/components/noticeBar/style/index.d.ts +1 -0
  6. package/es/core/ui/components/svgIcon/index.d.ts +7 -0
  7. package/es/core/ui/components/svgIcon/svgicon.vue.d.ts +27 -0
  8. package/es/core/ui/components/transfer/index.vue.d.ts +59 -0
  9. package/es/core/ui/components/transfer/style/css.d.ts +1 -0
  10. package/es/core/ui/components/transfer/style/index.d.ts +1 -0
  11. package/es/core/ui/loading/index.d.ts +9 -0
  12. package/es/index.mjs +2 -0
  13. package/es/packages/core/index.mjs +2 -0
  14. package/es/packages/core/ui/components/index.mjs +18 -0
  15. package/es/packages/core/ui/components/noticeBar/index.vue.mjs +5 -0
  16. package/es/packages/core/ui/components/noticeBar/index.vue2.mjs +126 -0
  17. package/es/packages/core/ui/components/noticeBar/style/css.mjs +1 -0
  18. package/es/packages/core/ui/components/noticeBar/style/index.mjs +1 -0
  19. package/es/packages/core/ui/components/svgIcon/index.mjs +13 -0
  20. package/es/packages/core/ui/components/svgIcon/svgicon.vue.mjs +5 -0
  21. package/es/packages/core/ui/components/svgIcon/svgicon.vue2.mjs +87 -0
  22. package/es/packages/core/ui/components/transfer/index.vue.mjs +5 -0
  23. package/es/packages/core/ui/components/transfer/index.vue2.mjs +370 -0
  24. package/es/packages/core/ui/components/transfer/style/css.mjs +1 -0
  25. package/es/packages/core/ui/components/transfer/style/index.mjs +1 -0
  26. package/es/packages/core/ui/loading/index.mjs +40 -0
  27. package/index.css +1 -0
  28. package/index.js +6692 -3
  29. package/index.min.js +43 -24
  30. package/index.min.mjs +42 -23
  31. package/index.mjs +6692 -5
  32. package/lib/core/index.d.ts +2 -0
  33. package/lib/core/ui/components/index.d.ts +2 -0
  34. package/lib/core/ui/components/noticeBar/index.vue.d.ts +114 -0
  35. package/lib/core/ui/components/noticeBar/style/css.d.ts +1 -0
  36. package/lib/core/ui/components/noticeBar/style/index.d.ts +1 -0
  37. package/lib/core/ui/components/svgIcon/index.d.ts +7 -0
  38. package/lib/core/ui/components/svgIcon/svgicon.vue.d.ts +27 -0
  39. package/lib/core/ui/components/transfer/index.vue.d.ts +59 -0
  40. package/lib/core/ui/components/transfer/style/css.d.ts +1 -0
  41. package/lib/core/ui/components/transfer/style/index.d.ts +1 -0
  42. package/lib/core/ui/loading/index.d.ts +9 -0
  43. package/lib/index.js +47 -43
  44. package/lib/packages/core/index.js +47 -43
  45. package/lib/packages/core/ui/components/index.js +20 -0
  46. package/lib/packages/core/ui/components/noticeBar/index.vue.js +9 -0
  47. package/lib/packages/core/ui/components/noticeBar/index.vue2.js +130 -0
  48. package/lib/packages/core/ui/components/noticeBar/style/css.js +4 -0
  49. package/lib/packages/core/ui/components/noticeBar/style/index.js +4 -0
  50. package/lib/packages/core/ui/components/svgIcon/index.js +34 -0
  51. package/lib/packages/core/ui/components/svgIcon/svgicon.vue.js +9 -0
  52. package/lib/packages/core/ui/components/svgIcon/svgicon.vue2.js +91 -0
  53. package/lib/packages/core/ui/components/transfer/index.vue.js +9 -0
  54. package/lib/packages/core/ui/components/transfer/index.vue2.js +374 -0
  55. package/lib/packages/core/ui/components/transfer/style/css.js +4 -0
  56. package/lib/packages/core/ui/components/transfer/style/index.js +4 -0
  57. package/lib/packages/core/ui/loading/index.js +42 -0
  58. package/package.json +1 -1
  59. package/theme-chalk/index.css +1 -0
  60. package/theme-chalk/src/index.scss +2 -0
  61. package/theme-chalk/src/t-noticebar.scss +32 -0
  62. package/theme-chalk/src/t-transfer.scss +46 -0
  63. package/theme-chalk/t-t-noticebar.css +1 -0
  64. package/theme-chalk/t-t-transfer.css +1 -0
@@ -1,4 +1,6 @@
1
+ export * from './ui/components';
1
2
  export * from './ui/login';
3
+ export * from './ui/loading';
2
4
  export * from './api';
3
5
  export * from './directive';
4
6
  export * from './locales';
@@ -0,0 +1,2 @@
1
+ declare function initCommonUI(app: any): void;
2
+ export { initCommonUI };
@@ -0,0 +1,114 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ mode: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ text: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ color: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ background: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ size: {
20
+ type: (NumberConstructor | StringConstructor)[];
21
+ default: number;
22
+ };
23
+ height: {
24
+ type: NumberConstructor;
25
+ default: number;
26
+ };
27
+ delay: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ speed: {
32
+ type: NumberConstructor;
33
+ default: number;
34
+ };
35
+ scrollable: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ leftIcon: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ rightIcon: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
48
+ close: (...args: any[]) => void;
49
+ link: (...args: any[]) => void;
50
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
51
+ mode: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ text: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ color: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ background: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ size: {
68
+ type: (NumberConstructor | StringConstructor)[];
69
+ default: number;
70
+ };
71
+ height: {
72
+ type: NumberConstructor;
73
+ default: number;
74
+ };
75
+ delay: {
76
+ type: NumberConstructor;
77
+ default: number;
78
+ };
79
+ speed: {
80
+ type: NumberConstructor;
81
+ default: number;
82
+ };
83
+ scrollable: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ leftIcon: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ rightIcon: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ }>> & Readonly<{
96
+ onClose?: ((...args: any[]) => any) | undefined;
97
+ onLink?: ((...args: any[]) => any) | undefined;
98
+ }>, {
99
+ text: string;
100
+ size: string | number;
101
+ mode: string;
102
+ height: number;
103
+ background: string;
104
+ color: string;
105
+ delay: number;
106
+ speed: number;
107
+ scrollable: boolean;
108
+ leftIcon: string;
109
+ rightIcon: string;
110
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
111
+ noticeBarWarpRef: HTMLDivElement;
112
+ noticeBarTextRef: HTMLDivElement;
113
+ }, HTMLDivElement>;
114
+ export default _default;
@@ -0,0 +1 @@
1
+ import "fm-dev/theme-chalk/t-noticebar.css";
@@ -0,0 +1 @@
1
+ import "fm-dev/theme-chalk/src/t-noticebar.scss";
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ /**
3
+ * 导出全局注册 element plus svg 图标
4
+ * @param app vue 实例
5
+ * @description 使用:https://element-plus.gitee.io/zh-CN/component/icon.html
6
+ */
7
+ export declare function elSvg(app: App): void;
@@ -0,0 +1,27 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ name: {
4
+ type: StringConstructor;
5
+ };
6
+ size: {
7
+ type: NumberConstructor;
8
+ default: () => number;
9
+ };
10
+ color: {
11
+ type: StringConstructor;
12
+ };
13
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
14
+ name: {
15
+ type: StringConstructor;
16
+ };
17
+ size: {
18
+ type: NumberConstructor;
19
+ default: () => number;
20
+ };
21
+ color: {
22
+ type: StringConstructor;
23
+ };
24
+ }>> & Readonly<{}>, {
25
+ size: number;
26
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
27
+ export default _default;
@@ -0,0 +1,59 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ leftTitle: StringConstructor;
4
+ rightTitle: StringConstructor;
5
+ options: {
6
+ type: ObjectConstructor;
7
+ default: () => {
8
+ value: string;
9
+ label: string;
10
+ disabled: string;
11
+ };
12
+ };
13
+ leftData: {
14
+ type: ArrayConstructor;
15
+ default: () => never[];
16
+ };
17
+ rightData: {
18
+ type: ArrayConstructor;
19
+ default: () => never[];
20
+ };
21
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
22
+ left: (...args: any[]) => void;
23
+ right: (...args: any[]) => void;
24
+ allLeft: (...args: any[]) => void;
25
+ allRight: (...args: any[]) => void;
26
+ "update:leftData": (...args: any[]) => void;
27
+ "update:rightData": (...args: any[]) => void;
28
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
29
+ leftTitle: StringConstructor;
30
+ rightTitle: StringConstructor;
31
+ options: {
32
+ type: ObjectConstructor;
33
+ default: () => {
34
+ value: string;
35
+ label: string;
36
+ disabled: string;
37
+ };
38
+ };
39
+ leftData: {
40
+ type: ArrayConstructor;
41
+ default: () => never[];
42
+ };
43
+ rightData: {
44
+ type: ArrayConstructor;
45
+ default: () => never[];
46
+ };
47
+ }>> & Readonly<{
48
+ onLeft?: ((...args: any[]) => any) | undefined;
49
+ onRight?: ((...args: any[]) => any) | undefined;
50
+ onAllLeft?: ((...args: any[]) => any) | undefined;
51
+ onAllRight?: ((...args: any[]) => any) | undefined;
52
+ "onUpdate:leftData"?: ((...args: any[]) => any) | undefined;
53
+ "onUpdate:rightData"?: ((...args: any[]) => any) | undefined;
54
+ }>, {
55
+ options: Record<string, any>;
56
+ leftData: unknown[];
57
+ rightData: unknown[];
58
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
59
+ export default _default;
@@ -0,0 +1 @@
1
+ import "fm-dev/theme-chalk/t-transfer.css";
@@ -0,0 +1 @@
1
+ import "fm-dev/theme-chalk/src/t-transfer.scss";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 页面全局 Loading
3
+ * @method start 创建 loading
4
+ * @method done 移除 loading
5
+ */
6
+ export declare const NextLoading: {
7
+ start: () => void;
8
+ done: (time?: number) => void;
9
+ };
package/es/index.mjs CHANGED
@@ -1,7 +1,9 @@
1
1
  import installer from './defaults.mjs';
2
2
  import './packages/core/index.mjs';
3
3
  export { version } from './version.mjs';
4
+ export { initCommonUI } from './packages/core/ui/components/index.mjs';
4
5
  export { FmLogin } from './packages/core/ui/login/index.mjs';
6
+ export { NextLoading } from './packages/core/ui/loading/index.mjs';
5
7
  export { useBaseApi } from './packages/core/api/base/index.mjs';
6
8
  export { feature, useSysApi } from './packages/core/api/sys/index.mjs';
7
9
  export { useLoginApi } from './packages/core/api/login/index.mjs';
@@ -1,4 +1,6 @@
1
+ export { initCommonUI } from './ui/components/index.mjs';
1
2
  export { FmLogin } from './ui/login/index.mjs';
3
+ export { NextLoading } from './ui/loading/index.mjs';
2
4
  import './api/index.mjs';
3
5
  export { directive } from './directive/index.mjs';
4
6
  export { getCountryCode, i18n, iso_3166_1_CountryList, languageList, mergMessage, setupI18n } from './locales/index.mjs';
@@ -0,0 +1,18 @@
1
+ import './transfer/index.vue.mjs';
2
+ import './noticeBar/index.vue.mjs';
3
+ import { elSvg } from './svgIcon/index.mjs';
4
+ import _sfc_main from './noticeBar/index.vue2.mjs';
5
+ import _sfc_main$1 from './transfer/index.vue2.mjs';
6
+
7
+ const components = {
8
+ FmTransfer: _sfc_main$1,
9
+ FmNoticeBar: _sfc_main
10
+ };
11
+ function initCommonUI(app) {
12
+ for (const key in components) {
13
+ app.component(key, components[key]);
14
+ }
15
+ elSvg(app);
16
+ }
17
+
18
+ export { initCommonUI };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,126 @@
1
+ import { defineComponent, ref, reactive, onMounted, nextTick, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, normalizeClass, vShow } from 'vue';
2
+
3
+ const _hoisted_1 = { class: "notice-bar-warp-text-box" };
4
+ const _hoisted_2 = ["innerHTML"];
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "index",
7
+ props: {
8
+ mode: { type: String, default: "" },
9
+ // 通知栏模式,可选值为 closeable link
10
+ text: { type: String, default: "" },
11
+ // 通知文本内容
12
+ color: { type: String, default: "var(--el-color-warning)" },
13
+ // 通知文本颜色
14
+ background: { type: String, default: "var(--el-color-warning-light-9)" },
15
+ // 通知背景色
16
+ size: { type: [Number, String], default: 14 },
17
+ // 字体大小,单位px
18
+ height: { type: Number, default: 40 },
19
+ // 通知栏高度,单位px
20
+ delay: { type: Number, default: 1 },
21
+ // 动画延迟时间 (s)
22
+ speed: { type: Number, default: 100 },
23
+ // 滚动速率 (px/s)
24
+ scrollable: { type: Boolean, default: false },
25
+ // 是否开启垂直滚动
26
+ leftIcon: { type: String, default: "iconfont icon-tongzhi2" },
27
+ // 自定义左侧图标
28
+ rightIcon: { type: String, default: "" }
29
+ // 自定义右侧图标
30
+ },
31
+ emits: ["close", "link"],
32
+ setup(__props, { emit: __emit }) {
33
+ const props = __props;
34
+ const emit = __emit;
35
+ const noticeBarWarpRef = ref(null);
36
+ const noticeBarTextRef = ref(null);
37
+ const state = reactive({
38
+ isMode: false,
39
+ warpOWidth: 0,
40
+ textOWidth: 0,
41
+ animationDuration: 0
42
+ });
43
+ onMounted(async () => {
44
+ if (!props.scrollable) initAnimation();
45
+ });
46
+ const initAnimation = () => {
47
+ nextTick(() => {
48
+ if (noticeBarWarpRef.value && noticeBarTextRef.value) {
49
+ state.warpOWidth = noticeBarWarpRef.value.offsetWidth;
50
+ state.textOWidth = noticeBarTextRef.value.scrollWidth;
51
+ state.animationDuration = (state.textOWidth + state.warpOWidth) / props.speed;
52
+ noticeBarTextRef.value.style.animation = "none";
53
+ noticeBarTextRef.value.offsetHeight;
54
+ noticeBarTextRef.value.style.animation = `marquee ${state.animationDuration}s linear infinite`;
55
+ const keyframes = `
56
+ @keyframes marquee {
57
+ 0% { transform: translateX(${state.warpOWidth}px); }
58
+ 100% { transform: translateX(-${state.textOWidth}px); }
59
+ }
60
+ `;
61
+ const styleSheet = document.createElement("style");
62
+ styleSheet.innerText = keyframes;
63
+ document.head.appendChild(styleSheet);
64
+ }
65
+ });
66
+ };
67
+ return (_ctx, _cache) => {
68
+ return withDirectives((openBlock(), createElementBlock(
69
+ "div",
70
+ {
71
+ class: "fm-notice-bar",
72
+ style: normalizeStyle({ background: __props.background, height: `${__props.height}px` })
73
+ },
74
+ [
75
+ createElementVNode(
76
+ "div",
77
+ {
78
+ class: "notice-bar-warp",
79
+ style: normalizeStyle({ color: __props.color, fontSize: `${__props.size}px` }),
80
+ ref_key: "noticeBarWarpRef",
81
+ ref: noticeBarWarpRef
82
+ },
83
+ [
84
+ __props.leftIcon ? (openBlock(), createElementBlock(
85
+ "i",
86
+ {
87
+ key: 0,
88
+ class: normalizeClass(["notice-bar-warp-left-icon", __props.leftIcon])
89
+ },
90
+ null,
91
+ 2
92
+ /* CLASS */
93
+ )) : createCommentVNode("v-if", true),
94
+ createElementVNode("div", _hoisted_1, [
95
+ createElementVNode(
96
+ "div",
97
+ {
98
+ class: "notice-bar-warp-text",
99
+ ref_key: "noticeBarTextRef",
100
+ ref: noticeBarTextRef
101
+ },
102
+ [
103
+ createElementVNode("div", {
104
+ innerHTML: props.text,
105
+ "data-slate-editor": ""
106
+ }, null, 8, _hoisted_2)
107
+ ],
108
+ 512
109
+ /* NEED_PATCH */
110
+ )
111
+ ])
112
+ ],
113
+ 4
114
+ /* STYLE */
115
+ )
116
+ ],
117
+ 4
118
+ /* STYLE */
119
+ )), [
120
+ [vShow, !state.isMode]
121
+ ]);
122
+ };
123
+ }
124
+ });
125
+
126
+ export { _sfc_main as default };
@@ -0,0 +1 @@
1
+ import 'fm-dev/theme-chalk/t-noticebar.css';
@@ -0,0 +1 @@
1
+ import 'fm-dev/theme-chalk/src/t-noticebar.scss';
@@ -0,0 +1,13 @@
1
+ import * as svg from '@element-plus/icons-vue';
2
+ import './svgicon.vue.mjs';
3
+ import _sfc_main from './svgicon.vue2.mjs';
4
+
5
+ function elSvg(app) {
6
+ const icons = svg;
7
+ for (const i in icons) {
8
+ app.component(`ele-${icons[i].name}`, icons[i]);
9
+ }
10
+ app.component("SvgIcon", _sfc_main);
11
+ }
12
+
13
+ export { elSvg };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './svgicon.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,87 @@
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, createBlock, resolveDynamicComponent, createElementVNode, normalizeClass } from 'vue';
2
+
3
+ const _hoisted_1 = ["src"];
4
+ var _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "svgicon",
6
+ props: {
7
+ // svg 图标组件名字
8
+ name: {
9
+ type: String
10
+ },
11
+ // svg 大小
12
+ size: {
13
+ type: Number,
14
+ default: () => 14
15
+ },
16
+ // svg 颜色
17
+ color: {
18
+ type: String
19
+ }
20
+ },
21
+ setup(__props) {
22
+ const props = __props;
23
+ const linesString = ["https", "http", "/src", "/assets", "data:image", window.__env__.VITE_PUBLIC_PATH];
24
+ const getIconName = computed(() => {
25
+ return props?.name;
26
+ });
27
+ const isShowIconSvg = computed(() => {
28
+ return props?.name?.startsWith("ele-");
29
+ });
30
+ const isShowIconImg = computed(() => {
31
+ return linesString.find((str) => props.name?.startsWith(str));
32
+ });
33
+ const setIconSvgStyle = computed(() => {
34
+ return `font-size: ${props.size}px;color: ${props.color};`;
35
+ });
36
+ const setIconImgOutStyle = computed(() => {
37
+ return `width: ${props.size}px;height: ${props.size}px;display: inline-block;overflow: hidden;`;
38
+ });
39
+ const setIconSvgInsStyle = computed(() => {
40
+ const filterStyle = [];
41
+ const compatibles = ["-webkit", "-ms", "-o", "-moz"];
42
+ compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${props.color} ${props.size}px 0);`));
43
+ return `width: ${props.size}px;height: ${props.size}px;position: relative;left: -${props.size}px;${filterStyle.join("")}`;
44
+ });
45
+ return (_ctx, _cache) => {
46
+ return isShowIconSvg.value ? (openBlock(), createElementBlock(
47
+ "i",
48
+ {
49
+ key: 0,
50
+ class: "el-icon",
51
+ style: normalizeStyle(setIconSvgStyle.value)
52
+ },
53
+ [
54
+ (openBlock(), createBlock(resolveDynamicComponent(getIconName.value)))
55
+ ],
56
+ 4
57
+ /* STYLE */
58
+ )) : isShowIconImg.value ? (openBlock(), createElementBlock(
59
+ "div",
60
+ {
61
+ key: 1,
62
+ style: normalizeStyle(setIconImgOutStyle.value)
63
+ },
64
+ [
65
+ createElementVNode("img", {
66
+ src: getIconName.value,
67
+ style: normalizeStyle(setIconSvgInsStyle.value)
68
+ }, null, 12, _hoisted_1)
69
+ ],
70
+ 4
71
+ /* STYLE */
72
+ )) : (openBlock(), createElementBlock(
73
+ "i",
74
+ {
75
+ key: 2,
76
+ class: normalizeClass(getIconName.value),
77
+ style: normalizeStyle(setIconSvgStyle.value)
78
+ },
79
+ null,
80
+ 6
81
+ /* CLASS, STYLE */
82
+ ));
83
+ };
84
+ }
85
+ });
86
+
87
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };