@mingto/mt-ui 1.1.46 → 1.1.48

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/index.es.js CHANGED
@@ -4809,7 +4809,190 @@ var iconfont_default = {
4809
4809
  name: "数字人融合web",
4810
4810
  font_family: "iconfont",
4811
4811
  css_prefix_text: "icon-",
4812
+ description: "",
4812
4813
  glyphs: [
4814
+ {
4815
+ "icon_id": "47727481",
4816
+ "name": "icon-gzjl",
4817
+ "font_class": "icon-gzjl",
4818
+ "unicode": "e608",
4819
+ "unicode_decimal": 58888
4820
+ },
4821
+ {
4822
+ "icon_id": "47727480",
4823
+ "name": "icon-csgc",
4824
+ "font_class": "icon-csgc",
4825
+ "unicode": "e60a",
4826
+ "unicode_decimal": 58890
4827
+ },
4828
+ {
4829
+ "icon_id": "47727479",
4830
+ "name": "icon-gwnl",
4831
+ "font_class": "icon-gwnl",
4832
+ "unicode": "e60b",
4833
+ "unicode_decimal": 58891
4834
+ },
4835
+ {
4836
+ "icon_id": "47601681",
4837
+ "name": "key",
4838
+ "font_class": "key-01",
4839
+ "unicode": "e74f",
4840
+ "unicode_decimal": 59215
4841
+ },
4842
+ {
4843
+ "icon_id": "47480457",
4844
+ "name": "任务对话",
4845
+ "font_class": "renwuduihua",
4846
+ "unicode": "e74e",
4847
+ "unicode_decimal": 59214
4848
+ },
4849
+ {
4850
+ "icon_id": "47478817",
4851
+ "name": "任务循环时间",
4852
+ "font_class": "renwuxunhuanshijian",
4853
+ "unicode": "e74c",
4854
+ "unicode_decimal": 59212
4855
+ },
4856
+ {
4857
+ "icon_id": "47478815",
4858
+ "name": "任务执行时间",
4859
+ "font_class": "renwuzhihangshijian",
4860
+ "unicode": "e74d",
4861
+ "unicode_decimal": 59213
4862
+ },
4863
+ {
4864
+ "icon_id": "47478832",
4865
+ "name": "任务规划",
4866
+ "font_class": "renwuguihua",
4867
+ "unicode": "e749",
4868
+ "unicode_decimal": 59209
4869
+ },
4870
+ {
4871
+ "icon_id": "47478818",
4872
+ "name": "执行记录",
4873
+ "font_class": "zhihangjilu",
4874
+ "unicode": "e74a",
4875
+ "unicode_decimal": 59210
4876
+ },
4877
+ {
4878
+ "icon_id": "47478816",
4879
+ "name": "浏览记录",
4880
+ "font_class": "liulanjilu",
4881
+ "unicode": "e74b",
4882
+ "unicode_decimal": 59211
4883
+ },
4884
+ {
4885
+ "icon_id": "47476167",
4886
+ "name": "沉浸对话",
4887
+ "font_class": "chenjinduihua",
4888
+ "unicode": "e744",
4889
+ "unicode_decimal": 59204
4890
+ },
4891
+ {
4892
+ "icon_id": "47476166",
4893
+ "name": "使用技能",
4894
+ "font_class": "shiyongjineng",
4895
+ "unicode": "e745",
4896
+ "unicode_decimal": 59205
4897
+ },
4898
+ {
4899
+ "icon_id": "47476164",
4900
+ "name": "关闭菜单",
4901
+ "font_class": "guanbicaidan",
4902
+ "unicode": "e746",
4903
+ "unicode_decimal": 59206
4904
+ },
4905
+ {
4906
+ "icon_id": "47476165",
4907
+ "name": "自由浏览",
4908
+ "font_class": "ziyouliulan",
4909
+ "unicode": "e747",
4910
+ "unicode_decimal": 59207
4911
+ },
4912
+ {
4913
+ "icon_id": "47476163",
4914
+ "name": "打开菜单",
4915
+ "font_class": "dakaicaidan",
4916
+ "unicode": "e748",
4917
+ "unicode_decimal": 59208
4918
+ },
4919
+ {
4920
+ "icon_id": "47299703",
4921
+ "name": "空间",
4922
+ "font_class": "kongjian",
4923
+ "unicode": "e73f",
4924
+ "unicode_decimal": 59199
4925
+ },
4926
+ {
4927
+ "icon_id": "47288981",
4928
+ "name": "云主机",
4929
+ "font_class": "yunzhuji1",
4930
+ "unicode": "e742",
4931
+ "unicode_decimal": 59202
4932
+ },
4933
+ {
4934
+ "icon_id": "47234409",
4935
+ "name": "本地部署",
4936
+ "font_class": "bendibushu",
4937
+ "unicode": "e743",
4938
+ "unicode_decimal": 59203
4939
+ },
4940
+ {
4941
+ "icon_id": "47196573",
4942
+ "name": "用户",
4943
+ "font_class": "yonghu",
4944
+ "unicode": "e741",
4945
+ "unicode_decimal": 59201
4946
+ },
4947
+ {
4948
+ "icon_id": "47094946",
4949
+ "name": "gift-01",
4950
+ "font_class": "gift-01",
4951
+ "unicode": "e740",
4952
+ "unicode_decimal": 59200
4953
+ },
4954
+ {
4955
+ "icon_id": "47059841",
4956
+ "name": "算力卡",
4957
+ "font_class": "suanlika",
4958
+ "unicode": "e73e",
4959
+ "unicode_decimal": 59198
4960
+ },
4961
+ {
4962
+ "icon_id": "47051679",
4963
+ "name": "一体机",
4964
+ "font_class": "server-03",
4965
+ "unicode": "e73d",
4966
+ "unicode_decimal": 59197
4967
+ },
4968
+ {
4969
+ "icon_id": "47033552",
4970
+ "name": "搜索",
4971
+ "font_class": "ss-line-black",
4972
+ "unicode": "e73c",
4973
+ "unicode_decimal": 59196
4974
+ },
4975
+ {
4976
+ "icon_id": "47014867",
4977
+ "name": "workbot",
4978
+ "font_class": "workbot",
4979
+ "unicode": "e73b",
4980
+ "unicode_decimal": 59195
4981
+ },
4982
+ {
4983
+ "icon_id": "47014869",
4984
+ "name": "智能体",
4985
+ "font_class": "zhinengti",
4986
+ "unicode": "e67a",
4987
+ "unicode_decimal": 59002
4988
+ },
4989
+ {
4990
+ "icon_id": "47014868",
4991
+ "name": "技能",
4992
+ "font_class": "jineng",
4993
+ "unicode": "e73a",
4994
+ "unicode_decimal": 59194
4995
+ },
4813
4996
  {
4814
4997
  "icon_id": "46995621",
4815
4998
  "name": "播放",
@@ -6686,13 +6869,6 @@ var iconfont_default = {
6686
6869
  "unicode": "e679",
6687
6870
  "unicode_decimal": 59001
6688
6871
  },
6689
- {
6690
- "icon_id": "39830017",
6691
- "name": "general_gray_research",
6692
- "font_class": "general_gray_research",
6693
- "unicode": "e67a",
6694
- "unicode_decimal": 59002
6695
- },
6696
6872
  {
6697
6873
  "icon_id": "39830018",
6698
6874
  "name": "general_bold_video",
@@ -7055,10 +7231,12 @@ var MtImage = withInstall$1(/* @__PURE__ */ defineComponent({
7055
7231
  return [ns.b()];
7056
7232
  });
7057
7233
  const imageStyles = computed(() => {
7058
- return {
7059
- width: props.width ? convertValueToViewportWidth(props.width) : void 0,
7060
- height: props.height ? convertValueToViewportWidth(props.height) : void 0
7061
- };
7234
+ const styles = {};
7235
+ Object.assign(styles, ns.cssVarBlock({
7236
+ ...props.width ? { width: convertValueToViewportWidth(props.width) } : {},
7237
+ ...props.height ? { height: convertValueToViewportWidth(props.height) } : {}
7238
+ }));
7239
+ return styles;
7062
7240
  });
7063
7241
  const hasLoadError = ref(false);
7064
7242
  const isLoading = ref(true);
@@ -10141,8 +10319,12 @@ var MtPopover = withInstall$1(/* @__PURE__ */ defineComponent({
10141
10319
  */
10142
10320
  var posterComponent = defineComponent({
10143
10321
  inheritAttrs: false,
10322
+ props: { dialogEvents: {
10323
+ type: Object,
10324
+ default: () => ({})
10325
+ } },
10144
10326
  emits: ["close"],
10145
- setup(_props, { slots, emit, attrs, expose }) {
10327
+ setup(props, { slots, emit, attrs, expose }) {
10146
10328
  /**
10147
10329
  * 控制弹窗显示状态的响应式变量。
10148
10330
  */
@@ -10174,6 +10356,7 @@ var posterComponent = defineComponent({
10174
10356
  return () => createVNode(MtDialog, {
10175
10357
  modelValue: visible.value,
10176
10358
  ...attrs,
10359
+ ...props.dialogEvents,
10177
10360
  "onUpdate:modelValue": handleUpdateModelValue,
10178
10361
  "onClosed": handleClosed,
10179
10362
  "ref": dialogRef
@@ -10229,10 +10412,14 @@ function Poster(options) {
10229
10412
  /**
10230
10413
  * 合并弹窗组件的事件处理函数。
10231
10414
  */
10232
- const dialogEvents = { onClose() {
10233
- options?.events?.onClose?.();
10234
- render(null, container);
10235
- } };
10415
+ const dialogEvents = {
10416
+ ...options.dialogEvents,
10417
+ onClose() {
10418
+ options.dialogEvents?.onClose?.();
10419
+ options?.events?.onClose?.();
10420
+ render(null, container);
10421
+ }
10422
+ };
10236
10423
  document.body.appendChild(container);
10237
10424
  /**
10238
10425
  * 动态加载内容组件并渲染弹窗。
@@ -10245,7 +10432,7 @@ function Poster(options) {
10245
10432
  });
10246
10433
  dialogVNode = createVNode(posterComponent, {
10247
10434
  ...dialogProps,
10248
- ...dialogEvents
10435
+ dialogEvents
10249
10436
  }, { default: () => contentVNode });
10250
10437
  render(dialogVNode, container);
10251
10438
  });
@@ -10356,7 +10543,7 @@ var MtProgress = withInstall$1(/* @__PURE__ */ defineComponent({
10356
10543
  });
10357
10544
  const progressStyles = computed(() => {
10358
10545
  const styles = {};
10359
- styles.height = convertValueToViewportWidth(props.strokeWidth);
10546
+ Object.assign(styles, ns.cssVarBlock({ height: convertValueToViewportWidth(props.strokeWidth) }));
10360
10547
  return styles;
10361
10548
  });
10362
10549
  const innerStyles = computed(() => {
@@ -10369,8 +10556,10 @@ var MtProgress = withInstall$1(/* @__PURE__ */ defineComponent({
10369
10556
  });
10370
10557
  const circleStyles = computed(() => {
10371
10558
  const styles = {};
10372
- styles.width = convertValueToViewportWidth(props.width);
10373
- styles.height = convertValueToViewportWidth(props.width);
10559
+ Object.assign(styles, ns.cssVarBlock({
10560
+ width: convertValueToViewportWidth(props.width),
10561
+ height: convertValueToViewportWidth(props.width)
10562
+ }));
10374
10563
  return styles;
10375
10564
  });
10376
10565
  const content = computed(() => {
@@ -19338,8 +19527,7 @@ var MtTabs = withInstall$1(/* @__PURE__ */ defineComponent({
19338
19527
  const emits = __emit;
19339
19528
  const ns = useNamespace("tabs");
19340
19529
  const tabsRef = ref();
19341
- const barStyles = ref({});
19342
- const lineStyles = ref({});
19530
+ const mounted = ref(false);
19343
19531
  const currentTabName = computed({
19344
19532
  get() {
19345
19533
  return props.modelValue;
@@ -19354,50 +19542,40 @@ var MtTabs = withInstall$1(/* @__PURE__ */ defineComponent({
19354
19542
  onChange,
19355
19543
  type: props.type
19356
19544
  });
19357
- function getActiveTabElement() {
19358
- if (!tabsRef.value) return null;
19359
- for (let index = 0; index < children.length; index++) {
19360
- const child = children[index];
19361
- if (!child.exposed || !isTabContext(child.exposed) || !child.exposed.isActive.value) continue;
19362
- return tabsRef.value.querySelector(`#tab-${index}`);
19363
- }
19364
- return null;
19365
- }
19366
- async function updateActiveStyles() {
19367
- await nextTick();
19368
- const $el = getActiveTabElement();
19369
- if (!$el) {
19370
- barStyles.value = {};
19371
- lineStyles.value = {};
19372
- return;
19373
- }
19374
- barStyles.value = {
19375
- width: `${$el.clientWidth}px`,
19376
- left: `${$el.offsetLeft}px`
19377
- };
19545
+ const barStyles = computed(() => {
19378
19546
  const styles = {};
19379
- const tabStyles = window.getComputedStyle($el);
19380
- styles.width = `${$el.clientWidth - beParsedAsNumber(tabStyles.paddingLeft) - beParsedAsNumber(tabStyles.paddingRight)}px`;
19381
- styles.left = `${$el.offsetLeft + beParsedAsNumber(tabStyles.paddingLeft)}px`;
19382
- lineStyles.value = styles;
19383
- }
19547
+ if (tabsRef.value) children.forEach((child, index) => {
19548
+ const $el = tabsRef.value.querySelector(`#tab-${index}`);
19549
+ if (!$el) return;
19550
+ if (!child.exposed || !isTabContext(child.exposed) || !unref(child.exposed.isActive)) return;
19551
+ styles.width = `${$el.clientWidth}px`;
19552
+ styles.left = `${$el.offsetLeft}px`;
19553
+ });
19554
+ return styles;
19555
+ });
19556
+ const lineStyles = computed(() => {
19557
+ const styles = {};
19558
+ if (tabsRef.value) children.forEach((child, index) => {
19559
+ const $el = tabsRef.value.querySelector(`#tab-${index}`);
19560
+ if (!$el) return;
19561
+ if (!child.exposed || !isTabContext(child.exposed) || !unref(child.exposed.isActive)) return;
19562
+ const tabStyles = window.getComputedStyle($el);
19563
+ const paddingLeft = beParsedAsNumber(tabStyles.paddingLeft);
19564
+ const paddingRight = beParsedAsNumber(tabStyles.paddingRight);
19565
+ styles.width = `${Math.max($el.clientWidth - paddingLeft - paddingRight, 0)}px`;
19566
+ styles.left = `${$el.offsetLeft + paddingLeft}px`;
19567
+ });
19568
+ return styles;
19569
+ });
19384
19570
  const tabsClasses = computed(() => {
19385
19571
  return [ns.b(), ns.m(props.type)];
19386
19572
  });
19387
19573
  function onChange(tabName) {
19388
19574
  currentTabName.value = tabName;
19389
19575
  }
19390
- watch(() => [
19391
- currentTabName.value,
19392
- children.length,
19393
- props.type
19394
- ], updateActiveStyles, { flush: "post" });
19395
- onMounted(() => {
19396
- updateActiveStyles();
19397
- window.addEventListener("resize", updateActiveStyles);
19398
- });
19399
- onBeforeUnmount(() => {
19400
- window.removeEventListener("resize", updateActiveStyles);
19576
+ onMounted(async () => {
19577
+ await nextTick();
19578
+ mounted.value = true;
19401
19579
  });
19402
19580
  return (_ctx, _cache) => {
19403
19581
  return openBlock(), createElementBlock("div", {
@@ -19410,12 +19588,12 @@ var MtTabs = withInstall$1(/* @__PURE__ */ defineComponent({
19410
19588
  class: normalizeClass(unref(ns).e("active-bar")),
19411
19589
  style: normalizeStyle(barStyles.value)
19412
19590
  }, null, 6)) : createCommentVNode("", true),
19413
- props.type === "line" ? (openBlock(), createElementBlock("div", {
19591
+ renderSlot(_ctx.$slots, "default"),
19592
+ props.type === "line" ? (openBlock(), createElementBlock("span", {
19414
19593
  key: 1,
19415
19594
  class: normalizeClass(unref(ns).e("active-line")),
19416
19595
  style: normalizeStyle(lineStyles.value)
19417
- }, null, 6)) : createCommentVNode("", true),
19418
- renderSlot(_ctx.$slots, "default")
19596
+ }, null, 6)) : createCommentVNode("", true)
19419
19597
  ], 2);
19420
19598
  };
19421
19599
  }
@@ -19562,6 +19740,12 @@ var MtTooltip = withInstall$1(/* @__PURE__ */ defineComponent({
19562
19740
  disabled: props.disabled,
19563
19741
  visible: props.visible,
19564
19742
  offset: props.offset,
19743
+ "show-arrow": props["visible-arrow"],
19744
+ "popper-options": props["popper-options"],
19745
+ "show-after": props["show-after"],
19746
+ "hide-after": props["hide-after"],
19747
+ "auto-close": props["auto-close"],
19748
+ "popper-class": props["popper-class"],
19565
19749
  enterable: props.enterable,
19566
19750
  "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => emits("update:visible", $event))
19567
19751
  }), createSlots({ _: 2 }, [unref(slots).default ? {
@@ -19581,6 +19765,12 @@ var MtTooltip = withInstall$1(/* @__PURE__ */ defineComponent({
19581
19765
  "disabled",
19582
19766
  "visible",
19583
19767
  "offset",
19768
+ "show-arrow",
19769
+ "popper-options",
19770
+ "show-after",
19771
+ "hide-after",
19772
+ "auto-close",
19773
+ "popper-class",
19584
19774
  "enterable"
19585
19775
  ]);
19586
19776
  };