@timus-networks/theme 2.0.1 → 2.0.2
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 +34 -49
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +40 -18
- package/dist/runtime/components/development/example.alert.vue +29 -0
- package/dist/runtime/components/development/example.avatar.vue +85 -0
- package/dist/runtime/components/development/example.badge.vue +93 -0
- package/dist/runtime/components/development/example.breadcrumb.vue +54 -0
- package/dist/runtime/components/development/example.button.vue +235 -0
- package/dist/runtime/components/{example.button.vue.d.ts → development/example.button.vue.d.ts} +2 -1
- package/dist/runtime/components/development/example.card.vue +68 -0
- package/dist/runtime/components/development/example.checkbox.vue +176 -0
- package/dist/runtime/components/{example.checkbox.vue.d.ts → development/example.checkbox.vue.d.ts} +2 -2
- package/dist/runtime/components/development/example.collapse.vue +38 -0
- package/dist/runtime/components/development/example.datepicker.vue +193 -0
- package/dist/runtime/components/development/example.description.vue +94 -0
- package/dist/runtime/components/{example.dialog.vue → development/example.dialog.vue} +21 -24
- package/dist/runtime/components/development/example.dropdown.vue +166 -0
- package/dist/runtime/components/development/example.form.vue +488 -0
- package/dist/runtime/components/development/example.input.vue +270 -0
- package/dist/runtime/components/development/example.input.vue.d.ts +23 -0
- package/dist/runtime/components/development/example.link.vue +68 -0
- package/dist/runtime/components/development/example.message.vue +64 -0
- package/dist/runtime/components/development/example.notification.vue +75 -0
- package/dist/runtime/components/development/example.number.vue +70 -0
- package/dist/runtime/components/development/example.pagination.vue +89 -0
- package/dist/runtime/components/development/example.popover.vue +151 -0
- package/dist/runtime/components/development/example.radio.vue +163 -0
- package/dist/runtime/components/{example.radio.vue.d.ts → development/example.radio.vue.d.ts} +3 -2
- package/dist/runtime/components/development/example.select.vue +588 -0
- package/dist/runtime/components/{example.select.vue.d.ts → development/example.select.vue.d.ts} +3 -2
- package/dist/runtime/components/development/example.sidebar.vue +101 -0
- package/dist/runtime/components/development/example.static.vue +50 -0
- package/dist/runtime/components/development/example.switch.vue +101 -0
- package/dist/runtime/components/{example.table.vue → development/example.table.vue} +8 -22
- package/dist/runtime/components/development/example.tag.vue +255 -0
- package/dist/runtime/components/development/example.timepicker.vue +89 -0
- package/dist/runtime/components/development/example.tooltip.vue +104 -0
- package/dist/runtime/components/development/example.upload.vue +84 -0
- package/dist/runtime/components/production/html-encode.vue +96 -0
- package/dist/runtime/components/production/timus-breadcrumb.d.ts +36 -0
- package/dist/runtime/components/production/timus-breadcrumb.js +224 -0
- package/dist/runtime/components/production/timus-breadcrumb.mjs +224 -0
- package/dist/runtime/components/production/timus-breadcrumb.vue +83 -0
- package/dist/runtime/components/production/timus-breadcrumb.vue.d.ts +340 -0
- package/dist/runtime/composables/useBreadcrumb.d.ts +8 -0
- package/dist/runtime/composables/useBreadcrumb.js +53 -0
- package/dist/runtime/composables/useBreadcrumb.mjs +53 -0
- package/dist/runtime/pages/theme.vue +44 -13
- package/dist/runtime/plugins/disable-warnings-plugin.js +18 -0
- package/dist/runtime/plugins/disable-warnings-plugin.mjs +18 -0
- package/dist/runtime/public/scss/element-plus/affix.css +28 -0
- package/dist/runtime/public/scss/element-plus/alert.css +116 -20
- package/dist/runtime/public/scss/element-plus/anchor-link.css +28 -0
- package/dist/runtime/public/scss/element-plus/anchor.css +28 -0
- package/dist/runtime/public/scss/element-plus/aside.css +28 -0
- package/dist/runtime/public/scss/element-plus/autocomplete.css +28 -0
- package/dist/runtime/public/scss/element-plus/avatar.css +60 -10
- package/dist/runtime/public/scss/element-plus/backtop.css +28 -0
- package/dist/runtime/public/scss/element-plus/badge.css +30 -2
- package/dist/runtime/public/scss/element-plus/base.css +31 -3
- package/dist/runtime/public/scss/element-plus/breadcrumb.css +46 -6
- package/dist/runtime/public/scss/element-plus/button-group.css +154 -32
- package/dist/runtime/public/scss/element-plus/button.css +70 -24
- package/dist/runtime/public/scss/element-plus/calendar.css +28 -0
- package/dist/runtime/public/scss/element-plus/card.css +41 -6
- package/dist/runtime/public/scss/element-plus/carousel-item.css +28 -0
- package/dist/runtime/public/scss/element-plus/carousel.css +28 -0
- package/dist/runtime/public/scss/element-plus/cascader-panel.css +28 -0
- package/dist/runtime/public/scss/element-plus/cascader.css +28 -0
- package/dist/runtime/public/scss/element-plus/check-tag.css +28 -0
- package/dist/runtime/public/scss/element-plus/checkbox-button.css +33 -0
- package/dist/runtime/public/scss/element-plus/checkbox-group.css +28 -0
- package/dist/runtime/public/scss/element-plus/checkbox.css +28 -0
- package/dist/runtime/public/scss/element-plus/col.css +28 -0
- package/dist/runtime/public/scss/element-plus/collapse.css +28 -0
- package/dist/runtime/public/scss/element-plus/color-picker.css +28 -0
- package/dist/runtime/public/scss/element-plus/common/popup.css +28 -0
- package/dist/runtime/public/scss/element-plus/common/transition.css +28 -0
- package/dist/runtime/public/scss/element-plus/common/var.css +28 -0
- package/dist/runtime/public/scss/element-plus/container.css +28 -0
- package/dist/runtime/public/scss/element-plus/dark/css-vars.css +28 -0
- package/dist/runtime/public/scss/element-plus/dark/var.css +28 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-picker.css +76 -14
- package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.css +41 -9
- package/dist/runtime/public/scss/element-plus/date-picker/date-table.css +31 -3
- package/dist/runtime/public/scss/element-plus/date-picker/month-table.css +28 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.css +69 -6
- package/dist/runtime/public/scss/element-plus/date-picker/picker.css +28 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-picker.css +56 -16
- package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.css +39 -4
- package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.css +31 -4
- package/dist/runtime/public/scss/element-plus/date-picker/year-table.css +28 -0
- package/dist/runtime/public/scss/element-plus/date-picker.css +134 -50
- package/dist/runtime/public/scss/element-plus/descriptions-item.css +48 -8
- package/dist/runtime/public/scss/element-plus/descriptions.css +78 -16
- package/dist/runtime/public/scss/element-plus/dialog.css +30 -2
- package/dist/runtime/public/scss/element-plus/display.css +28 -0
- package/dist/runtime/public/scss/element-plus/divider.css +28 -0
- package/dist/runtime/public/scss/element-plus/drawer.css +28 -0
- package/dist/runtime/public/scss/element-plus/dropdown.css +43 -12
- package/dist/runtime/public/scss/element-plus/empty.css +28 -0
- package/dist/runtime/public/scss/element-plus/footer.css +28 -0
- package/dist/runtime/public/scss/element-plus/form.css +28 -0
- package/dist/runtime/public/scss/element-plus/header.css +28 -0
- package/dist/runtime/public/scss/element-plus/icon.css +30 -2
- package/dist/runtime/public/scss/element-plus/image-viewer.css +28 -0
- package/dist/runtime/public/scss/element-plus/image.css +28 -0
- package/dist/runtime/public/scss/element-plus/index.css +920 -329
- package/dist/runtime/public/scss/element-plus/input-number.css +50 -6
- package/dist/runtime/public/scss/element-plus/input.css +28 -0
- package/dist/runtime/public/scss/element-plus/link.css +59 -28
- package/dist/runtime/public/scss/element-plus/loading.css +28 -0
- package/dist/runtime/public/scss/element-plus/main.css +28 -0
- package/dist/runtime/public/scss/element-plus/mention.css +28 -0
- package/dist/runtime/public/scss/element-plus/menu.css +28 -0
- package/dist/runtime/public/scss/element-plus/message-box.css +34 -2
- package/dist/runtime/public/scss/element-plus/message.css +161 -31
- package/dist/runtime/public/scss/element-plus/mixins/mixins.css +28 -0
- package/dist/runtime/public/scss/element-plus/notification.css +41 -9
- package/dist/runtime/public/scss/element-plus/option-group.css +28 -0
- package/dist/runtime/public/scss/element-plus/option.css +29 -0
- package/dist/runtime/public/scss/element-plus/overlay.css +28 -0
- package/dist/runtime/public/scss/element-plus/page-header.css +28 -0
- package/dist/runtime/public/scss/element-plus/pagination.css +64 -11
- package/dist/runtime/public/scss/element-plus/popconfirm.css +28 -0
- package/dist/runtime/public/scss/element-plus/popover.css +28 -0
- package/dist/runtime/public/scss/element-plus/popper.css +29 -1
- package/dist/runtime/public/scss/element-plus/progress.css +28 -0
- package/dist/runtime/public/scss/element-plus/radio-button.css +36 -2
- package/dist/runtime/public/scss/element-plus/radio-group.css +28 -0
- package/dist/runtime/public/scss/element-plus/radio.css +28 -0
- package/dist/runtime/public/scss/element-plus/rate.css +28 -0
- package/dist/runtime/public/scss/element-plus/reset.css +28 -0
- package/dist/runtime/public/scss/element-plus/result.css +28 -0
- package/dist/runtime/public/scss/element-plus/row.css +28 -0
- package/dist/runtime/public/scss/element-plus/scrollbar.css +28 -0
- package/dist/runtime/public/scss/element-plus/segmented.css +28 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown-v2.css +28 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown.css +28 -0
- package/dist/runtime/public/scss/element-plus/select-v2.css +48 -23
- package/dist/runtime/public/scss/element-plus/select.css +48 -23
- package/dist/runtime/public/scss/element-plus/skeleton-item.css +28 -0
- package/dist/runtime/public/scss/element-plus/skeleton.css +28 -0
- package/dist/runtime/public/scss/element-plus/slider.css +28 -0
- package/dist/runtime/public/scss/element-plus/space.css +28 -0
- package/dist/runtime/public/scss/element-plus/spinner.css +28 -0
- package/dist/runtime/public/scss/element-plus/statistic.css +28 -0
- package/dist/runtime/public/scss/element-plus/step.css +28 -0
- package/dist/runtime/public/scss/element-plus/steps.css +28 -0
- package/dist/runtime/public/scss/element-plus/switch.css +116 -20
- package/dist/runtime/public/scss/element-plus/table-column.css +29 -1
- package/dist/runtime/public/scss/element-plus/table-v2.css +28 -0
- package/dist/runtime/public/scss/element-plus/table.css +28 -0
- package/dist/runtime/public/scss/element-plus/tabs.css +30 -2
- package/dist/runtime/public/scss/element-plus/tag.css +28 -0
- package/dist/runtime/public/scss/element-plus/text.css +34 -0
- package/dist/runtime/public/scss/element-plus/time-picker.css +111 -30
- package/dist/runtime/public/scss/element-plus/time-select.css +76 -14
- package/dist/runtime/public/scss/element-plus/timeline-item.css +28 -0
- package/dist/runtime/public/scss/element-plus/timeline.css +28 -0
- package/dist/runtime/public/scss/element-plus/tooltip-v2.css +28 -0
- package/dist/runtime/public/scss/element-plus/tour.css +30 -2
- package/dist/runtime/public/scss/element-plus/transfer.css +28 -0
- package/dist/runtime/public/scss/element-plus/tree-select.css +28 -0
- package/dist/runtime/public/scss/element-plus/tree.css +28 -0
- package/dist/runtime/public/scss/element-plus/upload.css +28 -0
- package/dist/runtime/public/scss/element-plus/var.css +29 -1
- package/dist/runtime/public/scss/element-plus/virtual-list.css +28 -0
- package/dist/runtime/public/scss/theme.css +79 -2
- package/dist/runtime/types.d.ts +7 -16
- package/package.json +1 -1
- package/dist/runtime/components/example.button.vue +0 -237
- package/dist/runtime/components/example.checkbox.vue +0 -190
- package/dist/runtime/components/example.form.vue +0 -494
- package/dist/runtime/components/example.input.vue +0 -286
- package/dist/runtime/components/example.input.vue.d.ts +0 -20
- package/dist/runtime/components/example.popover.vue +0 -161
- package/dist/runtime/components/example.radio.vue +0 -165
- package/dist/runtime/components/example.select.vue +0 -591
- package/dist/runtime/components/example.sidebar.vue +0 -104
- package/dist/runtime/components/example.tag.vue +0 -279
- package/dist/runtime/components/html-encode.vue +0 -37
- package/dist/runtime/plugins/element-extend-plugin.d.ts +0 -38
- package/dist/runtime/plugins/element-extend-plugin.js +0 -39
- package/dist/runtime/plugins/element-extend-plugin.mjs +0 -39
- package/dist/runtime/plugins/experimental-size-plugin.js +0 -13
- package/dist/runtime/plugins/experimental-size-plugin.mjs +0 -13
- /package/dist/runtime/plugins/{experimental-size-plugin.d.ts → disable-warnings-plugin.d.ts} +0 -0
- /package/dist/runtime/plugins/{theme-provider.d.ts → theme-provider-plugin.d.ts} +0 -0
- /package/dist/runtime/plugins/{theme-provider.js → theme-provider-plugin.js} +0 -0
- /package/dist/runtime/plugins/{theme-provider.mjs → theme-provider-plugin.mjs} +0 -0
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
-
<h1 class="">Buttons</h1>
|
|
4
|
-
<p>Element Plus Button is a customizable and versatile UI component designed for creating interactive and visually appealing buttons in web applications.</p>
|
|
5
|
-
|
|
6
|
-
<el-card>
|
|
7
|
-
<template #header>
|
|
8
|
-
<div class="flex flex-col gap-3 items-start">
|
|
9
|
-
<h2>Sizes</h2>
|
|
10
|
-
<p>
|
|
11
|
-
Default size is Large. Button component provides {{ sizes.length }} additional sizes for you to choose among different scenarios. Use attribute size to set additional
|
|
12
|
-
sizes <el-text tag="mark">{{ sizes.join(', ') }}</el-text>
|
|
13
|
-
</p>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<div class="flex gap-4">
|
|
17
|
-
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size">{{ capitalize(size) }}</el-button>
|
|
18
|
-
</div>
|
|
19
|
-
<template #footer>
|
|
20
|
-
<code class="flex flex-col gap-3 items-start">
|
|
21
|
-
<el-tag type="neutral"><el-button :size="small">small</el-button></el-tag>
|
|
22
|
-
</code>
|
|
23
|
-
</template>
|
|
24
|
-
</el-card>
|
|
25
|
-
|
|
26
|
-
<el-card>
|
|
27
|
-
<template #header>
|
|
28
|
-
<div class="flex flex-col gap-3 items-start">
|
|
29
|
-
<h2>Rounded</h2>
|
|
30
|
-
<p>
|
|
31
|
-
A rounded button in Element Plus features slightly curved corners, providing a softer and more modern appearance to your UI elements. To apply it add
|
|
32
|
-
<el-text tag="mark">round</el-text> to button
|
|
33
|
-
</p>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
<div class="flex gap-4">
|
|
37
|
-
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" round>{{ capitalize(size) }}</el-button>
|
|
38
|
-
</div>
|
|
39
|
-
<template #footer>
|
|
40
|
-
<code class="flex flex-col gap-3 items-start">
|
|
41
|
-
<el-tag type="neutral"><el-button round>small</el-button></el-tag>
|
|
42
|
-
</code>
|
|
43
|
-
</template>
|
|
44
|
-
</el-card>
|
|
45
|
-
|
|
46
|
-
<el-card>
|
|
47
|
-
<template #header>
|
|
48
|
-
<div class="flex flex-col gap-3 items-start">
|
|
49
|
-
<h2>Colors</h2>
|
|
50
|
-
<p>
|
|
51
|
-
The type prop in Element Plus Button allows you to select from predefined styles such as
|
|
52
|
-
<el-text tag="mark">'primary', 'secondary', 'neutral', 'success', 'warning', 'info', and 'danger'</el-text> to visually distinguish buttons based on their purpose and
|
|
53
|
-
importance within your application.
|
|
54
|
-
</p>
|
|
55
|
-
</div>
|
|
56
|
-
</template>
|
|
57
|
-
<div class="flex gap-4 flex-wrap">
|
|
58
|
-
<el-button v-for="(color, index) of colors" :key="color + index" :type="color">{{ color }}</el-button>
|
|
59
|
-
</div>
|
|
60
|
-
<template #footer>
|
|
61
|
-
<code class="flex flex-col gap-3 items-start">
|
|
62
|
-
<el-tag type="neutral"><el-button :type="success">success</el-button></el-tag>
|
|
63
|
-
</code>
|
|
64
|
-
</template>
|
|
65
|
-
</el-card>
|
|
66
|
-
|
|
67
|
-
<el-card>
|
|
68
|
-
<template #header>
|
|
69
|
-
<div class="flex flex-col gap-3 items-start">
|
|
70
|
-
<h2>Outline / Plain</h2>
|
|
71
|
-
<p>
|
|
72
|
-
The plain prop in Element Plus Button creates a button with a transparent background, offering a subtle and minimalistic look. Add
|
|
73
|
-
<el-text tag="mark">plain</el-text> to the button to make it outlined."
|
|
74
|
-
</p>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
77
|
-
<div class="flex gap-4 flex-wrap">
|
|
78
|
-
<el-button v-for="(color, index) of colors" :key="color + index" :type="color" plain>{{ color }}</el-button>
|
|
79
|
-
</div>
|
|
80
|
-
<template #footer>
|
|
81
|
-
<code class="flex flex-col gap-3 items-start">
|
|
82
|
-
<el-tag type="neutral"><el-button plain>success</el-button></el-tag>
|
|
83
|
-
</code>
|
|
84
|
-
</template>
|
|
85
|
-
</el-card>
|
|
86
|
-
|
|
87
|
-
<el-card>
|
|
88
|
-
<template #header>
|
|
89
|
-
<div class="flex flex-col gap-3 items-start">
|
|
90
|
-
<h2>Ghost / Text</h2>
|
|
91
|
-
<p>
|
|
92
|
-
The plain prop in Element Plus Button creates a button with a transparent background, offering a subtle and minimalistic look. Add <el-text tag="mark">text</el-text>
|
|
93
|
-
to the button to make it ghost."
|
|
94
|
-
</p>
|
|
95
|
-
</div>
|
|
96
|
-
</template>
|
|
97
|
-
<div class="flex gap-4 flex-wrap">
|
|
98
|
-
<el-button v-for="(color, index) of colors" :key="color + index" :type="color" text>{{ color }}</el-button>
|
|
99
|
-
</div>
|
|
100
|
-
<template #footer>
|
|
101
|
-
<code class="flex flex-col gap-3 items-start">
|
|
102
|
-
<el-tag type="neutral"><el-button text>success</el-button></el-tag>
|
|
103
|
-
</code>
|
|
104
|
-
</template>
|
|
105
|
-
</el-card>
|
|
106
|
-
|
|
107
|
-
<el-card>
|
|
108
|
-
<template #header>
|
|
109
|
-
<div class="flex flex-col gap-3 items-start">
|
|
110
|
-
<h2>Disabled</h2>
|
|
111
|
-
<p>
|
|
112
|
-
The <code><el-text tag="mark">disabled</el-text></code> attribute determines if the button is disabled. Use disabled attribute to determine whether a button is
|
|
113
|
-
disabled. It accepts a Boolean value.
|
|
114
|
-
</p>
|
|
115
|
-
</div>
|
|
116
|
-
</template>
|
|
117
|
-
<div class="flex flex-col gap-4">
|
|
118
|
-
<div class="flex gap-4 flex-wrap">
|
|
119
|
-
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" disabled type="primary">{{ capitalize(size) }}</el-button>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="flex gap-4 flex-wrap">
|
|
122
|
-
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" type="primary" disabled plain>{{ capitalize(size) }}</el-button>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="flex gap-4 flex-wrap">
|
|
125
|
-
<el-button v-for="(size, index) of sizes" :key="size + index" :size="size" type="primary" disabled text>{{ capitalize(size) }}</el-button>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
<template #footer>
|
|
129
|
-
<code class="flex flex-col gap-3 items-start">
|
|
130
|
-
<el-tag type="neutral"><el-button :size="small">small</el-button></el-tag>
|
|
131
|
-
</code>
|
|
132
|
-
</template>
|
|
133
|
-
</el-card>
|
|
134
|
-
|
|
135
|
-
<el-card>
|
|
136
|
-
<template #header>
|
|
137
|
-
<div class="flex flex-col gap-3 items-start">
|
|
138
|
-
<h2>Icon Button</h2>
|
|
139
|
-
<p>
|
|
140
|
-
Use <el-text tag="mark">icons</el-text> to add more meaning to Button. You can use icon alone to save some space, or use it with text. Use the icon attribute to add
|
|
141
|
-
icon. You can find the icon list in Element Plus icon component. Adding icons to the right side of the text is achievable with an
|
|
142
|
-
<span class="font-medium"><i ></span> tag. Custom icons can be used as well.
|
|
143
|
-
</p>
|
|
144
|
-
</div>
|
|
145
|
-
</template>
|
|
146
|
-
<div class="flex gap-4">
|
|
147
|
-
<el-button :icon="ElIconEdit" />
|
|
148
|
-
<el-button :icon="ElIconShare" />
|
|
149
|
-
<el-button :icon="ElIconDelete" size="small" type="danger" />
|
|
150
|
-
<el-button :icon="ElIconDelete" size="mini" type="danger" />
|
|
151
|
-
<el-button :icon="ElIconSearch">Search</el-button>
|
|
152
|
-
<el-button class="isax-add-circle">Search</el-button>
|
|
153
|
-
<el-button>
|
|
154
|
-
Upload<el-icon class="el-icon--right"><ElIconUpload /></el-icon>
|
|
155
|
-
</el-button>
|
|
156
|
-
</div>
|
|
157
|
-
<template #footer>
|
|
158
|
-
<code class="flex flex-col gap-3 items-start">
|
|
159
|
-
<el-tag type="neutral"><el-button :icon="ElIconShare" /></el-tag>
|
|
160
|
-
<el-tag type="neutral"> <el-button>Upload<el-icon class="el-icon--right"><ElIconUpload /></el-icon></el-button> </el-tag>
|
|
161
|
-
</code>
|
|
162
|
-
</template>
|
|
163
|
-
</el-card>
|
|
164
|
-
|
|
165
|
-
<el-card>
|
|
166
|
-
<template #header>
|
|
167
|
-
<div class="flex flex-col gap-3 items-start">
|
|
168
|
-
<h2>Button Group</h2>
|
|
169
|
-
<p>
|
|
170
|
-
Displayed as a button group, can be used to group a series of similar operations. Use tag <el-text tag="mark"><el-button-groupn></el-text> to group your buttons.
|
|
171
|
-
</p>
|
|
172
|
-
</div>
|
|
173
|
-
</template>
|
|
174
|
-
<div class="flex gap-4">
|
|
175
|
-
<el-button-group>
|
|
176
|
-
<el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
|
|
177
|
-
<el-button type="primary">
|
|
178
|
-
Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
|
|
179
|
-
</el-button>
|
|
180
|
-
</el-button-group>
|
|
181
|
-
</div>
|
|
182
|
-
<template #footer>
|
|
183
|
-
<html-encode :tag="snippets.group" />
|
|
184
|
-
</template>
|
|
185
|
-
</el-card>
|
|
186
|
-
|
|
187
|
-
<el-card>
|
|
188
|
-
<template #header>
|
|
189
|
-
<div class="flex flex-col gap-3 items-start">
|
|
190
|
-
<h2>Tag</h2>
|
|
191
|
-
<p>You can custom element <el-text tag="mark">tag</el-text>, For example button, div, a, router-link, nuxt-link.</p>
|
|
192
|
-
</div>
|
|
193
|
-
</template>
|
|
194
|
-
<div class="flex gap-4">
|
|
195
|
-
<el-button tag="div" role="button" tabindex="0">div</el-button>
|
|
196
|
-
<el-button type="primary" tag="a" href="https://github.com/element-plus/element-plus" target="_blank" rel="noopener noreferrer"> a </el-button>
|
|
197
|
-
</div>
|
|
198
|
-
<template #footer>
|
|
199
|
-
<code class="flex flex-col gap-3 items-start">
|
|
200
|
-
<el-tag type="neutral"><el-button tag="div" role="button" tabindex="0">div</el-button></el-tag>
|
|
201
|
-
<el-tag type="neutral">
|
|
202
|
-
<el-button type="primary" tag="a" href="https://github.com/element-plus/element-plus" target="_blank" rel="noopener
|
|
203
|
-
noreferrer" > a </el-button>
|
|
204
|
-
</el-tag>
|
|
205
|
-
</code>
|
|
206
|
-
</template>
|
|
207
|
-
</el-card>
|
|
208
|
-
</div>
|
|
209
|
-
</template>
|
|
210
|
-
|
|
211
|
-
<script>
|
|
212
|
-
import { defineComponent } from "vue";
|
|
213
|
-
export default defineComponent({
|
|
214
|
-
name: "TimusButton",
|
|
215
|
-
data() {
|
|
216
|
-
return {
|
|
217
|
-
sizes: ["default", "large", "medium", "small", "mini"],
|
|
218
|
-
colors: ["default", "primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
219
|
-
snippets: {
|
|
220
|
-
group: `
|
|
221
|
-
<el-button-group>
|
|
222
|
-
<el-button type="primary" :icon="ElIconArrowLeft">Previous Page</el-button>
|
|
223
|
-
<el-button type="primary">
|
|
224
|
-
Next Page<el-icon class="el-icon--right"><ElIconArrowRight /></el-icon>
|
|
225
|
-
</el-button>
|
|
226
|
-
</el-button-group>`
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
},
|
|
230
|
-
methods: {
|
|
231
|
-
capitalize(value) {
|
|
232
|
-
const text = String(value);
|
|
233
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
</script>
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
-
<h1 class="">Select</h1>
|
|
4
|
-
<p>When there are plenty of options, use a drop-down menu to display and select desired ones.</p>
|
|
5
|
-
|
|
6
|
-
<el-card>
|
|
7
|
-
<template #header>
|
|
8
|
-
<div class="flex flex-col gap-3 items-start">
|
|
9
|
-
<h2>Sizes</h2>
|
|
10
|
-
<p>
|
|
11
|
-
Default size is Large. Checkbox component provides {{ sizes.length }} additional sizes for you to choose among different scenarios. Use attribute size to set additional
|
|
12
|
-
sizes <el-text tag="mark">{{ sizes.join(', ') }}</el-text>
|
|
13
|
-
</p>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<div class="flex gap-4 items-start">
|
|
17
|
-
<el-checkbox v-for="(size, index) of sizes" :key="index" v-model="value" :label="`${capitalize(size)}`" :size="size" />
|
|
18
|
-
</div>
|
|
19
|
-
<template #footer>
|
|
20
|
-
<html-encode :tag="snippets.sizes" />
|
|
21
|
-
</template>
|
|
22
|
-
</el-card>
|
|
23
|
-
|
|
24
|
-
<el-card>
|
|
25
|
-
<template #header>
|
|
26
|
-
<div class="flex flex-col gap-3 items-start">
|
|
27
|
-
<h2>Disabled</h2>
|
|
28
|
-
<p>Disabled state for checkbox. Set the <el-text tag="mark">disabled</el-text> attribute.</p>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
<div class="flex gap-4 items-start">
|
|
32
|
-
<el-checkbox v-model="value">Not Disabled Default</el-checkbox>
|
|
33
|
-
<el-checkbox v-model="value" disabled>Disabled Default</el-checkbox>
|
|
34
|
-
</div>
|
|
35
|
-
<template #footer>
|
|
36
|
-
<html-encode :tag="snippets.disabled" />
|
|
37
|
-
</template>
|
|
38
|
-
</el-card>
|
|
39
|
-
|
|
40
|
-
<el-card>
|
|
41
|
-
<template #header>
|
|
42
|
-
<div class="flex flex-col gap-3 items-start">
|
|
43
|
-
<h2>Checkbox group</h2>
|
|
44
|
-
<p>
|
|
45
|
-
It is used for multiple checkboxes which are bound in one group, and indicates whether one option is selected by checking if it is checked.
|
|
46
|
-
<el-text tag="mark">checkbox-group</el-text> element can manage multiple checkboxes in one group by using v-model which is bound as an
|
|
47
|
-
<el-text tag="mark">Array</el-text>. Inside the el-checkbox element, value is the value of the checkbox. If no content is nested in that tag, label will be rendered as
|
|
48
|
-
the description following the button of the checkbox. value also corresponds with the element values in the array. It is selected if the specified value exists in the
|
|
49
|
-
array, and vice versa.
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
<div class="flex flex-col gap-4 items-start">
|
|
54
|
-
<el-checkbox-group v-model="checkList" class="flex gap-3">
|
|
55
|
-
<el-checkbox label="Option A" value="Value A" />
|
|
56
|
-
<el-checkbox label="Option B" value="Value B" />
|
|
57
|
-
<el-checkbox label="Option C" value="Value C" />
|
|
58
|
-
<el-checkbox label="disabled" value="Value disabled" disabled />
|
|
59
|
-
<el-checkbox label="selected and disabled" value="Value selected and disabled" disabled />
|
|
60
|
-
</el-checkbox-group>
|
|
61
|
-
Model: {{ checkList }}
|
|
62
|
-
</div>
|
|
63
|
-
<template #footer>
|
|
64
|
-
<html-encode :tag="snippets.group" />
|
|
65
|
-
</template>
|
|
66
|
-
</el-card>
|
|
67
|
-
|
|
68
|
-
<el-card>
|
|
69
|
-
<template #header>
|
|
70
|
-
<div class="flex flex-col gap-3 items-start">
|
|
71
|
-
<h2>Indeterminate</h2>
|
|
72
|
-
<p>The <el-text tag="mark">indeterminate</el-text> property can help you to achieve a 'check all' effect.</p>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
<div class="flex flex-col gap-4 items-start">
|
|
76
|
-
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" disabled @change="handleCheckAllChange"> Check all </el-checkbox>
|
|
77
|
-
<el-checkbox-group v-model="checkedCities" class="flex gap-3" @change="handleCheckedCitiesChange">
|
|
78
|
-
<el-checkbox v-for="city in cities" :key="city" :label="city" :value="city">
|
|
79
|
-
{{ city }}
|
|
80
|
-
</el-checkbox>
|
|
81
|
-
</el-checkbox-group>
|
|
82
|
-
</div>
|
|
83
|
-
<template #footer>
|
|
84
|
-
<html-encode :tag="snippets.indeterminate" />
|
|
85
|
-
</template>
|
|
86
|
-
</el-card>
|
|
87
|
-
|
|
88
|
-
<el-card>
|
|
89
|
-
<template #header>
|
|
90
|
-
<div class="flex flex-col gap-3 items-start">
|
|
91
|
-
<h2>Minimum / Maximum items checked</h2>
|
|
92
|
-
<p>The <el-text tag="mark">min</el-text> and <el-text tag="mark">max</el-text> properties can help you to limit the number of checked items.</p>
|
|
93
|
-
</div>
|
|
94
|
-
</template>
|
|
95
|
-
<div class="flex flex-col gap-4 items-start">
|
|
96
|
-
<el-checkbox-group v-model="checkedCities" :min="1" :max="2" class="gap-3">
|
|
97
|
-
<el-checkbox v-for="city in cities" :key="city" :label="city" :value="city">
|
|
98
|
-
{{ city }}
|
|
99
|
-
</el-checkbox>
|
|
100
|
-
</el-checkbox-group>
|
|
101
|
-
</div>
|
|
102
|
-
<template #footer>
|
|
103
|
-
<html-encode :tag="snippets.indeterminate" />
|
|
104
|
-
</template>
|
|
105
|
-
</el-card>
|
|
106
|
-
|
|
107
|
-
<el-card>
|
|
108
|
-
<template #header>
|
|
109
|
-
<div class="flex flex-col gap-3 items-start">
|
|
110
|
-
<h2>Button style</h2>
|
|
111
|
-
<p>
|
|
112
|
-
Checkbox with button styles. You just need to change el-checkbox element into el-checkbox-button element. We also provide <el-text tag="mark">size</el-text> attribute.
|
|
113
|
-
</p>
|
|
114
|
-
</div>
|
|
115
|
-
</template>
|
|
116
|
-
<div class="flex flex-col gap-4 items-start">
|
|
117
|
-
<el-checkbox-group v-for="(size, index) of sizes" :key="index" v-model="checkedCities" :size="size">
|
|
118
|
-
<el-checkbox-button v-for="(city, i) in cities" :key="city" :value="city" :disabled="[0, 1, 3].includes(i)">
|
|
119
|
-
{{ city }}
|
|
120
|
-
</el-checkbox-button>
|
|
121
|
-
</el-checkbox-group>
|
|
122
|
-
</div>
|
|
123
|
-
<template #footer>
|
|
124
|
-
<html-encode :tag="snippets.indeterminate" />
|
|
125
|
-
</template>
|
|
126
|
-
</el-card>
|
|
127
|
-
|
|
128
|
-
<el-card>
|
|
129
|
-
<template #header>
|
|
130
|
-
<div class="flex flex-col gap-3 items-start">
|
|
131
|
-
<h2>With borders</h2>
|
|
132
|
-
<p>The border attribute adds a border to Checkboxes.</p>
|
|
133
|
-
</div>
|
|
134
|
-
</template>
|
|
135
|
-
<div class="flex flex-col gap-4 items-start">
|
|
136
|
-
<el-checkbox v-for="(size, index) of sizes" :key="index" v-model="value" border :label="`${capitalize(size)}`" :size="size" :disabled="[1, 2, 3].includes(index)" />
|
|
137
|
-
</div>
|
|
138
|
-
<template #footer>
|
|
139
|
-
<html-encode :tag="snippets.indeterminate" />
|
|
140
|
-
</template>
|
|
141
|
-
</el-card>
|
|
142
|
-
</div>
|
|
143
|
-
</template>
|
|
144
|
-
|
|
145
|
-
<script>
|
|
146
|
-
import { defineComponent } from "vue";
|
|
147
|
-
export default defineComponent({
|
|
148
|
-
name: "TimusCheckbox",
|
|
149
|
-
data() {
|
|
150
|
-
return {
|
|
151
|
-
sizes: ["default", "large", "medium", "small", "mini"],
|
|
152
|
-
colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
153
|
-
value: "",
|
|
154
|
-
disabled: true,
|
|
155
|
-
snippets: {
|
|
156
|
-
sizes: `<el-checkbox v-model="value" label="Option label" size="large" />`,
|
|
157
|
-
disabled: `<el-checkbox v-model="value" label="Option label" disabled />`,
|
|
158
|
-
group: `
|
|
159
|
-
<el-checkbox-group v-model="checkList" class="flex gap-3">
|
|
160
|
-
<el-checkbox label="Option A" value="Value A" />
|
|
161
|
-
<el-checkbox label="Option B" value="Value B" />
|
|
162
|
-
</el-checkbox-group>
|
|
163
|
-
`,
|
|
164
|
-
indeterminate: ` <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange"> Check all </el-checkbox> `,
|
|
165
|
-
min_max: ``
|
|
166
|
-
},
|
|
167
|
-
checkAll: false,
|
|
168
|
-
checkList: ["Value selected and disabled", "Value A"],
|
|
169
|
-
isIndeterminate: true,
|
|
170
|
-
checkedCities: ["Shanghai", "Beijing"],
|
|
171
|
-
cities: ["Shanghai", "Beijing", "Guangzhou", "Shenzhen"]
|
|
172
|
-
};
|
|
173
|
-
},
|
|
174
|
-
methods: {
|
|
175
|
-
capitalize(value) {
|
|
176
|
-
const text = String(value);
|
|
177
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
178
|
-
},
|
|
179
|
-
handleCheckedCitiesChange(value) {
|
|
180
|
-
const checkedCount = value.length;
|
|
181
|
-
this.checkAll = checkedCount === this.cities.length;
|
|
182
|
-
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
183
|
-
},
|
|
184
|
-
handleCheckAllChange(val) {
|
|
185
|
-
this.checkedCities = val ? this.cities : [];
|
|
186
|
-
this.isIndeterminate = false;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
</script>
|