@fangzhongya/fang-ui 0.1.26 → 0.1.28
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/array/index.css +9 -0
- package/dist/components/array/src/index2.cjs +5 -6
- package/dist/components/array/src/index2.js +2 -3
- package/dist/components/audios/index.css +9 -0
- package/dist/components/box/index.css +9 -0
- package/dist/components/box-adjust/index.css +9 -0
- package/dist/components/box-fun/index.cjs +7 -0
- package/dist/components/box-fun/index.d.ts +7 -0
- package/dist/components/box-fun/index.js +7 -0
- package/dist/components/box-fun/src/data.cjs +34 -0
- package/dist/components/box-fun/src/data.d.ts +35 -0
- package/dist/components/box-fun/src/data.js +34 -0
- package/dist/components/box-fun/src/function.cjs +97 -0
- package/dist/components/box-fun/src/function.d.ts +8 -0
- package/dist/components/box-fun/src/function.js +97 -0
- package/dist/components/box-fun/src/index.cjs +5 -0
- package/dist/components/box-fun/src/index.d.ts +2 -0
- package/dist/components/box-fun/src/index.js +5 -0
- package/dist/components/box-local/index.css +9 -0
- package/dist/components/box-mask/index.css +9 -0
- package/dist/components/box-teleport/src/index2.cjs +2 -11
- package/dist/components/box-teleport/src/index2.js +2 -11
- package/dist/components/box-title/index.css +9 -0
- package/dist/components/buttons/index.css +9 -0
- package/dist/components/cascaders/index.css +9 -0
- package/dist/components/checks/index.css +9 -0
- package/dist/components/common/compons/components.cjs +52 -0
- package/dist/components/common/compons/components.d.ts +27 -0
- package/dist/components/common/compons/components.js +52 -0
- package/dist/components/common/compons/index.scss +23 -0
- package/dist/components/common/compons/index2.scss +23 -0
- package/dist/components/common/use.cjs +29 -3
- package/dist/components/common/use.d.ts +2 -2
- package/dist/components/common/use.js +29 -3
- package/dist/components/dates/index.css +9 -0
- package/dist/components/dates-divide/index.css +9 -0
- package/dist/components/dates-picker/index.css +9 -0
- package/dist/components/dates2/index.css +9 -0
- package/dist/components/dialogs/index.css +9 -0
- package/dist/components/draggable/index.cjs +9 -0
- package/dist/components/draggable/index.d.ts +4 -0
- package/dist/components/draggable/index.js +9 -0
- package/dist/components/draggable/index.scss +5 -0
- package/dist/components/draggable/src/data.cjs +37 -0
- package/dist/components/draggable/src/data.d.ts +60 -0
- package/dist/components/draggable/src/data.js +37 -0
- package/dist/components/draggable/src/index.cjs +4 -0
- package/dist/components/draggable/src/index.js +4 -0
- package/dist/components/draggable/src/index2.cjs +101 -0
- package/dist/components/draggable/src/index2.js +101 -0
- package/dist/components/edit/index.css +9 -0
- package/dist/components/edit-float/index.css +9 -0
- package/dist/components/forms/common/config.cjs +17 -0
- package/dist/components/forms/common/config.d.ts +5 -0
- package/dist/components/forms/common/config.js +17 -0
- package/dist/components/forms/index.css +15 -6
- package/dist/components/forms/index.scss +2 -1
- package/dist/components/forms/src/data.cjs +7 -5
- package/dist/components/forms/src/data.d.ts +7 -4
- package/dist/components/forms/src/data.js +8 -6
- package/dist/components/forms/src/setup.cjs +5 -13
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +5 -13
- package/dist/components/forms/style/index2.scss +3 -1
- package/dist/components/forms-div/index.css +9 -0
- package/dist/components/forms-div/src/index2.cjs +5 -5
- package/dist/components/forms-div/src/index2.js +3 -3
- package/dist/components/forms-drag/src/index2.cjs +12 -12
- package/dist/components/forms-drag/src/index2.js +1 -1
- package/dist/components/{forms-items → forms-item}/index.css +9 -0
- package/dist/components/forms-item/src/index2.cjs +2 -2
- package/dist/components/forms-item/src/index2.js +1 -1
- package/dist/components/forms-item/src/indexts.d.ts +1 -1
- package/dist/components/forms-item/src/label.cjs +17 -30
- package/dist/components/forms-item/src/label.js +17 -30
- package/dist/components/forms-items/src/index2.cjs +9 -9
- package/dist/components/forms-items/src/index2.js +1 -1
- package/dist/components/full-screen/index.css +9 -0
- package/dist/components/global-config/index.d.ts +1 -1
- package/dist/components/global-config/src/index.d.ts +1 -1
- package/dist/components/history/index.css +9 -0
- package/dist/components/icon/index.css +9 -0
- package/dist/components/icon-picker/index.css +9 -0
- package/dist/components/iframe/index.css +9 -0
- package/dist/components/images/index.css +9 -0
- package/dist/components/index.cjs +413 -407
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +6 -0
- package/dist/components/index.scss +4 -1
- package/dist/components/index2.scss +4 -1
- package/dist/components/input-array/index.css +9 -0
- package/dist/components/input-history/index.css +9 -0
- package/dist/components/input-num/index.css +9 -0
- package/dist/components/input-select/index.css +9 -0
- package/dist/components/inputs/index.css +9 -0
- package/dist/components/keep-com/index.css +9 -0
- package/dist/components/labels/index.css +9 -0
- package/dist/components/list/index.css +9 -0
- package/dist/components/list/src/data.cjs +6 -0
- package/dist/components/list/src/data.d.ts +6 -0
- package/dist/components/list/src/data.js +6 -0
- package/dist/components/list/src/index2.cjs +6 -6
- package/dist/components/list/src/index2.js +2 -2
- package/dist/components/lists/index.css +9 -0
- package/dist/components/lists/src/index2.cjs +9 -9
- package/dist/components/lists/src/index2.js +9 -9
- package/dist/components/listsp/index.css +9 -0
- package/dist/components/listspd/index.css +9 -0
- package/dist/components/loading/src/data.cjs +13 -0
- package/dist/components/loading/src/data.d.ts +17 -0
- package/dist/components/loading/src/data.js +13 -0
- package/dist/components/loading/src/index.cjs +1 -0
- package/dist/components/loading/src/index.d.ts +0 -4
- package/dist/components/loading/src/index.js +1 -0
- package/dist/components/menus/index.css +9 -0
- package/dist/components/message/src/data.cjs +13 -0
- package/dist/components/message/src/data.d.ts +17 -0
- package/dist/components/message/src/data.js +13 -0
- package/dist/components/message/src/index.cjs +1 -0
- package/dist/components/message/src/index.d.ts +0 -4
- package/dist/components/message/src/index.js +1 -0
- package/dist/components/message-box/src/data.cjs +13 -0
- package/dist/components/message-box/src/data.d.ts +17 -0
- package/dist/components/message-box/src/data.js +13 -0
- package/dist/components/message-box/src/index.cjs +1 -0
- package/dist/components/message-box/src/index.d.ts +0 -4
- package/dist/components/message-box/src/index.js +1 -0
- package/dist/components/no-data/index.css +9 -0
- package/dist/components/page/index.css +15 -6
- package/dist/components/page/src/set-column2.cjs +2 -2
- package/dist/components/page/src/set-column2.js +1 -1
- package/dist/components/paging/index.css +9 -0
- package/dist/components/popup/index.css +9 -0
- package/dist/components/retract/index.css +9 -0
- package/dist/components/right-key/index.css +9 -0
- package/dist/components/scss/common.scss +9 -0
- package/dist/components/seamless-scroll/index.css +9 -0
- package/dist/components/select-scroll/index.css +9 -0
- package/dist/components/selector/index.css +9 -0
- package/dist/components/selects/index.css +9 -0
- package/dist/components/sliders/index.css +9 -0
- package/dist/components/switchs/index.css +9 -0
- package/dist/components/tables/common/config.cjs +1 -1
- package/dist/components/tables/common/config.js +1 -1
- package/dist/components/tables/common/pagin.cjs +123 -52
- package/dist/components/tables/common/pagin.d.ts +40 -9
- package/dist/components/tables/common/pagin.js +123 -52
- package/dist/components/tables/index.css +9 -0
- package/dist/components/tables/src/column.cjs +23 -22
- package/dist/components/tables/src/column.d.ts +3 -0
- package/dist/components/tables/src/column.js +15 -14
- package/dist/components/tables/src/data.cjs +15 -0
- package/dist/components/tables/src/data.d.ts +14 -1
- package/dist/components/tables/src/data.js +15 -0
- package/dist/components/tables/src/index2.cjs +29 -10
- package/dist/components/tables/src/index2.js +23 -4
- package/dist/components/tablesp/index.css +9 -0
- package/dist/components/tablesp/src/index2.cjs +9 -5
- package/dist/components/tablesp/src/index2.js +9 -5
- package/dist/components/tablespd/index.css +9 -0
- package/dist/components/tabless/index.css +9 -0
- package/dist/components/tablesv/index.css +9 -0
- package/dist/components/tablesv/src/column.cjs +116 -112
- package/dist/components/tablesv/src/column.d.ts +3 -1
- package/dist/components/tablesv/src/column.js +110 -106
- package/dist/components/tablesv/src/data.cjs +44 -0
- package/dist/components/tablesv/src/data.d.ts +43 -1
- package/dist/components/tablesv/src/data.js +44 -0
- package/dist/components/tablesv/src/index2.cjs +37 -14
- package/dist/components/tablesv/src/index2.js +36 -13
- package/dist/components/tablesv/style/index2.scss +3 -1
- package/dist/components/tablesvp/index.css +15 -0
- package/dist/components/tablesvp/index.scss +8 -0
- package/dist/components/tablesvp/src/index2.cjs +15 -5
- package/dist/components/tablesvp/src/index2.js +15 -5
- package/dist/components/tablesvpd/index.cjs +9 -0
- package/dist/components/tablesvpd/index.css +157 -0
- package/dist/components/tablesvpd/index.d.ts +4 -0
- package/dist/components/tablesvpd/index.js +9 -0
- package/dist/components/tablesvpd/index.scss +41 -0
- package/dist/components/tablesvpd/src/data.cjs +13 -0
- package/dist/components/tablesvpd/src/data.d.ts +18 -0
- package/dist/components/tablesvpd/src/data.js +13 -0
- package/dist/components/tablesvpd/src/index.cjs +4 -0
- package/dist/components/tablesvpd/src/index.js +4 -0
- package/dist/components/tablesvpd/src/index2.cjs +107 -0
- package/dist/components/tablesvpd/src/index2.js +107 -0
- package/dist/components/tablesvpd/style/index2.scss +4 -0
- package/dist/components/uploads/index.css +9 -0
- package/dist/components/videos/index.css +9 -0
- package/dist/components/window/index.css +9 -0
- package/dist/css/array.css +9 -0
- package/dist/css/audios.css +9 -0
- package/dist/css/box-adjust.css +9 -0
- package/dist/css/box-local.css +9 -0
- package/dist/css/box-mask.css +9 -0
- package/dist/css/box-title.css +9 -0
- package/dist/css/box.css +9 -0
- package/dist/css/buttons.css +9 -0
- package/dist/css/cascaders.css +9 -0
- package/dist/css/checks.css +9 -0
- package/dist/css/dates-divide.css +9 -0
- package/dist/css/dates-picker.css +9 -0
- package/dist/css/dates.css +9 -0
- package/dist/css/dates2.css +9 -0
- package/dist/css/dialogs.css +9 -0
- package/dist/css/edit-float.css +9 -0
- package/dist/css/edit.css +9 -0
- package/dist/css/forms-div.css +9 -0
- package/dist/css/{forms-items.css → forms-item.css} +9 -0
- package/dist/css/forms.css +15 -6
- package/dist/css/full-screen.css +9 -0
- package/dist/css/history.css +9 -0
- package/dist/css/icon-picker.css +9 -0
- package/dist/css/icon.css +9 -0
- package/dist/css/iframe.css +9 -0
- package/dist/css/images.css +9 -0
- package/dist/css/index.css +71 -6
- package/dist/css/input-array.css +9 -0
- package/dist/css/input-history.css +9 -0
- package/dist/css/input-num.css +9 -0
- package/dist/css/input-select.css +9 -0
- package/dist/css/inputs.css +9 -0
- package/dist/css/keep-com.css +9 -0
- package/dist/css/labels.css +9 -0
- package/dist/css/list.css +9 -0
- package/dist/css/lists.css +9 -0
- package/dist/css/listsp.css +9 -0
- package/dist/css/listspd.css +9 -0
- package/dist/css/menus.css +9 -0
- package/dist/css/no-data.css +9 -0
- package/dist/css/page.css +15 -6
- package/dist/css/paging.css +9 -0
- package/dist/css/popup.css +9 -0
- package/dist/css/retract.css +9 -0
- package/dist/css/right-key.css +9 -0
- package/dist/css/seamless-scroll.css +9 -0
- package/dist/css/select-scroll.css +9 -0
- package/dist/css/selector.css +9 -0
- package/dist/css/selects.css +9 -0
- package/dist/css/sliders.css +9 -0
- package/dist/css/switchs.css +9 -0
- package/dist/css/tables.css +9 -0
- package/dist/css/tablesp.css +9 -0
- package/dist/css/tablespd.css +9 -0
- package/dist/css/tabless.css +9 -0
- package/dist/css/tablesv.css +9 -0
- package/dist/css/tablesvp.css +15 -0
- package/dist/css/tablesvpd.css +157 -0
- package/dist/css/uploads.css +9 -0
- package/dist/css/videos.css +9 -0
- package/dist/css/window.css +9 -0
- package/dist/expand/{chunk-2L4PC7LZ.cjs → chunk-3HP2ZDNG.cjs} +6 -1
- package/dist/expand/{chunk-RBGCE6BS.js → chunk-7C25SBCF.js} +6 -1
- 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/compons/index.cjs +44 -0
- package/dist/hooks/compons/index.d.ts +7 -0
- package/dist/hooks/compons/index.js +44 -0
- package/dist/hooks/props-default/index.cjs +0 -12
- package/dist/hooks/props-default/index.d.ts +1 -1
- package/dist/hooks/props-default/index.js +0 -12
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +437 -431
- package/dist/index.css +71 -6
- package/dist/index.js +6 -0
- package/dist/type.d.ts +10 -5
- package/dist/utils/vues/getBoxDom.cjs +22 -0
- package/dist/utils/vues/getBoxDom.d.ts +1 -0
- package/dist/utils/vues/getBoxDom.js +22 -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 +14 -15
- package/dist/components/common/compons.cjs +0 -76
- package/dist/components/common/compons.d.ts +0 -9
- package/dist/components/common/compons.js +0 -76
- package/dist/components/common/compons.scss +0 -26
- package/dist/components/common/compons2.scss +0 -26
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExtractPropTypes, Component } from 'vue';
|
|
2
2
|
export type DefaultSort = {
|
|
3
3
|
prop: string;
|
|
4
|
-
order:
|
|
4
|
+
order: string;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* @title FTable 表格
|
|
@@ -106,12 +106,19 @@ export declare const dataProps: {
|
|
|
106
106
|
};
|
|
107
107
|
default(): never[];
|
|
108
108
|
};
|
|
109
|
+
rowKey: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
};
|
|
109
112
|
/**
|
|
110
113
|
* 行高度
|
|
111
114
|
*/
|
|
112
115
|
lineHeight: {
|
|
113
116
|
type: (StringConstructor | NumberConstructor)[];
|
|
114
117
|
};
|
|
118
|
+
size: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default(): string;
|
|
121
|
+
};
|
|
115
122
|
/**
|
|
116
123
|
* @props { Object } options 选择数据集合
|
|
117
124
|
*/
|
|
@@ -119,6 +126,12 @@ export declare const dataProps: {
|
|
|
119
126
|
type: ObjectConstructor;
|
|
120
127
|
default(): {};
|
|
121
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
131
|
+
*/
|
|
132
|
+
isCompons: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
};
|
|
122
135
|
/**
|
|
123
136
|
* @props { Object } compons 外部组件集合
|
|
124
137
|
*/
|
|
@@ -71,12 +71,21 @@ const dataProps = {
|
|
|
71
71
|
return [];
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
+
rowKey: {
|
|
75
|
+
type: String
|
|
76
|
+
},
|
|
74
77
|
/**
|
|
75
78
|
* 行高度
|
|
76
79
|
*/
|
|
77
80
|
lineHeight: {
|
|
78
81
|
type: [String, Number]
|
|
79
82
|
},
|
|
83
|
+
size: {
|
|
84
|
+
type: String,
|
|
85
|
+
default() {
|
|
86
|
+
return "default";
|
|
87
|
+
}
|
|
88
|
+
},
|
|
80
89
|
/**
|
|
81
90
|
* @props { Object } options 选择数据集合
|
|
82
91
|
*/
|
|
@@ -86,6 +95,12 @@ const dataProps = {
|
|
|
86
95
|
return {};
|
|
87
96
|
}
|
|
88
97
|
},
|
|
98
|
+
/**
|
|
99
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
100
|
+
*/
|
|
101
|
+
isCompons: {
|
|
102
|
+
type: Boolean
|
|
103
|
+
},
|
|
89
104
|
/**
|
|
90
105
|
* @props { Object } compons 外部组件集合
|
|
91
106
|
*/
|
|
@@ -3,17 +3,17 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const data = require("./data.cjs");
|
|
5
5
|
const config = require("../common/config.cjs");
|
|
6
|
-
const index$
|
|
6
|
+
const index$4 = require("../../table/index.cjs");
|
|
7
7
|
require("../../loading/index.cjs");
|
|
8
|
-
const index$
|
|
8
|
+
const index$5 = require("../../no-data/index.cjs");
|
|
9
9
|
require("./columns.cjs");
|
|
10
10
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
11
11
|
const index$1 = require("../../../hooks/inherit/index.cjs");
|
|
12
12
|
const use = require("../../common/use.cjs");
|
|
13
|
-
const
|
|
13
|
+
const index$3 = require("../../../hooks/compons/index.cjs");
|
|
14
14
|
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
15
15
|
const columns_vue_vue_type_script_lang = require("./columns2.cjs");
|
|
16
|
-
const index$
|
|
16
|
+
const index$6 = require("element-plus/es/components/loading/index");
|
|
17
17
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: index$2.getProps(data.dataProps),
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
const prs = __props;
|
|
26
26
|
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
27
27
|
index$2.viewProps(props, data.name);
|
|
28
|
-
|
|
28
|
+
index$3.useCompons(config.provides.compons, props);
|
|
29
29
|
const tableRef = vue.ref();
|
|
30
30
|
const emit = __emit;
|
|
31
31
|
const rowObj = vue.ref();
|
|
@@ -49,11 +49,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
let isSort = false;
|
|
52
|
+
const orderMap = {
|
|
53
|
+
asc: "ascending",
|
|
54
|
+
ascending: "ascending",
|
|
55
|
+
desc: "descending",
|
|
56
|
+
descending: "descending"
|
|
57
|
+
};
|
|
52
58
|
const tableDefaultSort = vue.computed(() => {
|
|
53
59
|
var _a, _b;
|
|
54
60
|
return {
|
|
55
61
|
prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
|
|
56
|
-
order: (_b = props.defaultSort) == null ? void 0 : _b.order
|
|
62
|
+
order: orderMap[(_b = props.defaultSort) == null ? void 0 : _b.order]
|
|
57
63
|
};
|
|
58
64
|
});
|
|
59
65
|
const rowStyle = vue.computed(() => {
|
|
@@ -106,12 +112,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
106
112
|
rowObj.value = row;
|
|
107
113
|
emit("row-click", row, column, ...arr);
|
|
108
114
|
}
|
|
115
|
+
function clearSort() {
|
|
116
|
+
var _a;
|
|
117
|
+
(_a = tableRef.value) == null ? void 0 : _a.clearSort();
|
|
118
|
+
}
|
|
109
119
|
function toggleRowSelection(...arr) {
|
|
110
120
|
tableRef.value.toggleRowSelection(...arr);
|
|
111
121
|
}
|
|
112
122
|
function clearSelection() {
|
|
113
123
|
tableRef.value.clearSelection();
|
|
114
124
|
}
|
|
125
|
+
function setCurrentRow(row) {
|
|
126
|
+
tableRef.value.setCurrentRow(row);
|
|
127
|
+
}
|
|
128
|
+
function clearCurrentRow() {
|
|
129
|
+
tableRef.value.setCurrentRow();
|
|
130
|
+
}
|
|
115
131
|
function getSelections() {
|
|
116
132
|
var _a;
|
|
117
133
|
return (_a = tableRef.value) == null ? void 0 : _a.getSelectionRows();
|
|
@@ -125,8 +141,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
125
141
|
});
|
|
126
142
|
__expose({
|
|
127
143
|
...data.dataExpose,
|
|
128
|
-
|
|
144
|
+
clearSort,
|
|
145
|
+
setCurrentRow,
|
|
146
|
+
clearCurrentRow,
|
|
129
147
|
getSelections,
|
|
148
|
+
clearSelection,
|
|
130
149
|
toggleRowSelection
|
|
131
150
|
});
|
|
132
151
|
return (_ctx, _cache) => {
|
|
@@ -139,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
139
158
|
minHeight: _ctx.minHeight
|
|
140
159
|
})
|
|
141
160
|
}), [
|
|
142
|
-
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
161
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$4.Table), vue.mergeProps(vue.unref(attrs).assem, {
|
|
143
162
|
align: "left",
|
|
144
163
|
ref_key: "tableRef",
|
|
145
164
|
ref: tableRef,
|
|
@@ -155,7 +174,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
155
174
|
}), {
|
|
156
175
|
empty: vue.withCtx(() => [
|
|
157
176
|
vue.renderSlot(_ctx.$slots, "no-data", {}, () => [
|
|
158
|
-
vue.createVNode(vue.unref(index$
|
|
177
|
+
vue.createVNode(vue.unref(index$5.NoData))
|
|
159
178
|
])
|
|
160
179
|
]),
|
|
161
180
|
default: vue.withCtx(() => [
|
|
@@ -181,7 +200,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
181
200
|
]),
|
|
182
201
|
_: 3
|
|
183
202
|
}, 16, ["class", "height", "max-height", "row-style", "data", "default-sort"])), [
|
|
184
|
-
[vue.unref(index$
|
|
203
|
+
[vue.unref(index$6.vLoading), vue.unref(props).loading]
|
|
185
204
|
])
|
|
186
205
|
], 16);
|
|
187
206
|
};
|
|
@@ -8,7 +8,7 @@ import "./columns.js";
|
|
|
8
8
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
9
9
|
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
10
10
|
import { useObjComponSelected } from "../../common/use.js";
|
|
11
|
-
import { useCompons } from "
|
|
11
|
+
import { useCompons } from "../../../hooks/compons/index.js";
|
|
12
12
|
import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
|
|
13
13
|
import _sfc_main$1 from "./columns2.js";
|
|
14
14
|
import { vLoading } from "element-plus/es/components/loading/index";
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
const prs = __props;
|
|
24
24
|
const props = usePropsDefault(name, prs, dataProps);
|
|
25
25
|
viewProps(props, name);
|
|
26
|
-
useCompons(provides.compons, props
|
|
26
|
+
useCompons(provides.compons, props);
|
|
27
27
|
const tableRef = ref();
|
|
28
28
|
const emit = __emit;
|
|
29
29
|
const rowObj = ref();
|
|
@@ -47,11 +47,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
let isSort = false;
|
|
50
|
+
const orderMap = {
|
|
51
|
+
asc: "ascending",
|
|
52
|
+
ascending: "ascending",
|
|
53
|
+
desc: "descending",
|
|
54
|
+
descending: "descending"
|
|
55
|
+
};
|
|
50
56
|
const tableDefaultSort = computed(() => {
|
|
51
57
|
var _a, _b;
|
|
52
58
|
return {
|
|
53
59
|
prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
|
|
54
|
-
order: (_b = props.defaultSort) == null ? void 0 : _b.order
|
|
60
|
+
order: orderMap[(_b = props.defaultSort) == null ? void 0 : _b.order]
|
|
55
61
|
};
|
|
56
62
|
});
|
|
57
63
|
const rowStyle = computed(() => {
|
|
@@ -104,12 +110,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
110
|
rowObj.value = row;
|
|
105
111
|
emit("row-click", row, column, ...arr);
|
|
106
112
|
}
|
|
113
|
+
function clearSort() {
|
|
114
|
+
var _a;
|
|
115
|
+
(_a = tableRef.value) == null ? void 0 : _a.clearSort();
|
|
116
|
+
}
|
|
107
117
|
function toggleRowSelection(...arr) {
|
|
108
118
|
tableRef.value.toggleRowSelection(...arr);
|
|
109
119
|
}
|
|
110
120
|
function clearSelection() {
|
|
111
121
|
tableRef.value.clearSelection();
|
|
112
122
|
}
|
|
123
|
+
function setCurrentRow(row) {
|
|
124
|
+
tableRef.value.setCurrentRow(row);
|
|
125
|
+
}
|
|
126
|
+
function clearCurrentRow() {
|
|
127
|
+
tableRef.value.setCurrentRow();
|
|
128
|
+
}
|
|
113
129
|
function getSelections() {
|
|
114
130
|
var _a;
|
|
115
131
|
return (_a = tableRef.value) == null ? void 0 : _a.getSelectionRows();
|
|
@@ -123,8 +139,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
139
|
});
|
|
124
140
|
__expose({
|
|
125
141
|
...dataExpose,
|
|
126
|
-
|
|
142
|
+
clearSort,
|
|
143
|
+
setCurrentRow,
|
|
144
|
+
clearCurrentRow,
|
|
127
145
|
getSelections,
|
|
146
|
+
clearSelection,
|
|
128
147
|
toggleRowSelection
|
|
129
148
|
});
|
|
130
149
|
return (_ctx, _cache) => {
|
|
@@ -12,6 +12,15 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.com-footer {
|
|
16
|
+
border-top: 1px solid var(--border);
|
|
17
|
+
padding: 20px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.com-lable-array {
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
.tables {
|
|
16
25
|
width: 100%;
|
|
17
26
|
min-height: var(--tables-min-height, 70px);
|
|
@@ -52,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
52
|
empty
|
|
53
53
|
});
|
|
54
54
|
return (_ctx, _cache) => {
|
|
55
|
-
var _a, _b, _c, _d;
|
|
55
|
+
var _a, _b, _c, _d, _e;
|
|
56
56
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
57
57
|
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
58
58
|
style: vue.normalizeStyle({
|
|
@@ -72,8 +72,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
72
72
|
value: vue.unref(data$1).list,
|
|
73
73
|
list: vue.unref(tableList),
|
|
74
74
|
size: (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
75
|
+
defaultSort: ((_c = vue.unref(tableConfig).sort) == null ? void 0 : _c.is) ? {
|
|
76
|
+
order: vue.unref(paginat).order,
|
|
77
|
+
prop: vue.unref(paginat).prop
|
|
78
|
+
} : void 0,
|
|
75
79
|
paginat: vue.unref(paginat),
|
|
76
|
-
loading: ((
|
|
80
|
+
loading: ((_d = vue.unref(tableConfig).config) == null ? void 0 : _d.noloading) || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
77
81
|
options: vue.unref(props).options,
|
|
78
82
|
compons: vue.unref(props).compons,
|
|
79
83
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -86,14 +90,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
90
|
return {
|
|
87
91
|
name: k,
|
|
88
92
|
fn: vue.withCtx((scope) => [
|
|
89
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
93
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
90
94
|
])
|
|
91
95
|
};
|
|
92
96
|
})
|
|
93
|
-
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
97
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "defaultSort", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
94
98
|
[vue.unref(index$4.default), vue.unref(scroll)]
|
|
95
99
|
]),
|
|
96
|
-
((
|
|
100
|
+
((_e = vue.unref(paginat)) == null ? void 0 : _e.is) && !vue.unref(paginat).scroll ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
|
|
97
101
|
class: vue.unref(cs).z("paginat"),
|
|
98
102
|
paginat: vue.unref(paginat),
|
|
99
103
|
total: vue.unref(data$1).total,
|
|
@@ -50,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
empty
|
|
51
51
|
});
|
|
52
52
|
return (_ctx, _cache) => {
|
|
53
|
-
var _a, _b, _c, _d;
|
|
53
|
+
var _a, _b, _c, _d, _e;
|
|
54
54
|
return openBlock(), createElementBlock("div", {
|
|
55
55
|
class: normalizeClass(unref(cs).z()),
|
|
56
56
|
style: normalizeStyle({
|
|
@@ -70,8 +70,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
value: unref(data).list,
|
|
71
71
|
list: unref(tableList),
|
|
72
72
|
size: (_b = unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
73
|
+
defaultSort: ((_c = unref(tableConfig).sort) == null ? void 0 : _c.is) ? {
|
|
74
|
+
order: unref(paginat).order,
|
|
75
|
+
prop: unref(paginat).prop
|
|
76
|
+
} : void 0,
|
|
73
77
|
paginat: unref(paginat),
|
|
74
|
-
loading: ((
|
|
78
|
+
loading: ((_d = unref(tableConfig).config) == null ? void 0 : _d.noloading) || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
75
79
|
options: unref(props).options,
|
|
76
80
|
compons: unref(props).compons,
|
|
77
81
|
onSortChange: unref(onSortChange),
|
|
@@ -84,14 +88,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
88
|
return {
|
|
85
89
|
name: k,
|
|
86
90
|
fn: withCtx((scope) => [
|
|
87
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
91
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
88
92
|
])
|
|
89
93
|
};
|
|
90
94
|
})
|
|
91
|
-
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
95
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "defaultSort", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
92
96
|
[unref(vScroll), unref(scroll)]
|
|
93
97
|
]),
|
|
94
|
-
((
|
|
98
|
+
((_e = unref(paginat)) == null ? void 0 : _e.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
|
|
95
99
|
class: unref(cs).z("paginat"),
|
|
96
100
|
paginat: unref(paginat),
|
|
97
101
|
total: unref(data).total,
|
|
@@ -12,6 +12,15 @@
|
|
|
12
12
|
--g-main-bg: var(--bg-color-page);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.com-footer {
|
|
16
|
+
border-top: 1px solid var(--border);
|
|
17
|
+
padding: 20px 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.com-lable-array {
|
|
21
|
+
line-height: 18px;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
.tables {
|
|
16
25
|
width: 100%;
|
|
17
26
|
min-height: var(--tables-min-height, 70px);
|