ninemoon-ui 0.1.8 → 0.1.9

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.
Files changed (36) hide show
  1. package/dist/components/date/datepicker.vue.d.ts +3 -3
  2. package/dist/components/date/datepickerRange.vue.d.ts +2 -2
  3. package/dist/components/form/form.vue.d.ts +5 -0
  4. package/dist/components/form/formlabel.vue.d.ts +10 -0
  5. package/dist/components/input/input.vue.d.ts +10 -3
  6. package/dist/components/numberInput/numberinput.vue.d.ts +3 -3
  7. package/dist/components/select/select.vue.d.ts +3 -3
  8. package/dist/components/table/table.vue.d.ts +8 -1
  9. package/dist/components/table/tableItem.vue.d.ts +2 -0
  10. package/dist/directives/index.d.ts +1 -2
  11. package/dist/directives/looplead.d.ts +19 -0
  12. package/dist/directives/scrolllead.d.ts +3 -11
  13. package/dist/directives/watchwindow.d.ts +1 -1
  14. package/dist/hooks/teleportcontainer.d.ts +5 -0
  15. package/dist/index.d.ts +128 -30
  16. package/dist/index.es.js +26 -27
  17. package/dist/js/badge/badge.js +3 -3
  18. package/dist/js/carousel/carousel.js +1 -1
  19. package/dist/js/check/checkbox.js +4 -4
  20. package/dist/js/date/datepicker.js +4 -3
  21. package/dist/js/date/datepickerRange.js +22 -17
  22. package/dist/js/dialog/dialog.js +36 -37
  23. package/dist/js/form/form.js +3 -1
  24. package/dist/js/form/formlabel.js +39 -8
  25. package/dist/js/image/image.js +2 -2
  26. package/dist/js/index/index.js +130 -113
  27. package/dist/js/input/input.js +26 -6
  28. package/dist/js/numberInput/numberinput.js +2 -1
  29. package/dist/js/pagination/pagination.js +2 -1
  30. package/dist/js/popover/popover.js +10 -16
  31. package/dist/js/radio/radiobox.js +4 -4
  32. package/dist/js/select/select.js +4 -3
  33. package/dist/js/table/table.js +243 -188
  34. package/dist/js/table/tableItem.js +2 -1
  35. package/package.json +2 -1
  36. package/dist/directives/whitespaceclick.d.ts +0 -12
@@ -1,6 +1,25 @@
1
- import { defineComponent, computed, useSlots, ref, watch, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, createVNode, withDirectives, vShow, h, vModelCheckbox, withModifiers } from "vue";
1
+ import { defineComponent, computed, useSlots, h, nextTick, ref, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, renderList, withDirectives, vModelCheckbox, createCommentVNode, createTextVNode, toDisplayString, createBlock, markRaw } from "vue";
2
2
  import { S as ShapeFlags } from "../shapeFlag/shapeFlag.js";
3
- const _hoisted_1 = { class: "text-center text-word6 text-base" };
3
+ const _hoisted_1 = ["width"];
4
+ const _hoisted_2 = { key: 0 };
5
+ const _hoisted_3 = ["colspan"];
6
+ const _hoisted_4 = { class: "border-b" };
7
+ const _hoisted_5 = { key: 0 };
8
+ const _hoisted_6 = {
9
+ class: "px-1",
10
+ for: "checkbox"
11
+ };
12
+ const _hoisted_7 = ["checked", "onChange"];
13
+ const _hoisted_8 = { key: 1 };
14
+ const _hoisted_9 = {
15
+ key: 1,
16
+ class: "border-b"
17
+ };
18
+ const _hoisted_10 = ["colspan"];
19
+ const _hoisted_11 = {
20
+ key: 0,
21
+ class: "text-center text-word6 text-base"
22
+ };
4
23
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
24
  __name: "table",
6
25
  props: {
@@ -10,85 +29,133 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
29
  headclass: {},
11
30
  cellclass: {},
12
31
  tableclass: {},
13
- idKey: {}
32
+ idKey: {},
33
+ outSideCheck: { type: Boolean, default: false }
14
34
  },
