yd-admin 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4862,7 +4862,7 @@ const _hoisted_9$9 = [
4862
4862
  const _hoisted_10$8 = ["onClick"];
4863
4863
  const _hoisted_11$8 = ["onClick"];
4864
4864
  const _hoisted_12$5 = ["onClick"];
4865
- const _hoisted_13$4 = [
4865
+ const _hoisted_13$5 = [
4866
4866
  "checked",
4867
4867
  "indeterminate",
4868
4868
  "disabled"
@@ -5316,7 +5316,7 @@ var tree_select_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */
5316
5316
  checked: checkedKeys.value.includes(child.key),
5317
5317
  indeterminate: indeterminateKeys.value.includes(child.key),
5318
5318
  disabled: child.disabled
5319
- }, null, 8, _hoisted_13$4)], 10, _hoisted_12$5)) : createCommentVNode("v-if", true),
5319
+ }, null, 8, _hoisted_13$5)], 10, _hoisted_12$5)) : createCommentVNode("v-if", true),
5320
5320
  createElementVNode("span", { class: normalizeClass(e("node-title")) }, toDisplayString(child.title), 3)
5321
5321
  ], 10, _hoisted_10$8);
5322
5322
  }), 128))], 2)) : createCommentVNode("v-if", true)
@@ -6356,14 +6356,14 @@ const _hoisted_9$7 = { class: "yd-chat-page__sidebar-header" };
6356
6356
  const _hoisted_10$7 = { class: "yd-chat-page__conversation-list" };
6357
6357
  const _hoisted_11$7 = ["onClick"];
6358
6358
  const _hoisted_12$4 = { class: "yd-chat-page__conv-info" };
6359
- const _hoisted_13$3 = { class: "yd-chat-page__conv-title" };
6360
- const _hoisted_14$2 = ["onClick"];
6361
- const _hoisted_15$2 = { class: "yd-chat-page__content" };
6362
- const _hoisted_16$2 = {
6359
+ const _hoisted_13$4 = { class: "yd-chat-page__conv-title" };
6360
+ const _hoisted_14$3 = ["onClick"];
6361
+ const _hoisted_15$3 = { class: "yd-chat-page__content" };
6362
+ const _hoisted_16$3 = {
6363
6363
  key: 0,
6364
6364
  class: "yd-chat-page__welcome"
6365
6365
  };
6366
- const _hoisted_17$1 = { class: "yd-chat-page__welcome-suggestions" };
6366
+ const _hoisted_17$2 = { class: "yd-chat-page__welcome-suggestions" };
6367
6367
  const _hoisted_18$1 = {
6368
6368
  key: 0,
6369
6369
  class: "yd-chat-page__message-avatar"
@@ -6575,7 +6575,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
6575
6575
  width: "18",
6576
6576
  height: "18"
6577
6577
  }, [createElementVNode("path", { d: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z" })])], -1)),
6578
- createElementVNode("div", _hoisted_12$4, [createElementVNode("div", _hoisted_13$3, toDisplayString(conv.title), 1)]),
6578
+ createElementVNode("div", _hoisted_12$4, [createElementVNode("div", _hoisted_13$4, toDisplayString(conv.title), 1)]),
6579
6579
  createElementVNode("button", {
6580
6580
  class: "yd-chat-page__conv-delete",
6581
6581
  onClick: ($event) => handleDeleteConversation(conv.id, $event)
@@ -6584,11 +6584,11 @@ var chat_page_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
6584
6584
  fill: "currentColor",
6585
6585
  width: "14",
6586
6586
  height: "14"
6587
- }, [createElementVNode("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" })], -1)])], 8, _hoisted_14$2)
6587
+ }, [createElementVNode("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" })], -1)])], 8, _hoisted_14$3)
6588
6588
  ], 10, _hoisted_11$7);
6589
6589
  }), 128))])], 4)) : createCommentVNode("v-if", true),
6590
6590
  createCommentVNode(" Chat Area "),
6591
- createElementVNode("main", _hoisted_15$2, [
6591
+ createElementVNode("main", _hoisted_15$3, [
6592
6592
  createCommentVNode(" Messages "),
6593
6593
  createElementVNode("div", {
6594
6594
  ref_key: "conversationRef",
@@ -6596,7 +6596,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
6596
6596
  class: "yd-chat-page__messages"
6597
6597
  }, [
6598
6598
  createCommentVNode(" Welcome Screen "),
6599
- allMessages.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_16$2, [
6599
+ allMessages.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_16$3, [
6600
6600
  _cache[20] || (_cache[20] = createElementVNode("div", { class: "yd-chat-page__welcome-icon" }, [createElementVNode("svg", {
6601
6601
  viewBox: "0 0 24 24",
6602
6602
  fill: "currentColor",
@@ -6604,7 +6604,7 @@ var chat_page_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ de
6604
6604
  height: "64"
6605
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)),
6606
6606
  _cache[21] || (_cache[21] = createElementVNode("h2", { class: "yd-chat-page__welcome-title" }, "How can I help you today?", -1)),
6607
- createElementVNode("div", _hoisted_17$1, [
6607
+ createElementVNode("div", _hoisted_17$2, [
6608
6608
  createVNode(button_default, { onClick: _cache[3] || (_cache[3] = ($event) => handleSend("Help me write a poem", [])) }, {
6609
6609
  default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode("Help me write a poem", -1)])]),
6610
6610
  _: 1
@@ -8643,10 +8643,10 @@ const _hoisted_10$3 = {
8643
8643
  };
8644
8644
  const _hoisted_11$3 = ["src", "alt"];
8645
8645
  const _hoisted_12$3 = ["onMouseenter", "onMouseleave"];
8646
- const _hoisted_13$2 = ["data-many"];
8647
- const _hoisted_14$1 = ["onClick"];
8648
- const _hoisted_15$1 = ["onClick"];
8649
- const _hoisted_16$1 = ["onClick"];
8646
+ const _hoisted_13$3 = ["data-many"];
8647
+ const _hoisted_14$2 = ["onClick"];
8648
+ const _hoisted_15$2 = ["onClick"];
8649
+ const _hoisted_16$2 = ["onClick"];
8650
8650
  var menu_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
8651
8651
  name: "YdMenu",
8652
8652
  __name: "menu",
@@ -9048,8 +9048,8 @@ var menu_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
9048
9048
  key: 1,
9049
9049
  class: normalizeClass([e("badge"), e(`badge--${sub.badgeType || "primary"}`)])
9050
9050
  }, toDisplayString(sub.badge), 3)) : createCommentVNode("v-if", true)
9051
- ], 10, _hoisted_14$1);
9052
- }), 128))], 10, _hoisted_13$2)], 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Level 2 item (standalone) "), createElementVNode("div", {
9051
+ ], 10, _hoisted_14$2);
9052
+ }), 128))], 10, _hoisted_13$3)], 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Level 2 item (standalone) "), createElementVNode("div", {
9053
9053
  class: normalizeClass(e("dropdown-group")),
