hy-dispatch-ui-v3 0.2.43 → 0.2.44
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/tailwind.css +2 -2
- package/es/components/hyDialog/dialog.vue.mjs +8 -6
- package/es/components/hySearch/js/useAppSearch.mjs +5 -6
- package/es/components/hyTable/js/search.mjs +8 -2
- package/es/components/hyTable/js/useAppTable.mjs +2 -2
- package/es/components/hyTable/table.vue.mjs +2 -0
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +3 -1
- package/es/components/hyTableForm/tableForm.vue.mjs +3 -0
- package/es/version.mjs +1 -1
- package/lib/components/hyDialog/dialog.vue.js +8 -6
- package/lib/components/hySearch/js/useAppSearch.js +5 -6
- package/lib/components/hyTable/js/search.js +8 -2
- package/lib/components/hyTable/js/useAppTable.js +2 -2
- package/lib/components/hyTable/table.vue.js +2 -0
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +3 -1
- package/lib/components/hyTableForm/tableForm.vue.js +3 -0
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/dist/tailwind.css
CHANGED
|
@@ -19,9 +19,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
19
19
|
default: "default"
|
|
20
20
|
// default-默认类型 right-右侧弹窗
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
// body-Content-Class
|
|
23
|
+
bodyContentClass: {
|
|
23
24
|
type: String,
|
|
24
|
-
default: "
|
|
25
|
+
default: ""
|
|
25
26
|
},
|
|
26
27
|
top: String,
|
|
27
28
|
// 是否可缩小化
|
|
@@ -77,6 +78,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
77
78
|
const dialogTypeRight = computed(() => {
|
|
78
79
|
return props.dialogType === "right";
|
|
79
80
|
});
|
|
81
|
+
const bodyContentClass = computed(() => {
|
|
82
|
+
return `${props.bodyContentClass || null} ${dialogTypeRight.value ? "flex-grow h-0" : ""}`;
|
|
83
|
+
});
|
|
80
84
|
const ifDraggable = computed(() => {
|
|
81
85
|
if (props.ifShrink) {
|
|
82
86
|
return true;
|
|
@@ -197,7 +201,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
197
201
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
198
202
|
width: props.width,
|
|
199
203
|
top: dialogTypeRight.value ? "16px" : props.top || null,
|
|
200
|
-
class: dialogTypeRight.value ? "h-[
|
|
204
|
+
class: dialogTypeRight.value ? "h-[96vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
|
|
201
205
|
"body-class": dialogTypeRight.value ? "flex-grow h-0" : null
|
|
202
206
|
}, _ctx.$attrs), {
|
|
203
207
|
header: withCtx(() => [
|
|
@@ -241,9 +245,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
241
245
|
createElementVNode(
|
|
242
246
|
"div",
|
|
243
247
|
{
|
|
244
|
-
class: normalizeClass([
|
|
245
|
-
"flex-grow h-0": dialogTypeRight.value
|
|
246
|
-
}, "scroll-body overflow-auto px-6 py-4"])
|
|
248
|
+
class: normalizeClass([bodyContentClass.value, "scroll-body overflow-auto px-6 py-4"])
|
|
247
249
|
},
|
|
248
250
|
[
|
|
249
251
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -33,9 +33,8 @@ const genPlaceholderHandler = (config) => {
|
|
|
33
33
|
return { placeholder, startPlaceholder, endPlaceholder };
|
|
34
34
|
};
|
|
35
35
|
const genColumnWidth = (config) => {
|
|
36
|
-
let { width, type, attrs } = config || {};
|
|
37
|
-
|
|
38
|
-
if (!width) {
|
|
36
|
+
let { width, inputWidth, type, attrs } = config || {};
|
|
37
|
+
if (!width && !inputWidth) {
|
|
39
38
|
if (type === "date-picker") {
|
|
40
39
|
switch (attrs?.type) {
|
|
41
40
|
case "datetimerange":
|
|
@@ -154,10 +153,10 @@ const useAppSearch = (config = [], model) => {
|
|
|
154
153
|
const target = appSearchItemHandler(item);
|
|
155
154
|
columns.push(target);
|
|
156
155
|
}
|
|
157
|
-
const
|
|
156
|
+
const filterModel = resetAppSearchValue(columns, model);
|
|
158
157
|
return {
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
filterModel: toRef(filterModel),
|
|
159
|
+
filterColumns: toRef(columns)
|
|
161
160
|
};
|
|
162
161
|
};
|
|
163
162
|
|
|
@@ -60,9 +60,14 @@ function useAppTableSearch(hy) {
|
|
|
60
60
|
emits("reqSuccess", tableDataSource.value);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
async function
|
|
63
|
+
async function resetFields() {
|
|
64
64
|
await nextTick();
|
|
65
|
-
appSearchRef.value
|
|
65
|
+
if (appSearchRef.value) {
|
|
66
|
+
appSearchRef.value.resetFields();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function resetFn() {
|
|
70
|
+
await resetFields();
|
|
66
71
|
props.filterModel.query = null;
|
|
67
72
|
getData(1);
|
|
68
73
|
}
|
|
@@ -104,6 +109,7 @@ function useAppTableSearch(hy) {
|
|
|
104
109
|
showFilter,
|
|
105
110
|
getData,
|
|
106
111
|
setData,
|
|
112
|
+
resetFields,
|
|
107
113
|
resetFn,
|
|
108
114
|
switchShowFilter,
|
|
109
115
|
getTotalElements,
|
|
@@ -142,8 +142,8 @@ const useAppTable = (config = {}) => {
|
|
|
142
142
|
});
|
|
143
143
|
return {
|
|
144
144
|
tableColumns: toRef(tableColumns),
|
|
145
|
-
filterModel: appSearchForm.
|
|
146
|
-
filterColumns: appSearchForm.
|
|
145
|
+
filterModel: appSearchForm.filterModel,
|
|
146
|
+
filterColumns: appSearchForm.filterColumns
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
149
|
|
|
@@ -231,6 +231,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
231
231
|
showFilter,
|
|
232
232
|
getData,
|
|
233
233
|
setData,
|
|
234
|
+
resetFields,
|
|
234
235
|
resetFn,
|
|
235
236
|
switchShowFilter,
|
|
236
237
|
getTotalElements,
|
|
@@ -256,6 +257,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
256
257
|
__expose({
|
|
257
258
|
getData,
|
|
258
259
|
setData,
|
|
260
|
+
resetFields,
|
|
259
261
|
resetFn,
|
|
260
262
|
getSelectedList,
|
|
261
263
|
getTotalElements,
|
|
@@ -75,7 +75,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
75
75
|
return props.label;
|
|
76
76
|
});
|
|
77
77
|
function buttonChange(item) {
|
|
78
|
-
|
|
78
|
+
if (item) {
|
|
79
|
+
emits("change", item.value);
|
|
80
|
+
}
|
|
79
81
|
}
|
|
80
82
|
function getDataList(dataList2 = []) {
|
|
81
83
|
const arr = [];
|
|
@@ -224,6 +224,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
224
224
|
});
|
|
225
225
|
initValidateHandler(dataSource.value);
|
|
226
226
|
setData(dataSource.value);
|
|
227
|
+
emits("validate", {
|
|
228
|
+
...statistics.value
|
|
229
|
+
});
|
|
227
230
|
},
|
|
228
231
|
deleteData(data) {
|
|
229
232
|
if (!isArray(data)) {
|
package/es/version.mjs
CHANGED
|
@@ -23,9 +23,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
23
23
|
default: "default"
|
|
24
24
|
// default-默认类型 right-右侧弹窗
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
// body-Content-Class
|
|
27
|
+
bodyContentClass: {
|
|
27
28
|
type: String,
|
|
28
|
-
default: "
|
|
29
|
+
default: ""
|
|
29
30
|
},
|
|
30
31
|
top: String,
|
|
31
32
|
// 是否可缩小化
|
|
@@ -81,6 +82,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
81
82
|
const dialogTypeRight = vue.computed(() => {
|
|
82
83
|
return props.dialogType === "right";
|
|
83
84
|
});
|
|
85
|
+
const bodyContentClass = vue.computed(() => {
|
|
86
|
+
return `${props.bodyContentClass || null} ${dialogTypeRight.value ? "flex-grow h-0" : ""}`;
|
|
87
|
+
});
|
|
84
88
|
const ifDraggable = vue.computed(() => {
|
|
85
89
|
if (props.ifShrink) {
|
|
86
90
|
return true;
|
|
@@ -201,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
201
205
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
202
206
|
width: props.width,
|
|
203
207
|
top: dialogTypeRight.value ? "16px" : props.top || null,
|
|
204
|
-
class: dialogTypeRight.value ? "h-[
|
|
208
|
+
class: dialogTypeRight.value ? "h-[96vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
|
|
205
209
|
"body-class": dialogTypeRight.value ? "flex-grow h-0" : null
|
|
206
210
|
}, _ctx.$attrs), {
|
|
207
211
|
header: vue.withCtx(() => [
|
|
@@ -245,9 +249,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
245
249
|
vue.createElementVNode(
|
|
246
250
|
"div",
|
|
247
251
|
{
|
|
248
|
-
class: vue.normalizeClass([
|
|
249
|
-
"flex-grow h-0": dialogTypeRight.value
|
|
250
|
-
}, "scroll-body overflow-auto px-6 py-4"])
|
|
252
|
+
class: vue.normalizeClass([bodyContentClass.value, "scroll-body overflow-auto px-6 py-4"])
|
|
251
253
|
},
|
|
252
254
|
[
|
|
253
255
|
vue.renderSlot(_ctx.$slots, "default")
|
|
@@ -35,9 +35,8 @@ const genPlaceholderHandler = (config) => {
|
|
|
35
35
|
return { placeholder, startPlaceholder, endPlaceholder };
|
|
36
36
|
};
|
|
37
37
|
const genColumnWidth = (config) => {
|
|
38
|
-
let { width, type, attrs } = config || {};
|
|
39
|
-
|
|
40
|
-
if (!width) {
|
|
38
|
+
let { width, inputWidth, type, attrs } = config || {};
|
|
39
|
+
if (!width && !inputWidth) {
|
|
41
40
|
if (type === "date-picker") {
|
|
42
41
|
switch (attrs?.type) {
|
|
43
42
|
case "datetimerange":
|
|
@@ -156,10 +155,10 @@ const useAppSearch = (config = [], model) => {
|
|
|
156
155
|
const target = appSearchItemHandler(item);
|
|
157
156
|
columns.push(target);
|
|
158
157
|
}
|
|
159
|
-
const
|
|
158
|
+
const filterModel = resetAppSearchValue(columns, model);
|
|
160
159
|
return {
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
filterModel: vue.toRef(filterModel),
|
|
161
|
+
filterColumns: vue.toRef(columns)
|
|
163
162
|
};
|
|
164
163
|
};
|
|
165
164
|
|
|
@@ -62,9 +62,14 @@ function useAppTableSearch(hy) {
|
|
|
62
62
|
emits("reqSuccess", tableDataSource.value);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
async function
|
|
65
|
+
async function resetFields() {
|
|
66
66
|
await vue.nextTick();
|
|
67
|
-
appSearchRef.value
|
|
67
|
+
if (appSearchRef.value) {
|
|
68
|
+
appSearchRef.value.resetFields();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function resetFn() {
|
|
72
|
+
await resetFields();
|
|
68
73
|
props.filterModel.query = null;
|
|
69
74
|
getData(1);
|
|
70
75
|
}
|
|
@@ -106,6 +111,7 @@ function useAppTableSearch(hy) {
|
|
|
106
111
|
showFilter,
|
|
107
112
|
getData,
|
|
108
113
|
setData,
|
|
114
|
+
resetFields,
|
|
109
115
|
resetFn,
|
|
110
116
|
switchShowFilter,
|
|
111
117
|
getTotalElements,
|
|
@@ -144,8 +144,8 @@ const useAppTable = (config = {}) => {
|
|
|
144
144
|
});
|
|
145
145
|
return {
|
|
146
146
|
tableColumns: vue.toRef(tableColumns),
|
|
147
|
-
filterModel: appSearchForm.
|
|
148
|
-
filterColumns: appSearchForm.
|
|
147
|
+
filterModel: appSearchForm.filterModel,
|
|
148
|
+
filterColumns: appSearchForm.filterColumns
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
|
|
@@ -235,6 +235,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
235
235
|
showFilter,
|
|
236
236
|
getData,
|
|
237
237
|
setData,
|
|
238
|
+
resetFields,
|
|
238
239
|
resetFn,
|
|
239
240
|
switchShowFilter,
|
|
240
241
|
getTotalElements,
|
|
@@ -260,6 +261,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
260
261
|
__expose({
|
|
261
262
|
getData,
|
|
262
263
|
setData,
|
|
264
|
+
resetFields,
|
|
263
265
|
resetFn,
|
|
264
266
|
getSelectedList,
|
|
265
267
|
getTotalElements,
|
|
@@ -79,7 +79,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
79
79
|
return props.label;
|
|
80
80
|
});
|
|
81
81
|
function buttonChange(item) {
|
|
82
|
-
|
|
82
|
+
if (item) {
|
|
83
|
+
emits("change", item.value);
|
|
84
|
+
}
|
|
83
85
|
}
|
|
84
86
|
function getDataList(dataList2 = []) {
|
|
85
87
|
const arr = [];
|
|
@@ -228,6 +228,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
228
228
|
});
|
|
229
229
|
initValidateHandler(dataSource.value);
|
|
230
230
|
setData(dataSource.value);
|
|
231
|
+
emits("validate", {
|
|
232
|
+
...statistics.value
|
|
233
|
+
});
|
|
231
234
|
},
|
|
232
235
|
deleteData(data) {
|
|
233
236
|
if (!is.isArray(data)) {
|
package/lib/version.js
CHANGED