@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.
- package/package.json +3 -2
- package/src/apiService/mockDataService.js +116 -0
- package/src/apiService/simpleDataService.js +186 -80
- package/src/components/Button.vue +72 -22
- package/src/components/EbizAvatar.vue +116 -0
- package/src/components/EbizCheckbox.vue +94 -0
- package/src/components/EbizCheckboxGroup.vue +70 -0
- package/src/components/EbizDetailBlock.vue +82 -0
- package/src/components/EbizDialog.vue +244 -56
- package/src/components/EbizEmployeeInfo.vue +139 -0
- package/src/components/EbizFileUpload.vue +202 -0
- package/src/components/EbizPageHeader.vue +96 -0
- package/src/components/EbizPagination.vue +163 -0
- package/src/components/EbizRadio.vue +87 -0
- package/src/components/EbizRadioGroup.vue +84 -0
- package/src/components/EbizRemoteSelect.vue +118 -40
- package/src/components/EbizSpace.vue +101 -0
- package/src/components/EbizStatistic.vue +150 -0
- package/src/components/EbizSwiper.vue +114 -0
- package/src/components/EbizSwiperItem.vue +14 -0
- package/src/components/EbizSwitch.vue +86 -0
- package/src/components/EbizTabHeader.vue +145 -0
- package/src/components/EbizTabPanel.vue +23 -0
- package/src/components/EbizTable.vue +466 -0
- package/src/components/EbizTableColumn.vue +117 -0
- package/src/components/EbizTableSort.vue +181 -0
- package/src/components/EbizTabs.vue +133 -91
- package/src/components/EbizTimePicker.vue +144 -0
- package/src/components/EbizTitle.vue +3 -10
- package/src/components/EbizTree.vue +153 -0
- package/src/components/EbizTreeSelector.vue +423 -0
- package/src/components/Home.vue +8 -0
- package/src/components/TdesignAlert.vue +116 -0
- package/src/components/TdesignButton.vue +130 -0
- package/src/components/TdesignCalendar/index.vue +146 -0
- package/src/components/TdesignCard.vue +196 -0
- package/src/components/TdesignCol.vue +102 -0
- package/src/components/TdesignCollapse.vue +143 -0
- package/src/components/TdesignCollapsePanel.vue +80 -0
- package/src/components/TdesignDatePicker.vue +125 -0
- package/src/components/TdesignDialog.vue +226 -0
- package/src/components/TdesignForm.vue +134 -0
- package/src/components/TdesignFormItem.vue +106 -0
- package/src/components/TdesignGrid.vue +56 -0
- package/src/components/TdesignIcon.vue +68 -0
- package/src/components/TdesignImage.vue +163 -0
- package/src/components/TdesignImageViewer.vue +201 -0
- package/src/components/TdesignInput.vue +243 -0
- package/src/components/TdesignSelect.vue +445 -0
- package/src/components/TdesignTag.vue +118 -0
- package/src/components/TdesignTextarea.vue +143 -0
- package/src/components/TdesignTimeline.vue +58 -0
- package/src/components/TdesignTimelineItem.vue +72 -0
- package/src/components/TdesignUpload.vue +757 -0
- package/src/components/TdesignWatermark.vue +108 -0
- package/src/index.js +130 -0
- package/src/main.js +20 -4
- package/src/router/index.js +244 -5
- package/src/views/Button.vue +7 -3
- package/src/views/CheckboxDemo.vue +105 -0
- package/src/views/DialogDemo.vue +126 -0
- package/src/views/EbizAvatar.vue +224 -0
- package/src/views/EbizDetailBlockDemo.vue +31 -0
- package/src/views/EbizEmployeeInfo.vue +250 -0
- package/src/views/EbizRadioDemo.vue +152 -0
- package/src/views/EbizSpace.vue +186 -0
- package/src/views/EbizSwiper.vue +158 -0
- package/src/views/GridDemo.vue +239 -0
- package/src/views/Home.vue +63 -2
- package/src/views/PageHeaderDemo.vue +105 -0
- package/src/views/PaginationDemo.vue +97 -0
- package/src/views/RemoteSelect.vue +336 -5
- package/src/views/StatisticDemo.vue +191 -0
- package/src/views/SwitchDemo.vue +80 -0
- package/src/views/TableDemo.vue +335 -0
- package/src/views/TableSortDemo.vue +144 -0
- package/src/views/TableView.vue +69 -0
- package/src/views/TabsDemo.vue +283 -0
- package/src/views/TagDemo.vue +102 -0
- package/src/views/TdesignAlert.vue +99 -0
- package/src/views/TdesignButton.vue +191 -0
- package/src/views/TdesignCalendar.vue +95 -0
- package/src/views/TdesignCard.vue +297 -0
- package/src/views/TdesignCollapse.vue +294 -0
- package/src/views/TdesignDatePicker.vue +188 -0
- package/src/views/TdesignForm.vue +249 -0
- package/src/views/TdesignIcon.vue +204 -0
- package/src/views/TdesignImage.vue +216 -0
- package/src/views/TdesignImageViewer.vue +199 -0
- package/src/views/TdesignInput.vue +253 -0
- package/src/views/TdesignSelect.vue +474 -0
- package/src/views/TdesignSwiper.vue +158 -0
- package/src/views/TextareaDemo.vue +94 -0
- package/src/views/TimePickerDemo.vue +147 -0
- package/src/views/TimelineDemo.vue +161 -0
- package/src/views/TreeDemo.vue +255 -0
- package/src/views/TreeSelectorDemo.vue +246 -0
- package/src/views/UploadDemo.vue +122 -0
- package/src/views/WatermarkDemo.vue +86 -0
@@ -0,0 +1,250 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="container">
|
3
|
+
<h1>EbizEmployeeInfo 员工信息组件示例</h1>
|
4
|
+
|
5
|
+
<div class="section">
|
6
|
+
<h2>基础用法</h2>
|
7
|
+
<div class="example-block">
|
8
|
+
<ebiz-employee-info
|
9
|
+
:info="basicEmployee"
|
10
|
+
/>
|
11
|
+
</div>
|
12
|
+
<div class="code-block">
|
13
|
+
<pre><code><ebiz-employee-info
|
14
|
+
:info="{
|
15
|
+
avatar: 'https://tdesign.tencent.com/vue-next/assets/avatar-1.jpg',
|
16
|
+
name: '张三',
|
17
|
+
id: 'EMP10086',
|
18
|
+
department: '研发部'
|
19
|
+
}"
|
20
|
+
/></code></pre>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="section">
|
25
|
+
<h2>不同头像尺寸</h2>
|
26
|
+
<div class="example-block">
|
27
|
+
<div class="avatar-size-container">
|
28
|
+
<div v-for="size in avatarSizes" :key="size" class="avatar-size-item">
|
29
|
+
<ebiz-employee-info
|
30
|
+
:info="basicEmployee"
|
31
|
+
:avatar-size="size"
|
32
|
+
/>
|
33
|
+
<div class="size-label">size: {{ size }}</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<div class="code-block">
|
38
|
+
<pre><code><ebiz-employee-info
|
39
|
+
:info="employeeInfo"
|
40
|
+
avatar-size="large"
|
41
|
+
/></code></pre>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div class="section">
|
46
|
+
<h2>方形头像</h2>
|
47
|
+
<div class="example-block">
|
48
|
+
<ebiz-employee-info
|
49
|
+
:info="basicEmployee"
|
50
|
+
avatar-shape="round"
|
51
|
+
/>
|
52
|
+
</div>
|
53
|
+
<div class="code-block">
|
54
|
+
<pre><code><ebiz-employee-info
|
55
|
+
:info="employeeInfo"
|
56
|
+
avatar-shape="round"
|
57
|
+
/></code></pre>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div class="section">
|
62
|
+
<h2>无头像处理</h2>
|
63
|
+
<div class="example-block">
|
64
|
+
<ebiz-employee-info
|
65
|
+
:info="noAvatarEmployee"
|
66
|
+
/>
|
67
|
+
</div>
|
68
|
+
<div class="code-block">
|
69
|
+
<pre><code><ebiz-employee-info
|
70
|
+
:info="{
|
71
|
+
name: '李四',
|
72
|
+
id: 'EMP10087',
|
73
|
+
department: '市场部'
|
74
|
+
}"
|
75
|
+
/></code></pre>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div class="section">
|
80
|
+
<h2>自定义样式</h2>
|
81
|
+
<div class="example-block">
|
82
|
+
<ebiz-employee-info
|
83
|
+
:info="basicEmployee"
|
84
|
+
width="350px"
|
85
|
+
class="custom-employee-info"
|
86
|
+
/>
|
87
|
+
</div>
|
88
|
+
<div class="code-block">
|
89
|
+
<pre><code><ebiz-employee-info
|
90
|
+
:info="employeeInfo"
|
91
|
+
width="350px"
|
92
|
+
class="custom-employee-info"
|
93
|
+
/>
|
94
|
+
|
95
|
+
<style>
|
96
|
+
.custom-employee-info {
|
97
|
+
background-color: #f0f8ff;
|
98
|
+
border: 1px solid #d1e9ff;
|
99
|
+
}
|
100
|
+
</style></code></pre>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<div class="section">
|
105
|
+
<h2>多个员工信息</h2>
|
106
|
+
<div class="example-block">
|
107
|
+
<div class="employee-list">
|
108
|
+
<ebiz-employee-info
|
109
|
+
v-for="(employee, index) in employeeList"
|
110
|
+
:key="index"
|
111
|
+
:info="employee"
|
112
|
+
class="employee-list-item"
|
113
|
+
/>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div class="code-block">
|
117
|
+
<pre><code><div class="employee-list">
|
118
|
+
<ebiz-employee-info
|
119
|
+
v-for="(employee, index) in employeeList"
|
120
|
+
:key="index"
|
121
|
+
:info="employee"
|
122
|
+
class="employee-list-item"
|
123
|
+
/>
|
124
|
+
</div></code></pre>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</template>
|
129
|
+
|
130
|
+
<script>
|
131
|
+
import { EbizEmployeeInfo } from '../index.js'
|
132
|
+
|
133
|
+
export default {
|
134
|
+
name: 'EbizEmployeeInfoDemo',
|
135
|
+
components: {
|
136
|
+
EbizEmployeeInfo
|
137
|
+
},
|
138
|
+
data() {
|
139
|
+
return {
|
140
|
+
basicEmployee: {
|
141
|
+
avatar: 'https://tdesign.tencent.com/vue-next/assets/avatar-1.jpg',
|
142
|
+
name: '张三',
|
143
|
+
id: 'EMP10086',
|
144
|
+
department: '研发部'
|
145
|
+
},
|
146
|
+
noAvatarEmployee: {
|
147
|
+
name: '李四',
|
148
|
+
id: 'EMP10087',
|
149
|
+
department: '市场部'
|
150
|
+
},
|
151
|
+
avatarSizes: ['small', 'medium', 'large'],
|
152
|
+
employeeList: [
|
153
|
+
{
|
154
|
+
avatar: 'https://tdesign.tencent.com/vue-next/assets/avatar-1.jpg',
|
155
|
+
name: '张三',
|
156
|
+
id: 'EMP10086',
|
157
|
+
department: '研发部'
|
158
|
+
},
|
159
|
+
{
|
160
|
+
avatar: 'https://tdesign.tencent.com/vue-next/assets/avatar-2.jpg',
|
161
|
+
name: '李四',
|
162
|
+
id: 'EMP10087',
|
163
|
+
department: '市场部'
|
164
|
+
},
|
165
|
+
{
|
166
|
+
avatar: 'https://tdesign.tencent.com/vue-next/assets/avatar-3.jpg',
|
167
|
+
name: '王五',
|
168
|
+
id: 'EMP10088',
|
169
|
+
department: '产品部'
|
170
|
+
},
|
171
|
+
{
|
172
|
+
name: '赵六',
|
173
|
+
id: 'EMP10089',
|
174
|
+
department: '设计部'
|
175
|
+
}
|
176
|
+
]
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
</script>
|
181
|
+
|
182
|
+
<style lang="less" scoped>
|
183
|
+
.container {
|
184
|
+
padding: 20px;
|
185
|
+
|
186
|
+
h1 {
|
187
|
+
margin-bottom: 20px;
|
188
|
+
}
|
189
|
+
|
190
|
+
.section {
|
191
|
+
margin-bottom: 30px;
|
192
|
+
|
193
|
+
h2 {
|
194
|
+
margin-bottom: 15px;
|
195
|
+
}
|
196
|
+
|
197
|
+
.example-block {
|
198
|
+
margin-bottom: 15px;
|
199
|
+
padding: 20px;
|
200
|
+
border: 1px solid #eee;
|
201
|
+
border-radius: 4px;
|
202
|
+
}
|
203
|
+
|
204
|
+
.code-block {
|
205
|
+
background-color: #f5f5f5;
|
206
|
+
padding: 15px;
|
207
|
+
border-radius: 4px;
|
208
|
+
|
209
|
+
pre {
|
210
|
+
margin: 0;
|
211
|
+
white-space: pre-wrap;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
.avatar-size-container {
|
217
|
+
display: flex;
|
218
|
+
flex-direction: column;
|
219
|
+
gap: 20px;
|
220
|
+
}
|
221
|
+
|
222
|
+
.avatar-size-item {
|
223
|
+
position: relative;
|
224
|
+
|
225
|
+
.size-label {
|
226
|
+
position: absolute;
|
227
|
+
right: 20px;
|
228
|
+
top: 50%;
|
229
|
+
transform: translateY(-50%);
|
230
|
+
font-size: 14px;
|
231
|
+
color: #666;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
.employee-list {
|
236
|
+
display: flex;
|
237
|
+
flex-direction: column;
|
238
|
+
gap: 15px;
|
239
|
+
}
|
240
|
+
|
241
|
+
.employee-list-item {
|
242
|
+
border: 1px solid #eaeaea;
|
243
|
+
}
|
244
|
+
|
245
|
+
.custom-employee-info {
|
246
|
+
background-color: #f0f8ff;
|
247
|
+
border: 1px solid #d1e9ff;
|
248
|
+
}
|
249
|
+
}
|
250
|
+
</style>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="radio-demo">
|
3
|
+
<h2>Radio 单选框组件</h2>
|
4
|
+
|
5
|
+
<h3>基础单选框</h3>
|
6
|
+
<div class="demo-section">
|
7
|
+
<ebiz-radio label="未选中项" />
|
8
|
+
<ebiz-radio label="允许取消选中项" :allowUncheck="true" v-model="radio1" />
|
9
|
+
<ebiz-radio label="选中项" v-model="radio2" />
|
10
|
+
<ebiz-radio label="选中禁用态" disabled v-model="radioDisabled" />
|
11
|
+
<ebiz-radio label="未选中禁用态" disabled />
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<h3>按钮单选框组</h3>
|
15
|
+
<div class="demo-section">
|
16
|
+
<h4>边框型单选按钮</h4>
|
17
|
+
<ebiz-radio-group v-model="group1" variant="outline">
|
18
|
+
<ebiz-radio value="1" label="选项一" />
|
19
|
+
<ebiz-radio value="2" label="选项二" />
|
20
|
+
<ebiz-radio value="3" label="选项三" />
|
21
|
+
<ebiz-radio value="4" label="选项四" />
|
22
|
+
<ebiz-radio value="5" label="选项五" />
|
23
|
+
</ebiz-radio-group>
|
24
|
+
|
25
|
+
<h4>填充型单选按钮</h4>
|
26
|
+
<ebiz-radio-group v-model="group2" variant="primary-filled">
|
27
|
+
<ebiz-radio value="1" label="选项一" />
|
28
|
+
<ebiz-radio value="2" label="选项二" />
|
29
|
+
<ebiz-radio value="3" label="选项三" />
|
30
|
+
<ebiz-radio value="4" label="选项四" />
|
31
|
+
<ebiz-radio value="5" label="选项五" />
|
32
|
+
</ebiz-radio-group>
|
33
|
+
|
34
|
+
<h4>带禁用状态的单选按钮</h4>
|
35
|
+
<ebiz-radio-group v-model="group3">
|
36
|
+
<ebiz-radio value="1" label="选项一" />
|
37
|
+
<ebiz-radio value="2" label="选项二" />
|
38
|
+
<ebiz-radio value="3" label="选项三" />
|
39
|
+
<ebiz-radio value="4" label="选中禁用态" disabled />
|
40
|
+
<ebiz-radio value="5" label="未选中禁用态" disabled />
|
41
|
+
</ebiz-radio-group>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<h3>不同尺寸的单选按钮</h3>
|
45
|
+
<div class="demo-section">
|
46
|
+
<h4>大尺寸</h4>
|
47
|
+
<ebiz-radio-group v-model="groupSize1" size="large">
|
48
|
+
<ebiz-radio value="1" label="选项一" />
|
49
|
+
<ebiz-radio value="2" label="选项二" />
|
50
|
+
<ebiz-radio value="3" label="选项三" />
|
51
|
+
<ebiz-radio value="4" label="选项四" />
|
52
|
+
</ebiz-radio-group>
|
53
|
+
|
54
|
+
<h4>中尺寸(默认)</h4>
|
55
|
+
<ebiz-radio-group v-model="groupSize2" size="medium">
|
56
|
+
<ebiz-radio value="1" label="选项一" />
|
57
|
+
<ebiz-radio value="2" label="选项二" />
|
58
|
+
<ebiz-radio value="3" label="选项三" />
|
59
|
+
<ebiz-radio value="4" label="选项四" />
|
60
|
+
</ebiz-radio-group>
|
61
|
+
|
62
|
+
<h4>小尺寸</h4>
|
63
|
+
<ebiz-radio-group v-model="groupSize3" size="small">
|
64
|
+
<ebiz-radio value="1" label="选项一" />
|
65
|
+
<ebiz-radio value="2" label="选项二" />
|
66
|
+
<ebiz-radio value="3" label="选项三" />
|
67
|
+
<ebiz-radio value="4" label="选项四" />
|
68
|
+
</ebiz-radio-group>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<h3>使用options配置的单选框组</h3>
|
72
|
+
<div class="demo-section">
|
73
|
+
<ebiz-radio-group
|
74
|
+
:options="[
|
75
|
+
{ label: '选项一', value: '1' },
|
76
|
+
{ label: '选项二', value: '2' },
|
77
|
+
{ label: '选项三', value: '3' },
|
78
|
+
{ label: '禁用选项', value: '4', disabled: true }
|
79
|
+
]"
|
80
|
+
v-model="optionsGroup"
|
81
|
+
/>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
<h3>可取消选中的单选框组</h3>
|
85
|
+
<div class="demo-section">
|
86
|
+
<ebiz-radio-group
|
87
|
+
:allowUncheck="true"
|
88
|
+
:options="[
|
89
|
+
{ label: '可取消选中项一', value: '1' },
|
90
|
+
{ label: '可取消选中项二', value: '2' },
|
91
|
+
{ label: '可取消选中项三', value: '3' }
|
92
|
+
]"
|
93
|
+
v-model="uncheckGroup"
|
94
|
+
/>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
</template>
|
98
|
+
|
99
|
+
<script>
|
100
|
+
export default {
|
101
|
+
name: 'EbizRadioDemo'
|
102
|
+
}
|
103
|
+
</script>
|
104
|
+
|
105
|
+
<script setup>
|
106
|
+
import { ref } from 'vue';
|
107
|
+
import { EbizRadio, EbizRadioGroup } from '../index.js';
|
108
|
+
|
109
|
+
// 单选框状态
|
110
|
+
const radio1 = ref(true);
|
111
|
+
const radio2 = ref(true);
|
112
|
+
const radioDisabled = ref(true);
|
113
|
+
|
114
|
+
// 单选组状态
|
115
|
+
const group1 = ref('1');
|
116
|
+
const group2 = ref('1');
|
117
|
+
const group3 = ref('1');
|
118
|
+
|
119
|
+
// 不同尺寸的单选组
|
120
|
+
const groupSize1 = ref('1');
|
121
|
+
const groupSize2 = ref('1');
|
122
|
+
const groupSize3 = ref('1');
|
123
|
+
|
124
|
+
// options配置的单选组
|
125
|
+
const optionsGroup = ref('1');
|
126
|
+
|
127
|
+
// 可取消选中的单选组
|
128
|
+
const uncheckGroup = ref('1');
|
129
|
+
</script>
|
130
|
+
|
131
|
+
<style scoped>
|
132
|
+
.radio-demo {
|
133
|
+
padding: 20px;
|
134
|
+
}
|
135
|
+
|
136
|
+
.demo-section {
|
137
|
+
margin-bottom: 30px;
|
138
|
+
border: 1px solid #eee;
|
139
|
+
padding: 16px;
|
140
|
+
border-radius: 6px;
|
141
|
+
}
|
142
|
+
|
143
|
+
h3 {
|
144
|
+
margin-top: 24px;
|
145
|
+
margin-bottom: 16px;
|
146
|
+
}
|
147
|
+
|
148
|
+
h4 {
|
149
|
+
margin-top: 16px;
|
150
|
+
margin-bottom: 8px;
|
151
|
+
}
|
152
|
+
</style>
|
@@ -0,0 +1,186 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="space-demo">
|
3
|
+
<h2>EbizSpace 间距组件</h2>
|
4
|
+
|
5
|
+
<h3>基本用法</h3>
|
6
|
+
<div class="demo-block">
|
7
|
+
<EbizSpace>
|
8
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
9
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
10
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
11
|
+
</EbizSpace>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<h3>垂直间距</h3>
|
15
|
+
<div class="demo-block">
|
16
|
+
<EbizSpace direction="vertical" style="width: 100%">
|
17
|
+
<EbizTdesignCard title="卡片1" summary="这是卡片1的内容">
|
18
|
+
卡片内容区域可以是文字、图片、表单、表格等形式信息内容
|
19
|
+
</EbizTdesignCard>
|
20
|
+
<EbizTdesignCard title="卡片2" summary="这是卡片2的内容">
|
21
|
+
卡片内容区域可以是文字、图片、表单、表格等形式信息内容
|
22
|
+
</EbizTdesignCard>
|
23
|
+
</EbizSpace>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<h3>间距大小</h3>
|
27
|
+
<div class="demo-block">
|
28
|
+
<h4>小间距 (small)</h4>
|
29
|
+
<EbizSpace size="small">
|
30
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
31
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
32
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
33
|
+
</EbizSpace>
|
34
|
+
|
35
|
+
<h4>中等间距 (medium - 默认)</h4>
|
36
|
+
<EbizSpace size="medium">
|
37
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
38
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
39
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
40
|
+
</EbizSpace>
|
41
|
+
|
42
|
+
<h4>大间距 (large)</h4>
|
43
|
+
<EbizSpace size="large">
|
44
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
45
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
46
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
47
|
+
</EbizSpace>
|
48
|
+
|
49
|
+
<h4>自定义间距 (24px)</h4>
|
50
|
+
<EbizSpace :size="24">
|
51
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
52
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
53
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
54
|
+
</EbizSpace>
|
55
|
+
|
56
|
+
<h4>自定义行列间距 [16, 24]</h4>
|
57
|
+
<EbizSpace :size="[16, 24]" breakLine>
|
58
|
+
<EbizTdesignButton>按钮1</EbizTdesignButton>
|
59
|
+
<EbizTdesignButton>按钮2</EbizTdesignButton>
|
60
|
+
<EbizTdesignButton>按钮3</EbizTdesignButton>
|
61
|
+
<EbizTdesignButton>按钮4</EbizTdesignButton>
|
62
|
+
<EbizTdesignButton>按钮5</EbizTdesignButton>
|
63
|
+
<EbizTdesignButton>按钮6</EbizTdesignButton>
|
64
|
+
</EbizSpace>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<h3>对齐方式</h3>
|
68
|
+
<div class="demo-block alignment">
|
69
|
+
<EbizSpace direction="vertical" size="large">
|
70
|
+
<div>
|
71
|
+
<span class="alignment-text">顶部对齐 (start):</span>
|
72
|
+
<EbizSpace align="start">
|
73
|
+
<div class="alignment-block small"></div>
|
74
|
+
<div class="alignment-block medium"></div>
|
75
|
+
<div class="alignment-block large"></div>
|
76
|
+
</EbizSpace>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div>
|
80
|
+
<span class="alignment-text">居中对齐 (center):</span>
|
81
|
+
<EbizSpace align="center">
|
82
|
+
<div class="alignment-block small"></div>
|
83
|
+
<div class="alignment-block medium"></div>
|
84
|
+
<div class="alignment-block large"></div>
|
85
|
+
</EbizSpace>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div>
|
89
|
+
<span class="alignment-text">底部对齐 (end):</span>
|
90
|
+
<EbizSpace align="end">
|
91
|
+
<div class="alignment-block small"></div>
|
92
|
+
<div class="alignment-block medium"></div>
|
93
|
+
<div class="alignment-block large"></div>
|
94
|
+
</EbizSpace>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div>
|
98
|
+
<span class="alignment-text">基线对齐 (baseline):</span>
|
99
|
+
<EbizSpace align="baseline">
|
100
|
+
<div class="alignment-block small">
|
101
|
+
<span style="position: relative; top: 16px;">文本</span>
|
102
|
+
</div>
|
103
|
+
<div class="alignment-block medium">
|
104
|
+
<span style="position: relative; top: 32px;">文本</span>
|
105
|
+
</div>
|
106
|
+
<div class="alignment-block large">
|
107
|
+
<span style="position: relative; top: 48px;">文本</span>
|
108
|
+
</div>
|
109
|
+
</EbizSpace>
|
110
|
+
</div>
|
111
|
+
</EbizSpace>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<h3>自动换行</h3>
|
115
|
+
<div class="demo-block">
|
116
|
+
<EbizSpace breakLine>
|
117
|
+
<EbizTdesignButton v-for="i in 10" :key="i">按钮{{ i }}</EbizTdesignButton>
|
118
|
+
</EbizSpace>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<h3>设置分隔符</h3>
|
122
|
+
<div class="demo-block">
|
123
|
+
<EbizSpace separator="|">
|
124
|
+
<span>文本1</span>
|
125
|
+
<span>文本2</span>
|
126
|
+
<span>文本3</span>
|
127
|
+
<span>文本4</span>
|
128
|
+
</EbizSpace>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
</template>
|
132
|
+
|
133
|
+
<script setup>
|
134
|
+
import { EbizSpace, EbizTdesignButton, EbizTdesignCard } from '../index.js';
|
135
|
+
</script>
|
136
|
+
|
137
|
+
<style scoped>
|
138
|
+
.space-demo {
|
139
|
+
padding: 20px;
|
140
|
+
}
|
141
|
+
|
142
|
+
.demo-block {
|
143
|
+
margin-bottom: 20px;
|
144
|
+
padding: 16px;
|
145
|
+
border: 1px solid #e0e0e0;
|
146
|
+
border-radius: 4px;
|
147
|
+
}
|
148
|
+
|
149
|
+
.alignment-block {
|
150
|
+
background-color: #e0e6ff;
|
151
|
+
display: flex;
|
152
|
+
align-items: center;
|
153
|
+
justify-content: center;
|
154
|
+
}
|
155
|
+
|
156
|
+
.alignment-block.small {
|
157
|
+
width: 60px;
|
158
|
+
height: 40px;
|
159
|
+
}
|
160
|
+
|
161
|
+
.alignment-block.medium {
|
162
|
+
width: 80px;
|
163
|
+
height: 80px;
|
164
|
+
}
|
165
|
+
|
166
|
+
.alignment-block.large {
|
167
|
+
width: 100px;
|
168
|
+
height: 120px;
|
169
|
+
}
|
170
|
+
|
171
|
+
.alignment-text {
|
172
|
+
display: inline-block;
|
173
|
+
width: 150px;
|
174
|
+
font-weight: 600;
|
175
|
+
}
|
176
|
+
|
177
|
+
h3 {
|
178
|
+
margin-top: 30px;
|
179
|
+
margin-bottom: 10px;
|
180
|
+
}
|
181
|
+
|
182
|
+
h4 {
|
183
|
+
margin-top: 16px;
|
184
|
+
margin-bottom: 8px;
|
185
|
+
}
|
186
|
+
</style>
|