9054
9054
  onClick: ($event) => handleSelect(child)
9055
9055
  }, [createElementVNode("div", { class: normalizeClass([e("dropdown-item"), {
@@ -9065,7 +9065,7 @@ var menu_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
9065
9065
  key: 1,
9066
9066
  class: normalizeClass([e("badge"), e(`badge--${child.badgeType || "primary"}`)])
9067
9067
  }, toDisplayString(child.badge), 3)) : createCommentVNode("v-if", true)
9068
- ], 2)], 10, _hoisted_15$1)], 2112))], 64);
9068
+ ], 2)], 10, _hoisted_15$2)], 2112))], 64);
9069
9069
  }), 128))], 2)], 46, _hoisted_12$3)) : createCommentVNode("v-if", true)]),
9070
9070
  _: 2
9071
9071
  }, 1024)]))], 2112))
@@ -9078,7 +9078,7 @@ var menu_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineC
9078
9078
  }, [item.icon ? (openBlock(), createElementBlock("span", {
9079
9079
  key: 0,
9080
9080
  class: normalizeClass(e("icon"))
9081
- }, toDisplayString(item.icon), 3)) : createCommentVNode("v-if", true), createElementVNode("span", { class: normalizeClass(e("label")) }, toDisplayString(item.label), 3)], 10, _hoisted_16$1)], 2112))], 64);
9081
+ }, toDisplayString(item.icon), 3)) : createCommentVNode("v-if", true), createElementVNode("span", { class: normalizeClass(e("label")) }, toDisplayString(item.label), 3)], 10, _hoisted_16$2)], 2112))], 64);
9082
9082
  }), 128))], 10, _hoisted_1$22);
9083
9083
  };
9084
9084
  }
@@ -10464,7 +10464,11 @@ var layout_header_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ *
10464
10464
  type: Boolean,
10465
10465
  default: false
10466
10466
  },
10467
- headerHeight: { default: 56 }
10467
+ headerHeight: { default: 56 },
10468
+ showSettings: {
10469
+ type: Boolean,
10470
+ default: true
10471
+ }
10468
10472
  },
10469
10473
  emits: [
10470
10474
  "tab-change",
@@ -10787,7 +10791,7 @@ var layout_header_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ *
10787
10791
  _: 1
10788
10792
  })) : createCommentVNode("v-if", true)], true),
10789
10793
  createCommentVNode(" 设置 "),