15
- emits: ["rowClick", "selectionChange"],
35
+ emits: ["rowClick", "selectionChange", "finishRender"],
16
36
  setup(__props, { expose: __expose, emit: __emit }) {
17
37
  const props = __props;
18
38
  const hasData = computed(() => {
19
39
  return props.data.length > 0;
20
40
  });
21
41
  const emit = __emit;
42
+ const emitSelection = () => {
43
+ emit("selectionChange", resultArray.value);
44
+ };
22
45
  const slots = useSlots();
23
- const validSlots = computed(() => {
24
- return slots.default().reduce((pre, cur) => {
25
- if (cur.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
26
- pre = pre.concat(cur.children);
27
- } else if (cur.shapeFlag & ShapeFlags.STATEFUL_COMPONENT) {
28
- pre.push(cur);
46
+ const groupedSlots = computed(() => {
47
+ const groups = {
48
+ append: null,
49
+ prepend: null,
50
+ rest: [],
51
+ restLen: 0,
52
+ normal: [],
53
+ hasindex: false,
54
+ hascheck: false
55
+ };
56
+ const _categorizeSlot = (slot) => {
57
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
58
+ const type = (_a = slot.props) == null ? void 0 : _a.type;
59
+ switch (type) {
60
+ case "append":
61
+ groups.append = slot;
62
+ break;
63
+ case "prepend":
64
+ groups.prepend = slot;
65
+ break;
66
+ case "index":
67
+ groups.rest.push({
68
+ type: (_b = slot.props) == null ? void 0 : _b.type,
69
+ prop: (_c = slot.props) == null ? void 0 : _c.prop,
70
+ label: ((_d = slot.props) == null ? void 0 : _d.label) || "",
71
+ width: (_e = slot.props) == null ? void 0 : _e.width
72
+ });
73
+ groups.restLen += 1;
74
+ groups.hasindex = true;
75
+ break;
76
+ case "selection":
77
+ groups.rest.push({
78
+ type: (_f = slot.props) == null ? void 0 : _f.type,
79
+ prop: (_g = slot.props) == null ? void 0 : _g.prop,
80
+ label: ((_h = slot.props) == null ? void 0 : _h.label) || "",
81
+ width: (_i = slot.props) == null ? void 0 : _i.width
82
+ });
83
+ groups.restLen += 1;
84
+ groups.hascheck = true;
85
+ break;
86
+ default:
87
+ groups.rest.push({
88
+ type: (_j = slot.props) == null ? void 0 : _j.type,
89
+ prop: (_k = slot.props) == null ? void 0 : _k.prop,
90
+ label: ((_l = slot.props) == null ? void 0 : _l.label) || "",
91
+ width: (_m = slot.props) == null ? void 0 : _m.width
92
+ });
93
+ groups.restLen += 1;
94
+ groups.normal.push({
95
+ isSlot: Boolean((_n = slot.children) == null ? void 0 : _n.default),
96
+ prop: (_o = slot.props) == null ? void 0 : _o.prop,
97
+ slot
98
+ });
99
+ break;
100
+ }
101
+ };
102
+ slots.default().forEach((node) => {
103
+ if (node.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
104
+ node.children.forEach(_categorizeSlot);
105
+ } else if (node.shapeFlag & ShapeFlags.STATEFUL_COMPONENT) {
106
+ _categorizeSlot(node);
29
107
  }
30
- return pre;
31
- }, []);
32
- });
33
- const appendSlots = computed(
34
- () => validSlots.value.filter((slot) => slot.props.type === "append")
35
- );
36
- const prependSlots = computed(
37
- () => validSlots.value.filter((slot) => slot.props.type === "prepend")
38
- );
39
- const restSlots = computed(
40
- () => validSlots.value.filter(
41
- (slot) => slot.props.type !== "append" && slot.props.type !== "prepend"
42
- )
43
- );
44
- const renderColGroup = () => {
45
- return h(
46
- "colgroup",
47
- null,
48
- restSlots.value.map((it, _index) => {
49
- return colitemHandle(it);
50
- })
51
- );
52
- };
53
- const colitemHandle = (it) => {
54
- return h("col", {
55
- width: it.props.width || null
56
108
  });
109
+ return groups;
110
+ });
111
+ const prependSlot = computed(() => groupedSlots.value.prepend);
112
+ const appendSlot = computed(() => groupedSlots.value.append);
113
+ const dynamicPre = (props2) => {
114
+ var _a, _b, _c;
115
+ return (_c = (_a = prependSlot.value) == null ? void 0 : (_b = _a.children).default) == null ? void 0 : _c.call(_b, props2);
57
116
  };
58
- const renderHead = () => {
59
- return h(
60
- "thead",
61
- {
62
- class: normalizeClass(["text-word6", [props.headclass]])
63
- },
64
- restSlots.value.map((it) => {
65
- return headitemHandle(it);
66
- })
67
- );
117
+ const dynamicAppend = (props2) => {
118
+ var _a, _b, _c;
119
+ return (_c = (_a = appendSlot.value) == null ? void 0 : (_b = _a.children).default) == null ? void 0 : _c.call(_b, props2);
68
120
  };
69
- const headitemHandle = (it) => {
70
- var _a;
71
- return h(
72
- "th",
73
- {
74
- class: "font-normal h-10 border-b "
75
- },
76
- it.children && it.children.head ? it.children.head() : ((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? h(
77
- "label",
121
+ const hasindexSlot = computed(() => groupedSlots.value.hasindex);
122
+ const hascheckSlot = computed(() => groupedSlots.value.hascheck);
123
+ const normalSlots = computed(() => groupedSlots.value.normal);
124
+ const cachedSlots = computed(() => groupedSlots.value.rest);
125
+ const dynamicnormal = computed(() => {
126
+ return normalSlots.value.map((eachslot) => {
127
+ if (eachslot.isSlot) {
128
+ return (dyprops) => {
129
+ var _a;
130
+ return (_a = eachslot.slot) == null ? void 0 : _a.children.default(dyprops);
131
+ };
132
+ } else {
133
+ return (dyprops) => {
134
+ const text = dyprops.row[eachslot.prop] || props.whiteword;
135
+ return h("span", text);
136
+ };
137
+ }
138
+ });
139
+ });
140
+ nextTick(() => {
141
+ emit("finishRender");
142
+ });
143
+ const dynormalRenderHandle = (rowprops) => {
144
+ return dynamicnormal.value.map((rh, _) => {
145
+ return h(
146
+ "td",
78
147
  {
79
- class: "px-1 flex"
148
+ class: normalizeClass(["text-center py-2", props.cellclass])
80
149
  },
81
- withDirectives(
82
- h("input", {
83
- type: "checkbox",
84
- "onUpdate:modelValue": (value) => allSelect.value = value,
85
- class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 text-red-600 focus:outline-none"
86
- }),
87
- [[vModelCheckbox, allSelect.value]]
88
- )
89
- ) : it.props.label
90
- );
150
+ rh({ row: rowprops.row, index: rowprops.rowindex })
151
+ );
152
+ });
91
153
  };
154
+ const getRowKey = (rowdata, index) => props.idKey ? `row_${rowdata[props.idKey]}` : `row_${index}`;
155
+ const getPreRowkey = (rowdata, index) => props.idKey ? `prepend_${rowdata[props.idKey]}` : `prepend_${index}`;
156
+ const getAppendRowkey = (rowdata, index) => props.idKey ? `append_${rowdata[props.idKey]}` : `append_${index}`;
157
+ const colSpan = computed(() => groupedSlots.value.restLen);
158
+ const choosedSet = ref(/* @__PURE__ */ new Set());
92
159
  const allSelect = computed({
93
160
  set(flag) {
94
161
  if (flag) {
@@ -96,137 +163,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
163
  } else {
97
164
  clearSelection();
98
165
  }
166
+ emitSelection();
99
167
  },
100
168
  get() {
101
- return hasData.value && choosedKeys.value.length == props.data.length;
169
+ if (MapData.value.size === 0)
170
+ return false;
171
+ for (const key of MapData.value.keys()) {
172
+ if (!choosedSet.value.has(key))
173
+ return false;
174
+ }
175
+ return true;
102
176
  }
103
177
  });
104
178
  const MapData = computed(() => {
105
- return props.data.reduce((map, item, index) => {
179
+ return props.data.reduce((thismap, item, index) => {
106
180
  const key = props.idKey ? item[props.idKey] : index;
107
- if (map.has(key)) {
108
- console.warn(`重复键 ${key},已合并为数组`);
109
- map.set(key, [...map.get(key), item]);
110
- } else {
111
- map.set(key, [item]);
181
+ if (thismap.has(key)) {
182
+ console.warn(`重复键 ${key},已覆盖`);
112
183
  }
113
- return map;
184
+ thismap.set(key, item);
185
+ return thismap;
114
186
  }, /* @__PURE__ */ new Map());
115
187
  });
116
- const choosedSet = ref(/* @__PURE__ */ new Set());
117
- const choosedKeys = computed(() => Array.from(choosedSet.value));
118
188
  const resultArray = computed(() => {
119
- return choosedKeys.value.map((key) => {
120
- const mapKey = props.idKey ? key : Number(key);
121
- return MapData.value.get(mapKey) || [];
122
- }).flat();
189
+ if (choosedSet.value.size === 0)
190
+ return [];
191
+ let result = [];
192
+ choosedSet.value.forEach((key) => {
193
+ if (MapData.value.has(key)) {
194
+ result.push(MapData.value.get(key));
195
+ }
196
+ });
197
+ return result;
123
198
  });
124
199
  const clearSelection = () => {
125
- choosedSet.value = /* @__PURE__ */ new Set();
200
+ choosedSet.value.clear();
201
+ emitSelection();
126
202
  };
127
203
  const allSelection = () => {
128
204
  choosedSet.value = new Set(MapData.value.keys());
205
+ emitSelection();
129
206
  };
130
- watch(choosedKeys, () => {
131
- emit("selectionChange", resultArray.value);
132
- });
133
- const renderSlotRows = (slots2, row, index, colSpan, modify) => {
134
- const rowKey = getRowKey(row, index);
135
- return slots2.map(
136
- (slot) => h(
137
- "tr",
138
- { key: `${modify}-${rowKey}` },
139
- h("td", { colSpan }, trRenderHandle(row, slot, index))
140
- )
141
- );
142
- };
143
- const renderMainRow = (row, index) => {
144
- const rowKey = getRowKey(row, index);
145
- return h(
146
- "tr",
147
- {
148
- class: "border-b hover:bg-gray-100 transition-colors",
149
- key: rowKey,
150
- // 使用唯一键替代索引
151
- onClick: withModifiers(() => emit("rowClick", { row, index }), ["stop"])
152
- },
153
- restSlots.value.map(
154
- (slot, colIndex) => bodyCellRenderer(row, slot, index, colIndex)
155
- )
156
- );
157
- };
158
- const bodyCellRenderer = (row, slot, rowIndex, colIndex) => {
159
- return h(
160
- "td",
161
- {
162
- class: cellClasses(slot.props),
163
- // 提取样式生成逻辑
164
- key: `${getRowKey(row, rowIndex)}-${colIndex}`
165
- // 复合键
166
- },
167
- renderCellContent(row, slot, rowIndex)
168
- );
169
- };
170
- const renderCellContent = (row, slot, rowIndex) => {
171
- var _a;
172
- return ((_a = slot.props) == null ? void 0 : _a.type) === "selection" ? h(
173
- "label",
174
- {
175
- class: "px-1 flex",
176
- for: "checkbox"
177
- },
178
- h("input", {
179
- type: "checkbox",
180
- value: props.idKey ? row[props.idKey] : rowIndex,
181
- onChange: (event) => {
182
- const target = event.target;
183
- const rowKey = props.idKey ? row[props.idKey] : rowIndex;
184
- target.checked ? choosedSet.value.add(rowKey) : choosedSet.value.delete(rowKey);
185
- },
186
- checked: choosedSet.value.has(
187
- props.idKey ? row[props.idKey] : rowIndex
188
- ),
189
- class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 text-red-600 focus:outline-none "
190
- })
191
- ) : trRenderHandle(row, slot, rowIndex);
192
- };
193
- const cellClasses = (props2) => {
194
- return normalizeClass([
195
- "text-center py-2",
196
- props2 == null ? void 0 : props2.cellclass,
197
- (props2 == null ? void 0 : props2.align) === "right" ? "text-right" : "text-left"
198
- ]);
199
- };
200
- const getRowKey = (row, index) => {
201
- return props.idKey ? row[props.idKey] : `row-${index}`;
202
- };
203
- const renderBody = () => {
204
- const { data } = props;
205
- const prepend = prependSlots.value;
206
- const append = appendSlots.value;
207
- const rest = restSlots.value;
208
- const colSpan = rest.length;
209
- const renderRow = (row, index) => {
210
- return [
211
- // 前置插槽渲染
212
- ...renderSlotRows(prepend, row, index, colSpan, "pre"),
213
- // 主体行
214
- renderMainRow(row, index),
215
- // 后置插槽渲染
216
- ...renderSlotRows(append, row, index, colSpan, "next")
217
- ];
218
- };
219
- return h("tbody", data.map(renderRow));
220
- };
221
- const trRenderHandle = (row, it, i) => {
222
- return h(
223
- "div",
224
- null,
225
- it.children && it.children.default ? it.children.default({
226
- row,
227
- index: i
228
- }) : row[it.props.prop] || props.whiteword
229
- );
207
+ const checkChange = (event, row, index) => {
208
+ const target = event.target;
209
+ const rowKey = props.idKey ? row[props.idKey] : index;
210
+ target.checked ? choosedSet.value.add(rowKey) : choosedSet.value.delete(rowKey);
211
+ emitSelection();
230
212
  };
231
213
  __expose({
232
214
  clearSelection,
@@ -242,9 +224,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
242
224
  newSet.add(key);
243
225
  }
244
226
  choosedSet.value = newSet;
227
+ emitSelection();
245
228
  },
246
229
  setSelection: (arr) => {
247
230
  choosedSet.value = new Set(arr);
231
+ emitSelection();
248
232
  }
249
233
  });
250
234
  return (_ctx, _cache) => {
@@ -252,15 +236,86 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
252
236
  createElementVNode("table", {
253
237
  class: normalizeClass(["w-full text-sm", _ctx.tableclass])
254
238
  }, [
255
- createVNode(renderColGroup),
256
- withDirectives(createVNode(renderHead, null, null, 512), [
257
- [vShow, _ctx.showHead]
239
+ createElementVNode("colgroup", null, [
240
+ (openBlock(true), createElementBlock(Fragment, null, renderList(cachedSlots.value, (i, j) => {
241
+ return openBlock(), createElementBlock("col", {
242
+ width: i.width,
243
+ key: j
244
+ }, null, 8, _hoisted_1);
245
+ }), 128))
258
246
  ]),
259
- createVNode(renderBody)
247
+ _ctx.showHead ? (openBlock(), createElementBlock("thead", {
248
+ key: 0,
249
+ class: normalizeClass(["text-word6", _ctx.headclass])
250
+ }, [
251
+ (openBlock(true), createElementBlock(Fragment, null, renderList(cachedSlots.value, (i, j) => {
252
+ return openBlock(), createElementBlock("th", {
253
+ class: "font-normal h-10 border-b",
254
+ key: j
255
+ }, [
256
+ i.type === "selection" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
257
+ !_ctx.outSideCheck ? withDirectives((openBlock(), createElementBlock("input", {
258
+ key: 0,
259
+ type: "checkbox",
260
+ class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 focus:outline-none",
261
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => allSelect.value = $event)
262
+ }, null, 512)), [
263
+ [vModelCheckbox, allSelect.value]
264
+ ]) : createCommentVNode("", true)
265
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
266
+ createTextVNode(toDisplayString(i.label), 1)
267
+ ], 64))
268
+ ]);
269
+ }), 128))
270
+ ], 2)) : createCommentVNode("", true),
271
+ createElementVNode("tbody", null, [
272
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (rowdata, rowindex) => {
273
+ return openBlock(), createElementBlock(Fragment, {
274
+ key: getRowKey(rowdata, rowindex)
275
+ }, [
276
+ prependSlot.value ? (openBlock(), createElementBlock("tr", _hoisted_2, [
277
+ createElementVNode("td", { colspan: colSpan.value }, [
278
+ (openBlock(), createBlock(dynamicPre, {
279
+ row: markRaw(rowdata),
280
+ index: rowindex,
281
+ key: getPreRowkey(rowdata, rowindex)
282
+ }, null, 8, ["row", "index"]))
283
+ ], 8, _hoisted_3)
284
+ ])) : createCommentVNode("", true),
285
+ createElementVNode("tr", _hoisted_4, [
286
+ hascheckSlot.value ? (openBlock(), createElementBlock("td", _hoisted_5, [
287
+ createElementVNode("label", _hoisted_6, [
288
+ createElementVNode("input", {
289
+ type: "checkbox",
290
+ checked: choosedSet.value.has(_ctx.idKey ? rowdata[_ctx.idKey] : rowindex),
291
+ onChange: ($event) => checkChange($event, rowdata, rowindex),
292
+ class: "appearance-none form-tick h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 text-red-600 focus:outline-none"
293
+ }, null, 40, _hoisted_7)
294
+ ])
295
+ ])) : createCommentVNode("", true),
296
+ hasindexSlot.value ? (openBlock(), createElementBlock("td", _hoisted_8, [
297
+ createElementVNode("div", null, toDisplayString(rowindex + 1), 1)
298
+ ])) : createCommentVNode("", true),
299
+ (openBlock(), createBlock(dynormalRenderHandle, {
300
+ row: markRaw(rowdata),
301
+ rowindex,
302
+ key: getRowKey(rowdata, rowindex)
303
+ }, null, 8, ["row", "rowindex"]))
304
+ ]),
305
+ appendSlot.value ? (openBlock(), createElementBlock("tr", _hoisted_9, [
306
+ createElementVNode("td", { colspan: colSpan.value }, [
307
+ (openBlock(), createBlock(dynamicAppend, {
308
+ row: markRaw(rowdata),
309
+ index: rowindex,
310
+ key: getAppendRowkey(rowdata, rowindex)
311
+ }, null, 8, ["row", "index"]))
312
+ ], 8, _hoisted_10)
313
+ ])) : createCommentVNode("", true)
314
+ ], 64);
315
+ }), 128))
316
+ ])
260
317
  ], 2),
261
- withDirectives(createElementVNode("div", _hoisted_1, "暂无数据", 512), [
262
- [vShow, !hasData.value]
263
- ])
318
+ !hasData.value ? (openBlock(), createElementBlock("div", _hoisted_11, "暂无数据")) : createCommentVNode("", true)
264
319
  ], 64);
265
320
  };
266
321
  }
@@ -9,7 +9,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  type: { default: "default" },
10
10
  sortable: { type: Boolean },
11
11
  row: {},
12
- index: {}
12
+ index: {},
13
+ cellclass: {}
13
14
  },
14
15
  setup(__props) {
15
16
  return (_ctx, _cache) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninemoon-ui",
3
3
  "private": false,
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "author": "zhuboy",
6
6
  "keywords": [
7
7
  "vue3",
@@ -18,6 +18,7 @@
18
18
  "main": "dist/index.es.js",
19
19
  "devDependencies": {
20
20
  "@vitejs/plugin-vue": "^4.2.3",
21
+ "@vue/runtime-core": "^3.5.13",
21
22
  "autoprefixer": "^10.4.14",
22
23
  "postcss": "^8.4.27",
23
24
  "sass": "^1.64.1",
@@ -1,12 +0,0 @@
1
- import { ObjectDirective } from 'vue';
2
-
3
- interface BgPictureDirectiveOptions {
4
- onBgPicture: (e: MouseEvent) => void;
5
- }
6
- interface bgPictureDom extends HTMLElement {
7
- _bgPicture_handlers_?: {
8
- bgPicture: (e: MouseEvent) => void;
9
- };
10
- }
11
- export declare const createBgClickeDirective: (options: Partial<BgPictureDirectiveOptions>) => ObjectDirective<bgPictureDom, any>;
12
- export {};