hy-dispatch-ui-v3 0.2.42 → 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 CHANGED
@@ -556,8 +556,8 @@
556
556
  height: 54px;
557
557
  }
558
558
 
559
- .h-\[97vh\] {
560
- height: 97vh;
559
+ .h-\[96vh\] {
560
+ height: 96vh;
561
561
  }
562
562
 
563
563
  .h-full {
@@ -19,9 +19,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
19
19
  default: "default"
20
20
  // default-默认类型 right-右侧弹窗
21
21
  },
22
- dialogClass: {
22
+ // body-Content-Class
23
+ bodyContentClass: {
23
24
  type: String,
24
- default: "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-[97vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
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")
@@ -113,11 +113,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
113
113
  });
114
114
  };
115
115
  handler(data);
116
+ cascaderOptions.value = data;
117
+ cascaderValueMap.value = cascaderMap;
116
118
  if (modelValue.value) {
117
119
  setDefaultValue(modelValue.value);
118
120
  }
119
- cascaderOptions.value = data;
120
- cascaderValueMap.value = cascaderMap;
121
121
  }
122
122
  function setDefaultValue(val) {
123
123
  const item = cascaderValueMap.value.get(val);
@@ -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
- let inputWidth;
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 formModel = resetAppSearchValue(columns, model);
156
+ const filterModel = resetAppSearchValue(columns, model);
158
157
  return {
159
- formModel: toRef(formModel),
160
- formColumns: toRef(columns)
158
+ filterModel: toRef(filterModel),
159
+ filterColumns: toRef(columns)
161
160
  };
162
161
  };
163
162
 
@@ -174,7 +174,8 @@ const useAppTableWrapper = (hy) => {
174
174
  searchLabelSet.add(item.label);
175
175
  });
176
176
  }
177
- return Array.from(searchLabelSet.values());
177
+ const content = Array.from(searchLabelSet.values());
178
+ return content ? content.join("\u3001") : "";
178
179
  });
179
180
  function getRowKey(row = {}) {
180
181
  if (isString(props.rowKey)) return row[props.rowKey];
@@ -60,9 +60,14 @@ function useAppTableSearch(hy) {
60
60
  emits("reqSuccess", tableDataSource.value);
61
61
  }
62
62
  }
63
- async function resetFn() {
63
+ async function resetFields() {
64
64
  await nextTick();
65
- appSearchRef.value.resetFields();
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.formModel,
146
- filterColumns: appSearchForm.formColumns
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
- emits("change", item.value);
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)) {
@@ -0,0 +1,14 @@
1
+ export default {
2
+ id: 'hy-icon-ops-list-dell',
3
+ defs: `<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="hy-icon-ops-list-dell-linearGradient-1">
4
+ <stop stop-color="#87A4AF" offset="0%"></stop>
5
+ <stop stop-color="#51696F" offset="100%"></stop>
6
+ </linearGradient>`,
7
+ symbol: `<symbol id="hy-icon-ops-list-dell" viewBox="0 0 16 16">
8
+ <g id="hy-icon-ops-list-dell-角色管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <g id="hy-icon-ops-list-dell-角色管理-编辑角色" transform="translate(-1787, -888)" fill="url(#hy-icon-ops-list-dell-linearGradient-1)" fill-rule="nonzero">
10
+ <path d="M1800.65685,890.343148 C1797.53265,887.218951 1792.46734,887.218951 1789.34314,890.343148 C1786.21895,893.467328 1786.21895,898.532654 1789.34314,901.656852 C1792.46732,904.781049 1797.53265,904.781049 1800.65683,901.656852 C1803.78105,898.532654 1803.78105,893.467346 1800.65685,890.343148 Z M1797.35502,900.096411 L1794.99751,897.738909 L1792.64001,900.096411 L1790.90356,898.359984 L1793.26107,896.002483 L1790.90356,893.644981 L1792.64003,891.908537 L1794.99753,894.266038 L1797.35502,891.908537 L1799.09146,893.644981 L1796.73396,896.002465 L1799.09146,898.359966 L1797.35502,900.096411 Z" id="hy-icon-ops-list-dell-dell"></path>
11
+ </g>
12
+ </g>
13
+ </symbol>`,
14
+ };
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.2.41";
1
+ const version = "0.2.43";
2
2
 
3
3
  export { version };
@@ -23,9 +23,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
23
23
  default: "default"
24
24
  // default-默认类型 right-右侧弹窗
25
25
  },