10790
- renderSlot(_ctx.$slots, "settings", {}, () => [createElementVNode("div", {
10794
+ __props.showSettings ? renderSlot(_ctx.$slots, "settings", { key: 0 }, () => [createElementVNode("div", {
10791
10795
  class: normalizeClass(el("action-btn")),
10792
10796
  onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("settings-click"))
10793
10797
  }, [..._cache[7] || (_cache[7] = [createElementVNode("svg", {
@@ -10804,7 +10808,7 @@ var layout_header_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ *
10804
10808
  cx: "12",
10805
10809
  cy: "12",
10806
10810
  r: "3"
10807
- }), createElementVNode("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })], -1)])], 2)], true)
10811
+ }), createElementVNode("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })], -1)])], 2)], true) : createCommentVNode("v-if", true)
10808
10812
  ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" 移动端:仅头像 "), createElementVNode("div", { class: normalizeClass(el("user")) }, [__props.userInfo ? (openBlock(), createBlock(dropdown_default, {
10809
10813
  key: 0,
10810
10814
  items: mobileUserMenuItems.value,
@@ -10825,7 +10829,7 @@ var layout_header_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ *
10825
10829
  ], 6);
10826
10830
  };
10827
10831
  }
10828
- }), [["__scopeId", "data-v-1d3c26d9"]]);
10832
+ }), [["__scopeId", "data-v-f6d06be3"]]);
10829
10833
  var layout_content_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
10830
10834
  name: "YdLayoutContent",
10831
10835
  __name: "layout-content",
@@ -11165,20 +11169,197 @@ const DEFAULT_LAYOUT_SIZE = {
11165
11169
  siderCollapsedWidth: 48,
11166
11170
  headerHeight: 40
11167
11171
  };
11172
+ /**
11173
+ * 默认设置项列表
11174
+ */
11175
+ const DEFAULT_SETTINGS = [
11176
+ {
11177
+ key: "theme",
11178
+ label: "主题",
11179
+ type: "theme"
11180
+ },
11181
+ {
11182
+ key: "siderWidth",
11183
+ label: "侧边栏宽度",
11184
+ type: "siderWidth"
11185
+ },
11186
+ {
11187
+ key: "collapsed",
11188
+ label: "折叠侧边栏",
11189
+ type: "collapsed"
11190
+ },
11191
+ {
11192
+ key: "waterfall",
11193
+ label: "菜单模式",
11194
+ type: "waterfall"
11195
+ },
11196
+ {
11197
+ key: "footerText",
11198
+ label: "底部支持",
11199
+ type: "footerText"
11200
+ }
11201
+ ];
11202
+ /**
11203
+ * 最小化设置
11204
+ */
11205
+ const MINIMAL_SETTINGS = [{
11206
+ key: "theme",
11207
+ label: "主题",
11208
+ type: "theme"
11209
+ }];
11210
+ /**
11211
+ * 完整设置
11212
+ */
11213
+ const FULL_SETTINGS = [
11214
+ {
11215
+ key: "theme",
11216
+ label: "主题",
11217
+ type: "theme"
11218
+ },
11219
+ {
11220
+ key: "siderWidth",
11221
+ label: "侧边栏宽度",
11222
+ type: "siderWidth"
11223
+ },
11224
+ {
11225
+ key: "collapsed",
11226
+ label: "折叠侧边栏",
11227
+ type: "collapsed"
11228
+ },
11229
+ {
11230
+ key: "waterfall",
11231
+ label: "菜单模式",
11232
+ type: "waterfall"
11233
+ },
11234
+ {
11235
+ key: "footerText",
11236
+ label: "底部支持",
11237
+ type: "footerText"
11238
+ }
11239
+ ];
11240
+ /**
11241
+ * 设置预设映射
11242
+ */
11243
+ const SETTINGS_PRESETS = {
11244
+ default: DEFAULT_SETTINGS,
11245
+ minimal: MINIMAL_SETTINGS,
11246
+ full: FULL_SETTINGS,
11247
+ none: []
11248
+ };
11249
+ /**
11250
+ * 示例菜单数据 - 通用管理后台
11251
+ */
11252
+ const DEFAULT_MENU_ITEMS = [
11253
+ {
11254
+ key: "dashboard",
11255
+ label: "工作台",
11256
+ icon: "home",
11257
+ path: "/dashboard"
11258
+ },
11259
+ {
11260
+ key: "system",
11261
+ label: "系统管理",
11262
+ icon: "setting",
11263
+ children: [
11264
+ {
11265
+ key: "system-user",
11266
+ label: "用户管理",
11267
+ path: "/system/user"
11268
+ },
11269
+ {
11270
+ key: "system-role",
11271
+ label: "角色管理",
11272
+ path: "/system/role"
11273
+ },
11274
+ {
11275
+ key: "system-menu",
11276
+ label: "菜单管理",
11277
+ path: "/system/menu"
11278
+ }
11279
+ ]
11280
+ },
11281
+ {
11282
+ key: "order",
11283
+ label: "订单管理",
11284
+ icon: "order",
11285
+ children: [{
11286
+ key: "order-list",
11287
+ label: "订单列表",
11288
+ path: "/order/list"
11289
+ }, {
11290
+ key: "order-refund",
11291
+ label: "退款管理",
11292
+ path: "/order/refund"
11293
+ }]
11294
+ }
11295
+ ];
11296
+ /**
11297
+ * 最小化菜单
11298
+ */
11299
+ const MINIMAL_MENU_ITEMS = [{
11300
+ key: "home",
11301
+ label: "首页",
11302
+ icon: "home",
11303
+ path: "/"
11304
+ }];
11305
+ /**
11306
+ * 完整菜单
11307
+ */
11308
+ const FULL_MENU_ITEMS = DEFAULT_MENU_ITEMS;
11309
+ /**
11310
+ * 菜单预设映射
11311
+ */
11312
+ const MENU_PRESETS = {
11313
+ default: DEFAULT_MENU_ITEMS,
11314
+ minimal: MINIMAL_MENU_ITEMS,
11315
+ full: FULL_MENU_ITEMS,
11316
+ none: []
11317
+ };
11318
+ /**
11319
+ * 示例标签页数据
11320
+ */
11321
+ const DEFAULT_TABS = [{
11322
+ key: "home",
11323
+ label: "工作台",
11324
+ path: "/dashboard",
11325
+ closable: false
11326
+ }];
11327
+ /**
11328
+ * 最小化标签页
11329
+ */
11330
+ const MINIMAL_TABS = [];
11331
+ /**
11332
+ * 完整标签页
11333
+ */
11334
+ const FULL_TABS = DEFAULT_TABS;
11335
+ /**
11336
+ * 标签页预设映射
11337
+ */
11338
+ const TABS_PRESETS = {
11339
+ default: DEFAULT_TABS,
11340
+ minimal: MINIMAL_TABS,
11341
+ full: FULL_TABS,
11342
+ none: []
11343
+ };
11168
11344
  //#endregion
11169
11345
  //#region src/components/layout/layout/layout.vue
11170
11346
  const _hoisted_1$15 = ["data-theme"];
11171
11347
  const _hoisted_2$10 = { class: "yd-layout-settings" };
11172
11348
  const _hoisted_3$7 = { class: "yd-layout-settings__item" };
11173
11349
  const _hoisted_4$6 = { class: "yd-layout-settings__row" };
11174
- const _hoisted_5$3 = { class: "yd-layout-settings__item" };
11175
- const _hoisted_6$3 = { class: "yd-layout-settings__row" };
11176
- const _hoisted_7$2 = { class: "yd-layout-settings__item" };
11177
- const _hoisted_8$2 = { class: "yd-layout-settings__row" };
11350
+ const _hoisted_5$3 = { class: "yd-layout-settings__label" };
11351
+ const _hoisted_6$3 = { class: "yd-layout-settings__item" };
11352
+ const _hoisted_7$2 = { class: "yd-layout-settings__row" };
11353
+ const _hoisted_8$2 = { class: "yd-layout-settings__label" };
11178
11354
  const _hoisted_9$2 = { class: "yd-layout-settings__item" };
11179
11355
  const _hoisted_10$2 = { class: "yd-layout-settings__row" };
11180
- const _hoisted_11$2 = { class: "yd-layout-settings__item" };
11181
- const _hoisted_12$2 = { class: "yd-layout-settings__row" };
11356
+ const _hoisted_11$2 = { class: "yd-layout-settings__label" };
11357
+ const _hoisted_12$2 = { class: "yd-layout-settings__item" };
11358
+ const _hoisted_13$2 = { class: "yd-layout-settings__row" };
11359
+ const _hoisted_14$1 = { class: "yd-layout-settings__label" };
11360
+ const _hoisted_15$1 = { class: "yd-layout-settings__item" };
11361
+ const _hoisted_16$1 = { class: "yd-layout-settings__row" };
11362
+ const _hoisted_17$1 = { class: "yd-layout-settings__label" };
11182
11363
  const MOBILE_BREAKPOINT = 768;
11183
11364
  var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
11184
11365
  name: "YdLayout",
@@ -11228,7 +11409,16 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11228
11409
  type: Boolean,
11229
11410
  default: true
11230
11411
  },
11231
- watermark: { default: void 0 }
11412
+ watermark: { default: void 0 },
11413
+ showSettings: {
11414
+ type: Boolean,
11415
+ default: true
11416
+ },
11417
+ settings: { default: () => DEFAULT_SETTINGS },
11418
+ menuPreset: {},
11419
+ tabsPreset: {},
11420
+ settingsPreset: {},
11421
+ preset: {}
11232
11422
  },
11233
11423
  emits: [
11234
11424
  "update:collapsed",
@@ -11282,6 +11472,25 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11282
11472
  const mergedWaterfall = computed(() => internalWaterfall.value);
11283
11473
  const mergedPopupAlign = computed(() => internalPopupAlign.value);
11284
11474
  const mergedFooterText = computed(() => internalFooterText.value);
11475
+ const resolvedMenuItems = computed(() => {
11476
+ if (props.menuItems && props.menuItems.length > 0) return props.menuItems;
11477
+ const menuPreset = props.menuPreset || props.preset;
11478
+ if (menuPreset) return MENU_PRESETS[menuPreset] || [];
11479
+ return [];
11480
+ });
11481
+ const resolvedTabs = computed(() => {
11482
+ if (props.tabs && props.tabs.length > 0) return props.tabs;
11483
+ if (props.modelTabs && props.modelTabs.length > 0) return props.modelTabs;
11484
+ const tabsPresetValue = props.tabsPreset || props.preset;
11485
+ if (tabsPresetValue) return TABS_PRESETS[tabsPresetValue] || [];
11486
+ return [];
11487
+ });
11488
+ const resolvedSettings = computed(() => {
11489
+ if (props.settings && props.settings.length > 0) return props.settings;
11490
+ const settingsPresetValue = props.settingsPreset || props.preset;
11491
+ if (settingsPresetValue) return SETTINGS_PRESETS[settingsPresetValue] || DEFAULT_SETTINGS;
11492
+ return DEFAULT_SETTINGS;
11493
+ });
11285
11494
  const layoutClasses = computed(() => cn("yd-layout", `yd-layout--${mergedTheme.value}`, mergedCollapsed.value && "yd-layout--collapsed"));
11286
11495
  const mainClasses = computed(() => cn("yd-layout__main"));
11287
11496
  const mainStyle = computed(() => ({ marginLeft: `${siderCurrentWidth.value}px` }));
@@ -11393,7 +11602,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11393
11602
  title: __props.title,
11394
11603
  collapsed: mergedCollapsed.value,
11395
11604
  theme: mergedTheme.value,
11396
- "menu-items": __props.menuItems,
11605
+ "menu-items": resolvedMenuItems.value,
11397
11606
  "active-key": __props.activeKey,
11398
11607
  "collapsed-width": __props.siderCollapsedWidth,
11399
11608
  "expanded-width": mergedSiderWidth.value,
@@ -11437,14 +11646,15 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11437
11646
  __props.hasHeader ? (openBlock(), createBlock(layout_header_default, {
11438
11647
  key: 0,
11439
11648
  theme: mergedTheme.value,
11440
- tabs: __props.tabs,
11441
- "model-tabs": __props.modelTabs,
11649
+ tabs: resolvedTabs.value,
11650
+ "model-tabs": resolvedTabs.value,
11442
11651
  "active-tab": __props.activeTab,
11443
11652
  "user-info": __props.userInfo,
11444
11653
  "sider-width": mergedCollapsed.value ? __props.siderCollapsedWidth : mergedSiderWidth.value,
11445
11654
  "header-height": mergedHeaderHeight.value,
11446
11655
  "is-mobile": isMobileMode.value,
11447
11656
  fixed: __props.headerFixed,
11657
+ "show-settings": __props.showSettings,
11448
11658
  onTabChange: handleTabChange,
11449
11659
  onTabClose: handleTabClose,
11450
11660
  onTabAdd: handleTabAdd,
@@ -11467,7 +11677,8 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11467
11677
  "sider-width",
11468
11678
  "header-height",
11469
11679
  "is-mobile",
11470
- "fixed"
11680
+ "fixed",
11681
+ "show-settings"
11471
11682
  ])) : createCommentVNode("v-if", true),
11472
11683
  createCommentVNode(" 内容区 "),
11473
11684
  __props.hasContent && __props.watermark ? (openBlock(), createBlock(watermark_default, normalizeProps(mergeProps({ key: 1 }, __props.watermark)), {
@@ -11499,9 +11710,8 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11499
11710
  closable: true,
11500
11711
  "mask-closable": true
11501
11712
  }, {
11502
- default: withCtx(() => [createElementVNode("div", _hoisted_2$10, [
11503
- createCommentVNode(" 主题切换 "),
11504
- createElementVNode("div", _hoisted_3$7, [createElementVNode("div", _hoisted_4$6, [_cache[15] || (_cache[15] = createElementVNode("span", { class: "yd-layout-settings__label" }, "主题", -1)), createVNode(space_default, {
11713
+ default: withCtx(() => [createElementVNode("div", _hoisted_2$10, [(openBlock(true), createElementBlock(Fragment, null, renderList(resolvedSettings.value, (item) => {
11714
+ return openBlock(), createElementBlock(Fragment, { key: item.key }, [createCommentVNode(" 自定义设置项 "), item.type === "custom" && item.slot ? renderSlot(_ctx.$slots, item.slot, { key: 0 }, void 0, true) : item.type === "theme" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 主题设置 "), createElementVNode("div", _hoisted_3$7, [createElementVNode("div", _hoisted_4$6, [createElementVNode("span", _hoisted_5$3, toDisplayString(item.label), 1), createVNode(space_default, {
11505
11715
  size: 4,
11506
11716
  direction: "horizontal"
11507
11717
  }, {
@@ -11532,9 +11742,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11532
11742
  }, 8, ["variant"])
11533
11743
  ]),
11534
11744
  _: 1
11535
- })])]),
11536
- createCommentVNode(" 侧边栏宽度 "),
11537
- createElementVNode("div", _hoisted_5$3, [createElementVNode("div", _hoisted_6$3, [_cache[19] || (_cache[19] = createElementVNode("span", { class: "yd-layout-settings__label" }, "侧边栏宽度", -1)), createVNode(space_default, {
11745
+ })])])], 2112)) : item.type === "siderWidth" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" 侧边栏宽度设置 "), createElementVNode("div", _hoisted_6$3, [createElementVNode("div", _hoisted_7$2, [createElementVNode("span", _hoisted_8$2, toDisplayString(item.label), 1), createVNode(space_default, {
11538
11746
  size: 4,
11539
11747
  direction: "horizontal"
11540
11748
  }, {
@@ -11544,7 +11752,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11544
11752
  variant: internalSiderWidth.value === 160 ? "primary" : "text",
11545
11753
  onClick: _cache[3] || (_cache[3] = ($event) => internalSiderWidth.value = 160)
11546
11754
  }, {
11547
- default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode(" 窄 ", -1)])]),
11755
+ default: withCtx(() => [..._cache[15] || (_cache[15] = [createTextVNode(" 窄 ", -1)])]),
11548
11756
  _: 1
11549
11757
  }, 8, ["variant"]),
11550
11758
  createVNode(button_default, {
@@ -11552,7 +11760,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11552
11760
  variant: internalSiderWidth.value === 200 ? "primary" : "text",
11553
11761
  onClick: _cache[4] || (_cache[4] = ($event) => internalSiderWidth.value = 200)
11554
11762
  }, {
11555
- default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode(" 中 ", -1)])]),
11763
+ default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode(" 中 ", -1)])]),
11556
11764
  _: 1
11557
11765
  }, 8, ["variant"]),
11558
11766
  createVNode(button_default, {
@@ -11560,19 +11768,15 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11560
11768
  variant: internalSiderWidth.value === 240 ? "primary" : "text",
11561
11769
  onClick: _cache[5] || (_cache[5] = ($event) => internalSiderWidth.value = 240)
11562
11770
  }, {
11563
- default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode(" 宽 ", -1)])]),
11771
+ default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode(" 宽 ", -1)])]),
11564
11772
  _: 1
