@timus-networks/theme 2.0.0 → 2.0.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 +128 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +11 -0
- package/dist/module.d.ts +11 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +159 -0
- package/dist/runtime/components/example.button.vue +237 -0
- package/dist/runtime/components/example.button.vue.d.ts +10 -0
- package/dist/runtime/components/example.checkbox.vue +190 -0
- package/dist/runtime/components/example.checkbox.vue.d.ts +24 -0
- package/dist/runtime/components/example.dialog.vue +82 -0
- package/dist/runtime/components/example.form.vue +494 -0
- package/dist/runtime/components/example.input.vue +286 -0
- package/dist/runtime/components/example.input.vue.d.ts +20 -0
- package/dist/runtime/components/example.popover.vue +161 -0
- package/dist/runtime/components/example.radio.vue +165 -0
- package/dist/runtime/components/example.radio.vue.d.ts +24 -0
- package/dist/runtime/components/example.select.vue +591 -0
- package/dist/runtime/components/example.select.vue.d.ts +69 -0
- package/dist/runtime/components/example.sidebar.vue +104 -0
- package/dist/runtime/components/example.table.vue +126 -0
- package/dist/runtime/components/example.tag.vue +279 -0
- package/dist/runtime/components/html-encode.vue +37 -0
- package/dist/runtime/pages/theme.vue +30 -0
- package/dist/runtime/plugins/element-extend-plugin.d.ts +38 -0
- package/dist/runtime/plugins/element-extend-plugin.js +39 -0
- package/dist/runtime/plugins/element-extend-plugin.mjs +39 -0
- package/dist/runtime/plugins/experimental-size-plugin.d.ts +2 -0
- package/dist/runtime/plugins/experimental-size-plugin.js +13 -0
- package/dist/runtime/plugins/experimental-size-plugin.mjs +13 -0
- package/dist/runtime/plugins/sample-plugin.d.ts +20 -0
- package/dist/runtime/plugins/sample-plugin.js +5 -0
- package/dist/runtime/plugins/sample-plugin.mjs +5 -0
- package/dist/runtime/plugins/theme-provider.d.ts +30 -0
- package/dist/runtime/plugins/theme-provider.js +46 -0
- package/dist/runtime/plugins/theme-provider.mjs +46 -0
- package/dist/runtime/public/scss/element-plus/affix.css +277 -0
- package/dist/runtime/public/scss/element-plus/alert.css +420 -0
- package/dist/runtime/public/scss/element-plus/anchor-link.css +304 -0
- package/dist/runtime/public/scss/element-plus/anchor.css +348 -0
- package/dist/runtime/public/scss/element-plus/aside.css +280 -0
- package/dist/runtime/public/scss/element-plus/autocomplete.css +383 -0
- package/dist/runtime/public/scss/element-plus/avatar.css +320 -0
- package/dist/runtime/public/scss/element-plus/backtop.css +298 -0
- package/dist/runtime/public/scss/element-plus/badge.css +348 -0
- package/dist/runtime/public/scss/element-plus/base.css +522 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/breadcrumb.css +330 -0
- package/dist/runtime/public/scss/element-plus/button-group.css +413 -0
- package/dist/runtime/public/scss/element-plus/button.css +1043 -0
- package/dist/runtime/public/scss/element-plus/calendar.css +342 -0
- package/dist/runtime/public/scss/element-plus/card.css +312 -0
- package/dist/runtime/public/scss/element-plus/carousel-item.css +322 -0
- package/dist/runtime/public/scss/element-plus/carousel.css +447 -0
- package/dist/runtime/public/scss/element-plus/cascader-panel.css +400 -0
- package/dist/runtime/public/scss/element-plus/cascader.css +532 -0
- package/dist/runtime/public/scss/element-plus/check-tag.css +358 -0
- package/dist/runtime/public/scss/element-plus/checkbox-button.css +418 -0
- package/dist/runtime/public/scss/element-plus/checkbox-group.css +279 -0
- package/dist/runtime/public/scss/element-plus/checkbox.css +560 -0
- package/dist/runtime/public/scss/element-plus/col.css +3242 -0
- package/dist/runtime/public/scss/element-plus/collapse-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse-transition.css +0 -0
- package/dist/runtime/public/scss/element-plus/collapse.css +462 -0
- package/dist/runtime/public/scss/element-plus/color/index.css +0 -0
- package/dist/runtime/public/scss/element-plus/color-picker.css +622 -0
- package/dist/runtime/public/scss/element-plus/common/popup.css +310 -0
- package/dist/runtime/public/scss/element-plus/common/transition.css +392 -0
- package/dist/runtime/public/scss/element-plus/common/var.css +274 -0
- package/dist/runtime/public/scss/element-plus/config-provider.css +0 -0
- package/dist/runtime/public/scss/element-plus/container.css +285 -0
- package/dist/runtime/public/scss/element-plus/dark/css-vars.css +325 -0
- package/dist/runtime/public/scss/element-plus/dark/var.css +274 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-picker.css +496 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-range-picker.css +378 -0
- package/dist/runtime/public/scss/element-plus/date-picker/date-table.css +398 -0
- package/dist/runtime/public/scss/element-plus/date-picker/month-table.css +360 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker-panel.css +391 -0
- package/dist/runtime/public/scss/element-plus/date-picker/picker.css +634 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-picker.css +344 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-range-picker.css +303 -0
- package/dist/runtime/public/scss/element-plus/date-picker/time-spinner.css +362 -0
- package/dist/runtime/public/scss/element-plus/date-picker/year-table.css +356 -0
- package/dist/runtime/public/scss/element-plus/date-picker.css +1447 -0
- package/dist/runtime/public/scss/element-plus/descriptions-item.css +307 -0
- package/dist/runtime/public/scss/element-plus/descriptions.css +373 -0
- package/dist/runtime/public/scss/element-plus/dialog.css +484 -0
- package/dist/runtime/public/scss/element-plus/display.css +329 -0
- package/dist/runtime/public/scss/element-plus/divider.css +317 -0
- package/dist/runtime/public/scss/element-plus/drawer.css +391 -0
- package/dist/runtime/public/scss/element-plus/dropdown-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/dropdown.css +464 -0
- package/dist/runtime/public/scss/element-plus/empty.css +327 -0
- package/dist/runtime/public/scss/element-plus/footer.css +282 -0
- package/dist/runtime/public/scss/element-plus/form-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/form.css +499 -0
- package/dist/runtime/public/scss/element-plus/header.css +282 -0
- package/dist/runtime/public/scss/element-plus/icon.css +315 -0
- package/dist/runtime/public/scss/element-plus/image-viewer.css +411 -0
- package/dist/runtime/public/scss/element-plus/image.css +315 -0
- package/dist/runtime/public/scss/element-plus/index.css +16702 -0
- package/dist/runtime/public/scss/element-plus/infinite-scroll.css +0 -0
- package/dist/runtime/public/scss/element-plus/input-number.css +450 -0
- package/dist/runtime/public/scss/element-plus/input.css +742 -0
- package/dist/runtime/public/scss/element-plus/link.css +422 -0
- package/dist/runtime/public/scss/element-plus/loading.css +363 -0
- package/dist/runtime/public/scss/element-plus/main.css +283 -0
- package/dist/runtime/public/scss/element-plus/mention.css +385 -0
- package/dist/runtime/public/scss/element-plus/menu-item-group.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu-item.css +0 -0
- package/dist/runtime/public/scss/element-plus/menu.css +709 -0
- package/dist/runtime/public/scss/element-plus/message-box.css +501 -0
- package/dist/runtime/public/scss/element-plus/message.css +398 -0
- package/dist/runtime/public/scss/element-plus/mixins/config.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/function.css +0 -0
- package/dist/runtime/public/scss/element-plus/mixins/mixins.css +274 -0
- package/dist/runtime/public/scss/element-plus/mixins/utils.css +0 -0
- package/dist/runtime/public/scss/element-plus/notification.css +381 -0
- package/dist/runtime/public/scss/element-plus/option-group.css +303 -0
- package/dist/runtime/public/scss/element-plus/option.css +325 -0
- package/dist/runtime/public/scss/element-plus/overlay.css +289 -0
- package/dist/runtime/public/scss/element-plus/page-header.css +323 -0
- package/dist/runtime/public/scss/element-plus/pagination.css +533 -0
- package/dist/runtime/public/scss/element-plus/popconfirm.css +287 -0
- package/dist/runtime/public/scss/element-plus/popover.css +324 -0
- package/dist/runtime/public/scss/element-plus/popper.css +372 -0
- package/dist/runtime/public/scss/element-plus/progress.css +421 -0
- package/dist/runtime/public/scss/element-plus/radio-button.css +402 -0
- package/dist/runtime/public/scss/element-plus/radio-group.css +280 -0
- package/dist/runtime/public/scss/element-plus/radio.css +533 -0
- package/dist/runtime/public/scss/element-plus/rate.css +356 -0
- package/dist/runtime/public/scss/element-plus/reset.css +371 -0
- package/dist/runtime/public/scss/element-plus/result.css +353 -0
- package/dist/runtime/public/scss/element-plus/row.css +311 -0
- package/dist/runtime/public/scss/element-plus/scrollbar.css +345 -0
- package/dist/runtime/public/scss/element-plus/segmented.css +432 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown-v2.css +323 -0
- package/dist/runtime/public/scss/element-plus/select-dropdown.css +323 -0
- package/dist/runtime/public/scss/element-plus/select-v2.css +740 -0
- package/dist/runtime/public/scss/element-plus/select.css +740 -0
- package/dist/runtime/public/scss/element-plus/skeleton-item.css +344 -0
- package/dist/runtime/public/scss/element-plus/skeleton.css +307 -0
- package/dist/runtime/public/scss/element-plus/slider.css +452 -0
- package/dist/runtime/public/scss/element-plus/space.css +289 -0
- package/dist/runtime/public/scss/element-plus/spinner.css +314 -0
- package/dist/runtime/public/scss/element-plus/statistic.css +308 -0
- package/dist/runtime/public/scss/element-plus/step.css +558 -0
- package/dist/runtime/public/scss/element-plus/steps.css +291 -0
- package/dist/runtime/public/scss/element-plus/sub-menu.css +0 -0
- package/dist/runtime/public/scss/element-plus/switch.css +498 -0
- package/dist/runtime/public/scss/element-plus/tab-pane.css +0 -0
- package/dist/runtime/public/scss/element-plus/table-column.css +354 -0
- package/dist/runtime/public/scss/element-plus/table-v2.css +492 -0
- package/dist/runtime/public/scss/element-plus/table.css +865 -0
- package/dist/runtime/public/scss/element-plus/tabs.css +864 -0
- package/dist/runtime/public/scss/element-plus/tag.css +596 -0
- package/dist/runtime/public/scss/element-plus/text.css +344 -0
- package/dist/runtime/public/scss/element-plus/time-picker.css +942 -0
- package/dist/runtime/public/scss/element-plus/time-select.css +884 -0
- package/dist/runtime/public/scss/element-plus/timeline-item.css +387 -0
- package/dist/runtime/public/scss/element-plus/timeline.css +306 -0
- package/dist/runtime/public/scss/element-plus/tooltip-v2.css +382 -0
- package/dist/runtime/public/scss/element-plus/tooltip.css +0 -0
- package/dist/runtime/public/scss/element-plus/tour.css +433 -0
- package/dist/runtime/public/scss/element-plus/transfer.css +469 -0
- package/dist/runtime/public/scss/element-plus/tree-select.css +297 -0
- package/dist/runtime/public/scss/element-plus/tree.css +510 -0
- package/dist/runtime/public/scss/element-plus/upload.css +834 -0
- package/dist/runtime/public/scss/element-plus/var.css +361 -0
- package/dist/runtime/public/scss/element-plus/virtual-list.css +302 -0
- package/dist/runtime/public/scss/theme.css +1191 -0
- package/dist/runtime/server/tsconfig.json +6 -0
- package/dist/runtime/types.d.ts +40 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +29 -12
- package/components/TimusIcons.vue +0 -54
- package/generate-icon.js +0 -22
- package/module.ts +0 -84
- package/pages/icons.vue +0 -46
- package/plugins/sample-plugin.ts +0 -5
- package/public/isax/fonts/iconsax.svg +0 -927
- package/public/isax/fonts/iconsax.ttf +0 -0
- package/public/isax/fonts/iconsax.woff +0 -0
- package/public/isax/icons.json +0 -899
- package/public/isax/selection.json +0 -1
- package/public/isax/style.css +0 -1
- package/public/isax/style.scss +0 -5435
- package/public/isax/variables.scss +0 -900
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Inputs</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. Input 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-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" :prefix-icon="ElIconSearch" />
|
|
18
|
+
</div>
|
|
19
|
+
<template #footer>
|
|
20
|
+
<code class="flex flex-col gap-3 items-start">
|
|
21
|
+
<html-encode tag="<el-input :size='small' />" />
|
|
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>Disabled</h2>
|
|
30
|
+
<p>
|
|
31
|
+
Disable the Input with the <code><el-text tag="mark">disabled</el-text></code> attribute.
|
|
32
|
+
</p>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
<div class="flex gap-4 items-start">
|
|
36
|
+
<el-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" disabled />
|
|
37
|
+
</div>
|
|
38
|
+
<template #footer>
|
|
39
|
+
<code class="flex flex-col gap-3 items-start">
|
|
40
|
+
<html-encode tag="<el-input disabled />" />
|
|
41
|
+
</code>
|
|
42
|
+
</template>
|
|
43
|
+
</el-card>
|
|
44
|
+
|
|
45
|
+
<el-card>
|
|
46
|
+
<template #header>
|
|
47
|
+
<div class="flex flex-col gap-3 items-start">
|
|
48
|
+
<h2>Clearable</h2>
|
|
49
|
+
<p>Make the Input clearable with the <el-text tag="mark">clearable</el-text> attribute.</p>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
<div class="flex gap-4">
|
|
53
|
+
<el-input v-for="(size, index) of sizes" :key="size + index" v-model="input" placeholder="Please input" :size="size" clearable />
|
|
54
|
+
</div>
|
|
55
|
+
<template #footer>
|
|
56
|
+
<code class="flex flex-col gap-3 items-start">
|
|
57
|
+
<html-encode tag="<el-input clearable />" />
|
|
58
|
+
</code>
|
|
59
|
+
</template>
|
|
60
|
+
</el-card>
|
|
61
|
+
|
|
62
|
+
<el-card>
|
|
63
|
+
<template #header>
|
|
64
|
+
<div class="flex flex-col gap-3 items-start">
|
|
65
|
+
<h2>Formatter</h2>
|
|
66
|
+
<p>Display value within it's situation with <el-text tag="mark">formatter</el-text>, and we usually use <el-text tag="mark">parser</el-text> at the same time.</p>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<div class="flex gap-4 flex-wrap">
|
|
70
|
+
<el-input
|
|
71
|
+
v-model="input"
|
|
72
|
+
style="width: 240px"
|
|
73
|
+
placeholder="Please input"
|
|
74
|
+
:formatter="(value: string) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
|
75
|
+
:parser="(value: string) => value.replace(/\$\s?|(,*)/g, '')"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
<template #footer>
|
|
79
|
+
<code class="flex flex-col gap-3 items-start">
|
|
80
|
+
<html-encode :tag="snippets.formatter" />
|
|
81
|
+
</code>
|
|
82
|
+
</template>
|
|
83
|
+
</el-card>
|
|
84
|
+
|
|
85
|
+
<el-card>
|
|
86
|
+
<template #header>
|
|
87
|
+
<div class="flex flex-col gap-3 items-start">
|
|
88
|
+
<h2>Password box</h2>
|
|
89
|
+
<p>Make a toggle-able password Input with the <el-text tag="mark">show-password</el-text> attribute.</p>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
92
|
+
<div class="flex gap-4 flex-wrap">
|
|
93
|
+
<el-input v-model="input" style="width: 240px" type="password" placeholder="Please input password" show-password />
|
|
94
|
+
</div>
|
|
95
|
+
<template #footer>
|
|
96
|
+
<html-encode :tag="snippets.password" />
|
|
97
|
+
</template>
|
|
98
|
+
</el-card>
|
|
99
|
+
|
|
100
|
+
<el-card>
|
|
101
|
+
<template #header>
|
|
102
|
+
<div class="flex flex-col gap-3 items-start">
|
|
103
|
+
<h2>Input with icon</h2>
|
|
104
|
+
<p>
|
|
105
|
+
Add an icon to indicate input type. To add icons in Input, you can simply use <el-text tag="mark">prefix-icon</el-text> and
|
|
106
|
+
<el-text tag="mark">suffix-icon</el-text> attributes. Also, the <el-text tag="mark">prefix</el-text> and <el-text tag="mark">suffix</el-text> named slots works as well.
|
|
107
|
+
</p>
|
|
108
|
+
</div>
|
|
109
|
+
</template>
|
|
110
|
+
<div class="flex gap-4 flex-wrap">
|
|
111
|
+
<div class="flex gap-4 mb-4 items-start">
|
|
112
|
+
<span>Using attributes</span>
|
|
113
|
+
<el-input v-model="input" style="width: 240px" placeholder="Pick a date" :suffix-icon="ElIconCalendar" />
|
|
114
|
+
<el-input v-model="input" style="width: 240px" placeholder="Type something" :prefix-icon="ElIconSearch" />
|
|
115
|
+
</div>
|
|
116
|
+
<div class="flex gap-4 items-start">
|
|
117
|
+
<span>Using slots</span>
|
|
118
|
+
<el-input v-model="input" style="width: 240px" placeholder="Pick a date">
|
|
119
|
+
<template #suffix>
|
|
120
|
+
<el-icon class="el-input__icon"><calendar /></el-icon>
|
|
121
|
+
</template>
|
|
122
|
+
</el-input>
|
|
123
|
+
<el-input v-model="input" style="width: 240px" placeholder="Type something">
|
|
124
|
+
<template #prefix>
|
|
125
|
+
<el-icon class="el-input__icon"><search /></el-icon>
|
|
126
|
+
</template>
|
|
127
|
+
</el-input>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<template #footer>
|
|
131
|
+
<div class="flex flex-col gap-3">
|
|
132
|
+
<html-encode :tag="snippets.icons.suffix" />
|
|
133
|
+
<html-encode :tag="snippets.icons.slot" />
|
|
134
|
+
</div>
|
|
135
|
+
</template>
|
|
136
|
+
</el-card>
|
|
137
|
+
|
|
138
|
+
<el-card>
|
|
139
|
+
<template #header>
|
|
140
|
+
<div class="flex flex-col gap-3 items-start">
|
|
141
|
+
<h2>Textarea</h2>
|
|
142
|
+
<p>
|
|
143
|
+
Resizable for entering multiple lines of text information. Add attribute <el-text tag="mark">type="textarea"</el-text> to change
|
|
144
|
+
<el-text tag="mark">input</el-text> into native textarea. Control the height by setting the rows prop.
|
|
145
|
+
</p>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
<div class="flex gap-4 flex-wrap">
|
|
149
|
+
<el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />
|
|
150
|
+
</div>
|
|
151
|
+
<template #footer>
|
|
152
|
+
<html-encode :tag="snippets.textarea" />
|
|
153
|
+
</template>
|
|
154
|
+
</el-card>
|
|
155
|
+
|
|
156
|
+
<el-card>
|
|
157
|
+
<template #header>
|
|
158
|
+
<div class="flex flex-col gap-3 items-start">
|
|
159
|
+
<h2>Mixed input</h2>
|
|
160
|
+
<p>
|
|
161
|
+
<el-text tag="mark">Prepend</el-text> or <el-text tag="mark">append</el-text> an element, generally a label or a button. Use <el-text tag="mark">slot</el-text> to
|
|
162
|
+
distribute elements that prepend or append to Input.
|
|
163
|
+
</p>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
<div>
|
|
167
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input">
|
|
168
|
+
<template #prepend>Http://</template>
|
|
169
|
+
</el-input>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="mt-4">
|
|
172
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input">
|
|
173
|
+
<template #append>.com</template>
|
|
174
|
+
</el-input>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="mt-4">
|
|
177
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select">
|
|
178
|
+
<template #prepend>
|
|
179
|
+
<el-select v-model="select" placeholder="Select" style="width: 115px">
|
|
180
|
+
<el-option label="Restaurant" value="1" />
|
|
181
|
+
<el-option label="Order No." value="2" />
|
|
182
|
+
<el-option label="Tel" value="3" />
|
|
183
|
+
</el-select>
|
|
184
|
+
</template>
|
|
185
|
+
<template #append>
|
|
186
|
+
<el-button :icon="ElIconSearch" type="primary" />
|
|
187
|
+
</template>
|
|
188
|
+
</el-input>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="mt-4">
|
|
191
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select">
|
|
192
|
+
<template #prepend>
|
|
193
|
+
<el-button :icon="ElIconSearch" type="primary" />
|
|
194
|
+
</template>
|
|
195
|
+
<template #append>
|
|
196
|
+
<el-select v-model="select" placeholder="Select" style="width: 115px">
|
|
197
|
+
<el-option label="Restaurant" value="1" />
|
|
198
|
+
<el-option label="Order No." value="2" />
|
|
199
|
+
<el-option label="Tel" value="3" />
|
|
200
|
+
</el-select>
|
|
201
|
+
</template>
|
|
202
|
+
</el-input>
|
|
203
|
+
</div>
|
|
204
|
+
<div class="mt-4">
|
|
205
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select" disabled>
|
|
206
|
+
<template #prepend>
|
|
207
|
+
<el-button :icon="ElIconSearch" type="primary" />
|
|
208
|
+
</template>
|
|
209
|
+
<template #append>
|
|
210
|
+
<el-button :icon="ElIconSearch" type="primary">Add</el-button>
|
|
211
|
+
</template>
|
|
212
|
+
</el-input>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="mt-4">
|
|
215
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input" class="input-with-select" disabled>
|
|
216
|
+
<template #prepend>
|
|
217
|
+
<el-button :icon="ElIconSearch" type="primary" />
|
|
218
|
+
</template>
|
|
219
|
+
<template #append>
|
|
220
|
+
<el-select v-model="select" placeholder="Select" style="width: 115px">
|
|
221
|
+
<el-option label="Restaurant" value="1" />
|
|
222
|
+
<el-option label="Order No." value="2" />
|
|
223
|
+
<el-option label="Tel" value="3" />
|
|
224
|
+
</el-select>
|
|
225
|
+
</template>
|
|
226
|
+
</el-input>
|
|
227
|
+
</div>
|
|
228
|
+
<template #footer>
|
|
229
|
+
<html-encode :tag="snippets.mixed" />
|
|
230
|
+
</template>
|
|
231
|
+
</el-card>
|
|
232
|
+
</div>
|
|
233
|
+
</template>
|
|
234
|
+
|
|
235
|
+
<script>
|
|
236
|
+
import { Calendar, Search } from "@element-plus/icons-vue";
|
|
237
|
+
import { defineComponent } from "vue";
|
|
238
|
+
export default defineComponent({
|
|
239
|
+
name: "TimusInput",
|
|
240
|
+
components: { Calendar, Search },
|
|
241
|
+
data() {
|
|
242
|
+
return {
|
|
243
|
+
sizes: ["default", "large", "medium", "small", "mini"],
|
|
244
|
+
colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
245
|
+
input: "",
|
|
246
|
+
textarea: "",
|
|
247
|
+
select: "1",
|
|
248
|
+
snippets: {
|
|
249
|
+
formatter: `<el-input
|
|
250
|
+
v-model="input"
|
|
251
|
+
placeholder="Please input"
|
|
252
|
+
:formatter="(value: string) => \`$ \${value}\`.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')"
|
|
253
|
+
:parser="(value: string) => value.replace(/\\$\\s?|(,*)/g, '')"
|
|
254
|
+
/>`,
|
|
255
|
+
password: `<el-input v-model="input" type="password" placeholder="Please input password" show-password />`,
|
|
256
|
+
icons: {
|
|
257
|
+
suffix: `
|
|
258
|
+
// suffix
|
|
259
|
+
<el-input v-model="input" :suffix-icon="ElIconCalendar" />`,
|
|
260
|
+
slot: `
|
|
261
|
+
// slot
|
|
262
|
+
<el-input v-model="input" style="width: 240px" placeholder="Pick a date">
|
|
263
|
+
<template #suffix>
|
|
264
|
+
<el-icon class="el-input__icon"><calendar /></el-icon>
|
|
265
|
+
</template>
|
|
266
|
+
</el-input>
|
|
267
|
+
`
|
|
268
|
+
},
|
|
269
|
+
textarea: `<el-input v-model="textarea" style="width: 240px" :rows="2" type="textarea" placeholder="Please input" />`,
|
|
270
|
+
mixed: `
|
|
271
|
+
<el-input v-model="input" style="max-width: 600px" placeholder="Please input">
|
|
272
|
+
<template #prepend>Http://</template>
|
|
273
|
+
<template #append><el-button :icon="ElIconSearch" type="primary" /></template>
|
|
274
|
+
</el-input>
|
|
275
|
+
`
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
methods: {
|
|
280
|
+
capitalize(value) {
|
|
281
|
+
const text = String(value);
|
|
282
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {
|
|
2
|
+
sizes: string[];
|
|
3
|
+
colors: string[];
|
|
4
|
+
input: string;
|
|
5
|
+
textarea: string;
|
|
6
|
+
select: string;
|
|
7
|
+
snippets: {
|
|
8
|
+
formatter: string;
|
|
9
|
+
password: string;
|
|
10
|
+
icons: {
|
|
11
|
+
suffix: string;
|
|
12
|
+
slot: string;
|
|
13
|
+
};
|
|
14
|
+
textarea: string;
|
|
15
|
+
mixed: string;
|
|
16
|
+
};
|
|
17
|
+
}, {}, {
|
|
18
|
+
capitalize(value: string): string;
|
|
19
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Popover</h1>
|
|
4
|
+
<p>The Element Plus Popover component provides a customizable tooltip that appears when the user clicks or hovers over an element.</p>
|
|
5
|
+
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header>
|
|
8
|
+
<div class="flex flex-col gap-3 items-start">
|
|
9
|
+
<h2>Usage</h2>
|
|
10
|
+
<p>
|
|
11
|
+
Popover is built with <el-text tag="mark">ElTooltip</el-text>. So for some duplicated attributes, please refer to the documentation of Tooltip. The
|
|
12
|
+
<el-text tag="mark">trigger</el-text> attribute is used to define how popover is triggered: <span class="font-medium">hover, click, focus or contextmenu</span> . If you
|
|
13
|
+
want to manually control it, you can set <el-text tag="mark">:visible</el-text>.
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<div class="flex gap-2">
|
|
18
|
+
<el-popover placement="top-start" title="Title" :width="200" trigger="hover" content="this is content, this is content, this is content">
|
|
19
|
+
<template #reference>
|
|
20
|
+
<el-button class="m-2">Hover to activate</el-button>
|
|
21
|
+
</template>
|
|
22
|
+
</el-popover>
|
|
23
|
+
|
|
24
|
+
<el-popover placement="bottom" title="Title" :width="200" trigger="click" content="this is content, this is content, this is content">
|
|
25
|
+
<template #reference>
|
|
26
|
+
<el-button class="m-2">Click to activate</el-button>
|
|
27
|
+
</template>
|
|
28
|
+
</el-popover>
|
|
29
|
+
|
|
30
|
+
<el-popover ref="popover" placement="right" title="Title" :width="200" trigger="focus" content="this is content, this is content, this is content">
|
|
31
|
+
<template #reference>
|
|
32
|
+
<el-button class="m-2">Focus to activate</el-button>
|
|
33
|
+
</template>
|
|
34
|
+
</el-popover>
|
|
35
|
+
|
|
36
|
+
<el-popover ref="popover" title="Title" :width="200" trigger="contextmenu" content="this is content, this is content, this is content">
|
|
37
|
+
<template #reference>
|
|
38
|
+
<el-button class="m-2">contextmenu to activate</el-button>
|
|
39
|
+
</template>
|
|
40
|
+
</el-popover>
|
|
41
|
+
|
|
42
|
+
<el-popover :visible="visible" placement="bottom" title="Title" :width="200" content="this is content, this is content, this is content">
|
|
43
|
+
<template #reference>
|
|
44
|
+
<el-button class="m-2" @click="visible = !visible"> Manual to activate </el-button>
|
|
45
|
+
</template>
|
|
46
|
+
</el-popover>
|
|
47
|
+
</div>
|
|
48
|
+
<template #footer> <html-encode :tag="snippets.basic" /> </template>
|
|
49
|
+
</el-card>
|
|
50
|
+
|
|
51
|
+
<el-card>
|
|
52
|
+
<template #header>
|
|
53
|
+
<div class="flex flex-col gap-3 items-start">
|
|
54
|
+
<h2>Virtual triggering</h2>
|
|
55
|
+
<p>
|
|
56
|
+
Like Tooltip, Popover can be triggered by virtual elements, if your use case includes separate the triggering element and the content element, you should definitely use
|
|
57
|
+
the mechanism, normally we use <el-text tag="mark">#reference</el-text> to place our triggering element, with <el-text tag="mark">triggering-element</el-text> API you
|
|
58
|
+
can set your triggering element anywhere you like, but notice that the triggering element should be an element that accepts
|
|
59
|
+
<span class="font-medium">mouse and keyboard</span> event.
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
<div class="flex gap-2">
|
|
64
|
+
<el-button ref="buttonRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
65
|
+
|
|
66
|
+
<el-popover ref="popoverRef" :virtual-ref="buttonRef" trigger="click" title="With title" virtual-triggering>
|
|
67
|
+
<span> Some content </span>
|
|
68
|
+
</el-popover>
|
|
69
|
+
</div>
|
|
70
|
+
<template #footer> <html-encode :tag="snippets.reference" /> </template>
|
|
71
|
+
</el-card>
|
|
72
|
+
|
|
73
|
+
<el-card>
|
|
74
|
+
<template #header>
|
|
75
|
+
<div class="flex flex-col gap-3 items-start">
|
|
76
|
+
<h2>Nested operation</h2>
|
|
77
|
+
<p>Of course, you can nest other operations. It's more light-weight than using a dialog.</p>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
<div class="flex gap-2">
|
|
81
|
+
<el-popover :visible="visible" placement="top" :width="360">
|
|
82
|
+
<p>Are you sure to delete this?</p>
|
|
83
|
+
<div class="flex gap-2 justify-end mt-3">
|
|
84
|
+
<el-button size="small" text @click="visible = false">cancel</el-button>
|
|
85
|
+
<el-button size="small" type="primary" @click="visible = false"> confirm </el-button>
|
|
86
|
+
</div>
|
|
87
|
+
<template #reference>
|
|
88
|
+
<el-button @click="visible = true">Delete</el-button>
|
|
89
|
+
</template>
|
|
90
|
+
</el-popover>
|
|
91
|
+
</div>
|
|
92
|
+
<template #footer> <html-encode :tag="snippets.nested" /> </template>
|
|
93
|
+
</el-card>
|
|
94
|
+
|
|
95
|
+
<el-card>
|
|
96
|
+
<template #header>
|
|
97
|
+
<div class="flex flex-col gap-3 items-start">
|
|
98
|
+
<h2>Directive</h2>
|
|
99
|
+
<p>
|
|
100
|
+
You can still using popover in directive way but this is <span class="font-medium">not recommended</span> anymore since this makes your application complicated, you may
|
|
101
|
+
refer to the virtual triggering for more information.
|
|
102
|
+
</p>
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
105
|
+
<div class="flex gap-2">
|
|
106
|
+
<el-button v-popover="popoverRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
107
|
+
|
|
108
|
+
<el-popover ref="popoverRef" trigger="click" title="With title" virtual-triggering persistent>
|
|
109
|
+
<span> Some content </span>
|
|
110
|
+
</el-popover>
|
|
111
|
+
</div>
|
|
112
|
+
<template #footer> <html-encode :tag="snippets.directive" /> </template>
|
|
113
|
+
</el-card>
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script setup lang="ts">
|
|
118
|
+
import { ref, unref } from 'vue';
|
|
119
|
+
|
|
120
|
+
const buttonRef = ref();
|
|
121
|
+
const popoverRef = ref();
|
|
122
|
+
const visible = ref(false);
|
|
123
|
+
const onClickOutside = () => {
|
|
124
|
+
unref(popoverRef).popperRef?.delayHide?.();
|
|
125
|
+
};
|
|
126
|
+
const snippets = {
|
|
127
|
+
basic: `
|
|
128
|
+
<el-popover placement="top-start" title="Title" :width="200" trigger="hover" content="this is content, this is content, this is content">
|
|
129
|
+
<template #reference>
|
|
130
|
+
<el-button class="m-2">Hover to activate</el-button>
|
|
131
|
+
</template>
|
|
132
|
+
</el-popover>
|
|
133
|
+
`,
|
|
134
|
+
reference: `
|
|
135
|
+
<el-button ref="buttonRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
136
|
+
|
|
137
|
+
<el-popover ref="popoverRef" :virtual-ref="buttonRef" trigger="click" title="With title" virtual-triggering>
|
|
138
|
+
<span> Some content </span>
|
|
139
|
+
</el-popover>
|
|
140
|
+
`,
|
|
141
|
+
nested: `
|
|
142
|
+
<el-popover :visible="visible" placement="top" :width="360">
|
|
143
|
+
<p>Are you sure to delete this?</p>
|
|
144
|
+
<div class="flex gap-2 justify-end mt-3">
|
|
145
|
+
<el-button size="small" text @click="visible = false">cancel</el-button>
|
|
146
|
+
<el-button size="small" type="primary" @click="visible = false"> confirm </el-button>
|
|
147
|
+
</div>
|
|
148
|
+
<template #reference>
|
|
149
|
+
<el-button @click="visible = true">Delete</el-button>
|
|
150
|
+
</template>
|
|
151
|
+
</el-popover>
|
|
152
|
+
`,
|
|
153
|
+
directive: `
|
|
154
|
+
<el-button v-popover="popoverRef" v-click-outside="onClickOutside"> Click me </el-button>
|
|
155
|
+
|
|
156
|
+
<el-popover ref="popoverRef" trigger="click" title="With title" virtual-triggering persistent>
|
|
157
|
+
<span> Some content </span>
|
|
158
|
+
</el-popover>
|
|
159
|
+
`,
|
|
160
|
+
};
|
|
161
|
+
</script>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-8 mb-16">
|
|
3
|
+
<h1 class="">Radio</h1>
|
|
4
|
+
<p>Single selection among multiple options.</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
|
+
Radio should not have too many options. Otherwise, use the Select component instead. Creating a radio component is easy, you just need to bind a variable to Radio's
|
|
12
|
+
<el-text tag="mark">v-model</el-text>. It equals to the value of <el-text tag="mark">value</el-text> of the chosen radio. The type of value is
|
|
13
|
+
<span class="font-medium">String, Number or Boolean</span>
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<div class="flex flex-col gap-4 items-start">
|
|
18
|
+
Selected: {{ value }}
|
|
19
|
+
<el-radio-group v-model="value">
|
|
20
|
+
<el-radio v-for="(size, index) of sizes" :key="index" :value="index" :size="size">Option 1</el-radio>
|
|
21
|
+
</el-radio-group>
|
|
22
|
+
</div>
|
|
23
|
+
<template #footer>
|
|
24
|
+
<html-encode :tag="snippets.sizes" />
|
|
25
|
+
</template>
|
|
26
|
+
</el-card>
|
|
27
|
+
|
|
28
|
+
<el-card>
|
|
29
|
+
<template #header>
|
|
30
|
+
<div class="flex flex-col gap-3 items-start">
|
|
31
|
+
<h2>Disabled</h2>
|
|
32
|
+
<p><el-text tag="mark">disabled</el-text> attribute is used to disable the radio. You just need to add the disabled attribute.</p>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
<div class="flex flex-col gap-4 items-start">
|
|
36
|
+
Selected: {{ value }}
|
|
37
|
+
<el-radio-group v-model="value">
|
|
38
|
+
<el-radio disabled :value="1" label="Select above to large" />
|
|
39
|
+
<el-radio disabled :value="2" label="Select medium" />
|
|
40
|
+
</el-radio-group>
|
|
41
|
+
</div>
|
|
42
|
+
<template #footer>
|
|
43
|
+
<html-encode :tag="snippets.disabled" />
|
|
44
|
+
</template>
|
|
45
|
+
</el-card>
|
|
46
|
+
|
|
47
|
+
<el-card>
|
|
48
|
+
<template #header>
|
|
49
|
+
<div class="flex flex-col gap-3 items-start">
|
|
50
|
+
<h2>Radio button group</h2>
|
|
51
|
+
<p>
|
|
52
|
+
Suitable for choosing from some mutually exclusive options. Combine <el-text tag="mark">el-radio-group</el-text> with el-radio to display a radio group. Bind a variable
|
|
53
|
+
with v-model of el-radio-group element and set label value in el-radio. It also provides <el-text tag="mark">change</el-text> event with the current value as its
|
|
54
|
+
parameter.
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
<div class="flex flex-col gap-4 items-start">
|
|
59
|
+
Selected: {{ value }}
|
|
60
|
+
<el-radio-group v-model="value">
|
|
61
|
+
<el-radio :value="1">Option A</el-radio>
|
|
62
|
+
<el-radio :value="2">Option B</el-radio>
|
|
63
|
+
<el-radio :value="3">Option C</el-radio>
|
|
64
|
+
<el-radio :value="4">Option C</el-radio>
|
|
65
|
+
</el-radio-group>
|
|
66
|
+
</div>
|
|
67
|
+
<template #footer>
|
|
68
|
+
<html-encode :tag="snippets.group" />
|
|
69
|
+
</template>
|
|
70
|
+
</el-card>
|
|
71
|
+
|
|
72
|
+
<el-card>
|
|
73
|
+
<template #header>
|
|
74
|
+
<div class="flex flex-col gap-3 items-start">
|
|
75
|
+
<h2>Button style</h2>
|
|
76
|
+
<p>Radio with button styles. You just need to change el-radio element into <el-text tag="mark">el-radio-button</el-text> element. We also provide size attribute.</p>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
<div class="flex flex-col gap-4 items-start">
|
|
80
|
+
Selected: {{ value }}
|
|
81
|
+
<el-radio-group v-model="value">
|
|
82
|
+
<el-radio-button v-for="val of [1, 2, 3, 4]" :key="val" label="New York" :value="val" :disabled="[1, 4].includes(Number(value)) && val === Number(value)" />
|
|
83
|
+
</el-radio-group>
|
|
84
|
+
</div>
|
|
85
|
+
<template #footer>
|
|
86
|
+
<html-encode :tag="snippets.button" />
|
|
87
|
+
</template>
|
|
88
|
+
</el-card>
|
|
89
|
+
|
|
90
|
+
<el-card>
|
|
91
|
+
<template #header>
|
|
92
|
+
<div class="flex flex-col gap-3 items-start">
|
|
93
|
+
<h2>With borders</h2>
|
|
94
|
+
<p>The <el-text tag="mark">border</el-text> attribute adds a border to Radios.</p>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
<div class="flex flex-col gap-4 items-start">
|
|
98
|
+
Selected: {{ value }}
|
|
99
|
+
<el-radio-group v-for="size of sizes" :key="size" v-model="value">
|
|
100
|
+
<el-radio v-for="val of [1, 2]" :key="val" :value="val" :size="size" border :disabled="size === 'large' && val === 2">Option A</el-radio>
|
|
101
|
+
</el-radio-group>
|
|
102
|
+
</div>
|
|
103
|
+
<template #footer>
|
|
104
|
+
<html-encode :tag="snippets.bordered" />
|
|
105
|
+
</template>
|
|
106
|
+
</el-card>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<script>
|
|
111
|
+
import { defineComponent } from "vue";
|
|
112
|
+
export default defineComponent({
|
|
113
|
+
name: "TimusCheckbox",
|
|
114
|
+
data() {
|
|
115
|
+
return {
|
|
116
|
+
sizes: ["default", "large", "medium", "small", "mini"],
|
|
117
|
+
colors: ["primary", "secondary", "neutral", "success", "warning", "info", "danger"],
|
|
118
|
+
value: "",
|
|
119
|
+
disabled: "",
|
|
120
|
+
snippets: {
|
|
121
|
+
sizes: `<el-radio value="value" size="large">Label</el-radio>`,
|
|
122
|
+
disabled: `<el-radio value="value" label="Label" disabled />`,
|
|
123
|
+
group: `
|
|
124
|
+
<el-radio-group v-model="value">
|
|
125
|
+
<el-radio :value="1">Option A</el-radio>
|
|
126
|
+
<el-radio :value="2">Option B</el-radio>
|
|
127
|
+
</el-radio-group>
|
|
128
|
+
`,
|
|
129
|
+
button: `
|
|
130
|
+
<el-radio-group v-model="value">
|
|
131
|
+
<el-radio-button label="New York" value="ny" />
|
|
132
|
+
<el-radio-button label="\u0130stanbul" value="ist" />
|
|
133
|
+
</el-radio-group>
|
|
134
|
+
`,
|
|
135
|
+
bordered: `
|
|
136
|
+
<el-radio-group v-model="value">
|
|
137
|
+
<el-radio :value="1" border>Option A</el-radio>
|
|
138
|
+
<el-radio :value="2" border>Option B</el-radio>
|
|
139
|
+
</el-radio-group>
|
|
140
|
+
`
|
|
141
|
+
},
|
|
142
|
+
checkAll: false,
|
|
143
|
+
checkList: ["Value selected and disabled", "Value A"],
|
|
144
|
+
isIndeterminate: true,
|
|
145
|
+
checkedCities: ["Shanghai", "Beijing"],
|
|
146
|
+
cities: ["Shanghai", "Beijing", "Guangzhou", "Shenzhen"]
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
capitalize(value) {
|
|
151
|
+
const text = String(value);
|
|
152
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
153
|
+
},
|
|
154
|
+
handleCheckedCitiesChange(value) {
|
|
155
|
+
const checkedCount = value.length;
|
|
156
|
+
this.checkAll = checkedCount === this.cities.length;
|
|
157
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
158
|
+
},
|
|
159
|
+
handleCheckAllChange(val) {
|
|
160
|
+
this.checkedCities = val ? this.cities : [];
|
|
161
|
+
this.isIndeterminate = false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CheckboxValueType } from '@timus-networks/element-plus';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {
|
|
3
|
+
sizes: string[];
|
|
4
|
+
colors: string[];
|
|
5
|
+
value: string;
|
|
6
|
+
disabled: string;
|
|
7
|
+
snippets: {
|
|
8
|
+
sizes: string;
|
|
9
|
+
disabled: string;
|
|
10
|
+
group: string;
|
|
11
|
+
button: string;
|
|
12
|
+
bordered: string;
|
|
13
|
+
};
|
|
14
|
+
checkAll: boolean;
|
|
15
|
+
checkList: string[];
|
|
16
|
+
isIndeterminate: boolean;
|
|
17
|
+
checkedCities: string[];
|
|
18
|
+
cities: string[];
|
|
19
|
+
}, {}, {
|
|
20
|
+
capitalize(value: string): string;
|
|
21
|
+
handleCheckedCitiesChange(value: CheckboxValueType[]): void;
|
|
22
|
+
handleCheckAllChange(val: CheckboxValueType): void;
|
|
23
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
24
|
+
export default _default;
|