@deppon/deppon-template 2.5.6 → 2.5.7
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/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '_virtual/_rollup-plugin-inject-process-env.js';
|
|
2
|
-
|
|
2
|
+
export { default as ProForm } from './pro-form/index.js';
|
|
3
3
|
import './pro-table';
|
|
4
4
|
import './pro-dialog/ProDialog.vue.js';
|
|
5
5
|
import './pro-field';
|
|
@@ -8,7 +8,6 @@ import './pro-field';
|
|
|
8
8
|
export { default as ProFieldSelect } from './pro-field/components/Select';
|
|
9
9
|
import './pro-field';
|
|
10
10
|
export { default as ProFieldDatePicker } from './pro-field/components/DatePicker';
|
|
11
|
-
export { default as ProForm } from './pro-form';
|
|
12
11
|
export { default as ProTable } from './pro-table';
|
|
13
12
|
import './pro-layout';
|
|
14
13
|
export { default as ProLayout } from './pro-layout';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SlotsType } from 'vue';
|
|
2
|
+
export interface ProFormActionsSlotForm {
|
|
3
|
+
validate?: (props?: string | string[]) => Promise<boolean>;
|
|
4
|
+
resetFields?: () => void;
|
|
5
|
+
setFieldsValue?: (values: Record<string, unknown>) => void;
|
|
6
|
+
clearValidate?: (props?: string | string[]) => void;
|
|
7
|
+
submit?: () => void;
|
|
8
|
+
reset?: () => void;
|
|
9
|
+
validateField?: (props?: string | string[]) => Promise<boolean>;
|
|
10
|
+
getFieldsValue?: () => Record<string, unknown>;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface ProFormActionsSlotProps {
|
|
14
|
+
form: ProFormActionsSlotForm;
|
|
15
|
+
model?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ProFormSlotMap {
|
|
18
|
+
actions: (props: ProFormActionsSlotProps) => unknown;
|
|
19
|
+
title: () => unknown;
|
|
20
|
+
}
|
|
21
|
+
export type ProFormSlots = SlotsType<ProFormSlotMap>;
|
package/es/pro-form/index.d.ts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { DefineComponent } from 'vue';
|
|
2
|
+
import type { ProFormSlots } from './form-slots';
|
|
3
|
+
|
|
4
|
+
export type { ProFormActionsSlotForm, ProFormActionsSlotProps, ProFormSlotMap, ProFormSlots } from './form-slots';
|
|
5
|
+
|
|
6
|
+
declare const ProForm: DefineComponent<
|
|
7
|
+
Record<string, unknown>,
|
|
8
|
+
Record<string, unknown>,
|
|
9
|
+
unknown,
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
{},
|
|
13
|
+
{},
|
|
14
|
+
{},
|
|
15
|
+
string,
|
|
16
|
+
{},
|
|
17
|
+
Record<string, unknown>,
|
|
18
|
+
{},
|
|
19
|
+
ProFormSlots
|
|
20
|
+
>;
|
|
2
21
|
|
|
3
|
-
declare const ProForm: DefineComponent<Record<string, never>, Record<string, never>, any>;
|
|
4
22
|
export default ProForm;
|
package/es/pro-form/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import '../_virtual/_rollup-plugin-inject-process-env.js';
|
|
2
2
|
import './ProForm.vue.js';
|
|
3
|
-
|
|
3
|
+
import script from './ProForm.vue_vue_type_script_setup_true_lang.vue.js';
|
|
4
|
+
|
|
5
|
+
var ProForm = script;
|
|
6
|
+
var ProForm$1 = ProForm;
|
|
7
|
+
|
|
8
|
+
export { ProForm$1 as default };
|
|
@@ -1244,8 +1244,8 @@ body .el-overlay-dialog,
|
|
|
1244
1244
|
}
|
|
1245
1245
|
.pro-table-container .table-wrapper {
|
|
1246
1246
|
position: relative !important;
|
|
1247
|
-
overflow-
|
|
1248
|
-
|
|
1247
|
+
/* 横向滚动交给 el-table 内部 scrollbar,避免与 fixed 列双滚动层导致 show-overflow-tooltip 定位偏移 */
|
|
1248
|
+
overflow-x: hidden !important;
|
|
1249
1249
|
/* 加载状态时隐藏滚动条 */
|
|
1250
1250
|
/* 只有启用拖拽时才显示 grab 光标 */
|
|
1251
1251
|
/* 拖拽时禁用文本选择 */
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import '../_virtual/_rollup-plugin-inject-process-env.js';
|
|
2
2
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
4
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
6
5
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
8
8
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
9
9
|
import { defineComponent, useAttrs, computed, ref, watch, onMounted, onUnmounted, provide, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createVNode, createTextVNode, createElementVNode, normalizeStyle, mergeProps, createSlots, normalizeProps, guardReactiveProps, Fragment, renderList, nextTick } from 'vue';
|
|
10
10
|
import { ElButton, ElSkeleton, ElTable, ElEmpty, ElTableColumn, ElPagination } from '@deppon/deppon-ui';
|
|
11
|
+
import ProForm from '../pro-form/index.js';
|
|
11
12
|
import './ProTableColumn.vue.js';
|
|
12
13
|
import './ToolBar/index.vue.js';
|
|
13
|
-
import script$
|
|
14
|
-
import script$
|
|
15
|
-
import script$1 from '../pro-form/ProForm.vue_vue_type_script_setup_true_lang.vue.js';
|
|
14
|
+
import script$1 from './ToolBar/index.vue_vue_type_script_setup_true_lang.vue.js';
|
|
15
|
+
import script$2 from './ProTableColumn.vue_vue_type_script_setup_true_lang.vue.js';
|
|
16
16
|
|
|
17
|
-
var _excluded = ["fixedTable", "showHeader", "showPagination", "showOperations", "showToolbar", "dataSource", "columns", "currentPage", "pageSize", "pageSizes", "total", "loading", "searchLabelWidth", "searchCols", "rowSelection", "height", "searchTitle", "tableTitle", "editable", "readonly", "toolbar", "toolbarOptions", "tableSize"],
|
|
17
|
+
var _excluded = ["fixedTable", "showHeader", "showPagination", "showOperations", "showToolbar", "dataSource", "columns", "currentPage", "pageSize", "pageSizes", "total", "loading", "searchLabelWidth", "searchCols", "rowSelection", "height", "searchTitle", "tableTitle", "editable", "readonly", "toolbar", "toolbarOptions", "tableSize", "tooltipOptions"],
|
|
18
18
|
_excluded2 = ["_originalIndex"];
|
|
19
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
19
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
22
20
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
23
21
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
var _hoisted_1 = {
|
|
25
25
|
key: 0,
|
|
26
26
|
"class": "table-header-title"
|
|
@@ -285,8 +285,15 @@ var script = /*@__PURE__*/defineComponent({
|
|
|
285
285
|
attrs.toolbar;
|
|
286
286
|
attrs.toolbarOptions;
|
|
287
287
|
attrs.tableSize;
|
|
288
|
-
var
|
|
289
|
-
|
|
288
|
+
var userTooltipOptions = attrs.tooltipOptions,
|
|
289
|
+
tableAttrs = _objectWithoutProperties(attrs, _excluded);
|
|
290
|
+
|
|
291
|
+
// 溢出 tooltip 默认挂到 body,避免 appendTo=tableWrapper + 固定列/外层滚动导致 popper 错位
|
|
292
|
+
return _objectSpread(_objectSpread({}, tableAttrs), {}, {
|
|
293
|
+
tooltipOptions: _objectSpread({
|
|
294
|
+
appendTo: 'body'
|
|
295
|
+
}, userTooltipOptions)
|
|
296
|
+
});
|
|
290
297
|
});
|
|
291
298
|
|
|
292
299
|
// 表格引用
|
|
@@ -3811,7 +3818,7 @@ var script = /*@__PURE__*/defineComponent({
|
|
|
3811
3818
|
}])
|
|
3812
3819
|
}, [__props.searchTitle || _ctx.$slots.searchTitle ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "searchTitle", {}, function () {
|
|
3813
3820
|
return [__props.searchTitle ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.searchTitle), 1 /* TEXT */)) : createCommentVNode("v-if", true)];
|
|
3814
|
-
})])) : createCommentVNode("v-if", true), __props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_3, [searchColumns.value.length > 0 ? (openBlock(), createBlock(unref(
|
|
3821
|
+
})])) : createCommentVNode("v-if", true), __props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_3, [searchColumns.value.length > 0 ? (openBlock(), createBlock(unref(ProForm), {
|
|
3815
3822
|
key: 0,
|
|
3816
3823
|
ref_key: "searchFormRef",
|
|
3817
3824
|
ref: searchFormRef,
|
|
@@ -3852,7 +3859,7 @@ var script = /*@__PURE__*/defineComponent({
|
|
|
3852
3859
|
key: 1
|
|
3853
3860
|
})])) : createCommentVNode("v-if", true), __props.tableTitle || _ctx.$slots.tableTitle || __props.showOperations || __props.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_4, [__props.tableTitle || _ctx.$slots.tableTitle ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "tableTitle", {}, function () {
|
|
3854
3861
|
return [__props.tableTitle ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.tableTitle), 1 /* TEXT */)) : createCommentVNode("v-if", true)];
|
|
3855
|
-
})])) : createCommentVNode("v-if", true), __props.showOperations || __props.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_7, [__props.showOperations ? (openBlock(), createElementBlock("div", _hoisted_8, [renderSlot(_ctx.$slots, "operations")])) : createCommentVNode("v-if", true), __props.showToolbar ? (openBlock(), createBlock(script$
|
|
3862
|
+
})])) : createCommentVNode("v-if", true), __props.showOperations || __props.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_7, [__props.showOperations ? (openBlock(), createElementBlock("div", _hoisted_8, [renderSlot(_ctx.$slots, "operations")])) : createCommentVNode("v-if", true), __props.showToolbar ? (openBlock(), createBlock(script$1, {
|
|
3856
3863
|
key: 1,
|
|
3857
3864
|
columns: __props.columns,
|
|
3858
3865
|
options: __props.toolbarOptions,
|
|
@@ -3934,7 +3941,7 @@ var script = /*@__PURE__*/defineComponent({
|
|
|
3934
3941
|
})) : createCommentVNode("v-if", true), tableColumns.value && tableColumns.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, {
|
|
3935
3942
|
key: 2
|
|
3936
3943
|
}, renderList(tableColumns.value, function (column) {
|
|
3937
|
-
return openBlock(), createBlock(script$
|
|
3944
|
+
return openBlock(), createBlock(script$2, {
|
|
3938
3945
|
key: column.prop || column.key || column.label,
|
|
3939
3946
|
column: column,
|
|
3940
3947
|
editable: __props.editable || __props.rowEdit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deppon/deppon-template",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"less": "^4.2.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@deppon/deppon-assets": "2.5.
|
|
55
|
-
"@deppon/deppon-request": "2.5.
|
|
56
|
-
"@deppon/deppon-router": "2.5.
|
|
57
|
-
"@deppon/deppon-ui": "2.5.
|
|
58
|
-
"@deppon/deppon-utils": "2.5.
|
|
54
|
+
"@deppon/deppon-assets": "2.5.7",
|
|
55
|
+
"@deppon/deppon-request": "2.5.7",
|
|
56
|
+
"@deppon/deppon-router": "2.5.7",
|
|
57
|
+
"@deppon/deppon-ui": "2.5.7",
|
|
58
|
+
"@deppon/deppon-utils": "2.5.7",
|
|
59
59
|
"dayjs": "^1.11.10",
|
|
60
60
|
"lodash-es": "^4.17.21",
|
|
61
61
|
"mitt": "^3.0.1"
|