11565
11773
  }, 8, ["variant"])
11566
11774
  ]),
11567
11775
  _: 1
11568
- })])]),
11569
- createCommentVNode(" 折叠侧边栏 "),
11570
- createElementVNode("div", _hoisted_7$2, [createElementVNode("div", _hoisted_8$2, [_cache[20] || (_cache[20] = createElementVNode("span", { class: "yd-layout-settings__label" }, "折叠侧边栏", -1)), createVNode(switch_default, {
11776
+ })])])], 2112)) : item.type === "collapsed" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" 折叠侧边栏设置 "), createElementVNode("div", _hoisted_9$2, [createElementVNode("div", _hoisted_10$2, [createElementVNode("span", _hoisted_11$2, toDisplayString(item.label), 1), createVNode(switch_default, {
11571
11777
  modelValue: internalCollapsed.value,
11572
11778
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => internalCollapsed.value = $event)
11573
- }, null, 8, ["modelValue"])])]),
11574
- createCommentVNode(" 菜单模式 "),
11575
- createElementVNode("div", _hoisted_9$2, [createElementVNode("div", _hoisted_10$2, [_cache[24] || (_cache[24] = createElementVNode("span", { class: "yd-layout-settings__label" }, "菜单模式", -1)), createVNode(space_default, {
11779
+ }, null, 8, ["modelValue"])])])], 2112)) : item.type === "waterfall" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createCommentVNode(" 菜单模式设置 "), createElementVNode("div", _hoisted_12$2, [createElementVNode("div", _hoisted_13$2, [createElementVNode("span", _hoisted_14$1, toDisplayString(item.label), 1), createVNode(space_default, {
11576
11780
  size: 4,
11577
11781
  direction: "horizontal"
11578
11782
  }, {
@@ -11582,7 +11786,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11582
11786
  variant: !internalWaterfall.value ? "primary" : "text",
11583
11787
  onClick: _cache[7] || (_cache[7] = ($event) => internalWaterfall.value = false)
11584
11788
  }, {
11585
- default: withCtx(() => [..._cache[21] || (_cache[21] = [createTextVNode(" 传统 ", -1)])]),
11789
+ default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode(" 传��� ", -1)])]),
11586
11790
  _: 1
11587
11791
  }, 8, ["variant"]),
