@fangzhongya/fang-ui 0.1.19 → 0.1.20
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/components/forms/src/data.cjs +3 -3
- package/dist/components/forms/src/data.d.ts +1 -1
- package/dist/components/forms/src/data.js +3 -3
- package/dist/components/forms/src/index2.cjs +5 -3
- package/dist/components/forms/src/index2.js +5 -3
- package/dist/components/forms/src/setup.cjs +0 -7
- package/dist/components/forms/src/setup.js +0 -7
- package/dist/components/forms-div/src/data.cjs +1 -1
- package/dist/components/forms-div/src/data.js +1 -1
- package/dist/components/forms-div/src/index2.cjs +7 -1
- package/dist/components/forms-div/src/index2.js +7 -1
- package/dist/components/forms-item/src/data.cjs +1 -1
- package/dist/components/forms-item/src/data.js +1 -1
- package/dist/components/forms-item/src/index2.cjs +4 -2
- package/dist/components/forms-item/src/index2.js +4 -2
- package/dist/components/forms-items/src/data.cjs +1 -1
- package/dist/components/forms-items/src/data.js +1 -1
- package/dist/components/forms-items/src/index2.cjs +4 -2
- package/dist/components/forms-items/src/index2.js +4 -2
- package/dist/components/global-config/src/data.cjs +12 -0
- package/dist/components/global-config/src/data.d.ts +12 -0
- package/dist/components/global-config/src/data.js +12 -0
- package/dist/components/index.cjs +8 -6
- package/dist/{index.css → components/index.css} +39 -22
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +2 -2
- package/dist/components/index2.scss +2 -2
- package/dist/components/list/index.css +12 -0
- package/dist/components/list/index.scss +15 -0
- package/dist/components/list/src/data.cjs +21 -2
- package/dist/components/list/src/data.d.ts +22 -1
- package/dist/components/list/src/data.js +21 -2
- package/dist/components/list/src/index2.cjs +61 -10
- package/dist/components/list/src/index2.js +61 -10
- package/dist/components/list/style/index2.scss +1 -0
- package/dist/components/page/index.css +11 -0
- package/dist/components/tables/common/pagin.cjs +60 -16
- package/dist/components/tables/common/pagin.d.ts +8 -0
- package/dist/components/tables/common/pagin.js +60 -16
- package/dist/components/tables/common/tooltip.cjs +101 -0
- package/dist/components/tables/common/tooltip.d.ts +6 -0
- package/dist/components/tables/common/tooltip.js +101 -0
- package/dist/components/tables/common/util.cjs +3 -3
- package/dist/components/tables/common/util.js +3 -3
- package/dist/components/tables/src/column.cjs +19 -15
- package/dist/components/tables/src/column.d.ts +3 -2
- package/dist/components/tables/src/column.js +17 -13
- package/dist/components/tables/src/columns3.cjs +16 -32
- package/dist/components/tables/src/columns3.js +15 -31
- package/dist/components/tables/src/data.cjs +3 -2
- package/dist/components/tables/src/data.d.ts +1 -0
- package/dist/components/tables/src/data.js +3 -2
- package/dist/components/tablespd/index.cjs +9 -0
- package/dist/components/tablespd/index.css +88 -0
- package/dist/components/tablespd/index.d.ts +4 -0
- package/dist/components/tablespd/index.js +9 -0
- package/dist/components/tablespd/index.scss +40 -0
- package/dist/components/tablespd/src/data.cjs +13 -0
- package/dist/components/tablespd/src/data.d.ts +18 -0
- package/dist/components/tablespd/src/data.js +13 -0
- package/dist/components/tablespd/src/index.cjs +4 -0
- package/dist/components/tablespd/src/index.js +4 -0
- package/dist/components/tablespd/src/index2.cjs +111 -0
- package/dist/components/tablespd/src/index2.js +111 -0
- package/dist/components/tablespd/style/index2.scss +4 -0
- package/dist/components/tablesv/src/column.cjs +4 -4
- package/dist/components/tablesv/src/column.js +3 -3
- package/dist/css/index.css +39 -22
- package/dist/css/list.css +12 -0
- package/dist/css/page.css +11 -0
- package/dist/css/tablespd.css +88 -0
- package/dist/directives/index.cjs +6 -4
- package/dist/directives/index.d.ts +1 -0
- package/dist/directives/index.js +4 -2
- package/dist/directives/sortable/index.cjs +45 -0
- package/dist/directives/sortable/index.d.ts +6 -0
- package/dist/directives/sortable/index.js +45 -0
- package/dist/expand/{chunk-XY53LCPN.js → chunk-2BLP2ANQ.js} +3 -0
- package/dist/expand/{chunk-IEODUGVJ.cjs → chunk-OT6GISSR.cjs} +3 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/cssname/index.d.ts +2 -2
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/inherit/index.cjs +0 -8
- package/dist/hooks/inherit/index.d.ts +0 -1
- package/dist/hooks/inherit/index.js +0 -8
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +30 -26
- package/dist/index.js +6 -2
- package/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.cjs +2758 -0
- package/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js +2758 -0
- package/dist/utils/vues/getAttrValue.cjs +11 -0
- package/dist/utils/vues/getAttrValue.d.ts +3 -0
- package/dist/utils/vues/getAttrValue.js +11 -0
- package/dist/utils/vues/index.cjs +2 -0
- package/dist/utils/vues/index.d.ts +1 -0
- package/dist/utils/vues/index.js +2 -0
- package/package.json +7 -5
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{date-picker → global-config}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{date-picker.css → global-config.css} +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { h } from "vue";
|
|
2
|
-
import { setMinWidth } from "../common/util.js";
|
|
3
1
|
import { useHide } from "../../common/use.js";
|
|
4
|
-
import {
|
|
5
|
-
import { setProps, setHeader, columnRender } from "./column.js";
|
|
2
|
+
import { getTableColumn, columnRender } from "./column.js";
|
|
6
3
|
function getLists(arrs, emit, props, slots, listobj) {
|
|
7
4
|
let arr = [];
|
|
8
5
|
arrs == null ? void 0 : arrs.forEach((obj, index) => {
|
|
@@ -23,33 +20,20 @@ function getLists(arrs, emit, props, slots, listobj) {
|
|
|
23
20
|
);
|
|
24
21
|
} else {
|
|
25
22
|
arr.push(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
obj
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
header: (scope) => {
|
|
44
|
-
return setHeader(
|
|
45
|
-
obj,
|
|
46
|
-
scope,
|
|
47
|
-
slots,
|
|
48
|
-
emit,
|
|
49
|
-
props,
|
|
50
|
-
index
|
|
51
|
-
);
|
|
52
|
-
}
|
|
23
|
+
getTableColumn(
|
|
24
|
+
obj,
|
|
25
|
+
emit,
|
|
26
|
+
props,
|
|
27
|
+
slots,
|
|
28
|
+
index,
|
|
29
|
+
(scope) => {
|
|
30
|
+
return getLists(
|
|
31
|
+
obj.children,
|
|
32
|
+
emit,
|
|
33
|
+
props,
|
|
34
|
+
slots,
|
|
35
|
+
obj
|
|
36
|
+
);
|
|
53
37
|
}
|
|
54
38
|
)
|
|
55
39
|
);
|
|
@@ -103,14 +103,15 @@ const dataProps = {
|
|
|
103
103
|
*/
|
|
104
104
|
interval: {
|
|
105
105
|
type: String,
|
|
106
|
-
default: "
|
|
106
|
+
default: "8px"
|
|
107
107
|
},
|
|
108
108
|
/**
|
|
109
109
|
* @props { String } intervalHorizon
|
|
110
110
|
* 查询模式的左右间距
|
|
111
111
|
*/
|
|
112
112
|
intervalHorizon: {
|
|
113
|
-
type: String
|
|
113
|
+
type: String,
|
|
114
|
+
default: "12px"
|
|
114
115
|
}
|
|
115
116
|
};
|
|
116
117
|
const dataEmits = [
|
|
@@ -101,14 +101,15 @@ const dataProps = {
|
|
|
101
101
|
*/
|
|
102
102
|
interval: {
|
|
103
103
|
type: String,
|
|
104
|
-
default: "
|
|
104
|
+
default: "8px"
|
|
105
105
|
},
|
|
106
106
|
/**
|
|
107
107
|
* @props { String } intervalHorizon
|
|
108
108
|
* 查询模式的左右间距
|
|
109
109
|
*/
|
|
110
110
|
intervalHorizon: {
|
|
111
|
-
type: String
|
|
111
|
+
type: String,
|
|
112
|
+
default: "12px"
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
115
|
const dataEmits = [
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
require("./src/index.cjs");
|
|
5
|
+
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
6
|
+
const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
|
|
7
|
+
const Tablespd = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Tablespd");
|
|
8
|
+
exports.Tablespd = Tablespd;
|
|
9
|
+
exports.default = Tablespd;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--on: rgb(91, 189, 246);
|
|
3
|
+
--color-primary: #409eff;
|
|
4
|
+
--bag-primary: #409eff;
|
|
5
|
+
--bag-primary-text: #fff;
|
|
6
|
+
--border: #eee;
|
|
7
|
+
--layout-panel-gap: 10px;
|
|
8
|
+
--layout-panel-padding: 20px;
|
|
9
|
+
--layout-form-item-padding-right: var(
|
|
10
|
+
--layout-panel-gap
|
|
11
|
+
);
|
|
12
|
+
--g-main-bg: var(--bg-color-page);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tables {
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-height: var(--tables-min-height, 70px);
|
|
18
|
+
position: relative;
|
|
19
|
+
flex: 1;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
|
+
.tables-table.is-absolute {
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: 0;
|
|
26
|
+
}
|
|
27
|
+
.tables-table {
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
--el-table-header-bg-color: rgb(248, 248, 249);
|
|
30
|
+
}
|
|
31
|
+
.tables-table.el-table--default .el-table__cell {
|
|
32
|
+
padding: var(--tables-interval) 0;
|
|
33
|
+
}
|
|
34
|
+
.tables-table.el-table--default .cell {
|
|
35
|
+
padding: 0 var(--tables-interval-horizon, var(--tables-interval));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.paging {
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: 10px;
|
|
41
|
+
}
|
|
42
|
+
.paging-pagination {
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
.paging-slot {
|
|
46
|
+
padding-left: 10px;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
color: #9b9b9b;
|
|
50
|
+
white-space: pre-wrap;
|
|
51
|
+
}
|
|
52
|
+
.paging-slot > span {
|
|
53
|
+
margin-right: 10px;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
}
|
|
56
|
+
.paging .el-pagination__total {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
color: #9b9b9b;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.tablespd {
|
|
63
|
+
width: 100%;
|
|
64
|
+
flex: 1;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
}
|
|
68
|
+
.tablespd-main {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
flex: 1;
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.tablespd-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
.tablespd-main.is-scroll .v-scroll-add {
|
|
78
|
+
text-align: center;
|
|
79
|
+
padding: 10px;
|
|
80
|
+
color: #999;
|
|
81
|
+
background-color: #eee;
|
|
82
|
+
}
|
|
83
|
+
.tablespd-paginat {
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
.tablespd-paginat .el-pagination {
|
|
87
|
+
justify-content: flex-end;
|
|
88
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use '../scss/common.scss' as *;
|
|
2
|
+
@use '../tables/index.scss' as *;
|
|
3
|
+
@use '../paging/index.scss' as *;
|
|
4
|
+
$tablespd: 'tablespd';
|
|
5
|
+
@include b($tablespd) {
|
|
6
|
+
width: 100%;
|
|
7
|
+
flex: 1;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
|
|
11
|
+
&-main {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
flex: 1;
|
|
15
|
+
width: 100%;
|
|
16
|
+
&.#{is('radio')} {
|
|
17
|
+
.#{e()}table__header {
|
|
18
|
+
.#{e()}table-column--selection {
|
|
19
|
+
.#{e()}checkbox {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&.#{is('scroll')} {
|
|
26
|
+
.v-scroll-add {
|
|
27
|
+
text-align: center;
|
|
28
|
+
padding: 10px;
|
|
29
|
+
color: #999;
|
|
30
|
+
background-color: #eee;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&-paginat {
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
.#{e()}pagination {
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
+
const name = "tablespd";
|
|
5
|
+
const dataProps = buildProps.buildProps({});
|
|
6
|
+
const dataEmits = [];
|
|
7
|
+
const dataSlot = {};
|
|
8
|
+
const dataExpose = {};
|
|
9
|
+
exports.dataEmits = dataEmits;
|
|
10
|
+
exports.dataExpose = dataExpose;
|
|
11
|
+
exports.dataProps = dataProps;
|
|
12
|
+
exports.dataSlot = dataSlot;
|
|
13
|
+
exports.name = name;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @title {h2} TablesPagin 输入框
|
|
4
|
+
* @text 目前完全继承 element-plus 中 el-tables-pagin
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @title {h3} tablespd
|
|
8
|
+
*/
|
|
9
|
+
export declare const name = "tablespd";
|
|
10
|
+
export declare const dataProps: {};
|
|
11
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
12
|
+
export declare const dataEmits: never[];
|
|
13
|
+
export type DataEmits = typeof dataEmits;
|
|
14
|
+
export declare const dataSlot: {};
|
|
15
|
+
/**
|
|
16
|
+
* @expose refEl 获取当前组件在element-plus中暴露的方法
|
|
17
|
+
*/
|
|
18
|
+
export declare const dataExpose: {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
+
const name = "tablespd";
|
|
3
|
+
const dataProps = buildProps({});
|
|
4
|
+
const dataEmits = [];
|
|
5
|
+
const dataSlot = {};
|
|
6
|
+
const dataExpose = {};
|
|
7
|
+
export {
|
|
8
|
+
dataEmits,
|
|
9
|
+
dataExpose,
|
|
10
|
+
dataProps,
|
|
11
|
+
dataSlot,
|
|
12
|
+
name
|
|
13
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index$3 = require("../../tables/index.cjs");
|
|
5
|
+
const index$6 = require("../../paging/index.cjs");
|
|
6
|
+
const index$4 = require("../../../directives/scroll/index.cjs");
|
|
7
|
+
const index$5 = require("../../../directives/sortable/index.cjs");
|
|
8
|
+
const data = require("./data.cjs");
|
|
9
|
+
const pagin = require("../../tables/common/pagin.cjs");
|
|
10
|
+
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
11
|
+
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
12
|
+
const index = require("../../../hooks/locale/index.cjs");
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: index$2.getProps(pagin.dataProps),
|
|
16
|
+
emits: pagin.dataEmit,
|
|
17
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
|
+
const { getLocale } = index.useLocale();
|
|
19
|
+
const cs = index$1.useCssName(data.name);
|
|
20
|
+
const slots = vue.useSlots();
|
|
21
|
+
const prs = __props;
|
|
22
|
+
const props = index$2.usePropsDefault(data.name, prs, pagin.dataProps);
|
|
23
|
+
index$2.viewProps(props, data.name);
|
|
24
|
+
const emit = __emit;
|
|
25
|
+
const refTable = vue.ref();
|
|
26
|
+
const {
|
|
27
|
+
height,
|
|
28
|
+
getSelection,
|
|
29
|
+
initData,
|
|
30
|
+
getData,
|
|
31
|
+
empty,
|
|
32
|
+
loading,
|
|
33
|
+
tableList,
|
|
34
|
+
tableConfig,
|
|
35
|
+
scroll,
|
|
36
|
+
sortable,
|
|
37
|
+
onSortChange,
|
|
38
|
+
onListEvents,
|
|
39
|
+
onSelect,
|
|
40
|
+
onRowClick,
|
|
41
|
+
onChange,
|
|
42
|
+
pagconfig,
|
|
43
|
+
formEvent,
|
|
44
|
+
onSizeChange,
|
|
45
|
+
onCurrentChange,
|
|
46
|
+
paginat,
|
|
47
|
+
data: data$1
|
|
48
|
+
} = pagin.useInit(props, emit, refTable, getLocale, true);
|
|
49
|
+
__expose({
|
|
50
|
+
getSelection,
|
|
51
|
+
initData,
|
|
52
|
+
getData,
|
|
53
|
+
getList: initData,
|
|
54
|
+
empty
|
|
55
|
+
});
|
|
56
|
+
return (_ctx, _cache) => {
|
|
57
|
+
var _a, _b, _c, _d;
|
|
58
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
59
|
+
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
60
|
+
style: vue.normalizeStyle({
|
|
61
|
+
height: vue.unref(height) == "100%" ? vue.unref(height) : ""
|
|
62
|
+
})
|
|
63
|
+
}, [
|
|
64
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$3.Tables), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
|
|
65
|
+
height: vue.unref(height),
|
|
66
|
+
ref_key: "refTable",
|
|
67
|
+
ref: refTable,
|
|
68
|
+
class: [
|
|
69
|
+
vue.unref(cs).z("main"),
|
|
70
|
+
vue.unref(cs).is("radio", (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.isradio),
|
|
71
|
+
vue.unref(cs).is("scroll", vue.unref(paginat).is && vue.unref(paginat).scroll)
|
|
72
|
+
],
|
|
73
|
+
"scroll-selector": "." + vue.unref(cs).ec("scrollbar") + " ." + vue.unref(cs).ec("scrollbar", "", "wrap"),
|
|
74
|
+
"sortable-selector": "." + vue.unref(cs).ec("table", "", "body-wrapper") + " tbody",
|
|
75
|
+
value: vue.unref(data$1).list,
|
|
76
|
+
list: vue.unref(tableList),
|
|
77
|
+
size: (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
78
|
+
paginat: vue.unref(paginat),
|
|
79
|
+
loading: ((_c = vue.unref(tableConfig).config) == null ? void 0 : _c.noloading) || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
80
|
+
options: vue.unref(props).options,
|
|
81
|
+
compons: vue.unref(props).compons,
|
|
82
|
+
onSortChange: vue.unref(onSortChange),
|
|
83
|
+
onListEvents: vue.unref(onListEvents),
|
|
84
|
+
onSelect: vue.unref(onSelect),
|
|
85
|
+
onRowClick: vue.unref(onRowClick),
|
|
86
|
+
onSelectionChange: vue.unref(onChange)
|
|
87
|
+
}), vue.createSlots({ _: 2 }, [
|
|
88
|
+
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
89
|
+
return {
|
|
90
|
+
name: k,
|
|
91
|
+
fn: vue.withCtx((scope) => [
|
|
92
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
93
|
+
])
|
|
94
|
+
};
|
|
95
|
+
})
|
|
96
|
+
]), 1040, ["height", "class", "scroll-selector", "sortable-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
97
|
+
[vue.unref(index$4.default), vue.unref(scroll)],
|
|
98
|
+
[vue.unref(index$5.default), vue.unref(sortable)]
|
|
99
|
+
]),
|
|
100
|
+
((_d = vue.unref(paginat)) == null ? void 0 : _d.is) && !vue.unref(paginat).scroll ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
|
|
101
|
+
class: vue.unref(cs).z("paginat"),
|
|
102
|
+
paginat: vue.unref(paginat),
|
|
103
|
+
total: vue.unref(data$1).total,
|
|
104
|
+
onSizeChange: vue.unref(onSizeChange),
|
|
105
|
+
onCurrentChange: vue.unref(onCurrentChange)
|
|
106
|
+
}), null, 16, ["class", "paginat", "total", "onSizeChange", "onCurrentChange"])) : vue.createCommentVNode("", true)
|
|
107
|
+
], 6);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, withDirectives, createBlock, createCommentVNode, mergeProps, toHandlers, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { Tables } from "../../tables/index.js";
|
|
3
|
+
import { Paging } from "../../paging/index.js";
|
|
4
|
+
import vScroll from "../../../directives/scroll/index.js";
|
|
5
|
+
import vSortable from "../../../directives/sortable/index.js";
|
|
6
|
+
import { name } from "./data.js";
|
|
7
|
+
import { dataProps, useInit, dataEmit } from "../../tables/common/pagin.js";
|
|
8
|
+
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
9
|
+
import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
|
|
10
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: getProps(dataProps),
|
|
14
|
+
emits: dataEmit,
|
|
15
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
16
|
+
const { getLocale } = useLocale();
|
|
17
|
+
const cs = useCssName(name);
|
|
18
|
+
const slots = useSlots();
|
|
19
|
+
const prs = __props;
|
|
20
|
+
const props = usePropsDefault(name, prs, dataProps);
|
|
21
|
+
viewProps(props, name);
|
|
22
|
+
const emit = __emit;
|
|
23
|
+
const refTable = ref();
|
|
24
|
+
const {
|
|
25
|
+
height,
|
|
26
|
+
getSelection,
|
|
27
|
+
initData,
|
|
28
|
+
getData,
|
|
29
|
+
empty,
|
|
30
|
+
loading,
|
|
31
|
+
tableList,
|
|
32
|
+
tableConfig,
|
|
33
|
+
scroll,
|
|
34
|
+
sortable,
|
|
35
|
+
onSortChange,
|
|
36
|
+
onListEvents,
|
|
37
|
+
onSelect,
|
|
38
|
+
onRowClick,
|
|
39
|
+
onChange,
|
|
40
|
+
pagconfig,
|
|
41
|
+
formEvent,
|
|
42
|
+
onSizeChange,
|
|
43
|
+
onCurrentChange,
|
|
44
|
+
paginat,
|
|
45
|
+
data
|
|
46
|
+
} = useInit(props, emit, refTable, getLocale, true);
|
|
47
|
+
__expose({
|
|
48
|
+
getSelection,
|
|
49
|
+
initData,
|
|
50
|
+
getData,
|
|
51
|
+
getList: initData,
|
|
52
|
+
empty
|
|
53
|
+
});
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
var _a, _b, _c, _d;
|
|
56
|
+
return openBlock(), createElementBlock("div", {
|
|
57
|
+
class: normalizeClass(unref(cs).z()),
|
|
58
|
+
style: normalizeStyle({
|
|
59
|
+
height: unref(height) == "100%" ? unref(height) : ""
|
|
60
|
+
})
|
|
61
|
+
}, [
|
|
62
|
+
withDirectives((openBlock(), createBlock(unref(Tables), mergeProps(unref(tableConfig).config, toHandlers(unref(formEvent)), {
|
|
63
|
+
height: unref(height),
|
|
64
|
+
ref_key: "refTable",
|
|
65
|
+
ref: refTable,
|
|
66
|
+
class: [
|
|
67
|
+
unref(cs).z("main"),
|
|
68
|
+
unref(cs).is("radio", (_a = unref(tableConfig).config) == null ? void 0 : _a.isradio),
|
|
69
|
+
unref(cs).is("scroll", unref(paginat).is && unref(paginat).scroll)
|
|
70
|
+
],
|
|
71
|
+
"scroll-selector": "." + unref(cs).ec("scrollbar") + " ." + unref(cs).ec("scrollbar", "", "wrap"),
|
|
72
|
+
"sortable-selector": "." + unref(cs).ec("table", "", "body-wrapper") + " tbody",
|
|
73
|
+
value: unref(data).list,
|
|
74
|
+
list: unref(tableList),
|
|
75
|
+
size: (_b = unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
76
|
+
paginat: unref(paginat),
|
|
77
|
+
loading: ((_c = unref(tableConfig).config) == null ? void 0 : _c.noloading) || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
78
|
+
options: unref(props).options,
|
|
79
|
+
compons: unref(props).compons,
|
|
80
|
+
onSortChange: unref(onSortChange),
|
|
81
|
+
onListEvents: unref(onListEvents),
|
|
82
|
+
onSelect: unref(onSelect),
|
|
83
|
+
onRowClick: unref(onRowClick),
|
|
84
|
+
onSelectionChange: unref(onChange)
|
|
85
|
+
}), createSlots({ _: 2 }, [
|
|
86
|
+
renderList(Object.keys(unref(slots)), (k) => {
|
|
87
|
+
return {
|
|
88
|
+
name: k,
|
|
89
|
+
fn: withCtx((scope) => [
|
|
90
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
91
|
+
])
|
|
92
|
+
};
|
|
93
|
+
})
|
|
94
|
+
]), 1040, ["height", "class", "scroll-selector", "sortable-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
95
|
+
[unref(vScroll), unref(scroll)],
|
|
96
|
+
[unref(vSortable), unref(sortable)]
|
|
97
|
+
]),
|
|
98
|
+
((_d = unref(paginat)) == null ? void 0 : _d.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
|
|
99
|
+
class: unref(cs).z("paginat"),
|
|
100
|
+
paginat: unref(paginat),
|
|
101
|
+
total: unref(data).total,
|
|
102
|
+
onSizeChange: unref(onSizeChange),
|
|
103
|
+
onCurrentChange: unref(onCurrentChange)
|
|
104
|
+
}), null, 16, ["class", "paginat", "total", "onSizeChange", "onCurrentChange"])) : createCommentVNode("", true)
|
|
105
|
+
], 6);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
_sfc_main as default
|
|
111
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const use = require("../../common/use.cjs");
|
|
5
|
-
const
|
|
5
|
+
const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
|
|
6
6
|
const compons = require("../../common/compons.cjs");
|
|
7
7
|
const config = require("../../tables/common/config.cjs");
|
|
8
8
|
const util = require("../../tables/common/util.cjs");
|
|
@@ -11,7 +11,7 @@ const column = require("vxe-table/es/column");
|
|
|
11
11
|
const index = require("../../radio/index.cjs");
|
|
12
12
|
const index$1 = require("../../checkbox/index.cjs");
|
|
13
13
|
const lineToSmallHump = require("@fangzhongya/utils/name/lineToSmallHump");
|
|
14
|
-
function setBox(props, obj, emit, propss, slots, index$
|
|
14
|
+
function setBox(props, obj, emit, propss, slots, index$2) {
|
|
15
15
|
if (props.type == "radio") {
|
|
16
16
|
return vue.h(
|
|
17
17
|
column.VxeColumn,
|
|
@@ -117,8 +117,8 @@ function setProps(obj, props) {
|
|
|
117
117
|
const vxeconfig = props.vxeconfig;
|
|
118
118
|
const robj = {};
|
|
119
119
|
robj["header-align"] = table["align"];
|
|
120
|
-
robj["align"] =
|
|
121
|
-
const tooltip =
|
|
120
|
+
robj["align"] = getAttrValue.getAttrValue(obj, "headerAlign") || table["align"];
|
|
121
|
+
const tooltip = getAttrValue.getAttrValue(table, "showOverflowTooltip");
|
|
122
122
|
if (tooltip === "" || tooltip === true) {
|
|
123
123
|
robj["show-overflow"] = "tooltip";
|
|
124
124
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
2
|
import { useSetSlot, useSetCompon, useGetDomValue, useGetDomLabel } from "../../common/use.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
|
|
4
4
|
import { useGetCompons } from "../../common/compons.js";
|
|
5
5
|
import { provides } from "../../tables/common/config.js";
|
|
6
6
|
import { setMinWidth } from "../../tables/common/util.js";
|
|
@@ -115,8 +115,8 @@ function setProps(obj, props) {
|
|
|
115
115
|
const vxeconfig = props.vxeconfig;
|
|
116
116
|
const robj = {};
|
|
117
117
|
robj["header-align"] = table["align"];
|
|
118
|
-
robj["align"] =
|
|
119
|
-
const tooltip =
|
|
118
|
+
robj["align"] = getAttrValue(obj, "headerAlign") || table["align"];
|
|
119
|
+
const tooltip = getAttrValue(table, "showOverflowTooltip");
|
|
120
120
|
if (tooltip === "" || tooltip === true) {
|
|
121
121
|
robj["show-overflow"] = "tooltip";
|
|
122
122
|
}
|
package/dist/css/index.css
CHANGED
|
@@ -1109,6 +1109,17 @@
|
|
|
1109
1109
|
.list-div .list-table .list-table-th {
|
|
1110
1110
|
text-align: left;
|
|
1111
1111
|
}
|
|
1112
|
+
.list-div .list-table .list-table-value {
|
|
1113
|
+
word-break: break-all;
|
|
1114
|
+
white-space: normal;
|
|
1115
|
+
display: block;
|
|
1116
|
+
max-height: var(--list-row-max-height);
|
|
1117
|
+
display: -webkit-box;
|
|
1118
|
+
-webkit-line-clamp: var(--list-line-clamp); /* 显示的行数 */
|
|
1119
|
+
-webkit-box-orient: vertical;
|
|
1120
|
+
overflow: hidden;
|
|
1121
|
+
text-overflow: ellipsis;
|
|
1122
|
+
}
|
|
1112
1123
|
.list-div .list-table.right .list-table-th {
|
|
1113
1124
|
text-align: right;
|
|
1114
1125
|
}
|
|
@@ -1669,6 +1680,34 @@
|
|
|
1669
1680
|
justify-content: flex-end;
|
|
1670
1681
|
}
|
|
1671
1682
|
|
|
1683
|
+
.tablespd {
|
|
1684
|
+
width: 100%;
|
|
1685
|
+
flex: 1;
|
|
1686
|
+
display: flex;
|
|
1687
|
+
flex-direction: column;
|
|
1688
|
+
}
|
|
1689
|
+
.tablespd-main {
|
|
1690
|
+
display: flex;
|
|
1691
|
+
flex-direction: column;
|
|
1692
|
+
flex: 1;
|
|
1693
|
+
width: 100%;
|
|
1694
|
+
}
|
|
1695
|
+
.tablespd-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1696
|
+
display: none;
|
|
1697
|
+
}
|
|
1698
|
+
.tablespd-main.is-scroll .v-scroll-add {
|
|
1699
|
+
text-align: center;
|
|
1700
|
+
padding: 10px;
|
|
1701
|
+
color: #999;
|
|
1702
|
+
background-color: #eee;
|
|
1703
|
+
}
|
|
1704
|
+
.tablespd-paginat {
|
|
1705
|
+
overflow: hidden;
|
|
1706
|
+
}
|
|
1707
|
+
.tablespd-paginat .el-pagination {
|
|
1708
|
+
justify-content: flex-end;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1672
1711
|
.tabless {
|
|
1673
1712
|
width: 100%;
|
|
1674
1713
|
flex: 1;
|
|
@@ -1772,26 +1811,4 @@
|
|
|
1772
1811
|
left: 0;
|
|
1773
1812
|
z-index: 1;
|
|
1774
1813
|
opacity: 0;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
.tablesvp {
|
|
1778
|
-
width: 100%;
|
|
1779
|
-
height: var(--tablesvp-height);
|
|
1780
|
-
display: flex;
|
|
1781
|
-
flex-direction: column;
|
|
1782
|
-
}
|
|
1783
|
-
.tablesvp-main {
|
|
1784
|
-
display: flex;
|
|
1785
|
-
flex-direction: column;
|
|
1786
|
-
flex: 1;
|
|
1787
|
-
width: 100%;
|
|
1788
|
-
}
|
|
1789
|
-
.tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1790
|
-
display: none;
|
|
1791
|
-
}
|
|
1792
|
-
.tablesvp-paginat {
|
|
1793
|
-
overflow: hidden;
|
|
1794
|
-
}
|
|
1795
|
-
.tablesvp-paginat .el-pagination {
|
|
1796
|
-
justify-content: flex-end;
|
|
1797
1814
|
}
|