26
- dialogClass: {
26
+ // body-Content-Class
27
+ bodyContentClass: {
27
28
  type: String,
28
- default: "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-[97vh] flex flex-col !my-4 !mr-4 !ml-auto" : null,
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")
@@ -117,11 +117,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
117
117
  });
118
118
  };
119
119
  handler(data);
120
+ cascaderOptions.value = data;
121
+ cascaderValueMap.value = cascaderMap;
120
122
  if (modelValue.value) {
121
123
  setDefaultValue(modelValue.value);
122
124
  }
123
- cascaderOptions.value = data;
124
- cascaderValueMap.value = cascaderMap;
125
125
  }
126
126
  function setDefaultValue(val) {
127
127
  const item = cascaderValueMap.value.get(val);
@@ -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
- let inputWidth;
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 formModel = resetAppSearchValue(columns, model);
158
+ const filterModel = resetAppSearchValue(columns, model);
160
159
  return {
161
- formModel: vue.toRef(formModel),
162
- formColumns: vue.toRef(columns)
160
+ filterModel: vue.toRef(filterModel),
161
+ filterColumns: vue.toRef(columns)
163
162
  };
164
163
  };
165
164
 
@@ -176,7 +176,8 @@ const useAppTableWrapper = (hy) => {
176
176
  searchLabelSet.add(item.label);
177
177
  });
178
178
  }
179
- return Array.from(searchLabelSet.values());
179
+ const content = Array.from(searchLabelSet.values());
180
+ return content ? content.join("\u3001") : "";
180
181
  });
181
182
  function getRowKey(row = {}) {
182
183
  if (is.isString(props.rowKey)) return row[props.rowKey];
@@ -62,9 +62,14 @@ function useAppTableSearch(hy) {
62
62
  emits("reqSuccess", tableDataSource.value);
63
63
  }
64
64
  }
65
- async function resetFn() {
65
+ async function resetFields() {
66
66
  await vue.nextTick();
67
- appSearchRef.value.resetFields();
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.formModel,
148
- filterColumns: appSearchForm.formColumns
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
- emits("change", item.value);
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)) {
@@ -0,0 +1,14 @@
1
+ export default {
2
+ id: 'hy-icon-ops-list-dell',
3
+ defs: `<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="hy-icon-ops-list-dell-linearGradient-1">
4
+ <stop stop-color="#87A4AF" offset="0%"></stop>
5
+ <stop stop-color="#51696F" offset="100%"></stop>
6
+ </linearGradient>`,
7
+ symbol: `<symbol id="hy-icon-ops-list-dell" viewBox="0 0 16 16">
8
+ <g id="hy-icon-ops-list-dell-角色管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <g id="hy-icon-ops-list-dell-角色管理-编辑角色" transform="translate(-1787, -888)" fill="url(#hy-icon-ops-list-dell-linearGradient-1)" fill-rule="nonzero">
10
+ <path d="M1800.65685,890.343148 C1797.53265,887.218951 1792.46734,887.218951 1789.34314,890.343148 C1786.21895,893.467328 1786.21895,898.532654 1789.34314,901.656852 C1792.46732,904.781049 1797.53265,904.781049 1800.65683,901.656852 C1803.78105,898.532654 1803.78105,893.467346 1800.65685,890.343148 Z M1797.35502,900.096411 L1794.99751,897.738909 L1792.64001,900.096411 L1790.90356,898.359984 L1793.26107,896.002483 L1790.90356,893.644981 L1792.64003,891.908537 L1794.99753,894.266038 L1797.35502,891.908537 L1799.09146,893.644981 L1796.73396,896.002465 L1799.09146,898.359966 L1797.35502,900.096411 Z" id="hy-icon-ops-list-dell-dell"></path>
11
+ </g>
12
+ </g>
13
+ </symbol>`,
14
+ };
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.2.41";
3
+ const version = "0.2.43";
4
4
 
5
5
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-dispatch-ui-v3",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {