boka-human-cliend-v3 0.0.36 → 0.0.38

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.
@@ -491,6 +491,11 @@
491
491
  max-width: 100vw!important;
492
492
  height: 100vh!important;
493
493
  max-height: 100vh!important;
494
+ position: fixed;
495
+ top: 0;
496
+ left: 0;
497
+ z-index: 999;
498
+ overflow: hidden;
494
499
  }
495
500
  .humanMainView .humanMainHeader {
496
501
  width: 100%;
@@ -504,6 +509,7 @@
504
509
  z-index: 999;
505
510
  background: #fff;
506
511
  white-space: nowrap;
512
+ user-select: none;
507
513
  }
508
514
  .humanMainView .humanMainHeader .humanMainHeaderRight {
509
515
  text-align: right;
@@ -5204,6 +5204,14 @@
5204
5204
  fullScreen: {
5205
5205
  type: [Boolean, Number],
5206
5206
  default: 0
5207
+ },
5208
+ hideIcon: {
5209
+ type: Boolean,
5210
+ default: false
5211
+ },
5212
+ viewTitle: {
5213
+ type: String,
5214
+ default: "客服"
5207
5215
  }
5208
5216
  },
5209
5217
  computed: {
@@ -5232,8 +5240,13 @@
5232
5240
  console.log(`%c 客服组件属性 `, "background: #f00; color: #fff; padding: 2px 2px; border-radius: 3px;");
5233
5241
  console.log(this.$props);
5234
5242
  setTimeout(() => {
5235
- this.icon();
5236
- this.chatMainInitDrag();
5243
+ if (!this.hideIcon) {
5244
+ this.icon();
5245
+ this.visible = true;
5246
+ }
5247
+ if (!this.fullScreen) {
5248
+ this.chatMainInitDrag();
5249
+ }
5237
5250
  });
5238
5251
  window.humanFunction = {
5239
5252
  showChatView: this.showChat
@@ -5389,15 +5402,17 @@
5389
5402
  };
5390
5403
  const _hoisted_1 = { class: "boka-human-v2" };
5391
5404
  const _hoisted_2 = { class: "humanMainHeader my-dialog__header" };
5392
- const _hoisted_3 = { class: "humanMainHeaderRight" };
5393
- const _hoisted_4 = ["src"];
5405
+ const _hoisted_3 = { class: "humanMainHeaderCenter" };
5406
+ const _hoisted_4 = { class: "humanMainHeaderRight" };
5407
+ const _hoisted_5 = ["src"];
5394
5408
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
5395
5409
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
5396
- _cache[7] || (_cache[7] = vue.createElementVNode("div", {
5410
+ _cache[6] || (_cache[6] = vue.createElementVNode("div", {
5397
5411
  id: "humanViewOuter",
5398
5412
  style: { "position": "fixed", "width": "100vw", "height": "100vh", "top": "0", "left": "0", "display": "none" }
5399
5413
  }, null, -1)),
5400
- vue.createElementVNode("div", {
5414
+ !$props.hideIcon ? (vue.openBlock(), vue.createElementBlock("div", {
5415
+ key: 0,
5401
5416
  class: vue.normalizeClass(["humanEnterIcon", [$data.unreadCount > 0 ? "unreadCount" : ""]]),
5402
5417
  id: "humanEnterIcon"
5403
5418
  }, [
@@ -5411,15 +5426,16 @@
5411
5426
  key: 1,
5412
5427
  onClick: _cache[1] || (_cache[1] = (...args) => $options.changeChatViewVisible && $options.changeChatViewVisible(...args))
5413
5428
  }, vue.toDisplayString($data.unreadCount > 99 ? "99+" : $data.unreadCount), 1))
5414
- ], 2),
5429
+ ], 2)) : vue.createCommentVNode("", true),
5415
5430
  vue.withDirectives(vue.createElementVNode("div", {
5416
5431
  class: vue.normalizeClass(["humanMainView", $props.fullScreen ? "full" : ""])
5417
5432
  }, [
5418
5433
  vue.createElementVNode("div", _hoisted_2, [
5419
5434
  _cache[5] || (_cache[5] = vue.createElementVNode("div", { class: "humanMainHeaderLeft" }, null, -1)),
5420
- _cache[6] || (_cache[6] = vue.createElementVNode("div", { class: "humanMainHeaderCenter" }, "客服", -1)),
5421
- vue.createElementVNode("div", _hoisted_3, [
5422
- vue.createElementVNode("span", {
5435
+ vue.createElementVNode("div", _hoisted_3, vue.toDisplayString($props.viewTitle || "客服"), 1),
5436
+ vue.createElementVNode("div", _hoisted_4, [
5437
+ !$props.hideIcon ? (vue.openBlock(), vue.createElementBlock("span", {
5438
+ key: 0,
5423
5439
  onClick: _cache[2] || (_cache[2] = ($event) => $data.visible = false),
5424
5440
  onTouchstart: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $data.visible = false, ["stop"]))
5425
5441
  }, [..._cache[4] || (_cache[4] = [
@@ -5428,7 +5444,7 @@
5428
5444
  alt: "",
5429
5445
  style: { "width": "14px" }
5430
5446
  }, null, -1)
5431
- ])], 32)
5447
+ ])], 32)) : vue.createCommentVNode("", true)
5432
5448
  ])
5433
5449
  ]),
5434
5450
  vue.createElementVNode("iframe", {
@@ -5436,7 +5452,7 @@
5436
5452
  src: $options.src,
5437
5453
  frameborder: "0",
5438
5454
  allowfullscreen: ""
5439
- }, null, 8, _hoisted_4)
5455
+ }, null, 8, _hoisted_5)
5440
5456
  ], 2), [
5441
5457
  [vue.vShow, $data.visible]
5442
5458
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boka-human-cliend-v3",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "main": "dist/boka-human-v3.umd.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
package/src/demo/App.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="app">
3
- <BokaHuman :token="'4e9d58f42ceab334b3b24d31ec437bef'" :product="'web'" :cust-type="''" :sub-cust-type="''" source="bkWeb-PC" :full-screen="0"/>
3
+ <BokaHuman :token="'707a38d6c7d2e9ea8ce126f40884986'" :product="'web'" :cust-type="''" :sub-cust-type="''" source="bkWeb-Mobile" :full-screen="1"/>
4
4
  <div style="height: 200vh; width: 100vw; background: #fff;"></div>
5
5
  </div>
6
6
  </template>