@web-utils/component 4.0.4 → 4.0.5
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/package.json +1 -1
- package/table-view/index.mjs +11 -11
- package/web-types.json +1 -1
package/package.json
CHANGED
package/table-view/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isFunction as
|
|
1
|
+
import { isFunction as g, toStringArray as v, isString as i, isArray as d, trace as u, warning as b, hasOwn as p } from "@web-utils/core";
|
|
2
2
|
import { merge as a } from "@web-utils/integrations/lodash";
|
|
3
|
-
import { e as
|
|
4
|
-
import
|
|
3
|
+
import { e as _ } from "../chunks/index.d3MV3Wq2.mjs";
|
|
4
|
+
import y from "../form-item-config-provider/index.mjs";
|
|
5
5
|
import { g as f } from "../chunks/configComponents.BDhlZU8F.mjs";
|
|
6
6
|
import { b as n } from "../chunks/core.DJEgjQW6.mjs";
|
|
7
|
-
import
|
|
7
|
+
import m from "element-ui/lib/transitions/collapse-transition";
|
|
8
8
|
import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
9
|
const T = [
|
|
10
10
|
"back",
|
|
@@ -46,7 +46,7 @@ const T = [
|
|
|
46
46
|
b.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
components: { FormItemConfigProvider:
|
|
49
|
+
components: { FormItemConfigProvider: y, ElCollapseTransition: m || m.default },
|
|
50
50
|
props: {
|
|
51
51
|
viewId: [String, Array],
|
|
52
52
|
searchPanelAttrs: {
|
|
@@ -119,7 +119,7 @@ const T = [
|
|
|
119
119
|
var s, l;
|
|
120
120
|
const t = {}, e = a({}, this.toolbarAttrs, t);
|
|
121
121
|
let r = (e == null ? void 0 : e.buttons) || this.$parent.buttons;
|
|
122
|
-
return r = r || [], e.buttons = r, e.buttons = f.privilege.processButtons(e.buttons), e.buttons =
|
|
122
|
+
return r = r || [], e.buttons = r, e.buttons = f.privilege.processButtons(e.buttons), e.buttons = v(e.buttons), e.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), e;
|
|
123
123
|
},
|
|
124
124
|
treeProps() {
|
|
125
125
|
const t = {
|
|
@@ -194,7 +194,7 @@ const T = [
|
|
|
194
194
|
this.$emit("reset"), this.$refs.form.resetFields(), await this.reloadTable();
|
|
195
195
|
},
|
|
196
196
|
openFrom(t) {
|
|
197
|
-
this.$router.push(
|
|
197
|
+
this.$router.push(_(this.formPath, t));
|
|
198
198
|
},
|
|
199
199
|
rowDbClick(t) {
|
|
200
200
|
var e;
|
|
@@ -210,7 +210,7 @@ const T = [
|
|
|
210
210
|
async del() {
|
|
211
211
|
var e;
|
|
212
212
|
const t = this.deleteApi || this.$parent.del;
|
|
213
|
-
if (!((e = this.toolbarListeners) != null && e.del) &&
|
|
213
|
+
if (!((e = this.toolbarListeners) != null && e.del) && g(t)) {
|
|
214
214
|
if (!this.selectedRows.length) {
|
|
215
215
|
this.$message.warning(this.selectTips || "请选择要删除的记录!");
|
|
216
216
|
return;
|
|
@@ -230,7 +230,7 @@ const T = [
|
|
|
230
230
|
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...";
|
|
231
231
|
const h = await t.call(
|
|
232
232
|
this,
|
|
233
|
-
this.selectedRows.map((
|
|
233
|
+
this.selectedRows.map((w) => w[this.rowKey])
|
|
234
234
|
);
|
|
235
235
|
this.$message.success(h.data.msg || "删除成功"), this.reloadTableAndTree(), (c = (o = f.tableView) == null ? void 0 : o.reload) == null || c.call(o);
|
|
236
236
|
} catch {
|
|
@@ -321,7 +321,7 @@ var C = function() {
|
|
|
321
321
|
null,
|
|
322
322
|
null
|
|
323
323
|
);
|
|
324
|
-
const
|
|
324
|
+
const V = k.exports;
|
|
325
325
|
export {
|
|
326
|
-
|
|
326
|
+
V as default
|
|
327
327
|
};
|