@ebiz/designer-components 0.0.63 → 0.1.1
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 +29 -29
- package/dist/designer-components.css +1 -1
- package/dist/index.mjs +2099 -2089
- package/package.json +1 -1
- package/src/App.vue +26 -26
- package/src/apiService/SIMPLE_DATA_SERVICE.md +284 -284
- package/src/apiService/mockDataService.js +115 -115
- package/src/apiService/simpleDataService.js +297 -297
- package/src/assets/base.css +86 -86
- package/src/assets/logo.svg +1 -1
- package/src/components/Button.vue +149 -149
- package/src/components/DataContainer.vue +40 -40
- package/src/components/EbizApproval.vue +332 -332
- package/src/components/EbizAutoForm.vue +596 -596
- package/src/components/EbizAvatar.vue +115 -115
- package/src/components/EbizCheckbox.vue +93 -93
- package/src/components/EbizCheckboxGroup.vue +69 -69
- package/src/components/EbizDepartmentSelector.vue +144 -144
- package/src/components/EbizDescriptions.vue +340 -340
- package/src/components/EbizDescriptionsItem.vue +47 -47
- package/src/components/EbizDetailBlock.vue +81 -81
- package/src/components/EbizDialog.vue +260 -260
- package/src/components/EbizDiv.vue +32 -32
- package/src/components/EbizDivider.vue +96 -96
- package/src/components/EbizDropdown.vue +117 -0
- package/src/components/EbizDropdownItem.vue +81 -0
- package/src/components/EbizEmployeeInfo.vue +138 -138
- package/src/components/EbizEmployeeSelector.vue +1095 -1095
- package/src/components/EbizFileUpload.vue +238 -238
- package/src/components/EbizMap.vue +541 -541
- package/src/components/EbizMeetingRoomSelector.vue +664 -664
- package/src/components/EbizMobileMeetingRoomSelector.vue +727 -727
- package/src/components/EbizOkrTree.vue +99 -99
- package/src/components/EbizPageHeader.vue +95 -95
- package/src/components/EbizPagination.vue +162 -162
- package/src/components/EbizPopconfirm.vue +47 -47
- package/src/components/EbizRadio.vue +86 -86
- package/src/components/EbizRadioGroup.vue +83 -83
- package/src/components/EbizRemoteSelect.vue +232 -232
- package/src/components/EbizRouteBreadcrumb.vue +46 -46
- package/src/components/EbizSelect.vue +85 -85
- package/src/components/EbizSpace.vue +100 -100
- package/src/components/EbizStatistic.vue +149 -149
- package/src/components/EbizStatsCard.vue +113 -113
- package/src/components/EbizSwiper.vue +113 -113
- package/src/components/EbizSwiperItem.vue +13 -13
- package/src/components/EbizSwitch.vue +85 -85
- package/src/components/EbizTabHeader.vue +132 -132
- package/src/components/EbizTabPanel.vue +22 -22
- package/src/components/EbizTable.vue +469 -469
- package/src/components/EbizTableColumn.vue +116 -116
- package/src/components/EbizTableSort.vue +179 -179
- package/src/components/EbizTabs.vue +142 -142
- package/src/components/EbizTdesignButtonDialog.vue +332 -332
- package/src/components/EbizTdesignLoading.vue +107 -107
- package/src/components/EbizTimePicker.vue +143 -143
- package/src/components/EbizTitle.vue +91 -91
- package/src/components/EbizTree.vue +152 -152
- package/src/components/EbizTreeMergeTable.vue +1414 -1414
- package/src/components/EbizTreeSelector.vue +418 -418
- package/src/components/EbizVxeTable.vue +290 -290
- package/src/components/Form.vue +28 -28
- package/src/components/Home.vue +7 -7
- package/src/components/MyComponent.vue +39 -39
- package/src/components/Table.vue +45 -45
- package/src/components/TdesignAlert.vue +115 -115
- package/src/components/TdesignButton.vue +135 -135
- package/src/components/TdesignCalendar/index.vue +145 -145
- package/src/components/TdesignCard.vue +195 -195
- package/src/components/TdesignCol.vue +101 -101
- package/src/components/TdesignCollapse.vue +142 -142
- package/src/components/TdesignCollapsePanel.vue +79 -79
- package/src/components/TdesignDatePicker.vue +124 -124
- package/src/components/TdesignDescriptions.vue +74 -74
- package/src/components/TdesignDescriptionsItem.vue +50 -50
- package/src/components/TdesignDialog.vue +225 -225
- package/src/components/TdesignForm.vue +138 -138
- package/src/components/TdesignFormItem.vue +105 -105
- package/src/components/TdesignGrid.vue +55 -55
- package/src/components/TdesignIcon.vue +67 -67
- package/src/components/TdesignImage.vue +162 -162
- package/src/components/TdesignImageViewer.vue +200 -200
- package/src/components/TdesignInput.vue +242 -242
- package/src/components/TdesignSelect.vue +444 -444
- package/src/components/TdesignTag.vue +117 -117
- package/src/components/TdesignTextarea.vue +142 -142
- package/src/components/TdesignTimeline.vue +58 -58
- package/src/components/TdesignTimelineItem.vue +71 -71
- package/src/components/TdesignUpload.vue +392 -392
- package/src/components/TdesignWatermark.vue +107 -107
- package/src/components/ebiz-form/components/cascader.vue +61 -61
- package/src/components/ebiz-form/components/checkbox.vue +37 -37
- package/src/components/ebiz-form/components/city.vue +137 -137
- package/src/components/ebiz-form/components/date-panel.vue +52 -52
- package/src/components/ebiz-form/components/date-range-panel.vue +52 -52
- package/src/components/ebiz-form/components/date-range.vue +56 -56
- package/src/components/ebiz-form/components/date.vue +52 -52
- package/src/components/ebiz-form/components/editor-multi-language.vue +47 -47
- package/src/components/ebiz-form/components/editor.vue +78 -78
- package/src/components/ebiz-form/components/file-multi-language.vue +52 -52
- package/src/components/ebiz-form/components/file.vue +149 -149
- package/src/components/ebiz-form/components/images-multi-language.vue +52 -52
- package/src/components/ebiz-form/components/images.vue +129 -129
- package/src/components/ebiz-form/components/img-multi-language.vue +51 -51
- package/src/components/ebiz-form/components/img.vue +129 -129
- package/src/components/ebiz-form/components/number.vue +50 -50
- package/src/components/ebiz-form/components/radio.vue +28 -28
- package/src/components/ebiz-form/components/select.vue +119 -119
- package/src/components/ebiz-form/components/switch.vue +23 -23
- package/src/components/ebiz-form/components/text-multi-language.vue +47 -47
- package/src/components/ebiz-form/components/text.vue +52 -52
- package/src/components/ebiz-form/components/textarea-multi-language.vue +48 -48
- package/src/components/ebiz-form/components/textarea.vue +29 -29
- package/src/components/ebiz-form/components/video-multi-language.vue +51 -51
- package/src/components/ebiz-form/components/video.vue +97 -97
- package/src/components/ebiz-form/index.vue +157 -157
- package/src/components/examples/PopconfirmExample.vue +149 -149
- package/src/components/icons/IconCommunity.vue +7 -7
- package/src/components/icons/IconDocumentation.vue +7 -7
- package/src/components/icons/IconEcosystem.vue +7 -7
- package/src/components/icons/IconSupport.vue +7 -7
- package/src/components/icons/IconTooling.vue +19 -19
- package/src/components/senior/EbizSData/index.vue +262 -262
- package/src/components/senior/EbizSDialog/index.vue +715 -715
- package/src/components/senior/EbizSForm/README.md +157 -157
- package/src/components/senior/EbizSForm/index.vue +668 -668
- package/src/components/senior/EbizSForm/item.vue +512 -505
- package/src/components/senior/EbizSForm/mItems/DateTimePicker.vue +51 -51
- package/src/components/senior/EbizSForm/mItems/Picker.vue +63 -63
- package/src/index.js +224 -224
- package/src/main.js +55 -55
- package/src/router/index.js +386 -386
- package/src/utils/formatCode.js +24 -24
- package/src/utils/generateImportStatement.js +52 -52
- package/src/utils/hasJsx.js +25 -25
- package/src/utils/index.js +166 -166
- package/src/utils/mergeOptions.js +29 -29
- package/src/utils/parseRequiredBlocks.js +18 -18
- package/src/utils/upload.ts +126 -126
- package/src/utils/vue-sfc-validator.js +155 -155
- package/src/views/Button.vue +23 -23
- package/src/views/CheckboxDemo.vue +104 -104
- package/src/views/DataContainer.vue +19 -19
- package/src/views/DialogDemo.vue +125 -125
- package/src/views/EbizApprovalDemo.vue +76 -76
- package/src/views/EbizAutoFormDemo.vue +129 -129
- package/src/views/EbizAvatar.vue +223 -223
- package/src/views/EbizDepartmentSelectorDemo.vue +169 -169
- package/src/views/EbizDetailBlockDemo.vue +30 -30
- package/src/views/EbizEmployeeInfo.vue +249 -249
- package/src/views/EbizEmployeeSelector.vue +83 -83
- package/src/views/EbizMap.vue +201 -201
- package/src/views/EbizMeetingRoomSelectorDemo.vue +293 -293
- package/src/views/EbizMobileMeetingRoomSelectorDemo.vue +566 -566
- package/src/views/EbizRadioDemo.vue +151 -151
- package/src/views/EbizSDataDemo.vue +136 -136
- package/src/views/EbizSDialogDemo.vue +301 -301
- package/src/views/EbizSForm/index.vue +359 -359
- package/src/views/EbizSFormDemo.vue +420 -420
- package/src/views/EbizSpace.vue +185 -185
- package/src/views/EbizSwiper.vue +157 -157
- package/src/views/EbizTdesignButtonDialogExample.vue +437 -437
- package/src/views/Form.vue +19 -19
- package/src/views/GridDemo.vue +238 -238
- package/src/views/Home.vue +148 -148
- package/src/views/Mindmap.vue +17 -17
- package/src/views/MyComponent.vue +19 -19
- package/src/views/OkrTree.vue +19 -19
- package/src/views/PageHeaderDemo.vue +104 -104
- package/src/views/PaginationDemo.vue +96 -96
- package/src/views/PermissionBoxDemo.vue +85 -85
- package/src/views/PopconfirmDemo.vue +80 -80
- package/src/views/RemoteSelect.vue +350 -350
- package/src/views/StatisticDemo.vue +190 -190
- package/src/views/SwitchDemo.vue +79 -79
- package/src/views/Table.vue +19 -19
- package/src/views/TableDemo.vue +334 -334
- package/src/views/TableSortDemo.vue +143 -143
- package/src/views/TableView.vue +68 -68
- package/src/views/TabsDemo.vue +282 -282
- package/src/views/TagDemo.vue +101 -101
- package/src/views/TdesignAlert.vue +98 -98
- package/src/views/TdesignButton.vue +190 -190
- package/src/views/TdesignCalendar.vue +94 -94
- package/src/views/TdesignCard.vue +296 -296
- package/src/views/TdesignCollapse.vue +293 -293
- package/src/views/TdesignDatePicker.vue +187 -187
- package/src/views/TdesignDescriptions.vue +101 -101
- package/src/views/TdesignForm.vue +248 -248
- package/src/views/TdesignIcon.vue +203 -203
- package/src/views/TdesignImage.vue +215 -215
- package/src/views/TdesignImageViewer.vue +198 -198
- package/src/views/TdesignInput.vue +252 -252
- package/src/views/TdesignSelect.vue +473 -473
- package/src/views/TdesignSwiper.vue +157 -157
- package/src/views/TextareaDemo.vue +93 -93
- package/src/views/TimePickerDemo.vue +146 -146
- package/src/views/TimelineDemo.vue +160 -160
- package/src/views/Title.vue +19 -19
- package/src/views/TreeDemo.vue +254 -254
- package/src/views/TreeMergeTableDemo.vue +239 -239
- package/src/views/TreeSelectorDemo.vue +245 -245
- package/src/views/UploadDemo.vue +121 -121
- package/src/views/VxeTableDemo.vue +279 -279
- package/src/views/WatermarkDemo.vue +85 -85
@@ -1,567 +1,567 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="mobile-demo-container">
|
3
|
-
<!-- 移动端预览框 -->
|
4
|
-
<div class="mobile-preview">
|
5
|
-
<div class="mobile-frame">
|
6
|
-
<div class="mobile-header">
|
7
|
-
<div class="status-bar">
|
8
|
-
<span class="time">9:41</span>
|
9
|
-
<div class="indicators">
|
10
|
-
<span class="signal">📶</span>
|
11
|
-
<span class="wifi">📶</span>
|
12
|
-
<span class="battery">🔋</span>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="nav-bar">
|
16
|
-
<span class="back-btn">←</span>
|
17
|
-
<span class="title">会议室预约</span>
|
18
|
-
<span class="menu-btn">⋯</span>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="mobile-content">
|
23
|
-
<EbizMobileMeetingRoomSelector
|
24
|
-
v-bind="demoProps"
|
25
|
-
@room-select="handleRoomSelect"
|
26
|
-
@time-select="handleTimeSelect"
|
27
|
-
@booking-confirm="handleBookingConfirm"
|
28
|
-
@date-change="handleDateChange"
|
29
|
-
/>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
|
34
|
-
<!-- 控制面板 -->
|
35
|
-
<div class="control-panel">
|
36
|
-
<h2>📱 移动端会议室选择器演示</h2>
|
37
|
-
|
38
|
-
<div class="demo-section">
|
39
|
-
<h3>属性配置</h3>
|
40
|
-
<div class="config-panel">
|
41
|
-
<div class="config-item">
|
42
|
-
<label>加载状态:</label>
|
43
|
-
<input type="checkbox" v-model="demoProps.loading" />
|
44
|
-
</div>
|
45
|
-
<div class="config-item">
|
46
|
-
<label>禁用状态:</label>
|
47
|
-
<input type="checkbox" v-model="demoProps.disabled" />
|
48
|
-
</div>
|
49
|
-
<div class="config-item">
|
50
|
-
<label>最小预约时长:</label>
|
51
|
-
<input type="number" v-model="demoProps.minDuration" min="1" max="8" />
|
52
|
-
</div>
|
53
|
-
<div class="config-item">
|
54
|
-
<label>最大预约时长:</label>
|
55
|
-
<input type="number" v-model="demoProps.maxDuration" min="1" max="16" />
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<div class="demo-section">
|
61
|
-
<h3>事件日志</h3>
|
62
|
-
<div class="event-log">
|
63
|
-
<div v-for="(log, index) in eventLogs" :key="index" class="log-item">
|
64
|
-
<span class="log-time">{{ log.time }}</span>
|
65
|
-
<span class="log-event">{{ log.event }}</span>
|
66
|
-
<span class="log-data">{{ log.data }}</span>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
</div>
|
70
|
-
|
71
|
-
<div class="demo-section">
|
72
|
-
<h3>移动端特性</h3>
|
73
|
-
<div class="features-list">
|
74
|
-
<div class="feature-item">
|
75
|
-
<span class="feature-icon">📱</span>
|
76
|
-
<div class="feature-content">
|
77
|
-
<h4>响应式设计</h4>
|
78
|
-
<p>适配各种移动设备屏幕尺寸</p>
|
79
|
-
</div>
|
80
|
-
</div>
|
81
|
-
<div class="feature-item">
|
82
|
-
<span class="feature-icon">👆</span>
|
83
|
-
<div class="feature-content">
|
84
|
-
<h4>触摸友好</h4>
|
85
|
-
<p>大按钮设计,支持触摸操作</p>
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
<div class="feature-item">
|
89
|
-
<span class="feature-icon">🎨</span>
|
90
|
-
<div class="feature-content">
|
91
|
-
<h4>卡片布局</h4>
|
92
|
-
<p>清晰的卡片式界面设计</p>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
<div class="feature-item">
|
96
|
-
<span class="feature-icon">⚡</span>
|
97
|
-
<div class="feature-content">
|
98
|
-
<h4>浮动面板</h4>
|
99
|
-
<p>底部浮动确认面板</p>
|
100
|
-
</div>
|
101
|
-
</div>
|
102
|
-
<div class="feature-item">
|
103
|
-
<span class="feature-icon">🎯</span>
|
104
|
-
<div class="feature-content">
|
105
|
-
<h4>状态反馈</h4>
|
106
|
-
<p>直观的状态图标和颜色</p>
|
107
|
-
</div>
|
108
|
-
</div>
|
109
|
-
<div class="feature-item">
|
110
|
-
<span class="feature-icon">🔄</span>
|
111
|
-
<div class="feature-content">
|
112
|
-
<h4>交互动画</h4>
|
113
|
-
<p>流畅的过渡动画效果</p>
|
114
|
-
</div>
|
115
|
-
</div>
|
116
|
-
</div>
|
117
|
-
</div>
|
118
|
-
|
119
|
-
<div class="demo-section">
|
120
|
-
<h3>使用说明</h3>
|
121
|
-
<div class="usage-guide">
|
122
|
-
<ol>
|
123
|
-
<li>📅 选择预约日期</li>
|
124
|
-
<li>🏢 点击会议室卡片展开时间选择</li>
|
125
|
-
<li>⏰ 点击时间段进行多选</li>
|
126
|
-
<li>📋 底部浮动面板显示预约信息</li>
|
127
|
-
<li>🎯 点击确认预约完成操作</li>
|
128
|
-
</ol>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
|
132
|
-
<div class="demo-section">
|
133
|
-
<h3>数据结构</h3>
|
134
|
-
<div class="data-structure">
|
135
|
-
<h4>会议室数据格式:</h4>
|
136
|
-
<pre>{{ JSON.stringify(sampleRoom, null, 2) }}</pre>
|
137
|
-
|
138
|
-
<h4>已预约时间段格式:</h4>
|
139
|
-
<pre>{{ JSON.stringify(sampleBookedSlots, null, 2) }}</pre>
|
140
|
-
</div>
|
141
|
-
</div>
|
142
|
-
</div>
|
143
|
-
</div>
|
144
|
-
</template>
|
145
|
-
|
146
|
-
<script setup>
|
147
|
-
import { ref, reactive } from 'vue'
|
148
|
-
import { EbizMobileMeetingRoomSelector } from '../index.js'
|
149
|
-
|
150
|
-
// 模拟会议室数据
|
151
|
-
const mockRooms = [
|
152
|
-
{
|
153
|
-
id: 'room-001',
|
154
|
-
name: '会议室A',
|
155
|
-
capacity: 10,
|
156
|
-
location: '3楼东侧',
|
157
|
-
equipment: ['投影仪', '白板', '视频会议']
|
158
|
-
},
|
159
|
-
{
|
160
|
-
id: 'room-002',
|
161
|
-
name: '会议室B',
|
162
|
-
capacity: 6,
|
163
|
-
location: '3楼西侧',
|
164
|
-
equipment: ['投影仪', '白板']
|
165
|
-
},
|
166
|
-
{
|
167
|
-
id: 'room-003',
|
168
|
-
name: '大会议室',
|
169
|
-
capacity: 20,
|
170
|
-
location: '4楼中央',
|
171
|
-
equipment: ['投影仪', '音响', '视频会议', '同声传译']
|
172
|
-
},
|
173
|
-
{
|
174
|
-
id: 'room-004',
|
175
|
-
name: '小会议室',
|
176
|
-
capacity: 4,
|
177
|
-
location: '2楼南侧',
|
178
|
-
equipment: ['白板']
|
179
|
-
}
|
180
|
-
]
|
181
|
-
|
182
|
-
// 模拟已预约时间段
|
183
|
-
const mockBookedSlots = {
|
184
|
-
'room-001': ['09:00', '09:30', '14:00', '14:30', '15:00'],
|
185
|
-
'room-002': ['10:00', '10:30', '11:00'],
|
186
|
-
'room-003': ['13:00', '13:30', '14:00', '14:30', '15:00', '15:30'],
|
187
|
-
'room-004': ['16:00', '16:30']
|
188
|
-
}
|
189
|
-
|
190
|
-
// 演示属性
|
191
|
-
const demoProps = reactive({
|
192
|
-
rooms: mockRooms,
|
193
|
-
selectedDate: new Date().toISOString().split('T')[0],
|
194
|
-
timeSlots: [],
|
195
|
-
bookedSlots: mockBookedSlots,
|
196
|
-
loading: false,
|
197
|
-
disabled: false,
|
198
|
-
minDuration: 1,
|
199
|
-
maxDuration: 8
|
200
|
-
})
|
201
|
-
|
202
|
-
// 事件日志
|
203
|
-
const eventLogs = ref([])
|
204
|
-
|
205
|
-
// 示例数据
|
206
|
-
const sampleRoom = {
|
207
|
-
id: 'room-001',
|
208
|
-
name: '会议室A',
|
209
|
-
capacity: 10,
|
210
|
-
location: '3楼东侧',
|
211
|
-
equipment: ['投影仪', '白板', '视频会议']
|
212
|
-
}
|
213
|
-
|
214
|
-
const sampleBookedSlots = {
|
215
|
-
'room-001': ['09:00', '09:30', '14:00'],
|
216
|
-
'room-002': ['10:00', '10:30', '11:00']
|
217
|
-
}
|
218
|
-
|
219
|
-
// 事件处理
|
220
|
-
const addEventLog = (event, data) => {
|
221
|
-
const now = new Date()
|
222
|
-
const time = `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
|
223
|
-
|
224
|
-
eventLogs.value.unshift({
|
225
|
-
time,
|
226
|
-
event,
|
227
|
-
data: JSON.stringify(data, null, 2)
|
228
|
-
})
|
229
|
-
|
230
|
-
// 保持最多10条日志
|
231
|
-
if (eventLogs.value.length > 10) {
|
232
|
-
eventLogs.value = eventLogs.value.slice(0, 10)
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
const handleRoomSelect = (room) => {
|
237
|
-
addEventLog('room-select', room)
|
238
|
-
}
|
239
|
-
|
240
|
-
const handleTimeSelect = (selection) => {
|
241
|
-
addEventLog('time-select', selection)
|
242
|
-
}
|
243
|
-
|
244
|
-
const handleBookingConfirm = (bookingInfo) => {
|
245
|
-
addEventLog('booking-confirm', bookingInfo)
|
246
|
-
|
247
|
-
// 模拟预约成功,更新已预约时间段
|
248
|
-
if (bookingInfo && bookingInfo.room && bookingInfo.timeSlots) {
|
249
|
-
const roomId = bookingInfo.room.id
|
250
|
-
if (!demoProps.bookedSlots[roomId]) {
|
251
|
-
demoProps.bookedSlots[roomId] = []
|
252
|
-
}
|
253
|
-
demoProps.bookedSlots[roomId].push(...bookingInfo.timeSlots)
|
254
|
-
|
255
|
-
// 去重
|
256
|
-
demoProps.bookedSlots[roomId] = [...new Set(demoProps.bookedSlots[roomId])]
|
257
|
-
}
|
258
|
-
}
|
259
|
-
|
260
|
-
const handleDateChange = (date) => {
|
261
|
-
addEventLog('date-change', { date })
|
262
|
-
demoProps.selectedDate = date
|
263
|
-
}
|
264
|
-
</script>
|
265
|
-
|
266
|
-
<style scoped>
|
267
|
-
.mobile-demo-container {
|
268
|
-
display: flex;
|
269
|
-
gap: 20px;
|
270
|
-
padding: 20px;
|
271
|
-
background: #f5f5f5;
|
272
|
-
min-height: 100vh;
|
273
|
-
}
|
274
|
-
|
275
|
-
.mobile-preview {
|
276
|
-
flex-shrink: 0;
|
277
|
-
position: sticky;
|
278
|
-
top: 20px;
|
279
|
-
height: fit-content;
|
280
|
-
}
|
281
|
-
|
282
|
-
.mobile-frame {
|
283
|
-
width: 375px;
|
284
|
-
height: 812px;
|
285
|
-
background: #000;
|
286
|
-
border-radius: 25px;
|
287
|
-
padding: 8px;
|
288
|
-
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
289
|
-
position: relative;
|
290
|
-
overflow: hidden;
|
291
|
-
}
|
292
|
-
|
293
|
-
.mobile-frame::before {
|
294
|
-
content: '';
|
295
|
-
position: absolute;
|
296
|
-
top: 8px;
|
297
|
-
left: 50%;
|
298
|
-
transform: translateX(-50%);
|
299
|
-
width: 134px;
|
300
|
-
height: 5px;
|
301
|
-
background: #000;
|
302
|
-
border-radius: 3px;
|
303
|
-
z-index: 10;
|
304
|
-
}
|
305
|
-
|
306
|
-
.mobile-header {
|
307
|
-
background: #fff;
|
308
|
-
border-radius: 17px 17px 0 0;
|
309
|
-
}
|
310
|
-
|
311
|
-
.status-bar {
|
312
|
-
display: flex;
|
313
|
-
justify-content: space-between;
|
314
|
-
align-items: center;
|
315
|
-
padding: 8px 20px 4px;
|
316
|
-
font-size: 14px;
|
317
|
-
font-weight: 600;
|
318
|
-
}
|
319
|
-
|
320
|
-
.time {
|
321
|
-
color: #000;
|
322
|
-
}
|
323
|
-
|
324
|
-
.indicators {
|
325
|
-
display: flex;
|
326
|
-
gap: 4px;
|
327
|
-
font-size: 12px;
|
328
|
-
}
|
329
|
-
|
330
|
-
.nav-bar {
|
331
|
-
display: flex;
|
332
|
-
justify-content: space-between;
|
333
|
-
align-items: center;
|
334
|
-
padding: 8px 20px 12px;
|
335
|
-
border-bottom: 1px solid #eee;
|
336
|
-
}
|
337
|
-
|
338
|
-
.back-btn, .menu-btn {
|
339
|
-
font-size: 18px;
|
340
|
-
color: #007AFF;
|
341
|
-
cursor: pointer;
|
342
|
-
}
|
343
|
-
|
344
|
-
.nav-bar .title {
|
345
|
-
font-size: 17px;
|
346
|
-
font-weight: 600;
|
347
|
-
color: #000;
|
348
|
-
}
|
349
|
-
|
350
|
-
.mobile-content {
|
351
|
-
height: 720px;
|
352
|
-
overflow: hidden;
|
353
|
-
background: #fff;
|
354
|
-
border-radius: 0 0 17px 17px;
|
355
|
-
}
|
356
|
-
|
357
|
-
.control-panel {
|
358
|
-
flex: 1;
|
359
|
-
background: #fff;
|
360
|
-
border-radius: 12px;
|
361
|
-
padding: 24px;
|
362
|
-
height: fit-content;
|
363
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
364
|
-
}
|
365
|
-
|
366
|
-
.control-panel h2 {
|
367
|
-
margin-top: 0;
|
368
|
-
color: #333;
|
369
|
-
border-bottom: 2px solid #1890ff;
|
370
|
-
padding-bottom: 8px;
|
371
|
-
}
|
372
|
-
|
373
|
-
.demo-section {
|
374
|
-
margin-bottom: 32px;
|
375
|
-
padding: 20px;
|
376
|
-
border: 1px solid #eee;
|
377
|
-
border-radius: 8px;
|
378
|
-
background: #fafafa;
|
379
|
-
}
|
380
|
-
|
381
|
-
.demo-section h3 {
|
382
|
-
margin-top: 0;
|
383
|
-
color: #333;
|
384
|
-
font-size: 16px;
|
385
|
-
font-weight: 600;
|
386
|
-
}
|
387
|
-
|
388
|
-
.config-panel {
|
389
|
-
display: grid;
|
390
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
391
|
-
gap: 16px;
|
392
|
-
}
|
393
|
-
|
394
|
-
.config-item {
|
395
|
-
display: flex;
|
396
|
-
align-items: center;
|
397
|
-
gap: 8px;
|
398
|
-
}
|
399
|
-
|
400
|
-
.config-item label {
|
401
|
-
font-weight: 500;
|
402
|
-
color: #666;
|
403
|
-
min-width: 100px;
|
404
|
-
}
|
405
|
-
|
406
|
-
.config-item input {
|
407
|
-
padding: 4px 8px;
|
408
|
-
border: 1px solid #ddd;
|
409
|
-
border-radius: 4px;
|
410
|
-
}
|
411
|
-
|
412
|
-
.event-log {
|
413
|
-
max-height: 200px;
|
414
|
-
overflow-y: auto;
|
415
|
-
background: #f5f5f5;
|
416
|
-
border-radius: 6px;
|
417
|
-
padding: 12px;
|
418
|
-
}
|
419
|
-
|
420
|
-
.log-item {
|
421
|
-
display: flex;
|
422
|
-
gap: 12px;
|
423
|
-
padding: 6px 0;
|
424
|
-
border-bottom: 1px solid #eee;
|
425
|
-
font-family: 'Courier New', monospace;
|
426
|
-
font-size: 12px;
|
427
|
-
}
|
428
|
-
|
429
|
-
.log-item:last-child {
|
430
|
-
border-bottom: none;
|
431
|
-
}
|
432
|
-
|
433
|
-
.log-time {
|
434
|
-
color: #999;
|
435
|
-
min-width: 80px;
|
436
|
-
}
|
437
|
-
|
438
|
-
.log-event {
|
439
|
-
color: #1890ff;
|
440
|
-
font-weight: 600;
|
441
|
-
min-width: 120px;
|
442
|
-
}
|
443
|
-
|
444
|
-
.log-data {
|
445
|
-
color: #333;
|
446
|
-
flex: 1;
|
447
|
-
word-break: break-all;
|
448
|
-
}
|
449
|
-
|
450
|
-
.features-list {
|
451
|
-
display: grid;
|
452
|
-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
453
|
-
gap: 16px;
|
454
|
-
}
|
455
|
-
|
456
|
-
.feature-item {
|
457
|
-
display: flex;
|
458
|
-
align-items: flex-start;
|
459
|
-
gap: 12px;
|
460
|
-
padding: 16px;
|
461
|
-
background: #fff;
|
462
|
-
border-radius: 8px;
|
463
|
-
border: 1px solid #e0e0e0;
|
464
|
-
}
|
465
|
-
|
466
|
-
.feature-icon {
|
467
|
-
font-size: 24px;
|
468
|
-
flex-shrink: 0;
|
469
|
-
}
|
470
|
-
|
471
|
-
.feature-content h4 {
|
472
|
-
margin: 0 0 4px 0;
|
473
|
-
font-size: 14px;
|
474
|
-
font-weight: 600;
|
475
|
-
color: #333;
|
476
|
-
}
|
477
|
-
|
478
|
-
.feature-content p {
|
479
|
-
margin: 0;
|
480
|
-
font-size: 12px;
|
481
|
-
color: #666;
|
482
|
-
line-height: 1.4;
|
483
|
-
}
|
484
|
-
|
485
|
-
.usage-guide {
|
486
|
-
background: #fff;
|
487
|
-
padding: 16px;
|
488
|
-
border-radius: 8px;
|
489
|
-
border: 1px solid #e0e0e0;
|
490
|
-
}
|
491
|
-
|
492
|
-
.usage-guide ol {
|
493
|
-
margin: 0;
|
494
|
-
padding-left: 20px;
|
495
|
-
}
|
496
|
-
|
497
|
-
.usage-guide li {
|
498
|
-
margin-bottom: 8px;
|
499
|
-
font-size: 14px;
|
500
|
-
color: #333;
|
501
|
-
line-height: 1.5;
|
502
|
-
}
|
503
|
-
|
504
|
-
.data-structure {
|
505
|
-
background: #fff;
|
506
|
-
padding: 16px;
|
507
|
-
border-radius: 8px;
|
508
|
-
border: 1px solid #e0e0e0;
|
509
|
-
}
|
510
|
-
|
511
|
-
.data-structure h4 {
|
512
|
-
margin: 16px 0 8px 0;
|
513
|
-
color: #333;
|
514
|
-
font-size: 14px;
|
515
|
-
}
|
516
|
-
|
517
|
-
.data-structure h4:first-child {
|
518
|
-
margin-top: 0;
|
519
|
-
}
|
520
|
-
|
521
|
-
.data-structure pre {
|
522
|
-
background: #f8f8f8;
|
523
|
-
padding: 12px;
|
524
|
-
border-radius: 4px;
|
525
|
-
border: 1px solid #ddd;
|
526
|
-
font-family: 'Courier New', monospace;
|
527
|
-
font-size: 11px;
|
528
|
-
overflow-x: auto;
|
529
|
-
margin: 0;
|
530
|
-
color: #333;
|
531
|
-
}
|
532
|
-
|
533
|
-
/* 响应式设计 */
|
534
|
-
@media (max-width: 1200px) {
|
535
|
-
.mobile-demo-container {
|
536
|
-
flex-direction: column;
|
537
|
-
}
|
538
|
-
|
539
|
-
.mobile-preview {
|
540
|
-
position: static;
|
541
|
-
align-self: center;
|
542
|
-
}
|
543
|
-
|
544
|
-
.mobile-frame {
|
545
|
-
transform: scale(0.8);
|
546
|
-
transform-origin: top center;
|
547
|
-
}
|
548
|
-
}
|
549
|
-
|
550
|
-
@media (max-width: 768px) {
|
551
|
-
.mobile-demo-container {
|
552
|
-
padding: 10px;
|
553
|
-
}
|
554
|
-
|
555
|
-
.mobile-frame {
|
556
|
-
transform: scale(0.7);
|
557
|
-
}
|
558
|
-
|
559
|
-
.control-panel {
|
560
|
-
padding: 16px;
|
561
|
-
}
|
562
|
-
|
563
|
-
.features-list {
|
564
|
-
grid-template-columns: 1fr;
|
565
|
-
}
|
566
|
-
}
|
1
|
+
<template>
|
2
|
+
<div class="mobile-demo-container">
|
3
|
+
<!-- 移动端预览框 -->
|
4
|
+
<div class="mobile-preview">
|
5
|
+
<div class="mobile-frame">
|
6
|
+
<div class="mobile-header">
|
7
|
+
<div class="status-bar">
|
8
|
+
<span class="time">9:41</span>
|
9
|
+
<div class="indicators">
|
10
|
+
<span class="signal">📶</span>
|
11
|
+
<span class="wifi">📶</span>
|
12
|
+
<span class="battery">🔋</span>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<div class="nav-bar">
|
16
|
+
<span class="back-btn">←</span>
|
17
|
+
<span class="title">会议室预约</span>
|
18
|
+
<span class="menu-btn">⋯</span>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="mobile-content">
|
23
|
+
<EbizMobileMeetingRoomSelector
|
24
|
+
v-bind="demoProps"
|
25
|
+
@room-select="handleRoomSelect"
|
26
|
+
@time-select="handleTimeSelect"
|
27
|
+
@booking-confirm="handleBookingConfirm"
|
28
|
+
@date-change="handleDateChange"
|
29
|
+
/>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<!-- 控制面板 -->
|
35
|
+
<div class="control-panel">
|
36
|
+
<h2>📱 移动端会议室选择器演示</h2>
|
37
|
+
|
38
|
+
<div class="demo-section">
|
39
|
+
<h3>属性配置</h3>
|
40
|
+
<div class="config-panel">
|
41
|
+
<div class="config-item">
|
42
|
+
<label>加载状态:</label>
|
43
|
+
<input type="checkbox" v-model="demoProps.loading" />
|
44
|
+
</div>
|
45
|
+
<div class="config-item">
|
46
|
+
<label>禁用状态:</label>
|
47
|
+
<input type="checkbox" v-model="demoProps.disabled" />
|
48
|
+
</div>
|
49
|
+
<div class="config-item">
|
50
|
+
<label>最小预约时长:</label>
|
51
|
+
<input type="number" v-model="demoProps.minDuration" min="1" max="8" />
|
52
|
+
</div>
|
53
|
+
<div class="config-item">
|
54
|
+
<label>最大预约时长:</label>
|
55
|
+
<input type="number" v-model="demoProps.maxDuration" min="1" max="16" />
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div class="demo-section">
|
61
|
+
<h3>事件日志</h3>
|
62
|
+
<div class="event-log">
|
63
|
+
<div v-for="(log, index) in eventLogs" :key="index" class="log-item">
|
64
|
+
<span class="log-time">{{ log.time }}</span>
|
65
|
+
<span class="log-event">{{ log.event }}</span>
|
66
|
+
<span class="log-data">{{ log.data }}</span>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<div class="demo-section">
|
72
|
+
<h3>移动端特性</h3>
|
73
|
+
<div class="features-list">
|
74
|
+
<div class="feature-item">
|
75
|
+
<span class="feature-icon">📱</span>
|
76
|
+
<div class="feature-content">
|
77
|
+
<h4>响应式设计</h4>
|
78
|
+
<p>适配各种移动设备屏幕尺寸</p>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
<div class="feature-item">
|
82
|
+
<span class="feature-icon">👆</span>
|
83
|
+
<div class="feature-content">
|
84
|
+
<h4>触摸友好</h4>
|
85
|
+
<p>大按钮设计,支持触摸操作</p>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
<div class="feature-item">
|
89
|
+
<span class="feature-icon">🎨</span>
|
90
|
+
<div class="feature-content">
|
91
|
+
<h4>卡片布局</h4>
|
92
|
+
<p>清晰的卡片式界面设计</p>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div class="feature-item">
|
96
|
+
<span class="feature-icon">⚡</span>
|
97
|
+
<div class="feature-content">
|
98
|
+
<h4>浮动面板</h4>
|
99
|
+
<p>底部浮动确认面板</p>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
<div class="feature-item">
|
103
|
+
<span class="feature-icon">🎯</span>
|
104
|
+
<div class="feature-content">
|
105
|
+
<h4>状态反馈</h4>
|
106
|
+
<p>直观的状态图标和颜色</p>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class="feature-item">
|
110
|
+
<span class="feature-icon">🔄</span>
|
111
|
+
<div class="feature-content">
|
112
|
+
<h4>交互动画</h4>
|
113
|
+
<p>流畅的过渡动画效果</p>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div class="demo-section">
|
120
|
+
<h3>使用说明</h3>
|
121
|
+
<div class="usage-guide">
|
122
|
+
<ol>
|
123
|
+
<li>📅 选择预约日期</li>
|
124
|
+
<li>🏢 点击会议室卡片展开时间选择</li>
|
125
|
+
<li>⏰ 点击时间段进行多选</li>
|
126
|
+
<li>📋 底部浮动面板显示预约信息</li>
|
127
|
+
<li>🎯 点击确认预约完成操作</li>
|
128
|
+
</ol>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div class="demo-section">
|
133
|
+
<h3>数据结构</h3>
|
134
|
+
<div class="data-structure">
|
135
|
+
<h4>会议室数据格式:</h4>
|
136
|
+
<pre>{{ JSON.stringify(sampleRoom, null, 2) }}</pre>
|
137
|
+
|
138
|
+
<h4>已预约时间段格式:</h4>
|
139
|
+
<pre>{{ JSON.stringify(sampleBookedSlots, null, 2) }}</pre>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</template>
|
145
|
+
|
146
|
+
<script setup>
|
147
|
+
import { ref, reactive } from 'vue'
|
148
|
+
import { EbizMobileMeetingRoomSelector } from '../index.js'
|
149
|
+
|
150
|
+
// 模拟会议室数据
|
151
|
+
const mockRooms = [
|
152
|
+
{
|
153
|
+
id: 'room-001',
|
154
|
+
name: '会议室A',
|
155
|
+
capacity: 10,
|
156
|
+
location: '3楼东侧',
|
157
|
+
equipment: ['投影仪', '白板', '视频会议']
|
158
|
+
},
|
159
|
+
{
|
160
|
+
id: 'room-002',
|
161
|
+
name: '会议室B',
|
162
|
+
capacity: 6,
|
163
|
+
location: '3楼西侧',
|
164
|
+
equipment: ['投影仪', '白板']
|
165
|
+
},
|
166
|
+
{
|
167
|
+
id: 'room-003',
|
168
|
+
name: '大会议室',
|
169
|
+
capacity: 20,
|
170
|
+
location: '4楼中央',
|
171
|
+
equipment: ['投影仪', '音响', '视频会议', '同声传译']
|
172
|
+
},
|
173
|
+
{
|
174
|
+
id: 'room-004',
|
175
|
+
name: '小会议室',
|
176
|
+
capacity: 4,
|
177
|
+
location: '2楼南侧',
|
178
|
+
equipment: ['白板']
|
179
|
+
}
|
180
|
+
]
|
181
|
+
|
182
|
+
// 模拟已预约时间段
|
183
|
+
const mockBookedSlots = {
|
184
|
+
'room-001': ['09:00', '09:30', '14:00', '14:30', '15:00'],
|
185
|
+
'room-002': ['10:00', '10:30', '11:00'],
|
186
|
+
'room-003': ['13:00', '13:30', '14:00', '14:30', '15:00', '15:30'],
|
187
|
+
'room-004': ['16:00', '16:30']
|
188
|
+
}
|
189
|
+
|
190
|
+
// 演示属性
|
191
|
+
const demoProps = reactive({
|
192
|
+
rooms: mockRooms,
|
193
|
+
selectedDate: new Date().toISOString().split('T')[0],
|
194
|
+
timeSlots: [],
|
195
|
+
bookedSlots: mockBookedSlots,
|
196
|
+
loading: false,
|
197
|
+
disabled: false,
|
198
|
+
minDuration: 1,
|
199
|
+
maxDuration: 8
|
200
|
+
})
|
201
|
+
|
202
|
+
// 事件日志
|
203
|
+
const eventLogs = ref([])
|
204
|
+
|
205
|
+
// 示例数据
|
206
|
+
const sampleRoom = {
|
207
|
+
id: 'room-001',
|
208
|
+
name: '会议室A',
|
209
|
+
capacity: 10,
|
210
|
+
location: '3楼东侧',
|
211
|
+
equipment: ['投影仪', '白板', '视频会议']
|
212
|
+
}
|
213
|
+
|
214
|
+
const sampleBookedSlots = {
|
215
|
+
'room-001': ['09:00', '09:30', '14:00'],
|
216
|
+
'room-002': ['10:00', '10:30', '11:00']
|
217
|
+
}
|
218
|
+
|
219
|
+
// 事件处理
|
220
|
+
const addEventLog = (event, data) => {
|
221
|
+
const now = new Date()
|
222
|
+
const time = `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
|
223
|
+
|
224
|
+
eventLogs.value.unshift({
|
225
|
+
time,
|
226
|
+
event,
|
227
|
+
data: JSON.stringify(data, null, 2)
|
228
|
+
})
|
229
|
+
|
230
|
+
// 保持最多10条日志
|
231
|
+
if (eventLogs.value.length > 10) {
|
232
|
+
eventLogs.value = eventLogs.value.slice(0, 10)
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
const handleRoomSelect = (room) => {
|
237
|
+
addEventLog('room-select', room)
|
238
|
+
}
|
239
|
+
|
240
|
+
const handleTimeSelect = (selection) => {
|
241
|
+
addEventLog('time-select', selection)
|
242
|
+
}
|
243
|
+
|
244
|
+
const handleBookingConfirm = (bookingInfo) => {
|
245
|
+
addEventLog('booking-confirm', bookingInfo)
|
246
|
+
|
247
|
+
// 模拟预约成功,更新已预约时间段
|
248
|
+
if (bookingInfo && bookingInfo.room && bookingInfo.timeSlots) {
|
249
|
+
const roomId = bookingInfo.room.id
|
250
|
+
if (!demoProps.bookedSlots[roomId]) {
|
251
|
+
demoProps.bookedSlots[roomId] = []
|
252
|
+
}
|
253
|
+
demoProps.bookedSlots[roomId].push(...bookingInfo.timeSlots)
|
254
|
+
|
255
|
+
// 去重
|
256
|
+
demoProps.bookedSlots[roomId] = [...new Set(demoProps.bookedSlots[roomId])]
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
const handleDateChange = (date) => {
|
261
|
+
addEventLog('date-change', { date })
|
262
|
+
demoProps.selectedDate = date
|
263
|
+
}
|
264
|
+
</script>
|
265
|
+
|
266
|
+
<style scoped>
|
267
|
+
.mobile-demo-container {
|
268
|
+
display: flex;
|
269
|
+
gap: 20px;
|
270
|
+
padding: 20px;
|
271
|
+
background: #f5f5f5;
|
272
|
+
min-height: 100vh;
|
273
|
+
}
|
274
|
+
|
275
|
+
.mobile-preview {
|
276
|
+
flex-shrink: 0;
|
277
|
+
position: sticky;
|
278
|
+
top: 20px;
|
279
|
+
height: fit-content;
|
280
|
+
}
|
281
|
+
|
282
|
+
.mobile-frame {
|
283
|
+
width: 375px;
|
284
|
+
height: 812px;
|
285
|
+
background: #000;
|
286
|
+
border-radius: 25px;
|
287
|
+
padding: 8px;
|
288
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
289
|
+
position: relative;
|
290
|
+
overflow: hidden;
|
291
|
+
}
|
292
|
+
|
293
|
+
.mobile-frame::before {
|
294
|
+
content: '';
|
295
|
+
position: absolute;
|
296
|
+
top: 8px;
|
297
|
+
left: 50%;
|
298
|
+
transform: translateX(-50%);
|
299
|
+
width: 134px;
|
300
|
+
height: 5px;
|
301
|
+
background: #000;
|
302
|
+
border-radius: 3px;
|
303
|
+
z-index: 10;
|
304
|
+
}
|
305
|
+
|
306
|
+
.mobile-header {
|
307
|
+
background: #fff;
|
308
|
+
border-radius: 17px 17px 0 0;
|
309
|
+
}
|
310
|
+
|
311
|
+
.status-bar {
|
312
|
+
display: flex;
|
313
|
+
justify-content: space-between;
|
314
|
+
align-items: center;
|
315
|
+
padding: 8px 20px 4px;
|
316
|
+
font-size: 14px;
|
317
|
+
font-weight: 600;
|
318
|
+
}
|
319
|
+
|
320
|
+
.time {
|
321
|
+
color: #000;
|
322
|
+
}
|
323
|
+
|
324
|
+
.indicators {
|
325
|
+
display: flex;
|
326
|
+
gap: 4px;
|
327
|
+
font-size: 12px;
|
328
|
+
}
|
329
|
+
|
330
|
+
.nav-bar {
|
331
|
+
display: flex;
|
332
|
+
justify-content: space-between;
|
333
|
+
align-items: center;
|
334
|
+
padding: 8px 20px 12px;
|
335
|
+
border-bottom: 1px solid #eee;
|
336
|
+
}
|
337
|
+
|
338
|
+
.back-btn, .menu-btn {
|
339
|
+
font-size: 18px;
|
340
|
+
color: #007AFF;
|
341
|
+
cursor: pointer;
|
342
|
+
}
|
343
|
+
|
344
|
+
.nav-bar .title {
|
345
|
+
font-size: 17px;
|
346
|
+
font-weight: 600;
|
347
|
+
color: #000;
|
348
|
+
}
|
349
|
+
|
350
|
+
.mobile-content {
|
351
|
+
height: 720px;
|
352
|
+
overflow: hidden;
|
353
|
+
background: #fff;
|
354
|
+
border-radius: 0 0 17px 17px;
|
355
|
+
}
|
356
|
+
|
357
|
+
.control-panel {
|
358
|
+
flex: 1;
|
359
|
+
background: #fff;
|
360
|
+
border-radius: 12px;
|
361
|
+
padding: 24px;
|
362
|
+
height: fit-content;
|
363
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
364
|
+
}
|
365
|
+
|
366
|
+
.control-panel h2 {
|
367
|
+
margin-top: 0;
|
368
|
+
color: #333;
|
369
|
+
border-bottom: 2px solid #1890ff;
|
370
|
+
padding-bottom: 8px;
|
371
|
+
}
|
372
|
+
|
373
|
+
.demo-section {
|
374
|
+
margin-bottom: 32px;
|
375
|
+
padding: 20px;
|
376
|
+
border: 1px solid #eee;
|
377
|
+
border-radius: 8px;
|
378
|
+
background: #fafafa;
|
379
|
+
}
|
380
|
+
|
381
|
+
.demo-section h3 {
|
382
|
+
margin-top: 0;
|
383
|
+
color: #333;
|
384
|
+
font-size: 16px;
|
385
|
+
font-weight: 600;
|
386
|
+
}
|
387
|
+
|
388
|
+
.config-panel {
|
389
|
+
display: grid;
|
390
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
391
|
+
gap: 16px;
|
392
|
+
}
|
393
|
+
|
394
|
+
.config-item {
|
395
|
+
display: flex;
|
396
|
+
align-items: center;
|
397
|
+
gap: 8px;
|
398
|
+
}
|
399
|
+
|
400
|
+
.config-item label {
|
401
|
+
font-weight: 500;
|
402
|
+
color: #666;
|
403
|
+
min-width: 100px;
|
404
|
+
}
|
405
|
+
|
406
|
+
.config-item input {
|
407
|
+
padding: 4px 8px;
|
408
|
+
border: 1px solid #ddd;
|
409
|
+
border-radius: 4px;
|
410
|
+
}
|
411
|
+
|
412
|
+
.event-log {
|
413
|
+
max-height: 200px;
|
414
|
+
overflow-y: auto;
|
415
|
+
background: #f5f5f5;
|
416
|
+
border-radius: 6px;
|
417
|
+
padding: 12px;
|
418
|
+
}
|
419
|
+
|
420
|
+
.log-item {
|
421
|
+
display: flex;
|
422
|
+
gap: 12px;
|
423
|
+
padding: 6px 0;
|
424
|
+
border-bottom: 1px solid #eee;
|
425
|
+
font-family: 'Courier New', monospace;
|
426
|
+
font-size: 12px;
|
427
|
+
}
|
428
|
+
|
429
|
+
.log-item:last-child {
|
430
|
+
border-bottom: none;
|
431
|
+
}
|
432
|
+
|
433
|
+
.log-time {
|
434
|
+
color: #999;
|
435
|
+
min-width: 80px;
|
436
|
+
}
|
437
|
+
|
438
|
+
.log-event {
|
439
|
+
color: #1890ff;
|
440
|
+
font-weight: 600;
|
441
|
+
min-width: 120px;
|
442
|
+
}
|
443
|
+
|
444
|
+
.log-data {
|
445
|
+
color: #333;
|
446
|
+
flex: 1;
|
447
|
+
word-break: break-all;
|
448
|
+
}
|
449
|
+
|
450
|
+
.features-list {
|
451
|
+
display: grid;
|
452
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
453
|
+
gap: 16px;
|
454
|
+
}
|
455
|
+
|
456
|
+
.feature-item {
|
457
|
+
display: flex;
|
458
|
+
align-items: flex-start;
|
459
|
+
gap: 12px;
|
460
|
+
padding: 16px;
|
461
|
+
background: #fff;
|
462
|
+
border-radius: 8px;
|
463
|
+
border: 1px solid #e0e0e0;
|
464
|
+
}
|
465
|
+
|
466
|
+
.feature-icon {
|
467
|
+
font-size: 24px;
|
468
|
+
flex-shrink: 0;
|
469
|
+
}
|
470
|
+
|
471
|
+
.feature-content h4 {
|
472
|
+
margin: 0 0 4px 0;
|
473
|
+
font-size: 14px;
|
474
|
+
font-weight: 600;
|
475
|
+
color: #333;
|
476
|
+
}
|
477
|
+
|
478
|
+
.feature-content p {
|
479
|
+
margin: 0;
|
480
|
+
font-size: 12px;
|
481
|
+
color: #666;
|
482
|
+
line-height: 1.4;
|
483
|
+
}
|
484
|
+
|
485
|
+
.usage-guide {
|
486
|
+
background: #fff;
|
487
|
+
padding: 16px;
|
488
|
+
border-radius: 8px;
|
489
|
+
border: 1px solid #e0e0e0;
|
490
|
+
}
|
491
|
+
|
492
|
+
.usage-guide ol {
|
493
|
+
margin: 0;
|
494
|
+
padding-left: 20px;
|
495
|
+
}
|
496
|
+
|
497
|
+
.usage-guide li {
|
498
|
+
margin-bottom: 8px;
|
499
|
+
font-size: 14px;
|
500
|
+
color: #333;
|
501
|
+
line-height: 1.5;
|
502
|
+
}
|
503
|
+
|
504
|
+
.data-structure {
|
505
|
+
background: #fff;
|
506
|
+
padding: 16px;
|
507
|
+
border-radius: 8px;
|
508
|
+
border: 1px solid #e0e0e0;
|
509
|
+
}
|
510
|
+
|
511
|
+
.data-structure h4 {
|
512
|
+
margin: 16px 0 8px 0;
|
513
|
+
color: #333;
|
514
|
+
font-size: 14px;
|
515
|
+
}
|
516
|
+
|
517
|
+
.data-structure h4:first-child {
|
518
|
+
margin-top: 0;
|
519
|
+
}
|
520
|
+
|
521
|
+
.data-structure pre {
|
522
|
+
background: #f8f8f8;
|
523
|
+
padding: 12px;
|
524
|
+
border-radius: 4px;
|
525
|
+
border: 1px solid #ddd;
|
526
|
+
font-family: 'Courier New', monospace;
|
527
|
+
font-size: 11px;
|
528
|
+
overflow-x: auto;
|
529
|
+
margin: 0;
|
530
|
+
color: #333;
|
531
|
+
}
|
532
|
+
|
533
|
+
/* 响应式设计 */
|
534
|
+
@media (max-width: 1200px) {
|
535
|
+
.mobile-demo-container {
|
536
|
+
flex-direction: column;
|
537
|
+
}
|
538
|
+
|
539
|
+
.mobile-preview {
|
540
|
+
position: static;
|
541
|
+
align-self: center;
|
542
|
+
}
|
543
|
+
|
544
|
+
.mobile-frame {
|
545
|
+
transform: scale(0.8);
|
546
|
+
transform-origin: top center;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
@media (max-width: 768px) {
|
551
|
+
.mobile-demo-container {
|
552
|
+
padding: 10px;
|
553
|
+
}
|
554
|
+
|
555
|
+
.mobile-frame {
|
556
|
+
transform: scale(0.7);
|
557
|
+
}
|
558
|
+
|
559
|
+
.control-panel {
|
560
|
+
padding: 16px;
|
561
|
+
}
|
562
|
+
|
563
|
+
.features-list {
|
564
|
+
grid-template-columns: 1fr;
|
565
|
+
}
|
566
|
+
}
|
567
567
|
</style>
|