11588
11792
  createVNode(button_default, {
@@ -11593,7 +11797,7 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11593
11797
  internalPopupAlign.value = "container";
11594
11798
  })
11595
11799
  }, {
11596
- default: withCtx(() => [..._cache[22] || (_cache[22] = [createTextVNode(" 容器 ", -1)])]),
11800
+ default: withCtx(() => [..._cache[19] || (_cache[19] = [createTextVNode(" 容器 ", -1)])]),
11597
11801
  _: 1
11598
11802
  }, 8, ["variant"]),
11599
11803
  createVNode(button_default, {
@@ -11604,27 +11808,25 @@ var layout_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defin
11604
11808
  internalPopupAlign.value = "trigger";
11605
11809
  })
11606
11810
  }, {
11607
- default: withCtx(() => [..._cache[23] || (_cache[23] = [createTextVNode(" 浮动 ", -1)])]),
11811
+ default: withCtx(() => [..._cache[20] || (_cache[20] = [createTextVNode(" 浮动 ", -1)])]),
11608
11812
  _: 1
11609
11813
  }, 8, ["variant"])
11610
11814
  ]),
11611
11815
  _: 1
11612
- })])]),
11613
- createCommentVNode(" 底部支持 "),
11614
- createElementVNode("div", _hoisted_11$2, [createElementVNode("div", _hoisted_12$2, [_cache[25] || (_cache[25] = createElementVNode("span", { class: "yd-layout-settings__label" }, "底部支持", -1)), createVNode(input_default, {
11816
+ })])])], 2112)) : item.type === "footerText" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [createCommentVNode(" 底部支持设置 "), createElementVNode("div", _hoisted_15$1, [createElementVNode("div", _hoisted_16$1, [createElementVNode("span", _hoisted_17$1, toDisplayString(item.label), 1), createVNode(input_default, {
11615
11817
  modelValue: internalFooterText.value,
11616
11818
  "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => internalFooterText.value = $event),
11617
11819
  placeholder: "显示在侧边栏底部",
11618
11820
  clearable: "",
11619
11821
  style: { "width": "140px" }
11620
- }, null, 8, ["modelValue"])])])
11621
- ])]),
11622
- _: 1
11822
+ }, null, 8, ["modelValue"])])])], 2112)) : createCommentVNode("v-if", true)], 64);
11823
+ }), 128))])]),
11824
+ _: 3
11623
11825
  }, 8, ["modelValue"])
