@deppon/deppon-template 2.5.3 → 2.5.4

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.
Files changed (55) hide show
  1. package/README.md +4 -0
  2. package/es/index.d.ts +2 -0
  3. package/es/index.js +8 -0
  4. package/es/pro-dialog/ProDialog.vue.css +39 -2
  5. package/es/pro-field/ProField.vue.css +39 -2
  6. package/es/pro-field/components/DatePicker/FieldDatePicker.vue.css +39 -2
  7. package/es/pro-field/components/Select/FieldSelect.vue.css +39 -2
  8. package/es/pro-form/ProForm.vue.css +39 -2
  9. package/es/pro-iframe/ProIframe.vue.css +78 -0
  10. package/es/pro-iframe/ProIframe.vue.js +7 -0
  11. package/es/pro-iframe/ProIframe.vue_vue_type_script_setup_true_lang.vue.js +271 -0
  12. package/es/pro-iframe/ProIframe.vue_vue_type_style_index_0_id_7119d75d_scoped_true_lang.vue.js +1 -0
  13. package/es/pro-iframe/ProIframeRouteView.vue.js +5 -0
  14. package/es/pro-iframe/ProIframeRouteView.vue_vue_type_script_setup_true_lang.vue.js +85 -0
  15. package/es/pro-iframe/buildIframeRouteLocation.d.ts +18 -0
  16. package/es/pro-iframe/buildIframeRouteLocation.js +34 -0
  17. package/es/pro-iframe/createIframeRoute.d.ts +33 -0
  18. package/es/pro-iframe/createIframeRoute.js +46 -0
  19. package/es/pro-iframe/index.d.ts +43 -0
  20. package/es/pro-iframe/isInIframeEmbed.d.ts +4 -0
  21. package/es/pro-iframe/isInIframeEmbed.js +15 -0
  22. package/es/pro-iframe/resolveIframeSrc.d.ts +19 -0
  23. package/es/pro-iframe/resolveIframeSrc.js +177 -0
  24. package/es/pro-iframe/types.d.ts +60 -0
  25. package/es/pro-layout/ProLayout.vue.css +296 -4
  26. package/es/pro-layout/ProLayout.vue_vue_type_script_setup_true_lang.vue.js +747 -68
  27. package/es/pro-layout/ProLayoutColumnsAside.vue.css +62 -0
  28. package/es/pro-layout/ProLayoutColumnsAside.vue.js +7 -0
  29. package/es/pro-layout/ProLayoutColumnsAside.vue_vue_type_script_setup_true_lang.vue.js +86 -0
  30. package/es/pro-layout/ProLayoutColumnsAside.vue_vue_type_style_index_0_id_18647f64_scoped_true_lang.vue.js +1 -0
  31. package/es/pro-layout/ProLayoutSettingsDrawer.vue.css +140 -0
  32. package/es/pro-layout/ProLayoutSettingsDrawer.vue.js +7 -0
  33. package/es/pro-layout/ProLayoutSettingsDrawer.vue_vue_type_script_setup_true_lang.vue.js +280 -0
  34. package/es/pro-layout/ProLayoutSettingsDrawer.vue_vue_type_style_index_0_id_5b67a386_scoped_true_lang.vue.js +1 -0
  35. package/es/pro-layout/ProLayoutSettingsFab.vue.css +81 -0
  36. package/es/pro-layout/ProLayoutSettingsFab.vue.js +7 -0
  37. package/es/pro-layout/ProLayoutSettingsFab.vue_vue_type_script_setup_true_lang.vue.js +106 -0
  38. package/es/pro-layout/ProLayoutSettingsFab.vue_vue_type_style_index_0_id_3bf2eb6b_scoped_true_lang.vue.js +1 -0
  39. package/es/pro-layout/index.d.ts +51 -1
  40. package/es/pro-layout/index.js +3 -0
  41. package/es/pro-layout/pro-layout-context.d.ts +8 -0
  42. package/es/pro-layout/pro-layout-context.js +5 -0
  43. package/es/pro-layout/proLayoutGlobalColors.d.ts +16 -0
  44. package/es/pro-layout/proLayoutGlobalColors.js +171 -0
  45. package/es/pro-layout/proLayoutTheme.d.ts +29 -0
  46. package/es/pro-layout/proLayoutTheme.js +232 -0
  47. package/es/pro-layout/types.d.ts +52 -0
  48. package/es/pro-table/ProTable.vue.css +39 -2
  49. package/es/pro-table/ProTableColumn.vue.css +39 -2
  50. package/es/pro-table/ToolBar/ColumnSetting.vue.css +39 -2
  51. package/es/pro-table/ToolBar/Density.vue.css +39 -2
  52. package/es/pro-table/ToolBar/Fullscreen.vue.css +39 -2
  53. package/es/pro-table/ToolBar/index.vue.css +39 -2
  54. package/es/styles/index.css +39 -2
  55. package/package.json +6 -6
