@aspire-ui/element-component-pro 1.0.3 → 1.0.4
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 -0
- package/dist/ProForm/ProForm.vue.d.ts +1 -0
- package/dist/element-component-pro.es.js +389 -375
- package/dist/element-component-pro.es.js.map +1 -1
- package/dist/element-component-pro.umd.js +2 -2
- package/dist/element-component-pro.umd.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/ProForm/ProFormItem.vue +1 -0
- package/src/ProTable/TableAction.vue +16 -5
- package/src/types/index.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -2036,6 +2036,7 @@ declare const _default: {
|
|
|
2036
2036
|
schema: {
|
|
2037
2037
|
field: string;
|
|
2038
2038
|
label: string;
|
|
2039
|
+
labelWidth?: string | undefined;
|
|
2039
2040
|
component?: (import('./types').ProFormBuiltInComponent | import('./types').ProFormCustomComponent) | undefined;
|
|
2040
2041
|
componentProps?: (Record<string, unknown> | ((params: import('./types').RenderCallbackParams & {
|
|
2041
2042
|
formActionType?: import('./types').FormActionType;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ecp-pro-table[data-v-c5638c20]{padding:16px;background:#fff;width:100%;box-sizing:border-box}.ecp-pro-table[data-v-c5638c20] .el-table{width:100%!important}.ecp-pro-table__header[data-v-c5638c20]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.ecp-pro-table__title-wrapper[data-v-c5638c20]{display:flex;align-items:center;gap:4px}.ecp-pro-table__title[data-v-c5638c20]{font-size:16px;font-weight:600}.ecp-pro-table__help[data-v-c5638c20]{color:#909399;cursor:help}.ecp-pro-table__toolbar[data-v-c5638c20]{display:flex;align-items:center;gap:8px}.ecp-pro-table__body[data-v-c5638c20]{width:100%}.ecp-pro-table__pagination[data-v-c5638c20]{margin-top:16px;display:flex;justify-content:flex-end}.ecp-pro-table__col-help[data-v-c5638c20]{margin-left:4px;color:#909399;cursor:help}.ecp-table-action[data-v-
|
|
1
|
+
.ecp-pro-table[data-v-c5638c20]{padding:16px;background:#fff;width:100%;box-sizing:border-box}.ecp-pro-table[data-v-c5638c20] .el-table{width:100%!important}.ecp-pro-table__header[data-v-c5638c20]{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.ecp-pro-table__title-wrapper[data-v-c5638c20]{display:flex;align-items:center;gap:4px}.ecp-pro-table__title[data-v-c5638c20]{font-size:16px;font-weight:600}.ecp-pro-table__help[data-v-c5638c20]{color:#909399;cursor:help}.ecp-pro-table__toolbar[data-v-c5638c20]{display:flex;align-items:center;gap:8px}.ecp-pro-table__body[data-v-c5638c20]{width:100%}.ecp-pro-table__pagination[data-v-c5638c20]{margin-top:16px;display:flex;justify-content:flex-end}.ecp-pro-table__col-help[data-v-c5638c20]{margin-left:4px;color:#909399;cursor:help}.ecp-table-action[data-v-f319e73a],.ecp-table-action__item[data-v-f319e73a]{display:inline-flex;align-items:center;gap:4px}.ecp-table-action__icon[data-v-f319e73a]{margin-right:4px}.ecp-table-action__more[data-v-f319e73a]{display:inline-flex;align-items:center}.ecp-table-action__dropdown-item[data-v-f319e73a]{display:inline-flex;align-items:center;gap:4px}.ecp-tree-select[data-v-f30bba11]{position:relative;width:100%}.ecp-tree-select__filter-inner[data-v-f30bba11]{margin-bottom:8px}.ecp-tree-select__dropdown[data-v-f30bba11]{position:absolute;top:100%;left:0;right:0;max-height:280px;overflow:auto;background:#fff;border:1px solid #dcdfe6;border-radius:4px;margin-top:4px;z-index:1000;padding:8px}.ecp-tree-select__loading[data-v-f30bba11]{padding:24px;text-align:center;color:#909399;font-size:14px}.ecp-pro-form-item__help-icon[data-v-2227d67d]{margin-left:4px;color:#909399;cursor:help;font-size:14px}.ecp-pro-form-item__help-icon[data-v-2227d67d]:hover{color:#409eff}.ecp-pro-form-item__help-item[data-v-2227d67d]{margin-bottom:4px}.ecp-pro-form-item__help-item[data-v-2227d67d]:last-child{margin-bottom:0}.ecp-form-actions[data-v-489c88d2]{text-align:right}.ecp-form-actions__advance[data-v-489c88d2]{margin-right:8px}.el-icon-d-arrow-left.up[data-v-489c88d2]{transform:rotate(90deg)}.el-icon-d-arrow-left.down[data-v-489c88d2]{transform:rotate(-90deg)}.ecp-pro-form[data-v-4ee1cb87]{padding:16px;position:relative}.ecp-pro-form__advance[data-v-4ee1cb87]{margin-bottom:16px}.ecp-pro-form_col[data-v-4ee1cb87]{position:relative;float:right}.el-icon-d-arrow-left.up[data-v-4ee1cb87]{transform:rotate(90deg)}.el-icon-d-arrow-left.down[data-v-4ee1cb87]{transform:rotate(-90deg)}.ecp-form-actions__advance[data-v-4ee1cb87]{position:absolute;bottom:0;left:50%;transform:translate(-50%,-50%)}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export interface ProFormSchema {
|
|
|
85
85
|
field: string;
|
|
86
86
|
/** 标签 */
|
|
87
87
|
label: string;
|
|
88
|
+
/** 单个表单项标签宽度,优先级高于 Form 的 labelWidth */
|
|
89
|
+
labelWidth?: string;
|
|
88
90
|
/**
|
|
89
91
|
* 组件类型:
|
|
90
92
|
* - 内置:'input' | 'select' | 'date-picker' | 'date-range' | 'input-number' | 'switch' | 'cascader' | 'checkbox' | 'radio'
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
:title="action.popConfirm.title"
|
|
13
13
|
:confirm-button-text="action.popConfirm.okText || '确定'"
|
|
14
14
|
:cancel-button-text="action.popConfirm.cancelText || '取消'"
|
|
15
|
-
@confirm="(
|
|
16
|
-
@cancel="(
|
|
15
|
+
@confirm="handlePopConfirmConfirm(action, $event)"
|
|
16
|
+
@cancel="handlePopConfirmCancel(action, $event)"
|
|
17
17
|
>
|
|
18
18
|
<span slot="reference">
|
|
19
19
|
<component
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
size="small"
|
|
26
26
|
:disabled="action.disabled"
|
|
27
27
|
v-bind="action.props"
|
|
28
|
-
|
|
28
|
+
@click="handleActionClick(action, $event)"
|
|
29
29
|
>
|
|
30
30
|
<i v-if="action.icon" :class="['ecp-table-action__icon', action.icon]" />
|
|
31
31
|
<span>{{ action.label }}</span>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
size="small"
|
|
46
46
|
:disabled="action.disabled"
|
|
47
47
|
v-bind="action.props"
|
|
48
|
-
@click="(
|
|
48
|
+
@click="handleActionClick(action, $event)"
|
|
49
49
|
>
|
|
50
50
|
<i v-if="action.icon" :class="['ecp-table-action__icon', action.icon]" />
|
|
51
51
|
<span>{{ action.label }}</span>
|
|
@@ -133,6 +133,10 @@ const handleClick = (action: TableActionItem, e: MouseEvent) => {
|
|
|
133
133
|
action.onClick?.(e)
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
const handleActionClick = (action: TableActionItem, e: MouseEvent) => {
|
|
137
|
+
handleClick(action, e)
|
|
138
|
+
}
|
|
139
|
+
|
|
136
140
|
const handlePopConfirm = (action: TableActionItem, type: 'confirm' | 'cancel', e: MouseEvent) => {
|
|
137
141
|
if (props.stopButtonPropagation) {
|
|
138
142
|
e.stopPropagation()
|
|
@@ -145,6 +149,14 @@ const handlePopConfirm = (action: TableActionItem, type: 'confirm' | 'cancel', e
|
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
152
|
+
const handlePopConfirmConfirm = (action: TableActionItem, e: MouseEvent) => {
|
|
153
|
+
handlePopConfirm(action, 'confirm', e)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const handlePopConfirmCancel = (action: TableActionItem, e: MouseEvent) => {
|
|
157
|
+
handlePopConfirm(action, 'cancel', e)
|
|
158
|
+
}
|
|
159
|
+
|
|
148
160
|
const handleDropdownCommand = (index: number | string) => {
|
|
149
161
|
const idx = Number(index)
|
|
150
162
|
const action = visibleDropDownActions.value[idx]
|
|
@@ -190,4 +202,3 @@ const handleDropdownCommand = (index: number | string) => {
|
|
|
190
202
|
gap: 4px;
|
|
191
203
|
}
|
|
192
204
|
</style>
|
|
193
|
-
|
package/src/types/index.ts
CHANGED
|
@@ -105,6 +105,8 @@ export interface ProFormSchema {
|
|
|
105
105
|
field: string
|
|
106
106
|
/** 标签 */
|
|
107
107
|
label: string
|
|
108
|
+
/** 单个表单项标签宽度,优先级高于 Form 的 labelWidth */
|
|
109
|
+
labelWidth?: string
|
|
108
110
|
/**
|
|
109
111
|
* 组件类型:
|
|
110
112
|
* - 内置:'input' | 'select' | 'date-picker' | 'date-range' | 'input-number' | 'switch' | 'cascader' | 'checkbox' | 'radio'
|