mrxy-yk 1.3.2 → 1.3.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.
|
@@ -5,13 +5,22 @@ import { ElTableColumnGlobal } from "./index.js";
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "TableColumn",
|
|
7
7
|
props: {
|
|
8
|
-
emptyStr: {}
|
|
8
|
+
emptyStr: {},
|
|
9
|
+
formatter: {}
|
|
9
10
|
},
|
|
10
11
|
setup(__props) {
|
|
11
12
|
const props = __props;
|
|
12
13
|
const emptyStr = props.emptyStr || ElTableColumnGlobal.props.emptyStr.default || "—";
|
|
13
14
|
function defaultFormatter(row, column, cellValue, index) {
|
|
14
|
-
|
|
15
|
+
let result = cellValue;
|
|
16
|
+
if (props.formatter) {
|
|
17
|
+
if (typeof props.formatter === "function") {
|
|
18
|
+
result = props.formatter(row, column, cellValue, index);
|
|
19
|
+
} else {
|
|
20
|
+
return props.formatter;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return result || ObjectUtil.isEmptyToVal(result, emptyStr);
|
|
15
24
|
}
|
|
16
25
|
return (_ctx, _cache) => {
|
|
17
26
|
const _component_el_table_column = ElTableColumn;
|
|
@@ -20,7 +20,7 @@ type UseTableSearchHooksOptions<
|
|
|
20
20
|
// 获取表格数据
|
|
21
21
|
getTableData(...args: TDP): TDR
|
|
22
22
|
// 删除表格项目
|
|
23
|
-
delTableItem?(id:
|
|
23
|
+
delTableItem?(id: any): void
|
|
24
24
|
// 删除确认框提示内容
|
|
25
25
|
deleteConfirmMessage?: string
|
|
26
26
|
// 删除确认框提示标题
|
|
@@ -47,7 +47,7 @@ type UseTableSearchHooksExample<
|
|
|
47
47
|
tableRef?: ShallowRef<TableInstance>
|
|
48
48
|
tableData: TDT
|
|
49
49
|
getTableData(...args: TDP): TDR
|
|
50
|
-
delTableItem(id:
|
|
50
|
+
delTableItem(id: any): void
|
|
51
51
|
setTotal(total: number): void
|
|
52
52
|
setTableData(tableData: TD[]): void
|
|
53
53
|
searchedParams: ShallowRef<SP>
|
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
emptyStr?: string;
|
|
4
|
-
};
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
'filter-icon'?(_: any): any;
|
|
9
|
-
expand?(_: any): any;
|
|
10
|
-
header?(_: any): any;
|
|
11
|
-
default?(_: any): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {};
|
|
14
|
-
rootEl: any;
|
|
15
|
-
};
|
|
16
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
-
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|