@@ -0,0 +1,62 @@
1
+ .pro-layout__columns-aside {
2
+ flex-shrink: 0;
3
+ height: 100%;
4
+ border-radius: var(--pro-layout-shell-radius, 16px);
5
+ border: 1px solid var(--pro-layout-shell-border, rgba(255, 255, 255, 0.65));
6
+ background: var(--pro-layout-sider-bg, rgba(255, 255, 255, 0.92));
7
+ box-shadow: var(--pro-layout-shell-shadow);
8
+ backdrop-filter: blur(10px);
9
+ overflow: hidden;
10
+ }
11
+ .pro-layout__columns-aside-scroll {
12
+ height: 100%;
13
+ }
14
+ .pro-layout__columns-aside-list {
15
+ list-style: none;
16
+ margin: 0;
17
+ padding: 8px 4px;
18
+ }
19
+ .pro-layout__columns-aside-item {
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ gap: 4px;
24
+ padding: 10px 4px;
25
+ margin-bottom: 4px;
26
+ border-radius: 12px;
27
+ cursor: pointer;
28
+ color: var(--pro-layout-text-muted, #64748b);
29
+ transition: background-color 0.15s ease, color 0.15s ease;
30
+ }
31
+ .pro-layout__columns-aside-item:hover {
32
+ background: #f8fafc;
33
+ color: var(--pro-layout-text, #0f172a);
34
+ }
35
+ .pro-layout__columns-aside-item--active {
36
+ background: linear-gradient(135deg, var(--pro-layout-accent-soft, #eef2ff) 0%, var(--pro-layout-accent-muted, #e0e7ff) 100%);
37
+ color: var(--pro-layout-accent-dark, #4338ca);
38
+ font-weight: 600;
39
+ }
40
+ .pro-layout__columns-aside-icon {
41
+ font-size: 18px;
42
+ }
43
+ .pro-layout__columns-aside-char {
44
+ width: 24px;
45
+ height: 24px;
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ font-size: 14px;
50
+ font-weight: 700;
51
+ border-radius: 8px;
52
+ background: #f1f5f9;
53
+ }
54
+ .pro-layout__columns-aside-label {
55
+ font-size: 11px;
56
+ line-height: 1.2;
57
+ text-align: center;
58
+ max-width: 100%;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ white-space: nowrap;
62
+ }
@@ -0,0 +1,7 @@
1
+ import '../_virtual/_rollup-plugin-inject-process-env.js';
2
+ import script from './ProLayoutColumnsAside.vue_vue_type_script_setup_true_lang.vue.js';
3
+ export { default } from './ProLayoutColumnsAside.vue_vue_type_script_setup_true_lang.vue.js';
4
+ import './ProLayoutColumnsAside.vue_vue_type_style_index_0_id_18647f64_scoped_true_lang.vue.js';
5
+
6
+ script.__scopeId = "data-v-18647f64";
7
+ script.__file = "packages/deppon-template/src/pro-layout/ProLayoutColumnsAside.vue";
@@ -0,0 +1,86 @@
1
+ import '../_virtual/_rollup-plugin-inject-process-env.js';
2
+ import { openBlock, createElementBlock, normalizeStyle, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, normalizeClass, createBlock, resolveDynamicComponent, toDisplayString } from 'vue';
3
+ import { ElScrollbar, ElIcon } from '@deppon/deppon-ui';
4
+
5
+ var _hoisted_1 = {
6
+ "class": "pro-layout__columns-aside-list"
7
+ };
8
+ var _hoisted_2 = ["onClick"];
9
+ var _hoisted_3 = {
10
+ key: 1,
11
+ "class": "pro-layout__columns-aside-char"
12
+ };
13
+ var _hoisted_4 = {
14
+ "class": "pro-layout__columns-aside-label"
15
+ };
16
+ var script = {
17
+ __name: 'ProLayoutColumnsAside',
18
+ props: {
19
+ items: {
20
+ type: Array,
21
+ "default": function _default() {
22
+ return [];
23
+ }
24
+ },
25
+ activeKey: {
26
+ type: String,
27
+ "default": ''
28
+ },
29
+ width: {
30
+ type: String,
31
+ "default": '72px'
32
+ }
33
+ },
34
+ emits: ['select'],
35
+ setup: function setup(__props, _ref) {
36
+ var __emit = _ref.emit;
37
+ var props = __props;
38
+ var emit = __emit;
39
+ var getFirstChar = function getFirstChar(item) {
40
+ var text = (item === null || item === void 0 ? void 0 : item.title) || (item === null || item === void 0 ? void 0 : item.label) || '';
41
+ return text ? String(text).charAt(0) : '';
42
+ };
43
+ var isActive = function isActive(item) {
44
+ var key = item.path || item.key;
45
+ return key && key === props.activeKey;
46
+ };
47
+ var handleSelect = function handleSelect(item) {
48
+ emit('select', item);
49
+ };
50
+ return function (_ctx, _cache) {
51
+ return openBlock(), createElementBlock("aside", {
52
+ "class": "pro-layout__columns-aside",
53
+ style: normalizeStyle({
54
+ width: __props.width
55
+ })
56
+ }, [createVNode(unref(ElScrollbar), {
57
+ "class": "pro-layout__columns-aside-scroll"
58
+ }, {
59
+ "default": withCtx(function () {
60
+ return [createElementVNode("ul", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, function (item) {
61
+ return openBlock(), createElementBlock("li", {
62
+ key: item.path || item.key,
63
+ "class": normalizeClass(["pro-layout__columns-aside-item", {
64
+ 'pro-layout__columns-aside-item--active': isActive(item)
65
+ }]),
66
+ onClick: function onClick($event) {
67
+ return handleSelect(item);
68
+ }
69
+ }, [item.icon ? (openBlock(), createBlock(unref(ElIcon), {
70
+ key: 0,
71
+ "class": "pro-layout__columns-aside-icon"
72
+ }, {
73
+ "default": withCtx(function () {
74
+ return [(openBlock(), createBlock(resolveDynamicComponent(item.icon)))];
75
+ }),
76
+ _: 2 /* DYNAMIC */
77
+ }, 1024 /* DYNAMIC_SLOTS */)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(getFirstChar(item)), 1 /* TEXT */)), createElementVNode("span", _hoisted_4, toDisplayString(item.title || item.label), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_2);
78
+ }), 128 /* KEYED_FRAGMENT */))])];
79
+ }),
80
+ _: 1 /* STABLE */
81
+ })], 4 /* STYLE */);
82
+ };
83
+ }
84
+ };
85
+
86
+ export { script as default };
@@ -0,0 +1,140 @@
1
+ .pro-layout-settings-drawer .el-drawer__header {
2
+ margin-bottom: 0;
3
+ flex-shrink: 0;
4
+ }
5
+ .pro-layout-settings-drawer .el-drawer__body {
6
+ flex: 1;
7
+ min-height: 0;
8
+ padding: 12px 16px 20px;
9
+ overflow-x: hidden;
10
+ overflow-y: auto;
11
+ -webkit-overflow-scrolling: touch;
12
+ box-sizing: border-box;
13
+ }
14
+ .pro-layout-settings-drawer__inner {
15
+ box-sizing: border-box;
16
+ }
17
+ .pro-layout-settings-drawer__section {
18
+ margin-bottom: 20px;
19
+ }
20
+ .pro-layout-settings-drawer__section-title {
21
+ font-size: 13px;
22
+ font-weight: 600;
23
+ color: var(--pro-layout-text, #0f172a);
24
+ margin-bottom: 12px;
25
+ }
26
+ .pro-layout-settings-drawer__layout-grid {
27
+ display: grid;
28
+ grid-template-columns: 1fr 1fr;
29
+ gap: 10px;
30
+ }
31
+ .pro-layout-settings-drawer__layout-item {
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ gap: 6px;
36
+ padding: 8px;
37
+ border: 1px solid #e2e8f0;
38
+ border-radius: 12px;
39
+ background: #fff;
40
+ cursor: pointer;
41
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
42
+ }
43
+ .pro-layout-settings-drawer__layout-item.is-active {
44
+ border-color: var(--pro-layout-accent, #1957ff);
45
+ box-shadow: 0 0 0 1px var(--pro-layout-accent, #1957ff);
46
+ }
47
+ .pro-layout-settings-drawer__layout-item:hover {
48
+ border-color: var(--pro-layout-accent-muted, #d1ddff);
49
+ }
50
+ .pro-layout-settings-drawer__layout-preview {
51
+ width: 100%;
52
+ height: 48px;
53
+ display: grid;
54
+ gap: 2px;
55
+ padding: 4px;
56
+ border-radius: 6px;
57
+ background: #f8fafc;
58
+ box-sizing: border-box;
59
+ }
60
+ .pro-layout-settings-drawer__layout-preview span {
61
+ border-radius: 2px;
62
+ background: #cbd5e1;
63
+ }
64
+ .pro-layout-settings-drawer__layout-preview .aside {
65
+ grid-row: 0.33333333;
66
+ background: #94a3b8;
67
+ }
68
+ .pro-layout-settings-drawer__layout-preview .header {
69
+ background: #e2e8f0;
70
+ }
71
+ .pro-layout-settings-drawer__layout-preview .main {
72
+ background: #f1f5f9;
73
+ }
74
+ .pro-layout-settings-drawer__layout-preview .main-wide {
75
+ grid-column: -1;
76
+ background: #f1f5f9;
77
+ }
78
+ .pro-layout-settings-drawer__layout-preview .col {
79
+ background: #64748b;
80
+ }
81
+ .pro-layout-settings-drawer__layout-preview.is-defaults {
82
+ grid-template-columns: 28% 1fr;
83
+ grid-template-rows: 14px 1fr;
84
+ }
85
+ .pro-layout-settings-drawer__layout-preview.is-classic {
86
+ grid-template-columns: 28% 1fr;
87
+ grid-template-rows: 14px 1fr;
88
+ }
89
+ .pro-layout-settings-drawer__layout-preview.is-classic .header {
90
+ grid-column: -1;
91
+ }
92
+ .pro-layout-settings-drawer__layout-preview.is-classic .aside {
93
+ grid-row: auto;
94
+ }
95
+ .pro-layout-settings-drawer__layout-preview.is-transverse {
96
+ grid-template-rows: 14px 1fr;
97
+ }
98
+ .pro-layout-settings-drawer__layout-preview.is-columns {
99
+ grid-template-columns: 12% 22% 1fr;
100
+ grid-template-rows: 14px 1fr;
101
+ }
102
+ .pro-layout-settings-drawer__layout-preview.is-columns .header {
103
+ grid-column: -2;
104
+ }
105
+ .pro-layout-settings-drawer__layout-preview.is-columns .main {
106
+ grid-column: -2;
107
+ }
108
+ .pro-layout-settings-drawer__layout-label {
109
+ font-size: 12px;
110
+ color: var(--pro-layout-text-muted, #64748b);
111
+ }
112
+ .pro-layout-settings-drawer__row {
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: space-between;
116
+ gap: 8px;
117
+ margin-bottom: 10px;
118
+ font-size: 13px;
119
+ color: var(--pro-layout-text-muted, #64748b);
120
+ }
121
+ .pro-layout-settings-drawer__row-label {
122
+ flex: 1;
123
+ min-width: 0;
124
+ line-height: 1.4;
125
+ }
126
+ .pro-layout-settings-drawer__actions {
127
+ display: flex;
128
+ gap: 8px;
129
+ position: sticky;
130
+ bottom: 0;
131
+ z-index: 1;
132
+ margin-top: 8px;
133
+ padding-top: 12px;
134
+ padding-bottom: 4px;
135
+ border-top: 1px solid #e2e8f0;
136
+ background: var(--el-bg-color, #fff);
137
+ }
138
+ .pro-layout-settings-drawer__actions .el-button {
139
+ flex: 1;
140
+ }
@@ -0,0 +1,7 @@
1
+ import '../_virtual/_rollup-plugin-inject-process-env.js';
2
+ import script from './ProLayoutSettingsDrawer.vue_vue_type_script_setup_true_lang.vue.js';
3
+ export { default } from './ProLayoutSettingsDrawer.vue_vue_type_script_setup_true_lang.vue.js';
4
+ import './ProLayoutSettingsDrawer.vue_vue_type_style_index_0_id_5b67a386_scoped_true_lang.vue.js';
5
+
6
+ script.__scopeId = "data-v-5b67a386";
7
+ script.__file = "packages/deppon-template/src/pro-layout/ProLayoutSettingsDrawer.vue";
@@ -0,0 +1,280 @@
1
+ import '../_virtual/_rollup-plugin-inject-process-env.js';
2
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, withCtx, createElementVNode, renderSlot, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString, createVNode, createTextVNode } from 'vue';
5
+ import { ElDrawer, ElSwitch, ElColorPicker, ElButton } from '@deppon/deppon-ui';
6
+ import { PRO_LAYOUT_COLOR_SETTING_GROUPS, DEFAULT_PRO_LAYOUT_GLOBAL_COLORS } from './proLayoutGlobalColors.js';
7
+
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ var _hoisted_1 = {
11
+ "class": "pro-layout-settings-drawer__inner"
12
+ };
13
+ var _hoisted_2 = {
14
+ "class": "pro-layout-settings-drawer__section"
15
+ };
16
+ var _hoisted_3 = {
17
+ "class": "pro-layout-settings-drawer__layout-grid"
18
+ };
19
+ var _hoisted_4 = ["onClick"];
20
+ var _hoisted_5 = {
21
+ "class": "pro-layout-settings-drawer__layout-label"
22
+ };
23
+ var _hoisted_6 = {
24
+ "class": "pro-layout-settings-drawer__section"
25
+ };
26
+ var _hoisted_7 = {
27
+ "class": "pro-layout-settings-drawer__row"
28
+ };
29
+ var _hoisted_8 = {
30
+ "class": "pro-layout-settings-drawer__row"
31
+ };
32
+ var _hoisted_9 = {
33
+ "class": "pro-layout-settings-drawer__row"
34
+ };
35
+ var _hoisted_10 = {
36
+ "class": "pro-layout-settings-drawer__row"
37
+ };
38
+ var _hoisted_11 = {
39
+ "class": "pro-layout-settings-drawer__section-title"
40
+ };
41
+ var _hoisted_12 = {
42
+ "class": "pro-layout-settings-drawer__row-label"
43
+ };
44
+ var _hoisted_13 = {
45
+ "class": "pro-layout-settings-drawer__actions"
46
+ };
47
+ var script = /*@__PURE__*/defineComponent({
48
+ __name: 'ProLayoutSettingsDrawer',
49
+ props: {
50
+ modelValue: {
51
+ type: Boolean,
52
+ "default": false
53
+ },
54
+ theme: {
55
+ type: Object,
56
+ required: true
57
+ },
58
+ title: {
59
+ type: String,
60
+ "default": '布局与主题'
61
+ },
62
+ size: {
63
+ type: String,
64
+ "default": '320px'
65
+ }
66
+ },
67
+ emits: ['update:modelValue', 'update:theme', 'closed', 'apply', 'reset'],
68
+ setup: function setup(__props, _ref) {
69
+ var __emit = _ref.emit;
70
+ var GLOBAL_TO_TOKEN = {
71
+ 'pro-layout-accent': 'accent',
72
+ 'pro-layout-header-bg': 'headerBg',
73
+ 'pro-layout-sider-bg': 'siderBg',
74
+ 'pro-layout-main-bg': 'mainBg',
75
+ 'pro-layout-tags-bar-bg': 'tagsBarBg',
76
+ 'pro-layout-text': 'text',
77
+ 'pro-layout-text-muted': 'textMuted'
78
+ };
79
+ var props = __props;
80
+ var emit = __emit;
81
+ var slots = useSlots();
82
+ /** 父级传入默认插槽时(如 ProLayout #settings-panel)替换内置面板 */
83
+ var hasCustomPanel = computed(function () {
84
+ return Boolean(slots["default"]);
85
+ });
86
+ var layoutOptions = [{
87
+ value: 'defaults',
88
+ label: '默认',
89
+ blocks: ['aside', 'header', 'main']
90
+ }, {
91
+ value: 'classic',
92
+ label: '经典',
93
+ blocks: ['header', 'aside', 'main']
94
+ }, {
95
+ value: 'transverse',
96
+ label: '横向',
97
+ blocks: ['header', 'main-wide']
98
+ }, {
99
+ value: 'columns',
100
+ label: '分栏',
101
+ blocks: ['col', 'aside', 'header', 'main']
102
+ }];
103
+ var colorSettingGroups = PRO_LAYOUT_COLOR_SETTING_GROUPS;
104
+ var drawerVisible = computed({
105
+ get: function get() {
106
+ return props.modelValue;
107
+ },
108
+ set: function set(val) {
109
+ return emit('update:modelValue', val);
110
+ }
111
+ });
112
+ var model = computed(function () {
113
+ return props.theme;
114
+ });
115
+ var patch = function patch(partial) {
116
+ emit('update:theme', _objectSpread(_objectSpread(_objectSpread({}, model.value), partial), {}, {
117
+ tokens: _objectSpread(_objectSpread({}, model.value.tokens), partial.tokens || {}),
118
+ globalColors: _objectSpread(_objectSpread({}, model.value.globalColors), partial.globalColors || {})
119
+ }));
120
+ };
121
+ var setLayout = function setLayout(layout) {
122
+ patch({
123
+ layout: layout
124
+ });
125
+ };
126
+ var getGlobalColor = function getGlobalColor(key) {
127
+ var _model$value$globalCo, _model$value$tokens;
128
+ var fromSaved = (_model$value$globalCo = model.value.globalColors) === null || _model$value$globalCo === void 0 ? void 0 : _model$value$globalCo[key];
129
+ if (fromSaved) return fromSaved;
130
+ if (DEFAULT_PRO_LAYOUT_GLOBAL_COLORS[key]) return DEFAULT_PRO_LAYOUT_GLOBAL_COLORS[key];
131
+ var tokenKey = GLOBAL_TO_TOKEN[key];
132
+ if (tokenKey && (_model$value$tokens = model.value.tokens) !== null && _model$value$tokens !== void 0 && _model$value$tokens[tokenKey]) {
133
+ return String(model.value.tokens[tokenKey]);
134
+ }
135
+ return '';
136
+ };
137
+ var onGlobalColorChange = function onGlobalColorChange(key, color) {
138
+ if (color == null || color === '') return;
139
+ var nextGlobal = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_PRO_LAYOUT_GLOBAL_COLORS), model.value.globalColors), {}, _defineProperty({}, key, color));
140
+ var tokenPatch = _objectSpread({}, model.value.tokens);
141
+ if (key === 'el-color-primary' || key === 'pro-layout-accent') {
142
+ nextGlobal['el-color-primary'] = color;
143
+ nextGlobal['pro-layout-accent'] = color;
144
+ tokenPatch.accent = color;
145
+ }
146
+ var tokenKey = GLOBAL_TO_TOKEN[key];
147
+ if (tokenKey) {
148
+ tokenPatch[tokenKey] = color;
149
+ }
150
+ patch({
151
+ globalColors: nextGlobal,
152
+ tokens: tokenPatch
153
+ });
154
+ };
155
+ return function (_ctx, _cache) {
156
+ return openBlock(), createBlock(unref(ElDrawer), {
157
+ modelValue: drawerVisible.value,
158
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
159
+ return drawerVisible.value = $event;
160
+ }),
161
+ title: __props.title,
162
+ direction: "rtl",
163
+ size: __props.size,
164
+ "destroy-on-close": "",
165
+ "class": "pro-layout-settings-drawer",
166
+ onClosed: _cache[7] || (_cache[7] = function ($event) {
167
+ return emit('closed');
168
+ })
169
+ }, {
170
+ "default": withCtx(function () {
171
+ return [createElementVNode("div", _hoisted_1, [hasCustomPanel.value ? renderSlot(_ctx.$slots, "default", {
172
+ key: 0
173
+ }) : (openBlock(), createElementBlock(Fragment, {
174
+ key: 1
175
+ }, [createElementVNode("section", _hoisted_2, [_cache[8] || (_cache[8] = createElementVNode("div", {
176
+ "class": "pro-layout-settings-drawer__section-title"
177
+ }, "布局结构", -1 /* CACHED */)), createElementVNode("div", _hoisted_3, [(openBlock(), createElementBlock(Fragment, null, renderList(layoutOptions, function (item) {
178
+ return createElementVNode("button", {
179
+ key: item.value,
180
+ type: "button",
181
+ "class": normalizeClass(["pro-layout-settings-drawer__layout-item", {
182
+ 'is-active': model.value.layout === item.value
183
+ }]),
184
+ onClick: function onClick($event) {
185
+ return setLayout(item.value);
186
+ }
187
+ }, [createElementVNode("div", {
188
+ "class": normalizeClass(["pro-layout-settings-drawer__layout-preview", "is-".concat(item.value)])
189
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(item.blocks, function (block, idx) {
190
+ return openBlock(), createElementBlock("span", {
191
+ key: idx,
192
+ "class": normalizeClass(block)
193
+ }, null, 2 /* CLASS */);
194
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createElementVNode("span", _hoisted_5, toDisplayString(item.label), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_4);
195
+ }), 64 /* STABLE_FRAGMENT */))])]), createElementVNode("section", _hoisted_6, [_cache[13] || (_cache[13] = createElementVNode("div", {
196
+ "class": "pro-layout-settings-drawer__section-title"
197
+ }, "界面", -1 /* CACHED */)), createElementVNode("div", _hoisted_7, [_cache[9] || (_cache[9] = createElementVNode("span", {
198
+ "class": "pro-layout-settings-drawer__row-label"
199
+ }, "固定顶栏", -1 /* CACHED */)), createVNode(unref(ElSwitch), {
200
+ "model-value": model.value.isFixedHeader,
201
+ onChange: _cache[0] || (_cache[0] = function ($event) {
202
+ return patch({
203
+ isFixedHeader: $event
204
+ });
205
+ })
206
+ }, null, 8 /* PROPS */, ["model-value"])]), createElementVNode("div", _hoisted_8, [_cache[10] || (_cache[10] = createElementVNode("span", {
207
+ "class": "pro-layout-settings-drawer__row-label"
208
+ }, "侧栏折叠", -1 /* CACHED */)), createVNode(unref(ElSwitch), {
209
+ "model-value": model.value.isCollapse,
210
+ onChange: _cache[1] || (_cache[1] = function ($event) {
211
+ return patch({
212
+ isCollapse: $event
213
+ });
214
+ })
215
+ }, null, 8 /* PROPS */, ["model-value"])]), createElementVNode("div", _hoisted_9, [_cache[11] || (_cache[11] = createElementVNode("span", {
216
+ "class": "pro-layout-settings-drawer__row-label"
217
+ }, "页签栏", -1 /* CACHED */)), createVNode(unref(ElSwitch), {
218
+ "model-value": model.value.isTagsView,
219
+ onChange: _cache[2] || (_cache[2] = function ($event) {
220
+ return patch({
221
+ isTagsView: $event
222
+ });
223
+ })
224
+ }, null, 8 /* PROPS */, ["model-value"])]), createElementVNode("div", _hoisted_10, [_cache[12] || (_cache[12] = createElementVNode("span", {
225
+ "class": "pro-layout-settings-drawer__row-label"
226
+ }, "显示侧栏", -1 /* CACHED */)), createVNode(unref(ElSwitch), {
227
+ "model-value": model.value.isShowSider,
228
+ onChange: _cache[3] || (_cache[3] = function ($event) {
229
+ return patch({
230
+ isShowSider: $event
231
+ });
232
+ })
233
+ }, null, 8 /* PROPS */, ["model-value"])])]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorSettingGroups), function (group) {
234
+ return openBlock(), createElementBlock("section", {
235
+ key: group.title,
236
+ "class": "pro-layout-settings-drawer__section"
237
+ }, [createElementVNode("div", _hoisted_11, toDisplayString(group.title), 1 /* TEXT */), (openBlock(true), createElementBlock(Fragment, null, renderList(group.items, function (item) {
238
+ return openBlock(), createElementBlock("div", {
239
+ key: item.key,
240
+ "class": "pro-layout-settings-drawer__row"
241
+ }, [createElementVNode("span", _hoisted_12, toDisplayString(item.label), 1 /* TEXT */), createVNode(unref(ElColorPicker), {
242
+ "model-value": getGlobalColor(item.key),
243
+ size: "small",
244
+ "show-alpha": Boolean(item.alpha),
245
+ "color-format": item.alpha ? undefined : 'hex',
246
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
247
+ return onGlobalColorChange(item.key, $event);
248
+ }
249
+ }, null, 8 /* PROPS */, ["model-value", "show-alpha", "color-format", "onUpdate:modelValue"])]);
250
+ }), 128 /* KEYED_FRAGMENT */))]);
251
+ }), 128 /* KEYED_FRAGMENT */)), createElementVNode("div", _hoisted_13, [createVNode(unref(ElButton), {
252
+ type: "primary",
253
+ onClick: _cache[4] || (_cache[4] = function ($event) {
254
+ return emit('apply');
255
+ })
256
+ }, {
257
+ "default": withCtx(function () {
258
+ return _toConsumableArray(_cache[14] || (_cache[14] = [createTextVNode("应用", -1 /* CACHED */)]));
259
+ }),
260
+ _: 1 /* STABLE */
261
+ }), createVNode(unref(ElButton), {
262
+ type: "primary",
263
+ plain: "",
264
+ onClick: _cache[5] || (_cache[5] = function ($event) {
265
+ return emit('reset');
266
+ })
267
+ }, {
268
+ "default": withCtx(function () {
269
+ return _toConsumableArray(_cache[15] || (_cache[15] = [createTextVNode("恢复默认", -1 /* CACHED */)]));
270
+ }),
271
+ _: 1 /* STABLE */
272
+ })])], 64 /* STABLE_FRAGMENT */))])];
273
+ }),
274
+ _: 3 /* FORWARDED */
275
+ }, 8 /* PROPS */, ["modelValue", "title", "size"]);
276
+ };
277
+ }
278
+ });
279
+
280
+ export { script as default };
@@ -0,0 +1 @@
1
+ import './ProLayoutSettingsDrawer.vue.css';
@@ -0,0 +1,81 @@
1
+ .pro-layout-settings-fab {
2
+ position: fixed;
3
+ z-index: 2000;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ width: 44px;
8
+ height: 44px;
9
+ padding: 0;
10
+ border: 1px solid rgba(255, 255, 255, 0.75);
11
+ border-radius: 50%;
12
+ cursor: pointer;
13
+ color: var(--pro-layout-accent, #6366f1);
14
+ background: rgba(255, 255, 255, 0.94);
15
+ box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 4px 10px -4px rgba(15, 23, 42, 0.08);
16
+ backdrop-filter: blur(10px);
17
+ -webkit-backdrop-filter: blur(10px);
18
+ transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
19
+ }
20
+ .pro-layout-settings-fab:hover {
21
+ transform: scale(1.05);
22
+ background: var(--pro-layout-accent-soft, #eef2ff);
23
+ box-shadow: 0 14px 30px -6px rgba(99, 102, 241, 0.35);
24
+ }
25
+ .pro-layout-settings-fab--right-center {
26
+ right: 16px;
27
+ top: 50%;
28
+ transform: translateY(-50%);
29
+ }
30
+ .pro-layout-settings-fab--right-center:hover {
31
+ transform: translateY(-50%) scale(1.05);
32
+ }
33
+ .pro-layout-settings-fab--right-bottom {
34
+ right: 16px;
35
+ bottom: 24px;
36
+ }
37
+ .pro-layout-settings-fab--left-center {
38
+ left: 16px;
39
+ top: 50%;
40
+ transform: translateY(-50%);
41
+ }
42
+ .pro-layout-settings-fab--left-center:hover {
43
+ transform: translateY(-50%) scale(1.05);
44
+ }
45
+ .pro-layout-settings-fab--left-bottom {
46
+ left: 16px;
47
+ bottom: 24px;
48
+ }
49
+ .pro-layout-settings-fab--large {
50
+ width: 52px;
51
+ height: 52px;
52
+ }
53
+ .pro-layout-settings-fab--small {
54
+ width: 36px;
55
+ height: 36px;
56
+ }
57
+ .pro-layout-settings-fab--in-header {
58
+ position: static;
59
+ z-index: auto;
60
+ flex-shrink: 0;
61
+ width: 32px;
62
+ height: 32px;
63
+ min-width: 32px;
64
+ border-radius: 50%;
65
+ border: 1px solid rgba(226, 232, 240, 0.85);
66
+ background: rgba(255, 255, 255, 0.92);
67
+ box-shadow: none;
68
+ transform: none;
69
+ }
70
+ .pro-layout-settings-fab--in-header:hover {
71
+ transform: none;
72
+ background: var(--pro-layout-accent-soft, #eef2ff);
73
+ border-color: var(--el-color-primary-light-7, #c7d2fe);
74
+ box-shadow: none;
75
+ }
76
+ .pro-layout-settings-fab--in-header .pro-layout-settings-fab__icon {
77
+ font-size: 16px;
78
+ }
79
+ .pro-layout-settings-fab__icon {
80
+ font-size: 20px;
81
+ }
@@ -0,0 +1,7 @@
1
+ import '../_virtual/_rollup-plugin-inject-process-env.js';
2
+ import script from './ProLayoutSettingsFab.vue_vue_type_script_setup_true_lang.vue.js';
3
+ export { default } from './ProLayoutSettingsFab.vue_vue_type_script_setup_true_lang.vue.js';
4
+ import './ProLayoutSettingsFab.vue_vue_type_style_index_0_id_3bf2eb6b_scoped_true_lang.vue.js';
5
+
6
+ script.__scopeId = "data-v-3bf2eb6b";
7
+ script.__file = "packages/deppon-template/src/pro-layout/ProLayoutSettingsFab.vue";