vue-devui 1.0.0-beta.14 → 1.0.0-beta.15

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/vue-devui.es.js CHANGED
@@ -3212,7 +3212,7 @@ var Carousel = defineComponent$1({
3212
3212
  }, null))]) : null]);
3213
3213
  }
3214
3214
  });
3215
- var CarouseItem = defineComponent$1({
3215
+ var CarouselItem = defineComponent$1({
3216
3216
  name: "DCarouselItem",
3217
3217
  render() {
3218
3218
  var _a;
@@ -3228,8 +3228,8 @@ var CarouseItem = defineComponent$1({
3228
3228
  Carousel.install = function(app) {
3229
3229
  app.component(Carousel.name, Carousel);
3230
3230
  };
3231
- CarouseItem.install = function(app) {
3232
- app.component(CarouseItem.name, CarouseItem);
3231
+ CarouselItem.install = function(app) {
3232
+ app.component(CarouselItem.name, CarouselItem);
3233
3233
  };
3234
3234
  var CarouselInstall = {
3235
3235
  title: "Carousel \u8D70\u9A6C\u706F",
@@ -3237,7 +3237,7 @@ var CarouselInstall = {
3237
3237
  status: "80%",
3238
3238
  install(app) {
3239
3239
  app.use(Carousel);
3240
- app.use(CarouseItem);
3240
+ app.use(CarouselItem);
3241
3241
  }
3242
3242
  };
3243
3243
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
@@ -8458,7 +8458,8 @@ var Comment = defineComponent$1({
8458
8458
  return null;
8459
8459
  }
8460
8460
  const actionList = actions2.map((action, index2) => createVNode("li", {
8461
- "key": `devui-comment-action-${index2}`
8461
+ "key": `devui-comment-action-${index2}`,
8462
+ "class": `devui-comment-action-${index2}`
8462
8463
  }, [action]));
8463
8464
  return actionList;
8464
8465
  };
@@ -8498,7 +8499,7 @@ Comment.install = function(app) {
8498
8499
  var CommentInstall = {
8499
8500
  title: "Comment \u8BC4\u8BBA",
8500
8501
  category: "\u6570\u636E\u5C55\u793A",
8501
- status: "70%",
8502
+ status: "100%",
8502
8503
  install(app) {
8503
8504
  app.use(Comment);
8504
8505
  }
@@ -10048,8 +10049,18 @@ const drawerProps = {
10048
10049
  type: Boolean,
10049
10050
  default: true
10050
10051
  },
10052
+ destroyOnHide: {
10053
+ type: Boolean,
10054
+ default: false
10055
+ },
10051
10056
  beforeHidden: {
10052
10057
  type: [Promise, Function]
10058
+ },
10059
+ content: {
10060
+ type: [Object, Function]
10061
+ },
10062
+ header: {
10063
+ type: [Object, Function]
10053
10064
  }
10054
10065
  };
10055
10066
  var drawerHeader = "";
@@ -10059,6 +10070,7 @@ var DrawerHeader = defineComponent$1({
10059
10070
  setup(props, ctx2) {
10060
10071
  const isFullScreen = ref(false);
10061
10072
  const visible = inject("visible");
10073
+ const destroyOnHide = inject("destroyOnHide");
10062
10074
  const fullScreenClassName = computed(() => isFullScreen.value ? "icon icon-minimize" : "icon icon-maxmize");
10063
10075
  const handleFullScreen = (e) => {
10064
10076
  e.stopPropagation();
@@ -10072,7 +10084,8 @@ var DrawerHeader = defineComponent$1({
10072
10084
  fullScreenClassName,
10073
10085
  visible,
10074
10086
  handleFullScreen,
10075
- handleDrawerClose
10087
+ handleDrawerClose,
10088
+ destroyOnHide
10076
10089
  };
10077
10090
  },
10078
10091
  render() {
@@ -10080,12 +10093,18 @@ var DrawerHeader = defineComponent$1({
10080
10093
  handleFullScreen,
10081
10094
  handleDrawerClose,
10082
10095
  visible,
10083
- fullScreenClassName
10096
+ fullScreenClassName,
10097
+ destroyOnHide
10084
10098
  } = this;
10085
- if (!visible)
10099
+ if (destroyOnHide.value && !visible) {
10086
10100
  return null;
10101
+ }
10102
+ const visibleVal = visible ? "visible" : "hidden";
10087
10103
  return createVNode("div", {
10088
- "class": "devui-drawer-header"
10104
+ "class": "devui-drawer-header",
10105
+ "style": {
10106
+ visibility: visibleVal
10107
+ }
10089
10108
  }, [createVNode("div", {
10090
10109
  "class": "devui-drawer-header-item"
10091
10110
  }, [createVNode("span", {
@@ -10107,17 +10126,26 @@ var DrawerContainer = defineComponent$1({
10107
10126
  name: "DrawerContainer",
10108
10127
  setup() {
10109
10128
  const visible = inject("visible");
10129
+ const destroyOnHide = inject("destroyOnHide");
10110
10130
  return {
10111
- visible
10131
+ visible,
10132
+ destroyOnHide
10112
10133
  };
10113
10134
  },
10114
10135
  render() {
10115
10136
  const {
10116
- visible
10137
+ visible,
10138
+ destroyOnHide
10117
10139
  } = this;
10118
- if (!visible)
10140
+ if (destroyOnHide.value && !visible) {
10119
10141
  return null;
10120
- return createVNode("div", null, [createTextVNode("\u5185\u5BB9\u533A\u57DF")]);
10142
+ }
10143
+ const visibleVal = this.visible ? "visible" : "hidden";
10144
+ return createVNode("div", {
10145
+ "style": {
10146
+ visibility: visibleVal
10147
+ }
10148
+ }, [createTextVNode("\u5185\u5BB9\u533A\u57DF")]);
10121
10149
  }
10122
10150
  });
10123
10151
  var drawerBody = "";
@@ -10134,6 +10162,7 @@ var DrawerBody = defineComponent$1({
10134
10162
  const width = inject("width");
10135
10163
  const visible = inject("visible");
10136
10164
  const backdropCloseable = inject("backdropCloseable");
10165
+ const destroyOnHide = inject("destroyOnHide");
10137
10166
  const navRight = computed(() => position.value === "right" ? {
10138
10167
  "right": 0
10139
10168
  } : {
@@ -10156,7 +10185,8 @@ var DrawerBody = defineComponent$1({
10156
10185
  navWidth,
10157
10186
  visible,
10158
10187
  clickContent,
10159
- handleDrawerClose
10188
+ handleDrawerClose,
10189
+ destroyOnHide
10160
10190
  };
10161
10191
  },
10162
10192
  render() {
@@ -10167,14 +10197,18 @@ var DrawerBody = defineComponent$1({
10167
10197
  navRight,
10168
10198
  navWidth,
10169
10199
  visible,
10170
- handleDrawerClose
10200
+ handleDrawerClose,
10201
+ destroyOnHide
10171
10202
  } = this;
10172
- if (!visible)
10203
+ if (destroyOnHide.value && !visible) {
10173
10204
  return null;
10205
+ }
10206
+ const visibleVal = visible ? "visible" : "hidden";
10174
10207
  return createVNode("div", {
10175
10208
  "class": "devui-drawer",
10176
10209
  "style": {
10177
- zIndex: zindex
10210
+ zIndex: zindex,
10211
+ visibility: visibleVal
10178
10212
  },
10179
10213
  "onClick": handleDrawerClose
10180
10214
  }, [isCover ? createVNode("div", {
@@ -10192,33 +10226,7 @@ var DrawerBody = defineComponent$1({
10192
10226
  }, [slots.default ? slots.default() : null])])])]);
10193
10227
  }
10194
10228
  });
10195
- function createDrawerApp(props) {
10196
- return createApp(Drawer, __spreadValues({}, props));
10197
- }
10198
- class DrawerService {
10199
- static show(props) {
10200
- this.$div = document.createElement("div");
10201
- this.$body.appendChild(this.$div);
10202
- this.drawer = createDrawerApp(props);
10203
- this.drawer.mount(this.$div);
10204
- }
10205
- static hide() {
10206
- var _a;
10207
- (_a = this.drawer) == null ? void 0 : _a.unmount();
10208
- this.drawer = null;
10209
- if (this.$div) {
10210
- this.$body.removeChild(this.$div);
10211
- }
10212
- this.$div = null;
10213
- }
10214
- }
10215
- __publicField(DrawerService, "$body");
10216
- __publicField(DrawerService, "$div", null);
10217
- __publicField(DrawerService, "drawer", null);
10218
- if (inBrowser) {
10219
- DrawerService.$body = document.body;
10220
- }
10221
- var Drawer = defineComponent$1({
10229
+ var Drawer$1 = defineComponent$1({
10222
10230
  name: "DDrawer",
10223
10231
  props: drawerProps,
10224
10232
  emits: ["close", "update:visible", "afterOpened"],
@@ -10233,15 +10241,15 @@ var Drawer = defineComponent$1({
10233
10241
  isCover,
10234
10242
  escKeyCloseable,
10235
10243
  position,
10236
- backdropCloseable
10244
+ backdropCloseable,
10245
+ destroyOnHide
10237
10246
  } = toRefs(props);
10238
10247
  const isFullScreen = ref(false);
10239
- const fullScreenEvent = () => {
10248
+ const fullscreen2 = () => {
10240
10249
  isFullScreen.value = !isFullScreen.value;
10241
10250
  };
10242
10251
  const closeDrawer = async () => {
10243
10252
  var _a;
10244
- DrawerService.hide();
10245
10253
  const beforeHidden = props.beforeHidden;
10246
10254
  let result2 = (_a = typeof beforeHidden === "function" ? beforeHidden() : beforeHidden) != null ? _a : false;
10247
10255
  if (result2 instanceof Promise) {
@@ -10260,7 +10268,9 @@ var Drawer = defineComponent$1({
10260
10268
  watch(visible, (val) => {
10261
10269
  if (val) {
10262
10270
  emit("afterOpened");
10263
- isFullScreen.value = false;
10271
+ if (destroyOnHide.value) {
10272
+ isFullScreen.value = false;
10273
+ }
10264
10274
  }
10265
10275
  if (escKeyCloseable && val) {
10266
10276
  document.addEventListener("keyup", escCloseDrawer);
@@ -10276,6 +10286,7 @@ var Drawer = defineComponent$1({
10276
10286
  provide("visible", visible);
10277
10287
  provide("isFullScreen", isFullScreen);
10278
10288
  provide("backdropCloseable", backdropCloseable);
10289
+ provide("destroyOnHide", destroyOnHide);
10279
10290
  onUnmounted(() => {
10280
10291
  document.removeEventListener("keyup", escCloseDrawer);
10281
10292
  });
@@ -10283,36 +10294,106 @@ var Drawer = defineComponent$1({
10283
10294
  isFullScreen,
10284
10295
  visible,
10285
10296
  slots,
10286
- fullScreenEvent,
10297
+ fullscreen: fullscreen2,
10287
10298
  closeDrawer
10288
10299
  };
10289
10300
  },
10290
10301
  render() {
10291
- const fullScreenEvent = this.fullScreenEvent;
10292
- const closeDrawer = this.closeDrawer;
10293
- if (!this.visible)
10302
+ const {
10303
+ fullscreen: fullscreen2,
10304
+ closeDrawer,
10305
+ visible,
10306
+ destroyOnHide
10307
+ } = this;
10308
+ if (destroyOnHide.value && !visible) {
10294
10309
  return null;
10310
+ }
10311
+ const visibleVal = visible ? "visible" : "hidden";
10295
10312
  return createVNode(Teleport, {
10296
10313
  "to": "body"
10297
10314
  }, {
10298
- default: () => [createVNode(DrawerBody, null, {
10299
- default: () => [this.slots.header ? this.slots.header() : createVNode(DrawerHeader, {
10300
- "onToggleFullScreen": fullScreenEvent,
10315
+ default: () => [createVNode(DrawerBody, {
10316
+ "style": {
10317
+ visibility: visibleVal
10318
+ }
10319
+ }, {
10320
+ default: () => [this.slots.header ? this.slots.header({
10321
+ fullscreen: fullscreen2,
10322
+ closeDrawer
10323
+ }) : createVNode(DrawerHeader, {
10324
+ "onToggleFullScreen": fullscreen2,
10301
10325
  "onClose": closeDrawer
10302
- }, null), this.slots.default ? this.slots.default() : createVNode(DrawerContainer, null, null)]
10326
+ }, null), this.slots.content ? this.slots.content() : createVNode(DrawerContainer, null, null)]
10303
10327
  })]
10304
10328
  });
10305
10329
  }
10306
10330
  });
10307
- Drawer.install = function(app) {
10308
- app.component(Drawer.name, Drawer);
10331
+ function createDrawerApp(props, drawer, el) {
10332
+ if (drawer) {
10333
+ return drawer;
10334
+ }
10335
+ const res = createApp(createVNode(Drawer$1, {
10336
+ "visible": props.visible,
10337
+ "onUpdate:visible": ($event) => props.visible = $event
10338
+ }, {
10339
+ header: props.header,
10340
+ content: props.content
10341
+ }));
10342
+ res.mount(el);
10343
+ return res;
10344
+ }
10345
+ class DrawerService {
10346
+ static create(props, drawer) {
10347
+ if (!drawer) {
10348
+ drawer = new Drawer(props);
10349
+ }
10350
+ return drawer;
10351
+ }
10352
+ }
10353
+ class Drawer {
10354
+ constructor(props) {
10355
+ __publicField(this, "drawer", null);
10356
+ __publicField(this, "div", null);
10357
+ __publicField(this, "props", null);
10358
+ __publicField(this, "hide", async () => {
10359
+ var _a;
10360
+ const beforeHidden = this.props.beforeHidden;
10361
+ let result2 = (_a = typeof beforeHidden === "function" ? beforeHidden() : beforeHidden) != null ? _a : false;
10362
+ if (result2 instanceof Promise) {
10363
+ result2 = await result2;
10364
+ }
10365
+ if (!result2)
10366
+ this.hideDirectly();
10367
+ });
10368
+ __publicField(this, "hideDirectly", () => {
10369
+ this.drawer._instance.props.visible = false;
10370
+ });
10371
+ __publicField(this, "destroy", () => {
10372
+ if (this.drawer) {
10373
+ this.drawer.unmount();
10374
+ this.drawer = null;
10375
+ this.div.remove();
10376
+ }
10377
+ });
10378
+ this.props = props;
10379
+ }
10380
+ show() {
10381
+ if (!this.drawer) {
10382
+ this.div = document.createElement("div");
10383
+ this.drawer = createDrawerApp(this.props, this.drawer, this.div);
10384
+ }
10385
+ this.drawer._instance.props.visible = true;
10386
+ }
10387
+ }
10388
+ Drawer$1.install = function(app) {
10389
+ app.component(Drawer$1.name, Drawer$1);
10309
10390
  };
10310
10391
  var DrawerInstall = {
10311
10392
  title: "Drawer \u62BD\u5C49\u677F",
10312
10393
  category: "\u53CD\u9988",
10313
- status: "60%",
10394
+ status: "75%",
10314
10395
  install(app) {
10315
- app.use(Drawer);
10396
+ app.use(Drawer$1);
10316
10397
  app.config.globalProperties.$drawerService = DrawerService;
10317
10398
  }
10318
10399
  };
@@ -23380,140 +23461,94 @@ const tooltipProps = {
23380
23461
  default: "100"
23381
23462
  }
23382
23463
  };
23383
- const EventListener = {
23384
- listen: function(target, eventType, callback) {
23385
- if (target.addEventListener) {
23386
- target.addEventListener(eventType, callback, false);
23387
- return {
23388
- remove() {
23389
- target.removeEventListener(target, callback, false);
23390
- }
23391
- };
23392
- } else {
23393
- target.attchEvent(eventType, callback);
23394
- return {
23395
- remove() {
23396
- target.detachEvent(eventType, callback);
23397
- }
23398
- };
23399
- }
23400
- }
23401
- };
23402
23464
  var tooltip = "";
23403
23465
  var DTooltip = defineComponent$1({
23404
23466
  name: "DTooltip",
23405
23467
  props: tooltipProps,
23406
- setup(props, ctx2) {
23468
+ setup(props) {
23407
23469
  const position = reactive({
23408
23470
  left: 0,
23409
23471
  top: 0
23410
23472
  });
23411
- const show = ref(false);
23412
- const slotElement = ref(null);
23413
- const tooltip2 = ref(null);
23414
- const arrow = ref(null);
23415
- const tooltipcontent = ref(null);
23416
- let enterEvent;
23417
- let leaveEvent;
23418
23473
  const arrowStyle = (attr, value) => {
23419
- arrow.value.style[attr] = value;
23420
- };
23421
- const delayShowTrue = function(fn, delay = props.mouseEnterDelay) {
23422
- let start;
23423
- if (parseInt(delay) >= 0) {
23424
- return function() {
23425
- if (start) {
23426
- clearTimeout(start);
23427
- }
23428
- start = setTimeout(fn, parseInt(delay));
23429
- };
23430
- } else {
23431
- console.error("the value of delay is bigger than 0 and the type of delay must be string!");
23432
- return;
23433
- }
23474
+ document.getElementById("devui-arrow").style[attr] = value;
23434
23475
  };
23476
+ const slotElement = ref(null);
23435
23477
  onMounted(() => {
23436
- if (!show.value) {
23437
- tooltip2.value.style.opacity = "0";
23438
- }
23439
- enterEvent = EventListener.listen(slotElement.value.children[0], "mouseenter", delayShowTrue(function() {
23440
- show.value = true;
23441
- }, props.mouseEnterDelay));
23442
- leaveEvent = EventListener.listen(slotElement.value.children[0], "mouseleave", function() {
23443
- if (show.value) {
23444
- setTimeout(function() {
23445
- show.value = false;
23446
- }, props.mouseLeaveDelay);
23447
- }
23448
- });
23449
- });
23450
- watch(show, function(newValue, oldValue) {
23451
- if (newValue) {
23452
- tooltip2.value.style.opacity = "1";
23453
- tooltip2.value.style.zIndex = "999";
23454
- arrow.value.style.border = "5px solid transparent";
23455
- switch (props.position) {
23456
- case "top":
23457
- position.left = slotElement.value.children[0].offsetLeft - tooltip2.value.offsetWidth / 2 + slotElement.value.children[0].offsetWidth / 2 - 5;
23458
- position.top = slotElement.value.children[0].offsetTop - 10 - tooltipcontent.value.offsetHeight;
23459
- arrowStyle("borderTop", "5px solid rgb(70, 77, 110)");
23460
- arrow.value.style.top = `${tooltipcontent.value.offsetHeight}px`;
23461
- arrow.value.style.left = `${tooltipcontent.value.offsetWidth / 2 + 5}px`;
23462
- break;
23463
- case "right":
23464
- position.left = slotElement.value.children[0].offsetLeft + slotElement.value.children[0].offsetWidth;
23465
- position.top = slotElement.value.children[0].offsetTop + slotElement.value.children[0].offsetHeight / 2 - tooltipcontent.value.offsetHeight / 2;
23466
- arrowStyle("borderRight", "5px solid rgb(70, 77, 110)");
23467
- arrow.value.style.top = `${tooltipcontent.value.offsetHeight / 2 - 5}px`;
23468
- arrow.value.style.left = "-0px";
23469
- break;
23470
- case "bottom":
23471
- position.top = slotElement.value.children[0].offsetHeight + slotElement.value.children[0].offsetTop + 10;
23472
- position.left = slotElement.value.children[0].offsetLeft + slotElement.value.children[0].offsetWidth / 2 - tooltipcontent.value.offsetWidth / 2 - 5;
23473
- arrowStyle("borderBottom", "5px solid rgb(70, 77, 110)");
23474
- arrow.value.style.top = "-10px";
23475
- arrow.value.style.left = `${tooltipcontent.value.offsetWidth / 2 + 5}px`;
23476
- break;
23477
- case "left":
23478
- position.top = slotElement.value.children[0].offsetTop + slotElement.value.children[0].offsetHeight / 2 - tooltipcontent.value.offsetHeight / 2;
23479
- position.left = slotElement.value.children[0].offsetLeft - 20 - tooltipcontent.value.offsetWidth;
23480
- arrowStyle("borderLeft", "5px solid rgb(70, 77, 110)");
23481
- arrow.value.style.left = `${tooltipcontent.value.offsetWidth + 10}px`;
23482
- arrow.value.style.top = `${tooltipcontent.value.offsetHeight / 2 - 5}px`;
23483
- break;
23484
- default:
23485
- console.error("The attribute position value is wrong, the value is one of top\u3001right\u3001left\u3001bottom");
23486
- break;
23487
- }
23488
- tooltip2.value.style.top = position.top + "px";
23489
- tooltip2.value.style.left = position.left + "px";
23490
- } else {
23491
- position.top = 0;
23492
- position.left = 0;
23493
- tooltip2.value.style.opacity = "0";
23494
- }
23478
+ slotElement.value.children[0].onmouseenter = function() {
23479
+ const tooltip2 = document.createElement("div");
23480
+ const arrow = document.createElement("div");
23481
+ const tooltipcontent = document.createElement("div");
23482
+ tooltip2.classList.add("tooltip");
23483
+ arrow.classList.add("arrow");
23484
+ tooltipcontent.classList.add("tooltipcontent");
23485
+ arrow.id = "devui-arrow";
23486
+ tooltip2.id = "devui-tooltip1";
23487
+ setTimeout(() => {
23488
+ document.getElementById("devui-tooltip").appendChild(tooltip2);
23489
+ tooltip2.appendChild(arrow);
23490
+ tooltip2.appendChild(tooltipcontent);
23491
+ tooltipcontent.innerHTML = props.content;
23492
+ tooltip2.style.opacity = "1";
23493
+ tooltip2.style.zIndex = "999";
23494
+ arrow.style.border = "5px solid transparent";
23495
+ switch (props.position) {
23496
+ case "top":
23497
+ position.left = slotElement.value.children[0].offsetLeft - tooltip2.offsetWidth / 2 + slotElement.value.children[0].offsetWidth / 2 - 5;
23498
+ position.top = slotElement.value.children[0].offsetTop - 10 - tooltipcontent.offsetHeight;
23499
+ arrow.style.top = `${tooltipcontent.offsetHeight}px`;
23500
+ arrow.style.left = `${tooltipcontent.offsetWidth / 2 + 5}px`;
23501
+ arrow.style.borderTop = "5px solid rgb(70, 77, 110)";
23502
+ break;
23503
+ case "bottom":
23504
+ position.top = slotElement.value.children[0].offsetHeight + slotElement.value.children[0].offsetTop + 10;
23505
+ position.left = slotElement.value.children[0].offsetLeft + slotElement.value.children[0].offsetWidth / 2 - tooltipcontent.offsetWidth / 2 - 5;
23506
+ arrowStyle("borderBottom", "5px solid rgb(70, 77, 110)");
23507
+ arrow.style.top = "-10px";
23508
+ arrow.style.left = `${tooltipcontent.offsetWidth / 2 + 5}px`;
23509
+ arrow.style.borderBottom = "5px solid rgb(70, 77, 110)";
23510
+ break;
23511
+ case "left":
23512
+ position.top = slotElement.value.children[0].offsetTop + slotElement.value.children[0].offsetHeight / 2 - tooltipcontent.offsetHeight / 2;
23513
+ position.left = slotElement.value.children[0].offsetLeft - 20 - tooltipcontent.offsetWidth;
23514
+ arrowStyle("borderLeft", "5px solid rgb(70, 77, 110)");
23515
+ arrow.style.left = `${tooltipcontent.offsetWidth + 10}px`;
23516
+ arrow.style.top = `${tooltipcontent.offsetHeight / 2 - 5}px`;
23517
+ arrow.style.borderLeft = "5px solid rgb(70, 77, 110)";
23518
+ break;
23519
+ case "right":
23520
+ position.left = slotElement.value.children[0].offsetLeft + slotElement.value.children[0].offsetWidth;
23521
+ position.top = slotElement.value.children[0].offsetTop + slotElement.value.children[0].offsetHeight / 2 - tooltipcontent.offsetHeight / 2;
23522
+ arrowStyle("borderRight", "5px solid rgb(70, 77, 110)");
23523
+ arrow.style.top = `${tooltipcontent.offsetHeight / 2 - 5}px`;
23524
+ arrow.style.left = "-0px";
23525
+ arrow.style.borderRight = "5px solid rgb(70, 77, 110)";
23526
+ break;
23527
+ }
23528
+ tooltip2.style.top = position.top + 5 + "px";
23529
+ tooltip2.style.left = position.left + "px";
23530
+ }, props.mouseEnterDelay);
23531
+ };
23532
+ slotElement.value.children[0].onmouseleave = function() {
23533
+ setTimeout(() => {
23534
+ document.getElementById("devui-tooltip1").removeChild(document.getElementById("devui-arrow"));
23535
+ document.getElementById("devui-tooltip").removeChild(document.getElementById("devui-tooltip1"));
23536
+ }, props.mouseLeaveDelay);
23537
+ };
23495
23538
  });
23496
23539
  onBeforeUnmount(() => {
23497
- enterEvent.remove();
23498
- leaveEvent.remove();
23540
+ slotElement.value.children[0].onmouseenter = null;
23541
+ slotElement.value.children[0].onmouseleave = null;
23499
23542
  });
23500
23543
  return () => {
23501
23544
  const defaultSlot = renderSlot(useSlots(), "default");
23502
23545
  return createVNode("div", {
23503
- "class": "devui-tooltip"
23546
+ "class": "devui-tooltip",
23547
+ "id": "devui-tooltip"
23504
23548
  }, [createVNode("div", {
23505
23549
  "class": "slotElement",
23506
23550
  "ref": slotElement
23507
- }, [defaultSlot]), createVNode("div", {
23508
- "class": "tooltip",
23509
- "ref": tooltip2
23510
- }, [createVNode("div", {
23511
- "class": "arrow",
23512
- "ref": arrow
23513
- }, null), createVNode("div", {
23514
- "class": "tooltipcontent",
23515
- "ref": tooltipcontent
23516
- }, [props.content])])]);
23551
+ }, [defaultSlot])]);
23517
23552
  };
23518
23553
  }
23519
23554
  });
@@ -25773,8 +25808,8 @@ const tagProps = {
25773
25808
  };
25774
25809
  function useClass(props) {
25775
25810
  return computed(() => {
25776
- const { type: type4, color: color2 } = props;
25777
- return `devui-tag devui-tag-${type4 || (color2 ? "colorful" : "") || "default"}`;
25811
+ const { type: type4, color: color2, deletable } = props;
25812
+ return `devui-tag devui-tag-${type4 || (color2 ? "colorful" : "") || "default"} ${deletable ? "devui-tag-deletable" : ""}`;
25778
25813
  });
25779
25814
  }
25780
25815
  function useColor(props) {
@@ -30349,4 +30384,4 @@ var vueDevui = {
30349
30384
  installs.forEach((p) => app.use(p));
30350
30385
  }
30351
30386
  };
30352
- export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer, DrawerService, Dropdown, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header, Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Pagination, Panel, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea, TimeAxis, TimeAxisItem, TimePicker, Toast, ToastService, DTooltip as Tooltip, Transfer, Tree, TreeSelect, Upload, vueDevui as default };
30387
+ export { Accordion, Alert, Anchor, Aside, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, DButton as Button, Card, Carousel, CarouselItem, Cascader, Checkbox, Col, ColorPicker, Column, Comment, Content, Countdown, DatePicker, DraggableDirective, Drawer$1 as Drawer, DrawerService, Dropdown, DroppableDirective, EditableSelect, FixedOverlay, FlexibleOverlay, Footer, Form, FormControl, FormItem, FormLabel, FormOperation, Fullscreen, Gantt, Header, Icon, ImagePreviewDirective, ImagePreviewService, DInput as Input, InputIcon, InputNumber, Layout, loadingDirective as Loading, loading as LoadingService, Modal, NavSprite, Pagination, Panel, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, Rate, ReadTip, Result, RippleDirective, Row, DSearch as Search, Select, Skeleton, SkeletonItem, Slider, SortableDirective, Splitter, Statistic, Status, StepsGuide, StickSlider, Sticky, Switch, Table, Tabs, Tag, TagInput, Textarea, TimeAxis, TimeAxisItem, TimePicker, Toast, ToastService, DTooltip as Tooltip, Transfer, Tree, TreeSelect, Upload, vueDevui as default };