@fmdevui/fm-dev 1.0.76 → 1.0.77
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/es/component.mjs +7 -2
- package/es/core/ui/components/index.d.ts +807 -2
- package/es/core/ui/components/querycondition/index.vue.d.ts +88 -0
- package/es/core/ui/components/querycondition/moreChoose.vue.d.ts +30 -0
- package/es/core/ui/components/querycondition/renderComp.vue.d.ts +9 -0
- package/es/core/ui/components/querycondition/style/css.d.ts +1 -0
- package/es/core/ui/components/querycondition/style/index.d.ts +1 -0
- package/es/core/ui/components/querycondition/type.d.ts +21 -0
- package/es/core/ui/components/querycondition/useComputed.d.ts +28 -0
- package/es/core/ui/components/selecttable/ClickOutside.d.ts +3 -0
- package/es/core/ui/components/selecttable/index.vue.d.ts +190 -0
- package/es/core/ui/components/selecttable/renderCol.vue.d.ts +21 -0
- package/es/core/ui/components/selecttable/style/css.d.ts +1 -0
- package/es/core/ui/components/selecttable/style/index.d.ts +1 -0
- package/es/core/ui/components/selecttable/type.d.ts +56 -0
- package/es/core/ui/components/selecttable/useVirtualized.d.ts +11 -0
- package/es/index.mjs +1 -1
- package/es/{version.css → make-installer.css} +1 -2
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/ui/components/index.mjs +18 -1
- package/es/packages/core/ui/components/querycondition/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/index.vue2.mjs +521 -0
- package/es/packages/core/ui/components/querycondition/moreChoose.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/moreChoose.vue2.mjs +237 -0
- package/es/packages/core/ui/components/querycondition/renderComp.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/renderComp.vue2.mjs +23 -0
- package/es/packages/core/ui/components/querycondition/style/css.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/style/index.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/type.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/useComputed.mjs +104 -0
- package/es/packages/core/ui/components/selecttable/ClickOutside.mjs +69 -0
- package/es/packages/core/ui/components/selecttable/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/selecttable/index.vue2.mjs +816 -0
- package/es/packages/core/ui/components/selecttable/renderCol.vue.mjs +5 -0
- package/es/packages/core/ui/components/selecttable/renderCol.vue2.mjs +28 -0
- package/es/packages/core/ui/components/selecttable/style/css.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/style/index.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/type.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/useVirtualized.mjs +67 -0
- package/index.js +1897 -52
- package/index.min.js +30 -29
- package/index.min.mjs +27 -26
- package/index.mjs +1894 -54
- package/lib/component.js +6 -1
- package/lib/core/ui/components/index.d.ts +807 -2
- package/lib/core/ui/components/querycondition/index.vue.d.ts +88 -0
- package/lib/core/ui/components/querycondition/moreChoose.vue.d.ts +30 -0
- package/lib/core/ui/components/querycondition/renderComp.vue.d.ts +9 -0
- package/lib/core/ui/components/querycondition/style/css.d.ts +1 -0
- package/lib/core/ui/components/querycondition/style/index.d.ts +1 -0
- package/lib/core/ui/components/querycondition/type.d.ts +21 -0
- package/lib/core/ui/components/querycondition/useComputed.d.ts +28 -0
- package/lib/core/ui/components/selecttable/ClickOutside.d.ts +3 -0
- package/lib/core/ui/components/selecttable/index.vue.d.ts +190 -0
- package/lib/core/ui/components/selecttable/renderCol.vue.d.ts +21 -0
- package/lib/core/ui/components/selecttable/style/css.d.ts +1 -0
- package/lib/core/ui/components/selecttable/style/index.d.ts +1 -0
- package/lib/core/ui/components/selecttable/type.d.ts +56 -0
- package/lib/core/ui/components/selecttable/useVirtualized.d.ts +11 -0
- package/lib/index.js +5 -0
- package/lib/packages/core/index.js +5 -0
- package/lib/packages/core/ui/components/index.js +22 -0
- package/lib/packages/core/ui/components/querycondition/index.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/index.vue2.js +525 -0
- package/lib/packages/core/ui/components/querycondition/moreChoose.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/moreChoose.vue2.js +241 -0
- package/lib/packages/core/ui/components/querycondition/renderComp.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/renderComp.vue2.js +27 -0
- package/lib/packages/core/ui/components/querycondition/style/css.js +4 -0
- package/lib/packages/core/ui/components/querycondition/style/index.js +4 -0
- package/lib/packages/core/ui/components/querycondition/type.js +2 -0
- package/lib/packages/core/ui/components/querycondition/useComputed.js +106 -0
- package/lib/packages/core/ui/components/selecttable/ClickOutside.js +73 -0
- package/lib/packages/core/ui/components/selecttable/index.vue.js +9 -0
- package/lib/packages/core/ui/components/selecttable/index.vue2.js +820 -0
- package/lib/packages/core/ui/components/selecttable/renderCol.vue.js +9 -0
- package/lib/packages/core/ui/components/selecttable/renderCol.vue2.js +32 -0
- package/lib/packages/core/ui/components/selecttable/style/css.js +4 -0
- package/lib/packages/core/ui/components/selecttable/style/index.js +4 -0
- package/lib/packages/core/ui/components/selecttable/type.js +2 -0
- package/lib/packages/core/ui/components/selecttable/useVirtualized.js +69 -0
- package/package.json +1 -1
- package/theme-chalk/src/query-condition.scss +118 -0
- package/theme-chalk/src/select-table.scss +71 -0
- package/theme-chalk/t-query-condition.css +1 -0
- package/theme-chalk/t-select-table.css +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
|
+
...{
|
|
9
|
+
name: "RenderCol"
|
|
10
|
+
},
|
|
11
|
+
__name: "renderCol",
|
|
12
|
+
props: {
|
|
13
|
+
row: Object,
|
|
14
|
+
render: Function,
|
|
15
|
+
index: Number,
|
|
16
|
+
column: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const renderComponent = () => {
|
|
24
|
+
return props.render(props?.row[props?.column?.prop], props.row, props.index);
|
|
25
|
+
};
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderComponent));
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
function useVirtualized() {
|
|
6
|
+
const actualHeightContainerEl = vue.ref(null);
|
|
7
|
+
const translateContainerEl = vue.ref(null);
|
|
8
|
+
const scrollContainerEl = vue.ref(null);
|
|
9
|
+
const isMultiple = vue.ref(false);
|
|
10
|
+
const saveDATA = vue.ref([]);
|
|
11
|
+
const RenderedItemsCache = {};
|
|
12
|
+
const getDom = (props) => {
|
|
13
|
+
const getElements = (className) => {
|
|
14
|
+
actualHeightContainerEl.value = document.querySelector(`${className} .el-scrollbar__view`);
|
|
15
|
+
translateContainerEl.value = document.querySelector(`${className} .el-table__body`);
|
|
16
|
+
scrollContainerEl.value = document.querySelector(`${className} .el-scrollbar__wrap`);
|
|
17
|
+
};
|
|
18
|
+
isMultiple.value = props.multiple;
|
|
19
|
+
if (props.multiple) {
|
|
20
|
+
getElements(".fm_select_table_multiple");
|
|
21
|
+
} else {
|
|
22
|
+
getElements(".fm_select_table_radio");
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const getItemHeightFromCache = (index) => {
|
|
26
|
+
const val = RenderedItemsCache[index];
|
|
27
|
+
return val === void 0 ? 50 : val;
|
|
28
|
+
};
|
|
29
|
+
const updateActualHeight = () => {
|
|
30
|
+
let actualHeight = 0;
|
|
31
|
+
saveDATA.value.forEach((_, i) => {
|
|
32
|
+
actualHeight += getItemHeightFromCache(i);
|
|
33
|
+
});
|
|
34
|
+
actualHeightContainerEl.value.style.height = actualHeight + "px";
|
|
35
|
+
};
|
|
36
|
+
const updateOffset = (offset) => {
|
|
37
|
+
if (translateContainerEl.value && translateContainerEl.value.style) {
|
|
38
|
+
translateContainerEl.value.style.transform = `translateY(${offset}px)`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const updateRenderedItemCache = (index) => {
|
|
42
|
+
const shouldUpdate = Object.keys(RenderedItemsCache).length < saveDATA.value.length;
|
|
43
|
+
if (!shouldUpdate) return;
|
|
44
|
+
vue.nextTick(() => {
|
|
45
|
+
const Items = Array.from(
|
|
46
|
+
document.querySelectorAll(
|
|
47
|
+
`${isMultiple.value ? `.fm_select_table_multiple` : `.fm_select_table_radio`} .el-table__row`
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
Items.forEach((el) => {
|
|
51
|
+
if (!RenderedItemsCache[index]) {
|
|
52
|
+
RenderedItemsCache[index] = el.offsetHeight;
|
|
53
|
+
}
|
|
54
|
+
index++;
|
|
55
|
+
});
|
|
56
|
+
updateActualHeight();
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
scrollContainerEl,
|
|
61
|
+
updateRenderedItemCache,
|
|
62
|
+
updateOffset,
|
|
63
|
+
getDom,
|
|
64
|
+
getItemHeightFromCache,
|
|
65
|
+
saveDATA
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.useVirtualized = useVirtualized;
|
package/package.json
CHANGED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.fm-query-condition.el-form {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: 2px 8px;
|
|
5
|
+
margin-bottom: -7px;
|
|
6
|
+
text-align: left;
|
|
7
|
+
|
|
8
|
+
.el-select,
|
|
9
|
+
.el-date-editor,
|
|
10
|
+
.ant-calendar-picker {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.flex_end {
|
|
15
|
+
grid-area: submit_btn;
|
|
16
|
+
margin-top: 2px;
|
|
17
|
+
|
|
18
|
+
.el-form-item__content {
|
|
19
|
+
display: flex;
|
|
20
|
+
// justify-content: flex-end;
|
|
21
|
+
align-items: center;
|
|
22
|
+
overflow: visible !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.btn {
|
|
27
|
+
.el-form-item__content {
|
|
28
|
+
display: flex;
|
|
29
|
+
// justify-content: flex-end;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.more_dropdown_icon {
|
|
33
|
+
margin-left: 10px;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btn_flex_end {
|
|
39
|
+
.el-form-item__content {
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.el-form-item {
|
|
45
|
+
display: flex;
|
|
46
|
+
margin-bottom: 6px;
|
|
47
|
+
|
|
48
|
+
.el-form-item__label {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
min-width: 60px;
|
|
51
|
+
padding-left: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.el-form-item__content {
|
|
55
|
+
flex-grow: 1;
|
|
56
|
+
// overflow: hidden;
|
|
57
|
+
margin-left: 0 !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.render_label {
|
|
62
|
+
.el-form-item__label {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: flex-end;
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
margin-top: 1px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.btn_check {
|
|
75
|
+
position: relative;
|
|
76
|
+
top: -1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.btn_reset {
|
|
80
|
+
position: relative;
|
|
81
|
+
top: -1px;
|
|
82
|
+
margin-left: 8px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fm_query_condition_more.el-popover {
|
|
87
|
+
padding: 15px;
|
|
88
|
+
|
|
89
|
+
.inside_box {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
|
|
93
|
+
.inside_box_title {
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.inside_box_main {
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-template-columns: repeat(2, minmax(100px, 50%));
|
|
102
|
+
|
|
103
|
+
.el-checkbox {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
|
|
107
|
+
.el-checkbox__label {
|
|
108
|
+
-webkit-box-sizing: border-box;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
word-break: break-all;
|
|
113
|
+
min-width: 90px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.fm-select-table {
|
|
2
|
+
// 单选样式
|
|
3
|
+
.radioStyle {
|
|
4
|
+
.el-radio {
|
|
5
|
+
.el-radio__label {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
&:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
|
|
9
|
+
box-shadow: none;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.el-table__row {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
// 键盘事件开启选择高亮
|
|
17
|
+
.keyUpStyle {
|
|
18
|
+
.el-table__body {
|
|
19
|
+
tbody {
|
|
20
|
+
.current-row {
|
|
21
|
+
color: var(--el-color-primary) !important;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// 键盘事件开启选中行样式
|
|
28
|
+
.selected_row_style {
|
|
29
|
+
color: var(--el-color-primary);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
// 选中行样式
|
|
33
|
+
.highlightCurrentRow {
|
|
34
|
+
.current-row {
|
|
35
|
+
color: var(--el-color-primary);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.fm-table-select__table {
|
|
40
|
+
padding: 10px;
|
|
41
|
+
|
|
42
|
+
.el-table__body,
|
|
43
|
+
.el-table__header {
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
// 条件查询组件样式
|
|
47
|
+
.table_query_condition {
|
|
48
|
+
width: 100%;
|
|
49
|
+
overflow-x: auto;
|
|
50
|
+
overflow-y: hidden;
|
|
51
|
+
padding: 10px;
|
|
52
|
+
}
|
|
53
|
+
.header_wrap {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.fm-table-select__page {
|
|
61
|
+
padding-top: 5px;
|
|
62
|
+
padding-right: 10px;
|
|
63
|
+
.el-pagination {
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: flex-end;
|
|
66
|
+
align-items: center;
|
|
67
|
+
margin-right: calc(2% - 20px);
|
|
68
|
+
background-color: var(--el-table-tr-bg-color);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-query-condition.el-form{display:grid;gap:2px 8px;margin-bottom:-7px;position:relative;text-align:left}.fm-query-condition.el-form .ant-calendar-picker,.fm-query-condition.el-form .el-date-editor,.fm-query-condition.el-form .el-select{width:100%}.fm-query-condition.el-form .flex_end{grid-area:submit_btn;margin-top:2px}.fm-query-condition.el-form .flex_end .el-form-item__content{align-items:center;display:flex;overflow:visible!important}.fm-query-condition.el-form .btn .el-form-item__content{display:flex}.fm-query-condition.el-form .btn .more_dropdown_icon{cursor:pointer;margin-left:10px}.fm-query-condition.el-form .btn_flex_end .el-form-item__content{justify-content:flex-end}.fm-query-condition.el-form .el-form-item{display:flex;margin-bottom:6px}.fm-query-condition.el-form .el-form-item .el-form-item__label{flex-shrink:0;min-width:60px;padding-left:8px}.fm-query-condition.el-form .el-form-item .el-form-item__content{flex-grow:1;margin-left:0!important}.fm-query-condition.el-form .render_label .el-form-item__label{align-items:center;cursor:pointer;display:flex;justify-content:flex-end}.fm-query-condition.el-form .render_label .el-form-item__label:before{margin-top:1px}.fm-query-condition.el-form .btn_check{position:relative;top:-1px}.fm-query-condition.el-form .btn_reset{margin-left:8px;position:relative;top:-1px}.fm_query_condition_more.el-popover{padding:15px}.fm_query_condition_more.el-popover .inside_box{display:flex;flex-direction:column}.fm_query_condition_more.el-popover .inside_box .inside_box_title{align-items:center;display:flex;justify-content:space-between}.fm_query_condition_more.el-popover .inside_box .inside_box_main{display:grid;grid-template-columns:repeat(2,minmax(100px,50%))}.fm_query_condition_more.el-popover .inside_box .inside_box_main .el-checkbox{align-items:center;display:flex}.fm_query_condition_more.el-popover .inside_box .inside_box_main .el-checkbox .el-checkbox__label{box-sizing:border-box;min-width:90px;overflow:hidden;text-overflow:ellipsis;word-break:break-all}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-select-table .radioStyle .el-radio .el-radio__label{display:none}.fm-select-table .radioStyle .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:none}.fm-select-table .radioStyle .el-table__row{cursor:pointer}.fm-select-table .keyUpStyle .el-table__body tbody .current-row{color:var(--el-color-primary)!important;cursor:pointer}.fm-select-table .highlightCurrentRow .current-row,.fm-select-table .selected_row_style{color:var(--el-color-primary);cursor:pointer}.fm-select-table .fm-table-select__table{padding:10px}.fm-select-table .fm-table-select__table .el-table__body,.fm-select-table .fm-table-select__table .el-table__header{margin:0}.fm-select-table .fm-table-select__table .table_query_condition{overflow-x:auto;overflow-y:hidden;padding:10px;width:100%}.fm-select-table .fm-table-select__table .header_wrap{align-items:center;display:flex;justify-content:flex-end}.fm-select-table .fm-table-select__page{padding-right:10px;padding-top:5px}.fm-select-table .fm-table-select__page .el-pagination{align-items:center;background-color:var(--el-table-tr-bg-color);display:flex;justify-content:flex-end;margin-right:calc(2% - 20px)}
|