@juzhenfe/page-model 3.12.2 → 3.12.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.
- package/dist/index.es.js +22 -6
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4166,7 +4166,7 @@ const _sfc_main$w = defineComponent({
|
|
|
4166
4166
|
searchFormRef,
|
|
4167
4167
|
totalShowFormEls.value
|
|
4168
4168
|
);
|
|
4169
|
-
computed(() => {
|
|
4169
|
+
const needExpand = computed(() => {
|
|
4170
4170
|
return showFormELsCount.value < totalShowFormEls.value.length;
|
|
4171
4171
|
});
|
|
4172
4172
|
const showFormEls = computed(() => {
|
|
@@ -4301,7 +4301,8 @@ const _sfc_main$w = defineComponent({
|
|
|
4301
4301
|
createElementVNode("div", {
|
|
4302
4302
|
class: normalizeClass(unref(createBEMName)("expand-button"))
|
|
4303
4303
|
}, [
|
|
4304
|
-
|
|
4304
|
+
searchFormManager.expandMode === "expanded" && needExpand.value ? (openBlock(), createElementBlock("div", {
|
|
4305
|
+
key: 0,
|
|
4305
4306
|
class: normalizeClass([
|
|
4306
4307
|
"expand-button__collapse-bar",
|
|
4307
4308
|
{ collapsed: !searchFormManager.isExpanded }
|
|
@@ -4314,9 +4315,9 @@ const _sfc_main$w = defineComponent({
|
|
|
4314
4315
|
]),
|
|
4315
4316
|
_: 1
|
|
4316
4317
|
})
|
|
4317
|
-
], 2),
|
|
4318
|
+
], 2)) : createCommentVNode("", true),
|
|
4318
4319
|
searchFormManager.expandMode === "dialog" && showFormEls.value.length && unref(showMoreButton) ? (openBlock(), createBlock(_component_el_button, {
|
|
4319
|
-
key:
|
|
4320
|
+
key: 1,
|
|
4320
4321
|
link: "",
|
|
4321
4322
|
size: searchFormManager.size,
|
|
4322
4323
|
onClick: handleShowExpandDialog
|
|
@@ -7869,8 +7870,9 @@ const _sfc_main$l = {
|
|
|
7869
7870
|
}
|
|
7870
7871
|
};
|
|
7871
7872
|
const useColumnDrag = () => {
|
|
7873
|
+
let sortable;
|
|
7872
7874
|
const initTableDrag = (opt) => {
|
|
7873
|
-
new Sortable(opt.element, {
|
|
7875
|
+
sortable = new Sortable(opt.element, {
|
|
7874
7876
|
group: "name",
|
|
7875
7877
|
sort: true,
|
|
7876
7878
|
delay: 0,
|
|
@@ -7910,6 +7912,8 @@ const useColumnDrag = () => {
|
|
|
7910
7912
|
return {
|
|
7911
7913
|
initTableDrag,
|
|
7912
7914
|
destroyTableDrag() {
|
|
7915
|
+
sortable && sortable.destroy();
|
|
7916
|
+
sortable = null;
|
|
7913
7917
|
}
|
|
7914
7918
|
};
|
|
7915
7919
|
};
|
|
@@ -8077,6 +8081,17 @@ const _sfc_main$k = defineComponent({
|
|
|
8077
8081
|
doTableLayout();
|
|
8078
8082
|
}, 2e3);
|
|
8079
8083
|
});
|
|
8084
|
+
const handleTableHeaderDragEnd = (newWidth, oldWidth, column, event) => {
|
|
8085
|
+
const newList = jsonClone(renderedTableEls.value);
|
|
8086
|
+
console.log("newList", column);
|
|
8087
|
+
const _column = newList.find(
|
|
8088
|
+
(item) => item.label === column.label && item.prop === column.property
|
|
8089
|
+
);
|
|
8090
|
+
if (_column) {
|
|
8091
|
+
_column.width = newWidth;
|
|
8092
|
+
onSaveColumns(newList);
|
|
8093
|
+
}
|
|
8094
|
+
};
|
|
8080
8095
|
onUnmounted(() => {
|
|
8081
8096
|
tableManager.onUnmounted();
|
|
8082
8097
|
scrollLifecycle.onUnmounted();
|
|
@@ -8114,6 +8129,7 @@ const _sfc_main$k = defineComponent({
|
|
|
8114
8129
|
data: usedTableData.value,
|
|
8115
8130
|
size: tableManager.size
|
|
8116
8131
|
}, tableManager.tableProps, toHandlers(tableManager.tableEvents), {
|
|
8132
|
+
onHeaderDragend: handleTableHeaderDragEnd,
|
|
8117
8133
|
height: "100%",
|
|
8118
8134
|
"max-height": "100%",
|
|
8119
8135
|
"table-layout": "auto"
|
|
@@ -12178,7 +12194,7 @@ const defineEditableTable = function(config) {
|
|
|
12178
12194
|
};
|
|
12179
12195
|
var iconfont = "";
|
|
12180
12196
|
const name = "@juzhenfe/page-model";
|
|
12181
|
-
const version = "3.12.
|
|
12197
|
+
const version = "3.12.4";
|
|
12182
12198
|
const types = "dist/main.d.ts";
|
|
12183
12199
|
const main = "dist/index.umd.js";
|
|
12184
12200
|
const keywords = [
|