mrxy-yk 1.2.9 → 1.2.10
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/dist/config/index.js +2 -0
- package/dist/element-plus/components/attrs.d.ts +1 -0
- package/dist/element-plus/components/table-column/TableColumn.d.ts +4 -5
- package/dist/element-plus/components/table-column/TableColumn.vue.js +36 -17
- package/dist/element-plus/components/table-column/index.d.ts +7 -0
- package/dist/element-plus/components/table-column/index.js +10 -0
- package/package.json +1 -1
- package/web-types.json +22 -2
package/dist/config/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElUploadGlobal, ElUploadImagesGlobal } from "../element-plus/components/upload/index.js";
|
|
2
2
|
import { ElImagesGlobal } from "../element-plus/components/images/index.js";
|
|
3
|
+
import { ElTableColumnGlobal } from "../element-plus/components/table-column/index.js";
|
|
3
4
|
import { ExportLinkGlobal } from "../components/export-link/index.js";
|
|
4
5
|
import { EmptyGlobal } from "../components/empty/index.js";
|
|
5
6
|
const AMapConfig = {
|
|
@@ -16,6 +17,7 @@ export {
|
|
|
16
17
|
AMapConfig,
|
|
17
18
|
EChartsThemeConfig,
|
|
18
19
|
ElImagesGlobal,
|
|
20
|
+
ElTableColumnGlobal,
|
|
19
21
|
ElUploadGlobal,
|
|
20
22
|
ElUploadImagesGlobal,
|
|
21
23
|
EmptyGlobal,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
prop?: string;
|
|
4
|
-
type?: 'index' | 'selection' | 'expand';
|
|
5
3
|
emptyStr?: string;
|
|
6
4
|
};
|
|
7
5
|
declare function __VLS_template(): {
|
|
8
6
|
attrs: Partial<{}>;
|
|
9
7
|
slots: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}): any;
|
|
8
|
+
'filter-icon'?(_: {}): any;
|
|
9
|
+
expand?(_: {}): any;
|
|
10
|
+
header?(_: {}): any;
|
|
11
|
+
default?(_: {}): any;
|
|
13
12
|
};
|
|
14
13
|
refs: {};
|
|
15
14
|
rootEl: any;
|
|
@@ -1,31 +1,50 @@
|
|
|
1
1
|
import { ElTableColumn } from "element-plus/es";
|
|
2
|
-
import { defineComponent, openBlock, createBlock, mergeProps, withCtx, renderSlot
|
|
2
|
+
import { defineComponent, openBlock, createBlock, mergeProps, createSlots, withCtx, renderSlot } from "vue";
|
|
3
3
|
import { ObjectUtil } from "../../../utils/prototype/lib/ObjectUtil.js";
|
|
4
|
+
import { ElTableColumnGlobal } from "./index.js";
|
|
4
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "TableColumn",
|
|
6
7
|
props: {
|
|
7
|
-
prop: {},
|
|
8
|
-
type: {},
|
|
9
8
|
emptyStr: { default: "—" }
|
|
10
9
|
},
|
|
11
10
|
setup(__props) {
|
|
12
11
|
const props = __props;
|
|
12
|
+
const emptyStr = props.emptyStr || ElTableColumnGlobal.props.emptyStr.default || "—";
|
|
13
|
+
function defaultFormatter(row, column, cellValue, index) {
|
|
14
|
+
return ObjectUtil.isEmptyToVal(cellValue, emptyStr);
|
|
15
|
+
}
|
|
13
16
|
return (_ctx, _cache) => {
|
|
14
17
|
const _component_el_table_column = ElTableColumn;
|
|
15
|
-
return openBlock(), createBlock(_component_el_table_column, mergeProps({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
return openBlock(), createBlock(_component_el_table_column, mergeProps(_ctx.$attrs, { formatter: defaultFormatter }), createSlots({ _: 2 }, [
|
|
19
|
+
_ctx.$slots["filter-icon"] ? {
|
|
20
|
+
name: "filter-icon",
|
|
21
|
+
fn: withCtx(() => [
|
|
22
|
+
renderSlot(_ctx.$slots, "filter-icon")
|
|
23
|
+
]),
|
|
24
|
+
key: "0"
|
|
25
|
+
} : void 0,
|
|
26
|
+
_ctx.$slots["expand"] ? {
|
|
27
|
+
name: "expand",
|
|
28
|
+
fn: withCtx(() => [
|
|
29
|
+
renderSlot(_ctx.$slots, "expand")
|
|
30
|
+
]),
|
|
31
|
+
key: "1"
|
|
32
|
+
} : void 0,
|
|
33
|
+
_ctx.$slots["header"] ? {
|
|
34
|
+
name: "header",
|
|
35
|
+
fn: withCtx(() => [
|
|
36
|
+
renderSlot(_ctx.$slots, "header")
|
|
37
|
+
]),
|
|
38
|
+
key: "2"
|
|
39
|
+
} : void 0,
|
|
40
|
+
_ctx.$slots["default"] ? {
|
|
41
|
+
name: "default",
|
|
42
|
+
fn: withCtx(() => [
|
|
43
|
+
renderSlot(_ctx.$slots, "default")
|
|
44
|
+
]),
|
|
45
|
+
key: "3"
|
|
46
|
+
} : void 0
|
|
47
|
+
]), 1040);
|
|
29
48
|
};
|
|
30
49
|
}
|
|
31
50
|
});
|
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "mrxy-yk",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.10",
|
|
5
5
|
"js-types-syntax": "typescript",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1465,7 +1465,27 @@
|
|
|
1465
1465
|
"slots": [
|
|
1466
1466
|
{
|
|
1467
1467
|
"name": "default",
|
|
1468
|
-
"
|
|
1468
|
+
"description": "Custom content for table columns",
|
|
1469
|
+
"doc-url": "https://element-plus.org/en-US/component/table.html#table-column-slots",
|
|
1470
|
+
"type": "{ row: any, column: TableColumnCtx<T>, $index: number }"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "header",
|
|
1474
|
+
"description": "Custom content for table header",
|
|
1475
|
+
"doc-url": "https://element-plus.org/en-US/component/table.html#table-column-slots",
|
|
1476
|
+
"type": "{ column: TableColumnCtx<T>, $index: number }"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "filter-icon",
|
|
1480
|
+
"description": "Custom content for filter icon",
|
|
1481
|
+
"doc-url": "https://element-plus.org/en-US/component/table.html#table-column-slots",
|
|
1482
|
+
"type": "{ filterOpened: boolean }"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"name": "expand",
|
|
1486
|
+
"description": "Custom content for expand columns. The `expandable` property is supported starting from v2.13.2.",
|
|
1487
|
+
"doc-url": "https://element-plus.org/en-US/component/table.html#table-column-slots",
|
|
1488
|
+
"type": "{ expanded: boolean, expandable: boolean }"
|
|
1469
1489
|
}
|
|
1470
1490
|
]
|
|
1471
1491
|
}
|