@ditari/bsui 1.0.23 → 1.0.25
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/cjs/components/select/Select.vue.cjs.js +1 -1
- package/dist/cjs/components/table/Table.cjs.js +1 -1
- package/dist/esm/components/select/Select.vue.esm.js +24 -19
- package/dist/esm/components/table/Table.esm.js +66 -60
- package/package.json +1 -1
- package/src/components/select/Select.vue +8 -0
- package/src/components/table/Table.tsx +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../store/modules/DataDictionary.cjs.js"),b=require("./dic.worker.cjs.js"),D={name:"DSelect"},y=e.defineComponent({...D,props:{value:{default:null},name:{default:""},disabled:{type:Boolean,default:!1},placeholder:{default:"请填写默认占位符啊!老铁"},include:{default:[]}},emits:["update:value","change"],setup(u,{emit:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../store/modules/DataDictionary.cjs.js"),b=require("./dic.worker.cjs.js"),D={name:"DSelect"},y=e.defineComponent({...D,props:{value:{default:null},name:{default:""},disabled:{type:Boolean,default:!1},placeholder:{default:"请填写默认占位符啊!老铁"},include:{default:[]}},emits:["update:value","change"],setup(u,{emit:c}){const n=u,{getDicByKey:v,list:h}=_.useDataDicStore(),{modelValue:r,data:p,onSearch:S,onSelect:g,onChange:m}=C();function C(){let s=!0,t=[];const o=e.ref(t),l=e.ref(n.value),d=new b.default;d.onerror=()=>{s=!1,t=v(n.name)},d.onmessage=a=>{o.value=[...a.data]},e.watch(()=>n.include,()=>{i(l.value)}),e.watch(()=>n.value,a=>{l.value=a}),i(l.value);const w=a=>{s?i(a):o.value=t.filter(f=>f.value.toLowerCase().indexOf(a.toLowerCase())!==-1||f.label.toLowerCase().includes(a.toLowerCase())).splice(0,10)};function i(a){d.postMessage({list:JSON.stringify(h[n.name]),keywords:a,include:JSON.stringify(n.include??[])})}return{data:o,modelValue:l,onSearch:w,onSelect:a=>{c("update:value",a)},onChange:()=>{c("update:value",l.value),c("change",l.value)}}}return(s,t)=>{const o=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(o,{value:e.unref(r),"onUpdate:value":t[0]||(t[0]=l=>e.isRef(r)?r.value=l:null),"allow-clear":"","show-search":"","filter-option":!1,options:e.unref(p),placeholder:u.placeholder,disabled:u.disabled,onSelect:e.unref(g),onSearch:e.unref(S),onChange:e.unref(m)},null,8,["value","options","placeholder","disabled","onSelect","onSearch","onChange"])}}});exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),w=require("ant-design-vue"),P=require("../../utils/html.cjs.js"),A=require("../theme/index.cjs.js"),J=()=>({data:{type:Object,required:!0},height:{type:Number,default:300},keys:Array,rowKey:{type:String,default:"id"},loading:{type:Boolean,default:!1},pagination:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})}}),y={defaultPageSize:20,hideOnSinglePage:!1,pageSizeOptions:["10","20","30","40"],responsive:!0,showQuickJumper:!0,showLessItems:!0,showTotal:a=>`总共 ${a} 条`},T=`${A.prefixName}-pagination`,M=n.defineComponent({name:"DTable",props:J(),emits:["update:keys"],setup:function(a,{emit:b,slots:S}){const t=n.ref(a.keys||[]),R=n.computed(()=>a.data),z=n.computed(()=>{var e;return((e=a.config)==null?void 0:e.columns)??[]}),f=n.computed(()=>{var e;return((e=a.config)==null?void 0:e.pagination)??{}}),{tableRef:x,tableRootRef:E,tableHeight:O,onPageChange:H,onRowClassName:q}=B();function B(){const{rowClassName:e,keepSelected:o,selection:h,onPageChange:c}=a.config,r=n.ref(),l=n.ref(null),u=n.ref(),i=n.ref(null),g=v=>{var d,k;try{const m=(d=l==null?void 0:l.value)==null?void 0:d.$el,_=P.useEleHeight(m.getElementsByClassName("ant-table-header")[0]);let N=0;if(a.config.pagination){const $=(k=r.value)==null?void 0:k.getElementsByClassName(T)[0];N=P.useEleHeight($)??0}u.value=v-(_+N),m.getElementsByClassName("ant-table-body")[0].style.height=u.value-10+"px",i.value=m.getElementsByClassName("ant-table-body")[0]}catch(m){console.warn(m)}};return n.watchEffect(()=>{a.height!==0&&n.nextTick(()=>{g(a.height)})}),{tableRef:l,tableRootRef:r,tableHeight:u,onPageChange:(v,d)=>{c&&c({page:v,size:d}),i.value.scrollTop=0,(h==="S"||!o)&&(t.value=[],b("update:keys",t.value))},onRowClassName:(v,d)=>e?e(v,d):void 0}}const D=V();function V(){const{rowKey:e,config:{selection:o,getCheckboxProps:h}}=a;if(o==="N")return;const c=(l,u)=>{o==="S"?(t.value=[],t.value=u?[l[e]]:[]):t.value=u?t.value.concat(l[e]):t.value.filter(i=>i!==l[e]),b("update:keys",t.value)},r=(l,u,i)=>{const g=i.map(s=>s[e]);t.value=l?t.value.concat(g):t.value.filter(s=>!g.includes(s)),b("update:keys",t.value)};return n.watch(()=>a.keys,l=>{t.value=l}),{selectedRowKeys:t,onSelect:c,onSelectAll:r,fixed:!0,columnTitle:o==="S"?"选择":null,columnWidth:o==="S"?60:40,getCheckboxProps:h}}const j=K();function K(){return e=>{let o;const{rowKey:h,config:{click:c,dbClick:r,selection:l,getCheckboxProps:u}}=a,i=e[h],g=()=>{if(l==="N")return;t.value.some(p=>p===i)?t.value=t.value.filter(p=>p!==i):(l==="S"&&(t.value=[]),t.value.push(i)),b("update:keys",t.value)};return{onClick:()=>{const s=u?u(e):null;s&&s.value===i||(clearTimeout(o),o=setTimeout(()=>{g(),c&&c(e)},200))},onDblclick:()=>{clearTimeout(o),r&&r(e)}}}}const C=e=>{e.stopPropagation()};return()=>{var e;return n.createVNode("div",{ref:E},[n.createVNode(w.Table,{ref:x,"row-key":a.rowKey,bordered:a.config.bordered,columns:z.value,dataSource:R.value,loading:a.loading,size:((e=a.config)==null?void 0:e.size)??"small",scroll:{scrollToFirstRowOnChange:!0,x:"100%",y:O.value+"px"},pagination:!1,customRow:j,rowSelection:D,rowClassName:q},{bodyCell:({column:o})=>{if(o.slot==="action")return n.createVNode("div",{onClick:C,onDblclick:C},[n.createVNode(w.Space,null,{default:()=>[S.action&&S.action()]})])}}),n.withDirectives(n.createVNode(w.Pagination,{class:[T],current:f.value.current,"onUpdate:current":o=>f.value.current=o,pageSize:f.value.pageSize,"onUpdate:pageSize":o=>f.value.pageSize=o,disabled:a.loading,"show-size-changer":!0,size:"default","hide-on-single-page":y.hideOnSinglePage,"show-quick-jumper":y.showQuickJumper,"default-page-size":y.defaultPageSize,"page-size-options":y.pageSizeOptions,"show-total":y.showTotal,total:f.value.total,onChange:H},null),[[n.vShow,a.config.pagination]])])}}});exports.default=M;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, ref as p, watch as h, resolveComponent as k, openBlock as B, createBlock as L, unref as t, isRef as x } from "vue";
|
|
2
2
|
import { useDataDicStore as y } from "../../store/modules/DataDictionary.esm.js";
|
|
3
3
|
import O from "./dic.worker.esm.js";
|
|
4
4
|
const V = {
|
|
5
5
|
name: "DSelect"
|
|
6
|
-
}, R = /* @__PURE__ */
|
|
6
|
+
}, R = /* @__PURE__ */ _({
|
|
7
7
|
...V,
|
|
8
8
|
props: {
|
|
9
9
|
value: { default: null },
|
|
@@ -14,34 +14,39 @@ const V = {
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:value", "change"],
|
|
16
16
|
setup(c, { emit: r }) {
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
let s = !0,
|
|
20
|
-
const n = p(
|
|
17
|
+
const l = c, { getDicByKey: v, list: S } = y(), { modelValue: u, data: m, onSearch: g, onSelect: C, onChange: w } = b();
|
|
18
|
+
function b() {
|
|
19
|
+
let s = !0, o = [];
|
|
20
|
+
const n = p(o), a = p(l.value), d = new O();
|
|
21
21
|
d.onerror = () => {
|
|
22
|
-
s = !1,
|
|
22
|
+
s = !1, o = v(l.name);
|
|
23
23
|
}, d.onmessage = (e) => {
|
|
24
24
|
n.value = [...e.data];
|
|
25
|
-
},
|
|
26
|
-
() =>
|
|
25
|
+
}, h(
|
|
26
|
+
() => l.include,
|
|
27
27
|
() => {
|
|
28
28
|
i(a.value);
|
|
29
29
|
}
|
|
30
|
+
), h(
|
|
31
|
+
() => l.value,
|
|
32
|
+
(e) => {
|
|
33
|
+
a.value = e;
|
|
34
|
+
}
|
|
30
35
|
), i(a.value);
|
|
31
|
-
const
|
|
32
|
-
s ? i(e) : n.value =
|
|
36
|
+
const D = (e) => {
|
|
37
|
+
s ? i(e) : n.value = o.filter((f) => f.value.toLowerCase().indexOf(e.toLowerCase()) !== -1 || f.label.toLowerCase().includes(e.toLowerCase())).splice(0, 10);
|
|
33
38
|
};
|
|
34
39
|
function i(e) {
|
|
35
40
|
d.postMessage({
|
|
36
|
-
list: JSON.stringify(S[
|
|
41
|
+
list: JSON.stringify(S[l.name]),
|
|
37
42
|
keywords: e,
|
|
38
|
-
include: JSON.stringify(
|
|
43
|
+
include: JSON.stringify(l.include ?? [])
|
|
39
44
|
});
|
|
40
45
|
}
|
|
41
46
|
return {
|
|
42
47
|
data: n,
|
|
43
48
|
modelValue: a,
|
|
44
|
-
onSearch:
|
|
49
|
+
onSearch: D,
|
|
45
50
|
onSelect: (e) => {
|
|
46
51
|
r("update:value", e);
|
|
47
52
|
},
|
|
@@ -50,20 +55,20 @@ const V = {
|
|
|
50
55
|
}
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
|
-
return (s,
|
|
58
|
+
return (s, o) => {
|
|
54
59
|
const n = k("a-select");
|
|
55
60
|
return B(), L(n, {
|
|
56
61
|
value: t(u),
|
|
57
|
-
"onUpdate:value":
|
|
62
|
+
"onUpdate:value": o[0] || (o[0] = (a) => x(u) ? u.value = a : null),
|
|
58
63
|
"allow-clear": "",
|
|
59
64
|
"show-search": "",
|
|
60
65
|
"filter-option": !1,
|
|
61
66
|
options: t(m),
|
|
62
67
|
placeholder: c.placeholder,
|
|
63
68
|
disabled: c.disabled,
|
|
64
|
-
onSelect: t(
|
|
65
|
-
onSearch: t(
|
|
66
|
-
onChange: t(
|
|
69
|
+
onSelect: t(C),
|
|
70
|
+
onSearch: t(g),
|
|
71
|
+
onChange: t(w)
|
|
67
72
|
}, null, 8, ["value", "options", "placeholder", "disabled", "onSelect", "onSearch", "onChange"]);
|
|
68
73
|
};
|
|
69
74
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
1
|
+
import { defineComponent as U, ref as v, computed as S, watchEffect as F, nextTick as I, watch as L, createVNode as p, withDirectives as V, vShow as W } from "vue";
|
|
2
|
+
import { Table as X, Space as _, Pagination as G } from "ant-design-vue";
|
|
3
3
|
import { useEleHeight as R } from "../../utils/html.esm.js";
|
|
4
|
-
import { prefixName as
|
|
5
|
-
const
|
|
4
|
+
import { prefixName as M } from "../theme/index.esm.js";
|
|
5
|
+
const Y = () => ({
|
|
6
6
|
data: {
|
|
7
7
|
type: Object,
|
|
8
8
|
required: !0
|
|
@@ -36,9 +36,9 @@ const M = () => ({
|
|
|
36
36
|
showQuickJumper: !0,
|
|
37
37
|
showLessItems: !0,
|
|
38
38
|
showTotal: (a) => `总共 ${a} 条`
|
|
39
|
-
}, T = `${
|
|
39
|
+
}, T = `${M}-pagination`, ne = /* @__PURE__ */ U({
|
|
40
40
|
name: "DTable",
|
|
41
|
-
props:
|
|
41
|
+
props: Y(),
|
|
42
42
|
// emits: { "update:keys": (keys: []) => void }
|
|
43
43
|
// TODO 需要做调整
|
|
44
44
|
emits: ["update:keys"],
|
|
@@ -46,41 +46,41 @@ const M = () => ({
|
|
|
46
46
|
emit: w,
|
|
47
47
|
slots: C
|
|
48
48
|
}) {
|
|
49
|
-
const
|
|
50
|
-
var
|
|
51
|
-
return ((
|
|
49
|
+
const t = v(a.keys || []), z = S(() => a.data), x = S(() => {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = a.config) == null ? void 0 : e.columns) ?? [];
|
|
52
52
|
}), f = S(() => {
|
|
53
|
-
var
|
|
54
|
-
return ((
|
|
53
|
+
var e;
|
|
54
|
+
return ((e = a.config) == null ? void 0 : e.pagination) ?? {};
|
|
55
55
|
}), {
|
|
56
|
-
tableRef:
|
|
57
|
-
tableRootRef:
|
|
58
|
-
tableHeight:
|
|
59
|
-
onPageChange:
|
|
60
|
-
onRowClassName:
|
|
56
|
+
tableRef: E,
|
|
57
|
+
tableRootRef: O,
|
|
58
|
+
tableHeight: B,
|
|
59
|
+
onPageChange: H,
|
|
60
|
+
onRowClassName: D
|
|
61
61
|
} = K();
|
|
62
62
|
function K() {
|
|
63
63
|
const {
|
|
64
|
-
rowClassName:
|
|
64
|
+
rowClassName: e,
|
|
65
65
|
keepSelected: n,
|
|
66
66
|
selection: d,
|
|
67
67
|
onPageChange: s
|
|
68
68
|
} = a.config, c = v(), o = v(null), i = v(), l = v(null), g = (h) => {
|
|
69
|
-
var r,
|
|
69
|
+
var r, N;
|
|
70
70
|
try {
|
|
71
|
-
const m = (r = o == null ? void 0 : o.value) == null ? void 0 : r.$el,
|
|
72
|
-
let
|
|
71
|
+
const m = (r = o == null ? void 0 : o.value) == null ? void 0 : r.$el, J = R(m.getElementsByClassName("ant-table-header")[0]);
|
|
72
|
+
let P = 0;
|
|
73
73
|
if (a.config.pagination) {
|
|
74
|
-
const
|
|
75
|
-
|
|
74
|
+
const Q = (N = c.value) == null ? void 0 : N.getElementsByClassName(T)[0];
|
|
75
|
+
P = R(Q) ?? 0;
|
|
76
76
|
}
|
|
77
|
-
i.value = h - (
|
|
77
|
+
i.value = h - (J + P), m.getElementsByClassName("ant-table-body")[0].style.height = i.value - 10 + "px", l.value = m.getElementsByClassName("ant-table-body")[0];
|
|
78
78
|
} catch (m) {
|
|
79
79
|
console.warn(m);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
return
|
|
83
|
-
a.height !== 0 &&
|
|
82
|
+
return F(() => {
|
|
83
|
+
a.height !== 0 && I(() => {
|
|
84
84
|
g(a.height);
|
|
85
85
|
});
|
|
86
86
|
}), {
|
|
@@ -91,15 +91,15 @@ const M = () => ({
|
|
|
91
91
|
s && s({
|
|
92
92
|
page: h,
|
|
93
93
|
size: r
|
|
94
|
-
}), l.value.scrollTop = 0, (d === "S" || !n) && (
|
|
94
|
+
}), l.value.scrollTop = 0, (d === "S" || !n) && (t.value = [], w("update:keys", t.value));
|
|
95
95
|
},
|
|
96
|
-
onRowClassName: (h, r) =>
|
|
96
|
+
onRowClassName: (h, r) => e ? e(h, r) : void 0
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
const j =
|
|
100
|
-
function
|
|
99
|
+
const j = $();
|
|
100
|
+
function $() {
|
|
101
101
|
const {
|
|
102
|
-
rowKey:
|
|
102
|
+
rowKey: e,
|
|
103
103
|
config: {
|
|
104
104
|
selection: n,
|
|
105
105
|
getCheckboxProps: d
|
|
@@ -108,15 +108,15 @@ const M = () => ({
|
|
|
108
108
|
if (n === "N")
|
|
109
109
|
return;
|
|
110
110
|
const s = (o, i) => {
|
|
111
|
-
n === "S" ? (
|
|
111
|
+
n === "S" ? (t.value = [], t.value = i ? [o[e]] : []) : t.value = i ? t.value.concat(o[e]) : t.value.filter((l) => l !== o[e]), w("update:keys", t.value);
|
|
112
112
|
}, c = (o, i, l) => {
|
|
113
|
-
const g = l.map((u) => u[
|
|
114
|
-
|
|
113
|
+
const g = l.map((u) => u[e]);
|
|
114
|
+
t.value = o ? t.value.concat(g) : t.value.filter((u) => !g.includes(u)), w("update:keys", t.value);
|
|
115
115
|
};
|
|
116
|
-
return
|
|
117
|
-
|
|
116
|
+
return L(() => a.keys, (o) => {
|
|
117
|
+
t.value = o;
|
|
118
118
|
}), {
|
|
119
|
-
selectedRowKeys:
|
|
119
|
+
selectedRowKeys: t,
|
|
120
120
|
onSelect: s,
|
|
121
121
|
onSelectAll: c,
|
|
122
122
|
fixed: !0,
|
|
@@ -125,9 +125,9 @@ const M = () => ({
|
|
|
125
125
|
getCheckboxProps: d
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
-
return (
|
|
128
|
+
const q = A();
|
|
129
|
+
function A() {
|
|
130
|
+
return (e) => {
|
|
131
131
|
let n;
|
|
132
132
|
const {
|
|
133
133
|
rowKey: d,
|
|
@@ -137,21 +137,21 @@ const M = () => ({
|
|
|
137
137
|
selection: o,
|
|
138
138
|
getCheckboxProps: i
|
|
139
139
|
}
|
|
140
|
-
} = a, l =
|
|
140
|
+
} = a, l = e[d], g = () => {
|
|
141
141
|
if (o === "N")
|
|
142
142
|
return;
|
|
143
|
-
|
|
143
|
+
t.value.some((b) => b === l) ? t.value = t.value.filter((b) => b !== l) : (o === "S" && (t.value = []), t.value.push(l)), w("update:keys", t.value);
|
|
144
144
|
};
|
|
145
145
|
return {
|
|
146
146
|
onClick: () => {
|
|
147
|
-
const u = i ? i(
|
|
147
|
+
const u = i ? i(e) : null;
|
|
148
148
|
u && u.value === l || (clearTimeout(n), n = setTimeout(() => {
|
|
149
|
-
g(), s && s(
|
|
149
|
+
g(), s && s(e);
|
|
150
150
|
}, 200));
|
|
151
151
|
},
|
|
152
152
|
// 点击行
|
|
153
153
|
onDblclick: () => {
|
|
154
|
-
clearTimeout(n), c && c(
|
|
154
|
+
clearTimeout(n), c && c(e);
|
|
155
155
|
}
|
|
156
156
|
// onContextmenu: (event) => {
|
|
157
157
|
// //TODO
|
|
@@ -165,37 +165,43 @@ const M = () => ({
|
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
+
const k = (e) => {
|
|
169
|
+
e.stopPropagation();
|
|
170
|
+
};
|
|
168
171
|
return () => {
|
|
169
|
-
var
|
|
170
|
-
return
|
|
171
|
-
ref:
|
|
172
|
-
}, [
|
|
173
|
-
ref:
|
|
172
|
+
var e;
|
|
173
|
+
return p("div", {
|
|
174
|
+
ref: O
|
|
175
|
+
}, [p(X, {
|
|
176
|
+
ref: E,
|
|
174
177
|
"row-key": a.rowKey,
|
|
175
178
|
bordered: a.config.bordered,
|
|
176
|
-
columns:
|
|
179
|
+
columns: x.value,
|
|
177
180
|
dataSource: z.value,
|
|
178
181
|
loading: a.loading,
|
|
179
|
-
size: ((
|
|
182
|
+
size: ((e = a.config) == null ? void 0 : e.size) ?? "small",
|
|
180
183
|
scroll: {
|
|
181
184
|
scrollToFirstRowOnChange: !0,
|
|
182
185
|
x: "100%",
|
|
183
|
-
y:
|
|
186
|
+
y: B.value + "px"
|
|
184
187
|
},
|
|
185
188
|
pagination: !1,
|
|
186
|
-
customRow:
|
|
189
|
+
customRow: q,
|
|
187
190
|
rowSelection: j,
|
|
188
|
-
rowClassName:
|
|
191
|
+
rowClassName: D
|
|
189
192
|
}, {
|
|
190
193
|
bodyCell: ({
|
|
191
194
|
column: n
|
|
192
195
|
}) => {
|
|
193
196
|
if (n.slot === "action")
|
|
194
|
-
return
|
|
197
|
+
return p("div", {
|
|
198
|
+
onClick: k,
|
|
199
|
+
onDblclick: k
|
|
200
|
+
}, [p(_, null, {
|
|
195
201
|
default: () => [C.action && C.action()]
|
|
196
|
-
});
|
|
202
|
+
})]);
|
|
197
203
|
}
|
|
198
|
-
}),
|
|
204
|
+
}), V(p(G, {
|
|
199
205
|
class: [T],
|
|
200
206
|
current: f.value.current,
|
|
201
207
|
"onUpdate:current": (n) => f.value.current = n,
|
|
@@ -210,11 +216,11 @@ const M = () => ({
|
|
|
210
216
|
"page-size-options": y.pageSizeOptions,
|
|
211
217
|
"show-total": y.showTotal,
|
|
212
218
|
total: f.value.total,
|
|
213
|
-
onChange:
|
|
214
|
-
}, null), [[
|
|
219
|
+
onChange: H
|
|
220
|
+
}, null), [[W, a.config.pagination]])]);
|
|
215
221
|
};
|
|
216
222
|
}
|
|
217
223
|
});
|
|
218
224
|
export {
|
|
219
|
-
|
|
225
|
+
ne as default
|
|
220
226
|
};
|
package/package.json
CHANGED
|
@@ -306,6 +306,9 @@ const DXTable = defineComponent({
|
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
+
const actionStop = (event: MouseEvent) => {
|
|
310
|
+
event.stopPropagation();
|
|
311
|
+
};
|
|
309
312
|
return () => (
|
|
310
313
|
<div ref={tableRootRef}>
|
|
311
314
|
<Table
|
|
@@ -329,7 +332,11 @@ const DXTable = defineComponent({
|
|
|
329
332
|
{{
|
|
330
333
|
bodyCell: ({ column }: any) => {
|
|
331
334
|
if (column.slot === "action") {
|
|
332
|
-
return
|
|
335
|
+
return (
|
|
336
|
+
<div onClick={actionStop} onDblclick={actionStop}>
|
|
337
|
+
<Space>{slots.action && slots.action()}</Space>
|
|
338
|
+
</div>
|
|
339
|
+
);
|
|
333
340
|
}
|
|
334
341
|
}
|
|
335
342
|
}}
|