@ebiz/designer-components 0.0.18 → 0.0.19

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 (99) hide show
  1. package/package.json +3 -2
  2. package/src/apiService/mockDataService.js +116 -0
  3. package/src/apiService/simpleDataService.js +186 -80
  4. package/src/components/Button.vue +72 -22
  5. package/src/components/EbizAvatar.vue +116 -0
  6. package/src/components/EbizCheckbox.vue +94 -0
  7. package/src/components/EbizCheckboxGroup.vue +70 -0
  8. package/src/components/EbizDetailBlock.vue +82 -0
  9. package/src/components/EbizDialog.vue +244 -56
  10. package/src/components/EbizEmployeeInfo.vue +139 -0
  11. package/src/components/EbizFileUpload.vue +202 -0
  12. package/src/components/EbizPageHeader.vue +96 -0
  13. package/src/components/EbizPagination.vue +163 -0
  14. package/src/components/EbizRadio.vue +87 -0
  15. package/src/components/EbizRadioGroup.vue +84 -0
  16. package/src/components/EbizRemoteSelect.vue +118 -40
  17. package/src/components/EbizSpace.vue +101 -0
  18. package/src/components/EbizStatistic.vue +150 -0
  19. package/src/components/EbizSwiper.vue +114 -0
  20. package/src/components/EbizSwiperItem.vue +14 -0
  21. package/src/components/EbizSwitch.vue +86 -0
  22. package/src/components/EbizTabHeader.vue +145 -0
  23. package/src/components/EbizTabPanel.vue +23 -0
  24. package/src/components/EbizTable.vue +466 -0
  25. package/src/components/EbizTableColumn.vue +117 -0
  26. package/src/components/EbizTableSort.vue +181 -0
  27. package/src/components/EbizTabs.vue +133 -91
  28. package/src/components/EbizTimePicker.vue +144 -0
  29. package/src/components/EbizTitle.vue +3 -10
  30. package/src/components/EbizTree.vue +153 -0
  31. package/src/components/EbizTreeSelector.vue +423 -0
  32. package/src/components/Home.vue +8 -0
  33. package/src/components/TdesignAlert.vue +116 -0
  34. package/src/components/TdesignButton.vue +130 -0
  35. package/src/components/TdesignCalendar/index.vue +146 -0
  36. package/src/components/TdesignCard.vue +196 -0
  37. package/src/components/TdesignCol.vue +102 -0
  38. package/src/components/TdesignCollapse.vue +143 -0
  39. package/src/components/TdesignCollapsePanel.vue +80 -0
  40. package/src/components/TdesignDatePicker.vue +125 -0
  41. package/src/components/TdesignDialog.vue +226 -0
  42. package/src/components/TdesignForm.vue +134 -0
  43. package/src/components/TdesignFormItem.vue +106 -0
  44. package/src/components/TdesignGrid.vue +56 -0
  45. package/src/components/TdesignIcon.vue +68 -0
  46. package/src/components/TdesignImage.vue +163 -0
  47. package/src/components/TdesignImageViewer.vue +201 -0
  48. package/src/components/TdesignInput.vue +243 -0
  49. package/src/components/TdesignSelect.vue +445 -0
  50. package/src/components/TdesignTag.vue +118 -0
  51. package/src/components/TdesignTextarea.vue +143 -0
  52. package/src/components/TdesignTimeline.vue +58 -0
  53. package/src/components/TdesignTimelineItem.vue +72 -0
  54. package/src/components/TdesignUpload.vue +757 -0
  55. package/src/components/TdesignWatermark.vue +108 -0
  56. package/src/index.js +130 -0
  57. package/src/main.js +20 -4
  58. package/src/router/index.js +244 -5
  59. package/src/views/Button.vue +7 -3
  60. package/src/views/CheckboxDemo.vue +105 -0
  61. package/src/views/DialogDemo.vue +126 -0
  62. package/src/views/EbizAvatar.vue +224 -0
  63. package/src/views/EbizDetailBlockDemo.vue +31 -0
  64. package/src/views/EbizEmployeeInfo.vue +250 -0
  65. package/src/views/EbizRadioDemo.vue +152 -0
  66. package/src/views/EbizSpace.vue +186 -0
  67. package/src/views/EbizSwiper.vue +158 -0
  68. package/src/views/GridDemo.vue +239 -0
  69. package/src/views/Home.vue +63 -2
  70. package/src/views/PageHeaderDemo.vue +105 -0
  71. package/src/views/PaginationDemo.vue +97 -0
  72. package/src/views/RemoteSelect.vue +336 -5
  73. package/src/views/StatisticDemo.vue +191 -0
  74. package/src/views/SwitchDemo.vue +80 -0
  75. package/src/views/TableDemo.vue +335 -0
  76. package/src/views/TableSortDemo.vue +144 -0
  77. package/src/views/TableView.vue +69 -0
  78. package/src/views/TabsDemo.vue +283 -0
  79. package/src/views/TagDemo.vue +102 -0
  80. package/src/views/TdesignAlert.vue +99 -0
  81. package/src/views/TdesignButton.vue +191 -0
  82. package/src/views/TdesignCalendar.vue +95 -0
  83. package/src/views/TdesignCard.vue +297 -0
  84. package/src/views/TdesignCollapse.vue +294 -0
  85. package/src/views/TdesignDatePicker.vue +188 -0
  86. package/src/views/TdesignForm.vue +249 -0
  87. package/src/views/TdesignIcon.vue +204 -0
  88. package/src/views/TdesignImage.vue +216 -0
  89. package/src/views/TdesignImageViewer.vue +199 -0
  90. package/src/views/TdesignInput.vue +253 -0
  91. package/src/views/TdesignSelect.vue +474 -0
  92. package/src/views/TdesignSwiper.vue +158 -0
  93. package/src/views/TextareaDemo.vue +94 -0
  94. package/src/views/TimePickerDemo.vue +147 -0
  95. package/src/views/TimelineDemo.vue +161 -0
  96. package/src/views/TreeDemo.vue +255 -0
  97. package/src/views/TreeSelectorDemo.vue +246 -0
  98. package/src/views/UploadDemo.vue +122 -0
  99. package/src/views/WatermarkDemo.vue +86 -0
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <div class="swiper-demo">
3
+ <h1>TDesign 轮播框组件示例</h1>
4
+
5
+ <div class="demo-section">
6
+ <h2>1. 基础轮播</h2>
7
+ <ebiz-swiper>
8
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
9
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
10
+ {{ item.label }}
11
+ </div>
12
+ </ebiz-swiper-item>
13
+ </ebiz-swiper>
14
+ </div>
15
+
16
+ <div class="demo-section">
17
+ <h2>2. 垂直布局</h2>
18
+ <ebiz-swiper direction="vertical" :height="200">
19
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
20
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
21
+ {{ item.label }}
22
+ </div>
23
+ </ebiz-swiper-item>
24
+ </ebiz-swiper>
25
+ </div>
26
+
27
+ <div class="demo-section">
28
+ <h2>3. 自定义导航器位置</h2>
29
+ <ebiz-swiper :navigation="{ placement: 'outside' }">
30
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
31
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
32
+ {{ item.label }}
33
+ </div>
34
+ </ebiz-swiper-item>
35
+ </ebiz-swiper>
36
+ </div>
37
+
38
+ <div class="demo-section">
39
+ <h2>4. 分式导航器</h2>
40
+ <ebiz-swiper :navigation="{ type: 'fraction' }">
41
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
42
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
43
+ {{ item.label }}
44
+ </div>
45
+ </ebiz-swiper-item>
46
+ </ebiz-swiper>
47
+ </div>
48
+
49
+ <div class="demo-section">
50
+ <h2>5. 渐隐模式</h2>
51
+ <ebiz-swiper animation="fade">
52
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
53
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
54
+ {{ item.label }}
55
+ </div>
56
+ </ebiz-swiper-item>
57
+ </ebiz-swiper>
58
+ </div>
59
+
60
+ <div class="demo-section">
61
+ <h2>6. 手动控制</h2>
62
+ <div class="control-panel">
63
+ <t-button @click="currentIndex = (currentIndex - 1 + swiperItems.length) % swiperItems.length">上一张</t-button>
64
+ <t-button @click="currentIndex = (currentIndex + 1) % swiperItems.length">下一张</t-button>
65
+ </div>
66
+ <ebiz-swiper v-model:current="currentIndex" :autoplay="false">
67
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
68
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
69
+ {{ item.label }}
70
+ </div>
71
+ </ebiz-swiper-item>
72
+ </ebiz-swiper>
73
+ </div>
74
+
75
+ <div class="demo-section">
76
+ <h2>7. 自定义导航器大小</h2>
77
+ <ebiz-swiper :navigation="{ size: 'large' }">
78
+ <ebiz-swiper-item v-for="(item, index) in swiperItems" :key="index">
79
+ <div class="demo-item" :style="{ backgroundColor: item.color }">
80
+ {{ item.label }}
81
+ </div>
82
+ </ebiz-swiper-item>
83
+ </ebiz-swiper>
84
+ </div>
85
+ </div>
86
+ </template>
87
+
88
+ <script>
89
+ import { ref } from 'vue';
90
+ import { EbizSwiper, EbizSwiperItem } from '../index.js';
91
+ import { Button as TButton } from 'tdesign-vue-next';
92
+
93
+ export default {
94
+ name: 'TdesignSwiperDemo',
95
+ components: {
96
+ EbizSwiper,
97
+ EbizSwiperItem,
98
+ TButton
99
+ },
100
+ setup() {
101
+ const currentIndex = ref(0);
102
+
103
+ const swiperItems = [
104
+ { label: '1', color: '#0052D9' },
105
+ { label: '2', color: '#0594FA' },
106
+ { label: '3', color: '#05A573' },
107
+ { label: '4', color: '#D54941' },
108
+ { label: '5', color: '#ED7B2F' },
109
+ { label: '6', color: '#9B38D3' }
110
+ ];
111
+
112
+ return {
113
+ currentIndex,
114
+ swiperItems
115
+ };
116
+ }
117
+ };
118
+ </script>
119
+
120
+ <style scoped>
121
+ .swiper-demo {
122
+ padding: 20px;
123
+ }
124
+
125
+ .demo-section {
126
+ margin-bottom: 40px;
127
+ border: 1px solid #eaeaea;
128
+ border-radius: 8px;
129
+ padding: 20px;
130
+ }
131
+
132
+ h1 {
133
+ margin-bottom: 30px;
134
+ color: #333;
135
+ }
136
+
137
+ h2 {
138
+ margin-bottom: 15px;
139
+ color: #666;
140
+ font-size: 18px;
141
+ }
142
+
143
+ .demo-item {
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ height: 200px;
148
+ color: white;
149
+ font-size: 32px;
150
+ font-weight: bold;
151
+ }
152
+
153
+ .control-panel {
154
+ display: flex;
155
+ gap: 10px;
156
+ margin-bottom: 10px;
157
+ }
158
+ </style>
@@ -0,0 +1,239 @@
1
+ <template>
2
+ <div class="grid-demo">
3
+ <h1>TDesign Grid 组件示例</h1>
4
+
5
+ <h2>基础栅格</h2>
6
+ <div class="demo-section">
7
+ <EbizGrid>
8
+ <EbizCol :span="24">
9
+ <div class="grid-content bg-purple-dark">24</div>
10
+ </EbizCol>
11
+ </EbizGrid>
12
+
13
+ <EbizGrid>
14
+ <EbizCol :span="12">
15
+ <div class="grid-content bg-purple">12</div>
16
+ </EbizCol>
17
+ <EbizCol :span="12">
18
+ <div class="grid-content bg-purple-light">12</div>
19
+ </EbizCol>
20
+ </EbizGrid>
21
+
22
+ <EbizGrid>
23
+ <EbizCol :span="8">
24
+ <div class="grid-content bg-purple">8</div>
25
+ </EbizCol>
26
+ <EbizCol :span="8">
27
+ <div class="grid-content bg-purple-light">8</div>
28
+ </EbizCol>
29
+ <EbizCol :span="8">
30
+ <div class="grid-content bg-purple">8</div>
31
+ </EbizCol>
32
+ </EbizGrid>
33
+
34
+ <EbizGrid>
35
+ <EbizCol :span="6">
36
+ <div class="grid-content bg-purple">6</div>
37
+ </EbizCol>
38
+ <EbizCol :span="6">
39
+ <div class="grid-content bg-purple-light">6</div>
40
+ </EbizCol>
41
+ <EbizCol :span="6">
42
+ <div class="grid-content bg-purple">6</div>
43
+ </EbizCol>
44
+ <EbizCol :span="6">
45
+ <div class="grid-content bg-purple-light">6</div>
46
+ </EbizCol>
47
+ </EbizGrid>
48
+ </div>
49
+
50
+ <h2>区块间隔</h2>
51
+ <div class="demo-section">
52
+ <EbizGrid :gutter="16">
53
+ <EbizCol :span="6">
54
+ <div class="grid-content bg-purple">6</div>
55
+ </EbizCol>
56
+ <EbizCol :span="6">
57
+ <div class="grid-content bg-purple-light">6</div>
58
+ </EbizCol>
59
+ <EbizCol :span="6">
60
+ <div class="grid-content bg-purple">6</div>
61
+ </EbizCol>
62
+ <EbizCol :span="6">
63
+ <div class="grid-content bg-purple-light">6</div>
64
+ </EbizCol>
65
+ </EbizGrid>
66
+ </div>
67
+
68
+ <h2>水平对齐方式</h2>
69
+ <div class="demo-section">
70
+ <p>justify: start</p>
71
+ <EbizGrid :justify="'start'">
72
+ <EbizCol :span="4">
73
+ <div class="grid-content bg-purple-dark">4</div>
74
+ </EbizCol>
75
+ <EbizCol :span="4">
76
+ <div class="grid-content bg-purple">4</div>
77
+ </EbizCol>
78
+ <EbizCol :span="4">
79
+ <div class="grid-content bg-purple-light">4</div>
80
+ </EbizCol>
81
+ </EbizGrid>
82
+
83
+ <p>justify: center</p>
84
+ <EbizGrid :justify="'center'">
85
+ <EbizCol :span="4">
86
+ <div class="grid-content bg-purple-dark">4</div>
87
+ </EbizCol>
88
+ <EbizCol :span="4">
89
+ <div class="grid-content bg-purple">4</div>
90
+ </EbizCol>
91
+ <EbizCol :span="4">
92
+ <div class="grid-content bg-purple-light">4</div>
93
+ </EbizCol>
94
+ </EbizGrid>
95
+
96
+ <p>justify: end</p>
97
+ <EbizGrid :justify="'end'">
98
+ <EbizCol :span="4">
99
+ <div class="grid-content bg-purple-dark">4</div>
100
+ </EbizCol>
101
+ <EbizCol :span="4">
102
+ <div class="grid-content bg-purple">4</div>
103
+ </EbizCol>
104
+ <EbizCol :span="4">
105
+ <div class="grid-content bg-purple-light">4</div>
106
+ </EbizCol>
107
+ </EbizGrid>
108
+
109
+ <p>justify: space-between</p>
110
+ <EbizGrid :justify="'space-between'">
111
+ <EbizCol :span="4">
112
+ <div class="grid-content bg-purple-dark">4</div>
113
+ </EbizCol>
114
+ <EbizCol :span="4">
115
+ <div class="grid-content bg-purple">4</div>
116
+ </EbizCol>
117
+ <EbizCol :span="4">
118
+ <div class="grid-content bg-purple-light">4</div>
119
+ </EbizCol>
120
+ </EbizGrid>
121
+
122
+ <p>justify: space-around</p>
123
+ <EbizGrid :justify="'space-around'">
124
+ <EbizCol :span="4">
125
+ <div class="grid-content bg-purple-dark">4</div>
126
+ </EbizCol>
127
+ <EbizCol :span="4">
128
+ <div class="grid-content bg-purple">4</div>
129
+ </EbizCol>
130
+ <EbizCol :span="4">
131
+ <div class="grid-content bg-purple-light">4</div>
132
+ </EbizCol>
133
+ </EbizGrid>
134
+ </div>
135
+
136
+ <h2>垂直对齐方式</h2>
137
+ <div class="demo-section">
138
+ <p>align: top</p>
139
+ <EbizGrid :align="'start'" class="align-demo">
140
+ <EbizCol :span="6">
141
+ <div class="grid-content bg-purple" style="height: 80px">6</div>
142
+ </EbizCol>
143
+ <EbizCol :span="6">
144
+ <div class="grid-content bg-purple-light" style="height: 40px">6</div>
145
+ </EbizCol>
146
+ <EbizCol :span="6">
147
+ <div class="grid-content bg-purple" style="height: 120px">6</div>
148
+ </EbizCol>
149
+ </EbizGrid>
150
+
151
+ <p>align: center</p>
152
+ <EbizGrid :align="'center'" class="align-demo">
153
+ <EbizCol :span="6">
154
+ <div class="grid-content bg-purple" style="height: 80px">6</div>
155
+ </EbizCol>
156
+ <EbizCol :span="6">
157
+ <div class="grid-content bg-purple-light" style="height: 40px">6</div>
158
+ </EbizCol>
159
+ <EbizCol :span="6">
160
+ <div class="grid-content bg-purple" style="height: 120px">6</div>
161
+ </EbizCol>
162
+ </EbizGrid>
163
+
164
+ <p>align: bottom</p>
165
+ <EbizGrid :align="'end'" class="align-demo">
166
+ <EbizCol :span="6">
167
+ <div class="grid-content bg-purple" style="height: 80px">6</div>
168
+ </EbizCol>
169
+ <EbizCol :span="6">
170
+ <div class="grid-content bg-purple-light" style="height: 40px">6</div>
171
+ </EbizCol>
172
+ <EbizCol :span="6">
173
+ <div class="grid-content bg-purple" style="height: 120px">6</div>
174
+ </EbizCol>
175
+ </EbizGrid>
176
+ </div>
177
+
178
+ <h2>响应式布局</h2>
179
+ <div class="demo-section">
180
+ <EbizGrid :gutter="10">
181
+ <EbizCol :xs="8" :sm="6" :md="4" :lg="3" :xl="1">
182
+ <div class="grid-content bg-purple">xs=8 sm=6 md=4 lg=3 xl=1</div>
183
+ </EbizCol>
184
+ <EbizCol :xs="4" :sm="6" :md="8" :lg="9" :xl="11">
185
+ <div class="grid-content bg-purple-light">xs=4 sm=6 md=8 lg=9 xl=11</div>
186
+ </EbizCol>
187
+ <EbizCol :xs="4" :sm="6" :md="8" :lg="9" :xl="11">
188
+ <div class="grid-content bg-purple">xs=4 sm=6 md=8 lg=9 xl=11</div>
189
+ </EbizCol>
190
+ <EbizCol :xs="8" :sm="6" :md="4" :lg="3" :xl="1">
191
+ <div class="grid-content bg-purple-light">xs=8 sm=6 md=4 lg=3 xl=1</div>
192
+ </EbizCol>
193
+ </EbizGrid>
194
+ </div>
195
+ </div>
196
+ </template>
197
+
198
+ <script setup>
199
+ import { EbizGrid, EbizCol } from '../index.js';
200
+ </script>
201
+
202
+ <style lang="less" scoped>
203
+ .grid-demo {
204
+ padding: 20px;
205
+
206
+ .demo-section {
207
+ margin-bottom: 40px;
208
+ }
209
+
210
+ .grid-content {
211
+ border-radius: 4px;
212
+ min-height: 36px;
213
+ color: #fff;
214
+ text-align: center;
215
+ line-height: 36px;
216
+ margin-bottom: 10px;
217
+ }
218
+
219
+ .bg-purple-dark {
220
+ background: #99a9bf;
221
+ }
222
+
223
+ .bg-purple {
224
+ background: #d3dce6;
225
+ color: #333;
226
+ }
227
+
228
+ .bg-purple-light {
229
+ background: #e5e9f2;
230
+ color: #333;
231
+ }
232
+
233
+ .align-demo {
234
+ margin-bottom: 20px;
235
+ background-color: rgba(0, 0, 0, 0.05);
236
+ height: 120px;
237
+ }
238
+ }
239
+ </style>
@@ -1,12 +1,22 @@
1
1
  <template>
