ele-admin-plus 1.1.5 → 1.1.6-beta.2
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/README.md +1 -1
- package/es/ele-app/types/components.d.ts +2 -2
- package/es/ele-app/types/index.d.ts +2 -0
- package/es/ele-config-provider/index.d.ts +2 -2
- package/es/ele-config-provider/index.js +6 -6
- package/es/ele-config-provider/props.d.ts +2 -2
- package/es/ele-config-provider/props.js +3 -3
- package/es/ele-config-provider/receiver.d.ts +3 -3
- package/es/ele-config-provider/receiver.js +103 -99
- package/es/ele-config-provider/types/index.d.ts +5 -7
- package/es/ele-data-table/index.d.ts +11 -13
- package/es/ele-data-table/index.js +1 -1
- package/es/ele-data-table/props.d.ts +5 -5
- package/es/ele-data-table/style/index.scss +6 -1
- package/es/ele-file-list/components/file-grid-item.js +5 -3
- package/es/ele-file-list/components/file-grid.d.ts +1 -0
- package/es/ele-file-list/components/file-grid.js +8 -1
- package/es/ele-file-list/components/file-table-item.js +5 -3
- package/es/ele-file-list/components/file-table.d.ts +1 -0
- package/es/ele-file-list/components/file-table.js +8 -1
- package/es/ele-modal/index.d.ts +1 -1
- package/es/ele-modal/index.js +37 -13
- package/es/ele-popconfirm/index.d.ts +8 -11
- package/es/ele-popconfirm/props.d.ts +5 -6
- package/es/ele-popover/index.d.ts +12 -15
- package/es/ele-popover/props.d.ts +4 -5
- package/es/ele-popover/props.js +1 -1
- package/es/ele-printer/index.d.ts +5 -3
- package/es/ele-printer/index.js +4 -3
- package/es/ele-printer/props.d.ts +4 -2
- package/es/ele-printer/props.js +3 -1
- package/es/ele-printer/types/index.d.ts +5 -1
- package/es/ele-printer/util.d.ts +6 -0
- package/es/ele-printer/util.js +11 -3
- package/es/ele-pro-layout/components/pro-header.js +8 -3
- package/es/ele-pro-layout/components/pro-sidebar.js +6 -5
- package/es/ele-pro-layout/components/pro-sidebox.js +6 -5
- package/es/ele-pro-layout/components/tab-dropdown.js +4 -3
- package/es/ele-pro-layout/index.d.ts +20 -22
- package/es/ele-pro-layout/index.js +52 -5
- package/es/ele-pro-layout/props.js +1 -1
- package/es/ele-pro-layout/style/layout-mobile.scss +4 -0
- package/es/ele-pro-layout/style/sidebar.scss +7 -0
- package/es/ele-pro-table/index.d.ts +11 -11
- package/es/ele-pro-table/props.d.ts +5 -5
- package/es/ele-tabs/components/tab-title.js +6 -5
- package/es/ele-tabs/style/index.scss +1 -1
- package/es/ele-virtual-table/props.d.ts +5 -5
- package/es/ele-watermark/index.js +1 -0
- package/es/style/themes/default.scss +2 -2
- package/lib/ele-app/types/components.d.ts +2 -2
- package/lib/ele-app/types/index.d.ts +2 -0
- package/lib/ele-config-provider/index.d.ts +2 -2
- package/lib/ele-config-provider/index.js +6 -6
- package/lib/ele-config-provider/props.d.ts +2 -2
- package/lib/ele-config-provider/props.js +3 -3
- package/lib/ele-config-provider/receiver.d.ts +3 -3
- package/lib/ele-config-provider/receiver.js +2 -2
- package/lib/ele-config-provider/types/index.d.ts +5 -7
- package/lib/ele-data-table/index.d.ts +11 -13
- package/lib/ele-data-table/index.js +1 -1
- package/lib/ele-data-table/props.d.ts +5 -5
- package/lib/ele-data-table/style/index.scss +6 -1
- package/lib/ele-file-list/components/file-grid-item.js +5 -3
- package/lib/ele-file-list/components/file-grid.d.ts +1 -0
- package/lib/ele-file-list/components/file-grid.js +8 -1
- package/lib/ele-file-list/components/file-table-item.js +5 -3
- package/lib/ele-file-list/components/file-table.d.ts +1 -0
- package/lib/ele-file-list/components/file-table.js +8 -1
- package/lib/ele-modal/index.d.ts +1 -1
- package/lib/ele-modal/index.js +36 -12
- package/lib/ele-popconfirm/index.d.ts +8 -11
- package/lib/ele-popconfirm/props.d.ts +5 -6
- package/lib/ele-popover/index.d.ts +12 -15
- package/lib/ele-popover/props.d.ts +4 -5
- package/lib/ele-popover/props.js +1 -1
- package/lib/ele-printer/index.d.ts +5 -3
- package/lib/ele-printer/index.js +3 -2
- package/lib/ele-printer/props.d.ts +4 -2
- package/lib/ele-printer/props.js +3 -1
- package/lib/ele-printer/types/index.d.ts +5 -1
- package/lib/ele-printer/util.d.ts +6 -0
- package/lib/ele-printer/util.js +11 -3
- package/lib/ele-pro-layout/components/pro-header.js +8 -3
- package/lib/ele-pro-layout/components/pro-sidebar.js +5 -4
- package/lib/ele-pro-layout/components/pro-sidebox.js +5 -4
- package/lib/ele-pro-layout/components/tab-dropdown.js +4 -3
- package/lib/ele-pro-layout/index.d.ts +20 -22
- package/lib/ele-pro-layout/index.js +52 -5
- package/lib/ele-pro-layout/props.js +1 -1
- package/lib/ele-pro-layout/style/layout-mobile.scss +4 -0
- package/lib/ele-pro-layout/style/sidebar.scss +7 -0
- package/lib/ele-pro-table/index.d.ts +11 -11
- package/lib/ele-pro-table/props.d.ts +5 -5
- package/lib/ele-tabs/components/tab-title.js +6 -5
- package/lib/ele-tabs/style/index.scss +1 -1
- package/lib/ele-virtual-table/props.d.ts +5 -5
- package/lib/ele-watermark/index.js +1 -0
- package/lib/style/themes/default.scss +2 -2
- package/package.json +1 -1
|
@@ -7,6 +7,12 @@ const index = vue.defineComponent({
|
|
|
7
7
|
setup(props$1, { slots }) {
|
|
8
8
|
const config = vue.reactive({ ...props$1 });
|
|
9
9
|
vue.provide(props.PROVIDE_KEY, config);
|
|
10
|
+
vue.watch(
|
|
11
|
+
() => props$1.locale,
|
|
12
|
+
() => {
|
|
13
|
+
config.locale = props$1.locale;
|
|
14
|
+
}
|
|
15
|
+
);
|
|
10
16
|
vue.watch(
|
|
11
17
|
() => props$1.table,
|
|
12
18
|
() => {
|
|
@@ -26,12 +32,6 @@ const index = vue.defineComponent({
|
|
|
26
32
|
config.license = props$1.license;
|
|
27
33
|
}
|
|
28
34
|
);
|
|
29
|
-
vue.watch(
|
|
30
|
-
() => props$1.locale,
|
|
31
|
-
() => {
|
|
32
|
-
config.locale = props$1.locale;
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
35
|
return () => {
|
|
36
36
|
var _a;
|
|
37
37
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
@@ -4,14 +4,14 @@ import type { EleLocale } from './types';
|
|
|
4
4
|
* 属性
|
|
5
5
|
*/
|
|
6
6
|
export declare const configProviderProps: {
|
|
7
|
+
/** 国际化 */
|
|
8
|
+
locale: PropType<EleLocale>;
|
|
7
9
|
/** 表格全局配置 */
|
|
8
10
|
table: PropType<Partial<Pick<import("../ele-pro-table/props").ProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination">>>;
|
|
9
11
|
/** 高德地图密钥 */
|
|
10
12
|
mapKey: StringConstructor;
|
|
11
13
|
/** 授权码 */
|
|
12
14
|
license: StringConstructor;
|
|
13
|
-
/** 国际化 */
|
|
14
|
-
locale: PropType<EleLocale>;
|
|
15
15
|
};
|
|
16
16
|
export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
|
|
17
17
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const configProviderProps = {
|
|
4
|
+
/** 国际化 */
|
|
5
|
+
locale: Object,
|
|
4
6
|
/** 表格全局配置 */
|
|
5
7
|
table: Object,
|
|
6
8
|
/** 高德地图密钥 */
|
|
7
9
|
mapKey: String,
|
|
8
10
|
/** 授权码 */
|
|
9
|
-
license: String
|
|
10
|
-
/** 国际化 */
|
|
11
|
-
locale: Object
|
|
11
|
+
license: String
|
|
12
12
|
};
|
|
13
13
|
const PROVIDE_KEY = "EleGlobalConfig";
|
|
14
14
|
const LAYOUT_KEY = "EleLayoutState";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import { LAYOUT_KEY } from './props';
|
|
3
|
-
import type {
|
|
3
|
+
import type { GlobalProvide, UseLocaleResult, UseLicenseResult, LocaleProps, ResponsiveProps, LayoutProvide } from './types';
|
|
4
4
|
export declare const UNAUTHORIZED_TIP = "EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743";
|
|
5
5
|
/**
|
|
6
6
|
* 获取全局配置
|
|
7
7
|
*/
|
|
8
|
-
export declare function useReceiver():
|
|
8
|
+
export declare function useReceiver(): GlobalProvide;
|
|
9
9
|
/**
|
|
10
10
|
* 获取全局属性
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export declare function useGlobalProps<T>(name: string): Ref<T>;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function useLocale<T>(name?: string, props?: LocaleProps<T>): UseLocaleResult<T>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* useLicense
|
|
19
19
|
*/
|
|
20
20
|
export declare function useLicense(): UseLicenseResult;
|
|
21
21
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),
|
|
2
|
-
`))
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),L=require("./props"),N=require("../lang/zh_CN"),_="EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743",K=1698336417,B="1.1";function w(){return h.inject(L.PROVIDE_KEY,{})}function U(u){const t=w();return h.computed(()=>t[u]??{})}function x(u,t){const e=w();return{lang:h.computed(()=>{const c=e.locale??N;return u?Object.assign({},c[u]??{},t==null?void 0:t.locale):c}),globalConfig:e}}function M(){const u=w(),t=h.computed(()=>{const r=u.license;return r?r.trim():void 0}),e=h.ref(!1);return h.watch(t,r=>{var c;if(typeof r!="string"||!r)return e.value=!1,d();try{const o=JSON.parse($(r));if(o.product!=="EleAdminPlus")return e.value=!1,d("");const{version:s,expiration:b,domain:a}=o;if(s&&s!==B)return e.value=!1,d(s);if(b&&b<K)return e.value=!1,d(void 0,b);if(a){const n=(c=window==null?void 0:window.location)==null?void 0:c.hostname;if(!n)return e.value=!1,d(void 0,void 0,a,"");if(n!=="localhost"&&n!=="127.0.0.1"){const g=a.split("."),E=n.split(".");for(let m=g.length-1;m>=0;m--)if(g[m]!==E[m])return e.value=!1,d(void 0,void 0,a,n);if(E.length>g.length&&E[E.length-g.length-1]!=="www")return e.value=!1,d(void 0,void 0,a,n)}}}catch(o){return e.value=!1,console.error(o),d("")}e.value=!0},{immediate:!0}),{authenticated:e,globalConfig:u}}function d(u,t,e,r){const c=new Array(60).join("*"),o=[c];if(o.push(_),u==null&&t==null&&e==null&&r==null&&o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"),!u&&t==null&&!e&&o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"),u&&o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${u}, \u5F53\u524D\u7248\u672C: ${B};`),typeof t=="number"){const s=new Date(t*1e3).toLocaleString();o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${s};`)}e&&o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${r};`),o.push(c),console.error(o.join(`
|
|
2
|
+
`))}function $(u){const t=(p,A,f)=>{const i=((l,O)=>{const j=l.length-O;if(j<=0)return l;const Y=new Array(l.length);for(let v=0;v<l.length;v++)v<O?Y[v]=l[j+v]:Y[v]=l[v-O];return Y})(p.split(""),f).join(""),F=[];let C=0;for(;C<i.length;){let l=C+A;l>i.length&&(l=i.length);const O=i.substring(C,l);F.push(O.split("").reverse().join("")),C=l}return F.join("")},e=u.indexOf("="),r=e===-1?u:u.substring(0,e),c=e===-1?"":u.substring(e),s=(t(r,12,3)+c).replace(/[^A-Za-z0-9\+\/\=]/g,""),a=t("BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C",3,1)+"=";let n="",g,E,m,R,P,S,T,D=0;for(;D<s.length;)R=a.indexOf(s.charAt(D++)),P=a.indexOf(s.charAt(D++)),S=a.indexOf(s.charAt(D++)),T=a.indexOf(s.charAt(D++)),g=R<<2|P>>4,E=(P&15)<<4|S>>2,m=(S&3)<<6|T,n=n+String.fromCharCode(g),S!=64&&(n=n+String.fromCharCode(E)),T!=64&&(n=n+String.fromCharCode(m));return n=(p=>{let A="",f=0,i=0,F=0,C=0;for(;f<p.length;)i=p.charCodeAt(f),i<128?(A+=String.fromCharCode(i),f++):i>191&&i<224?(F=p.charCodeAt(f+1),A+=String.fromCharCode((i&31)<<6|F&63),f+=2):(F=p.charCodeAt(f+1),C=p.charCodeAt(f+2),A+=String.fromCharCode((i&15)<<12|(F&63)<<6|C&63),f+=3);return A})(n),n}function I(u){return h.inject(L.LAYOUT_KEY,u??h.ref({}))}function q(u){const t=I();return h.computed(()=>{var e;return u.responsive??((e=h.unref(t))==null?void 0:e.responsive)??!0})}Object.defineProperty(exports,"LAYOUT_KEY",{enumerable:!0,get:()=>L.LAYOUT_KEY});exports.UNAUTHORIZED_TIP=_;exports.useGlobalProps=U;exports.useLayoutState=I;exports.useLicense=M;exports.useLocale=x;exports.useReceiver=w;exports.useResponsive=q;
|
|
@@ -10,17 +10,15 @@ import type { CopyableLocale } from '../../ele-copyable/types';
|
|
|
10
10
|
/**
|
|
11
11
|
* 全局配置
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface GlobalProvide {
|
|
14
|
+
/** 国际化 */
|
|
15
|
+
locale?: EleLocale;
|
|
14
16
|
/** 表格配置 */
|
|
15
17
|
table?: TableGlobalConfig;
|
|
16
18
|
/** 地图密钥 */
|
|
17
19
|
mapKey?: string;
|
|
18
20
|
/** 授权码 */
|
|
19
21
|
license?: string;
|
|
20
|
-
/** 国际化 */
|
|
21
|
-
locale?: EleLocale;
|
|
22
|
-
/** 是否开启页签缓存 */
|
|
23
|
-
keepAlive?: boolean;
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
26
24
|
* 表格配置
|
|
@@ -52,7 +50,7 @@ export interface UseLicenseResult {
|
|
|
52
50
|
/** 是否授权 */
|
|
53
51
|
authenticated: Ref<boolean>;
|
|
54
52
|
/** 全局配置 */
|
|
55
|
-
globalConfig:
|
|
53
|
+
globalConfig: GlobalProvide;
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* 获取国际化方法返回结果
|
|
@@ -61,7 +59,7 @@ export interface UseLocaleResult<T> {
|
|
|
61
59
|
/** 语言 */
|
|
62
60
|
lang: ComputedRef<T>;
|
|
63
61
|
/** 全局配置 */
|
|
64
|
-
globalConfig:
|
|
62
|
+
globalConfig: GlobalProvide;
|
|
65
63
|
}
|
|
66
64
|
/**
|
|
67
65
|
* 带国际化的组件属性
|
|
@@ -32,7 +32,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
type: import("vue").PropType<import("./types").TableEmptyProps>;
|
|
33
33
|
default: () => null;
|
|
34
34
|
};
|
|
35
|
-
/** 表格列配置 */
|
|
36
35
|
rowClickChecked: import("vue").PropType<import("./types").RowClickChecked>;
|
|
37
36
|
size: {
|
|
38
37
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -62,6 +61,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
61
|
default: boolean;
|
|
63
62
|
};
|
|
64
63
|
showOverflowTooltip: import("vue").PropType<boolean | Partial<Pick<import("element-plus").ElTooltipProps, "offset" | "effect" | "placement" | "popperOptions" | "popperClass" | "showArrow" | "enterable" | "showAfter" | "hideAfter">> | undefined>;
|
|
64
|
+
emptyText: StringConstructor;
|
|
65
|
+
indent: {
|
|
66
|
+
type: NumberConstructor;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
65
69
|
showHeader: {
|
|
66
70
|
type: BooleanConstructor;
|
|
67
71
|
default: boolean;
|
|
@@ -79,7 +83,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
83
|
headerCellStyle: import("vue").PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<any> | undefined>;
|
|
80
84
|
highlightCurrentRow: BooleanConstructor;
|
|
81
85
|
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
82
|
-
emptyText: StringConstructor;
|
|
83
86
|
expandRowKeys: import("vue").PropType<any[] | undefined>;
|
|
84
87
|
defaultExpandAll: BooleanConstructor;
|
|
85
88
|
defaultSort: import("vue").PropType<import("element-plus/es/components/table/src/table/defaults").Sort | undefined>;
|
|
@@ -98,10 +101,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
98
101
|
type: BooleanConstructor;
|
|
99
102
|
default: boolean;
|
|
100
103
|
};
|
|
101
|
-
indent: {
|
|
102
|
-
type: NumberConstructor;
|
|
103
|
-
default: number;
|
|
104
|
-
};
|
|
105
104
|
treeProps: {
|
|
106
105
|
type: import("vue").PropType<{
|
|
107
106
|
hasChildren?: string | undefined;
|
|
@@ -187,7 +186,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
186
|
type: import("vue").PropType<import("./types").TableEmptyProps>;
|
|
188
187
|
default: () => null;
|
|
189
188
|
};
|
|
190
|
-
/** 表格列配置 */
|
|
191
189
|
rowClickChecked: import("vue").PropType<import("./types").RowClickChecked>;
|
|
192
190
|
size: {
|
|
193
191
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -217,6 +215,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
217
215
|
default: boolean;
|
|
218
216
|
};
|
|
219
217
|
showOverflowTooltip: import("vue").PropType<boolean | Partial<Pick<import("element-plus").ElTooltipProps, "offset" | "effect" | "placement" | "popperOptions" | "popperClass" | "showArrow" | "enterable" | "showAfter" | "hideAfter">> | undefined>;
|
|
218
|
+
emptyText: StringConstructor;
|
|
219
|
+
indent: {
|
|
220
|
+
type: NumberConstructor;
|
|
221
|
+
default: number;
|
|
222
|
+
};
|
|
220
223
|
showHeader: {
|
|
221
224
|
type: BooleanConstructor;
|
|
222
225
|
default: boolean;
|
|
@@ -234,7 +237,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
234
237
|
headerCellStyle: import("vue").PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<any> | undefined>;
|
|
235
238
|
highlightCurrentRow: BooleanConstructor;
|
|
236
239
|
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
237
|
-
emptyText: StringConstructor;
|
|
238
240
|
expandRowKeys: import("vue").PropType<any[] | undefined>;
|
|
239
241
|
defaultExpandAll: BooleanConstructor;
|
|
240
242
|
defaultSort: import("vue").PropType<import("element-plus/es/components/table/src/table/defaults").Sort | undefined>;
|
|
@@ -253,10 +255,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
253
255
|
type: BooleanConstructor;
|
|
254
256
|
default: boolean;
|
|
255
257
|
};
|
|
256
|
-
indent: {
|
|
257
|
-
type: NumberConstructor;
|
|
258
|
-
default: number;
|
|
259
|
-
};
|
|
260
258
|
treeProps: {
|
|
261
259
|
type: import("vue").PropType<{
|
|
262
260
|
hasChildren?: string | undefined;
|
|
@@ -298,6 +296,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
298
296
|
lazy: boolean;
|
|
299
297
|
data: any[];
|
|
300
298
|
scrollbarAlwaysOn: boolean;
|
|
299
|
+
indent: number;
|
|
301
300
|
stripe: boolean;
|
|
302
301
|
border: boolean;
|
|
303
302
|
showHeader: boolean;
|
|
@@ -305,7 +304,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
305
304
|
highlightCurrentRow: boolean;
|
|
306
305
|
defaultExpandAll: boolean;
|
|
307
306
|
selectOnIndeterminate: boolean;
|
|
308
|
-
indent: number;
|
|
309
307
|
treeProps: {
|
|
310
308
|
hasChildren?: string | undefined;
|
|
311
309
|
children?: string | undefined;
|
|
@@ -125,7 +125,7 @@ const index = vue.defineComponent({
|
|
|
125
125
|
if (props$1.rowClickChecked && !util.isDisableRow(row, props$1.data.indexOf(row), props$1.columns)) {
|
|
126
126
|
const selections = methods.getSelectionRows();
|
|
127
127
|
if (props$1.rowClickChecked === "smart" && selections != null && selections.length === 1) {
|
|
128
|
-
|
|
128
|
+
setSelectedRows([row]);
|
|
129
129
|
} else {
|
|
130
130
|
methods.toggleRowSelection(row);
|
|
131
131
|
}
|
|
@@ -165,6 +165,11 @@ export declare const dataTableProps: {
|
|
|
165
165
|
default: boolean;
|
|
166
166
|
};
|
|
167
167
|
showOverflowTooltip: PropType<boolean | Partial<Pick<import("element-plus").ElTooltipProps, "offset" | "effect" | "placement" | "popperOptions" | "popperClass" | "showArrow" | "enterable" | "showAfter" | "hideAfter">> | undefined>;
|
|
168
|
+
emptyText: StringConstructor;
|
|
169
|
+
indent: {
|
|
170
|
+
type: NumberConstructor;
|
|
171
|
+
default: number;
|
|
172
|
+
};
|
|
168
173
|
showHeader: {
|
|
169
174
|
type: BooleanConstructor;
|
|
170
175
|
default: boolean;
|
|
@@ -182,7 +187,6 @@ export declare const dataTableProps: {
|
|
|
182
187
|
headerCellStyle: PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<any> | undefined>;
|
|
183
188
|
highlightCurrentRow: BooleanConstructor;
|
|
184
189
|
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
185
|
-
emptyText: StringConstructor;
|
|
186
190
|
expandRowKeys: PropType<any[] | undefined>;
|
|
187
191
|
defaultExpandAll: BooleanConstructor;
|
|
188
192
|
defaultSort: PropType<import("element-plus/es/components/table/src/table/defaults").Sort | undefined>;
|
|
@@ -201,10 +205,6 @@ export declare const dataTableProps: {
|
|
|
201
205
|
type: BooleanConstructor;
|
|
202
206
|
default: boolean;
|
|
203
207
|
};
|
|
204
|
-
indent: {
|
|
205
|
-
type: NumberConstructor;
|
|
206
|
-
default: number;
|
|
207
|
-
};
|
|
208
208
|
treeProps: {
|
|
209
209
|
type: PropType<{
|
|
210
210
|
hasChildren?: string | undefined;
|
|
@@ -13,6 +13,10 @@ $ele-expand-path: 'M605.08 512.14L338.35 245.27l51.76-51.68 318.41 318.58L390.09
|
|
|
13
13
|
background: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.ele-data-table > .el-table__inner-wrapper > .el-table__header-wrapper {
|
|
17
|
+
z-index: 4;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
.ele-data-table {
|
|
17
21
|
/* 单元格背景 */
|
|
18
22
|
& > .el-table__inner-wrapper {
|
|
@@ -268,6 +272,7 @@ $ele-expand-path: 'M605.08 512.14L338.35 245.27l51.76-51.68 318.41 318.58L390.09
|
|
|
268
272
|
bottom: 0;
|
|
269
273
|
width: 0;
|
|
270
274
|
border-left: 1px solid eleVar('table', 'border-color');
|
|
275
|
+
z-index: 5;
|
|
271
276
|
}
|
|
272
277
|
|
|
273
278
|
&.el-table > .el-table__inner-wrapper::before,
|
|
@@ -275,6 +280,7 @@ $ele-expand-path: 'M605.08 512.14L338.35 245.27l51.76-51.68 318.41 318.58L390.09
|
|
|
275
280
|
right: 0;
|
|
276
281
|
height: 0;
|
|
277
282
|
border-top: 1px solid eleVar('table', 'border-color');
|
|
283
|
+
z-index: 5;
|
|
278
284
|
}
|
|
279
285
|
|
|
280
286
|
&.el-table:not(.has-footer) > .el-table__inner-wrapper::before {
|
|
@@ -338,7 +344,6 @@ $ele-expand-path: 'M605.08 512.14L338.35 245.27l51.76-51.68 318.41 318.58L390.09
|
|
|
338
344
|
& > .el-table__inner-wrapper > .el-table__header-wrapper {
|
|
339
345
|
position: sticky;
|
|
340
346
|
top: eleVar('table', 'sticky-top');
|
|
341
|
-
z-index: 3;
|
|
342
347
|
}
|
|
343
348
|
}
|
|
344
349
|
}
|
|
@@ -148,11 +148,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
148
148
|
class: "ele-file-list-item-checkbox",
|
|
149
149
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.onCheckChange && _ctx.onCheckChange(...args), ["stop"]))
|
|
150
150
|
}, _hoisted_5)) : vue.createCommentVNode("", true),
|
|
151
|
-
_ctx.contextMenus || _ctx.$slots.contextMenu ? (vue.openBlock(), vue.createBlock(_component_EleDropdown, vue.mergeProps({
|
|
151
|
+
_ctx.contextMenus || _ctx.$slots.contextMenu ? (vue.openBlock(), vue.createBlock(_component_EleDropdown, vue.mergeProps({
|
|
152
|
+
key: 1,
|
|
153
|
+
placement: "bottom-start",
|
|
154
|
+
popperClass: "ele-file-list-item-context"
|
|
155
|
+
}, _ctx.contextMenuProps, {
|
|
152
156
|
ref: "dropdownRef",
|
|
153
157
|
trigger: "click",
|
|
154
|
-
placement: "bottom-start",
|
|
155
|
-
popperClass: "ele-file-list-item-context",
|
|
156
158
|
class: "ele-file-list-item-dropdown",
|
|
157
159
|
items: _ctx.contextMenus,
|
|
158
160
|
onCommand: _ctx.onItemContextMenu,
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
}, {
|
|
29
29
|
itemRefs: Ref<GridItemInstance[]>;
|
|
30
30
|
headerText: import("vue").ComputedRef<string | undefined>;
|
|
31
|
+
getContextMenus: (item: FileItem) => import("../../ele-dropdown/types").DropdownItem[] | undefined;
|
|
31
32
|
onCheckAllChange: () => void;
|
|
32
33
|
onItemClick: (item: FileItem) => void;
|
|
33
34
|
onItemCheckChange: (item: FileItem) => void;
|
|
@@ -48,6 +48,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
48
48
|
}
|
|
49
49
|
return void 0;
|
|
50
50
|
});
|
|
51
|
+
const getContextMenus = (item) => {
|
|
52
|
+
if (typeof props.contextMenus === "function") {
|
|
53
|
+
return props.contextMenus(item);
|
|
54
|
+
}
|
|
55
|
+
return props.contextMenus;
|
|
56
|
+
};
|
|
51
57
|
const onCheckAllChange = () => {
|
|
52
58
|
emit("checkAllChange");
|
|
53
59
|
};
|
|
@@ -72,6 +78,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
72
78
|
return {
|
|
73
79
|
itemRefs,
|
|
74
80
|
headerText,
|
|
81
|
+
getContextMenus,
|
|
75
82
|
onCheckAllChange,
|
|
76
83
|
onItemClick,
|
|
77
84
|
onItemCheckChange,
|
|
@@ -122,7 +129,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
122
129
|
selections: _ctx.selections,
|
|
123
130
|
current: _ctx.current,
|
|
124
131
|
icons: _ctx.icons,
|
|
125
|
-
contextMenus:
|
|
132
|
+
contextMenus: _ctx.getContextMenus(item),
|
|
126
133
|
contextMenuProps: _ctx.contextMenuProps,
|
|
127
134
|
onClick: _ctx.onItemClick,
|
|
128
135
|
onCheckChange: _ctx.onItemCheckChange,
|
|
@@ -182,11 +182,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
182
182
|
], 4);
|
|
183
183
|
}), 128))
|
|
184
184
|
], 32),
|
|
185
|
-
_ctx.contextMenus || _ctx.$slots.contextMenu ? (vue.openBlock(), vue.createBlock(_component_EleDropdown, vue.mergeProps({
|
|
185
|
+
_ctx.contextMenus || _ctx.$slots.contextMenu ? (vue.openBlock(), vue.createBlock(_component_EleDropdown, vue.mergeProps({
|
|
186
|
+
key: 0,
|
|
187
|
+
placement: "bottom-start",
|
|
188
|
+
popperClass: "ele-file-list-item-context"
|
|
189
|
+
}, _ctx.contextMenuProps, {
|
|
186
190
|
ref: "dropdownRef",
|
|
187
191
|
trigger: "click",
|
|
188
|
-
placement: "bottom-start",
|
|
189
|
-
popperClass: "ele-file-list-item-context",
|
|
190
192
|
class: "ele-file-list-item-dropdown",
|
|
191
193
|
items: _ctx.contextMenus,
|
|
192
194
|
onCommand: _ctx.onItemContextMenu,
|
|
@@ -38,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
}, {
|
|
39
39
|
itemRefs: Ref<TableItemInstance[]>;
|
|
40
40
|
tableCols: import("vue").ComputedRef<ColumnItem[]>;
|
|
41
|
+
getContextMenus: (item: FileItem) => import("../../ele-dropdown/types").DropdownItem[] | undefined;
|
|
41
42
|
onCheckAllChange: () => void;
|
|
42
43
|
onItemClick: (item: FileItem) => void;
|
|
43
44
|
onItemCheckChange: (item: FileItem) => void;
|
|
@@ -74,6 +74,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
74
74
|
];
|
|
75
75
|
return cols;
|
|
76
76
|
});
|
|
77
|
+
const getContextMenus = (item) => {
|
|
78
|
+
if (typeof props.contextMenus === "function") {
|
|
79
|
+
return props.contextMenus(item);
|
|
80
|
+
}
|
|
81
|
+
return props.contextMenus;
|
|
82
|
+
};
|
|
77
83
|
const onCheckAllChange = () => {
|
|
78
84
|
emit("checkAllChange");
|
|
79
85
|
};
|
|
@@ -107,6 +113,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
107
113
|
return {
|
|
108
114
|
itemRefs,
|
|
109
115
|
tableCols,
|
|
116
|
+
getContextMenus,
|
|
110
117
|
onCheckAllChange,
|
|
111
118
|
onItemClick,
|
|
112
119
|
onItemCheckChange,
|
|
@@ -201,7 +208,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
201
208
|
current: _ctx.current,
|
|
202
209
|
icons: _ctx.icons,
|
|
203
210
|
columns: _ctx.tableCols,
|
|
204
|
-
contextMenus:
|
|
211
|
+
contextMenus: _ctx.getContextMenus(item),
|
|
205
212
|
contextMenuProps: _ctx.contextMenuProps,
|
|
206
213
|
onClick: _ctx.onItemClick,
|
|
207
214
|
onCheckChange: _ctx.onItemCheckChange,
|
package/lib/ele-modal/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
89
89
|
dialogRef: import("vue").Ref<ElDialogInstance>;
|
|
90
90
|
container: import("vue").Ref<Element>;
|
|
91
91
|
isFullscreen: import("vue").Ref<boolean>;
|
|
92
|
-
|
|
92
|
+
enable: import("vue").Ref<boolean>;
|
|
93
93
|
dialogProps: import("vue").ComputedRef<ElDialogProps>;
|
|
94
94
|
updateModelValue: (modelValue: boolean) => void;
|
|
95
95
|
toggleFullscreen: (fullscreen?: boolean) => void;
|
package/lib/ele-modal/index.js
CHANGED
|
@@ -20,7 +20,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
20
20
|
const container = vue.ref(util.getModalContainer());
|
|
21
21
|
const isFullscreen = vue.ref(props$1.fullscreen ?? false);
|
|
22
22
|
const isActivated = vue.ref(true);
|
|
23
|
-
const
|
|
23
|
+
const enable = vue.ref(
|
|
24
|
+
props$1.destroyOnClose && !props$1.modelValue ? false : true
|
|
25
|
+
);
|
|
24
26
|
const dialogClass = vue.computed(() => {
|
|
25
27
|
const layoutState = vue.unref(layoutProvide);
|
|
26
28
|
const classes = [util.wrapperClass];
|
|
@@ -94,6 +96,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
94
96
|
showClose: false,
|
|
95
97
|
draggable: false,
|
|
96
98
|
alignCenter: false,
|
|
99
|
+
destroyOnClose: false,
|
|
97
100
|
modalClass: dialogClass.value
|
|
98
101
|
};
|
|
99
102
|
return Object.assign({}, attrs, core.pick(props$1, props.dialogPropKeys), opt);
|
|
@@ -124,6 +127,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
124
127
|
if (props$1.resetOnClose || props$1.destroyOnClose) {
|
|
125
128
|
isFullscreen.value = props$1.fullscreen ?? false;
|
|
126
129
|
}
|
|
130
|
+
if (!enable.value) {
|
|
131
|
+
enable.value = true;
|
|
132
|
+
}
|
|
127
133
|
vue.nextTick(() => {
|
|
128
134
|
const modalEl = getModalEl();
|
|
129
135
|
if (props$1.resetOnClose) {
|
|
@@ -157,6 +163,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
157
163
|
emit("close");
|
|
158
164
|
};
|
|
159
165
|
const onClosed = () => {
|
|
166
|
+
if (enable.value) {
|
|
167
|
+
enable.value = false;
|
|
168
|
+
}
|
|
160
169
|
emit("closed");
|
|
161
170
|
};
|
|
162
171
|
const onOpenAutoFocus = () => {
|
|
@@ -185,6 +194,18 @@ const _sfc_main = vue.defineComponent({
|
|
|
185
194
|
}
|
|
186
195
|
}
|
|
187
196
|
);
|
|
197
|
+
vue.watch(
|
|
198
|
+
() => props$1.destroyOnClose,
|
|
199
|
+
(destroyOnClose) => {
|
|
200
|
+
if (destroyOnClose) {
|
|
201
|
+
if (!props$1.modelValue && enable.value) {
|
|
202
|
+
enable.value = false;
|
|
203
|
+
}
|
|
204
|
+
} else if (!enable.value) {
|
|
205
|
+
enable.value = true;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
);
|
|
188
209
|
vue.onActivated(() => {
|
|
189
210
|
isActivated.value = true;
|
|
190
211
|
});
|
|
@@ -195,7 +216,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
195
216
|
dialogRef,
|
|
196
217
|
container,
|
|
197
218
|
isFullscreen,
|
|
198
|
-
|
|
219
|
+
enable,
|
|
199
220
|
dialogProps,
|
|
200
221
|
updateModelValue,
|
|
201
222
|
toggleFullscreen,
|
|
@@ -241,7 +262,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
241
262
|
class: "ele-modal-header",
|
|
242
263
|
style: vue.normalizeStyle(_ctx.headerStyle)
|
|
243
264
|
}, [
|
|
244
|
-
vue.
|
|
265
|
+
_ctx.enable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
266
|
+
key: 0,
|
|
245
267
|
class: "ele-modal-title",
|
|
246
268
|
style: vue.normalizeStyle(_ctx.titleStyle)
|
|
247
269
|
}, [
|
|
@@ -252,9 +274,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
252
274
|
}, () => [
|
|
253
275
|
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
254
276
|
])
|
|
255
|
-
], 4),
|
|
256
|
-
_ctx.maxable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
257
|
-
key:
|
|
277
|
+
], 4)) : vue.createCommentVNode("", true),
|
|
278
|
+
_ctx.enable && _ctx.maxable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
279
|
+
key: 1,
|
|
258
280
|
class: "ele-modal-tool",
|
|
259
281
|
style: vue.normalizeStyle(_ctx.fullscreenBtnStyle),
|
|
260
282
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.toggleFullscreen())
|
|
@@ -268,8 +290,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
268
290
|
})
|
|
269
291
|
])
|
|
270
292
|
], 4)) : vue.createCommentVNode("", true),
|
|
271
|
-
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
272
|
-
key:
|
|
293
|
+
_ctx.enable && _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
294
|
+
key: 2,
|
|
273
295
|
class: "ele-modal-tool",
|
|
274
296
|
style: vue.normalizeStyle(_ctx.closeBtnStyle),
|
|
275
297
|
onClick: close
|
|
@@ -286,24 +308,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
286
308
|
], 4)
|
|
287
309
|
]),
|
|
288
310
|
default: vue.withCtx(() => [
|
|
289
|
-
vue.
|
|
311
|
+
_ctx.enable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
312
|
+
key: 0,
|
|
290
313
|
class: "ele-modal-body",
|
|
291
314
|
style: vue.normalizeStyle(_ctx.bodyStyle)
|
|
292
315
|
}, [
|
|
293
316
|
vue.renderSlot(_ctx.$slots, "default")
|
|
294
|
-
], 4)
|
|
317
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
295
318
|
]),
|
|
296
319
|
_: 2
|
|
297
320
|
}, [
|
|
298
321
|
_ctx.$slots.footer ? {
|
|
299
322
|
name: "footer",
|
|
300
323
|
fn: vue.withCtx(() => [
|
|
301
|
-
vue.
|
|
324
|
+
_ctx.enable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
325
|
+
key: 0,
|
|
302
326
|
class: "ele-modal-footer",
|
|
303
327
|
style: vue.normalizeStyle(_ctx.footerStyle)
|
|
304
328
|
}, [
|
|
305
329
|
vue.renderSlot(_ctx.$slots, "footer")
|
|
306
|
-
], 4)
|
|
330
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
307
331
|
]),
|
|
308
332
|
key: "0"
|
|
309
333
|
} : void 0
|