xrk-components 2.0.0-beta.46 → 2.0.0-beta.48
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/lib/index.esm.js
CHANGED
|
@@ -73641,6 +73641,24 @@ var script$i = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$g
|
|
|
73641
73641
|
var searchFormRef = ref();
|
|
73642
73642
|
var searchBtn = computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
|
|
73643
73643
|
var resetBtn = computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
|
|
73644
|
+
var _getPleaseText = function (type) {
|
|
73645
|
+
if (['input', 'inputNumber'].includes(type)) {
|
|
73646
|
+
return '请输入';
|
|
73647
|
+
}
|
|
73648
|
+
else if (['upload'].includes(type)) {
|
|
73649
|
+
return '请上传';
|
|
73650
|
+
}
|
|
73651
|
+
return '请选择';
|
|
73652
|
+
};
|
|
73653
|
+
var computedDefaultConfig = function (column) {
|
|
73654
|
+
var defaultConfig = {
|
|
73655
|
+
placeholder: "".concat(_getPleaseText(column.type)).concat(column.label)
|
|
73656
|
+
};
|
|
73657
|
+
if (column.type === 'datePicker') {
|
|
73658
|
+
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder: "".concat(column.label, "\u59CB"), endPlaceholder: "".concat(column.label, "\u6B62") });
|
|
73659
|
+
}
|
|
73660
|
+
return defaultConfig;
|
|
73661
|
+
};
|
|
73644
73662
|
var columnsToSearchValue = function (columns) {
|
|
73645
73663
|
return columns.reduce(function (pre, _a) {
|
|
73646
73664
|
var prop = _a.prop, defaultValue = _a.defaultValue;
|
|
@@ -73777,7 +73795,7 @@ var script$i = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$g
|
|
|
73777
73795
|
? (openBlock(), createBlock(resolveDynamicComponent(unref(formItemComponents)[type]), mergeProps({
|
|
73778
73796
|
key: 0,
|
|
73779
73797
|
style: __assign({ minWidth: '240px' }, (style || {}))
|
|
73780
|
-
}, __assign(__assign({ clearable: true }, config), proxyColumnListener(listener || {})), {
|
|
73798
|
+
}, __assign(__assign(__assign(__assign({}, computedDefaultConfig({ label: label, prop: prop, type: type })), { clearable: true }), config), proxyColumnListener(listener || {})), {
|
|
73781
73799
|
disabled: unref(isFunction)(disabled) ? disabled(searchValue) : disabled,
|
|
73782
73800
|
modelValue: searchValue[prop],
|
|
73783
73801
|
"onUpdate:modelValue": function ($event) { return ((searchValue[prop]) = $event); }
|
|
@@ -75549,12 +75567,14 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
75549
75567
|
return useGetGlobalDefaultProp(propsKey$1, 'useBaseClass', true);
|
|
75550
75568
|
}) },
|
|
75551
75569
|
spanMethod: { type: null, required: false },
|
|
75552
|
-
treeProps: { type: Object, required: false }
|
|
75570
|
+
treeProps: { type: Object, required: false },
|
|
75571
|
+
tooltipOptions: { type: null, required: false }
|
|
75553
75572
|
}, emits: ["sort-change", "expand-change", "select", "select-all"], setup: function (__props, _a) {
|
|
75554
75573
|
var _b;
|
|
75555
75574
|
var expose = _a.expose, emits = _a.emit;
|
|
75556
75575
|
var _props = __props;
|
|
75557
75576
|
var slots = useSlots();
|
|
75577
|
+
var bodyHtml = document.body;
|
|
75558
75578
|
var _c = useTableSetup(), selectionIds = _c.selectionIds, selectionRows = _c.selectionRows, getSelectionRows = _c.getSelectionRows, addSelectionRow = _c.addSelectionRow, removeSelectionRow = _c.removeSelectionRow, clearSelectionRows = _c.clearSelectionRows;
|
|
75559
75579
|
var props = _props;
|
|
75560
75580
|
var BaseTableRef = ref();
|
|
@@ -75623,6 +75643,7 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
75623
75643
|
emptyText: __props.emptyText,
|
|
75624
75644
|
spanMethod: __props.spanMethod,
|
|
75625
75645
|
"tree-props": __props.treeProps,
|
|
75646
|
+
"tooltip-options": __assign({ popperClass: 'base-tool-tip', appendTo: unref(bodyHtml) }, (__props.tooltipOptions || {})),
|
|
75626
75647
|
onExpandChange: handleExpandChange,
|
|
75627
75648
|
onSortChange: handleSortChange
|
|
75628
75649
|
}, {
|
|
@@ -75650,7 +75671,7 @@ var script$9 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$9
|
|
|
75650
75671
|
}), 128 /* KEYED_FRAGMENT */))
|
|
75651
75672
|
]; }),
|
|
75652
75673
|
_: 1 /* STABLE */
|
|
75653
|
-
}, 8 /* PROPS */, ["class", "data", "height", "maxHeight", "stripe", "border", "size", "fit", "rowClassName", "rowStyle", "cellClassName", "cellStyle", "headerRowClassName", "headerRowStyle", "rowKey", "defaultExpandAll", "expandRowKeys", "defaultSort", "emptyText", "spanMethod", "tree-props"]));
|
|
75674
|
+
}, 8 /* PROPS */, ["class", "data", "height", "maxHeight", "stripe", "border", "size", "fit", "rowClassName", "rowStyle", "cellClassName", "cellStyle", "headerRowClassName", "headerRowStyle", "rowKey", "defaultExpandAll", "expandRowKeys", "defaultSort", "emptyText", "spanMethod", "tree-props", "tooltip-options"]));
|
|
75654
75675
|
};
|
|
75655
75676
|
} }));
|
|
75656
75677
|
|
package/lib/index.umd.js
CHANGED
|
@@ -73644,6 +73644,24 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73644
73644
|
var searchFormRef = vue.ref();
|
|
73645
73645
|
var searchBtn = vue.computed(function () { return (__assign({ text: '搜索', show: true }, props.searchBtn)); });
|
|
73646
73646
|
var resetBtn = vue.computed(function () { return (__assign({ text: '重置', show: true }, props.resetBtn)); });
|
|
73647
|
+
var _getPleaseText = function (type) {
|
|
73648
|
+
if (['input', 'inputNumber'].includes(type)) {
|
|
73649
|
+
return '请输入';
|
|
73650
|
+
}
|
|
73651
|
+
else if (['upload'].includes(type)) {
|
|
73652
|
+
return '请上传';
|
|
73653
|
+
}
|
|
73654
|
+
return '请选择';
|
|
73655
|
+
};
|
|
73656
|
+
var computedDefaultConfig = function (column) {
|
|
73657
|
+
var defaultConfig = {
|
|
73658
|
+
placeholder: "".concat(_getPleaseText(column.type)).concat(column.label)
|
|
73659
|
+
};
|
|
73660
|
+
if (column.type === 'datePicker') {
|
|
73661
|
+
defaultConfig = __assign(__assign({}, defaultConfig), { startPlaceholder: "".concat(column.label, "\u59CB"), endPlaceholder: "".concat(column.label, "\u6B62") });
|
|
73662
|
+
}
|
|
73663
|
+
return defaultConfig;
|
|
73664
|
+
};
|
|
73647
73665
|
var columnsToSearchValue = function (columns) {
|
|
73648
73666
|
return columns.reduce(function (pre, _a) {
|
|
73649
73667
|
var prop = _a.prop, defaultValue = _a.defaultValue;
|
|
@@ -73780,7 +73798,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73780
73798
|
? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(formItemComponents)[type]), vue.mergeProps({
|
|
73781
73799
|
key: 0,
|
|
73782
73800
|
style: __assign({ minWidth: '240px' }, (style || {}))
|
|
73783
|
-
}, __assign(__assign({ clearable: true }, config), proxyColumnListener(listener || {})), {
|
|
73801
|
+
}, __assign(__assign(__assign(__assign({}, computedDefaultConfig({ label: label, prop: prop, type: type })), { clearable: true }), config), proxyColumnListener(listener || {})), {
|
|
73784
73802
|
disabled: vue.unref(isFunction)(disabled) ? disabled(searchValue) : disabled,
|
|
73785
73803
|
modelValue: searchValue[prop],
|
|
73786
73804
|
"onUpdate:modelValue": function ($event) { return ((searchValue[prop]) = $event); }
|
|
@@ -75552,12 +75570,14 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75552
75570
|
return useGetGlobalDefaultProp(propsKey$1, 'useBaseClass', true);
|
|
75553
75571
|
}) },
|
|
75554
75572
|
spanMethod: { type: null, required: false },
|
|
75555
|
-
treeProps: { type: Object, required: false }
|
|
75573
|
+
treeProps: { type: Object, required: false },
|
|
75574
|
+
tooltipOptions: { type: null, required: false }
|
|
75556
75575
|
}, emits: ["sort-change", "expand-change", "select", "select-all"], setup: function (__props, _a) {
|
|
75557
75576
|
var _b;
|
|
75558
75577
|
var expose = _a.expose, emits = _a.emit;
|
|
75559
75578
|
var _props = __props;
|
|
75560
75579
|
var slots = vue.useSlots();
|
|
75580
|
+
var bodyHtml = document.body;
|
|
75561
75581
|
var _c = useTableSetup(), selectionIds = _c.selectionIds, selectionRows = _c.selectionRows, getSelectionRows = _c.getSelectionRows, addSelectionRow = _c.addSelectionRow, removeSelectionRow = _c.removeSelectionRow, clearSelectionRows = _c.clearSelectionRows;
|
|
75562
75582
|
var props = _props;
|
|
75563
75583
|
var BaseTableRef = vue.ref();
|
|
@@ -75626,6 +75646,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75626
75646
|
emptyText: __props.emptyText,
|
|
75627
75647
|
spanMethod: __props.spanMethod,
|
|
75628
75648
|
"tree-props": __props.treeProps,
|
|
75649
|
+
"tooltip-options": __assign({ popperClass: 'base-tool-tip', appendTo: vue.unref(bodyHtml) }, (__props.tooltipOptions || {})),
|
|
75629
75650
|
onExpandChange: handleExpandChange,
|
|
75630
75651
|
onSortChange: handleSortChange
|
|
75631
75652
|
}, {
|
|
@@ -75653,7 +75674,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
75653
75674
|
}), 128 /* KEYED_FRAGMENT */))
|
|
75654
75675
|
]; }),
|
|
75655
75676
|
_: 1 /* STABLE */
|
|
75656
|
-
}, 8 /* PROPS */, ["class", "data", "height", "maxHeight", "stripe", "border", "size", "fit", "rowClassName", "rowStyle", "cellClassName", "cellStyle", "headerRowClassName", "headerRowStyle", "rowKey", "defaultExpandAll", "expandRowKeys", "defaultSort", "emptyText", "spanMethod", "tree-props"]));
|
|
75677
|
+
}, 8 /* PROPS */, ["class", "data", "height", "maxHeight", "stripe", "border", "size", "fit", "rowClassName", "rowStyle", "cellClassName", "cellStyle", "headerRowClassName", "headerRowStyle", "rowKey", "defaultExpandAll", "expandRowKeys", "defaultSort", "emptyText", "spanMethod", "tree-props", "tooltip-options"]));
|
|
75657
75678
|
};
|
|
75658
75679
|
} }));
|
|
75659
75680
|
|
|
@@ -59,7 +59,7 @@ export interface BaseCascaderProps extends BaseCascaderListener, Omit<CascaderPr
|
|
|
59
59
|
/**
|
|
60
60
|
* 使用默认的render,主要是tooltip功能(预防字符过长)
|
|
61
61
|
*/
|
|
62
|
-
useDefaultRender
|
|
62
|
+
useDefaultRender?: boolean;
|
|
63
63
|
}
|
|
64
64
|
export declare type BaseCascaderListener = {
|
|
65
65
|
onChange?: (value: Array<OptionProps['value']>) => void;
|
|
@@ -103,6 +103,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
103
|
type: ObjectConstructor;
|
|
104
104
|
required: false;
|
|
105
105
|
};
|
|
106
|
+
tooltipOptions: {
|
|
107
|
+
type: null;
|
|
108
|
+
required: false;
|
|
109
|
+
};
|
|
106
110
|
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
107
111
|
[key: string]: any;
|
|
108
112
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("sort-change" | "expand-change" | "select" | "select-all")[], "sort-change" | "expand-change" | "select" | "select-all", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -210,6 +214,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
214
|
type: ObjectConstructor;
|
|
211
215
|
required: false;
|
|
212
216
|
};
|
|
217
|
+
tooltipOptions: {
|
|
218
|
+
type: null;
|
|
219
|
+
required: false;
|
|
220
|
+
};
|
|
213
221
|
}>> & {
|
|
214
222
|
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
215
223
|
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
@@ -122,6 +122,7 @@ export declare type BaseTableProps<T extends Record<string, any> = any> = {
|
|
|
122
122
|
prop: keyof T;
|
|
123
123
|
order: 'ascending' | 'descending';
|
|
124
124
|
};
|
|
125
|
+
tooltipOptions?: BaseToolTipProps;
|
|
125
126
|
spanMethod?: SpanMethod<T>;
|
|
126
127
|
onSortChange?: (info: BaseTableSortInfoType<T>) => void;
|
|
127
128
|
onExpandChange?: ((row: T, expandedRows: T[]) => void) & ((row: T, expanded: boolean) => void);
|
|
@@ -11,6 +11,7 @@ export declare type BaseToolTipProps = {
|
|
|
11
11
|
hideAfter?: number;
|
|
12
12
|
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
13
13
|
content?: string | number;
|
|
14
|
+
appendTo?: any;
|
|
14
15
|
style?: StyleValue | undefined;
|
|
15
16
|
/**
|
|
16
17
|
* trigger = hover 时有效
|
|
@@ -18,4 +19,6 @@ export declare type BaseToolTipProps = {
|
|
|
18
19
|
*/
|
|
19
20
|
overShow?: boolean;
|
|
20
21
|
};
|
|
21
|
-
export declare const BaseToolTip: DefineComponent<BaseToolTipProps, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<BaseToolTipProps>, {
|
|
22
|
+
export declare const BaseToolTip: DefineComponent<BaseToolTipProps, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<BaseToolTipProps>, {
|
|
23
|
+
appendTo: any;
|
|
24
|
+
}>;
|