yd-admin 0.1.11 → 0.1.12
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/README.md +21 -0
- package/dist/index.js +754 -335
- package/dist/style.css +704 -326
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Fragment, Teleport, Transition, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toDisplayString, unref, useCssVars, useSlots, vModelCheckbox, vModelDynamic, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
2
|
+
import { marked } from "marked";
|
|
3
|
+
import hljs from "highlight.js";
|
|
2
4
|
import AsyncValidator from "async-validator";
|
|
3
5
|
import { createI18n } from "vue-i18n";
|
|
4
6
|
import { createMemoryHistory, createRouter as createVueRouter, createWebHashHistory, createWebHistory } from "vue-router";
|
|
@@ -657,11 +659,10 @@ var DynamicRouter = class {
|
|
|
657
659
|
return result;
|
|
658
660
|
}
|
|
659
661
|
/**
|
|
660
|
-
* 路径匹配
|
|
662
|
+
* 路径匹配 (复用 isPathMatch 函数)
|
|
661
663
|
*/
|
|
662
664
|
matchPath(path, pattern) {
|
|
663
|
-
|
|
664
|
-
return pattern.test(path);
|
|
665
|
+
return isPathMatch(path, pattern);
|
|
665
666
|
}
|
|
666
667
|
/**
|
|
667
668
|
* 查找路由名称
|
|
@@ -847,12 +848,12 @@ var export_helper_default = (sfc, props) => {
|
|
|
847
848
|
};
|
|
848
849
|
//#endregion
|
|
849
850
|
//#region src/components/base/button/button.vue
|
|
850
|
-
const _hoisted_1$
|
|
851
|
-
const _hoisted_2$
|
|
851
|
+
const _hoisted_1$58 = ["disabled", "type"];
|
|
852
|
+
const _hoisted_2$38 = {
|
|
852
853
|
key: 0,
|
|
853
854
|
class: "yd-button__loading"
|
|
854
855
|
};
|
|
855
|
-
const _hoisted_3$
|
|
856
|
+
const _hoisted_3$29 = { class: "yd-button__content" };
|
|
856
857
|
var button_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
857
858
|
name: "YdButton",
|
|
858
859
|
__name: "button",
|
|
@@ -897,7 +898,7 @@ var button_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
897
898
|
disabled: __props.disabled || __props.loading,
|
|
898
899
|
type: __props.nativeType,
|
|
899
900
|
onClick: handleClick
|
|
900
|
-
}, [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
901
|
+
}, [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$38, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
|
|
901
902
|
class: "yd-button__spinner",
|
|
902
903
|
viewBox: "0 0 24 24"
|
|
903
904
|
}, [createElementVNode("circle", {
|
|
@@ -909,7 +910,7 @@ var button_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
909
910
|
"stroke-width": "3",
|
|
910
911
|
"stroke-dasharray": "31.4 31.4",
|
|
911
912
|
"stroke-linecap": "round"
|
|
912
|
-
})], -1)])])) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_3$
|
|
913
|
+
})], -1)])])) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_3$29, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 10, _hoisted_1$58);
|
|
913
914
|
};
|
|
914
915
|
}
|
|
915
916
|
}), [["__scopeId", "data-v-08fa2dc1"]]);
|
|
@@ -942,7 +943,7 @@ function getIconRegistry() {
|
|
|
942
943
|
}
|
|
943
944
|
//#endregion
|
|
944
945
|
//#region src/components/base/icon/icon.vue
|
|
945
|
-
const _hoisted_1$
|
|
946
|
+
const _hoisted_1$57 = ["innerHTML"];
|
|
946
947
|
var icon_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
947
948
|
name: "YdIcon",
|
|
948
949
|
inheritAttrs: false,
|
|
@@ -1003,13 +1004,13 @@ var icon_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
1003
1004
|
fill: "none",
|
|
1004
1005
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1005
1006
|
innerHTML: svgContent.value
|
|
1006
|
-
}, null, 10, _hoisted_1$
|
|
1007
|
+
}, null, 10, _hoisted_1$57)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Slot Fallback "), renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2112))], 16);
|
|
1007
1008
|
};
|
|
1008
1009
|
}
|
|
1009
1010
|
}), [["__scopeId", "data-v-bb6b8302"]]);
|
|
1010
1011
|
//#endregion
|
|
1011
1012
|
//#region src/components/base/input/input.vue
|
|
1012
|
-
const _hoisted_1$
|
|
1013
|
+
const _hoisted_1$56 = [
|
|
1013
1014
|
"type",
|
|
1014
1015
|
"value",
|
|
1015
1016
|
"placeholder",
|
|
@@ -1118,7 +1119,7 @@ var input_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
1118
1119
|
onFocus: handleFocus,
|
|
1119
1120
|
onBlur: handleBlur,
|
|
1120
1121
|
onKeydown: handleKeydown
|
|
1121
|
-
}, null, 42, _hoisted_1$
|
|
1122
|
+
}, null, 42, _hoisted_1$56),
|
|
1122
1123
|
__props.clearable && __props.modelValue && !__props.disabled ? (openBlock(), createElementBlock("span", {
|
|
1123
1124
|
key: 1,
|
|
1124
1125
|
class: normalizeClass(e("clear")),
|
|
@@ -1141,7 +1142,7 @@ var input_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
1141
1142
|
}), [["__scopeId", "data-v-5c21184f"]]);
|
|
1142
1143
|
//#endregion
|
|
1143
1144
|
//#region src/components/base/textarea/textarea.vue
|
|
1144
|
-
const _hoisted_1$
|
|
1145
|
+
const _hoisted_1$55 = [
|
|
1145
1146
|
"value",
|
|
1146
1147
|
"placeholder",
|
|
1147
1148
|
"disabled",
|
|
@@ -1235,7 +1236,7 @@ var textarea_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
1235
1236
|
onChange: handleChange,
|
|
1236
1237
|
onFocus: handleFocus,
|
|
1237
1238
|
onBlur: handleBlur
|
|
1238
|
-
}, null, 42, _hoisted_1$
|
|
1239
|
+
}, null, 42, _hoisted_1$55), __props.showWordLimit && __props.maxlength ? (openBlock(), createElementBlock("span", {
|
|
1239
1240
|
key: 0,
|
|
1240
1241
|
class: normalizeClass(e("word-limit"))
|
|
1241
1242
|
}, toDisplayString(String(__props.modelValue).length) + "/" + toDisplayString(__props.maxlength), 3)) : createCommentVNode("v-if", true)], 2);
|
|
@@ -1244,9 +1245,9 @@ var textarea_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
1244
1245
|
}), [["__scopeId", "data-v-13af2da6"]]);
|
|
1245
1246
|
//#endregion
|
|
1246
1247
|
//#region src/components/base/input-number/input-number.vue
|
|
1247
|
-
const _hoisted_1$
|
|
1248
|
-
const _hoisted_2$
|
|
1249
|
-
const _hoisted_3$
|
|
1248
|
+
const _hoisted_1$54 = ["disabled"];
|
|
1249
|
+
const _hoisted_2$37 = ["value", "disabled"];
|
|
1250
|
+
const _hoisted_3$28 = ["disabled"];
|
|
1250
1251
|
var input_number_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1251
1252
|
name: "YdInputNumber",
|
|
1252
1253
|
__name: "input-number",
|
|
@@ -1341,7 +1342,7 @@ var input_number_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
1341
1342
|
y1: "12",
|
|
1342
1343
|
x2: "19",
|
|
1343
1344
|
y2: "12"
|
|
1344
|
-
})], -1)])], 10, _hoisted_1$
|
|
1345
|
+
})], -1)])], 10, _hoisted_1$54),
|
|
1345
1346
|
createElementVNode("input", {
|
|
1346
1347
|
ref_key: "inputRef",
|
|
1347
1348
|
ref: inputRef,
|
|
@@ -1352,7 +1353,7 @@ var input_number_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
1352
1353
|
onInput: handleInput,
|
|
1353
1354
|
onBlur: handleBlur,
|
|
1354
1355
|
onKeydown: handleKeydown
|
|
1355
|
-
}, null, 42, _hoisted_2$
|
|
1356
|
+
}, null, 42, _hoisted_2$37),
|
|
1356
1357
|
createElementVNode("button", {
|
|
1357
1358
|
class: normalizeClass(e("btn")),
|
|
1358
1359
|
disabled: __props.disabled || __props.modelValue >= __props.max,
|
|
@@ -1377,7 +1378,7 @@ var input_number_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
1377
1378
|
y1: "12",
|
|
1378
1379
|
x2: "19",
|
|
1379
1380
|
y2: "12"
|
|
1380
|
-
})], -1)])], 10, _hoisted_3$
|
|
1381
|
+
})], -1)])], 10, _hoisted_3$28)
|
|
1381
1382
|
], 2)], 2);
|
|
1382
1383
|
};
|
|
1383
1384
|
}
|
|
@@ -1429,13 +1430,13 @@ var empty_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
1429
1430
|
}), [["__scopeId", "data-v-ed413d74"]]);
|
|
1430
1431
|
//#endregion
|
|
1431
1432
|
//#region src/components/base/select/select.vue
|
|
1432
|
-
const _hoisted_1$
|
|
1433
|
+
const _hoisted_1$53 = [
|
|
1433
1434
|
"value",
|
|
1434
1435
|
"placeholder",
|
|
1435
1436
|
"disabled"
|
|
1436
1437
|
];
|
|
1437
|
-
const _hoisted_2$
|
|
1438
|
-
const _hoisted_3$
|
|
1438
|
+
const _hoisted_2$36 = ["onClick"];
|
|
1439
|
+
const _hoisted_3$27 = ["onClick"];
|
|
1439
1440
|
var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1440
1441
|
name: "YdSelect",
|
|
1441
1442
|
inheritAttrs: false,
|
|
@@ -1486,7 +1487,7 @@ var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1486
1487
|
"blur",
|
|
1487
1488
|
"search"
|
|
1488
1489
|
],
|
|
1489
|
-
setup(__props, { emit: __emit }) {
|
|
1490
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1490
1491
|
const props = __props;
|
|
1491
1492
|
const emit = __emit;
|
|
1492
1493
|
const selectRef = ref();
|
|
@@ -1637,6 +1638,22 @@ var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1637
1638
|
window.removeEventListener("scroll", handleWindowScroll, true);
|
|
1638
1639
|
window.removeEventListener("resize", handleWindowResize);
|
|
1639
1640
|
});
|
|
1641
|
+
__expose({
|
|
1642
|
+
focus: () => {
|
|
1643
|
+
(selectRef.value?.querySelector("input"))?.focus();
|
|
1644
|
+
},
|
|
1645
|
+
blur: () => {
|
|
1646
|
+
(selectRef.value?.querySelector("input"))?.blur();
|
|
1647
|
+
},
|
|
1648
|
+
getValue: () => props.modelValue,
|
|
1649
|
+
getLabel: () => selectedLabel.value,
|
|
1650
|
+
open: () => {
|
|
1651
|
+
visible.value = true;
|
|
1652
|
+
},
|
|
1653
|
+
close: () => {
|
|
1654
|
+
visible.value = false;
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1640
1657
|
return (_ctx, _cache) => {
|
|
1641
1658
|
return openBlock(), createElementBlock("div", {
|
|
1642
1659
|
ref_key: "selectRef",
|
|
@@ -1662,7 +1679,7 @@ var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1662
1679
|
onFocus: handleFocus,
|
|
1663
1680
|
onBlur: handleBlur,
|
|
1664
1681
|
onKeydown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
1665
|
-
}, null, 42, _hoisted_1$
|
|
1682
|
+
}, null, 42, _hoisted_1$53)) : (openBlock(), createElementBlock("div", {
|
|
1666
1683
|
key: 1,
|
|
1667
1684
|
class: normalizeClass([e("display"), { [e("display--placeholder")]: !selectedLabel.value }])
|
|
1668
1685
|
}, toDisplayString(selectedLabel.value || __props.placeholder), 3)),
|
|
@@ -1715,7 +1732,7 @@ var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1715
1732
|
}, [createElementVNode("span", null, toDisplayString(opt.label), 1), isSelected(opt.value) ? (openBlock(), createElementBlock("span", {
|
|
1716
1733
|
key: 0,
|
|
1717
1734
|
class: normalizeClass(e("check"))
|
|
1718
|
-
}, "✓", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_2$
|
|
1735
|
+
}, "✓", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_2$36);
|
|
1719
1736
|
}), 128))], 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Option "), createElementVNode("div", {
|
|
1720
1737
|
class: normalizeClass([e("option"), {
|
|
1721
1738
|
[e("option--active")]: isSelected(option.value),
|
|
@@ -1725,17 +1742,17 @@ var select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1725
1742
|
}, [createElementVNode("span", null, toDisplayString(option.label), 1), isSelected(option.value) ? (openBlock(), createElementBlock("span", {
|
|
1726
1743
|
key: 0,
|
|
1727
1744
|
class: normalizeClass(e("check"))
|
|
1728
|
-
}, "✓", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_3$
|
|
1745
|
+
}, "✓", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_3$27)], 2112))], 64);
|
|
1729
1746
|
}), 128))], 6))], 6)) : createCommentVNode("v-if", true)]),
|
|
1730
1747
|
_: 1
|
|
1731
1748
|
})]))
|
|
1732
1749
|
], 2);
|
|
1733
1750
|
};
|
|
1734
1751
|
}
|
|
1735
|
-
}), [["__scopeId", "data-v-
|
|
1752
|
+
}), [["__scopeId", "data-v-8cade129"]]);
|
|
1736
1753
|
//#endregion
|
|
1737
1754
|
//#region src/components/base/switch/switch.vue
|
|
1738
|
-
const _hoisted_1$
|
|
1755
|
+
const _hoisted_1$52 = ["aria-checked", "disabled"];
|
|
1739
1756
|
var switch_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1740
1757
|
name: "YdSwitch",
|
|
1741
1758
|
__name: "switch",
|
|
@@ -1771,13 +1788,13 @@ var switch_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
1771
1788
|
class: normalizeClass(switchClasses.value),
|
|
1772
1789
|
disabled: __props.disabled,
|
|
1773
1790
|
onClick: toggle
|
|
1774
|
-
}, [createElementVNode("span", { class: normalizeClass(e("thumb")) }, null, 2)], 10, _hoisted_1$
|
|
1791
|
+
}, [createElementVNode("span", { class: normalizeClass(e("thumb")) }, null, 2)], 10, _hoisted_1$52);
|
|
1775
1792
|
};
|
|
1776
1793
|
}
|
|
1777
1794
|
}), [["__scopeId", "data-v-178da0de"]]);
|
|
1778
1795
|
//#endregion
|
|
1779
1796
|
//#region src/components/base/checkbox/checkbox.vue
|
|
1780
|
-
const _hoisted_1$
|
|
1797
|
+
const _hoisted_1$51 = [
|
|
1781
1798
|
"checked",
|
|
1782
1799
|
"disabled",
|
|
1783
1800
|
"value"
|
|
@@ -1830,7 +1847,7 @@ var checkbox_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
1830
1847
|
disabled: __props.disabled,
|
|
1831
1848
|
value: __props.value,
|
|
1832
1849
|
onChange: handleChange
|
|
1833
|
-
}, null, 42, _hoisted_1$
|
|
1850
|
+
}, null, 42, _hoisted_1$51),
|
|
1834
1851
|
createElementVNode("span", { class: normalizeClass(e("box")) }, [__props.modelValue ? (openBlock(), createElementBlock("svg", {
|
|
1835
1852
|
key: 0,
|
|
1836
1853
|
class: normalizeClass(e("icon")),
|
|
@@ -1897,7 +1914,7 @@ var checkbox_group_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
1897
1914
|
}), [["__scopeId", "data-v-3dce3e2c"]]);
|
|
1898
1915
|
//#endregion
|
|
1899
1916
|
//#region src/components/base/radio/radio.vue
|
|
1900
|
-
const _hoisted_1$
|
|
1917
|
+
const _hoisted_1$50 = [
|
|
1901
1918
|
"checked",
|
|
1902
1919
|
"disabled",
|
|
1903
1920
|
"value",
|
|
@@ -1953,7 +1970,7 @@ var radio_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
1953
1970
|
value: __props.value,
|
|
1954
1971
|
name: __props.name,
|
|
1955
1972
|
onChange: handleChange
|
|
1956
|
-
}, null, 42, _hoisted_1$
|
|
1973
|
+
}, null, 42, _hoisted_1$50),
|
|
1957
1974
|
createElementVNode("span", { class: normalizeClass(e("dot")) }, null, 2),
|
|
1958
1975
|
_ctx.$slots.default || __props.label ? (openBlock(), createElementBlock("span", {
|
|
1959
1976
|
key: 0,
|
|
@@ -2073,7 +2090,7 @@ var tag_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineCo
|
|
|
2073
2090
|
}), [["__scopeId", "data-v-ae4235fd"]]);
|
|
2074
2091
|
//#endregion
|
|
2075
2092
|
//#region src/components/base/avatar/avatar.vue
|
|
2076
|
-
const _hoisted_1$
|
|
2093
|
+
const _hoisted_1$49 = ["src", "alt"];
|
|
2077
2094
|
var avatar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
2078
2095
|
name: "YdAvatar",
|
|
2079
2096
|
__name: "avatar",
|
|
@@ -2101,7 +2118,7 @@ var avatar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
2101
2118
|
src: __props.src,
|
|
2102
2119
|
alt: __props.alt,
|
|
2103
2120
|
onError: handleError
|
|
2104
|
-
}, null, 40, _hoisted_1$
|
|
2121
|
+
}, null, 40, _hoisted_1$49)) : _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
2105
2122
|
key: 1,
|
|
2106
2123
|
class: normalizeClass(e("text"))
|
|
2107
2124
|
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2)) : (openBlock(), createElementBlock("span", {
|
|
@@ -2161,7 +2178,7 @@ var badge_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
2161
2178
|
}), [["__scopeId", "data-v-9b63f1ae"]]);
|
|
2162
2179
|
//#endregion
|
|
2163
2180
|
//#region src/components/base/rate/rate.vue
|
|
2164
|
-
const _hoisted_1$
|
|
2181
|
+
const _hoisted_1$48 = ["onClick", "onMouseenter"];
|
|
2165
2182
|
var rate_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
2166
2183
|
name: "YdRate",
|
|
2167
2184
|
__name: "rate",
|
|
@@ -2226,7 +2243,7 @@ var rate_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
2226
2243
|
viewBox: "0 0 24 24",
|
|
2227
2244
|
fill: "currentColor",
|
|
2228
2245
|
stroke: "none"
|
|
2229
|
-
}, [..._cache[1] || (_cache[1] = [createElementVNode("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }, null, -1)])], 2))], 42, _hoisted_1$
|
|
2246
|
+
}, [..._cache[1] || (_cache[1] = [createElementVNode("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }, null, -1)])], 2))], 42, _hoisted_1$48);
|
|
2230
2247
|
}), 128)), __props.showText ? (openBlock(), createElementBlock("span", {
|
|
2231
2248
|
key: 0,
|
|
2232
2249
|
class: normalizeClass(e("text"))
|
|
@@ -2315,14 +2332,14 @@ var slider_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
2315
2332
|
}), [["__scopeId", "data-v-51e82523"]]);
|
|
2316
2333
|
//#endregion
|
|
2317
2334
|
//#region src/components/base/date-picker/date-picker.vue
|
|
2318
|
-
const _hoisted_1$
|
|
2335
|
+
const _hoisted_1$47 = [
|
|
2319
2336
|
"value",
|
|
2320
2337
|
"placeholder",
|
|
2321
2338
|
"disabled"
|
|
2322
2339
|
];
|
|
2323
|
-
const _hoisted_2$
|
|
2324
|
-
const _hoisted_3$
|
|
2325
|
-
const _hoisted_4$
|
|
2340
|
+
const _hoisted_2$35 = ["onClick"];
|
|
2341
|
+
const _hoisted_3$26 = ["onClick"];
|
|
2342
|
+
const _hoisted_4$24 = ["disabled", "onClick"];
|
|
2326
2343
|
var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
2327
2344
|
name: "YdDatePicker",
|
|
2328
2345
|
__name: "date-picker",
|
|
@@ -2336,7 +2353,7 @@ var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2336
2353
|
type: { default: "date" }
|
|
2337
2354
|
},
|
|
2338
2355
|
emits: ["update:modelValue", "change"],
|
|
2339
|
-
setup(__props, { emit: __emit }) {
|
|
2356
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2340
2357
|
const props = __props;
|
|
2341
2358
|
const emit = __emit;
|
|
2342
2359
|
const visible = ref(false);
|
|
@@ -2513,6 +2530,17 @@ var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2513
2530
|
document.removeEventListener("click", handleClickOutside);
|
|
2514
2531
|
window.removeEventListener("scroll", debouncedScrollHandler, true);
|
|
2515
2532
|
});
|
|
2533
|
+
__expose({
|
|
2534
|
+
open: () => {
|
|
2535
|
+
visible.value = true;
|
|
2536
|
+
},
|
|
2537
|
+
close: () => {
|
|
2538
|
+
visible.value = false;
|
|
2539
|
+
},
|
|
2540
|
+
focus: () => {
|
|
2541
|
+
triggerRef.value?.querySelector("input")?.focus();
|
|
2542
|
+
}
|
|
2543
|
+
});
|
|
2516
2544
|
return (_ctx, _cache) => {
|
|
2517
2545
|
return openBlock(), createElementBlock("div", {
|
|
2518
2546
|
class: normalizeClass(unref(cn)("yd-date-picker")),
|
|
@@ -2526,7 +2554,7 @@ var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2526
2554
|
disabled: __props.disabled,
|
|
2527
2555
|
readonly: "",
|
|
2528
2556
|
onClick: withModifiers(togglePicker, ["stop"])
|
|
2529
|
-
}, null, 10, _hoisted_1$
|
|
2557
|
+
}, null, 10, _hoisted_1$47),
|
|
2530
2558
|
createElementVNode("span", {
|
|
2531
2559
|
class: normalizeClass(e("icon")),
|
|
2532
2560
|
onClick: withModifiers(togglePicker, ["stop"])
|
|
@@ -2550,13 +2578,13 @@ var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2550
2578
|
key: y,
|
|
2551
2579
|
class: normalizeClass([e("year"), { [e("year--selected")]: selectedYear.value === y }]),
|
|
2552
2580
|
onClick: withModifiers(($event) => selectYear(y), ["stop"])
|
|
2553
|
-
}, toDisplayString(y), 11, _hoisted_2$
|
|
2581
|
+
}, toDisplayString(y), 11, _hoisted_2$35);
|
|
2554
2582
|
}), 128))], 2)], 2)) : view.value === "month" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Month selection "), createElementVNode("div", { class: normalizeClass(e("view")) }, [createElementVNode("div", { class: normalizeClass(e("view-header")) }, [createElementVNode("button", { onClick: _cache[0] || (_cache[0] = withModifiers(($event) => view.value = "year", ["stop"])) }, toDisplayString(selectedYear.value), 1)], 2), createElementVNode("div", { class: normalizeClass(e("months")) }, [(openBlock(), createElementBlock(Fragment, null, renderList(months, (m, i) => {
|
|
2555
2583
|
return createElementVNode("button", {
|
|
2556
2584
|
key: i,
|
|
2557
2585
|
class: normalizeClass([e("month"), { [e("month--selected")]: selectedMonth.value === i }]),
|
|
2558
2586
|
onClick: withModifiers(($event) => selectMonth(i), ["stop"])
|
|
2559
|
-
}, toDisplayString(m), 11, _hoisted_3$
|
|
2587
|
+
}, toDisplayString(m), 11, _hoisted_3$26);
|
|
2560
2588
|
}), 64))], 2)], 2)], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Date selection "), createElementVNode("div", { class: normalizeClass(e("view")) }, [
|
|
2561
2589
|
createElementVNode("div", { class: normalizeClass(e("header")) }, [
|
|
2562
2590
|
createElementVNode("button", { onClick: withModifiers(prevMonth, ["stop"]) }, "‹"),
|
|
@@ -2587,21 +2615,21 @@ var date_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2587
2615
|
}]),
|
|
2588
2616
|
disabled: !day.current,
|
|
2589
2617
|
onClick: withModifiers(($event) => selectDate(day), ["stop"])
|
|
2590
|
-
}, toDisplayString(day.date.getDate()), 11, _hoisted_4$
|
|
2618
|
+
}, toDisplayString(day.date.getDate()), 11, _hoisted_4$24);
|
|
2591
2619
|
}), 128))], 2)
|
|
2592
2620
|
], 2)], 2112))], 38)) : createCommentVNode("v-if", true)]))
|
|
2593
2621
|
], 2);
|
|
2594
2622
|
};
|
|
2595
2623
|
}
|
|
2596
|
-
}), [["__scopeId", "data-v-
|
|
2624
|
+
}), [["__scopeId", "data-v-23f9364e"]]);
|
|
2597
2625
|
//#endregion
|
|
2598
2626
|
//#region src/components/base/date-picker/date-range-picker.vue
|
|
2599
|
-
const _hoisted_1$
|
|
2627
|
+
const _hoisted_1$46 = [
|
|
2600
2628
|
"value",
|
|
2601
2629
|
"placeholder",
|
|
2602
2630
|
"disabled"
|
|
2603
2631
|
];
|
|
2604
|
-
const _hoisted_2$
|
|
2632
|
+
const _hoisted_2$34 = [
|
|
2605
2633
|
"disabled",
|
|
2606
2634
|
"onClick",
|
|
2607
2635
|
"onMouseenter"
|
|
@@ -2767,7 +2795,7 @@ var date_range_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE
|
|
|
2767
2795
|
placeholder: __props.placeholder,
|
|
2768
2796
|
disabled: __props.disabled,
|
|
2769
2797
|
readonly: ""
|
|
2770
|
-
}, null, 10, _hoisted_1$
|
|
2798
|
+
}, null, 10, _hoisted_1$46),
|
|
2771
2799
|
createElementVNode("span", { class: normalizeClass(e("icon")) }, "📅", 2),
|
|
2772
2800
|
(openBlock(), createBlock(Teleport, { to: "body" }, [visible.value ? (openBlock(), createElementBlock("div", {
|
|
2773
2801
|
key: 0,
|
|
@@ -2805,7 +2833,7 @@ var date_range_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE
|
|
|
2805
2833
|
onClick: withModifiers(($event) => selectDate(day), ["stop"]),
|
|
2806
2834
|
onMouseenter: ($event) => hoverDate.value = formatDate(day.date),
|
|
2807
2835
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => hoverDate.value = "")
|
|
2808
|
-
}, toDisplayString(day.date.getDate()), 43, _hoisted_2$
|
|
2836
|
+
}, toDisplayString(day.date.getDate()), 43, _hoisted_2$34);
|
|
2809
2837
|
}), 128))], 2)
|
|
2810
2838
|
], 6)) : createCommentVNode("v-if", true)]))
|
|
2811
2839
|
], 2);
|
|
@@ -2814,14 +2842,14 @@ var date_range_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE
|
|
|
2814
2842
|
}), [["__scopeId", "data-v-c307df48"]]);
|
|
2815
2843
|
//#endregion
|
|
2816
2844
|
//#region src/components/base/time-picker/time-picker.vue
|
|
2817
|
-
const _hoisted_1$
|
|
2845
|
+
const _hoisted_1$45 = [
|
|
2818
2846
|
"value",
|
|
2819
2847
|
"placeholder",
|
|
2820
2848
|
"disabled"
|
|
2821
2849
|
];
|
|
2822
|
-
const _hoisted_2$
|
|
2823
|
-
const _hoisted_3$
|
|
2824
|
-
const _hoisted_4$
|
|
2850
|
+
const _hoisted_2$33 = ["onClick"];
|
|
2851
|
+
const _hoisted_3$25 = ["onClick"];
|
|
2852
|
+
const _hoisted_4$23 = ["onClick"];
|
|
2825
2853
|
var time_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
2826
2854
|
name: "YdTimePicker",
|
|
2827
2855
|
__name: "time-picker",
|
|
@@ -2898,7 +2926,7 @@ var time_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2898
2926
|
placeholder: __props.placeholder,
|
|
2899
2927
|
disabled: __props.disabled,
|
|
2900
2928
|
readonly: ""
|
|
2901
|
-
}, null, 10, _hoisted_1$
|
|
2929
|
+
}, null, 10, _hoisted_1$45), (openBlock(), createBlock(Teleport, { to: "body" }, [visible.value ? (openBlock(), createElementBlock("div", {
|
|
2902
2930
|
key: 0,
|
|
2903
2931
|
class: normalizeClass(e("panel")),
|
|
2904
2932
|
style: normalizeStyle(panelStyle.value)
|
|
@@ -2908,14 +2936,14 @@ var time_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2908
2936
|
key: h - 1,
|
|
2909
2937
|
class: normalizeClass([e("item"), { [e("item--active")]: selectedHour.value === h - 1 }]),
|
|
2910
2938
|
onClick: ($event) => selectHour(h - 1)
|
|
2911
|
-
}, toDisplayString(String(h - 1).padStart(2, "0")), 11, _hoisted_2$
|
|
2939
|
+
}, toDisplayString(String(h - 1).padStart(2, "0")), 11, _hoisted_2$33);
|
|
2912
2940
|
}), 64))], 2),
|
|
2913
2941
|
createElementVNode("div", { class: normalizeClass(e("column")) }, [(openBlock(), createElementBlock(Fragment, null, renderList(60, (m) => {
|
|
2914
2942
|
return createElementVNode("div", {
|
|
2915
2943
|
key: m - 1,
|
|
2916
2944
|
class: normalizeClass([e("item"), { [e("item--active")]: selectedMinute.value === m - 1 }]),
|
|
2917
2945
|
onClick: ($event) => selectMinute(m - 1)
|
|
2918
|
-
}, toDisplayString(String(m - 1).padStart(2, "0")), 11, _hoisted_3$
|
|
2946
|
+
}, toDisplayString(String(m - 1).padStart(2, "0")), 11, _hoisted_3$25);
|
|
2919
2947
|
}), 64))], 2),
|
|
2920
2948
|
__props.showSeconds ? (openBlock(), createElementBlock("div", {
|
|
2921
2949
|
key: 0,
|
|
@@ -2925,7 +2953,7 @@ var time_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2925
2953
|
key: s - 1,
|
|
2926
2954
|
class: normalizeClass([e("item"), { [e("item--active")]: selectedSecond.value === s - 1 }]),
|
|
2927
2955
|
onClick: ($event) => selectSecond(s - 1)
|
|
2928
|
-
}, toDisplayString(String(s - 1).padStart(2, "0")), 11, _hoisted_4$
|
|
2956
|
+
}, toDisplayString(String(s - 1).padStart(2, "0")), 11, _hoisted_4$23);
|
|
2929
2957
|
}), 64))], 2)) : createCommentVNode("v-if", true)
|
|
2930
2958
|
], 2)], 6)) : createCommentVNode("v-if", true)]))], 2);
|
|
2931
2959
|
};
|
|
@@ -2933,15 +2961,15 @@ var time_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
2933
2961
|
}), [["__scopeId", "data-v-a6fe401a"]]);
|
|
2934
2962
|
//#endregion
|
|
2935
2963
|
//#region src/components/base/cascader/cascader.vue
|
|
2936
|
-
const _hoisted_1$
|
|
2964
|
+
const _hoisted_1$44 = [
|
|
2937
2965
|
"value",
|
|
2938
2966
|
"placeholder",
|
|
2939
2967
|
"disabled",
|
|
2940
2968
|
"readonly"
|
|
2941
2969
|
];
|
|
2942
|
-
const _hoisted_2$
|
|
2943
|
-
const _hoisted_3$
|
|
2944
|
-
const _hoisted_4$
|
|
2970
|
+
const _hoisted_2$32 = ["onClick"];
|
|
2971
|
+
const _hoisted_3$24 = ["onClick"];
|
|
2972
|
+
const _hoisted_4$22 = ["onClick"];
|
|
2945
2973
|
var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
2946
2974
|
name: "YdCascader",
|
|
2947
2975
|
__name: "cascader",
|
|
@@ -3154,7 +3182,7 @@ var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3154
3182
|
onInput: handleSearch,
|
|
3155
3183
|
onFocus: handleFocus,
|
|
3156
3184
|
onBlur: handleBlur
|
|
3157
|
-
}, null, 42, _hoisted_1$
|
|
3185
|
+
}, null, 42, _hoisted_1$44), (openBlock(), createBlock(Teleport, { to: "body" }, [visible.value ? (openBlock(), createElementBlock("div", {
|
|
3158
3186
|
key: 0,
|
|
3159
3187
|
class: normalizeClass(e("dropdown")),
|
|
3160
3188
|
style: normalizeStyle(dropdownStyle.value),
|
|
@@ -3177,7 +3205,7 @@ var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3177
3205
|
}), 128)), __props.multiple ? (openBlock(), createElementBlock("span", {
|
|
3178
3206
|
key: 0,
|
|
3179
3207
|
class: normalizeClass(e("checkmark"))
|
|
3180
|
-
}, toDisplayString(isPathSelected(item.path) ? "✓" : ""), 3)) : createCommentVNode("v-if", true)], 10, _hoisted_2$
|
|
3208
|
+
}, toDisplayString(isPathSelected(item.path) ? "✓" : ""), 3)) : createCommentVNode("v-if", true)], 10, _hoisted_2$32);
|
|
3181
3209
|
}), 128)), searchResults.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
3182
3210
|
key: 0,
|
|
3183
3211
|
class: normalizeClass(e("empty"))
|
|
@@ -3189,7 +3217,7 @@ var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3189
3217
|
}, [createTextVNode(toDisplayString(option.label) + " ", 1), option.children?.length ? (openBlock(), createElementBlock("span", {
|
|
3190
3218
|
key: 0,
|
|
3191
3219
|
class: normalizeClass(e("arrow"))
|
|
3192
|
-
}, "›", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_3$
|
|
3220
|
+
}, "›", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_3$24);
|
|
3193
3221
|
}), 128))], 2), (openBlock(true), createElementBlock(Fragment, null, renderList(activePath.value.length, (level) => {
|
|
3194
3222
|
return openBlock(), createElementBlock(Fragment, { key: level }, [activePath.value[level - 1]?.children?.length ? (openBlock(), createElementBlock("div", {
|
|
3195
3223
|
key: 0,
|
|
@@ -3202,7 +3230,7 @@ var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3202
3230
|
}, [createTextVNode(toDisplayString(option.label) + " ", 1), option.children?.length ? (openBlock(), createElementBlock("span", {
|
|
3203
3231
|
key: 0,
|
|
3204
3232
|
class: normalizeClass(e("arrow"))
|
|
3205
|
-
}, "›", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_4$
|
|
3233
|
+
}, "›", 2)) : createCommentVNode("v-if", true)], 10, _hoisted_4$22);
|
|
3206
3234
|
}), 128))], 2)) : createCommentVNode("v-if", true)], 64);
|
|
3207
3235
|
}), 128))], 2)], 2112))], 38)) : createCommentVNode("v-if", true)]))], 2);
|
|
3208
3236
|
};
|
|
@@ -3210,7 +3238,7 @@ var cascader_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3210
3238
|
}), [["__scopeId", "data-v-01225c10"]]);
|
|
3211
3239
|
//#endregion
|
|
3212
3240
|
//#region src/components/base/auto-complete/auto-complete.vue
|
|
3213
|
-
const _hoisted_1$
|
|
3241
|
+
const _hoisted_1$43 = ["onClick", "onMouseenter"];
|
|
3214
3242
|
var auto_complete_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
3215
3243
|
name: "YdAutoComplete",
|
|
3216
3244
|
__name: "auto-complete",
|
|
@@ -3294,15 +3322,15 @@ var auto_complete_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ *
|
|
|
3294
3322
|
class: normalizeClass([e("option"), { [e("option--active")]: index === activeIndex.value }]),
|
|
3295
3323
|
onClick: ($event) => selectOption(option),
|
|
3296
3324
|
onMouseenter: ($event) => activeIndex.value = index
|
|
3297
|
-
}, toDisplayString(option.label), 43, _hoisted_1$
|
|
3325
|
+
}, toDisplayString(option.label), 43, _hoisted_1$43);
|
|
3298
3326
|
}), 128))], 6)) : createCommentVNode("v-if", true)]))], 2);
|
|
3299
3327
|
};
|
|
3300
3328
|
}
|
|
3301
3329
|
}), [["__scopeId", "data-v-0251e526"]]);
|
|
3302
3330
|
//#endregion
|
|
3303
3331
|
//#region src/components/base/transfer/transfer.vue
|
|
3304
|
-
const _hoisted_1$
|
|
3305
|
-
const _hoisted_2$
|
|
3332
|
+
const _hoisted_1$42 = ["onClick"];
|
|
3333
|
+
const _hoisted_2$31 = ["onClick"];
|
|
3306
3334
|
var transfer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
3307
3335
|
name: "YdTransfer",
|
|
3308
3336
|
__name: "transfer",
|
|
@@ -3377,7 +3405,7 @@ var transfer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3377
3405
|
"model-value",
|
|
3378
3406
|
"disabled",
|
|
3379
3407
|
"onChange"
|
|
3380
|
-
])], 10, _hoisted_1$
|
|
3408
|
+
])], 10, _hoisted_1$42);
|
|
3381
3409
|
}), 128)), sourceOptions.value.length === 0 ? (openBlock(), createBlock(empty_default, {
|
|
3382
3410
|
key: 0,
|
|
3383
3411
|
description: "暂无数据"
|
|
@@ -3425,7 +3453,7 @@ var transfer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3425
3453
|
"model-value",
|
|
3426
3454
|
"disabled",
|
|
3427
3455
|
"onChange"
|
|
3428
|
-
])], 10, _hoisted_2$
|
|
3456
|
+
])], 10, _hoisted_2$31);
|
|
3429
3457
|
}), 128)), targetOptions.value.length === 0 ? (openBlock(), createBlock(empty_default, {
|
|
3430
3458
|
key: 0,
|
|
3431
3459
|
description: "暂无数据"
|
|
@@ -3436,7 +3464,7 @@ var transfer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
3436
3464
|
}), [["__scopeId", "data-v-a2e1ecd2"]]);
|
|
3437
3465
|
//#endregion
|
|
3438
3466
|
//#region src/components/feedback/spin/spin.vue
|
|
3439
|
-
const _hoisted_1$
|
|
3467
|
+
const _hoisted_1$41 = ["width", "height"];
|
|
3440
3468
|
var spin_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
3441
3469
|
name: "YdSpin",
|
|
3442
3470
|
__name: "spin",
|
|
@@ -3474,7 +3502,7 @@ var spin_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
3474
3502
|
"stroke-width": "2",
|
|
3475
3503
|
"stroke-linecap": "round",
|
|
3476
3504
|
"stroke-linejoin": "round"
|
|
3477
|
-
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }, null, -1)])], 8, _hoisted_1$
|
|
3505
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }, null, -1)])], 8, _hoisted_1$41))], true)], 6), _ctx.$slots.default || __props.tip ? (openBlock(), createElementBlock("div", {
|
|
3478
3506
|
key: 0,
|
|
3479
3507
|
class: normalizeClass(e("text"))
|
|
3480
3508
|
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.tip), 1)], true)], 2)) : createCommentVNode("v-if", true)], 2);
|
|
@@ -3483,8 +3511,8 @@ var spin_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
3483
3511
|
}), [["__scopeId", "data-v-f72fb3d9"]]);
|
|
3484
3512
|
//#endregion
|
|
3485
3513
|
//#region src/components/base/upload/upload.vue
|
|
3486
|
-
const _hoisted_1$
|
|
3487
|
-
const _hoisted_2$
|
|
3514
|
+
const _hoisted_1$40 = ["onClick"];
|
|
3515
|
+
const _hoisted_2$30 = [
|
|
3488
3516
|
"multiple",
|
|
3489
3517
|
"accept",
|
|
3490
3518
|
"disabled"
|
|
@@ -3514,7 +3542,7 @@ var upload_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
3514
3542
|
"remove",
|
|
3515
3543
|
"exceed"
|
|
3516
3544
|
],
|
|
3517
|
-
setup(__props, { emit: __emit }) {
|
|
3545
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3518
3546
|
const props = __props;
|
|
3519
3547
|
const emit = __emit;
|
|
3520
3548
|
const inputRef = ref();
|
|
@@ -3593,6 +3621,14 @@ var upload_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
3593
3621
|
emit("update:fileList", newFileList);
|
|
3594
3622
|
emit("remove", file, newFileList);
|
|
3595
3623
|
}
|
|
3624
|
+
__expose({
|
|
3625
|
+
triggerBrowse: () => {
|
|
3626
|
+
inputRef.value?.click();
|
|
3627
|
+
},
|
|
3628
|
+
clearFiles: () => {
|
|
3629
|
+
emit("update:fileList", []);
|
|
3630
|
+
}
|
|
3631
|
+
});
|
|
3596
3632
|
return (_ctx, _cache) => {
|
|
3597
3633
|
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("yd-upload")) }, [
|
|
3598
3634
|
createElementVNode("div", { class: normalizeClass(e("list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.fileList, (file, index) => {
|
|
@@ -3616,7 +3652,7 @@ var upload_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
3616
3652
|
key: 3,
|
|
3617
3653
|
class: normalizeClass(e("file-remove")),
|
|
3618
3654
|
onClick: ($event) => handleRemove(index)
|
|
3619
|
-
}, "✕", 10, _hoisted_1$
|
|
3655
|
+
}, "✕", 10, _hoisted_1$40)) : createCommentVNode("v-if", true)
|
|
3620
3656
|
], 2);
|
|
3621
3657
|
}), 128))], 2),
|
|
3622
3658
|
createElementVNode("div", {
|
|
@@ -3637,7 +3673,7 @@ var upload_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
3637
3673
|
disabled: __props.disabled,
|
|
3638
3674
|
hidden: "",
|
|
3639
3675
|
onChange: handleFileChange
|
|
3640
|
-
}, null, 40, _hoisted_2$
|
|
3676
|
+
}, null, 40, _hoisted_2$30), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", { class: normalizeClass(e("trigger-content")) }, [_cache[2] || (_cache[2] = createElementVNode("svg", {
|
|
3641
3677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3642
3678
|
width: "32",
|
|
3643
3679
|
height: "32",
|
|
@@ -3664,11 +3700,11 @@ var upload_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
3664
3700
|
], 2);
|
|
3665
3701
|
};
|
|
3666
3702
|
}
|
|
3667
|
-
}), [["__scopeId", "data-v-
|
|
3703
|
+
}), [["__scopeId", "data-v-6c5ae5fc"]]);
|
|
3668
3704
|
//#endregion
|
|
3669
3705
|
//#region src/components/base/captcha/captcha.vue
|
|
3670
|
-
const _hoisted_1$
|
|
3671
|
-
const _hoisted_2$
|
|
3706
|
+
const _hoisted_1$39 = ["width", "height"];
|
|
3707
|
+
const _hoisted_2$29 = [
|
|
3672
3708
|
"src",
|
|
3673
3709
|
"alt",
|
|
3674
3710
|
"width",
|
|
@@ -3786,26 +3822,26 @@ var captcha_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defi
|
|
|
3786
3822
|
class: normalizeClass(e("canvas")),
|
|
3787
3823
|
width: __props.width,
|
|
3788
3824
|
height: __props.height
|
|
3789
|
-
}, null, 10, _hoisted_1$
|
|
3825
|
+
}, null, 10, _hoisted_1$39)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 后端提供的图片验证码 "), createElementVNode("img", {
|
|
3790
3826
|
class: normalizeClass(e("image")),
|
|
3791
3827
|
src: __props.src,
|
|
3792
3828
|
alt: __props.code || "验证码",
|
|
3793
3829
|
width: __props.width,
|
|
3794
3830
|
height: __props.height
|
|
3795
|
-
}, null, 10, _hoisted_2$
|
|
3831
|
+
}, null, 10, _hoisted_2$29)], 2112))], 2);
|
|
3796
3832
|
};
|
|
3797
3833
|
}
|
|
3798
3834
|
}), [["__scopeId", "data-v-0ad64f93"]]);
|
|
3799
3835
|
//#endregion
|
|
3800
3836
|
//#region src/components/base/login/login.vue
|
|
3801
|
-
const _hoisted_1$
|
|
3802
|
-
const _hoisted_2$
|
|
3803
|
-
const _hoisted_3$
|
|
3804
|
-
const _hoisted_4$
|
|
3805
|
-
const _hoisted_5$
|
|
3806
|
-
const _hoisted_6$
|
|
3807
|
-
const _hoisted_7$
|
|
3808
|
-
const _hoisted_8$
|
|
3837
|
+
const _hoisted_1$38 = ["onClick"];
|
|
3838
|
+
const _hoisted_2$28 = ["placeholder"];
|
|
3839
|
+
const _hoisted_3$23 = ["type", "placeholder"];
|
|
3840
|
+
const _hoisted_4$21 = ["placeholder"];
|
|
3841
|
+
const _hoisted_5$15 = ["placeholder"];
|
|
3842
|
+
const _hoisted_6$14 = ["placeholder"];
|
|
3843
|
+
const _hoisted_7$13 = ["disabled"];
|
|
3844
|
+
const _hoisted_8$12 = ["placeholder"];
|
|
3809
3845
|
const _hoisted_9$11 = ["disabled"];
|
|
3810
3846
|
const _hoisted_10$10 = ["title", "onClick"];
|
|
3811
3847
|
var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -4037,7 +4073,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4037
4073
|
key: tab.key,
|
|
4038
4074
|
class: normalizeClass([e("tab"), { [e("tab--active")]: activeTab.value === tab.key }]),
|
|
4039
4075
|
onClick: ($event) => activeTab.value = tab.key
|
|
4040
|
-
}, toDisplayString(tab.label), 11, _hoisted_1$
|
|
4076
|
+
}, toDisplayString(tab.label), 11, _hoisted_1$38);
|
|
4041
4077
|
}), 128))], 2)) : createCommentVNode("v-if", true),
|
|
4042
4078
|
createElementVNode("form", {
|
|
4043
4079
|
class: normalizeClass(e("form")),
|
|
@@ -4050,7 +4086,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4050
4086
|
class: normalizeClass(e("input")),
|
|
4051
4087
|
placeholder: __props.usernamePlaceholder,
|
|
4052
4088
|
autocomplete: "username"
|
|
4053
|
-
}, null, 10, _hoisted_2$
|
|
4089
|
+
}, null, 10, _hoisted_2$28), [[vModelText, formData.username]])], 2)], 2),
|
|
4054
4090
|
createElementVNode("div", { class: normalizeClass(e("field")) }, [createElementVNode("div", { class: normalizeClass(e("input-wrapper")) }, [
|
|
4055
4091
|
createElementVNode("span", { class: normalizeClass(e("input-icon")) }, "🔒", 2),
|
|
4056
4092
|
withDirectives(createElementVNode("input", {
|
|
@@ -4059,7 +4095,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4059
4095
|
class: normalizeClass(e("input")),
|
|
4060
4096
|
placeholder: __props.passwordPlaceholder,
|
|
4061
4097
|
autocomplete: "current-password"
|
|
4062
|
-
}, null, 10, _hoisted_3$
|
|
4098
|
+
}, null, 10, _hoisted_3$23), [[vModelDynamic, formData.password]]),
|
|
4063
4099
|
createElementVNode("button", {
|
|
4064
4100
|
type: "button",
|
|
4065
4101
|
class: normalizeClass(e("toggle-pwd")),
|
|
@@ -4079,7 +4115,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4079
4115
|
type: "text",
|
|
4080
4116
|
maxlength: "4",
|
|
4081
4117
|
autocomplete: "off"
|
|
4082
|
-
}, null, 10, _hoisted_4$
|
|
4118
|
+
}, null, 10, _hoisted_4$21), [[vModelText, formData.captchaCode]])], 2), (openBlock(), createBlock(captcha_default, {
|
|
4083
4119
|
class: normalizeClass(e("captcha-img")),
|
|
4084
4120
|
src: __props.captchaSrc,
|
|
4085
4121
|
code: captchaCode.value,
|
|
@@ -4117,7 +4153,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4117
4153
|
type: "tel",
|
|
4118
4154
|
maxlength: "11",
|
|
4119
4155
|
autocomplete: "tel"
|
|
4120
|
-
}, null, 10, _hoisted_5$
|
|
4156
|
+
}, null, 10, _hoisted_5$15), [[vModelText, formData.phone]])], 2)], 2),
|
|
4121
4157
|
createElementVNode("div", { class: normalizeClass(e("field")) }, [createElementVNode("div", { class: normalizeClass(e("input-wrapper")) }, [
|
|
4122
4158
|
createElementVNode("span", { class: normalizeClass(e("input-icon")) }, "🔑", 2),
|
|
4123
4159
|
withDirectives(createElementVNode("input", {
|
|
@@ -4127,13 +4163,13 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4127
4163
|
type: "text",
|
|
4128
4164
|
maxlength: "6",
|
|
4129
4165
|
autocomplete: "one-time-code"
|
|
4130
|
-
}, null, 10, _hoisted_6$
|
|
4166
|
+
}, null, 10, _hoisted_6$14), [[vModelText, formData.code]]),
|
|
4131
4167
|
createElementVNode("button", {
|
|
4132
4168
|
type: "button",
|
|
4133
4169
|
class: normalizeClass([e("send-code"), { [e("send-code--disabled")]: countdown.value > 0 }]),
|
|
4134
4170
|
disabled: countdown.value > 0,
|
|
4135
4171
|
onClick: handleSendCode
|
|
4136
|
-
}, toDisplayString(countdown.value > 0 ? `${countdown.value}s` : __props.sendCodeText), 11, _hoisted_7$
|
|
4172
|
+
}, toDisplayString(countdown.value > 0 ? `${countdown.value}s` : __props.sendCodeText), 11, _hoisted_7$13)
|
|
4137
4173
|
], 2)], 2),
|
|
4138
4174
|
__props.showCaptcha ? (openBlock(), createElementBlock("div", {
|
|
4139
4175
|
key: 0,
|
|
@@ -4148,7 +4184,7 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4148
4184
|
type: "text",
|
|
4149
4185
|
maxlength: "4",
|
|
4150
4186
|
autocomplete: "off"
|
|
4151
|
-
}, null, 10, _hoisted_8$
|
|
4187
|
+
}, null, 10, _hoisted_8$12), [[vModelText, formData.captchaCode]])], 2), (openBlock(), createBlock(captcha_default, {
|
|
4152
4188
|
class: normalizeClass(e("captcha-img")),
|
|
4153
4189
|
src: __props.captchaSrc,
|
|
4154
4190
|
code: captchaCode.value,
|
|
@@ -4212,11 +4248,11 @@ var login_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
4212
4248
|
}), [["__scopeId", "data-v-6981722d"]]);
|
|
4213
4249
|
//#endregion
|
|
4214
4250
|
//#region src/components/base/login/login-centered.vue
|
|
4215
|
-
const _hoisted_1$
|
|
4216
|
-
const _hoisted_2$
|
|
4217
|
-
const _hoisted_3$
|
|
4218
|
-
const _hoisted_4$
|
|
4219
|
-
const _hoisted_5$
|
|
4251
|
+
const _hoisted_1$37 = ["fill"];
|
|
4252
|
+
const _hoisted_2$27 = ["onClick"];
|
|
4253
|
+
const _hoisted_3$22 = ["placeholder"];
|
|
4254
|
+
const _hoisted_4$20 = ["type", "placeholder"];
|
|
4255
|
+
const _hoisted_5$14 = {
|
|
4220
4256
|
key: 0,
|
|
4221
4257
|
width: "18",
|
|
4222
4258
|
height: "18",
|
|
@@ -4225,7 +4261,7 @@ const _hoisted_5$13 = {
|
|
|
4225
4261
|
stroke: "currentColor",
|
|
4226
4262
|
"stroke-width": "2"
|
|
4227
4263
|
};
|
|
4228
|
-
const _hoisted_6$
|
|
4264
|
+
const _hoisted_6$13 = {
|
|
4229
4265
|
key: 1,
|
|
4230
4266
|
width: "18",
|
|
4231
4267
|
height: "18",
|
|
@@ -4234,8 +4270,8 @@ const _hoisted_6$12 = {
|
|
|
4234
4270
|
stroke: "currentColor",
|
|
4235
4271
|
"stroke-width": "2"
|
|
4236
4272
|
};
|
|
4237
|
-
const _hoisted_7$
|
|
4238
|
-
const _hoisted_8$
|
|
4273
|
+
const _hoisted_7$12 = ["placeholder"];
|
|
4274
|
+
const _hoisted_8$11 = ["placeholder"];
|
|
4239
4275
|
const _hoisted_9$10 = ["disabled"];
|
|
4240
4276
|
const _hoisted_10$9 = ["placeholder"];
|
|
4241
4277
|
const _hoisted_11$9 = ["disabled"];
|
|
@@ -4453,7 +4489,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4453
4489
|
height: "40",
|
|
4454
4490
|
rx: "8",
|
|
4455
4491
|
fill: __props.theme === "dark" ? "#6366f1" : "#4f46e5"
|
|
4456
|
-
}, null, 8, _hoisted_1$
|
|
4492
|
+
}, null, 8, _hoisted_1$37), _cache[8] || (_cache[8] = createElementVNode("path", {
|
|
4457
4493
|
d: "M12 20L18 26L28 14",
|
|
4458
4494
|
stroke: "#fff",
|
|
4459
4495
|
"stroke-width": "3",
|
|
@@ -4471,7 +4507,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4471
4507
|
key: tab.key,
|
|
4472
4508
|
class: normalizeClass([e("tab"), { [e("tab--active")]: activeTab.value === tab.key }]),
|
|
4473
4509
|
onClick: ($event) => activeTab.value = tab.key
|
|
4474
|
-
}, toDisplayString(tab.label), 11, _hoisted_2$
|
|
4510
|
+
}, toDisplayString(tab.label), 11, _hoisted_2$27);
|
|
4475
4511
|
}), 128))], 2)) : createCommentVNode("v-if", true),
|
|
4476
4512
|
createElementVNode("form", {
|
|
4477
4513
|
class: normalizeClass(e("form")),
|
|
@@ -4494,7 +4530,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4494
4530
|
class: normalizeClass(e("input")),
|
|
4495
4531
|
placeholder: __props.usernamePlaceholder,
|
|
4496
4532
|
autocomplete: "username"
|
|
4497
|
-
}, null, 10, _hoisted_3$
|
|
4533
|
+
}, null, 10, _hoisted_3$22), [[vModelText, formData.username]])], 2)], 2), createElementVNode("div", { class: normalizeClass(e("field")) }, [createElementVNode("label", { class: normalizeClass(e("label")) }, toDisplayString(__props.passwordLabel), 3), createElementVNode("div", { class: normalizeClass(e("input-group")) }, [
|
|
4498
4534
|
createElementVNode("span", { class: normalizeClass(e("input-prefix")) }, [..._cache[10] || (_cache[10] = [createElementVNode("svg", {
|
|
4499
4535
|
width: "18",
|
|
4500
4536
|
height: "18",
|
|
@@ -4516,16 +4552,16 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4516
4552
|
class: normalizeClass(e("input")),
|
|
4517
4553
|
placeholder: __props.passwordPlaceholder,
|
|
4518
4554
|
autocomplete: "current-password"
|
|
4519
|
-
}, null, 10, _hoisted_4$
|
|
4555
|
+
}, null, 10, _hoisted_4$20), [[vModelDynamic, formData.password]]),
|
|
4520
4556
|
createElementVNode("button", {
|
|
4521
4557
|
type: "button",
|
|
4522
4558
|
class: normalizeClass(e("input-suffix")),
|
|
4523
4559
|
onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
|
|
4524
|
-
}, [!showPassword.value ? (openBlock(), createElementBlock("svg", _hoisted_5$
|
|
4560
|
+
}, [!showPassword.value ? (openBlock(), createElementBlock("svg", _hoisted_5$14, [..._cache[11] || (_cache[11] = [createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }, null, -1), createElementVNode("circle", {
|
|
4525
4561
|
cx: "12",
|
|
4526
4562
|
cy: "12",
|
|
4527
4563
|
r: "3"
|
|
4528
|
-
}, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_6$
|
|
4564
|
+
}, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_6$13, [..._cache[12] || (_cache[12] = [createElementVNode("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }, null, -1), createElementVNode("line", {
|
|
4529
4565
|
x1: "1",
|
|
4530
4566
|
y1: "1",
|
|
4531
4567
|
x2: "23",
|
|
@@ -4559,7 +4595,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4559
4595
|
type: "tel",
|
|
4560
4596
|
maxlength: "11",
|
|
4561
4597
|
autocomplete: "tel"
|
|
4562
|
-
}, null, 10, _hoisted_7$
|
|
4598
|
+
}, null, 10, _hoisted_7$12), [[vModelText, formData.phone]])], 2)], 2), createElementVNode("div", { class: normalizeClass(e("field")) }, [createElementVNode("label", { class: normalizeClass(e("label")) }, toDisplayString(__props.codeLabel), 3), createElementVNode("div", { class: normalizeClass(e("input-group")) }, [
|
|
4563
4599
|
createElementVNode("span", { class: normalizeClass(e("input-prefix")) }, [..._cache[14] || (_cache[14] = [createElementVNode("svg", {
|
|
4564
4600
|
width: "18",
|
|
4565
4601
|
height: "18",
|
|
@@ -4582,7 +4618,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4582
4618
|
type: "text",
|
|
4583
4619
|
maxlength: "6",
|
|
4584
4620
|
autocomplete: "one-time-code"
|
|
4585
|
-
}, null, 10, _hoisted_8$
|
|
4621
|
+
}, null, 10, _hoisted_8$11), [[vModelText, formData.code]]),
|
|
4586
4622
|
createElementVNode("button", {
|
|
4587
4623
|
type: "button",
|
|
4588
4624
|
class: normalizeClass([e("send-code"), { [e("send-code--disabled")]: countdown.value > 0 }]),
|
|
@@ -4682,7 +4718,7 @@ var login_centered_default = /* @__PURE__ */ export_helper_default(/* @__PURE__
|
|
|
4682
4718
|
}), [["__scopeId", "data-v-267a78de"]]);
|
|
4683
4719
|
//#endregion
|
|
4684
4720
|
//#region src/components/base/pin-input/pin-input.vue
|
|
4685
|
-
const _hoisted_1$
|
|
4721
|
+
const _hoisted_1$36 = [
|
|
4686
4722
|
"value",
|
|
4687
4723
|
"disabled",
|
|
4688
4724
|
"onInput",
|
|
@@ -4792,7 +4828,7 @@ var pin_input_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
|
|
|
4792
4828
|
onFocus: ($event) => focusedIndex.value = i - 1,
|
|
4793
4829
|
onBlur: _cache[0] || (_cache[0] = ($event) => focusedIndex.value = -1),
|
|
4794
4830
|
onPaste: handlePaste
|
|
4795
|
-
}, null, 42, _hoisted_1$
|
|
4831
|
+
}, null, 42, _hoisted_1$36);
|
|
4796
4832
|
}), 128))], 2), __props.error ? (openBlock(), createElementBlock("div", {
|
|
4797
4833
|
key: 0,
|
|
4798
4834
|
class: normalizeClass(e("error"))
|
|
@@ -4802,22 +4838,22 @@ var pin_input_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
|
|
|
4802
4838
|
}), [["__scopeId", "data-v-fd187d50"]]);
|
|
4803
4839
|
//#endregion
|
|
4804
4840
|
//#region src/components/base/tree-select/tree-select.vue
|
|
4805
|
-
const _hoisted_1$
|
|
4841
|
+
const _hoisted_1$35 = [
|
|
4806
4842
|
"value",
|
|
4807
4843
|
"placeholder",
|
|
4808
4844
|
"disabled"
|
|
4809
4845
|
];
|
|
4810
|
-
const _hoisted_2$
|
|
4811
|
-
const _hoisted_3$
|
|
4812
|
-
const _hoisted_4$
|
|
4813
|
-
const _hoisted_5$
|
|
4846
|
+
const _hoisted_2$26 = ["onClick"];
|
|
4847
|
+
const _hoisted_3$21 = ["onClick"];
|
|
4848
|
+
const _hoisted_4$19 = ["onClick"];
|
|
4849
|
+
const _hoisted_5$13 = [
|
|
4814
4850
|
"checked",
|
|
4815
4851
|
"indeterminate",
|
|
4816
4852
|
"disabled"
|
|
4817
4853
|
];
|
|
4818
|
-
const _hoisted_6$
|
|
4819
|
-
const _hoisted_7$
|
|
4820
|
-
const _hoisted_8$
|
|
4854
|
+
const _hoisted_6$12 = ["onClick"];
|
|
4855
|
+
const _hoisted_7$11 = ["onClick"];
|
|
4856
|
+
const _hoisted_8$10 = ["onClick"];
|
|
4821
4857
|
const _hoisted_9$9 = [
|
|
4822
4858
|
"checked",
|
|
4823
4859
|
"indeterminate",
|
|
@@ -5137,7 +5173,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5137
5173
|
onFocus: handleFocus,
|
|
5138
5174
|
onBlur: handleBlur,
|
|
5139
5175
|
onKeydown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
5140
|
-
}, null, 42, _hoisted_1$
|
|
5176
|
+
}, null, 42, _hoisted_1$35)) : (openBlock(), createElementBlock("div", {
|
|
5141
5177
|
key: 1,
|
|
5142
5178
|
class: normalizeClass([e("display"), { [e("display--placeholder")]: !selectedTitle.value }])
|
|
5143
5179
|
}, toDisplayString(selectedTitle.value || __props.placeholder), 3)),
|
|
@@ -5213,7 +5249,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5213
5249
|
key: 0,
|
|
5214
5250
|
class: normalizeClass(e("node-toggle")),
|
|
5215
5251
|
onClick: withModifiers(($event) => handleToggle(node), ["stop"])
|
|
5216
|
-
}, toDisplayString(expandedKeys.value.includes(node.key) ? "▾" : "▸"), 11, _hoisted_3$
|
|
5252
|
+
}, toDisplayString(expandedKeys.value.includes(node.key) ? "▾" : "▸"), 11, _hoisted_3$21)) : (openBlock(), createElementBlock("span", {
|
|
5217
5253
|
key: 1,
|
|
5218
5254
|
class: normalizeClass(e("node-leaf"))
|
|
5219
5255
|
}, "•", 2)),
|
|
@@ -5226,9 +5262,9 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5226
5262
|
checked: checkedKeys.value.includes(node.key),
|
|
5227
5263
|
indeterminate: indeterminateKeys.value.includes(node.key),
|
|
5228
5264
|
disabled: node.disabled
|
|
5229
|
-
}, null, 8, _hoisted_5$
|
|
5265
|
+
}, null, 8, _hoisted_5$13)], 10, _hoisted_4$19)) : createCommentVNode("v-if", true),
|
|
5230
5266
|
createElementVNode("span", { class: normalizeClass(e("node-title")) }, toDisplayString(node.title), 3)
|
|
5231
|
-
], 14, _hoisted_2$
|
|
5267
|
+
], 14, _hoisted_2$26);
|
|
5232
5268
|
}), 128))], 38)], 6)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Normal mode "), createElementVNode("div", { class: normalizeClass(e("tree-container")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredNodes.value, (node) => {
|
|
5233
5269
|
return openBlock(), createElementBlock("div", {
|
|
5234
5270
|
key: node.key,
|
|
@@ -5239,7 +5275,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5239
5275
|
key: 0,
|
|
5240
5276
|
class: normalizeClass(e("node-toggle")),
|
|
5241
5277
|
onClick: withModifiers(($event) => handleToggle(node), ["stop"])
|
|
5242
|
-
}, toDisplayString(expandedKeys.value.includes(node.key) ? "▾" : "▸"), 11, _hoisted_7$
|
|
5278
|
+
}, toDisplayString(expandedKeys.value.includes(node.key) ? "▾" : "▸"), 11, _hoisted_7$11)) : (openBlock(), createElementBlock("span", {
|
|
5243
5279
|
key: 1,
|
|
5244
5280
|
class: normalizeClass(e("node-leaf"))
|
|
5245
5281
|
}, "•", 2)),
|
|
@@ -5252,7 +5288,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5252
5288
|
checked: checkedKeys.value.includes(node.key),
|
|
5253
5289
|
indeterminate: indeterminateKeys.value.includes(node.key),
|
|
5254
5290
|
disabled: node.disabled
|
|
5255
|
-
}, null, 8, _hoisted_9$9)], 10, _hoisted_8$
|
|
5291
|
+
}, null, 8, _hoisted_9$9)], 10, _hoisted_8$10)) : createCommentVNode("v-if", true),
|
|
5256
5292
|
createElementVNode("span", { class: normalizeClass(e("node-title")) }, toDisplayString(node.title), 3),
|
|
5257
5293
|
hasChildren(node) && expandedKeys.value.includes(node.key) ? (openBlock(), createElementBlock("div", {
|
|
5258
5294
|
key: 3,
|
|
@@ -5284,7 +5320,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5284
5320
|
createElementVNode("span", { class: normalizeClass(e("node-title")) }, toDisplayString(child.title), 3)
|
|
5285
5321
|
], 10, _hoisted_10$8);
|
|
5286
5322
|
}), 128))], 2)) : createCommentVNode("v-if", true)
|
|
5287
|
-
], 10, _hoisted_6$
|
|
5323
|
+
], 10, _hoisted_6$12);
|
|
5288
5324
|
}), 128)), filteredNodes.value.length === 0 ? (openBlock(), createBlock(empty_default, {
|
|
5289
5325
|
key: 0,
|
|
5290
5326
|
description: "暂无数据"
|
|
@@ -5297,12 +5333,12 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5297
5333
|
}), [["__scopeId", "data-v-f36bc312"]]);
|
|
5298
5334
|
//#endregion
|
|
5299
5335
|
//#region src/components/base/color-picker/color-picker.vue
|
|
5300
|
-
const _hoisted_1$
|
|
5336
|
+
const _hoisted_1$34 = [
|
|
5301
5337
|
"value",
|
|
5302
5338
|
"placeholder",
|
|
5303
5339
|
"disabled"
|
|
5304
5340
|
];
|
|
5305
|
-
const _hoisted_2$
|
|
5341
|
+
const _hoisted_2$25 = {
|
|
5306
5342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5307
5343
|
width: "14",
|
|
5308
5344
|
height: "14",
|
|
@@ -5311,12 +5347,12 @@ const _hoisted_2$24 = {
|
|
|
5311
5347
|
stroke: "currentColor",
|
|
5312
5348
|
"stroke-width": "2"
|
|
5313
5349
|
};
|
|
5314
|
-
const _hoisted_3$
|
|
5315
|
-
const _hoisted_4$
|
|
5316
|
-
const _hoisted_5$
|
|
5317
|
-
const _hoisted_6$
|
|
5318
|
-
const _hoisted_7$
|
|
5319
|
-
const _hoisted_8$
|
|
5350
|
+
const _hoisted_3$20 = ["fill"];
|
|
5351
|
+
const _hoisted_4$18 = ["value"];
|
|
5352
|
+
const _hoisted_5$12 = ["value"];
|
|
5353
|
+
const _hoisted_6$11 = ["value"];
|
|
5354
|
+
const _hoisted_7$10 = ["value"];
|
|
5355
|
+
const _hoisted_8$9 = ["value"];
|
|
5320
5356
|
const _hoisted_9$8 = ["onClick"];
|
|
5321
5357
|
var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5322
5358
|
name: "YdColorPicker",
|
|
@@ -5738,7 +5774,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5738
5774
|
onInput: handleInput,
|
|
5739
5775
|
onFocus: handleFocus,
|
|
5740
5776
|
onBlur: handleBlur
|
|
5741
|
-
}, null, 42, _hoisted_1$
|
|
5777
|
+
}, null, 42, _hoisted_1$34)) : createCommentVNode("v-if", true),
|
|
5742
5778
|
createCommentVNode(" Clear button "),
|
|
5743
5779
|
__props.clearable && __props.modelValue && !__props.disabled ? (openBlock(), createElementBlock("span", {
|
|
5744
5780
|
key: 2,
|
|
@@ -5766,14 +5802,14 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5766
5802
|
y2: "18"
|
|
5767
5803
|
})], -1)])], 2)) : createCommentVNode("v-if", true),
|
|
5768
5804
|
createCommentVNode(" Trigger button "),
|
|
5769
|
-
createElementVNode("span", { class: normalizeClass(e("trigger")) }, [(openBlock(), createElementBlock("svg", _hoisted_2$
|
|
5805
|
+
createElementVNode("span", { class: normalizeClass(e("trigger")) }, [(openBlock(), createElementBlock("svg", _hoisted_2$25, [_cache[5] || (_cache[5] = createElementVNode("circle", {
|
|
5770
5806
|
cx: "12",
|
|
5771
5807
|
cy: "12",
|
|
5772
5808
|
r: "10"
|
|
5773
5809
|
}, null, -1)), createElementVNode("path", {
|
|
5774
5810
|
d: "M12 2a10 10 0 0 1 0 20",
|
|
5775
5811
|
fill: __props.modelValue || "#ffffff"
|
|
5776
|
-
}, null, 8, _hoisted_3$
|
|
5812
|
+
}, null, 8, _hoisted_3$20)]))], 2)
|
|
5777
5813
|
], 2),
|
|
5778
5814
|
__props.error || __props.hint ? (openBlock(), createElementBlock("div", {
|
|
5779
5815
|
key: 1,
|
|
@@ -5842,7 +5878,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5842
5878
|
class: normalizeClass(e("value-input")),
|
|
5843
5879
|
value: hexValue.value,
|
|
5844
5880
|
onInput: handleHexInput
|
|
5845
|
-
}, null, 42, _hoisted_4$
|
|
5881
|
+
}, null, 42, _hoisted_4$18)], 2),
|
|
5846
5882
|
createElementVNode("div", { class: normalizeClass(e("value-item")) }, [createElementVNode("span", { class: normalizeClass(e("value-label")) }, "R", 2), createElementVNode("input", {
|
|
5847
5883
|
class: normalizeClass(e("value-input")),
|
|
5848
5884
|
type: "number",
|
|
@@ -5850,7 +5886,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5850
5886
|
max: 255,
|
|
5851
5887
|
value: rgbValue.value.r,
|
|
5852
5888
|
onInput: _cache[0] || (_cache[0] = (e) => handleRgbInput("r", e))
|
|
5853
|
-
}, null, 42, _hoisted_5$
|
|
5889
|
+
}, null, 42, _hoisted_5$12)], 2),
|
|
5854
5890
|
createElementVNode("div", { class: normalizeClass(e("value-item")) }, [createElementVNode("span", { class: normalizeClass(e("value-label")) }, "G", 2), createElementVNode("input", {
|
|
5855
5891
|
class: normalizeClass(e("value-input")),
|
|
5856
5892
|
type: "number",
|
|
@@ -5858,7 +5894,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5858
5894
|
max: 255,
|
|
5859
5895
|
value: rgbValue.value.g,
|
|
5860
5896
|
onInput: _cache[1] || (_cache[1] = (e) => handleRgbInput("g", e))
|
|
5861
|
-
}, null, 42, _hoisted_6$
|
|
5897
|
+
}, null, 42, _hoisted_6$11)], 2),
|
|
5862
5898
|
createElementVNode("div", { class: normalizeClass(e("value-item")) }, [createElementVNode("span", { class: normalizeClass(e("value-label")) }, "B", 2), createElementVNode("input", {
|
|
5863
5899
|
class: normalizeClass(e("value-input")),
|
|
5864
5900
|
type: "number",
|
|
@@ -5866,7 +5902,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5866
5902
|
max: 255,
|
|
5867
5903
|
value: rgbValue.value.b,
|
|
5868
5904
|
onInput: _cache[2] || (_cache[2] = (e) => handleRgbInput("b", e))
|
|
5869
|
-
}, null, 42, _hoisted_7$
|
|
5905
|
+
}, null, 42, _hoisted_7$10)], 2),
|
|
5870
5906
|
__props.showAlpha ? (openBlock(), createElementBlock("div", {
|
|
5871
5907
|
key: 0,
|
|
5872
5908
|
class: normalizeClass(e("value-item"))
|
|
@@ -5877,7 +5913,7 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5877
5913
|
max: 100,
|
|
5878
5914
|
value: Math.round(alphaValue.value * 100),
|
|
5879
5915
|
onInput: handleAlphaInput
|
|
5880
|
-
}, null, 42, _hoisted_8$
|
|
5916
|
+
}, null, 42, _hoisted_8$9)], 2)) : createCommentVNode("v-if", true)
|
|
5881
5917
|
], 2),
|
|
5882
5918
|
createCommentVNode(" Preset colors "),
|
|
5883
5919
|
__props.showPreset ? (openBlock(), createElementBlock("div", {
|
|
@@ -5900,9 +5936,9 @@ var color_picker_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
|
|
|
5900
5936
|
}), [["__scopeId", "data-v-24772c45"]]);
|
|
5901
5937
|
//#endregion
|
|
5902
5938
|
//#region src/components/base/calendar/calendar.vue
|
|
5903
|
-
const _hoisted_1$
|
|
5904
|
-
const _hoisted_2$
|
|
5905
|
-
const _hoisted_3$
|
|
5939
|
+
const _hoisted_1$33 = ["onClick"];
|
|
5940
|
+
const _hoisted_2$24 = ["onClick"];
|
|
5941
|
+
const _hoisted_3$19 = ["onClick"];
|
|
5906
5942
|
var calendar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5907
5943
|
name: "YdCalendar",
|
|
5908
5944
|
__name: "calendar",
|
|
@@ -6114,7 +6150,7 @@ var calendar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
6114
6150
|
[e("year-cell--today")]: y === currentYear.value
|
|
6115
6151
|
}]),
|
|
6116
6152
|
onClick: ($event) => selectYear(y)
|
|
6117
|
-
}, toDisplayString(y), 11, _hoisted_1$
|
|
6153
|
+
}, toDisplayString(y), 11, _hoisted_1$33);
|
|
6118
6154
|
}), 128))], 2)], 2)) : view.value === "month" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Month View "), createElementVNode("div", { class: normalizeClass(e("view")) }, [createElementVNode("div", { class: normalizeClass(e("month-grid")) }, [(openBlock(), createElementBlock(Fragment, null, renderList(months, (m, i) => {
|
|
6119
6155
|
return createElementVNode("button", {
|
|
6120
6156
|
key: i,
|
|
@@ -6123,7 +6159,7 @@ var calendar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
6123
6159
|
[e("month-cell--today")]: selectedYear.value === currentYear.value && i === currentMonth.value
|
|
6124
6160
|
}]),
|
|
6125
6161
|
onClick: ($event) => selectMonth(i)
|
|
6126
|
-
}, toDisplayString(m) + "月 ", 11, _hoisted_2$
|
|
6162
|
+
}, toDisplayString(m) + "月 ", 11, _hoisted_2$24);
|
|
6127
6163
|
}), 64))], 2)], 2)], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Month View (Calendar) "), createElementVNode("div", { class: normalizeClass(e("view")) }, [
|
|
6128
6164
|
createCommentVNode(" Weekdays header "),
|
|
6129
6165
|
createElementVNode("div", { class: normalizeClass(e("weekdays")) }, [(openBlock(), createElementBlock(Fragment, null, renderList(weekdays, (w) => {
|
|
@@ -6144,7 +6180,7 @@ var calendar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
6144
6180
|
}, [renderSlot(_ctx.$slots, "date-cell", {
|
|
6145
6181
|
day,
|
|
6146
6182
|
currentMonth: day.currentMonth
|
|
6147
|
-
}, () => [createTextVNode(toDisplayString(day.date.getDate()), 1)], true)], 14, _hoisted_3$
|
|
6183
|
+
}, () => [createTextVNode(toDisplayString(day.date.getDate()), 1)], true)], 14, _hoisted_3$19);
|
|
6148
6184
|
}), 128))], 2)
|
|
6149
6185
|
], 2)], 2112)),
|
|
6150
6186
|
createCommentVNode(" Footer "),
|
|
@@ -6160,6 +6196,150 @@ var calendar_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
6160
6196
|
}
|
|
6161
6197
|
}), [["__scopeId", "data-v-b7db4b77"]]);
|
|
6162
6198
|
//#endregion
|
|
6199
|
+
//#region src/components/base/markdown/markdown.vue
|
|
6200
|
+
const _hoisted_1$32 = {
|
|
6201
|
+
key: 0,
|
|
6202
|
+
class: "yd-markdown__editor"
|
|
6203
|
+
};
|
|
6204
|
+
const _hoisted_2$23 = ["placeholder"];
|
|
6205
|
+
const _hoisted_3$18 = ["innerHTML"];
|
|
6206
|
+
const _hoisted_4$17 = {
|
|
6207
|
+
key: 2,
|
|
6208
|
+
class: "yd-markdown__toolbar"
|
|
6209
|
+
};
|
|
6210
|
+
const _hoisted_5$11 = {
|
|
6211
|
+
key: 3,
|
|
6212
|
+
class: "yd-markdown__split"
|
|
6213
|
+
};
|
|
6214
|
+
const _hoisted_6$10 = { class: "yd-markdown__split-editor" };
|
|
6215
|
+
const _hoisted_7$9 = ["placeholder"];
|
|
6216
|
+
const _hoisted_8$8 = ["innerHTML"];
|
|
6217
|
+
var markdown_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6218
|
+
name: "YdMarkdown",
|
|
6219
|
+
__name: "markdown",
|
|
6220
|
+
props: {
|
|
6221
|
+
modelValue: { default: "" },
|
|
6222
|
+
editable: {
|
|
6223
|
+
type: Boolean,
|
|
6224
|
+
default: false
|
|
6225
|
+
},
|
|
6226
|
+
showToolbar: {
|
|
6227
|
+
type: Boolean,
|
|
6228
|
+
default: true
|
|
6229
|
+
},
|
|
6230
|
+
size: {},
|
|
6231
|
+
placeholder: { default: "输入Markdown..." },
|
|
6232
|
+
highlight: {
|
|
6233
|
+
type: Boolean,
|
|
6234
|
+
default: true
|
|
6235
|
+
}
|
|
6236
|
+
},
|
|
6237
|
+
emits: ["update:modelValue", "change"],
|
|
6238
|
+
setup(__props, { emit: __emit }) {
|
|
6239
|
+
const props = __props;
|
|
6240
|
+
const emit = __emit;
|
|
6241
|
+
const { size: configSize } = useConfig();
|
|
6242
|
+
const textareaRef = ref(null);
|
|
6243
|
+
const mode = ref("edit");
|
|
6244
|
+
const resolvedSize = computed(() => props.size ?? configSize.value);
|
|
6245
|
+
const localValue = ref(props.modelValue);
|
|
6246
|
+
watch(() => props.modelValue, (val) => {
|
|
6247
|
+
localValue.value = val;
|
|
6248
|
+
});
|
|
6249
|
+
marked.setOptions({
|
|
6250
|
+
gfm: true,
|
|
6251
|
+
breaks: true
|
|
6252
|
+
});
|
|
6253
|
+
const renderer = new marked.Renderer();
|
|
6254
|
+
renderer.code = ({ text, lang }) => {
|
|
6255
|
+
if (props.highlight && lang && hljs.getLanguage(lang)) return `<pre><code class="hljs language-${lang}">${hljs.highlight(text, { language: lang }).value}</code></pre>`;
|
|
6256
|
+
return `<pre><code class="hljs">${text}</code></pre>`;
|
|
6257
|
+
};
|
|
6258
|
+
marked.use({ renderer });
|
|
6259
|
+
const renderedHtml = computed(() => {
|
|
6260
|
+
if (!localValue.value) return "";
|
|
6261
|
+
try {
|
|
6262
|
+
return marked.parse(localValue.value);
|
|
6263
|
+
} catch (e) {
|
|
6264
|
+
console.error("Markdown parse error:", e);
|
|
6265
|
+
return localValue.value;
|
|
6266
|
+
}
|
|
6267
|
+
});
|
|
6268
|
+
const classes = computed(() => cn("yd-markdown", `yd-markdown--${resolvedSize.value}`));
|
|
6269
|
+
const textareaClasses = computed(() => cn("yd-markdown__textarea", props.editable && "yd-markdown__textarea--editable"));
|
|
6270
|
+
const contentClasses = computed(() => cn("yd-markdown__content"));
|
|
6271
|
+
function handleInput(e) {
|
|
6272
|
+
const value = e.target.value;
|
|
6273
|
+
localValue.value = value;
|
|
6274
|
+
emit("update:modelValue", value);
|
|
6275
|
+
emit("change", value);
|
|
6276
|
+
}
|
|
6277
|
+
function handleKeydown(e) {
|
|
6278
|
+
if (e.key === "Tab") {
|
|
6279
|
+
e.preventDefault();
|
|
6280
|
+
const textarea = textareaRef.value;
|
|
6281
|
+
if (textarea) {
|
|
6282
|
+
const start = textarea.selectionStart;
|
|
6283
|
+
const end = textarea.selectionEnd;
|
|
6284
|
+
const value = textarea.value;
|
|
6285
|
+
localValue.value = value.substring(0, start) + " " + value.substring(end);
|
|
6286
|
+
emit("update:modelValue", localValue.value);
|
|
6287
|
+
setTimeout(() => {
|
|
6288
|
+
textarea.selectionStart = textarea.selectionEnd = start + 2;
|
|
6289
|
+
}, 0);
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6293
|
+
onMounted(() => {
|
|
6294
|
+
if (props.editable && textareaRef.value) textareaRef.value.focus();
|
|
6295
|
+
});
|
|
6296
|
+
return (_ctx, _cache) => {
|
|
6297
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(classes.value) }, [
|
|
6298
|
+
createCommentVNode(" 编辑模式 "),
|
|
6299
|
+
__props.editable ? (openBlock(), createElementBlock("div", _hoisted_1$32, [withDirectives(createElementVNode("textarea", {
|
|
6300
|
+
ref_key: "textareaRef",
|
|
6301
|
+
ref: textareaRef,
|
|
6302
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
|
|
6303
|
+
class: normalizeClass(textareaClasses.value),
|
|
6304
|
+
placeholder: __props.placeholder,
|
|
6305
|
+
onInput: handleInput,
|
|
6306
|
+
onKeydown: handleKeydown
|
|
6307
|
+
}, null, 42, _hoisted_2$23), [[vModelText, localValue.value]])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 预览模式 / 只读模式 "), createElementVNode("div", {
|
|
6308
|
+
class: normalizeClass(contentClasses.value),
|
|
6309
|
+
innerHTML: renderedHtml.value
|
|
6310
|
+
}, null, 10, _hoisted_3$18)], 2112)),
|
|
6311
|
+
createCommentVNode(" 工具栏 "),
|
|
6312
|
+
__props.showToolbar && __props.editable ? (openBlock(), createElementBlock("div", _hoisted_4$17, [
|
|
6313
|
+
createElementVNode("button", {
|
|
6314
|
+
type: "button",
|
|
6315
|
+
class: normalizeClass(["yd-markdown__tool", { "yd-markdown__tool--active": mode.value === "edit" }]),
|
|
6316
|
+
onClick: _cache[1] || (_cache[1] = ($event) => mode.value = "edit")
|
|
6317
|
+
}, " 编辑 ", 2),
|
|
6318
|
+
createElementVNode("button", {
|
|
6319
|
+
type: "button",
|
|
6320
|
+
class: normalizeClass(["yd-markdown__tool", { "yd-markdown__tool--active": mode.value === "preview" }]),
|
|
6321
|
+
onClick: _cache[2] || (_cache[2] = ($event) => mode.value = "preview")
|
|
6322
|
+
}, " 预览 ", 2),
|
|
6323
|
+
createElementVNode("button", {
|
|
6324
|
+
type: "button",
|
|
6325
|
+
class: normalizeClass(["yd-markdown__tool", { "yd-markdown__tool--active": mode.value === "split" }]),
|
|
6326
|
+
onClick: _cache[3] || (_cache[3] = ($event) => mode.value = "split")
|
|
6327
|
+
}, " 分屏 ", 2)
|
|
6328
|
+
])) : createCommentVNode("v-if", true),
|
|
6329
|
+
createCommentVNode(" 分屏模式 "),
|
|
6330
|
+
mode.value === "split" && __props.editable ? (openBlock(), createElementBlock("div", _hoisted_5$11, [createElementVNode("div", _hoisted_6$10, [withDirectives(createElementVNode("textarea", {
|
|
6331
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => localValue.value = $event),
|
|
6332
|
+
placeholder: __props.placeholder,
|
|
6333
|
+
onInput: handleInput
|
|
6334
|
+
}, null, 40, _hoisted_7$9), [[vModelText, localValue.value]])]), createElementVNode("div", {
|
|
6335
|
+
class: "yd-markdown__split-preview",
|
|
6336
|
+
innerHTML: renderedHtml.value
|
|
6337
|
+
}, null, 8, _hoisted_8$8)])) : createCommentVNode("v-if", true)
|
|
6338
|
+
], 2);
|
|
6339
|
+
};
|
|
6340
|
+
}
|
|
6341
|
+
}), [["__scopeId", "data-v-068d968a"]]);
|
|
6342
|
+
//#endregion
|
|
6163
6343
|
//#region src/components/base/chat-page/chat-page.vue
|
|
6164
6344
|
const _hoisted_1$31 = { class: "yd-chat-page__header" };
|
|
6165
6345
|
const _hoisted_2$22 = { class: "yd-chat-page__header-left" };
|
|
@@ -6193,37 +6373,43 @@ const _hoisted_20$1 = {
|
|
|
6193
6373
|
key: 0,
|
|
6194
6374
|
class: "yd-chat-page__reasoning"
|
|
6195
6375
|
};
|
|
6196
|
-
const _hoisted_21 = { class: "yd-chat-
|
|
6197
|
-
const _hoisted_22 = {
|
|
6376
|
+
const _hoisted_21 = { class: "yd-chat-page__reasoning-content" };
|
|
6377
|
+
const _hoisted_22 = { class: "yd-chat-page__message-bubble" };
|
|
6378
|
+
const _hoisted_23 = { class: "yd-chat-page__message-actions" };
|
|
6379
|
+
const _hoisted_24 = ["onClick", "title"];
|
|
6380
|
+
const _hoisted_25 = {
|
|
6381
|
+
key: 0,
|
|
6382
|
+
viewBox: "0 0 24 24",
|
|
6383
|
+
fill: "currentColor",
|
|
6384
|
+
width: "16",
|
|
6385
|
+
height: "16"
|
|
6386
|
+
};
|
|
6387
|
+
const _hoisted_26 = {
|
|
6388
|
+
key: 1,
|
|
6389
|
+
viewBox: "0 0 24 24",
|
|
6390
|
+
fill: "currentColor",
|
|
6391
|
+
width: "16",
|
|
6392
|
+
height: "16"
|
|
6393
|
+
};
|
|
6394
|
+
const _hoisted_27 = ["onClick"];
|
|
6395
|
+
const _hoisted_28 = {
|
|
6198
6396
|
key: 2,
|
|
6199
6397
|
class: "yd-chat-page__loading"
|
|
6200
6398
|
};
|
|
6201
|
-
const
|
|
6202
|
-
const
|
|
6203
|
-
const
|
|
6204
|
-
var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
6399
|
+
const _hoisted_29 = { class: "yd-chat-page__input-area" };
|
|
6400
|
+
const _hoisted_30 = { class: "yd-chat-page__input-wrapper" };
|
|
6401
|
+
const _hoisted_31 = ["placeholder", "disabled"];
|
|
6402
|
+
var chat_page_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6205
6403
|
__name: "chat-page",
|
|
6206
6404
|
props: {
|
|
6207
|
-
size: {
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
},
|
|
6215
|
-
model: {
|
|
6216
|
-
type: String,
|
|
6217
|
-
default: "GPT-4"
|
|
6218
|
-
},
|
|
6219
|
-
models: {
|
|
6220
|
-
type: Array,
|
|
6221
|
-
default: () => [
|
|
6222
|
-
"GPT-4",
|
|
6223
|
-
"GPT-3.5",
|
|
6224
|
-
"Claude-3"
|
|
6225
|
-
]
|
|
6226
|
-
},
|
|
6405
|
+
size: { default: "md" },
|
|
6406
|
+
title: { default: "AI Assistant" },
|
|
6407
|
+
model: { default: "GPT-4" },
|
|
6408
|
+
models: { default: () => [
|
|
6409
|
+
"GPT-4",
|
|
6410
|
+
"GPT-3.5",
|
|
6411
|
+
"Claude-3"
|
|
6412
|
+
] },
|
|
6227
6413
|
showModelSelector: {
|
|
6228
6414
|
type: Boolean,
|
|
6229
6415
|
default: true
|
|
@@ -6232,45 +6418,24 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6232
6418
|
type: Boolean,
|
|
6233
6419
|
default: true
|
|
6234
6420
|
},
|
|
6235
|
-
sidebarWidth: {
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
},
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
},
|
|
6243
|
-
conversations: {
|
|
6244
|
-
type: Array,
|
|
6245
|
-
default: () => []
|
|
6246
|
-
},
|
|
6247
|
-
currentConversationId: {
|
|
6248
|
-
type: String,
|
|
6249
|
-
default: ""
|
|
6250
|
-
},
|
|
6251
|
-
userInfo: {
|
|
6252
|
-
type: Object,
|
|
6253
|
-
default: () => ({
|
|
6254
|
-
name: "User",
|
|
6255
|
-
avatar: ""
|
|
6256
|
-
})
|
|
6257
|
-
},
|
|
6421
|
+
sidebarWidth: { default: 280 },
|
|
6422
|
+
messages: { default: () => [] },
|
|
6423
|
+
conversations: { default: () => [] },
|
|
6424
|
+
currentConversationId: { default: "" },
|
|
6425
|
+
userInfo: { default: () => ({
|
|
6426
|
+
name: "User",
|
|
6427
|
+
avatar: ""
|
|
6428
|
+
}) },
|
|
6258
6429
|
streaming: {
|
|
6259
6430
|
type: Boolean,
|
|
6260
6431
|
default: false
|
|
6261
6432
|
},
|
|
6262
|
-
streamingContent: {
|
|
6263
|
-
type: String,
|
|
6264
|
-
default: ""
|
|
6265
|
-
},
|
|
6433
|
+
streamingContent: { default: "" },
|
|
6266
6434
|
showReasoning: {
|
|
6267
6435
|
type: Boolean,
|
|
6268
6436
|
default: true
|
|
6269
6437
|
},
|
|
6270
|
-
placeholder: {
|
|
6271
|
-
type: String,
|
|
6272
|
-
default: "Send a message..."
|
|
6273
|
-
},
|
|
6438
|
+
placeholder: { default: "Send a message..." },
|
|
6274
6439
|
disabled: {
|
|
6275
6440
|
type: Boolean,
|
|
6276
6441
|
default: false
|
|
@@ -6284,13 +6449,26 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6284
6449
|
"update-conversation",
|
|
6285
6450
|
"select-model",
|
|
6286
6451
|
"logout",
|
|
6287
|
-
"settings"
|
|
6452
|
+
"settings",
|
|
6453
|
+
"regenerate",
|
|
6454
|
+
"toggle-sidebar"
|
|
6288
6455
|
],
|
|
6289
6456
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6290
6457
|
const props = __props;
|
|
6291
6458
|
const emit = __emit;
|
|
6292
6459
|
const inputValue = ref("");
|
|
6293
6460
|
const conversationRef = ref(null);
|
|
6461
|
+
const copiedId = ref(null);
|
|
6462
|
+
function handleCopyMessage(content, id) {
|
|
6463
|
+
navigator.clipboard.writeText(content);
|
|
6464
|
+
copiedId.value = id;
|
|
6465
|
+
setTimeout(() => {
|
|
6466
|
+
copiedId.value = null;
|
|
6467
|
+
}, 2e3);
|
|
6468
|
+
}
|
|
6469
|
+
function handleRegenerate(messageId) {
|
|
6470
|
+
emit("regenerate", messageId);
|
|
6471
|
+
}
|
|
6294
6472
|
const classes = computed(() => `yd-chat-page yd-chat-page--${props.size}`);
|
|
6295
6473
|
const sidebarStyle = computed(() => {
|
|
6296
6474
|
return { width: typeof props.sidebarWidth === "number" ? `${props.sidebarWidth}px` : props.sidebarWidth };
|
|
@@ -6321,6 +6499,11 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6321
6499
|
function scrollToBottom() {
|
|
6322
6500
|
if (conversationRef.value) conversationRef.value.scrollToBottom();
|
|
6323
6501
|
}
|
|
6502
|
+
function autoResize(event) {
|
|
6503
|
+
const textarea = event.target;
|
|
6504
|
+
textarea.style.height = "auto";
|
|
6505
|
+
textarea.style.height = Math.min(textarea.scrollHeight, 120) + "px";
|
|
6506
|
+
}
|
|
6324
6507
|
__expose({ scrollToBottom });
|
|
6325
6508
|
return (_ctx, _cache) => {
|
|
6326
6509
|
return openBlock(), createElementBlock("div", { class: normalizeClass(classes.value) }, [
|
|
@@ -6329,14 +6512,14 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6329
6512
|
key: 0,
|
|
6330
6513
|
class: "yd-chat-page__menu-btn",
|
|
6331
6514
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("toggle-sidebar"))
|
|
6332
|
-
}, [..._cache[
|
|
6515
|
+
}, [..._cache[10] || (_cache[10] = [createElementVNode("svg", {
|
|
6333
6516
|
viewBox: "0 0 24 24",
|
|
6334
6517
|
fill: "currentColor",
|
|
6335
6518
|
width: "20",
|
|
6336
6519
|
height: "20"
|
|
6337
6520
|
}, [createElementVNode("path", { d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" })], -1)])])) : createCommentVNode("v-if", true), createElementVNode("h1", _hoisted_3$17, toDisplayString(__props.title), 1)]), createElementVNode("div", _hoisted_4$16, [
|
|
6338
6521
|
createCommentVNode(" Model Selector "),
|
|
6339
|
-
__props.showModelSelector ? (openBlock(), createElementBlock("div", _hoisted_5$10, [createElementVNode("button", _hoisted_6$9, [_cache[
|
|
6522
|
+
__props.showModelSelector ? (openBlock(), createElementBlock("div", _hoisted_5$10, [createElementVNode("button", _hoisted_6$9, [_cache[11] || (_cache[11] = createElementVNode("svg", {
|
|
6340
6523
|
viewBox: "0 0 24 24",
|
|
6341
6524
|
fill: "currentColor",
|
|
6342
6525
|
width: "16",
|
|
@@ -6346,7 +6529,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6346
6529
|
createElementVNode("div", _hoisted_7$8, [createElementVNode("button", {
|
|
6347
6530
|
class: "yd-chat-page__user-btn",
|
|
6348
6531
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("settings"))
|
|
6349
|
-
}, [..._cache[
|
|
6532
|
+
}, [..._cache[12] || (_cache[12] = [createElementVNode("svg", {
|
|
6350
6533
|
viewBox: "0 0 24 24",
|
|
6351
6534
|
fill: "currentColor",
|
|
6352
6535
|
width: "20",
|
|
@@ -6354,7 +6537,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6354
6537
|
}, [createElementVNode("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)])]), createElementVNode("button", {
|
|
6355
6538
|
class: "yd-chat-page__user-btn",
|
|
6356
6539
|
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("logout"))
|
|
6357
|
-
}, [..._cache[
|
|
6540
|
+
}, [..._cache[13] || (_cache[13] = [createElementVNode("svg", {
|
|
6358
6541
|
viewBox: "0 0 24 24",
|
|
6359
6542
|
fill: "currentColor",
|
|
6360
6543
|
width: "20",
|
|
@@ -6373,7 +6556,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6373
6556
|
block: "",
|
|
6374
6557
|
onClick: handleNewConversation
|
|
6375
6558
|
}, {
|
|
6376
|
-
default: withCtx(() => [..._cache[
|
|
6559
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [createElementVNode("svg", {
|
|
6377
6560
|
viewBox: "0 0 24 24",
|
|
6378
6561
|
fill: "currentColor",
|
|
6379
6562
|
width: "16",
|
|
@@ -6386,7 +6569,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6386
6569
|
class: normalizeClass(["yd-chat-page__conversation-item", conv.id === __props.currentConversationId && "active"]),
|
|
6387
6570
|
onClick: ($event) => handleSelectConversation(conv.id)
|
|
6388
6571
|
}, [
|
|
6389
|
-
_cache[
|
|
6572
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "yd-chat-page__conv-icon" }, [createElementVNode("svg", {
|
|
6390
6573
|
viewBox: "0 0 24 24",
|
|
6391
6574
|
fill: "currentColor",
|
|
6392
6575
|
width: "18",
|
|
@@ -6396,7 +6579,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6396
6579
|
createElementVNode("button", {
|
|
6397
6580
|
class: "yd-chat-page__conv-delete",
|
|
6398
6581
|
onClick: ($event) => handleDeleteConversation(conv.id, $event)
|
|
6399
|
-
}, [..._cache[
|
|
6582
|
+
}, [..._cache[15] || (_cache[15] = [createElementVNode("svg", {
|
|
6400
6583
|
viewBox: "0 0 24 24",
|
|
6401
6584
|
fill: "currentColor",
|
|
6402
6585
|
width: "14",
|
|
@@ -6414,33 +6597,24 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6414
6597
|
}, [
|
|
6415
6598
|
createCommentVNode(" Welcome Screen "),
|
|
6416
6599
|
allMessages.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_16$2, [
|
|
6417
|
-
_cache[
|
|
6600
|
+
_cache[20] || (_cache[20] = createElementVNode("div", { class: "yd-chat-page__welcome-icon" }, [createElementVNode("svg", {
|
|
6418
6601
|
viewBox: "0 0 24 24",
|
|
6419
6602
|
fill: "currentColor",
|
|
6420
6603
|
width: "64",
|
|
6421
6604
|
height: "64"
|
|
6422
6605
|
}, [createElementVNode("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })])], -1)),
|
|
6423
|
-
_cache[
|
|
6606
|
+
_cache[21] || (_cache[21] = createElementVNode("h2", { class: "yd-chat-page__welcome-title" }, "How can I help you today?", -1)),
|
|
6424
6607
|
createElementVNode("div", _hoisted_17$1, [
|
|
6425
|
-
createVNode(button_default, {
|
|
6426
|
-
|
|
6427
|
-
onClick: _cache[3] || (_cache[3] = ($event) => handleSend("Help me write a poem", []))
|
|
6428
|
-
}, {
|
|
6429
|
-
default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode("Help me write a poem", -1)])]),
|
|
6608
|
+
createVNode(button_default, { onClick: _cache[3] || (_cache[3] = ($event) => handleSend("Help me write a poem", [])) }, {
|
|
6609
|
+
default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode("Help me write a poem", -1)])]),
|
|
6430
6610
|
_: 1
|
|
6431
6611
|
}),
|
|
6432
|
-
createVNode(button_default, {
|
|
6433
|
-
|
|
6434
|
-
onClick: _cache[4] || (_cache[4] = ($event) => handleSend("Explain quantum computing", []))
|
|
6435
|
-
}, {
|
|
6436
|
-
default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode("Explain quantum computing", -1)])]),
|
|
6612
|
+
createVNode(button_default, { onClick: _cache[4] || (_cache[4] = ($event) => handleSend("Explain quantum computing", [])) }, {
|
|
6613
|
+
default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode("Explain quantum computing", -1)])]),
|
|
6437
6614
|
_: 1
|
|
6438
6615
|
}),
|
|
6439
|
-
createVNode(button_default, {
|
|
6440
|
-
|
|
6441
|
-
onClick: _cache[5] || (_cache[5] = ($event) => handleSend("Write a code snippet", []))
|
|
6442
|
-
}, {
|
|
6443
|
-
default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode("Write a code snippet", -1)])]),
|
|
6616
|
+
createVNode(button_default, { onClick: _cache[5] || (_cache[5] = ($event) => handleSend("Write a code snippet", [])) }, {
|
|
6617
|
+
default: withCtx(() => [..._cache[19] || (_cache[19] = [createTextVNode("Write a code snippet", -1)])]),
|
|
6444
6618
|
_: 1
|
|
6445
6619
|
})
|
|
6446
6620
|
])
|
|
@@ -6448,42 +6622,97 @@ var chat_page_default = /* @__PURE__ */ export_helper_default({
|
|
|
6448
6622
|
return openBlock(), createElementBlock("div", {
|
|
6449
6623
|
key: msg.id,
|
|
6450
6624
|
class: normalizeClass(["yd-chat-page__message", `yd-chat-page__message--${msg.role}`])
|
|
6451
|
-
}, [
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6625
|
+
}, [
|
|
6626
|
+
createCommentVNode(" AI Avatar "),
|
|
6627
|
+
msg.role === "assistant" ? (openBlock(), createElementBlock("div", _hoisted_18$1, [..._cache[22] || (_cache[22] = [createElementVNode("svg", {
|
|
6628
|
+
viewBox: "0 0 24 24",
|
|
6629
|
+
fill: "currentColor",
|
|
6630
|
+
width: "24",
|
|
6631
|
+
height: "24"
|
|
6632
|
+
}, [createElementVNode("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" })], -1)])])) : createCommentVNode("v-if", true),
|
|
6633
|
+
createElementVNode("div", _hoisted_19$1, [
|
|
6634
|
+
createCommentVNode(" Reasoning Display "),
|
|
6635
|
+
__props.showReasoning && msg.reasoning ? (openBlock(), createElementBlock("div", _hoisted_20$1, [_cache[23] || (_cache[23] = createElementVNode("div", { class: "yd-chat-page__reasoning-header" }, [createElementVNode("svg", {
|
|
6636
|
+
viewBox: "0 0 24 24",
|
|
6637
|
+
fill: "currentColor",
|
|
6638
|
+
width: "14",
|
|
6639
|
+
height: "14"
|
|
6640
|
+
}, [createElementVNode("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm0-4h-2V7h2v8z" })]), createElementVNode("span", null, "思考中")], -1)), createElementVNode("div", _hoisted_21, toDisplayString(msg.reasoning), 1)])) : createCommentVNode("v-if", true),
|
|
6641
|
+
createCommentVNode(" Message Content with Markdown "),
|
|
6642
|
+
createElementVNode("div", _hoisted_22, [
|
|
6643
|
+
createVNode(markdown_default, {
|
|
6644
|
+
"model-value": msg.content,
|
|
6645
|
+
editable: false,
|
|
6646
|
+
"show-toolbar": false
|
|
6647
|
+
}, null, 8, ["model-value"]),
|
|
6648
|
+
createCommentVNode(" Message Actions "),
|
|
6649
|
+
createElementVNode("div", _hoisted_23, [createElementVNode("button", {
|
|
6650
|
+
class: "yd-chat-page__action-btn",
|
|
6651
|
+
onClick: ($event) => handleCopyMessage(msg.content, msg.id),
|
|
6652
|
+
title: copiedId.value === msg.id ? "已复制" : "复制"
|
|
6653
|
+
}, [copiedId.value !== msg.id ? (openBlock(), createElementBlock("svg", _hoisted_25, [..._cache[24] || (_cache[24] = [createElementVNode("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_26, [..._cache[25] || (_cache[25] = [createElementVNode("path", { d: "M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" }, null, -1)])]))], 8, _hoisted_24), msg.role === "assistant" ? (openBlock(), createElementBlock("button", {
|
|
6654
|
+
key: 0,
|
|
6655
|
+
class: "yd-chat-page__action-btn",
|
|
6656
|
+
onClick: ($event) => handleRegenerate(msg.id),
|
|
6657
|
+
title: "重新生成"
|
|
6658
|
+
}, [..._cache[26] || (_cache[26] = [createElementVNode("svg", {
|
|
6659
|
+
viewBox: "0 0 24 24",
|
|
6660
|
+
fill: "currentColor",
|
|
6661
|
+
width: "16",
|
|
6662
|
+
height: "16"
|
|
6663
|
+
}, [createElementVNode("path", { d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" })], -1)])], 8, _hoisted_27)) : createCommentVNode("v-if", true)])
|
|
6664
|
+
])
|
|
6665
|
+
])
|
|
6666
|
+
], 2);
|
|
6457
6667
|
}), 128))], 64)),
|
|
6458
6668
|
createCommentVNode(" Streaming Indicator "),
|
|
6459
|
-
__props.streaming && !__props.streamingContent ? (openBlock(), createElementBlock("div",
|
|
6669
|
+
__props.streaming && !__props.streamingContent ? (openBlock(), createElementBlock("div", _hoisted_28, [..._cache[27] || (_cache[27] = [createElementVNode("span", null, "AI is thinking...", -1)])])) : createCommentVNode("v-if", true)
|
|
6460
6670
|
], 512),
|
|
6461
6671
|
createCommentVNode(" Input Area "),
|
|
6462
|
-
createElementVNode("div",
|
|
6463
|
-
"
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6672
|
+
createElementVNode("div", _hoisted_29, [
|
|
6673
|
+
createElementVNode("div", _hoisted_30, [
|
|
6674
|
+
createCommentVNode(" Input Actions "),
|
|
6675
|
+
_cache[29] || (_cache[29] = createElementVNode("div", { class: "yd-chat-page__input-actions" }, [createElementVNode("button", {
|
|
6676
|
+
class: "yd-chat-page__input-action",
|
|
6677
|
+
title: "添加附件"
|
|
6678
|
+
}, [createElementVNode("svg", {
|
|
6679
|
+
viewBox: "0 0 24 24",
|
|
6680
|
+
fill: "currentColor",
|
|
6681
|
+
width: "18",
|
|
6682
|
+
height: "18"
|
|
6683
|
+
}, [createElementVNode("path", { d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z" })])])], -1)),
|
|
6684
|
+
withDirectives(createElementVNode("textarea", {
|
|
6685
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => inputValue.value = $event),
|
|
6686
|
+
class: "yd-chat-page__input",
|
|
6687
|
+
placeholder: __props.placeholder,
|
|
6688
|
+
disabled: __props.disabled,
|
|
6689
|
+
rows: "1",
|
|
6690
|
+
onKeydown: _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => handleSend(inputValue.value, []), ["exact", "prevent"]), ["enter"])),
|
|
6691
|
+
onInput: _cache[8] || (_cache[8] = ($event) => autoResize($event))
|
|
6692
|
+
}, null, 40, _hoisted_31), [[vModelText, inputValue.value]]),
|
|
6693
|
+
createVNode(button_default, {
|
|
6694
|
+
type: "primary",
|
|
6695
|
+
disabled: __props.disabled || __props.streaming || !inputValue.value.trim(),
|
|
6696
|
+
onClick: _cache[9] || (_cache[9] = ($event) => handleSend(inputValue.value, []))
|
|
6697
|
+
}, {
|
|
6698
|
+
default: withCtx(() => [..._cache[28] || (_cache[28] = [createElementVNode("svg", {
|
|
6699
|
+
viewBox: "0 0 24 24",
|
|
6700
|
+
fill: "currentColor",
|
|
6701
|
+
width: "20",
|
|
6702
|
+
height: "20"
|
|
6703
|
+
}, [createElementVNode("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })], -1)])]),
|
|
6704
|
+
_: 1
|
|
6705
|
+
}, 8, ["disabled"])
|
|
6706
|
+
]),
|
|
6707
|
+
createCommentVNode(" Input Hint "),
|
|
6708
|
+
_cache[30] || (_cache[30] = createElementVNode("div", { class: "yd-chat-page__input-hint" }, [createElementVNode("span", null, "按 Enter 发送,Shift + Enter 换行")], -1))
|
|
6709
|
+
])
|
|
6481
6710
|
])
|
|
6482
6711
|
])
|
|
6483
6712
|
], 2);
|
|
6484
6713
|
};
|
|
6485
6714
|
}
|
|
6486
|
-
}, [["__scopeId", "data-v-
|
|
6715
|
+
}), [["__scopeId", "data-v-35629158"]]);
|
|
6487
6716
|
//#endregion
|
|
6488
6717
|
//#region src/components/base/chat-bubble/chat-bubble.vue
|
|
6489
6718
|
const _hoisted_1$30 = {
|
|
@@ -9273,12 +9502,14 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9273
9502
|
"context-menu",
|
|
9274
9503
|
"reorder",
|
|
9275
9504
|
"drag-start",
|
|
9276
|
-
"drag-end"
|
|
9505
|
+
"drag-end",
|
|
9506
|
+
"refresh"
|
|
9277
9507
|
],
|
|
9278
|
-
setup(__props, { emit: __emit }) {
|
|
9508
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9279
9509
|
const slots = useSlots();
|
|
9280
9510
|
/**
|
|
9281
|
-
*
|
|
9511
|
+
* YdTabs Props
|
|
9512
|
+
* @description 标签页组件,支持多种样式和拖拽排序
|
|
9282
9513
|
*/
|
|
9283
9514
|
const props = __props;
|
|
9284
9515
|
const hasContent = computed(() => !!slots.default);
|
|
@@ -9406,17 +9637,38 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9406
9637
|
contextMenuVisible.value = true;
|
|
9407
9638
|
}
|
|
9408
9639
|
function handleCtxClose() {
|
|
9409
|
-
if (contextTab.value)
|
|
9640
|
+
if (contextTab.value) {
|
|
9641
|
+
emit("context-menu", "close", contextTab.value);
|
|
9642
|
+
emit("edit", "remove", contextTab.value);
|
|
9643
|
+
}
|
|
9644
|
+
contextMenuVisible.value = false;
|
|
9645
|
+
}
|
|
9646
|
+
function handleCtxRefresh() {
|
|
9647
|
+
if (contextTab.value) {
|
|
9648
|
+
emit("context-menu", "refresh", contextTab.value);
|
|
9649
|
+
emit("refresh", contextTab.value);
|
|
9650
|
+
}
|
|
9651
|
+
contextMenuVisible.value = false;
|
|
9652
|
+
}
|
|
9653
|
+
function handleCtxCloseRight() {
|
|
9654
|
+
if (contextTab.value) {
|
|
9655
|
+
emit("context-menu", "closeRight", contextTab.value);
|
|
9656
|
+
closeRight(contextTab.value.key);
|
|
9657
|
+
}
|
|
9410
9658
|
contextMenuVisible.value = false;
|
|
9411
9659
|
}
|
|
9412
9660
|
function handleCtxCloseOthers() {
|
|
9413
9661
|
if (contextTab.value) {
|
|
9414
|
-
|
|
9662
|
+
emit("context-menu", "closeOthers", contextTab.value);
|
|
9663
|
+
const currentTabs = mergedTabs.value;
|
|
9664
|
+
for (const item of currentTabs) if (item.key !== contextTab.value.key && item.closable !== false) emit("edit", "remove", item);
|
|
9415
9665
|
}
|
|
9416
9666
|
contextMenuVisible.value = false;
|
|
9417
9667
|
}
|
|
9418
9668
|
function handleCtxCloseAll() {
|
|
9419
|
-
|
|
9669
|
+
emit("context-menu", "closeAll", contextTab.value);
|
|
9670
|
+
const currentTabs = mergedTabs.value;
|
|
9671
|
+
for (const item of currentTabs) if (item.closable !== false) emit("edit", "remove", item);
|
|
9420
9672
|
contextMenuVisible.value = false;
|
|
9421
9673
|
}
|
|
9422
9674
|
function handleClickOutside() {
|
|
@@ -9446,6 +9698,14 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9446
9698
|
tooltipVisible.value = false;
|
|
9447
9699
|
hoveredTab.value = null;
|
|
9448
9700
|
}
|
|
9701
|
+
function handleTooltipRefresh() {
|
|
9702
|
+
if (hoveredTab.value) emit("refresh", hoveredTab.value);
|
|
9703
|
+
hideTooltip();
|
|
9704
|
+
}
|
|
9705
|
+
function handleTooltipClose() {
|
|
9706
|
+
if (hoveredTab.value) emit("edit", "remove", hoveredTab.value);
|
|
9707
|
+
hideTooltip();
|
|
9708
|
+
}
|
|
9449
9709
|
function handleDragStart(index, event) {
|
|
9450
9710
|
dragIndex.value = index;
|
|
9451
9711
|
if (event.dataTransfer) {
|
|
@@ -9662,6 +9922,111 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9662
9922
|
watch(() => props.items, () => {
|
|
9663
9923
|
setTimeout(checkScroll, 0);
|
|
9664
9924
|
}, { deep: true });
|
|
9925
|
+
/**
|
|
9926
|
+
* 添加 Tab
|
|
9927
|
+
* @param tab - 新 Tab 配置
|
|
9928
|
+
*/
|
|
9929
|
+
function addTab(tab) {
|
|
9930
|
+
const newTab = {
|
|
9931
|
+
label: tab.label,
|
|
9932
|
+
key: tab.key,
|
|
9933
|
+
closable: tab.closable ?? true,
|
|
9934
|
+
disabled: tab.disabled ?? false,
|
|
9935
|
+
icon: tab.icon,
|
|
9936
|
+
description: tab.description
|
|
9937
|
+
};
|
|
9938
|
+
if (mergedTabs.value.some((t) => t.key === newTab.key)) {
|
|
9939
|
+
console.warn(`[YdTabs] Tab with key "${newTab.key}" already exists`);
|
|
9940
|
+
return;
|
|
9941
|
+
}
|
|
9942
|
+
if (props.modelTabs.length > 0) emit("update:modelTabs", [...props.modelTabs, newTab]);
|
|
9943
|
+
else internalTabs.value = [...internalTabs.value, newTab];
|
|
9944
|
+
emit("update:modelValue", newTab.key);
|
|
9945
|
+
emit("edit", "add", newTab);
|
|
9946
|
+
saveToStorage(props.modelTabs.length > 0 ? [...props.modelTabs, newTab] : [...internalTabs.value, newTab]);
|
|
9947
|
+
}
|
|
9948
|
+
/**
|
|
9949
|
+
* 关闭 Tab
|
|
9950
|
+
* @param key - Tab 的 key
|
|
9951
|
+
*/
|
|
9952
|
+
function closeTab(key) {
|
|
9953
|
+
const tab = mergedTabs.value.find((t) => t.key === key);
|
|
9954
|
+
if (!tab) {
|
|
9955
|
+
console.warn(`[YdTabs] Tab with key "${key}" not found`);
|
|
9956
|
+
return;
|
|
9957
|
+
}
|
|
9958
|
+
if (props.modelTabs.length > 0) emit("update:modelTabs", props.modelTabs.filter((t) => t.key !== key));
|
|
9959
|
+
else internalTabs.value = internalTabs.value.filter((t) => t.key !== key);
|
|
9960
|
+
emit("edit", "remove", tab);
|
|
9961
|
+
if (props.modelValue === key) {
|
|
9962
|
+
const remainingTabs = mergedTabs.value.filter((t) => t.key !== key);
|
|
9963
|
+
if (remainingTabs.length > 0) emit("update:modelValue", remainingTabs[remainingTabs.length - 1].key);
|
|
9964
|
+
}
|
|
9965
|
+
saveToStorage(props.modelTabs.length > 0 ? props.modelTabs.filter((t) => t.key !== key) : internalTabs.value);
|
|
9966
|
+
}
|
|
9967
|
+
/**
|
|
9968
|
+
* 刷新 Tab(触发 refresh 事件)
|
|
9969
|
+
* @param key - Tab 的 key,不传则刷新当前激活的 Tab
|
|
9970
|
+
*/
|
|
9971
|
+
function refreshTab(key) {
|
|
9972
|
+
const targetKey = key || props.modelValue;
|
|
9973
|
+
const tab = mergedTabs.value.find((t) => t.key === targetKey);
|
|
9974
|
+
if (!tab) {
|
|
9975
|
+
console.warn(`[YdTabs] Tab with key "${targetKey}" not found`);
|
|
9976
|
+
return;
|
|
9977
|
+
}
|
|
9978
|
+
emit("refresh", tab);
|
|
9979
|
+
}
|
|
9980
|
+
/**
|
|
9981
|
+
* 获取所有 Tabs
|
|
9982
|
+
*/
|
|
9983
|
+
function getTabs() {
|
|
9984
|
+
return [...mergedTabs.value];
|
|
9985
|
+
}
|
|
9986
|
+
/**
|
|
9987
|
+
* 设置激活 Tab
|
|
9988
|
+
* @param key - Tab 的 key
|
|
9989
|
+
*/
|
|
9990
|
+
function setActiveTab(key) {
|
|
9991
|
+
const tab = mergedTabs.value.find((t) => t.key === key);
|
|
9992
|
+
if (!tab) {
|
|
9993
|
+
console.warn(`[YdTabs] Tab with key "${key}" not found`);
|
|
9994
|
+
return;
|
|
9995
|
+
}
|
|
9996
|
+
if (tab.disabled) {
|
|
9997
|
+
console.warn(`[YdTabs] Tab with key "${key}" is disabled`);
|
|
9998
|
+
return;
|
|
9999
|
+
}
|
|
10000
|
+
emit("update:modelValue", key);
|
|
10001
|
+
}
|
|
10002
|
+
/**
|
|
10003
|
+
* 关闭右侧所有 Tab
|
|
10004
|
+
* @param key - 基准 Tab 的 key
|
|
10005
|
+
*/
|
|
10006
|
+
function closeRight(key) {
|
|
10007
|
+
const index = mergedTabs.value.findIndex((t) => t.key === key);
|
|
10008
|
+
if (index === -1) {
|
|
10009
|
+
console.warn(`[YdTabs] Tab with key "${key}" not found`);
|
|
10010
|
+
return;
|
|
10011
|
+
}
|
|
10012
|
+
const rightTabs = mergedTabs.value.slice(index + 1).filter((t) => t.closable !== false);
|
|
10013
|
+
if (rightTabs.length === 0) return;
|
|
10014
|
+
const rightKeys = rightTabs.map((t) => t.key);
|
|
10015
|
+
if (props.modelTabs.length > 0) emit("update:modelTabs", props.modelTabs.filter((t) => !rightKeys.includes(t.key)));
|
|
10016
|
+
else internalTabs.value = internalTabs.value.filter((t) => !rightKeys.includes(t.key));
|
|
10017
|
+
rightTabs.forEach((tab) => emit("edit", "remove", tab));
|
|
10018
|
+
saveToStorage(props.modelTabs.length > 0 ? props.modelTabs.filter((t) => !rightKeys.includes(t.key)) : internalTabs.value);
|
|
10019
|
+
}
|
|
10020
|
+
__expose({
|
|
10021
|
+
addTab,
|
|
10022
|
+
closeTab,
|
|
10023
|
+
refreshTab,
|
|
10024
|
+
getTabs,
|
|
10025
|
+
setActiveTab,
|
|
10026
|
+
closeRight,
|
|
10027
|
+
scrollLeft,
|
|
10028
|
+
scrollRight
|
|
10029
|
+
});
|
|
9665
10030
|
onMounted(() => {
|
|
9666
10031
|
document.addEventListener("click", handleClickOutside);
|
|
9667
10032
|
setTimeout(checkScroll, 0);
|
|
@@ -9679,7 +10044,7 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9679
10044
|
key: 0,
|
|
9680
10045
|
class: normalizeClass([e("arrow"), e("arrow--left")]),
|
|
9681
10046
|
onClick: scrollLeft
|
|
9682
|
-
}, [..._cache[
|
|
10047
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
9683
10048
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9684
10049
|
width: "14",
|
|
9685
10050
|
height: "14",
|
|
@@ -9740,7 +10105,7 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9740
10105
|
key: 1,
|
|
9741
10106
|
class: normalizeClass(e("close")),
|
|
9742
10107
|
onClick: withModifiers(($event) => handleTabClose(tab), ["stop"])
|
|
9743
|
-
}, [..._cache[
|
|
10108
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("svg", {
|
|
9744
10109
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9745
10110
|
width: "12",
|
|
9746
10111
|
height: "12",
|
|
@@ -9767,7 +10132,7 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9767
10132
|
key: 1,
|
|
9768
10133
|
class: normalizeClass(e("add")),
|
|
9769
10134
|
onClick: handleAdd
|
|
9770
|
-
}, [..._cache[
|
|
10135
|
+
}, [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
|
|
9771
10136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9772
10137
|
width: "14",
|
|
9773
10138
|
height: "14",
|
|
@@ -9794,7 +10159,7 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9794
10159
|
key: 1,
|
|
9795
10160
|
class: normalizeClass([e("arrow"), e("arrow--right")]),
|
|
9796
10161
|
onClick: scrollRight
|
|
9797
|
-
}, [..._cache[
|
|
10162
|
+
}, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
|
|
9798
10163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9799
10164
|
width: "14",
|
|
9800
10165
|
height: "14",
|
|
@@ -9816,10 +10181,18 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9816
10181
|
style: normalizeStyle(contextMenuStyle.value),
|
|
9817
10182
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
9818
10183
|
}, [
|
|
10184
|
+
createElementVNode("div", {
|
|
10185
|
+
class: normalizeClass(e("ctx-item")),
|
|
10186
|
+
onClick: handleCtxRefresh
|
|
10187
|
+
}, "刷新", 2),
|
|
9819
10188
|
createElementVNode("div", {
|
|
9820
10189
|
class: normalizeClass(e("ctx-item")),
|
|
9821
10190
|
onClick: handleCtxClose
|
|
9822
10191
|
}, "关闭", 2),
|
|
10192
|
+
createElementVNode("div", {
|
|
10193
|
+
class: normalizeClass(e("ctx-item")),
|
|
10194
|
+
onClick: handleCtxCloseRight
|
|
10195
|
+
}, "关闭右侧", 2),
|
|
9823
10196
|
createElementVNode("div", {
|
|
9824
10197
|
class: normalizeClass(e("ctx-item")),
|
|
9825
10198
|
onClick: handleCtxCloseOthers
|
|
@@ -9837,15 +10210,61 @@ var tabs_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
|
|
|
9837
10210
|
e("tooltip--visible"),
|
|
9838
10211
|
effectiveTheme.value === "dark" ? e("tooltip--dark") : ""
|
|
9839
10212
|
]),
|
|
9840
|
-
style: normalizeStyle(tooltipStyle.value)
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
class: normalizeClass(e("tooltip-
|
|
9844
|
-
|
|
10213
|
+
style: normalizeStyle(tooltipStyle.value),
|
|
10214
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"]))
|
|
10215
|
+
}, [
|
|
10216
|
+
createElementVNode("div", { class: normalizeClass(e("tooltip-title")) }, toDisplayString(hoveredTab.value?.label), 3),
|
|
10217
|
+
hoveredTab.value?.description ? (openBlock(), createElementBlock("div", {
|
|
10218
|
+
key: 0,
|
|
10219
|
+
class: normalizeClass(e("tooltip-desc"))
|
|
10220
|
+
}, toDisplayString(hoveredTab.value.description), 3)) : createCommentVNode("v-if", true),
|
|
10221
|
+
createElementVNode("div", { class: normalizeClass(e("tooltip-actions")) }, [createElementVNode("span", {
|
|
10222
|
+
class: normalizeClass(e("tooltip-action")),
|
|
10223
|
+
onClick: handleTooltipRefresh
|
|
10224
|
+
}, [..._cache[7] || (_cache[7] = [createElementVNode("svg", {
|
|
10225
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10226
|
+
width: "12",
|
|
10227
|
+
height: "12",
|
|
10228
|
+
viewBox: "0 0 24 24",
|
|
10229
|
+
fill: "none",
|
|
10230
|
+
stroke: "currentColor",
|
|
10231
|
+
"stroke-width": "2",
|
|
10232
|
+
"stroke-linecap": "round",
|
|
10233
|
+
"stroke-linejoin": "round"
|
|
10234
|
+
}, [
|
|
10235
|
+
createElementVNode("polyline", { points: "23 4 23 10 17 10" }),
|
|
10236
|
+
createElementVNode("polyline", { points: "1 20 1 14 7 14" }),
|
|
10237
|
+
createElementVNode("path", { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" })
|
|
10238
|
+
], -1), createTextVNode(" 刷新 ", -1)])], 2), hoveredTab.value?.closable ? (openBlock(), createElementBlock("span", {
|
|
10239
|
+
key: 0,
|
|
10240
|
+
class: normalizeClass(e("tooltip-action")),
|
|
10241
|
+
onClick: handleTooltipClose
|
|
10242
|
+
}, [..._cache[8] || (_cache[8] = [createElementVNode("svg", {
|
|
10243
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10244
|
+
width: "12",
|
|
10245
|
+
height: "12",
|
|
10246
|
+
viewBox: "0 0 24 24",
|
|
10247
|
+
fill: "none",
|
|
10248
|
+
stroke: "currentColor",
|
|
10249
|
+
"stroke-width": "2",
|
|
10250
|
+
"stroke-linecap": "round",
|
|
10251
|
+
"stroke-linejoin": "round"
|
|
10252
|
+
}, [createElementVNode("line", {
|
|
10253
|
+
x1: "18",
|
|
10254
|
+
y1: "6",
|
|
10255
|
+
x2: "6",
|
|
10256
|
+
y2: "18"
|
|
10257
|
+
}), createElementVNode("line", {
|
|
10258
|
+
x1: "6",
|
|
10259
|
+
y1: "6",
|
|
10260
|
+
x2: "18",
|
|
10261
|
+
y2: "18"
|
|
10262
|
+
})], -1), createTextVNode(" 关闭 ", -1)])], 2)) : createCommentVNode("v-if", true)], 2)
|
|
10263
|
+
], 6)) : createCommentVNode("v-if", true)]))
|
|
9845
10264
|
], 2);
|
|
9846
10265
|
};
|
|
9847
10266
|
}
|
|
9848
|
-
}), [["__scopeId", "data-v-
|
|
10267
|
+
}), [["__scopeId", "data-v-c08e5670"]]);
|
|
9849
10268
|
//#endregion
|
|
9850
10269
|
//#region src/components/navigation/dropdown/dropdown.vue
|
|
9851
10270
|
const _hoisted_1$19 = [
|
|
@@ -9869,7 +10288,7 @@ var dropdown_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
9869
10288
|
triggerLabel: { default: "打开菜单" }
|
|
9870
10289
|
},
|
|
9871
10290
|
emits: ["select"],
|
|
9872
|
-
setup(__props, { emit: __emit }) {
|
|
10291
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9873
10292
|
const props = __props;
|
|
9874
10293
|
const emit = __emit;
|
|
9875
10294
|
const visible = ref(false);
|
|
@@ -9977,6 +10396,14 @@ var dropdown_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
9977
10396
|
document.removeEventListener("click", handleClickOutside);
|
|
9978
10397
|
window.removeEventListener("scroll", debouncedScrollHandler, true);
|
|
9979
10398
|
});
|
|
10399
|
+
__expose({
|
|
10400
|
+
open: () => {
|
|
10401
|
+
visible.value = true;
|
|
10402
|
+
},
|
|
10403
|
+
close: () => {
|
|
10404
|
+
visible.value = false;
|
|
10405
|
+
}
|
|
10406
|
+
});
|
|
9980
10407
|
return (_ctx, _cache) => {
|
|
9981
10408
|
return openBlock(), createElementBlock("div", {
|
|
9982
10409
|
ref_key: "triggerRef",
|
|
@@ -10017,7 +10444,7 @@ var dropdown_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ def
|
|
|
10017
10444
|
})]))], 42, _hoisted_1$19);
|
|
10018
10445
|
};
|
|
10019
10446
|
}
|
|
10020
|
-
}), [["__scopeId", "data-v-
|
|
10447
|
+
}), [["__scopeId", "data-v-eeb76db2"]]);
|
|
10021
10448
|
//#endregion
|
|
10022
10449
|
//#region src/components/layout/layout/layout-header.vue
|
|
10023
10450
|
const _hoisted_1$18 = ["title"];
|
|
@@ -10613,7 +11040,7 @@ var drawer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
10613
11040
|
"open",
|
|
10614
11041
|
"close"
|
|
10615
11042
|
],
|
|
10616
|
-
setup(__props, { emit: __emit }) {
|
|
11043
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
10617
11044
|
/**
|
|
10618
11045
|
* YdDrawer Props
|
|
10619
11046
|
* @description 抽屉组件,从一侧滑入的对话框
|
|
@@ -10657,6 +11084,14 @@ var drawer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
10657
11084
|
document.body.style.overflow = "";
|
|
10658
11085
|
previousFocus.value?.focus();
|
|
10659
11086
|
}
|
|
11087
|
+
__expose({
|
|
11088
|
+
open: () => {
|
|
11089
|
+
visibleValue.value = true;
|
|
11090
|
+
},
|
|
11091
|
+
close: () => {
|
|
11092
|
+
visibleValue.value = false;
|
|
11093
|
+
}
|
|
11094
|
+
});
|
|
10660
11095
|
return (_ctx, _cache) => {
|
|
10661
11096
|
return openBlock(), createBlock(Teleport, {
|
|
10662
11097
|
to: "body",
|
|
@@ -10721,7 +11156,7 @@ var drawer_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
|
|
|
10721
11156
|
})], 8, ["disabled"]);
|
|
10722
11157
|
};
|
|
10723
11158
|
}
|
|
10724
|
-
}), [["__scopeId", "data-v-
|
|
11159
|
+
}), [["__scopeId", "data-v-6c73aaee"]]);
|
|
10725
11160
|
//#endregion
|
|
10726
11161
|
//#region src/components/layout/layout/layout-types.ts
|
|
10727
11162
|
/** 默认尺寸 */
|
|
@@ -13692,7 +14127,7 @@ var modal_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
13692
14127
|
"confirm",
|
|
13693
14128
|
"cancel"
|
|
13694
14129
|
],
|
|
13695
|
-
setup(__props, { emit: __emit }) {
|
|
14130
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
13696
14131
|
/**
|
|
13697
14132
|
* YdModal Props
|
|
13698
14133
|
* @description 模态对话框组件,支持聚焦管理、ARIA 属性和键盘导航
|
|
@@ -13742,6 +14177,14 @@ var modal_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
13742
14177
|
document.body.style.overflow = "";
|
|
13743
14178
|
previousFocus.value?.focus();
|
|
13744
14179
|
}
|
|
14180
|
+
__expose({
|
|
14181
|
+
open: () => {
|
|
14182
|
+
visibleValue.value = true;
|
|
14183
|
+
},
|
|
14184
|
+
close: () => {
|
|
14185
|
+
visibleValue.value = false;
|
|
14186
|
+
}
|
|
14187
|
+
});
|
|
13745
14188
|
return (_ctx, _cache) => {
|
|
13746
14189
|
return openBlock(), createBlock(Teleport, {
|
|
13747
14190
|
to: "body",
|
|
@@ -13819,7 +14262,7 @@ var modal_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ define
|
|
|
13819
14262
|
})], 8, ["disabled"]);
|
|
13820
14263
|
};
|
|
13821
14264
|
}
|
|
13822
|
-
}), [["__scopeId", "data-v-
|
|
14265
|
+
}), [["__scopeId", "data-v-23e0a13d"]]);
|
|
13823
14266
|
var message_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13824
14267
|
name: "YdMessage",
|
|
13825
14268
|
__name: "message",
|
|
@@ -15166,6 +15609,18 @@ const themes = {
|
|
|
15166
15609
|
} }
|
|
15167
15610
|
};
|
|
15168
15611
|
//#endregion
|
|
15612
|
+
//#region src/styles/tokens.ts
|
|
15613
|
+
/** z-index层级常量 (供外部使用) */
|
|
15614
|
+
const Z_INDEX = {
|
|
15615
|
+
DROPDOWN: 1e3,
|
|
15616
|
+
STICKY: 1020,
|
|
15617
|
+
FIXED: 1030,
|
|
15618
|
+
MODAL_BACKDROP: 1040,
|
|
15619
|
+
MODAL: 1050,
|
|
15620
|
+
POPOVER: 1060,
|
|
15621
|
+
TOOLTIP: 1070
|
|
15622
|
+
};
|
|
15623
|
+
//#endregion
|
|
15169
15624
|
//#region src/constants/index.ts
|
|
15170
15625
|
/**
|
|
15171
15626
|
* Application constants
|
|
@@ -15177,20 +15632,6 @@ const COMPONENT_PREFIX = "Yd";
|
|
|
15177
15632
|
const CSS_PREFIX = "yd";
|
|
15178
15633
|
/** 默认动画时长 (ms) */
|
|
15179
15634
|
const ANIMATION_DURATION = 200;
|
|
15180
|
-
/** 默认防抖延迟 (ms) */
|
|
15181
|
-
const DEBOUNCE_DELAY = 300;
|
|
15182
|
-
/** 默认节流间隔 (ms) */
|
|
15183
|
-
const THROTTLE_DELAY = 300;
|
|
15184
|
-
/** z-index 层级 */
|
|
15185
|
-
const Z_INDEX = {
|
|
15186
|
-
DROPDOWN: 1e3,
|
|
15187
|
-
STICKY: 1020,
|
|
15188
|
-
FIXED: 1030,
|
|
15189
|
-
MODAL_BACKDROP: 1040,
|
|
15190
|
-
MODAL: 1050,
|
|
15191
|
-
POPOVER: 1060,
|
|
15192
|
-
TOOLTIP: 1070
|
|
15193
|
-
};
|
|
15194
15635
|
//#endregion
|
|
15195
15636
|
//#region src/stores/plugins/secure-storage.ts
|
|
15196
15637
|
const CONFIG = {
|
|
@@ -16108,51 +16549,29 @@ function replace(path) {
|
|
|
16108
16549
|
//#endregion
|
|
16109
16550
|
//#region src/router/utils/route-helpers.ts
|
|
16110
16551
|
/**
|
|
16111
|
-
*
|
|
16552
|
+
* 过滤菜单项(根据权限)- 委托给 composables 实现
|
|
16112
16553
|
* @param items 菜单项数组
|
|
16113
16554
|
* @param permissions 用户权限
|
|
16114
16555
|
* @returns 过滤后的菜单项
|
|
16115
16556
|
*/
|
|
16116
16557
|
function filterMenuItems$1(items, permissions) {
|
|
16117
|
-
|
|
16118
|
-
const { roles = [], permissions: perms = [] } = permissions;
|
|
16119
|
-
return items.filter((item) => {
|
|
16120
|
-
if (item.roles && item.roles.length > 0) {
|
|
16121
|
-
if (!item.roles.some((role) => roles.includes(role))) return false;
|
|
16122
|
-
}
|
|
16123
|
-
if (item.permission) {
|
|
16124
|
-
if (!(Array.isArray(item.permission) ? item.permission : [item.permission]).some((p) => perms.includes(p))) return false;
|
|
16125
|
-
}
|
|
16126
|
-
if (item.children && item.children.length > 0) item.children = filterMenuItems$1(item.children, permissions);
|
|
16127
|
-
return true;
|
|
16128
|
-
});
|
|
16558
|
+
return filterMenuItems(items, permissions);
|
|
16129
16559
|
}
|
|
16130
16560
|
/**
|
|
16131
|
-
* 将 MenuItem 数组转换为路由记录
|
|
16561
|
+
* 将 MenuItem 数组转换为路由记录 - 委托给 composables 实现
|
|
16132
16562
|
* @param items 菜单项数组
|
|
16133
16563
|
* @param options 选项
|
|
16134
16564
|
* @returns 路由记录数组
|
|
16135
16565
|
*/
|
|
16136
16566
|
function menuToRoutes$1(items, options = {}) {
|
|
16137
16567
|
const { basePath = "", userPermissions } = options;
|
|
16138
|
-
return (userPermissions ? filterMenuItems$1(items, userPermissions) : items).map((
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
permission: item.permission,
|
|
16146
|
-
roles: item.roles,
|
|
16147
|
-
keepAlive: true
|
|
16148
|
-
}
|
|
16149
|
-
};
|
|
16150
|
-
if (item.children && item.children.length > 0) route.children = menuToRoutes$1(item.children, {
|
|
16151
|
-
basePath: `${basePath}/${route.path}`,
|
|
16152
|
-
userPermissions
|
|
16153
|
-
});
|
|
16154
|
-
return route;
|
|
16155
|
-
});
|
|
16568
|
+
return menuToRoutes(userPermissions ? filterMenuItems$1(items, userPermissions) : items, basePath).map((route) => ({
|
|
16569
|
+
...route,
|
|
16570
|
+
meta: {
|
|
16571
|
+
...route.meta,
|
|
16572
|
+
keepAlive: true
|
|
16573
|
+
}
|
|
16574
|
+
}));
|
|
16156
16575
|
}
|
|
16157
16576
|
/**
|
|
16158
16577
|
* 检查路由是否需要认证
|
|
@@ -16237,4 +16656,4 @@ var router_exports = /* @__PURE__ */ __exportAll({
|
|
|
16237
16656
|
setRouter: () => setRouter
|
|
16238
16657
|
});
|
|
16239
16658
|
//#endregion
|
|
16240
|
-
export { ANIMATION_DURATION, COMPONENT_PREFIX, CSS_PREFIX, DEBOUNCE_DEFAULTS,
|
|
16659
|
+
export { ANIMATION_DURATION, COMPONENT_PREFIX, CSS_PREFIX, DEBOUNCE_DEFAULTS, DEFAULT_LAYOUT_SIZE, Message, Notification, THROTTLE_DEFAULTS, YdAdminResolver, ai_loader_default as YdAiLoader, anchor_default as YdAnchor, auto_complete_default as YdAutoComplete, avatar_default as YdAvatar, badge_default as YdBadge, breadcrumb_default as YdBreadcrumb, button_default as YdButton, calendar_default as YdCalendar, captcha_default as YdCaptcha, card_default as YdCard, cascader_default as YdCascader, chat_bubble_default as YdChatBubble, chat_page_default as YdChatPage, checkbox_default as YdCheckbox, checkbox_group_default as YdCheckboxGroup, code_block_default as YdCodeBlock, collapse_default as YdCollapse, color_picker_default as YdColorPicker, config_provider_default as YdConfigProvider, context_menu_default as YdContextMenu, conversation_default as YdConversation, crud_page_default as YdCrudPage, date_picker_default as YdDatePicker, date_range_picker_default as YdDateRangePicker, divider_default as YdDivider, drawer_default as YdDrawer, dropdown_default as YdDropdown, empty_default as YdEmpty, flow_chart_default as YdFlowChart, form_default as YdForm, form_item_default as YdFormItem, icon_default as YdIcon, image_default as YdImage, image_preview_group_default as YdImagePreviewGroup, input_default as YdInput, input_number_default as YdInputNumber, layout_default as YdLayout, layout_content_default as YdLayoutContent, layout_header_default as YdLayoutHeader, layout_sidebar_default as YdLayoutSidebar, list_default as YdList, loading_bar_default as YdLoadingBar, login_default as YdLogin, login_centered_default as YdLoginCentered, markdown_default as YdMarkdown, menu_default as YdMenu, modal_default as YdModal, model_selector_default as YdModelSelector, pagination_default as YdPagination, pin_input_default as YdPinInput, popconfirm_default as YdPopconfirm, progress_default as YdProgress, prompt_input_default as YdPromptInput, radio_default as YdRadio, radio_group_default as YdRadioGroup, rate_default as YdRate, reasoning_default as YdReasoning, result_default as YdResult, router_exports as YdRouter, SchemaForm_default as YdSchemaForm, select_default as YdSelect, skeleton_default as YdSkeleton, slider_default as YdSlider, sources_default as YdSources, space_default as YdSpace, spin_default as YdSpin, statistic_default as YdStatistic, stepper_default as YdStepper, steps_default as YdSteps, streaming_text_default as YdStreamingText, suggestion_default as YdSuggestion, switch_default as YdSwitch, table_default as YdTable, tabs_default as YdTabs, tag_default as YdTag, textarea_default as YdTextarea, time_picker_default as YdTimePicker, timeline_default as YdTimeline, tooltip_default as YdTooltip, transfer_default as YdTransfer, tree_default as YdTree, tree_select_default as YdTreeSelect, upload_default as YdUpload, watermark_default as YdWatermark, Z_INDEX, buildBreadcrumb, changeLocale, checkRoutePermission, clearKeyCache, cn, convertToSimpleRoute, createSecureStorage, createWatermark, debounce, decrypt, deepClone, dt, dynamicRouter, encrypt, filterMenuItems, findMenuItem, findMenuPath, flattenMenuItems, generateId, generateRouteTitle, generateSessionKey, getBreadcrumbPaths, getCurrentLocale, getIcon, getIconRegistry, getKeySource, i18n, initSecureStorage, isArray, isDate, isEmpty, isEmptyObject, isFunction, isObject, isPathMatch, isPromise, isStorageReady, joinPath, loadingBar, menuToRoutes, nf, normalizePath, registerIcon, registerLazyLocale, removeWatermark, resetStorageKey, rotateStorageKey, searchMenuItems, secureLocal, secureSession, secureStoragePlugin, setLocale, setSessionStorageEncryptionKey, setStorageEncryptionKey, setupI18n, signData, storageReady, supportedLocales, t, tc, themes, throttle, useConfig, useFormSchema, useFormValidate, useLoading, useLoadingBar, useLoginForm, useNamespace, verifyData };
|