@atooyu/uxto-ui 1.1.16 → 1.1.18

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.js CHANGED
@@ -504,6 +504,7 @@ const clipboard = "data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns
504
504
  const location = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%3e%3cpath%20d='M12%202C8.13%202%205%205.13%205%209c0%205.25%207%2013%207%2013s7-7.75%207-13c0-3.87-3.13-7-7-7zm0%209.5c-1.38%200-2.5-1.12-2.5-2.5s1.12-2.5%202.5-2.5%202.5%201.12%202.5%202.5-1.12%202.5-2.5%202.5z'/%3e%3c/svg%3e";
505
505
  const scan = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%3e%3cpath%20d='M3%2011h8V3H3v8zm2-6h4v4H5V5zm8-2v8h8V3h-8zm6%206h-4V5h4v4zM3%2021h8v-8H3v8zm2-6h4v4H5v-4zm13-2h-2v3h-3v2h3v3h2v-3h3v-2h-3v-3z'/%3e%3c/svg%3e";
506
506
  const qrcode = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%3e%3cpath%20d='M3%203h6v6H3V3zm2%202v2h2V5H5zm8-2h6v6h-6V3zm2%202v2h2V5h-2zM3%2013h6v6H3v-6zm2%202v2h2v-2H5zm13-2h3v2h-3v-2zm-3%200h2v4h-2v-4zm-2%202h2v2h-2v-2zm2%202h3v2h-3v-2zm3%202h2v2h-2v-2zm-5%200h2v2h-2v-2z'/%3e%3c/svg%3e";
507
+ const moon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%3e%3cpath%20d='M12%203a9%209%200%20109%209c0-.46-.04-.92-.1-1.36a5.389%205.389%200%2001-4.4%202.26%205.403%205.403%200%2001-3.14-9.8c-.44-.06-.9-.1-1.36-.1z'/%3e%3c/svg%3e";
507
508
  const icons = {
508
509
  // 箭头类
509
510
  "arrow-down": arrowDown,
@@ -559,6 +560,7 @@ const icons = {
559
560
  "like-o": likeO,
560
561
  "share": share,
561
562
  "qrcode": qrcode,
563
+ "moon": moon,
562
564
  // 用户类
563
565
  "user": user,
564
566
  "user-fill": userFill,
@@ -844,15 +846,16 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
844
846
  const props = __props;
845
847
  const emit = __emit;
846
848
  const nodeSize = vue.computed(() => Math.round(props.size * 0.8));
849
+ const switchWidth = vue.computed(() => Math.round(props.size * 1.67));
847
850
  const switchStyle = vue.computed(() => ({
848
- width: `${Math.round(props.size * 1.67)}px`,
851
+ width: `${switchWidth.value}px`,
849
852
  height: `${props.size}px`,
850
853
  borderRadius: `${props.size / 2}px`
851
854
  }));
852
855
  const nodeStyle = vue.computed(() => {
853
856
  const node = nodeSize.value;
854
857
  const gap = Math.round((props.size - node) / 2);
855
- const translateX = props.modelValue ? props.size - node - gap * 2 : 0;
858
+ const translateX = props.modelValue ? switchWidth.value - node - gap * 2 : 0;
856
859
  return {
857
860
  width: `${node}px`,
858
861
  height: `${node}px`,
@@ -861,7 +864,8 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
861
864
  transform: `translateX(${translateX}px)`
862
865
  };
863
866
  });
864
- const handleClick = () => {
867
+ const handleClick = (e) => {
868
+ e.stopPropagation();
865
869
  if (props.disabled || props.loading) return;
866
870
  const newValue = !props.modelValue;
867
871
  emit("update:modelValue", newValue);
@@ -888,7 +892,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
888
892
  };
889
893
  }
890
894
  });
891
- const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-c9caea3a"]]);
895
+ const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ea7de305"]]);
892
896
  const _hoisted_1$y = ["src", "mode", "lazy-load", "fade"];
893
897
  const _hoisted_2$p = {
894
898
  key: 0,