@qin-ui/element-plus-pro 1.4.0 → 1.4.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/AI-CONTEXT.md +1 -1
- package/README.md +1 -1
- package/api.json +2 -2
- package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -1
- package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -1
- package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -1
- package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -1
- package/es/components/form/utils/disabled.d.ts +28 -0
- package/es/components/form/utils/disabled.d.ts.map +1 -0
- package/es/components/table/components/ProTable.vue.d.ts +1 -1
- package/es/components/table/components/ProTable.vue.d.ts.map +1 -1
- package/es/element-plus-pro.css +7 -7
- package/es/index.js +35 -15
- package/es/index.js.map +1 -1
- package/package.json +2 -3
- package/src/components/component-provider/constants/index.ts +1 -1
- package/src/components/form/components/BaseField/index.vue +6 -8
- package/src/components/form/components/BaseField/utils/index.ts +3 -0
- package/src/components/form/components/BaseFormItem/index.vue +3 -5
- package/src/components/form/components/ProForm/index.vue +17 -4
- package/src/components/form/utils/disabled.ts +37 -0
- package/src/components/table/components/ProTable.vue +15 -1
package/AI-CONTEXT.md
CHANGED
|
@@ -57,7 +57,7 @@ import { ProForm, ProTable, useForm, useTable } from '@qin-ui/element-plus-pro';
|
|
|
57
57
|
| `autocomplete` | `{ clearable: true }` |
|
|
58
58
|
| `select` / `cascader` / `tree-select` | `{ clearable: true }` |
|
|
59
59
|
| `date-picker` / `time-picker` / `time-select` | `{ style:{width:'100%'} }` |
|
|
60
|
-
| `pro-form` | `{ grid: { gutter: 24 } }
|
|
60
|
+
| `pro-form` | `{ grid: { gutter: 24 } }`(仅作为启用网格时的参数默认值,不开启网格) |
|
|
61
61
|
| `pro-form-item` | `{ span: 8 }` |
|
|
62
62
|
| `pro-table` | `{ pagination:{layout:'total, sizes, prev, pager, next, jumper', pageSizes:[10,20,30,40,50,100], background:true}, searchFormConfig:{layout:'grid', expand:{minExpandRows:2, expandStatus:false}}, control:true, addIndexColumn:true }` |
|
|
63
63
|
|
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ ProComponentProvider 内置了一套默认属性预设,**即使不配置 `comp
|
|
|
211
211
|
| `select` / `cascader` / `tree-select` | `{ clearable: true, placeholder: '请选择' }` |
|
|
212
212
|
| `autocomplete` | `{ clearable: true, placeholder: '请输入' }` |
|
|
213
213
|
| `date-picker` / `time-picker` / `time-select` | `{ style: { width: '100%' }, placeholder: '请选择' }` |
|
|
214
|
-
| `pro-form` | `{ grid: { gutter: 24 } }
|
|
214
|
+
| `pro-form` | `{ grid: { gutter: 24 } }`(仅作为启用网格时的参数默认值,不开启网格) |
|
|
215
215
|
| `pro-form-item` | `{ span: 8 }` |
|
|
216
216
|
| `pro-table` | `{ pagination: { layout: 'total,sizes,prev,pager,next,jumper', pageSizes: [10,20,30,40,50,100], background: true }, searchFormConfig: { layout: 'grid', expand: { minExpandRows: 2, expandStatus: false } }, control: true, addIndexColumn: true }` |
|
|
217
217
|
|
package/api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"generatedAt": "2026-10-27T09:53:57.346Z",
|
|
3
3
|
"name": "@qin-ui/element-plus-pro",
|
|
4
4
|
"api": [
|
|
5
5
|
{
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"name": "grid",
|
|
64
64
|
"type": "boolean | GridProps",
|
|
65
65
|
"optional": true,
|
|
66
|
-
"description": "
|
|
66
|
+
"description": "是否启用网格布局,默认关闭;Provider 的 `grid` 仅作为启用时的参数配置"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"name": "...attrs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseField/index.vue"],"names":[],"mappings":"AAqPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,KAAK,CAAC;AA2Bb,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;;;qCAqJ6D,GAAG;;UAtJzD,MAAM;eADD,MAAM,GAAG,SAAS;;;;AAkQhC,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/components/BaseField/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,KAAK,OAAO,GAAG,CACb,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AA2DZ;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAAK,EACrC,GAAG,OAAO,KACT,MAAM,CAAC,MAAM,EAAE,GAAG,CAOpB,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,QAMhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/BaseFormItem/index.vue"],"names":[],"mappings":"AAsPA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAShD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;cADW,OAAO;YADT,MAAM;UADR,IAAI;;AA4Qb,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/ProForm/index.vue"],"names":[],"mappings":"AA8LA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EASL,KAAK,IAAI,EACV,MAAM,KAAK,CAAC;AAIb,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAOpD,OAAO,EAAW,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;yBAGxC,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAC1C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA8LO,mBAAmB,CAAC;eAxLnB,IAAI;eACJ,CAAC;0DAuLoF,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;wDA9GgC,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;8CALnB,CAAC;;;;mBAEjB,OAAO;;iBAGwB,IAAI;;UA2GvD,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAzMzE,wBAyM4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 归一化禁用值
|
|
3
|
+
*
|
|
4
|
+
* @description 字符串形态与宿主 Boolean prop 一致:`''` 与 `disabled` 为 true,其余取真值
|
|
5
|
+
* @param value - 原始禁用值
|
|
6
|
+
* @returns 归一化后的布尔值
|
|
7
|
+
*/
|
|
8
|
+
export declare const normalizeDisabled: (value: unknown) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 解析显式声明的禁用值
|
|
11
|
+
*
|
|
12
|
+
* @description `undefined` / `null` 为未声明,返回 `undefined`;其余返回归一化结果
|
|
13
|
+
* @param value - 原始禁用值
|
|
14
|
+
* @returns 显式禁用值;未声明时为 `undefined`
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolveDisabled: (value: unknown) => boolean | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 解析控件最终生效的禁用状态
|
|
19
|
+
*
|
|
20
|
+
* @description 字段显式声明(含 `false`)优先;未声明时继承外层禁用,外层为真即禁用;
|
|
21
|
+
* 外层未禁用时回退 Provider 注入的组件级默认值
|
|
22
|
+
* @param explicit - 字段显式声明的禁用值
|
|
23
|
+
* @param inherited - 外层禁用上下文取值
|
|
24
|
+
* @param fallback - Provider 注入的组件级默认禁用值
|
|
25
|
+
* @returns 最终生效的禁用状态
|
|
26
|
+
*/
|
|
27
|
+
export declare const resolveEffectiveDisabled: (explicit: unknown, inherited: unknown, fallback: unknown) => boolean;
|
|
28
|
+
//# sourceMappingURL=disabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabled.d.ts","sourceRoot":"","sources":["../../../../src/components/form/utils/disabled.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,YACc,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,OAAO,GAAG,SACmB,CAAC;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,OAAO,EACjB,WAAW,OAAO,EAClB,UAAU,OAAO,KAChB,OAE4D,CAAC"}
|
|
@@ -62,7 +62,7 @@ declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<
|
|
|
62
62
|
};
|
|
63
63
|
/** 表格区域包裹容器 */
|
|
64
64
|
tableContainer?: ContainerComponent | false;
|
|
65
|
-
/** 直接传入列配置(覆盖 :table 实例的 columns
|
|
65
|
+
/** 直接传入列配置(覆盖 :table 实例的 columns);列需自备 key / dataIndex / prop,显式模式不参与 setColumn 与列控 */
|
|
66
66
|
columns?: Columns<T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : any>;
|
|
67
67
|
/** 直接传入数据源(覆盖 :table 实例的 data) */
|
|
68
68
|
data?: (T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : any)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAmoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EACf,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAkB5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAejD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;yBAG5C,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,EAC5C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAitBO,mBAAmB,CAAC;qEAtrB2B,CAAC,mGAAD,CAAC;2EAAD,CAAC;oFAAD,CAAC;0EAAD,CAAC,yIAAD,CAAC;0EAAD,CAAC,yIAAD,CAAC;uEAAD,CAAC,yIAAD,CAAC;0EAAD,CAAC,yIAAD,CAAC;oEAAD,CAAC,yIAAD,CAAC;sEAAD,CAAC,yIAAD,CAAC;mEAAD,CAAC,yIAAD,CAAC;yEAAD,CAAC,yIAAD,CAAC;+GAAD,CAAC;qHAAD,CAAC;;qFAAD,CAAC;;;;;gFAAD,CAAC,mHAAD,CAAC;qJAAD,CAAC;iFAAD,CAAC,sHAAD,CAAC,0GAAD,CAAC;;;;;;;;eAgb/C,UAAU,CAAC,MAAM,CAAC;kBACf,OAAO;;QA7ajB,yBAAyB;gBACjB,CAAC;QACT,eAAe;iBACN,MAAM,OAAO,CAAC,OAAO,CAAC;QAC/B,iBAAiB;yBACA,OAAO;QACxB,oBAAoB;0BACF,OAAO;QACzB,gDAAgD;kBACtC,OAAO,GAAG,OAAO;YA3B3B,iBAAiB;yBACJ,OAAO;YACpB,2BAA2B;2BACZ,OAAO,GAAG,mBAAmB,CAAC,IAAI,4BAWI,CAAC,+DAXO,CAAC;UAwB1B;QACpC,kBAAkB;;YApBlB,eAAe;qBACN,OAAO;YAChB,eAAe;wBACH,kBAAkB,GAAG,KAAK;;QAmBtC,eAAe;yBACE,kBAAkB,GAAG,KAAK;QAC3C,uFAAuF;kBAC7E,OAAO,4BAnBoC,CAAC,+DAmBzB;QAC7B,kCAAkC;eAC3B,4BArB8C,CAAC,iEAqBnC;QACnB,sBAAsB;qBACT,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC;+CA+pB+C,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;QArS7C,8CAA8C;;MAqSqB,GAAG,IAAI;WACpE,GAAG;8CA9D4E,GAAG;+BAEvD,GAAG;8BACH,GAAG;yBACR,GAAG;uBACL,GAAG;;UA2DxB,sCA1rBgD,CAAC,6MA0rBP;EAE7C,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA5tBzE,wBA4tB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/es/element-plus-pro.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[class*='-form-item'] [class*='-form-item'][data-v-
|
|
1
|
+
[class*='-form-item'] [class*='-form-item'][data-v-a29a46c8] {
|
|
2
2
|
margin-bottom: 18px;
|
|
3
3
|
}
|
|
4
4
|
.pro-table_search-form[data-v-419025fd] [class*='-form-item'] {
|
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
.pro-table_column-control_button[data-v-4d2b4f1c] svg {
|
|
44
44
|
transform: scale(1.2, 1.4);
|
|
45
45
|
}
|
|
46
|
-
.pro-table_header[data-v-
|
|
46
|
+
.pro-table_header[data-v-9774f05e] {
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: flex-end;
|
|
50
50
|
}
|
|
51
|
-
.pro-table_header[data-v-
|
|
51
|
+
.pro-table_header[data-v-9774f05e]:empty {
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
54
|
+
.pro-table_header + .pro-table_header_content[data-v-9774f05e] {
|
|
55
55
|
margin-top: 16px;
|
|
56
56
|
}
|
|
57
|
-
.pro-table_header_button-bar[data-v-
|
|
57
|
+
.pro-table_header_button-bar[data-v-9774f05e] {
|
|
58
58
|
flex: 1;
|
|
59
59
|
}
|
|
60
|
-
.pro-table_header_toolbar[data-v-
|
|
60
|
+
.pro-table_header_toolbar[data-v-9774f05e] {
|
|
61
61
|
margin-left: 12px;
|
|
62
62
|
}
|
|
63
|
-
.pro-table_pagination[data-v-
|
|
63
|
+
.pro-table_pagination[data-v-9774f05e] {
|
|
64
64
|
justify-content: flex-end;
|
|
65
65
|
padding: 16px 0;
|
|
66
66
|
}
|
package/es/index.js
CHANGED
|
@@ -54,7 +54,7 @@ const INJECT_CONFIG = {
|
|
|
54
54
|
},
|
|
55
55
|
"pro-form": {
|
|
56
56
|
injectionKey: Symbol(""),
|
|
57
|
-
// 表单实例由 `:form`
|
|
57
|
+
// 表单实例由 `:form` 显式传入;grid 仅作为启用时的参数默认值,不开启网格
|
|
58
58
|
ignoreProps: ["form"],
|
|
59
59
|
default: { grid: { gutter: 24 } }
|
|
60
60
|
},
|
|
@@ -289,6 +289,8 @@ const PLACEHOLDER_KEYS = {
|
|
|
289
289
|
"date-picker.week": "date-picker.placeholder",
|
|
290
290
|
"date-picker.month": "date-picker.placeholder",
|
|
291
291
|
"date-picker.months": "date-picker.placeholder",
|
|
292
|
+
"date-picker.quarter": "date-picker.placeholder",
|
|
293
|
+
"date-picker.quarters": "date-picker.placeholder",
|
|
292
294
|
"date-picker.year": "date-picker.placeholder",
|
|
293
295
|
"date-picker.years": "date-picker.placeholder",
|
|
294
296
|
"date-picker.datetime": "date-picker.placeholder",
|
|
@@ -299,6 +301,7 @@ const RANGE_PLACEHOLDER_KEYS = {
|
|
|
299
301
|
"date-picker.daterange": ["date-picker.start", "date-picker.end"],
|
|
300
302
|
"date-picker.monthrange": ["date-picker.startMonth", "date-picker.endMonth"],
|
|
301
303
|
"date-picker.yearrange": ["date-picker.startYear", "date-picker.endYear"],
|
|
304
|
+
"date-picker.quarterrange": ["date-picker.start", "date-picker.end"],
|
|
302
305
|
"date-picker.datetimerange": ["date-picker.startTime", "date-picker.endTime"]
|
|
303
306
|
};
|
|
304
307
|
const getPlaceholderProps = (key, injectProps, t) => {
|
|
@@ -331,6 +334,9 @@ function warnUnknownComponent(name) {
|
|
|
331
334
|
`[pro-components] 未识别的组件类型 "${name}",已降级为原生元素渲染。如为自定义组件请在 componentMap 或 ProComponentProvider 中注册。`
|
|
332
335
|
);
|
|
333
336
|
}
|
|
337
|
+
const normalizeDisabled = (value) => value === "" || value === "disabled" ? true : Boolean(value);
|
|
338
|
+
const resolveDisabled = (value) => value === void 0 || value === null ? void 0 : normalizeDisabled(value);
|
|
339
|
+
const resolveEffectiveDisabled = (explicit, inherited, fallback) => resolveDisabled(explicit) ?? (normalizeDisabled(inherited) || normalizeDisabled(fallback));
|
|
334
340
|
const zhCN = {
|
|
335
341
|
...zhCN$1,
|
|
336
342
|
// 日期/时间选择器占位符(对应 INJECT_CONFIG 中 date-picker.* 的占位默认值)
|
|
@@ -455,8 +461,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
455
461
|
t
|
|
456
462
|
);
|
|
457
463
|
const modelPropName = attrs.modelProp ?? initProps.modelProp ?? "modelValue";
|
|
458
|
-
const
|
|
459
|
-
|
|
464
|
+
const effectiveDisabled = resolveEffectiveDisabled(
|
|
465
|
+
attrs.disabled,
|
|
466
|
+
parentDisabled.value,
|
|
467
|
+
initProps.disabled
|
|
468
|
+
);
|
|
460
469
|
const mergedProps = mergeProps(
|
|
461
470
|
initProps,
|
|
462
471
|
attrs,
|
|
@@ -627,10 +636,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
627
636
|
var _a;
|
|
628
637
|
return (_a = toValue(injectFormConfig)) == null ? void 0 : _a.grid;
|
|
629
638
|
});
|
|
630
|
-
const enableGrid = computed(() =>
|
|
631
|
-
if (props.grid !== void 0) return !!props.grid;
|
|
632
|
-
return !!injectGrid.value;
|
|
633
|
-
});
|
|
639
|
+
const enableGrid = computed(() => !!props.grid);
|
|
634
640
|
const computedGridProps = computed(() => {
|
|
635
641
|
return enableGrid.value ? { ...getObject(injectGrid.value), ...getObject(props.grid) } : {};
|
|
636
642
|
});
|
|
@@ -721,14 +727,15 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
721
727
|
key: 0,
|
|
722
728
|
grid: item.rawField.grid ?? props.grid,
|
|
723
729
|
fields: item.rawField.fields,
|
|
724
|
-
disabled: toValue(item.rawField.disabled)
|
|
730
|
+
disabled: toValue(item.rawField.disabled) ?? props.disabled
|
|
725
731
|
}, null, 8, ["grid", "fields", "disabled"])) : (openBlock(), createBlock(_sfc_main$d, mergeProps({
|
|
726
732
|
key: 1,
|
|
727
733
|
ref_for: true,
|
|
728
734
|
ref: (el) => setComponentRef(item.rawField, el)
|
|
729
735
|
}, { ref_for: true }, item.componentProps, {
|
|
730
|
-
path: item.path
|
|
731
|
-
|
|
736
|
+
path: item.path,
|
|
737
|
+
disabled: toValue(item.rawField.disabled) ?? props.disabled
|
|
738
|
+
}), null, 16, ["path", "disabled"]))
|
|
732
739
|
]),
|
|
733
740
|
_: 2
|
|
734
741
|
}, [
|
|
@@ -764,12 +771,12 @@ const _export_sfc = (sfc, props) => {
|
|
|
764
771
|
}
|
|
765
772
|
return target;
|
|
766
773
|
};
|
|
767
|
-
const BaseFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
774
|
+
const BaseFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-a29a46c8"]]);
|
|
768
775
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
769
776
|
...{ name: "ProForm", inheritAttrs: false },
|
|
770
777
|
__name: "index",
|
|
771
778
|
props: {
|
|
772
|
-
grid: { type: [Boolean, Object], default:
|
|
779
|
+
grid: { type: [Boolean, Object], default: false },
|
|
773
780
|
form: { default: void 0 }
|
|
774
781
|
},
|
|
775
782
|
setup(__props) {
|
|
@@ -815,6 +822,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
815
822
|
omitBy(camelizeProperties(attrs), (value) => value === void 0)
|
|
816
823
|
);
|
|
817
824
|
});
|
|
825
|
+
const outerDisabled = useDisabledContext();
|
|
826
|
+
const formDisabled = computed(() => {
|
|
827
|
+
const explicit = resolveDisabled(toValue(formAttrs.value.disabled));
|
|
828
|
+
if (explicit !== void 0) return explicit;
|
|
829
|
+
return outerDisabled.value ? true : void 0;
|
|
830
|
+
});
|
|
818
831
|
const slots = useSlots();
|
|
819
832
|
const formSlotsRef = shallowRef(slots);
|
|
820
833
|
onUpdated(() => {
|
|
@@ -834,8 +847,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
834
847
|
default: withCtx(() => [
|
|
835
848
|
createVNode(BaseFormItem, {
|
|
836
849
|
fields: fields.value,
|
|
837
|
-
grid: props.grid
|
|
838
|
-
|
|
850
|
+
grid: props.grid,
|
|
851
|
+
disabled: formDisabled.value
|
|
852
|
+
}, null, 8, ["fields", "grid", "disabled"]),
|
|
839
853
|
renderSlot(_ctx.$slots, "default")
|
|
840
854
|
]),
|
|
841
855
|
_: 3
|
|
@@ -1626,15 +1640,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1626
1640
|
};
|
|
1627
1641
|
});
|
|
1628
1642
|
const showPagination = computed(() => computedPagination.value !== false);
|
|
1643
|
+
let sizeChangeWindow = false;
|
|
1629
1644
|
const onCurrentChange = (current) => {
|
|
1630
1645
|
var _a, _b;
|
|
1646
|
+
if (sizeChangeWindow) return;
|
|
1631
1647
|
(_b = (_a = props.table) == null ? void 0 : _a.setPageParam) == null ? void 0 : _b.call(_a, { current });
|
|
1632
1648
|
_search();
|
|
1633
1649
|
};
|
|
1634
1650
|
const onSizeChange = (pageSize) => {
|
|
1635
1651
|
var _a, _b;
|
|
1652
|
+
sizeChangeWindow = true;
|
|
1636
1653
|
(_b = (_a = props.table) == null ? void 0 : _a.setPageParam) == null ? void 0 : _b.call(_a, { pageSize, current: 1 });
|
|
1637
1654
|
_search();
|
|
1655
|
+
nextTick(() => {
|
|
1656
|
+
sizeChangeWindow = false;
|
|
1657
|
+
});
|
|
1638
1658
|
};
|
|
1639
1659
|
const onPaginationChange = (currentPage, pageSize) => {
|
|
1640
1660
|
var _a;
|
|
@@ -1762,7 +1782,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1762
1782
|
};
|
|
1763
1783
|
}
|
|
1764
1784
|
});
|
|
1765
|
-
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
1785
|
+
const ProTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-9774f05e"]]);
|
|
1766
1786
|
function useTable(params = {}) {
|
|
1767
1787
|
const { data, columns, ...rest } = params;
|
|
1768
1788
|
const coreTable = useTable$1({
|