2
2
  <div class="home">
3
- <h1>组件库示例</h1>
3
+ <h1>Ebiz 组件库</h1>
4
4
  <div class="component-list">
5
5
  <div v-for="(item, index) in components" :key="index" class="component-item">
6
6
  <router-link :to="item.path" class="component-link">
7
7
  {{ item.title }}
8
8
  </router-link>
9
9
  </div>
10
+
11
+ <router-link to="/tree-demo" class="component-item">
12
+ <div class="component-title">树组件</div>
13
+ <div class="component-desc">用于展示层级结构和操作的组件</div>
14
+ </router-link>
15
+
16
+ <router-link to="/tree-selector-demo" class="component-item">
17
+ <div class="component-title">树形选择器</div>
18
+ <div class="component-desc">基于树组件的选择器,支持搜索和多选</div>
19
+ </router-link>
10
20
  </div>
11
21
  </div>
12
22
  </template>
@@ -20,11 +30,48 @@ export default {
20
30
  { path: '/table', title: '表格组件示例' },
21
31
  { path: '/form', title: '表单组件示例' },
22
32
  { path: '/button', title: '按钮组件示例' },
33
+ { path: '/tdesign-button', title: 'TDesign按钮组件示例' },
34
+ { path: '/tdesign-icon', title: 'TDesign图标组件示例' },
35
+ { path: '/tdesign-input', title: 'TDesign输入框组件示例' },
36
+ { path: '/tdesign-select', title: 'TDesign选择器组件示例' },
37
+ { path: '/tdesign-form', title: 'TDesign表单组件示例' },
38
+ { path: '/tdesign-card', title: 'TDesign卡片组件示例' },
39
+ { path: '/tdesign-date-picker', title: 'TDesign日期选择器示例' },
40
+ { path: '/tdesign-image', title: 'TDesign图片组件示例' },
41
+ { path: '/tdesign-image-viewer', title: 'TDesign图片查看器组件示例' },
23
42
  { path: '/data-container', title: '数据容器示例' },
24
43
  { path: '/title', title: '标题组件示例' },
25
44
  { path: '/okr-tree', title: 'OKR树形图示例' },
26
45
  { path: '/remote-select', title: '远程选择器示例' },
27
- { path: '/mindmap', title: '思维导图示例' }
46
+ { path: '/mindmap', title: '思维导图示例' },
47
+ { path: '/tdesign-calendar', title: 'TDesign日历组件示例' },
48
+ { path: '/tdesign-collapse', title: 'TDesign折叠面板组件示例' },
49
+ { path: '/tdesign-tag', title: 'TDesign标签组件示例' },
50
+ { path: '/ebiz-swiper', title: 'Ebiz轮播框组件示例' },
51
+ { path: '/ebiz-space', title: 'Ebiz间距组件示例' },
52
+ { path: '/pagination', title: 'EbizPagination分页组件示例' },
53
+ { path: '/checkbox', title: 'Ebiz多选框组件示例' },
54
+ { path: '/radio', title: 'Ebiz单选框组件示例' },
55
+ { path: '/switch', title: 'Ebiz开关组件示例' },
56
+ { path: '/textarea', title: 'Ebiz多行文本框组件示例' },
57
+ { path: '/upload', title: 'TDesign上传组件示例' },
58
+ { path: '/grid', title: 'TDesign栅格组件示例' },
59
+ { path: '/tabs', title: 'Ebiz选项卡组件示例' },
60
+ { path: '/statistic', title: 'Ebiz统计数值组件示例' },
61
+ { path: '/timeline', title: 'Ebiz时间轴组件示例' },
62
+ { path: '/watermark', title: 'TDesign水印组件示例' },
63
+ { path: '/ebiz-avatar', title: 'Ebiz头像组件示例' },
64
+ { path: '/ebiz-employee-info', title: 'Ebiz员工信息组件示例' },
65
+ { path: '/tdesign-alert', title: 'TDesign提示组件示例' },
66
+ { path: '/tdesign-dialog', title: 'TDesign对话框组件示例' },
67
+ { path: '/page-header', title: 'Ebiz页面头部组件示例' },
68
+ { path: '/table-demo', title: 'Ebiz表格组件示例' },
69
+ { path: '/ebiz-detail-block', title: 'Ebiz详情块组件示例' },
70
+ { path: '/table-column', title: 'Ebiz表格列组件示例' },
71
+ { path: '/table-sort', title: 'Ebiz表格排序组件示例' },
72
+ { path: '/tree', title: 'Ebiz树组件示例' },
73
+ { path: '/tree-selector', title: 'Ebiz树选择器组件示例' },
74
+ { path: '/time-picker', title: 'Ebiz时间选择器组件示例' }
28
75
  ]
