@ebiz/designer-components 0.0.18-tj.1 → 0.0.19-beta.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/dist/designer-components.css +1 -1
- package/dist/index.mjs +66100 -52710
- package/package.json +1 -1
- 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 +249 -0
- package/src/components/EbizEmployeeInfo.vue +139 -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 +107 -41
- package/src/components/EbizStatistic.vue +150 -0
- package/src/components/EbizSwiper.vue +3 -3
- package/src/components/EbizSwitch.vue +86 -0
- package/src/components/EbizTabHeader.vue +6 -10
- 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 +143 -0
- package/src/components/EbizTimePicker.vue +144 -0
- package/src/components/EbizTitle.vue +36 -37
- package/src/components/EbizTree.vue +153 -0
- package/src/components/EbizTreeSelector.vue +418 -0
- package/src/components/TdesignAlert.vue +116 -0
- package/src/components/TdesignCalendar/index.vue +6 -3
- package/src/components/TdesignCol.vue +102 -0
- package/src/components/TdesignDialog.vue +226 -0
- package/src/components/TdesignGrid.vue +56 -0
- package/src/components/TdesignInput.vue +23 -23
- 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 +85 -0
- package/src/main.js +2 -2
- package/src/router/index.js +160 -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/GridDemo.vue +239 -0
- package/src/views/Home.vue +49 -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/TdesignAlert.vue +99 -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,122 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="upload-demo-container">
|
3
|
+
<h2>上传组件示例</h2>
|
4
|
+
|
5
|
+
<div class="demo-section">
|
6
|
+
<h3>基础用法</h3>
|
7
|
+
<EbizUpload
|
8
|
+
:useInternalUpload="true"
|
9
|
+
:auto-upload="true"
|
10
|
+
tips="请选择文件上传"
|
11
|
+
>
|
12
|
+
<template #default>
|
13
|
+
<t-button>点击选择文件</t-button>
|
14
|
+
</template>
|
15
|
+
</EbizUpload>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="demo-section">
|
19
|
+
<h3>拖拽上传</h3>
|
20
|
+
<EbizUpload
|
21
|
+
:useInternalUpload="true"
|
22
|
+
:draggable="true"
|
23
|
+
:auto-upload="true"
|
24
|
+
tips="将文件拖拽到此区域即可上传"
|
25
|
+
/>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="demo-section">
|
29
|
+
<h3>多文件上传</h3>
|
30
|
+
<EbizUpload
|
31
|
+
:useInternalUpload="true"
|
32
|
+
:multiple="true"
|
33
|
+
:auto-upload="true"
|
34
|
+
tips="可选择多个文件上传"
|
35
|
+
/>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="demo-section">
|
39
|
+
<h3>图片上传</h3>
|
40
|
+
<EbizUpload
|
41
|
+
:useInternalUpload="true"
|
42
|
+
theme="image"
|
43
|
+
accept="image/*"
|
44
|
+
:auto-upload="true"
|
45
|
+
tips="请选择图片上传"
|
46
|
+
/>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="demo-section">
|
50
|
+
<h3>手动上传</h3>
|
51
|
+
<EbizUpload
|
52
|
+
:useInternalUpload="true"
|
53
|
+
:auto-upload="false"
|
54
|
+
tips="选择文件后需手动点击上传按钮"
|
55
|
+
/>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="demo-section">
|
59
|
+
<h3>文件大小限制</h3>
|
60
|
+
<EbizUpload
|
61
|
+
:useInternalUpload="true"
|
62
|
+
:size-limit="{ size: 1024, unit: 'KB' }"
|
63
|
+
:auto-upload="true"
|
64
|
+
tips="文件大小不能超过1MB"
|
65
|
+
/>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<div class="demo-section">
|
69
|
+
<h3>自定义上传按钮</h3>
|
70
|
+
<EbizUpload
|
71
|
+
:useInternalUpload="true"
|
72
|
+
:auto-upload="true"
|
73
|
+
theme="custom"
|
74
|
+
>
|
75
|
+
<template #default>
|
76
|
+
<t-button>点击选择文件</t-button>
|
77
|
+
</template>
|
78
|
+
</EbizUpload>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div class="demo-section">
|
82
|
+
<h3>使用外部上传服务</h3>
|
83
|
+
<EbizUpload
|
84
|
+
:useInternalUpload="false"
|
85
|
+
action="https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com/api/upload-demo"
|
86
|
+
:auto-upload="true"
|
87
|
+
tips="使用自定义上传地址"
|
88
|
+
/>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
</template>
|
92
|
+
|
93
|
+
<script>
|
94
|
+
export default {
|
95
|
+
name: 'UploadDemo'
|
96
|
+
};
|
97
|
+
</script>
|
98
|
+
|
99
|
+
<script setup>
|
100
|
+
import { EbizUpload } from '../index.js';
|
101
|
+
import { Button as TButton } from 'tdesign-vue-next';
|
102
|
+
</script>
|
103
|
+
|
104
|
+
<style lang="less" scoped>
|
105
|
+
.upload-demo-container {
|
106
|
+
padding: 20px;
|
107
|
+
|
108
|
+
.demo-section {
|
109
|
+
margin-bottom: 30px;
|
110
|
+
padding: 20px;
|
111
|
+
border: 1px solid #eaeaea;
|
112
|
+
border-radius: 4px;
|
113
|
+
|
114
|
+
h3 {
|
115
|
+
margin-top: 0;
|
116
|
+
margin-bottom: 16px;
|
117
|
+
font-size: 16px;
|
118
|
+
font-weight: 500;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
</style>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="watermark-demo">
|
3
|
+
<h1>水印组件演示</h1>
|
4
|
+
<div class="demo-section">
|
5
|
+
<h2>基础用法</h2>
|
6
|
+
<div class="demo-card">
|
7
|
+
<EbizWatermark :watermarkContent="{ text: 'TDesign 水印示例' }">
|
8
|
+
<div class="content-box">
|
9
|
+
<p>这是被水印覆盖的内容</p>
|
10
|
+
<p>水印会显示在此内容之上</p>
|
11
|
+
</div>
|
12
|
+
</EbizWatermark>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<t-watermark :watermark-content="{ text: '文字水印' }" :y="120" :x="80" :width="120" :height="60">
|
17
|
+
<div style="width: 100%; height: 300px" />
|
18
|
+
</t-watermark>
|
19
|
+
|
20
|
+
<div class="demo-section">
|
21
|
+
<h2>自定义透明度和角度</h2>
|
22
|
+
<div class="demo-card">
|
23
|
+
<EbizWatermark :watermarkContent="{ text: 'TDesign 水印' }" :alpha="0.2" :rotate="0">
|
24
|
+
<div class="content-box">
|
25
|
+
<p>此水印透明度为0.2且角度为0</p>
|
26
|
+
</div>
|
27
|
+
</EbizWatermark>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="demo-section">
|
32
|
+
<h2>自定义间距和大小</h2>
|
33
|
+
<div class="demo-card">
|
34
|
+
<EbizWatermark :watermarkContent="{ text: '自定义水印' }" :width="150" :height="80" :gapX="100" :gapY="100">
|
35
|
+
<div class="content-box">
|
36
|
+
<p>此水印设置了自定义的宽高和间距</p>
|
37
|
+
</div>
|
38
|
+
</EbizWatermark>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="demo-section">
|
43
|
+
<h2>可移动水印</h2>
|
44
|
+
<div class="demo-card">
|
45
|
+
<EbizWatermark :watermarkContent="{ text: '可移动水印' }" :movable="true">
|
46
|
+
<div class="content-box">
|
47
|
+
<p>此水印可以随着页面滚动而移动</p>
|
48
|
+
</div>
|
49
|
+
</EbizWatermark>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</template>
|
54
|
+
|
55
|
+
<script setup>
|
56
|
+
import { EbizWatermark } from '../index.js';
|
57
|
+
import { Watermark as TWatermark } from 'tdesign-vue-next';
|
58
|
+
</script>
|
59
|
+
|
60
|
+
<style scoped>
|
61
|
+
.watermark-demo {
|
62
|
+
padding: 20px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.demo-section {
|
66
|
+
margin-bottom: 30px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.demo-card {
|
70
|
+
border: 1px solid #eee;
|
71
|
+
border-radius: 8px;
|
72
|
+
margin-top: 10px;
|
73
|
+
background-color: #fafafa;
|
74
|
+
overflow: hidden;
|
75
|
+
}
|
76
|
+
|
77
|
+
.content-box {
|
78
|
+
padding: 40px;
|
79
|
+
height: 200px;
|
80
|
+
display: flex;
|
81
|
+
flex-direction: column;
|
82
|
+
justify-content: center;
|
83
|
+
align-items: center;
|
84
|
+
text-align: center;
|
85
|
+
}
|
86
|
+
</style>
|