btxui 1.1.22 → 1.1.27

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
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, reactive, onBeforeMount, renderSlot, watch, onMounted, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, getCurrentInstance, resolveDynamicComponent, withModifiers, createElementBlock, nextTick, createVNode, resolveComponent, Fragment, createCommentVNode, watchEffect, withDirectives, toDisplayString, vShow, vModelDynamic, vModelText, mergeProps, createTextVNode, renderList, createSlots, render, KeepAlive, inject, unref, normalizeProps, guardReactiveProps, provide } from "vue";
1
+ import { defineComponent, ref, computed, reactive, onBeforeMount, renderSlot, watch, onMounted, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, getCurrentInstance, resolveDynamicComponent, withModifiers, createElementBlock, nextTick, createVNode, resolveComponent, Fragment, createCommentVNode, watchEffect, withDirectives, toDisplayString, vShow, vModelDynamic, createTextVNode, vModelText, mergeProps, renderList, createSlots, render, KeepAlive, inject, unref, provide, normalizeProps, guardReactiveProps } from "vue";
2
2
  const theme = {
3
3
  // 预置主题色
4
4
  colors: {
@@ -23,6 +23,11 @@ const theme = {
23
23
  };
24
24
  const prestyles = {
25
25
  //预置样式-----------------------------------------------------------------------------------
26
+ // 预置字号
27
+ "lg": `font-size: 1.3rem;`,
28
+ "md": `font-size: 1.15rem;`,
29
+ "sm": `font-size: 1rem;`,
30
+ "xs": `font-size: .85rem;`,
26
31
  // 文本对齐
27
32
  "pcenter": `text-align: center;`,
28
33
  "pright": `text-align: right;`,
@@ -109,6 +114,7 @@ const prestyles = {
109
114
  "bsize-max": `background-size: 100% 100%;`,
110
115
  "bsize-max-h": `background-size: auto 100%;`,
111
116
  "bsize-max-w": `background-size: 100% auto;`,
117
+ "no-rw": `max-width: none;`,
112
118
  // 背景 - 布局 - 九宫格
113
119
  "bpos-1": `background-position: left top;`,
114
120
  "bpos-2": `background-position: center top;`,
@@ -205,6 +211,9 @@ const prestyles = {
205
211
  "ani-mode-backwards": `animation-fill-mode: backwards;`,
206
212
  "ani-mode-both": `animation-fill-mode: both;`,
207
213
  "ani-loop": `animation-timing-function: linear; animation-iteration-count: infinite;`,
214
+ // 鼠标光标
215
+ "cursor-grab": `cursor: grab;`,
216
+ "cursor-grabbing": `cursor: grabbing;`,
208
217
  // 二段赋值-----------------------------------------------------------------------------------
209
218
  // 文字颜色
210
219
  "color": {
@@ -246,6 +255,11 @@ const prestyles = {
246
255
  "grow": {
247
256
  pro: "flex-grow"
248
257
  },
258
+ // 弹性布局项目间距
259
+ "gap": {
260
+ pro: "gap",
261
+ unit: "rem"
262
+ },
249
263
  // 自收缩比率
250
264
  "basis": {
251
265
  pro: "flex-basis"
@@ -825,8 +839,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
825
839
  aniEndClear: { type: Boolean }
826
840
  },
827
841
  emits: ["on_aniEnd"],
828
- setup(__props, { emit }) {
842
+ setup(__props, { emit: __emit }) {
829
843
  const props = __props;
844
+ const emit = __emit;
830
845
  const $el = ref();
831
846
  const state = computed(() => props.state);
832
847
  let lastAni;
@@ -863,10 +878,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
863
878
  });
864
879
  return (_ctx, _cache) => {
865
880
  return openBlock(), createBlock(_sfc_main$y, {
866
- class: normalizeClass(_ctx.class),
867
- cname: _ctx.cname,
868
- states: _ctx.states,
869
- matrix: _ctx.matrix
881
+ class: normalizeClass(__props.class),
882
+ cname: __props.cname,
883
+ states: __props.states,
884
+ matrix: __props.matrix
870
885
  }, {
871
886
  className: withCtx((scope) => [
872
887
  createElementVNode("div", {
@@ -898,14 +913,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
898
913
  setup(__props) {
899
914
  return (_ctx, _cache) => {
900
915
  return openBlock(), createBlock(_sfc_main$y, {
901
- class: normalizeClass(_ctx.class),
902
- states: _ctx.states,
903
- cname: _ctx.cname
916
+ class: normalizeClass(__props.class),
917
+ states: __props.states,
918
+ cname: __props.cname
904
919
  }, {
905
920
  className: withCtx((scope) => [
906
921
  createElementVNode("span", {
907
922
  class: normalizeClass(scope.className),
908
- state: _ctx.state
923
+ state: __props.state
909
924
  }, [
910
925
  renderSlot(_ctx.$slots, "default")
911
926
  ], 10, _hoisted_1$a)
@@ -932,10 +947,22 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
932
947
  touchDuration: {},
933
948
  eventProxy: { type: Boolean }
934
949
  },
935
- emits: ["on_click", "on_enter", "on_move", "on_leave", "on_dblclick", "on_longTouch", "on_transend"],
936
- setup(__props, { emit }) {
937
- const props = __props;
950
+ emits: [
951
+ "on_click",
952
+ "on_mousedown",
953
+ "on_wheel",
954
+ "on_mouseup",
955
+ "on_enter",
956
+ "on_move",
957
+ "on_leave",
958
+ "on_dblclick",
959
+ "on_longTouch",
960
+ "on_transend"
961
+ ],
962
+ setup(__props, { expose: __expose, emit: __emit }) {
938
963
  const { proxy } = getCurrentInstance();
964
+ const props = __props;
965
+ const emit = __emit;
939
966
  const $anchor = ref();
940
967
  const target = ref("");
941
968
  let routeLink;
@@ -1003,44 +1030,53 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1003
1030
  clearTimeout(t);
1004
1031
  }
1005
1032
  };
1033
+ const wheel = (e) => {
1034
+ emit("on_wheel", e);
1035
+ };
1006
1036
  onMounted(() => {
1007
1037
  if (props.download)
1008
1038
  $anchor.value.download = props.download;
1009
1039
  });
1040
+ __expose({
1041
+ $el: $anchor
1042
+ });
1010
1043
  return (_ctx, _cache) => {
1011
1044
  return openBlock(), createBlock(_sfc_main$y, {
1012
- class: normalizeClass(_ctx.class),
1013
- states: _ctx.states,
1014
- hover: _ctx.hover,
1015
- active: _ctx.active,
1016
- cname: _ctx.cname
1045
+ class: normalizeClass(__props.class),
1046
+ states: __props.states,
1047
+ hover: __props.hover,
1048
+ active: __props.active,
1049
+ cname: __props.cname
1017
1050
  }, {
1018
1051
  className: withCtx((scope) => [
1019
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.eventProxy ? "div" : "a"), {
1052
+ (openBlock(), createBlock(resolveDynamicComponent(__props.eventProxy ? "div" : "a"), {
1020
1053
  style: normalizeStyle(`user-select: none; cursor: ${cursor.value};`),
1021
1054
  ref_key: "$anchor",
1022
1055
  ref: $anchor,
1023
- onMouseenter: enter,
1056
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("on_mousedown", $event), ["prevent"])),
1057
+ onMouseup: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("on_mouseup", $event), ["prevent"])),
1058
+ onMouseenter: withModifiers(enter, ["prevent"]),
1059
+ onMousemove: withModifiers(move, ["prevent"]),
1060
+ onMouseleave: withModifiers(leave, ["prevent"]),
1024
1061
  onTouchstart: enter,
1025
- onMousemove: move,
1026
- onTouchmove: move,
1027
- onMouseleave: leave,
1062
+ onTouchmove: withModifiers(move, ["prevent"]),
1028
1063
  onTouchend: leave,
1029
1064
  onClick: click,
1030
1065
  onDblclick: withModifiers(dblclick, ["stop"]),
1031
- onTransitionend: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("on_transend", $event)),
1066
+ onWheel: wheel,
1067
+ onTransitionend: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("on_transend", $event)),
1032
1068
  target: target.value,
1033
1069
  class: normalizeClass(scope.className),
1034
- hover: _ctx.hover ? true : "",
1035
- state: _ctx.state,
1036
- active: _ctx.active ? true : "",
1070
+ hover: __props.hover ? true : "",
1071
+ state: __props.state,
1072
+ active: __props.active ? true : "",
1037
1073
  href: url.value
1038
1074
  }, {
1039
1075
  default: withCtx(() => [
1040
1076
  renderSlot(_ctx.$slots, "default")
1041
1077
  ]),
1042
- _: 2
1043
- }, 1064, ["style", "onDblclick", "target", "class", "hover", "state", "active", "href"]))
1078
+ _: 3
1079
+ }, 40, ["style", "target", "class", "hover", "state", "active", "href"]))
1044
1080
  ]),
1045
1081
  _: 3
1046
1082
  }, 8, ["class", "states", "hover", "active", "cname"]);
@@ -1061,9 +1097,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1061
1097
  cname: {}
1062
1098
  },
1063
1099
  emits: ["on_load"],
1064
- setup(__props, { emit }) {
1100
+ setup(__props, { expose: __expose, emit: __emit }) {
1065
1101
  const props = __props;
1066
1102
  const img = computed(() => props.img);
1103
+ const emit = __emit;
1067
1104
  const src = ref("");
1068
1105
  const $img = ref();
1069
1106
  const setSrc = () => {
@@ -1082,21 +1119,27 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1082
1119
  onMounted(() => {
1083
1120
  setSrc();
1084
1121
  });
1122
+ __expose({
1123
+ $el: $img
1124
+ });
1085
1125
  return (_ctx, _cache) => {
1086
1126
  return openBlock(), createBlock(_sfc_main$y, {
1087
- class: normalizeClass(_ctx.class),
1088
- cname: _ctx.cname,
1089
- states: _ctx.states,
1090
- matrix: _ctx.matrix
1127
+ class: normalizeClass(__props.class),
1128
+ cname: __props.cname,
1129
+ states: __props.states,
1130
+ matrix: __props.matrix
1091
1131
  }, {
1092
1132
  className: withCtx((scope) => [
1093
1133
  src.value ? (openBlock(), createElementBlock("img", {
1094
1134
  key: 0,
1095
1135
  src: src.value,
1096
1136
  class: normalizeClass(`${scope.className} ani-fade-in`),
1097
- state: _ctx.state,
1098
- style: normalizeStyle({ display: "block", ...scope.matrixStyle }),
1099
- alt: _ctx.alt,
1137
+ state: __props.state,
1138
+ style: normalizeStyle({
1139
+ display: "block",
1140
+ ...scope.matrixStyle
1141
+ }),
1142
+ alt: __props.alt,
1100
1143
  ref_key: "$img",
1101
1144
  ref: $img
1102
1145
  }, null, 14, _hoisted_1$9)) : (openBlock(), createElementBlock("div", {
@@ -1191,27 +1234,27 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1191
1234
  const props = __props;
1192
1235
  return (_ctx, _cache) => {
1193
1236
  return openBlock(), createBlock(_sfc_main$y, {
1194
- class: normalizeClass(_ctx.class),
1195
- states: _ctx.states,
1196
- cname: _ctx.cname
1237
+ class: normalizeClass(__props.class),
1238
+ states: __props.states,
1239
+ cname: __props.cname
1197
1240
  }, {
1198
1241
  className: withCtx((scope) => [
1199
- _ctx.icon.search("ani_") === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1200
- _ctx.icon === "ani_success" ? (openBlock(), createBlock(_sfc_main$t, { key: "success" })) : createCommentVNode("", true),
1201
- _ctx.icon === "ani_fail" ? (openBlock(), createBlock(AniFail, { key: "fail" })) : createCommentVNode("", true),
1202
- _ctx.icon === "ani_notic" ? (openBlock(), createBlock(AniNotic, { key: "notic" })) : createCommentVNode("", true),
1203
- _ctx.icon === "ani_loading" ? (openBlock(), createBlock(AniLoading, { key: "loading" })) : createCommentVNode("", true)
1242
+ __props.icon.search("ani_") === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1243
+ __props.icon === "ani_success" ? (openBlock(), createBlock(_sfc_main$t, { key: "success" })) : createCommentVNode("", true),
1244
+ __props.icon === "ani_fail" ? (openBlock(), createBlock(AniFail, { key: "fail" })) : createCommentVNode("", true),
1245
+ __props.icon === "ani_notic" ? (openBlock(), createBlock(AniNotic, { key: "notic" })) : createCommentVNode("", true),
1246
+ __props.icon === "ani_loading" ? (openBlock(), createBlock(AniLoading, { key: "loading" })) : createCommentVNode("", true)
1204
1247
  ], 64)) : createCommentVNode("", true),
1205
- _ctx.icon.search("/") > -1 ? (openBlock(), createBlock(_sfc_main$x, {
1248
+ __props.icon.search("/") > -1 ? (openBlock(), createBlock(_sfc_main$x, {
1206
1249
  key: 1,
1207
- "bg-img": _ctx.icon,
1208
- states: _ctx.states,
1209
- class: normalizeClass(_ctx.class),
1210
- state: _ctx.state
1250
+ "bg-img": __props.icon,
1251
+ states: __props.states,
1252
+ class: normalizeClass(__props.class),
1253
+ state: __props.state
1211
1254
  }, null, 8, ["bg-img", "states", "class", "state"])) : (openBlock(), createElementBlock("i", {
1212
1255
  key: 2,
1213
1256
  class: normalizeClass(`ico-${props.icon} ${scope.className}`),
1214
- state: _ctx.state
1257
+ state: __props.state
1215
1258
  }, null, 10, _hoisted_1$8))
1216
1259
  ]),
1217
1260
  _: 1
@@ -1237,11 +1280,15 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1237
1280
  rule: {},
1238
1281
  cname: {},
1239
1282
  aspectHeight: { type: Boolean },
1240
- hideClear: { type: Boolean }
1283
+ hideClear: { type: Boolean },
1284
+ step: {},
1285
+ max: {},
1286
+ min: {}
1241
1287
  },
1242
1288
  emits: ["update:text", "on_focus", "on_blur", "on_change", "multiline"],
1243
- setup(__props, { expose: __expose, emit }) {
1289
+ setup(__props, { expose: __expose, emit: __emit }) {
1244
1290
  const props = __props;
1291
+ const emit = __emit;
1245
1292
  const preset_rules = {
1246
1293
  required: {
1247
1294
  regexp: /[\w\.\-_\u4e00-\u9fa5]+/,
@@ -1294,7 +1341,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1294
1341
  const origHeight = ref();
1295
1342
  const input = () => {
1296
1343
  var _a;
1297
- emit("update:text", (_a = val.value) == null ? void 0 : _a.trim());
1344
+ emit("update:text", (_a = val.value) == null ? void 0 : _a.toString().trim());
1298
1345
  };
1299
1346
  const input2 = () => {
1300
1347
  const text = $input.value.innerText.trim();
@@ -1309,6 +1356,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1309
1356
  };
1310
1357
  const focusState = ref(false);
1311
1358
  const blurEvent = (e) => {
1359
+ props.type === "number" && val.value && adjustNum(parseFloat(val.value));
1312
1360
  focusState.value = false;
1313
1361
  emit("on_blur", check(), e);
1314
1362
  };
@@ -1337,6 +1385,17 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1337
1385
  input();
1338
1386
  }
1339
1387
  };
1388
+ const adjustNum = (num) => {
1389
+ if (props.min)
1390
+ num = Math.max(num, props.min);
1391
+ if (props.max)
1392
+ num = Math.min(num, props.max);
1393
+ val.value = num.toString();
1394
+ input();
1395
+ };
1396
+ const update = (step) => {
1397
+ adjustNum((val.value ? parseFloat(val.value) : 0) + step * (props.step || 1));
1398
+ };
1340
1399
  __expose({
1341
1400
  check,
1342
1401
  focus: function() {
@@ -1353,40 +1412,40 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1353
1412
  });
1354
1413
  });
1355
1414
  return (_ctx, _cache) => {
1356
- const _component_b_icon = resolveComponent("b-icon");
1357
1415
  const _component_b_hot = resolveComponent("b-hot");
1358
1416
  const _component_b_view = resolveComponent("b-view");
1417
+ const _component_b_icon = resolveComponent("b-icon");
1359
1418
  return openBlock(), createBlock(_sfc_main$y, {
1360
- class: normalizeClass(_ctx.class),
1361
- focus: _ctx.focus,
1362
- states: _ctx.states,
1363
- cname: _ctx.cname
1419
+ class: normalizeClass(__props.class),
1420
+ focus: __props.focus,
1421
+ states: __props.states,
1422
+ cname: __props.cname
1364
1423
  }, {
1365
1424
  className: withCtx((scope) => [
1366
1425
  createVNode(_component_b_view, { class: "flex-4 rel" }, {
1367
1426
  default: withCtx(() => {
1368
1427
  var _a;
1369
1428
  return [
1370
- _ctx.aspectHeight ? withDirectives((openBlock(), createElementBlock("span", {
1429
+ __props.aspectHeight ? withDirectives((openBlock(), createElementBlock("span", {
1371
1430
  key: 0,
1372
1431
  class: normalizeClass(scope.className),
1373
1432
  style: { "pointer-events": "none", "position": "absolute", "background": "none", "border": "none", "opacity": ".4", "font-size": ".9em" }
1374
- }, toDisplayString(_ctx.placeholder), 3)), [
1375
- [vShow, !_ctx.text]
1433
+ }, toDisplayString(__props.placeholder), 3)), [
1434
+ [vShow, !__props.text]
1376
1435
  ]) : createCommentVNode("", true),
1377
- _ctx.aspectHeight ? (openBlock(), createElementBlock("div", {
1436
+ __props.aspectHeight ? (openBlock(), createElementBlock("div", {
1378
1437
  key: 1,
1379
1438
  class: normalizeClass(scope.className),
1380
- contenteditable: !_ctx.readonly,
1439
+ contenteditable: !__props.readonly,
1381
1440
  onFocus: _cache[0] || (_cache[0] = ($event) => focusEvent($event)),
1382
1441
  onBlur: blurEvent,
1383
1442
  onChange: change,
1384
1443
  onInput: input2,
1385
1444
  ref_key: "$input",
1386
1445
  ref: $input,
1387
- "focus-state": _ctx.focus ? "true" : "",
1446
+ "focus-state": __props.focus ? "true" : "",
1388
1447
  style: { "outline": "none", "width": "100%" },
1389
- state: _ctx.state,
1448
+ state: __props.state,
1390
1449
  autocomplete: "off"
1391
1450
  }, toDisplayString(val2.value), 43, _hoisted_1$7)) : withDirectives((openBlock(), createElementBlock("input", {
1392
1451
  key: 2,
@@ -1396,23 +1455,58 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1396
1455
  onChange: change,
1397
1456
  onInput: input,
1398
1457
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => val.value = $event),
1399
- type: _ctx.type,
1458
+ type: __props.type,
1400
1459
  ref_key: "$input",
1401
1460
  ref: $input,
1402
- name: _ctx.name,
1403
- "focus-state": _ctx.focus ? "true" : "",
1404
- state: _ctx.state,
1405
- placeholder: _ctx.placeholder,
1406
- maxlength: _ctx.maxlength,
1407
- readonly: _ctx.readonly,
1461
+ name: __props.name,
1462
+ "focus-state": __props.focus ? "true" : "",
1463
+ state: __props.state,
1464
+ placeholder: __props.placeholder,
1465
+ maxlength: __props.maxlength,
1466
+ readonly: __props.readonly,
1408
1467
  autocomplete: "off"
1409
1468
  }, null, 42, _hoisted_2$2)), [
1410
1469
  [vModelDynamic, val.value]
1411
1470
  ]),
1412
- !_ctx.readonly && !_ctx.aspectHeight && !_ctx.hideClear ? (openBlock(), createBlock(_component_b_hot, {
1471
+ __props.type === "number" ? (openBlock(), createBlock(_component_b_view, {
1413
1472
  key: 3,
1473
+ class: "trans-fast abs r-6-px gap-2-px flex-4",
1474
+ states: {
1475
+ show: "alpha-1 z-1 visible",
1476
+ hide: "alpha-0"
1477
+ },
1478
+ state: focusState.value ? "show" : "hide"
1479
+ }, {
1480
+ default: withCtx(() => [
1481
+ createVNode(_component_b_hot, {
1482
+ onOn_click: _cache[3] || (_cache[3] = ($event) => update(1)),
1483
+ class: "flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",
1484
+ active: "dark-sm",
1485
+ hover: "alpha-d8"
1486
+ }, {
1487
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
1488
+ createTextVNode(" + ", -1)
1489
+ ])]),
1490
+ _: 1
1491
+ }),
1492
+ createVNode(_component_b_hot, {
1493
+ onOn_click: _cache[4] || (_cache[4] = ($event) => update(-1)),
1494
+ class: "flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",
1495
+ active: "dark-sm",
1496
+ hover: "alpha-d8"
1497
+ }, {
1498
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
1499
+ createTextVNode(" - ", -1)
1500
+ ])]),
1501
+ _: 1
1502
+ })
1503
+ ]),
1504
+ _: 1
1505
+ }, 8, ["state"])) : createCommentVNode("", true),
1506
+ !__props.readonly && !__props.aspectHeight && !__props.hideClear && __props.type !== "number" ? (openBlock(), createBlock(_component_b_hot, {
1507
+ key: 4,
1414
1508
  onOn_click: clear,
1415
- class: "abs r-1 trans-fast",
1509
+ class: "trans-fast abs r-1",
1416
1510
  states: {
1417
1511
  show: "alpha-1 z-1 visible",
1418
1512
  hide: "alpha-0"
@@ -1455,8 +1549,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1455
1549
  cname: {}
1456
1550
  },
1457
1551
  emits: ["on_focus", "on_blur", "on_change", "update:text"],
1458
- setup(__props, { emit }) {
1552
+ setup(__props, { emit: __emit }) {
1459
1553
  const props = __props;
1554
+ const emit = __emit;
1460
1555
  const val = ref(props.text);
1461
1556
  const formatText = (text) => text.replace(/[\n\r]/g, "<br>");
1462
1557
  const inputText = () => {
@@ -1464,10 +1559,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1464
1559
  };
1465
1560
  return (_ctx, _cache) => {
1466
1561
  return openBlock(), createBlock(_sfc_main$y, {
1467
- class: normalizeClass(_ctx.class),
1468
- focus: _ctx.focus,
1469
- states: _ctx.states,
1470
- cname: _ctx.cname
1562
+ class: normalizeClass(__props.class),
1563
+ focus: __props.focus,
1564
+ states: __props.states,
1565
+ cname: __props.cname
1471
1566
  }, {
1472
1567
  className: withCtx((scope) => [
1473
1568
  withDirectives(createElementVNode("textarea", {
@@ -1477,13 +1572,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1477
1572
  onChange: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("on_change", $event)),
1478
1573
  onInput: inputText,
1479
1574
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => val.value = $event),
1480
- name: _ctx.name,
1481
- focus: _ctx.focus ? true : "",
1482
- state: _ctx.state,
1483
- placeholder: _ctx.placeholder,
1484
- maxlength: _ctx.maxlength,
1485
- readonly: _ctx.readonly,
1486
- rows: _ctx.rows || 7
1575
+ name: __props.name,
1576
+ focus: __props.focus ? true : "",
1577
+ state: __props.state,
1578
+ placeholder: __props.placeholder,
1579
+ maxlength: __props.maxlength,
1580
+ readonly: __props.readonly,
1581
+ rows: __props.rows || 7
1487
1582
  }, null, 42, _hoisted_1$6), [
1488
1583
  [vModelText, val.value]
1489
1584
  ])
@@ -1509,7 +1604,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1509
1604
  muted: { type: Boolean }
1510
1605
  },
1511
1606
  emits: ["on_play"],
1512
- setup(__props, { expose: __expose, emit }) {
1607
+ setup(__props, { expose: __expose, emit: __emit }) {
1608
+ const emit = __emit;
1513
1609
  const $video = ref();
1514
1610
  const iconScale = ref(0);
1515
1611
  onMounted(() => {
@@ -1558,14 +1654,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1558
1654
  const _component_b_view = resolveComponent("b-view");
1559
1655
  const _component_b_hot = resolveComponent("b-hot");
1560
1656
  return openBlock(), createBlock(_sfc_main$y, {
1561
- class: normalizeClass(_ctx.class),
1562
- cname: _ctx.cname
1657
+ class: normalizeClass(__props.class),
1658
+ cname: __props.cname
1563
1659
  }, {
1564
1660
  className: withCtx((scope) => [
1565
1661
  createElementVNode("div", {
1566
1662
  class: normalizeClass(`${scope.className} over-hide rel`)
1567
1663
  }, [
1568
- _ctx.customControls ? (openBlock(), createBlock(_component_b_hot, {
1664
+ __props.customControls ? (openBlock(), createBlock(_component_b_hot, {
1569
1665
  key: 0,
1570
1666
  class: "max abs flex-5 z-2 bg-color-rgba_0_0_0_d1 trans-fast",
1571
1667
  onOn_click: togglePlay,
@@ -1597,19 +1693,19 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1597
1693
  ]),
1598
1694
  _: 1
1599
1695
  }, 8, ["state"])) : createCommentVNode("", true),
1600
- _ctx.fullScreen ? (openBlock(), createElementBlock("video", {
1696
+ __props.fullScreen ? (openBlock(), createElementBlock("video", {
1601
1697
  key: 1,
1602
1698
  ref_key: "$video",
1603
1699
  ref: $video,
1604
1700
  onPlaying: playing,
1605
1701
  onDurationchange: playing,
1606
1702
  class: normalizeClass(scope.className),
1607
- poster: _ctx.poster,
1608
- muted: _ctx.muted,
1609
- src: _ctx.video,
1610
- autoplay: _ctx.autoPlay,
1611
- controls: !_ctx.customControls,
1612
- loop: _ctx.loop
1703
+ poster: __props.poster,
1704
+ muted: __props.muted,
1705
+ src: __props.video,
1706
+ autoplay: __props.autoPlay,
1707
+ controls: !__props.customControls,
1708
+ loop: __props.loop
1613
1709
  }, null, 42, _hoisted_1$5)) : (openBlock(), createElementBlock("video", {
1614
1710
  key: 2,
1615
1711
  ref_key: "$video",
@@ -1620,12 +1716,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1620
1716
  playsinline: "",
1621
1717
  "x5-video-player-type": "h5-page",
1622
1718
  class: normalizeClass(scope.className),
1623
- poster: _ctx.poster,
1624
- muted: _ctx.muted,
1625
- src: _ctx.video,
1626
- autoplay: _ctx.autoPlay,
1627
- controls: !_ctx.customControls,
1628
- loop: _ctx.loop
1719
+ poster: __props.poster,
1720
+ muted: __props.muted,
1721
+ src: __props.video,
1722
+ autoplay: __props.autoPlay,
1723
+ controls: !__props.customControls,
1724
+ loop: __props.loop
1629
1725
  }, null, 42, _hoisted_2$1))
1630
1726
  ], 2)
1631
1727
  ]),
@@ -1647,8 +1743,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1647
1743
  cname: {}
1648
1744
  },
1649
1745
  emits: ["on_scroll", "on_to_top", "on_to_bottom"],
1650
- setup(__props, { expose: __expose, emit }) {
1746
+ setup(__props, { expose: __expose, emit: __emit }) {
1651
1747
  const props = __props;
1748
+ const emit = __emit;
1652
1749
  const $list = ref();
1653
1750
  const scrollTypeClass = computed(() => {
1654
1751
  if (props.scrollType)
@@ -1700,20 +1797,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1700
1797
  });
1701
1798
  return (_ctx, _cache) => {
1702
1799
  return openBlock(), createBlock(_sfc_main$y, {
1703
- class: normalizeClass(_ctx.class),
1704
- states: _ctx.states,
1705
- cname: _ctx.cname
1800
+ class: normalizeClass(__props.class),
1801
+ states: __props.states,
1802
+ cname: __props.cname
1706
1803
  }, {
1707
1804
  className: withCtx((scope) => [
1708
1805
  createElementVNode("div", {
1709
1806
  class: normalizeClass(scope.className),
1710
- state: _ctx.state
1807
+ state: __props.state
1711
1808
  }, [
1712
1809
  createElementVNode("div", {
1713
1810
  ref_key: "$list",
1714
1811
  ref: $list,
1715
1812
  class: normalizeClass(scrollTypeClass.value),
1716
- style: normalizeStyle(`overflow-x: ${_ctx.scroll.x}; overflow-y: ${_ctx.scroll.y}; width: 100%; height: 100%;`),
1813
+ style: normalizeStyle(`overflow-x: ${__props.scroll.x}; overflow-y: ${__props.scroll.y}; width: 100%; height: 100%;`),
1717
1814
  onTouchmove: _cache[0] || (_cache[0] = withModifiers(() => {
1718
1815
  }, ["stop"]))
1719
1816
  }, [
@@ -1738,8 +1835,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1738
1835
  cname: {}
1739
1836
  },
1740
1837
  emits: ["on_drag_start", "on_drag_end", "on_drag_over", "on_drag_leave", "on_drop", "on_move"],
1741
- setup(__props, { emit }) {
1838
+ setup(__props, { emit: __emit }) {
1742
1839
  const props = __props;
1840
+ const emit = __emit;
1743
1841
  const $el = ref();
1744
1842
  const state = ref("");
1745
1843
  const dragState = ref(false);
@@ -1838,16 +1936,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1838
1936
  });
1839
1937
  return (_ctx, _cache) => {
1840
1938
  return openBlock(), createBlock(_sfc_main$y, {
1841
- class: normalizeClass(_ctx.class),
1842
- states: { dragStart: _ctx.dragStart, dragOver: _ctx.dragOver },
1843
- cname: _ctx.cname
1939
+ class: normalizeClass(__props.class),
1940
+ states: { dragStart: __props.dragStart, dragOver: __props.dragOver },
1941
+ cname: __props.cname
1844
1942
  }, {
1845
1943
  className: withCtx((scope) => [
1846
1944
  createElementVNode("div", {
1847
1945
  style: normalizeStyle({
1848
- cursor: _ctx.dragOver ? "default" : "move",
1946
+ cursor: __props.dragOver ? "default" : "move",
1849
1947
  visibility: dragState.value ? "hidden" : "visible",
1850
- position: _ctx.freeDrag ? "absolute" : "relative",
1948
+ position: __props.freeDrag ? "absolute" : "relative",
1851
1949
  left: 0,
1852
1950
  top: 0,
1853
1951
  transform: `translate(${movePos.x}px, ${movePos.y}px)`
@@ -1856,7 +1954,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1856
1954
  ref: $el,
1857
1955
  class: normalizeClass(scope.className),
1858
1956
  state: state.value,
1859
- draggable: _ctx.dragStart ? true : false
1957
+ draggable: __props.dragStart ? true : false
1860
1958
  }, [
1861
1959
  renderSlot(_ctx.$slots, "default")
1862
1960
  ], 14, _hoisted_1$3)
@@ -1877,14 +1975,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1877
1975
  setup(__props) {
1878
1976
  return (_ctx, _cache) => {
1879
1977
  return openBlock(), createBlock(_sfc_main$y, {
1880
- class: normalizeClass(_ctx.class),
1881
- cname: _ctx.cname
1978
+ class: normalizeClass(__props.class),
1979
+ cname: __props.cname
1882
1980
  }, {
1883
1981
  className: withCtx((scope) => [
1884
1982
  createElementVNode("iframe", {
1885
1983
  class: normalizeClass(scope.className),
1886
1984
  frameborder: "0",
1887
- src: _ctx.src
1985
+ src: __props.src
1888
1986
  }, null, 10, _hoisted_1$2)
1889
1987
  ]),
1890
1988
  _: 1
@@ -1909,7 +2007,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1909
2007
  });
1910
2008
  const combClass = ref(`${props.class ?? ""} flex pad-h-${gap.value[0]} pad-v-${gap.value[1]}`);
1911
2009
  return (_ctx, _cache) => {
1912
- return openBlock(), createBlock(_sfc_main$x, mergeProps({ class: combClass.value }, _ctx.viewData, {
2010
+ return openBlock(), createBlock(_sfc_main$x, mergeProps({ class: combClass.value }, __props.viewData, {
1913
2011
  extraClass: {
1914
2012
  selector: ">",
1915
2013
  value: `pad-h-${gap.value[0]} pad-v-${gap.value[1]}`
@@ -1935,7 +2033,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1935
2033
  const props = __props;
1936
2034
  const combClass = ref(`${props.class ?? ""} ${props.span ? "col-" + props.span : ""} ${props.offset ? "offset-" + props.offset : ""}`);
1937
2035
  return (_ctx, _cache) => {
1938
- return openBlock(), createBlock(_sfc_main$x, mergeProps({ class: combClass.value }, _ctx.viewData), {
2036
+ return openBlock(), createBlock(_sfc_main$x, mergeProps({ class: combClass.value }, __props.viewData), {
1939
2037
  default: withCtx(() => [
1940
2038
  renderSlot(_ctx.$slots, "default")
1941
2039
  ]),
@@ -1952,7 +2050,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1952
2050
  btnRound: { type: Boolean },
1953
2051
  btnWidth: {},
1954
2052
  hotData: {},
1955
- iconData: {}
2053
+ iconData: {},
2054
+ size: {}
1956
2055
  },
1957
2056
  setup(__props) {
1958
2057
  const props = __props;
@@ -1990,15 +2089,27 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1990
2089
  bg: setBg("active", "Ce7e7e7")
1991
2090
  };
1992
2091
  });
2092
+ const size = computed(() => {
2093
+ switch (props.size) {
2094
+ case "lg":
2095
+ return `pad-v-d65 lg bolder-550`;
2096
+ case "sm":
2097
+ return `pad-v-d17 sm`;
2098
+ case "xs":
2099
+ return `pad-v-d04 xs`;
2100
+ default:
2101
+ return `pad-v-d37 md bolder-470`;
2102
+ }
2103
+ });
1993
2104
  return (_ctx, _cache) => {
1994
- return openBlock(), createBlock(_sfc_main$v, mergeProps(_ctx.hotData, {
1995
- class: `flex-5 pad-h-1d4 pad-v-d4 thick-1 ellipsis ${_ctx.btnRound ? "round-lg" : "round-sm"} ${_ctx.btnWidth ? "lw-" + _ctx.btnWidth : ""} ${normal.value.bg} ${normal.value.text} ${normal.value.line} solid`,
2105
+ return openBlock(), createBlock(_sfc_main$v, mergeProps(__props.hotData, {
2106
+ class: `flex-5 pad-h-1d4 ${size.value} thick-1 ellipsis ${__props.btnRound ? "round-lg" : "round-sm"} ${__props.btnWidth ? "lw-" + __props.btnWidth : ""} ${normal.value.bg} ${normal.value.text} ${normal.value.line} solid`,
1996
2107
  hover: `${hover.value.text} ${hover.value.bg} ${hover.value.line}`,
1997
2108
  active: `${active.value.text} ${active.value.bg} ${active.value.line}`
1998
2109
  }), {
1999
2110
  default: withCtx(() => [
2000
- _ctx.iconData ? (openBlock(), createBlock(_sfc_main$p, mergeProps({ key: 0 }, _ctx.iconData, { class: "mrg-r-d7" }), null, 16)) : createCommentVNode("", true),
2001
- createTextVNode(" " + toDisplayString(_ctx.btnText), 1)
2111
+ __props.iconData ? (openBlock(), createBlock(_sfc_main$p, mergeProps({ key: 0 }, __props.iconData, { class: "mrg-r-d7" }), null, 16)) : createCommentVNode("", true),
2112
+ createTextVNode(" " + toDisplayString(__props.btnText), 1)
2002
2113
  ]),
2003
2114
  _: 1
2004
2115
  }, 16, ["class", "hover", "active"]);
@@ -2016,8 +2127,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2016
2127
  label: {}
2017
2128
  },
2018
2129
  emits: ["update:selected", "change"],
2019
- setup(__props, { emit }) {
2130
+ setup(__props, { emit: __emit }) {
2020
2131
  const props = __props;
2132
+ const emit = __emit;
2021
2133
  const combClass = ref(props.class ?? "flex-4 bg-color-neutral round-sm pad-4-px");
2022
2134
  const combActClass = ref(`color-blue ${props.actClass ?? ""}`);
2023
2135
  const label = computed(() => {
@@ -2052,7 +2164,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2052
2164
  state: selected.value ? "act" : "",
2053
2165
  cname: combClass.value + combActClass.value,
2054
2166
  states: {
2055
- act: `bg-color-${_ctx.actColor ? ((_a = _ctx.actColor) == null ? void 0 : _a.bg) ?? "blue" : "blue"} color-${_ctx.actColor ? ((_b = _ctx.actColor) == null ? void 0 : _b.icon) ?? "light" : "light"}`
2167
+ act: `bg-color-${__props.actColor ? ((_a = __props.actColor) == null ? void 0 : _a.bg) ?? "blue" : "blue"} color-${__props.actColor ? ((_b = __props.actColor) == null ? void 0 : _b.icon) ?? "light" : "light"}`
2056
2168
  }
2057
2169
  }, {
2058
2170
  default: withCtx(() => [
@@ -2094,8 +2206,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2094
2206
  span: {}
2095
2207
  },
2096
2208
  emits: ["update:selected", "change"],
2097
- setup(__props, { emit }) {
2209
+ setup(__props, { emit: __emit }) {
2098
2210
  const props = __props;
2211
+ const emit = __emit;
2099
2212
  const checkboxData = computed(() => {
2100
2213
  return props.options.map((opt) => {
2101
2214
  var _a;
@@ -2128,15 +2241,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2128
2241
  const _component_b_col = resolveComponent("b-col");
2129
2242
  const _component_b_row = resolveComponent("b-row");
2130
2243
  return openBlock(), createBlock(_sfc_main$x, {
2131
- class: normalizeClass(_ctx.class)
2244
+ class: normalizeClass(__props.class)
2132
2245
  }, {
2133
2246
  default: withCtx(() => [
2134
- _ctx.title ? (openBlock(), createBlock(_sfc_main$x, {
2247
+ __props.title ? (openBlock(), createBlock(_sfc_main$x, {
2135
2248
  key: 0,
2136
2249
  class: "mrg-b-1"
2137
2250
  }, {
2138
2251
  default: withCtx(() => [
2139
- createTextVNode(toDisplayString(_ctx.title), 1)
2252
+ createTextVNode(toDisplayString(__props.title), 1)
2140
2253
  ]),
2141
2254
  _: 1
2142
2255
  })) : createCommentVNode("", true),
@@ -2145,7 +2258,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2145
2258
  (openBlock(true), createElementBlock(Fragment, null, renderList(checkboxData.value, (item, i) => {
2146
2259
  return openBlock(), createBlock(_component_b_col, {
2147
2260
  class: "flex-4",
2148
- span: _ctx.span,
2261
+ span: __props.span,
2149
2262
  key: i
2150
2263
  }, {
2151
2264
  default: withCtx(() => [
@@ -2153,7 +2266,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2153
2266
  onChange: change,
2154
2267
  label: item.label,
2155
2268
  value: item.value
2156
- }, item.checkboxData, {
2269
+ }, { ref_for: true }, item.checkboxData, {
2157
2270
  selected: item.selected,
2158
2271
  "onUpdate:selected": ($event) => item.selected = $event
2159
2272
  }), createSlots({ _: 2 }, [
@@ -2200,8 +2313,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2200
2313
  regular: { type: Boolean }
2201
2314
  },
2202
2315
  emits: ["update:selected", "change"],
2203
- setup(__props, { emit }) {
2316
+ setup(__props, { emit: __emit }) {
2204
2317
  const props = __props;
2318
+ const emit = __emit;
2205
2319
  const selected = computed(() => [props.selected]);
2206
2320
  const change = (selected2) => {
2207
2321
  const values = selected2.map((item) => item.value);
@@ -2218,14 +2332,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2218
2332
  return (_ctx, _cache) => {
2219
2333
  const _component_b_view = resolveComponent("b-view");
2220
2334
  return openBlock(), createBlock(_sfc_main$e, {
2221
- span: _ctx.span,
2222
- title: _ctx.title,
2223
- class: normalizeClass(_ctx.class),
2335
+ span: __props.span,
2336
+ title: __props.title,
2337
+ class: normalizeClass(__props.class),
2224
2338
  selected: selected.value,
2225
- options: _ctx.options,
2339
+ options: __props.options,
2226
2340
  onChange: change
2227
2341
  }, createSlots({ _: 2 }, [
2228
- _ctx.regular ? {
2342
+ __props.regular ? {
2229
2343
  name: "default",
2230
2344
  fn: withCtx((scope) => [
2231
2345
  createVNode(_component_b_view, { class: "h-24-px w-24-px round-lg pad-d5 bg-color-neutral" }, {
@@ -2272,8 +2386,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2272
2386
  noDataNotic: {}
2273
2387
  },
2274
2388
  emits: ["update:selected", "change"],
2275
- setup(__props, { emit }) {
2389
+ setup(__props, { emit: __emit }) {
2276
2390
  const props = __props;
2391
+ const emit = __emit;
2277
2392
  const tabConts = reactive({});
2278
2393
  const color = computed(() => props.color ?? "blue");
2279
2394
  const tabOrder = reactive({});
@@ -2334,17 +2449,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2334
2449
  default: withCtx(() => [
2335
2450
  createVNode(_sfc_main$d, {
2336
2451
  options: options.value,
2337
- title: _ctx.title,
2452
+ title: __props.title,
2338
2453
  selected: selected.value,
2339
2454
  onChange: change
2340
2455
  }, createSlots({ _: 2 }, [
2341
- slots.value.length === 0 && _ctx.tabStyle === "grid" ? {
2456
+ slots.value.length === 0 && __props.tabStyle === "grid" ? {
2342
2457
  name: "default",
2343
2458
  fn: withCtx((scope) => [
2344
2459
  createElementVNode("span", { state: scope }, null, 8, _hoisted_1$1)
2345
2460
  ]),
2346
2461
  key: "0"
2347
- } : slots.value.length === 0 && _ctx.tabStyle === "card" ? {
2462
+ } : slots.value.length === 0 && __props.tabStyle === "card" ? {
2348
2463
  name: "default",
2349
2464
  fn: withCtx((scope) => [
2350
2465
  createVNode(_sfc_main$x, { class: "w-4-px b-f1-px h-1-px bg-color-neutral r-f5-px abs" })
@@ -2390,7 +2505,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2390
2505
  default: withCtx(() => [
2391
2506
  createElementVNode("div", {
2392
2507
  innerHTML: tabConts[selected.value],
2393
- class: normalizeClass(_ctx.smooth ? `ani-fast ani-${flipDir.value}` : ""),
2508
+ class: normalizeClass(__props.smooth ? `ani-fast ani-${flipDir.value}` : ""),
2394
2509
  onAnimationend: _cache[0] || (_cache[0] = ($event) => flipDir.value = "")
2395
2510
  }, null, 42, _hoisted_2)
2396
2511
  ]),
@@ -2401,7 +2516,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2401
2516
  }, {
2402
2517
  default: withCtx(() => [
2403
2518
  createElementVNode("div", {
2404
- innerHTML: _ctx.noDataNotic ?? "暂未选择标签"
2519
+ innerHTML: __props.noDataNotic ?? "暂未选择标签"
2405
2520
  }, null, 8, _hoisted_3)
2406
2521
  ]),
2407
2522
  _: 1
@@ -2424,8 +2539,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2424
2539
  camera: { type: Boolean }
2425
2540
  },
2426
2541
  emits: ["on_upload"],
2427
- setup(__props, { emit }) {
2542
+ setup(__props, { emit: __emit }) {
2428
2543
  const props = __props;
2544
+ const emit = __emit;
2429
2545
  const $uploader = ref();
2430
2546
  const btnData = computed(() => {
2431
2547
  return {
@@ -2487,7 +2603,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2487
2603
  key: 1,
2488
2604
  onOn_click: _cache[1] || (_cache[1] = ($event) => $uploader.value.click())
2489
2605
  }, btnData.value), null, 16)),
2490
- _ctx.camera ? (openBlock(), createElementBlock("input", {
2606
+ __props.camera ? (openBlock(), createElementBlock("input", {
2491
2607
  key: 2,
2492
2608
  type: "file",
2493
2609
  style: { "display": "none" },
@@ -2503,7 +2619,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2503
2619
  ref_key: "$uploader",
2504
2620
  ref: $uploader,
2505
2621
  onChange: trigerUpload,
2506
- multiple: _ctx.multiple
2622
+ multiple: __props.multiple
2507
2623
  }, null, 40, _hoisted_1))
2508
2624
  ]),
2509
2625
  _: 3
@@ -2524,8 +2640,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2524
2640
  aniName: {}
2525
2641
  },
2526
2642
  emits: ["update:visiable", "opened", "closed"],
2527
- setup(__props, { emit }) {
2643
+ setup(__props, { emit: __emit }) {
2528
2644
  const props = __props;
2645
+ const emit = __emit;
2529
2646
  const dir = computed(() => props.dir || "bottom");
2530
2647
  const dirStyle = computed(() => {
2531
2648
  let layout, pannal;
@@ -2622,13 +2739,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2622
2739
  default: withCtx(() => [
2623
2740
  createVNode(_sfc_main$v, {
2624
2741
  onOn_transend: matteAniend,
2625
- onOn_click: _cache[0] || (_cache[0] = ($event) => !_ctx.matteCloseForbid && hide()),
2626
- state: _ctx.visiable.toString(),
2742
+ onOn_click: _cache[0] || (_cache[0] = ($event) => !__props.matteCloseForbid && hide()),
2743
+ state: __props.visiable.toString(),
2627
2744
  states: {
2628
2745
  true: "alpha-1 visible",
2629
2746
  false: "alpha-0"
2630
2747
  },
2631
- class: normalizeClass(`abs trans-fast max t-0 l-0 bg-color-${_ctx.matteColor || "C000000cc"}`)
2748
+ class: normalizeClass(`abs trans-fast max t-0 l-0 bg-color-${__props.matteColor || "C000000cc"}`)
2632
2749
  }, null, 8, ["state", "class"]),
2633
2750
  createVNode(_sfc_main$x, {
2634
2751
  class: normalizeClass(`${dirStyle.value.pannal} rel ani-mode-both ani-fast`),
@@ -2640,10 +2757,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2640
2757
  default: withCtx(() => [
2641
2758
  renderSlot(_ctx.$slots, "custom", {}, () => [
2642
2759
  createVNode(_sfc_main$x, {
2643
- class: normalizeClass(`bg-color-${_ctx.pannelColor || "light"} rel pad-2 ${_ctx.roundEnable ? "round-md" : ""} ${dirStyle.value.pannal}`)
2760
+ class: normalizeClass(`bg-color-${__props.pannelColor || "light"} rel pad-2 ${__props.roundEnable ? "round-md" : ""} ${dirStyle.value.pannal}`)
2644
2761
  }, {
2645
2762
  default: withCtx(() => [
2646
- !_ctx.closeEnable ? (openBlock(), createBlock(_sfc_main$v, {
2763
+ !__props.closeEnable ? (openBlock(), createBlock(_sfc_main$v, {
2647
2764
  key: 0,
2648
2765
  class: "abs r-1 t-d7 color-mgray",
2649
2766
  onOn_click: hide
@@ -2680,8 +2797,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2680
2797
  extra: {}
2681
2798
  },
2682
2799
  emits: ["close"],
2683
- setup(__props, { expose: __expose, emit }) {
2800
+ setup(__props, { expose: __expose, emit: __emit }) {
2684
2801
  const props = __props;
2802
+ const emit = __emit;
2685
2803
  let t;
2686
2804
  let hasOpened = false;
2687
2805
  const visiable = ref(false);
@@ -2717,7 +2835,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2717
2835
  onOpened: opened,
2718
2836
  "ani-name": ["ani-fade-in", "ani-fade-out"],
2719
2837
  dir: "center",
2720
- "matte-color": _ctx.matteColor || "C00000044"
2838
+ "matte-color": __props.matteColor || "C00000044"
2721
2839
  }, {
2722
2840
  custom: withCtx(() => [
2723
2841
  renderSlot(_ctx.$slots, "default", {}, () => [
@@ -2725,7 +2843,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2725
2843
  default: withCtx(() => {
2726
2844
  var _a;
2727
2845
  return [
2728
- _ctx.icon ? (openBlock(), createBlock(_sfc_main$x, {
2846
+ __props.icon ? (openBlock(), createBlock(_sfc_main$x, {
2729
2847
  key: 0,
2730
2848
  class: "mrg-b-1d2 fsize-3d2",
2731
2849
  states: {
@@ -2734,16 +2852,16 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2734
2852
  ani: "ani-rotate"
2735
2853
  }
2736
2854
  },
2737
- state: ((_a = _ctx.extra) == null ? void 0 : _a.type) ?? ""
2855
+ state: ((_a = __props.extra) == null ? void 0 : _a.type) ?? ""
2738
2856
  }, {
2739
2857
  default: withCtx(() => [
2740
- createVNode(_sfc_main$p, { icon: _ctx.icon }, null, 8, ["icon"])
2858
+ createVNode(_sfc_main$p, { icon: __props.icon }, null, 8, ["icon"])
2741
2859
  ]),
2742
2860
  _: 1
2743
2861
  }, 8, ["state"])) : createCommentVNode("", true),
2744
2862
  createVNode(_sfc_main$w, null, {
2745
2863
  default: withCtx(() => [
2746
- createTextVNode(toDisplayString(_ctx.text), 1)
2864
+ createTextVNode(toDisplayString(__props.text), 1)
2747
2865
  ]),
2748
2866
  _: 1
2749
2867
  })
@@ -2770,8 +2888,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2770
2888
  cancel: { type: Function }
2771
2889
  },
2772
2890
  emits: ["ok", "cancel", "close"],
2773
- setup(__props, { expose: __expose, emit }) {
2891
+ setup(__props, { expose: __expose, emit: __emit }) {
2774
2892
  const props = __props;
2893
+ const emit = __emit;
2775
2894
  const visiable = ref(false);
2776
2895
  const closed = () => {
2777
2896
  emit("close");
@@ -2815,7 +2934,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2815
2934
  onClosed: closed,
2816
2935
  dir: "center",
2817
2936
  "ani-name": ["ani-fade-in", "ani-fade-out"],
2818
- "matte-color": _ctx.matteColor
2937
+ "matte-color": __props.matteColor
2819
2938
  }, {
2820
2939
  custom: withCtx(() => [
2821
2940
  createVNode(_sfc_main$x, {
@@ -2826,7 +2945,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2826
2945
  class: normalizeClass(`color-${theme2.value.text} pad-3d4 fsize-1d4 bolder-470`)
2827
2946
  }, {
2828
2947
  default: withCtx(() => [
2829
- createTextVNode(toDisplayString(_ctx.notic), 1)
2948
+ createTextVNode(toDisplayString(__props.notic), 1)
2830
2949
  ]),
2831
2950
  _: 1
2832
2951
  }, 8, ["class"]),
@@ -2834,7 +2953,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2834
2953
  class: normalizeClass(`flex solid-t bolder-470 line-${theme2.value.line} thick-d4 fsize-1d44`)
2835
2954
  }, {
2836
2955
  default: withCtx(() => [
2837
- _ctx.type === "confirm" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2956
+ __props.type === "confirm" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2838
2957
  createVNode(_sfc_main$v, {
2839
2958
  class: normalizeClass(`color-${theme2.value.cancel} solid-r thick-d4 line-${theme2.value.line} round-md round-3 flex-5 pad-v-1d4 w-50-P`),
2840
2959
  active: "bg-color-neutral",
@@ -2843,7 +2962,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2843
2962
  default: withCtx(() => {
2844
2963
  var _a;
2845
2964
  return [
2846
- createTextVNode(toDisplayString(((_a = _ctx.text) == null ? void 0 : _a.cancel) || "取消"), 1)
2965
+ createTextVNode(toDisplayString(((_a = __props.text) == null ? void 0 : _a.cancel) || "取消"), 1)
2847
2966
  ];
2848
2967
  }),
2849
2968
  _: 1
@@ -2856,7 +2975,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2856
2975
  default: withCtx(() => {
2857
2976
  var _a;
2858
2977
  return [
2859
- createTextVNode(toDisplayString(((_a = _ctx.text) == null ? void 0 : _a.ok) || "确定"), 1)
2978
+ createTextVNode(toDisplayString(((_a = __props.text) == null ? void 0 : _a.ok) || "确定"), 1)
2860
2979
  ];
2861
2980
  }),
2862
2981
  _: 1
@@ -2870,7 +2989,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2870
2989
  default: withCtx(() => {
2871
2990
  var _a;
2872
2991
  return [
2873
- createTextVNode(toDisplayString(((_a = _ctx.text) == null ? void 0 : _a.ok) || "确定"), 1)
2992
+ createTextVNode(toDisplayString(((_a = __props.text) == null ? void 0 : _a.ok) || "确定"), 1)
2874
2993
  ];
2875
2994
  }),
2876
2995
  _: 1
@@ -3043,49 +3162,286 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3043
3162
  camera: { type: Boolean }
3044
3163
  },
3045
3164
  emits: ["update:preview", "on_upload"],
3046
- setup(__props, { emit }) {
3165
+ setup(__props, { emit: __emit }) {
3047
3166
  const props = __props;
3167
+ const emit = __emit;
3048
3168
  const size = computed(() => props.compress ? 1024 * 1024 * 20 : props.size);
3049
- const imgUpload = async (files, checkResult) => {
3169
+ const imgUpload = (files, checkResult) => {
3050
3170
  if (checkResult.success) {
3051
3171
  let file = files[0];
3052
3172
  const fileReader = new FileReader();
3053
3173
  fileReader.readAsDataURL(files[0]);
3054
- fileReader.onload = (e) => {
3055
- var _a;
3056
- emit("update:preview", (_a = e.target) == null ? void 0 : _a.result);
3174
+ fileReader.onload = async (e) => {
3175
+ var _a, _b;
3176
+ if (props == null ? void 0 : props.compress) {
3177
+ if (props.compress.clip) {
3178
+ openCrop((_a = e.target) == null ? void 0 : _a.result, file);
3179
+ return;
3180
+ }
3181
+ file = await compress(file, props.compress);
3182
+ }
3183
+ emit("update:preview", (_b = e.target) == null ? void 0 : _b.result);
3184
+ emit("on_upload", file);
3057
3185
  };
3058
- if (props.compress)
3059
- file = await compress(files[0], props.compress);
3060
- emit("on_upload", file, checkResult);
3061
3186
  }
3062
3187
  };
3188
+ const showCrop = ref(false);
3189
+ const cropSrc = ref("");
3190
+ const $cropImage = ref();
3191
+ const $cropArea = ref();
3192
+ const scale = ref(1);
3193
+ const offset = ref({ x: 0, y: 0 });
3194
+ const dragging = ref(false);
3195
+ const lastPos = ref({ x: 0, y: 0 });
3196
+ const pinchData = ref({
3197
+ startDistance: 0,
3198
+ // 初始两指距离
3199
+ startScale: 1,
3200
+ // 初始缩放
3201
+ origin: { x: 0, y: 0 },
3202
+ // 缩放中心点
3203
+ startOffset: { x: 0, y: 0 }
3204
+ // 初始偏移
3205
+ });
3206
+ const currentFile = ref(null);
3207
+ const imgNatural = ref({ w: 0, h: 0 });
3208
+ const outputWidth = computed(() => {
3209
+ var _a;
3210
+ return ((_a = props.compress) == null ? void 0 : _a.width) || 0;
3211
+ });
3212
+ const outputHeight = computed(() => {
3213
+ var _a;
3214
+ return ((_a = props.compress) == null ? void 0 : _a.height) || 0;
3215
+ });
3216
+ const setImg = () => {
3217
+ const w = imgNatural.value.w * scale.value;
3218
+ const h = imgNatural.value.h * scale.value;
3219
+ nextTick(() => {
3220
+ if (!$cropImage.value)
3221
+ return;
3222
+ $cropImage.value.$el.style.width = w ? w + "px" : "auto";
3223
+ $cropImage.value.$el.style.height = h ? h + "px" : "auto";
3224
+ $cropImage.value.$el.style.top = offset.value.y + "px";
3225
+ $cropImage.value.$el.style.left = offset.value.x + "px";
3226
+ });
3227
+ };
3228
+ const onWheel = (e) => {
3229
+ const delta = e.deltaY < 0 ? 1.1 : 0.9;
3230
+ scale.value = Math.max(0.1, Math.min(5, scale.value * delta));
3231
+ setImg();
3232
+ };
3233
+ const startDrag = (e) => {
3234
+ dragging.value = true;
3235
+ lastPos.value = { x: e.clientX, y: e.clientY };
3236
+ $cropImage.value.$el.style.cursor = "grabbing";
3237
+ };
3238
+ const dragMove = (e) => {
3239
+ if (!dragging.value)
3240
+ return;
3241
+ const { clientX, clientY } = e;
3242
+ const dx = clientX - lastPos.value.x;
3243
+ const dy = clientY - lastPos.value.y;
3244
+ offset.value.x += dx;
3245
+ offset.value.y += dy;
3246
+ lastPos.value = { x: clientX, y: clientY };
3247
+ setImg();
3248
+ };
3249
+ const onDrag = (e) => {
3250
+ (e == null ? void 0 : e.touches) ? onTouchMove(e) : dragMove(e);
3251
+ };
3252
+ const endDrag = () => {
3253
+ dragging.value = false;
3254
+ $cropImage.value.$el.style.cursor = "grab";
3255
+ };
3256
+ const onTouchStart = (e) => {
3257
+ if (!(e == null ? void 0 : e.touches))
3258
+ return;
3259
+ if (e.touches.length === 1) {
3260
+ const t = e.touches[0];
3261
+ startDrag({ clientX: t.clientX, clientY: t.clientY });
3262
+ } else if (e.touches.length === 2 && $cropArea.value) {
3263
+ const [t1, t2] = e.touches;
3264
+ const dist = Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
3265
+ pinchData.value.startDistance = dist;
3266
+ pinchData.value.startScale = scale.value;
3267
+ pinchData.value.startOffset = { ...offset.value };
3268
+ const rect = $cropArea.value.getBoundingClientRect();
3269
+ const midX = (t1.clientX + t2.clientX) / 2 - rect.left;
3270
+ const midY = (t1.clientY + t2.clientY) / 2 - rect.top;
3271
+ pinchData.value.origin = { x: midX, y: midY };
3272
+ }
3273
+ };
3274
+ const onTouchMove = (e) => {
3275
+ if (e.touches.length === 1 && dragging.value) {
3276
+ const t = e.touches[0];
3277
+ dragMove({ clientX: t.clientX, clientY: t.clientY });
3278
+ } else if (e.touches.length === 2) {
3279
+ const [t1, t2] = e.touches;
3280
+ const dist = Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
3281
+ const S0 = pinchData.value.startScale;
3282
+ const newScale = S0 * dist / pinchData.value.startDistance;
3283
+ const S1 = Math.max(0.1, Math.min(5, newScale));
3284
+ const C = pinchData.value.origin;
3285
+ const O0 = pinchData.value.startOffset;
3286
+ offset.value = {
3287
+ x: O0.x + (1 - S1 / S0) * (C.x - O0.x),
3288
+ y: O0.y + (1 - S1 / S0) * (C.y - O0.y)
3289
+ };
3290
+ scale.value = S1;
3291
+ setImg();
3292
+ }
3293
+ };
3294
+ const openCrop = (dataUrl, file) => {
3295
+ currentFile.value = file;
3296
+ scale.value = 1;
3297
+ offset.value = { x: 0, y: 0 };
3298
+ showCrop.value = true;
3299
+ nextTick(() => {
3300
+ cropSrc.value = dataUrl;
3301
+ });
3302
+ };
3303
+ const onImgLoad = () => {
3304
+ nextTick(() => {
3305
+ const img = $cropImage.value.$el;
3306
+ const area = $cropArea.value.$el;
3307
+ if (img && area) {
3308
+ imgNatural.value = { w: img.naturalWidth, h: img.naturalHeight };
3309
+ const cw = area.clientWidth;
3310
+ const ch = area.clientHeight;
3311
+ if (cw === 0 || ch === 0) {
3312
+ setTimeout(onImgLoad, 50);
3313
+ return;
3314
+ }
3315
+ const iw = img.naturalWidth;
3316
+ const ih = img.naturalHeight;
3317
+ const scaleX = cw / iw;
3318
+ const scaleY = ch / ih;
3319
+ scale.value = Math.max(scaleX, scaleY);
3320
+ setImg();
3321
+ }
3322
+ });
3323
+ };
3324
+ const confirmCrop = async () => {
3325
+ var _a;
3326
+ const $img = $cropImage.value.$el;
3327
+ if (!$img || !$cropArea.value.$el)
3328
+ return;
3329
+ const file = currentFile.value;
3330
+ const cw = $cropArea.value.$el.clientWidth;
3331
+ const ch = $cropArea.value.$el.clientHeight;
3332
+ const sx = -offset.value.x / scale.value;
3333
+ const sy = -offset.value.y / scale.value;
3334
+ const sW = cw / scale.value;
3335
+ const sH = ch / scale.value;
3336
+ const sWidth = outputWidth.value || cw;
3337
+ const sHeight = outputHeight.value || ch;
3338
+ const canvas = document.createElement("canvas");
3339
+ canvas.width = sWidth;
3340
+ canvas.height = sHeight;
3341
+ const ctx = canvas.getContext("2d");
3342
+ ctx == null ? void 0 : ctx.drawImage($img, sx, sy, sW, sH, 0, 0, sWidth, sHeight);
3343
+ canvas.toBlob((blob) => {
3344
+ if (blob) {
3345
+ const croppedFile = new File([blob], file.name, { type: blob.type });
3346
+ const reader = new FileReader();
3347
+ reader.onload = () => {
3348
+ const val = reader.result;
3349
+ emit("on_upload", croppedFile);
3350
+ emit("update:preview", val);
3351
+ };
3352
+ reader.readAsDataURL(blob);
3353
+ }
3354
+ }, file.type, (_a = props.compress) == null ? void 0 : _a.quality);
3355
+ showCrop.value = false;
3356
+ };
3357
+ const cancelCrop = () => {
3358
+ showCrop.value = false;
3359
+ currentFile.value = null;
3360
+ cropSrc.value = "";
3361
+ };
3063
3362
  return (_ctx, _cache) => {
3064
3363
  const _component_b_view = resolveComponent("b-view");
3065
3364
  const _component_b_icon = resolveComponent("b-icon");
3066
- return openBlock(), createBlock(_sfc_main$b, {
3067
- onOn_upload: imgUpload,
3068
- size: size.value,
3069
- multiple: _ctx.multiple,
3070
- camera: _ctx.camera,
3071
- type: ["image/jpeg", "image/png", "image/gif"]
3072
- }, {
3073
- default: withCtx(() => {
3074
- var _a, _b, _c, _d, _e, _f;
3075
- return [
3076
- _ctx.preview ? (openBlock(), createBlock(_component_b_view, {
3077
- key: 0,
3078
- class: normalizeClass(`w-${((_a = _ctx.cover) == null ? void 0 : _a.width) || 7} h-${((_b = _ctx.cover) == null ? void 0 : _b.height) || 7} bsize-${_ctx.bsize || "cover"} bpos-2 round-sm bg-color-neutral`),
3079
- "bg-img": _ctx.preview
3080
- }, null, 8, ["class", "bg-img"])) : (openBlock(), createBlock(_component_b_icon, {
3081
- key: 1,
3082
- icon: "add",
3083
- class: normalizeClass(`flex-5 w-${((_c = _ctx.cover) == null ? void 0 : _c.width) || 7} h-${((_d = _ctx.cover) == null ? void 0 : _d.height) || 7} ${((_e = _ctx.cover) == null ? void 0 : _e.color) ? "color-" + ((_f = _ctx.cover) == null ? void 0 : _f.color) : ""} round-sm bg-color-neutral`)
3084
- }, null, 8, ["class"]))
3085
- ];
3086
- }),
3087
- _: 1
3088
- }, 8, ["size", "multiple", "camera"]);
3365
+ const _component_b_img = resolveComponent("b-img");
3366
+ const _component_b_hot = resolveComponent("b-hot");
3367
+ const _component_btn_wid = resolveComponent("btn-wid");
3368
+ return openBlock(), createElementBlock(Fragment, null, [
3369
+ createVNode(_sfc_main$b, {
3370
+ onOn_upload: imgUpload,
3371
+ size: size.value,
3372
+ multiple: __props.multiple,
3373
+ camera: __props.camera,
3374
+ type: ["image/jpeg", "image/png", "image/gif"]
3375
+ }, {
3376
+ default: withCtx(() => {
3377
+ var _a, _b, _c, _d, _e, _f;
3378
+ return [
3379
+ __props.preview ? (openBlock(), createBlock(_component_b_view, {
3380
+ key: 0,
3381
+ class: normalizeClass(`w-${((_a = __props.cover) == null ? void 0 : _a.width) || 7} h-${((_b = __props.cover) == null ? void 0 : _b.height) || 7} bsize-${__props.bsize || "cover"} bpos-2 round-sm bg-color-neutral`),
3382
+ "bg-img": __props.preview
3383
+ }, null, 8, ["class", "bg-img"])) : (openBlock(), createBlock(_component_b_icon, {
3384
+ key: 1,
3385
+ icon: "add",
3386
+ class: normalizeClass(`flex-5 w-${((_c = __props.cover) == null ? void 0 : _c.width) || 7} h-${((_d = __props.cover) == null ? void 0 : _d.height) || 7} ${((_e = __props.cover) == null ? void 0 : _e.color) ? "color-" + ((_f = __props.cover) == null ? void 0 : _f.color) : ""} round-sm bg-color-neutral`)
3387
+ }, null, 8, ["class"]))
3388
+ ];
3389
+ }),
3390
+ _: 1
3391
+ }, 8, ["size", "multiple", "camera"]),
3392
+ showCrop.value ? (openBlock(), createBlock(_component_b_view, {
3393
+ key: 0,
3394
+ class: "max-fixed color-light bg-color-rgba_0_0_0_d7 flex-5 z-10 flex-column"
3395
+ }, {
3396
+ default: withCtx(() => {
3397
+ var _a, _b;
3398
+ return [
3399
+ createVNode(_component_b_view, { class: "mrg-b-1" }, {
3400
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
3401
+ createTextVNode("拖动/触摸移动,滚轮或捏合缩放", -1)
3402
+ ])]),
3403
+ _: 1
3404
+ }),
3405
+ createVNode(_component_b_hot, {
3406
+ class: normalizeClass(`bg-color-dgray show rel line-outside over-hide round-md line-Cffffff44 solid thick-7-px w-${(_a = __props.compress) == null ? void 0 : _a.width}-px h-${(_b = __props.compress) == null ? void 0 : _b.height}-px`),
3407
+ ref_key: "$cropArea",
3408
+ ref: $cropArea,
3409
+ onOn_wheel: onWheel,
3410
+ onOn_mousedown: startDrag,
3411
+ onOn_move: onDrag,
3412
+ onOn_mouseup: endDrag,
3413
+ onOn_enter: onTouchStart,
3414
+ onOn_leave: endDrag
3415
+ }, {
3416
+ default: withCtx(() => [
3417
+ createVNode(_component_b_img, {
3418
+ class: "abs t-0 l-0 no-rw select-none cursor-grab",
3419
+ ref_key: "$cropImage",
3420
+ ref: $cropImage,
3421
+ img: cropSrc.value,
3422
+ onOn_load: onImgLoad
3423
+ }, null, 8, ["img"])
3424
+ ]),
3425
+ _: 1
3426
+ }, 8, ["class"]),
3427
+ createVNode(_component_b_view, { class: "mrg-t-2 flex gap-1" }, {
3428
+ default: withCtx(() => [
3429
+ createVNode(_component_btn_wid, {
3430
+ onOn_click: confirmCrop,
3431
+ "btn-text": "确认"
3432
+ }),
3433
+ createVNode(_component_btn_wid, {
3434
+ onOn_click: cancelCrop,
3435
+ "btn-text": "取消"
3436
+ })
3437
+ ]),
3438
+ _: 1
3439
+ })
3440
+ ];
3441
+ }),
3442
+ _: 1
3443
+ })) : createCommentVNode("", true)
3444
+ ], 64);
3089
3445
  };
3090
3446
  }
3091
3447
  });
@@ -3115,7 +3471,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3115
3471
  var _a;
3116
3472
  const _component_router_view = resolveComponent("router-view");
3117
3473
  return openBlock(), createBlock(_sfc_main$x, {
3118
- class: normalizeClass(`max fixed flex-column color-light select-none bg-color-${((_a = _ctx.colors) == null ? void 0 : _a.bg) || "none"}`)
3474
+ class: normalizeClass(`max fixed flex-column color-light select-none bg-color-${((_a = __props.colors) == null ? void 0 : _a.bg) || "none"}`)
3119
3475
  }, {
3120
3476
  default: withCtx(() => {
3121
3477
  var _a2;
@@ -3127,7 +3483,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3127
3483
  class: "abs max"
3128
3484
  }, {
3129
3485
  default: withCtx(() => [
3130
- _ctx.keepAlive ? (openBlock(), createBlock(KeepAlive, { key: 0 }, [
3486
+ __props.keepAlive ? (openBlock(), createBlock(KeepAlive, { key: 0 }, [
3131
3487
  createVNode(_component_router_view)
3132
3488
  ], 1024)) : (openBlock(), createBlock(_component_router_view, { key: 1 }))
3133
3489
  ]),
@@ -3137,11 +3493,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3137
3493
  _: 1
3138
3494
  }),
3139
3495
  createVNode(_sfc_main$x, {
3140
- class: normalizeClass(`pcenter pad-t-d5 flex-1 ${_ctx.round ? "round-md round-t" : ""} bg-color-${((_a2 = _ctx.colors) == null ? void 0 : _a2.bar) || "dark"} solid-t line-neutral thick-d4 app-nav-bar`)
3496
+ class: normalizeClass(`pcenter pad-t-d5 flex-1 ${__props.round ? "round-md round-t" : ""} bg-color-${((_a2 = __props.colors) == null ? void 0 : _a2.bar) || "dark"} solid-t line-neutral thick-d4 app-nav-bar`)
3141
3497
  }, {
3142
3498
  default: withCtx(() => [
3143
3499
  (openBlock(true), createElementBlock(Fragment, null, renderList(navs.value, (nav, i) => {
3144
- return openBlock(), createBlock(_sfc_main$v, mergeProps({ key: i }, nav.hotData, {
3500
+ return openBlock(), createBlock(_sfc_main$v, mergeProps({ key: i }, { ref_for: true }, nav.hotData, {
3145
3501
  class: "grow-1",
3146
3502
  onOn_click: ($event) => _ctx.$emit("on_toggle", nav)
3147
3503
  }), {
@@ -3155,19 +3511,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3155
3511
  default: withCtx(() => {
3156
3512
  var _a4, _b2, _c2, _d2;
3157
3513
  return [
3158
- createVNode(_sfc_main$p, mergeProps(nav.iconData, {
3159
- class: `abs flex-5 solid t-f1d4 thick-2 w-5 h-5 round fsize-1d7 line-${((_b2 = (_a4 = _ctx.colors) == null ? void 0 : _a4.center) == null ? void 0 : _b2.line) || "neutral"} bg-color-${((_d2 = (_c2 = _ctx.colors) == null ? void 0 : _c2.center) == null ? void 0 : _d2.bg) || "dgray"}`
3514
+ createVNode(_sfc_main$p, mergeProps({ ref_for: true }, nav.iconData, {
3515
+ class: `abs flex-5 solid t-f1d4 thick-2 w-5 h-5 round fsize-1d7 line-${((_b2 = (_a4 = __props.colors) == null ? void 0 : _a4.center) == null ? void 0 : _b2.line) || "neutral"} bg-color-${((_d2 = (_c2 = __props.colors) == null ? void 0 : _c2.center) == null ? void 0 : _d2.bg) || "dgray"}`
3160
3516
  }), null, 16, ["class"])
3161
3517
  ];
3162
3518
  }),
3163
3519
  _: 2
3164
3520
  }, 1024)) : (openBlock(), createBlock(_sfc_main$x, {
3165
3521
  key: 1,
3166
- class: normalizeClass(`flex-column rel flex-5 color-${((_b = (_a3 = _ctx.colors) == null ? void 0 : _a3.text) == null ? void 0 : _b.normal) || "mgray"}`),
3167
- cname: ((_d = (_c = _ctx.colors) == null ? void 0 : _c.text) == null ? void 0 : _d.act) || "light",
3168
- state: curRoute.value === nav.hotData.link ? "act" : "",
3522
+ class: normalizeClass(`flex-column rel flex-5 color-${((_b = (_a3 = __props.colors) == null ? void 0 : _a3.text) == null ? void 0 : _b.normal) || "mgray"}`),
3523
+ cname: ((_d = (_c = __props.colors) == null ? void 0 : _c.text) == null ? void 0 : _d.act) || "light",
3524
+ state: curRoute.value.search(nav.hotData.link) === 0 ? "act" : "",
3169
3525
  states: {
3170
- act: `color-${((_f = (_e = _ctx.colors) == null ? void 0 : _e.text) == null ? void 0 : _f.act) || "light"}`
3526
+ act: `color-${((_f = (_e = __props.colors) == null ? void 0 : _e.text) == null ? void 0 : _f.act) || "light"}`
3171
3527
  }
3172
3528
  }, {
3173
3529
  default: withCtx(() => [
@@ -3184,13 +3540,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3184
3540
  ]),
3185
3541
  _: 2
3186
3542
  }, 1024)) : createCommentVNode("", true),
3187
- createVNode(_sfc_main$p, mergeProps(nav.iconData, {
3543
+ createVNode(_sfc_main$p, mergeProps({ ref_for: true }, nav.iconData, {
3188
3544
  cname: nav.act,
3189
- state: curRoute.value === nav.hotData.link ? "act" : "",
3545
+ state: curRoute.value.search(nav.hotData.link) === 0 ? "act" : "",
3190
3546
  states: {
3191
3547
  act: nav.act ?? ""
3192
3548
  },
3193
- class: `w-2d7 h-2d7 ${_ctx.iconTransAni ? "trans-fast" : ""} fsize-1d7`
3549
+ class: `w-2d7 h-2d7 ${__props.iconTransAni ? "trans-fast" : ""} fsize-1d7`
3194
3550
  }), null, 16, ["cname", "state", "states", "class"]),
3195
3551
  nav.text ? (openBlock(), createBlock(_sfc_main$w, {
3196
3552
  key: 2,
@@ -3228,8 +3584,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3228
3584
  modalData: {}
3229
3585
  },
3230
3586
  emits: ["update:datetime", "getData"],
3231
- setup(__props, { expose: __expose, emit }) {
3587
+ setup(__props, { expose: __expose, emit: __emit }) {
3232
3588
  const props = __props;
3589
+ const emit = __emit;
3233
3590
  const state = ref(false);
3234
3591
  const modalData = reactive({
3235
3592
  roundEnable: true,
@@ -3279,8 +3636,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3279
3636
  onGetData: ok,
3280
3637
  datetime: datetime.value,
3281
3638
  "onUpdate:datetime": _cache[0] || (_cache[0] = ($event) => datetime.value = $event),
3282
- format: _ctx.format,
3283
- "btn-data": _ctx.btnData
3639
+ format: __props.format,
3640
+ "btn-data": __props.btnData
3284
3641
  }, null, 8, ["datetime", "format", "btn-data"])
3285
3642
  ]),
3286
3643
  _: 1
@@ -3300,8 +3657,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3300
3657
  btnData: {}
3301
3658
  },
3302
3659
  emits: ["update:datetime", "getData"],
3303
- setup(__props, { emit }) {
3660
+ setup(__props, { emit: __emit }) {
3304
3661
  const props = __props;
3662
+ const emit = __emit;
3305
3663
  const btnData = computed(() => {
3306
3664
  return {
3307
3665
  btnText: "确定",
@@ -3492,9 +3850,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3492
3850
  _: 1
3493
3851
  }, 8, ["state"]),
3494
3852
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3495
- default: withCtx(() => [
3496
- createTextVNode("年")
3497
- ]),
3853
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
3854
+ createTextVNode("年", -1)
3855
+ ])]),
3498
3856
  _: 1
3499
3857
  })
3500
3858
  ]),
@@ -3514,9 +3872,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3514
3872
  _: 1
3515
3873
  }, 8, ["state"]),
3516
3874
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3517
- default: withCtx(() => [
3518
- createTextVNode("月")
3519
- ]),
3875
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
3876
+ createTextVNode("月", -1)
3877
+ ])]),
3520
3878
  _: 1
3521
3879
  })
3522
3880
  ]),
@@ -3536,9 +3894,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3536
3894
  _: 1
3537
3895
  }, 8, ["state"]),
3538
3896
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3539
- default: withCtx(() => [
3540
- createTextVNode("日")
3541
- ]),
3897
+ default: withCtx(() => [..._cache[8] || (_cache[8] = [
3898
+ createTextVNode("日", -1)
3899
+ ])]),
3542
3900
  _: 1
3543
3901
  })
3544
3902
  ]),
@@ -3562,9 +3920,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3562
3920
  _: 1
3563
3921
  }, 8, ["state"]),
3564
3922
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3565
- default: withCtx(() => [
3566
- createTextVNode("时")
3567
- ]),
3923
+ default: withCtx(() => [..._cache[9] || (_cache[9] = [
3924
+ createTextVNode("时", -1)
3925
+ ])]),
3568
3926
  _: 1
3569
3927
  })
3570
3928
  ]),
@@ -3584,9 +3942,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3584
3942
  _: 1
3585
3943
  }, 8, ["state"]),
3586
3944
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3587
- default: withCtx(() => [
3588
- createTextVNode("分")
3589
- ]),
3945
+ default: withCtx(() => [..._cache[10] || (_cache[10] = [
3946
+ createTextVNode("分", -1)
3947
+ ])]),
3590
3948
  _: 1
3591
3949
  })
3592
3950
  ]),
@@ -3606,9 +3964,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3606
3964
  _: 1
3607
3965
  }, 8, ["state"]),
3608
3966
  createVNode(_component_b_text, { class: "pad-h-d4 alpha-d4" }, {
3609
- default: withCtx(() => [
3610
- createTextVNode("秒")
3611
- ]),
3967
+ default: withCtx(() => [..._cache[11] || (_cache[11] = [
3968
+ createTextVNode("秒", -1)
3969
+ ])]),
3612
3970
  _: 1
3613
3971
  })
3614
3972
  ]),
@@ -3675,8 +4033,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3675
4033
  theme: {}
3676
4034
  },
3677
4035
  emits: ["sendPrice", "update:price", "update:input"],
3678
- setup(__props, { expose: __expose, emit }) {
4036
+ setup(__props, { expose: __expose, emit: __emit }) {
3679
4037
  const props = __props;
4038
+ const emit = __emit;
3680
4039
  const state = ref(false);
3681
4040
  const theme2 = reactive({
3682
4041
  dir: "",
@@ -3735,8 +4094,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3735
4094
  visiable: state.value,
3736
4095
  "onUpdate:visiable": _cache[2] || (_cache[2] = ($event) => state.value = $event),
3737
4096
  dir: theme2.dir,
3738
- "matte-color": _ctx.matteColor,
3739
- "matte-close-forbid": _ctx.matteCloseForbid
4097
+ "matte-color": __props.matteColor,
4098
+ "matte-close-forbid": __props.matteCloseForbid
3740
4099
  }, {
3741
4100
  custom: withCtx(() => [
3742
4101
  createVNode(_component_price_wid, {
@@ -3746,7 +4105,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3746
4105
  price: price.value,
3747
4106
  "onUpdate:price": _cache[1] || (_cache[1] = ($event) => price.value = $event),
3748
4107
  theme: theme2,
3749
- "hide-screen": _ctx.hideScreen
4108
+ "hide-screen": __props.hideScreen
3750
4109
  }, createSlots({ _: 2 }, [
3751
4110
  _ctx.$slots.delete ? {
3752
4111
  name: "delete",
@@ -3779,8 +4138,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3779
4138
  theme: {}
3780
4139
  },
3781
4140
  emits: ["sendPrice", "update:input", "update:price"],
3782
- setup(__props, { expose: __expose, emit }) {
4141
+ setup(__props, { expose: __expose, emit: __emit }) {
3783
4142
  const props = __props;
4143
+ const emit = __emit;
3784
4144
  const theme2 = reactive({
3785
4145
  dir: "",
3786
4146
  pannel: "lgray",
@@ -3859,15 +4219,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3859
4219
  class: normalizeClass(`${baseStyle.value} bg-color-${theme2.pannel} color-${theme2.text}`)
3860
4220
  }, {
3861
4221
  default: withCtx(() => [
3862
- !_ctx.hideScreen ? (openBlock(), createBlock(_sfc_main$x, {
4222
+ !__props.hideScreen ? (openBlock(), createBlock(_sfc_main$x, {
3863
4223
  key: 0,
3864
4224
  class: "flex-4 no-wrap pad-1d4"
3865
4225
  }, {
3866
4226
  default: withCtx(() => [
3867
4227
  createVNode(_component_b_text, { class: "fsize-2d4 bold alpha-d4" }, {
3868
- default: withCtx(() => [
3869
- createTextVNode("¥")
3870
- ]),
4228
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
4229
+ createTextVNode("¥", -1)
4230
+ ])]),
3871
4231
  _: 1
3872
4232
  }),
3873
4233
  createVNode(_component_b_input, {
@@ -3963,9 +4323,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3963
4323
  active: `bg-color-${theme2.btn.active}`,
3964
4324
  state: "0"
3965
4325
  }, {
3966
- default: withCtx(() => [
3967
- createTextVNode("0")
3968
- ]),
4326
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [
4327
+ createTextVNode("0", -1)
4328
+ ])]),
3969
4329
  _: 1
3970
4330
  }, 8, ["class", "active"])
3971
4331
  ]),
@@ -3978,9 +4338,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3978
4338
  active: `bg-color-${theme2.btn.active}`,
3979
4339
  state: "."
3980
4340
  }, {
3981
- default: withCtx(() => [
3982
- createTextVNode(".")
3983
- ]),
4341
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
4342
+ createTextVNode(".", -1)
4343
+ ])]),
3984
4344
  _: 1
3985
4345
  }, 8, ["class", "active"])
3986
4346
  ]),
@@ -4033,7 +4393,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4033
4393
  active: {}
4034
4394
  },
4035
4395
  emits: ["on_select"],
4036
- setup(__props, { emit }) {
4396
+ setup(__props, { emit: __emit }) {
4037
4397
  const props = __props;
4038
4398
  const dataTree = ref(props.dataTree || []);
4039
4399
  const selected = inject("selected");
@@ -4064,9 +4424,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4064
4424
  createVNode(_sfc_main$v, {
4065
4425
  cname: `${item.id}-${Math.random()}`,
4066
4426
  class: normalizeClass(`flex-4 pad-v-${gap.value} pad-l-${setIndex(item.level)}`),
4067
- hover: _ctx.hover,
4427
+ hover: __props.hover,
4068
4428
  states: {
4069
- true: `${_ctx.active ? _ctx.active : ""}`,
4429
+ true: `${__props.active ? __props.active : ""}`,
4070
4430
  false: ""
4071
4431
  },
4072
4432
  state: (((_a = unref(selected)) == null ? void 0 : _a.findIndex((data) => data.id === item.id)) > -1).toString()
@@ -4100,11 +4460,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4100
4460
  state: item.spread ? "show" : "hide"
4101
4461
  }, {
4102
4462
  default: withCtx(() => [
4103
- createVNode(_component_content_node_wid, normalizeProps(guardReactiveProps({ ...props, dataTree: item.children })), createSlots({ _: 2 }, [
4463
+ createVNode(_component_content_node_wid, mergeProps({ ref_for: true }, { ...props, dataTree: item.children }), createSlots({ _: 2 }, [
4104
4464
  _ctx.$slots.default ? {
4105
4465
  name: "default",
4106
4466
  fn: withCtx((scope) => [
4107
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))
4467
+ renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, scope))
4108
4468
  ]),
4109
4469
  key: "0"
4110
4470
  } : void 0
@@ -4130,8 +4490,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4130
4490
  active: {}
4131
4491
  },
4132
4492
  emits: ["on_select"],
4133
- setup(__props, { emit }) {
4493
+ setup(__props, { emit: __emit }) {
4134
4494
  const props = __props;
4495
+ const emit = __emit;
4135
4496
  let prefix = 0;
4136
4497
  const flatDataTree = reactive([]);
4137
4498
  const indexDataTree = reactive({});