29
76
 
30
77
  return {
@@ -62,4 +109,18 @@ export default {
62
109
  .component-link:hover {
63
110
  color: #1890ff;
64
111
  }
112
+
113
+ .component-title {
114
+ font-size: 16px;
115
+ font-weight: bold;
116
+ margin-bottom: 10px;
117
+ }
118
+
119
+ .component-desc {
120
+ font-size: 14px;
121
+ }
122
+
123
+ .component-item:hover {
124
+ background-color: #e6e6e6;
125
+ }
65
126
  </style>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div class="demo-container">
3
+ <h2>页面头部组件演示</h2>
4
+
5
+ <div class="section">
6
+ <h3>基础用法</h3>
7
+ <div class="example">
8
+ <EbizPageHeader />
9
+ </div>
10
+ <div class="code">
11
+ <pre><code>&lt;EbizPageHeader /&gt;</code></pre>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="section">
16
+ <h3>功能说明</h3>
17
+ <div class="description">
18
+ <p>此组件会自动根据当前路由信息生成面包屑导航。确保路由配置中包含以下meta信息:</p>
19
+ <pre><code>
20
+ // 路由配置示例
21
+ {
22
+ path: '/hr',
23
+ component: HR,
24
+ meta: {
25
+ title: '人事管理', // 面包屑显示的标题
26
+ icon: 'user' // 面包屑的图标名称,使用TDesign图标
27
+ },
28
+ children: [
29
+ {
30
+ path: 'employee',
31
+ component: Employee,
32
+ meta: {
33
+ title: '员工管理',
34
+ icon: 'user-talk'
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ </code></pre>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="section">
44
+ <h3>帮助文档跳转</h3>
45
+ <p>点击帮助文档按钮会自动跳转到 /help 路径,并带上当前路由作为查询参数。</p>
46
+ </div>
47
+ </div>
48
+ </template>
49
+
50
+ <script setup>
51
+ import { EbizPageHeader } from '../index.js'
52
+ </script>
53
+
54
+ <style scoped>
55
+ .demo-container {
56
+ padding: 20px;
57
+ max-width: 1200px;
58
+ margin: 0 auto;
59
+ }
60
+
61
+ h2 {
62
+ margin-bottom: 24px;
63
+ font-weight: 500;
64
+ color: #1a1a1a;
65
+ }
66
+
67
+ .section {
68
+ margin-bottom: 32px;
69
+ border: 1px solid #e9e9e9;
70
+ border-radius: 4px;
71
+ overflow: hidden;
72
+ }
73
+
74
+ h3 {
75
+ padding: 16px;
76
+ margin: 0;
77
+ font-weight: 500;
78
+ background-color: #f7f7f7;
79
+ border-bottom: 1px solid #e9e9e9;
80
+ }
81
+
82
+ .example {
83
+ padding: 24px;
84
+ border-bottom: 1px dashed #e9e9e9;
85
+ }
86
+
87
+ .code {
88
+ padding: 16px;
89
+ background-color: #f7f7f7;
90
+ }
91
+
92
+ pre {
93
+ margin: 0;
94
+ overflow-x: auto;
95
+ }
96
+
97
+ code {
98
+ font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
99
+ font-size: 14px;
100
+ }
101
+
102
+ .description {
103
+ padding: 16px;
104
+ }
105
+ </style>
@@ -0,0 +1,97 @@
1
+ <template>
2
+ <div class="pagination-demo">
3
+ <h1>EbizPagination 分页组件示例</h1>
4
+
5
+ <h2>基础分页</h2>
6
+ <div class="demo-section">
7
+ <EbizPagination :total="100" />
8
+ </div>
9
+
10
+ <h2>带数据总量显示的分页</h2>
11
+ <div class="demo-section">
12
+ <EbizPagination :total="685" />
13
+ </div>
14
+
15
+ <h2>带页面展示数量选择的分页</h2>
16
+ <div class="demo-section">
17
+ <EbizPagination :total="645" :pageSizeOptions="[10, 20, 30, 50]" :defaultPageSize="30" />
18
+ </div>
19
+
20
+ <h2>带快速跳转的分页</h2>
21
+ <div class="demo-section">
22
+ <EbizPagination :total="101" :pageSize="20" :showJumper="true" />
23
+ </div>
24
+
25
+ <h2>极简版分页</h2>
26
+ <div class="demo-section">
27
+ <EbizPagination :total="100" :theme="'simple'" :showJumper="true" />
28
+ </div>
29
+
30
+ <h2>迷你版分页</h2>
31
+ <div class="demo-section">
32
+ <EbizPagination :total="100" :size="'small'" />
33
+ </div>
34
+
35
+ <h2>极简迷你版分页</h2>
36
+ <div class="demo-section">
37
+ <EbizPagination :total="100" :theme="'simple'" :size="'small'" :showJumper="true" />
38
+ </div>
39
+
40
+ <h2>自定义显示内容</h2>
41
+ <div class="demo-section">
42
+ <EbizPagination :total="200">
43
+ <template #totalContent>
44
+ <span style="color: #0052d9;">共 {{ 200 }} 条数据</span>
45
+ </template>
46
+ </EbizPagination>
47
+ </div>
48
+
49
+ <h2>事件处理</h2>
50
+ <div class="demo-section">
51
+ <EbizPagination
52
+ :total="500"
53
+ :current="currentPage"
54
+ :pageSize="pageSize"
55
+ @change="handlePaginationChange"
56
+ />
57
+ <p>当前页码: {{ currentPage }}, 每页条数: {{ pageSize }}</p>
58
+ </div>
59
+ </div>
60
+ </template>
61
+
62
+ <script setup>
63
+ import { ref } from 'vue';
64
+ import { EbizPagination } from '../index.js';
65
+
66
+ const currentPage = ref(1);
67
+ const pageSize = ref(10);
68
+
69
+ const handlePaginationChange = (pageInfo) => {
70
+ currentPage.value = pageInfo.current;
71
+ pageSize.value = pageInfo.pageSize;
72
+ console.log('分页变化', pageInfo);
73
+ };
74
+ </script>
75
+
76
+ <style scoped>
77
+ .pagination-demo {
78
+ padding: 20px;
79
+ }
80
+
81
+ .demo-section {
82
+ margin-bottom: 30px;
83
+ padding: 16px;
84
+ border: 1px solid #eee;
85
+ border-radius: 4px;
86
+ }
87
+
88
+ h1 {
89
+ font-size: 24px;
90
+ margin-bottom: 20px;
91
+ }
92
+
93
+ h2 {
94
+ font-size: 18px;
95
+ margin: 10px 0;
96
+ }
97
+ </style>