11624
11826
  ], 14, _hoisted_1$15);
11625
11827
  };
11626
11828
  }
11627
- }), [["__scopeId", "data-v-2a960b8a"]]);
11829
+ }), [["__scopeId", "data-v-7b7fc384"]]);
11628
11830
  var card_default = /* @__PURE__ */ export_helper_default(/* @__PURE__ */ defineComponent({
11629
11831
  name: "YdCard",
11630
11832
  inheritAttrs: false,
@@ -15564,25 +15766,6 @@ function useLoading(initialValue = false) {
15564
15766
  };
15565
15767
  }
15566
15768
  //#endregion
15567
- //#region src/types/index.ts
15568
- /** 是否为数组 */
15569
- const isArray = Array.isArray;
15570
- /** 是否为对象 */
15571
- const isObject = (val) => val !== null && typeof val === "object" && !isArray(val);
15572
- /** 是否为日期 */
15573
- const isDate = (val) => val instanceof Date;
15574
- /** 是否为函数 */
15575
- const isFunction = (val) => typeof val === "function";
15576
- /** 是否为空 */
15577
- const isEmpty = (val) => {
15578
- if (val === null || val === void 0) return true;
15579
- if (isArray(val) || typeof val === "string") return val.length === 0;
15580
- if (isObject(val)) return Object.keys(val).length === 0;
15581
- return false;
15582
- };
15583
- /** 是否为 Promise */
15584
- const isPromise = (val) => val instanceof Promise || typeof val === "object" && typeof val?.["then"] === "function";
15585
- //#endregion
15586
15769
  //#region src/styles/themes/index.ts
15587
15770
  /**
15588
15771
  * Theme definitions
@@ -16656,4 +16839,4 @@ var router_exports = /* @__PURE__ */ __exportAll({
16656
16839
  setRouter: () => setRouter
16657
16840
  });
16658
16841
  //#endregion
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 };
16842
+ export { ANIMATION_DURATION, COMPONENT_PREFIX, CSS_PREFIX, DEBOUNCE_DEFAULTS, DEFAULT_LAYOUT_SIZE, DEFAULT_MENU_ITEMS, DEFAULT_SETTINGS, DEFAULT_TABS, FULL_MENU_ITEMS, FULL_SETTINGS, FULL_TABS, MENU_PRESETS, MINIMAL_MENU_ITEMS, MINIMAL_SETTINGS, MINIMAL_TABS, Message, Notification, SETTINGS_PRESETS, TABS_PRESETS, 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, isEmptyObject, isPathMatch, 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 };
package/dist/style.css CHANGED
@@ -6500,7 +6500,7 @@ to {
6500
6500
  opacity: 0;
6501
6501
  }
6502
6502
 
6503
- .yd-layout-header[data-v-1d3c26d9] {
6503
+ .yd-layout-header[data-v-f6d06be3] {
6504
6504
  display: flex;
6505
6505
  align-items: center;
6506
6506
  justify-content: space-between;
@@ -6515,7 +6515,7 @@ to {
6515
6515
  }
6516
6516
 
6517
6517
  /* 移动端菜单切换按钮 */
6518
- .yd-layout-header__toggle[data-v-1d3c26d9] {
6518
+ .yd-layout-header__toggle[data-v-f6d06be3] {
6519
6519
  display: none;
6520
6520
  align-items: center;
6521
6521
  justify-content: center;
@@ -6527,44 +6527,44 @@ to {
6527
6527
  color: var(--yd-color-fg);
6528
6528
  transition: background var(--yd-transition-fast);
6529
6529
  }
6530
- .yd-layout-header__toggle[data-v-1d3c26d9]:hover {
6530
+ .yd-layout-header__toggle[data-v-f6d06be3]:hover {
6531
6531
  background: var(--yd-color-muted);
6532
6532
  }
6533
6533
  @media (max-width: 767px) {
6534
- .yd-layout-header__toggle[data-v-1d3c26d9] {
6534
+ .yd-layout-header__toggle[data-v-f6d06be3] {
6535
6535
  display: flex;
6536
6536
  }
6537
6537
 
6538
6538
  /* 移动端隐藏桌面版元素 */
6539
- .yd-layout-header__tabs[data-v-1d3c26d9],
6540
- .yd-layout-header__actions[data-v-1d3c26d9] {
6539
+ .yd-layout-header__tabs[data-v-f6d06be3],
6540
+ .yd-layout-header__actions[data-v-f6d06be3] {
6541
6541
  display: none;
6542
6542
  }
6543
6543
 
6544
6544
  /* 移动端显示用户头像 */
6545
- .yd-layout-header__user[data-v-1d3c26d9] {
6545
+ .yd-layout-header__user[data-v-f6d06be3] {
6546
6546
  display: flex;
6547
6547
  }
6548
6548
  }
6549
6549
  @media (min-width: 768px) {
6550
- .yd-layout-header__user[data-v-1d3c26d9] {
6550
+ .yd-layout-header__user[data-v-f6d06be3] {
6551
6551
  display: none;
6552
6552
  }
6553
6553
  }
6554
- .yd-layout-header--dark[data-v-1d3c26d9] {
6554
+ .yd-layout-header--dark[data-v-f6d06be3] {
6555
6555
  --yd-layout-header-bg: #1a1a1a;
6556
6556
  --yd-layout-header-border: #333;
6557
6557
  }
6558
6558
 
6559
6559
  /* 标签页区域 */
6560
- .yd-layout-header__tabs[data-v-1d3c26d9] {
6560
+ .yd-layout-header__tabs[data-v-f6d06be3] {
6561
6561
  flex: 1;
6562
6562
  min-width: 100px;
6563
6563
  overflow: visible;
6564
6564
  }
6565
6565
 
6566
6566
  /* 操作区 */
6567
- .yd-layout-header__actions[data-v-1d3c26d9] {
6567
+ .yd-layout-header__actions[data-v-f6d06be3] {
6568
6568
  display: flex;
6569
6569
  align-items: center;
6570
6570
  flex-shrink: 0;
@@ -6573,12 +6573,12 @@ to {
6573
6573
  }
6574
6574
 
6575
6575
  /* 操作区内部 Space */
6576
- .yd-layout-header__actions[data-v-1d3c26d9] > * {
6576
+ .yd-layout-header__actions[data-v-f6d06be3] > * {
6577
6577
  flex-shrink: 0;
6578
6578
  }
6579
6579
 
6580
6580
  /* 操作按钮 */
6581
- .yd-layout-header__action-btn[data-v-1d3c26d9] {
6581
+ .yd-layout-header__action-btn[data-v-f6d06be3] {
6582
6582
  display: flex;
6583
6583
  align-items: center;
6584
6584
  justify-content: center;
@@ -6590,22 +6590,22 @@ to {
6590
6590
  color: var(--yd-color-muted-fg);
6591
6591
  transition: all var(--yd-transition-fast);
6592
6592
  }
6593
- .yd-layout-header__action-btn[data-v-1d3c26d9] > * {
6593
+ .yd-layout-header__action-btn[data-v-f6d06be3] > * {
6594
6594
  flex-shrink: 0;
6595
6595
  display: flex;
6596
6596
  align-items: center;
6597
6597
  justify-content: center;
6598
6598
  }
6599
- .yd-layout-header__action-btn[data-v-1d3c26d9]:hover {
6599
+ .yd-layout-header__action-btn[data-v-f6d06be3]:hover {
6600
6600
  background: var(--yd-color-muted);
6601
6601
  color: var(--yd-color-fg);
6602
6602
  }
6603
- .yd-layout-header__action-label[data-v-1d3c26d9] {
6603
+ .yd-layout-header__action-label[data-v-f6d06be3] {
6604
6604
  font-size: var(--yd-font-size-sm);
6605
6605
  }
6606
6606
 
6607
6607
  /* 用户信息 */
6608
- .yd-layout-header__user[data-v-1d3c26d9] {
6608
+ .yd-layout-header__user[data-v-f6d06be3] {
6609
6609
  display: flex;
6610
6610
  align-items: center;
6611
6611
  justify-content: center;
@@ -6616,20 +6616,20 @@ to {
6616
6616
  cursor: pointer;
6617
6617
  transition: background var(--yd-transition-fast);
6618
6618
  }
6619
- .yd-layout-header__user[data-v-1d3c26d9] > * {
6619
+ .yd-layout-header__user[data-v-f6d06be3] > * {
6620
6620
  flex-shrink: 0;
6621
6621
  display: flex;
6622
6622
  align-items: center;
6623
6623
  }
6624
6624
 
6625
6625
  /* 嵌套的子组件也要居中 - 通过CSS变量控制尺寸 */
6626
- .yd-layout-header__user .yd-avatar[data-v-1d3c26d9] {
6626
+ .yd-layout-header__user .yd-avatar[data-v-f6d06be3] {
6627
6627
  --yd-avatar-size: 28px;
6628
6628
  }
6629
- .yd-layout-header__user[data-v-1d3c26d9]:hover {
6629
+ .yd-layout-header__user[data-v-f6d06be3]:hover {
6630
6630
  background: var(--yd-color-muted);
6631
6631
  }
6632
- .yd-layout-header__username[data-v-1d3c26d9] {
6632
+ .yd-layout-header__username[data-v-f6d06be3] {
6633
6633
  display: flex;
6634
6634
  align-items: center;
6635
6635
  font-size: var(--yd-font-size-sm);
@@ -6641,14 +6641,14 @@ to {
6641
6641
  }
6642
6642
 
6643
6643
  /* 暗色主题 */
6644
- .yd-layout-header--dark .yd-layout-header__action-btn[data-v-1d3c26d9] {
6644
+ .yd-layout-header--dark .yd-layout-header__action-btn[data-v-f6d06be3] {
6645
6645
  color: rgba(255, 255, 255, 0.65);
6646
6646
  }
6647
- .yd-layout-header--dark .yd-layout-header__action-btn[data-v-1d3c26d9]:hover {
6647
+ .yd-layout-header--dark .yd-layout-header__action-btn[data-v-f6d06be3]:hover {
6648
6648
  background: rgba(255, 255, 255, 0.1);
6649
6649
  color: #fff;
6650
6650
  }
6651
- .yd-layout-header--dark .yd-layout-header__username[data-v-1d3c26d9] {
6651
+ .yd-layout-header--dark .yd-layout-header__username[data-v-f6d06be3] {
6652
6652
  color: #fff;
6653
6653
  }
6654
6654
 
@@ -6826,7 +6826,7 @@ to {
6826
6826
  opacity: 0;
6827
6827
  }
6828
6828
 
6829
- .yd-layout[data-v-2a960b8a] {
6829
+ .yd-layout[data-v-7b7fc384] {
6830
6830
  position: relative;
6831
6831
  display: flex;
6832
6832
  width: 100%;
@@ -6834,19 +6834,19 @@ to {
6834
6834
  background: var(--yd-color-bg);
6835
6835
  color: var(--yd-color-fg);
6836
6836
  }
6837
- .yd-layout--light[data-v-2a960b8a] {
6837
+ .yd-layout--light[data-v-7b7fc384] {
6838
6838
  --yd-layout-sidebar-bg: #ffffff;
6839
6839
  --yd-layout-sidebar-border: var(--yd-color-border);
6840
6840
  --yd-layout-header-bg: #ffffff;
6841
6841
  --yd-layout-header-border: var(--yd-color-border);
6842
6842
  }
6843
- .yd-layout--dark[data-v-2a960b8a] {
6843
+ .yd-layout--dark[data-v-7b7fc384] {
6844
6844
  --yd-layout-sidebar-bg: #141414;
6845
6845
  --yd-layout-sidebar-border: #303030;
6846
6846
  --yd-layout-header-bg: #141414;
6847
6847
  --yd-layout-header-border: #303030;
6848
6848
  }
6849
- .yd-layout--corporate[data-v-2a960b8a] {
6849
+ .yd-layout--corporate[data-v-7b7fc384] {
6850
6850
  --yd-layout-sidebar-bg: #0060ab;
6851
6851
  --yd-layout-sidebar-border: rgba(255, 255, 255, 0.15);
6852
6852
  --yd-layout-header-bg: #ffffff;
@@ -6859,7 +6859,7 @@ to {
6859
6859
  --yd-layout-sidebar-active-bg: rgba(255, 255, 255, 0.2);
6860
6860
  --yd-layout-sidebar-active-fg: #ffffff;
6861
6861
  }
6862
- .yd-layout__main[data-v-2a960b8a] {
6862
+ .yd-layout__main[data-v-7b7fc384] {
6863
6863
  position: relative;
6864
6864
  flex: 1;
6865
6865
  display: flex;
@@ -6871,7 +6871,7 @@ to {
6871
6871
  }
6872
6872
 
6873
6873
  /* 移动端遮罩层 */
6874
- .yd-layout__mask[data-v-2a960b8a] {
6874
+ .yd-layout__mask[data-v-7b7fc384] {
6875
6875
  position: fixed;
6876
6876
  top: 0;
6877
6877
  left: 0;
@@ -6882,20 +6882,20 @@ to {
6882
6882
  }
6883
6883
 
6884
6884
  /* 设置抽屉内容 */
6885
- .yd-layout-settings[data-v-2a960b8a] {
6885
+ .yd-layout-settings[data-v-7b7fc384] {
6886
6886
  display: flex;
6887
6887
  flex-direction: column;
6888
6888
  gap: var(--yd-spacing-lg);
6889
6889
  }
6890
- .yd-layout-settings__item[data-v-2a960b8a] {
6890
+ .yd-layout-settings__item[data-v-7b7fc384] {
6891
6891
  padding: var(--yd-spacing-sm) 0;
6892
6892
  }
6893
- .yd-layout-settings__row[data-v-2a960b8a] {
6893
+ .yd-layout-settings__row[data-v-7b7fc384] {
6894
6894
  display: flex;
6895
6895
  align-items: center;
6896
6896
  justify-content: space-between;
6897
6897
  }
6898
- .yd-layout-settings__label[data-v-2a960b8a] {
6898
+ .yd-layout-settings__label[data-v-7b7fc384] {
6899
6899
  font-size: var(--yd-font-size-base);
6900
6900
  color: var(--yd-color-fg);
6901
6901
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yd-admin",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "基于 Vue 3 的后台管理框架通用组件库 - 轻量、高效、主题可定制",
5
5
  "keywords": [
6
6
  "admin",