@timus-networks/theme 1.0.21 → 1.0.23
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/components-js/ThemeButtons.vue +2 -2
- package/components-js/ThemeCheckbox.d.ts +2 -0
- package/components-js/ThemeCheckbox.vue +143 -0
- package/components-js/ThemeForm.vue +50 -182
- package/components-js/ThemeInputs.vue +0 -51
- package/components-js/ThemeLink.vue +161 -0
- package/components-js/ThemeRadio.d.ts +2 -0
- package/components-js/ThemeRadio.vue +145 -0
- package/components-js/ThemeSelect.vue +232 -0
- package/components-js/ThemeTable.vue +211 -0
- package/components-js/ThemeTag.vue +142 -0
- package/components-js/ThemeTimePicker.vue +376 -43
- package/components-js/ThemeToggle.vue +122 -0
- package/components-js/ThemeTooltip.vue +189 -0
- package/components-js/TimusSamples.vue +13 -5
- package/components-ts/ThemeButtons.vue +2 -2
- package/components-ts/ThemeCheckbox.vue +146 -0
- package/components-ts/ThemeForm.vue +50 -183
- package/components-ts/ThemeInputs.vue +0 -51
- package/components-ts/ThemeLink.vue +161 -0
- package/components-ts/ThemeRadio.vue +148 -0
- package/components-ts/ThemeSelect.vue +232 -0
- package/components-ts/ThemeTable.vue +211 -0
- package/components-ts/ThemeTag.vue +142 -0
- package/components-ts/ThemeTimePicker.vue +376 -43
- package/components-ts/ThemeToggle.vue +122 -0
- package/components-ts/ThemeTooltip.vue +189 -0
- package/components-ts/TimusSamples.vue +13 -5
- package/index.d.ts +3 -1
- package/output/main.css +1 -1
- package/package.json +1 -1
|
@@ -1,153 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<
|
|
4
|
-
<h1>Checkbox</h1>
|
|
5
|
-
<p class="p-lg my-6">
|
|
6
|
-
Tarih aralığı seçici, kullanıcının bir başlangıç ve bitiş tarihi seçmesine olanak tanır, bu da planlama ve raporlama işlemleri için idealdir.
|
|
7
|
-
</p>
|
|
8
|
-
<el-checkbox-group v-model="checkList" class="mb-6">
|
|
9
|
-
<el-checkbox label="Option A"></el-checkbox>
|
|
10
|
-
<el-checkbox label="Option B"></el-checkbox>
|
|
11
|
-
<el-checkbox label="Option C"></el-checkbox>
|
|
12
|
-
<el-checkbox label="disabled" disabled></el-checkbox>
|
|
13
|
-
<el-checkbox label="selected and disabled" disabled></el-checkbox>
|
|
14
|
-
</el-checkbox-group>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<h1>Form</h1>
|
|
15
4
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<el-
|
|
22
|
-
</el-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<el-checkbox label="Option1" border></el-checkbox>
|
|
26
|
-
<el-checkbox label="Option2" border disabled></el-checkbox>
|
|
27
|
-
</el-checkbox-group>
|
|
28
|
-
|
|
29
|
-
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
5
|
+
<section class="flex gap-8 flex-col">
|
|
6
|
+
<h2>Etiket Konumu: {{ labelPosition }}</h2>
|
|
7
|
+
<el-radio-group v-model="labelPosition" size="small">
|
|
8
|
+
<el-radio-button label="left">Sol</el-radio-button>
|
|
9
|
+
<el-radio-button label="right">Sağ</el-radio-button>
|
|
10
|
+
<el-radio-button label="top">Üst</el-radio-button>
|
|
11
|
+
</el-radio-group>
|
|
12
|
+
<p class="p-lg-c">Form elemanlarının etiketlerinin konumunu belirlemek için kullanılır. Etiketler sol, sağ veya üst tarafında olabilir.</p>
|
|
13
|
+
<div class="p-4 border-l-4 border-info-600 bg-info-100">
|
|
30
14
|
<p class="text-xs">
|
|
31
|
-
<code
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
>
|
|
15
|
+
<code>
|
|
16
|
+
<el-form :model="sizeForm" label-width="120px" label-position="{{ labelPosition }}"><el-form-item label="Title"><el-input
|
|
17
|
+
v-model="form.name"></el-input></el-form-item></el-form>
|
|
18
|
+
</code>
|
|
35
19
|
</p>
|
|
36
20
|
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<el-input v-model="sizeForm.name"></el-input>
|
|
69
|
-
</el-form-item>
|
|
70
|
-
<el-form-item label="Activity zone">
|
|
71
|
-
<el-select v-model="sizeForm.region" placeholder="please select your zone">
|
|
72
|
-
<el-option label="Zone one" value="shanghai"></el-option>
|
|
73
|
-
<el-option label="Zone two" value="beijing"></el-option>
|
|
74
|
-
</el-select>
|
|
75
|
-
</el-form-item>
|
|
76
|
-
<el-form-item label="Activity time">
|
|
77
|
-
<el-col :span="11">
|
|
78
|
-
<el-date-picker type="date" placeholder="Pick a date" v-model="sizeForm.date1" style="width: 100%"></el-date-picker>
|
|
79
|
-
</el-col>
|
|
80
|
-
<el-col class="line" :span="2">-</el-col>
|
|
81
|
-
<el-col :span="11">
|
|
82
|
-
<el-time-picker placeholder="Pick a time" v-model="sizeForm.date2" style="width: 100%"></el-time-picker>
|
|
83
|
-
</el-col>
|
|
84
|
-
</el-form-item>
|
|
85
|
-
<el-form-item label="Activity type">
|
|
86
|
-
<el-checkbox-group v-model="sizeForm.type">
|
|
87
|
-
<el-checkbox-button label="Online activities" name="type"></el-checkbox-button>
|
|
88
|
-
<el-checkbox-button label="Promotion activities" name="type"></el-checkbox-button>
|
|
89
|
-
</el-checkbox-group>
|
|
90
|
-
</el-form-item>
|
|
91
|
-
<el-form-item label="Resources">
|
|
92
|
-
<el-radio-group v-model="sizeForm.resource" size="medium">
|
|
93
|
-
<el-radio border label="Sponsor"></el-radio>
|
|
94
|
-
<el-radio border label="Venue"></el-radio>
|
|
95
|
-
</el-radio-group>
|
|
96
|
-
</el-form-item>
|
|
97
|
-
<el-form-item size="large">
|
|
98
|
-
<el-button type="primary" @click="onSubmit">Create</el-button>
|
|
99
|
-
<el-button>Cancel</el-button>
|
|
100
|
-
</el-form-item>
|
|
101
|
-
</el-form>
|
|
102
|
-
<el-form
|
|
103
|
-
data-testid="pages-login-gczfftvrml"
|
|
104
|
-
:rules="rules"
|
|
105
|
-
ref="form"
|
|
106
|
-
:model="form"
|
|
107
|
-
label-position="left"
|
|
108
|
-
label-width="120px"
|
|
109
|
-
@submit.native.prevent="submit"
|
|
110
|
-
>
|
|
111
|
-
<el-form-item data-testid="pages-login-irbdfwxfbt" :label="$t('login.email')" prop="email">
|
|
112
|
-
<el-input v-model="form.email" :disabled="loading ? 'disabled' : false" data-testid="login-email-input"></el-input>
|
|
113
|
-
</el-form-item>
|
|
114
|
-
<el-form-item data-testid="pages-login-brtpgzfwqb" :label="$t('login.password')" prop="password">
|
|
115
|
-
<el-input
|
|
116
|
-
data-testid="pages-login-niigwirnsa"
|
|
117
|
-
type="password"
|
|
118
|
-
autocomplete="off"
|
|
119
|
-
v-model="form.password"
|
|
120
|
-
:disabled="loading ? 'disabled' : false"
|
|
121
|
-
show-password
|
|
122
|
-
></el-input>
|
|
123
|
-
</el-form-item>
|
|
124
|
-
<el-row data-testid="pages-login-leusdzih">
|
|
125
|
-
<el-col data-testid="pages-login-wakdcwpdgr" :span="12">
|
|
126
|
-
<el-checkbox v-model="form.remember" data-testid="login-remember-me-checkbox">{{ $t('login.remember_me') }}</el-checkbox>
|
|
127
|
-
</el-col>
|
|
128
|
-
<el-col data-testid="pages-login-lngmwepdom" :span="12">
|
|
129
|
-
<nuxt-link to="/forgot-password" data-testid="login-forgot-password">{{ $t('login.forgot_password') }}</nuxt-link>
|
|
130
|
-
</el-col>
|
|
131
|
-
</el-row>
|
|
132
|
-
<div data-testid="pages-login-labwsipjet" style="margin-top: 10px; color: grey; font-size: 12px; text-align: left">
|
|
133
|
-
{{ $t('register.by_register_text') }}
|
|
134
|
-
<b class="agreement_text" @click="showAgreementDialog('privacy_policy')" data-testid="register-terms-of-use">{{
|
|
135
|
-
$t('register.privacy_policy')
|
|
136
|
-
}}</b>
|
|
137
|
-
{{ $t('messages.and') }}
|
|
138
|
-
<b class="agreement_text" @click="showAgreementDialog('terms_of_use')" data-testid="register-terms-of-use">{{
|
|
139
|
-
$config.TP === 'berqnet' ? $t('register.terms_of_use') : $t('register.terms_of_service')
|
|
140
|
-
}}</b>
|
|
141
|
-
{{ $t('register.by_register_text2') }}
|
|
21
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
22
|
+
<el-form ref="form" :model="form" label-width="130px" class="gap-4 flex flex-col" :label-position="labelPosition">
|
|
23
|
+
<el-form-item label="Aktivite Adı">
|
|
24
|
+
<el-input v-model="form.name"></el-input>
|
|
25
|
+
</el-form-item>
|
|
26
|
+
<el-form-item label="Aktivite Bölgesi">
|
|
27
|
+
<el-select v-model="form.region" placeholder="Lütfen bölgenizi seçin" class="w-full">
|
|
28
|
+
<el-option label="Bölge Bir" value="shanghai"></el-option>
|
|
29
|
+
<el-option label="Bölge İki" value="beijing"></el-option>
|
|
30
|
+
</el-select>
|
|
31
|
+
</el-form-item>
|
|
32
|
+
<el-form-item label="Aktivite Zamanı">
|
|
33
|
+
<el-col :span="11">
|
|
34
|
+
<el-date-picker type="date" placeholder="Tarih seçin" v-model="form.date1" style="width: 100%"></el-date-picker>
|
|
35
|
+
</el-col>
|
|
36
|
+
<el-col class="text-center" :span="1">-</el-col>
|
|
37
|
+
<el-col :span="12">
|
|
38
|
+
<el-time-picker placeholder="Saat seçin" v-model="form.date2" style="width: 100%"></el-time-picker>
|
|
39
|
+
</el-col>
|
|
40
|
+
</el-form-item>
|
|
41
|
+
<el-form-item label="Kaynaklar">
|
|
42
|
+
<el-radio-group v-model="form.resource" size="medium" class="flex gap-4">
|
|
43
|
+
<el-radio label="Sponsor"></el-radio>
|
|
44
|
+
<el-radio label="Mekan"></el-radio>
|
|
45
|
+
</el-radio-group>
|
|
46
|
+
</el-form-item>
|
|
47
|
+
<el-form-item>
|
|
48
|
+
<el-button class="outline">İptal Et</el-button>
|
|
49
|
+
<el-button type="primary" @click="onSubmit">Oluştur</el-button>
|
|
50
|
+
</el-form-item>
|
|
51
|
+
</el-form>
|
|
142
52
|
</div>
|
|
143
|
-
|
|
144
|
-
<el-button type="danger" native-type="submit" :loading="loading" data-testid="login-continue">{{ $t('login.continue') }}</el-button>
|
|
145
|
-
<br />
|
|
146
|
-
<el-button @click="$router.push('/register')" type="primary" data-testid="login-create-account" :loading="loading">{{
|
|
147
|
-
$t('login.register')
|
|
148
|
-
}}</el-button>
|
|
149
|
-
</el-form-item>
|
|
150
|
-
</el-form>
|
|
53
|
+
</section>
|
|
151
54
|
</div>
|
|
152
55
|
</template>
|
|
153
56
|
<script lang="ts">
|
|
@@ -157,11 +60,8 @@ const cityOptions = ['Shanghai', 'Beijing', 'Guangzhou', 'Shenzhen'];
|
|
|
157
60
|
export default Vue.extend({
|
|
158
61
|
data() {
|
|
159
62
|
return {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
checkList: ['selected and disabled', 'Option A'],
|
|
163
|
-
time: '',
|
|
164
|
-
sizeForm: {
|
|
63
|
+
labelPosition: 'right',
|
|
64
|
+
form: {
|
|
165
65
|
name: '',
|
|
166
66
|
region: '',
|
|
167
67
|
date1: '',
|
|
@@ -169,37 +69,6 @@ export default Vue.extend({
|
|
|
169
69
|
delivery: false,
|
|
170
70
|
type: [],
|
|
171
71
|
resource: '',
|
|
172
|
-
desc: '',
|
|
173
|
-
},
|
|
174
|
-
loading: false,
|
|
175
|
-
|
|
176
|
-
form: {
|
|
177
|
-
email: '',
|
|
178
|
-
password: '',
|
|
179
|
-
remember: false,
|
|
180
|
-
token: null,
|
|
181
|
-
correlation_id: null,
|
|
182
|
-
action: null,
|
|
183
|
-
platform: 'manager',
|
|
184
|
-
version: '1.0.10',
|
|
185
|
-
},
|
|
186
|
-
rules: {
|
|
187
|
-
email: [
|
|
188
|
-
{
|
|
189
|
-
validator: 'validateEmail',
|
|
190
|
-
trigger: 'submit',
|
|
191
|
-
message: this.$t('messages.please_provide_valid_email'),
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
password: [
|
|
195
|
-
{
|
|
196
|
-
required: true,
|
|
197
|
-
trigger: 'submit',
|
|
198
|
-
message: this.$t('messages.please_fill', {
|
|
199
|
-
field: this.$t('login.password'),
|
|
200
|
-
}),
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
72
|
},
|
|
204
73
|
};
|
|
205
74
|
},
|
|
@@ -207,9 +76,7 @@ export default Vue.extend({
|
|
|
207
76
|
showAgreementDialog(type: string) {
|
|
208
77
|
console.log('agreement: ', type);
|
|
209
78
|
},
|
|
210
|
-
submit() {
|
|
211
|
-
this.$emit('submit', this.form);
|
|
212
|
-
},
|
|
79
|
+
submit() {},
|
|
213
80
|
onSubmit() {
|
|
214
81
|
console.log('submit!');
|
|
215
82
|
},
|
|
@@ -1,56 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
-
<section>
|
|
4
|
-
<h1>Date Range Picker</h1>
|
|
5
|
-
<p class="p-lg my-6">
|
|
6
|
-
Tarih aralığı seçici, kullanıcının bir başlangıç ve bitiş tarihi seçmesine olanak tanır, bu da planlama ve raporlama işlemleri için idealdir.
|
|
7
|
-
</p>
|
|
8
|
-
<el-date-picker
|
|
9
|
-
v-model="input"
|
|
10
|
-
type="daterange"
|
|
11
|
-
align="right"
|
|
12
|
-
start-placeholder="Start Date"
|
|
13
|
-
end-placeholder="End Date"
|
|
14
|
-
default-value="2010-10-01"
|
|
15
|
-
class="danger"
|
|
16
|
-
>
|
|
17
|
-
</el-date-picker>
|
|
18
|
-
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
19
|
-
<p class="text-xs">
|
|
20
|
-
<code
|
|
21
|
-
><el-date-picker v-model="input" type="daterange" align="left" start-placeholder="Start" end-placeholder="End"
|
|
22
|
-
default-value=""></el-date-picker></code
|
|
23
|
-
>
|
|
24
|
-
</p>
|
|
25
|
-
</div>
|
|
26
|
-
</section>
|
|
27
|
-
|
|
28
|
-
<section>
|
|
29
|
-
<h1>Time Select</h1>
|
|
30
|
-
<p class="p-lg my-6">
|
|
31
|
-
Zaman seçici, kullanıcının belirli bir zaman aralığından bir zaman dilimi seçmesine imkan tanır. Bu, randevu veya rezervasyon gibi zaman
|
|
32
|
-
belirli işlemler için kullanışlıdır.
|
|
33
|
-
</p>
|
|
34
|
-
<el-time-select
|
|
35
|
-
v-model="input"
|
|
36
|
-
:picker-options="{
|
|
37
|
-
start: '08:30',
|
|
38
|
-
step: '00:15',
|
|
39
|
-
end: '18:30',
|
|
40
|
-
}"
|
|
41
|
-
placeholder="Select time"
|
|
42
|
-
></el-time-select>
|
|
43
|
-
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
44
|
-
<p class="text-xs">
|
|
45
|
-
Zaman seçimi için:
|
|
46
|
-
<code
|
|
47
|
-
><el-time-select v-model="input" :picker-options="{ start: '08:30', step: '00:15', end: '18:30' }" placeholder="Select
|
|
48
|
-
time"></el-time-select></code
|
|
49
|
-
>
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
</section>
|
|
53
|
-
|
|
54
3
|
<section>
|
|
55
4
|
<h1>Basic</h1>
|
|
56
5
|
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<section>
|
|
4
|
+
<h1>Basic</h1>
|
|
5
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
6
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
7
|
+
<el-link href="https://element.eleme.io" target="_blank">default</el-link>
|
|
8
|
+
<el-link type="primary">primary</el-link>
|
|
9
|
+
<el-link type="secondary">secondary</el-link>
|
|
10
|
+
<el-link type="success">success</el-link>
|
|
11
|
+
<el-link type="warning">warning</el-link>
|
|
12
|
+
<el-link type="danger">danger</el-link>
|
|
13
|
+
<el-link type="info">info</el-link>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
16
|
+
<p class="text-xs">
|
|
17
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</section>
|
|
21
|
+
|
|
22
|
+
<section>
|
|
23
|
+
<h1>With Nuxt Link</h1>
|
|
24
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
25
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
26
|
+
<NuxtLink to="/"><el-link type="primary">Nuxt Link</el-link></NuxtLink>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
29
|
+
<p class="text-xs">
|
|
30
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
34
|
+
|
|
35
|
+
<section>
|
|
36
|
+
<h1>Disabled</h1>
|
|
37
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
38
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
39
|
+
<el-link disabled>default</el-link>
|
|
40
|
+
<el-link type="primary" disabled>primary</el-link>
|
|
41
|
+
<el-link type="success" disabled>success</el-link>
|
|
42
|
+
<el-link type="warning" disabled>warning</el-link>
|
|
43
|
+
<el-link type="danger" disabled>danger</el-link>
|
|
44
|
+
<el-link type="info" disabled>info</el-link>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
47
|
+
<p class="text-xs">
|
|
48
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
49
|
+
</p>
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<section>
|
|
54
|
+
<h1>Underline</h1>
|
|
55
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
56
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
57
|
+
<el-link :underline="false">Without Underline</el-link>
|
|
58
|
+
<el-link>With Underline</el-link>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
61
|
+
<p class="text-xs">
|
|
62
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
<section>
|
|
68
|
+
<h1>Icon</h1>
|
|
69
|
+
<p class="p-lg my-6">Standart metin girişi için temel <code>el-input</code> bileşenini kullanabilirsiniz.</p>
|
|
70
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
71
|
+
<el-link icon="el-icon-edit">Edit</el-link>
|
|
72
|
+
<el-link>Check<i class="el-icon-view el-icon--right"></i> </el-link>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
75
|
+
<p class="text-xs">
|
|
76
|
+
<code><el-input placeholder="Please input" v-model="input"></el-input></code>
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
|
+
</section>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
<script>
|
|
83
|
+
import Vue from 'vue';
|
|
84
|
+
|
|
85
|
+
export default Vue.extend({
|
|
86
|
+
name: 'TimusButtonSample',
|
|
87
|
+
data() {
|
|
88
|
+
return {
|
|
89
|
+
inputNumber: '',
|
|
90
|
+
input: '',
|
|
91
|
+
input1: '',
|
|
92
|
+
input2: '',
|
|
93
|
+
input3: '',
|
|
94
|
+
input4: '',
|
|
95
|
+
select: '',
|
|
96
|
+
links: [],
|
|
97
|
+
state: '',
|
|
98
|
+
state1: '',
|
|
99
|
+
state2: '',
|
|
100
|
+
text: '',
|
|
101
|
+
textarea: '',
|
|
102
|
+
textarea1: '',
|
|
103
|
+
textarea2: '',
|
|
104
|
+
timeout: null,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
computed: {
|
|
108
|
+
gridSize() {
|
|
109
|
+
const grids = {
|
|
110
|
+
5: 'grid-cols-5',
|
|
111
|
+
6: 'grid-cols-6',
|
|
112
|
+
7: 'grid-cols-7',
|
|
113
|
+
8: 'grid-cols-8',
|
|
114
|
+
};
|
|
115
|
+
return grids;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
querySearch(queryString, cb) {
|
|
120
|
+
var links = this.links;
|
|
121
|
+
var results = queryString ? links.filter(this.createFilter(queryString)) : links;
|
|
122
|
+
// call callback function to return suggestions
|
|
123
|
+
cb(results);
|
|
124
|
+
},
|
|
125
|
+
querySearchAsync(queryString, cb) {
|
|
126
|
+
var links = this.links;
|
|
127
|
+
var results = queryString ? links.filter(this.createFilter(queryString)) : links;
|
|
128
|
+
|
|
129
|
+
clearTimeout(this.timeout);
|
|
130
|
+
this.timeout = setTimeout(() => {
|
|
131
|
+
cb(results);
|
|
132
|
+
}, 3000 * Math.random());
|
|
133
|
+
},
|
|
134
|
+
createFilter(queryString) {
|
|
135
|
+
return (link) => {
|
|
136
|
+
return link.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0;
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
loadAll() {
|
|
140
|
+
return [
|
|
141
|
+
{ value: 'vue', link: 'https://github.com/vuejs/vue' },
|
|
142
|
+
{ value: 'element', link: 'https://github.com/ElemeFE/element' },
|
|
143
|
+
{ value: 'cooking', link: 'https://github.com/ElemeFE/cooking' },
|
|
144
|
+
{ value: 'mint-ui', link: 'https://github.com/ElemeFE/mint-ui' },
|
|
145
|
+
{ value: 'vuex', link: 'https://github.com/vuejs/vuex' },
|
|
146
|
+
{ value: 'vue-router', link: 'https://github.com/vuejs/vue-router' },
|
|
147
|
+
{ value: 'babel', link: 'https://github.com/babel/babel' },
|
|
148
|
+
];
|
|
149
|
+
},
|
|
150
|
+
handleSelect(item) {
|
|
151
|
+
console.log(item);
|
|
152
|
+
},
|
|
153
|
+
handleIconClick(ev) {
|
|
154
|
+
console.log(ev);
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
mounted() {
|
|
158
|
+
this.links = this.loadAll();
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
</script>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<h1>Radio</h1>
|
|
4
|
+
|
|
5
|
+
<section>
|
|
6
|
+
<h2>Basic Usage</h2>
|
|
7
|
+
<p class="p-lg-c my-6">Checkbox, iki durum arasında geçiş yapmak için kullanılır. Checkbox için devre dışı bırakılmış durum da mevcuttur.</p>
|
|
8
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
9
|
+
<el-radio v-model="radio" :label="0">Option A</el-radio>
|
|
10
|
+
<el-radio v-model="radio" :label="1">Option B</el-radio>
|
|
11
|
+
<el-radio v-model="radio" :label="2" disabled>Option C</el-radio>
|
|
12
|
+
<el-radio :value="false" disabled>unselected & disabled</el-radio>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
15
|
+
<p class="text-xs">
|
|
16
|
+
<code> <el-checkbox :value="true" disabled>Seçili & Devre Dışı</el-checkbox> </code>
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
20
|
+
|
|
21
|
+
<section>
|
|
22
|
+
<h2>Checkbox group</h2>
|
|
23
|
+
<p class="p-lg-c my-6">
|
|
24
|
+
Checkbox grubu, birden fazla seçeneği bir arada sunarak kullanıcının birden çok seçim yapmasına olanak tanır. Bu grup içerisindeki
|
|
25
|
+
seçeneklerden bazıları devre dışı bırakılabilir veya önceden seçilmiş ve devre dışı bırakılmış olabilir.
|
|
26
|
+
</p>
|
|
27
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
28
|
+
<el-checkbox-group v-model="checkList" class="mb-6">
|
|
29
|
+
<el-checkbox label="Option A"></el-checkbox>
|
|
30
|
+
<el-checkbox label="Option B"></el-checkbox>
|
|
31
|
+
<el-checkbox label="Option C"></el-checkbox>
|
|
32
|
+
<el-checkbox label="disabled" disabled></el-checkbox>
|
|
33
|
+
<el-checkbox label="selected and disabled" disabled></el-checkbox>
|
|
34
|
+
</el-checkbox-group>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
37
|
+
<p class="text-xs">
|
|
38
|
+
<code>
|
|
39
|
+
<el-checkbox-group v-model="checkList"> <el-checkbox label="Seçenek A"></el-checkbox> <el-checkbox label="Seçenek
|
|
40
|
+
B"></el-checkbox> </el-checkbox-group>
|
|
41
|
+
</code>
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</section>
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
<h2>Indeterminate</h2>
|
|
48
|
+
<p class="p-lg-c my-6">
|
|
49
|
+
Belirsiz durum (indeterminate) checkbox, tüm seçeneklerin seçili olup olmadığını belirsiz bırakır. Bu durum, özellikle kullanıcının bir grup
|
|
50
|
+
içerisindeki tüm seçenekleri aynı anda kontrol etmesini sağlamak için kullanışlıdır.
|
|
51
|
+
</p>
|
|
52
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
53
|
+
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">Check all</el-checkbox>
|
|
54
|
+
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
55
|
+
<el-checkbox v-for="city in cities" :label="city" :key="city">{{ city }}</el-checkbox>
|
|
56
|
+
</el-checkbox-group>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="my-4 p-4 border-l-4 border-info-600 bg-info-100">
|
|
59
|
+
<p class="text-xs">
|
|
60
|
+
<code>
|
|
61
|
+
<el-date-picker v-model="input" type="daterange" align="left" start-placeholder="Start" end-placeholder="End"
|
|
62
|
+
default-value=""></el-date-picker>
|
|
63
|
+
</code>
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
</section>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<script lang="ts">
|
|
70
|
+
import Vue from 'vue';
|
|
71
|
+
const cityOptions = ['Shanghai', 'Beijing', 'Guangzhou', 'Shenzhen'];
|
|
72
|
+
|
|
73
|
+
export default Vue.extend({
|
|
74
|
+
data() {
|
|
75
|
+
return {
|
|
76
|
+
checked: true,
|
|
77
|
+
radio: 2,
|
|
78
|
+
checkboxGroup1: ['Shanghai'],
|
|
79
|
+
cities: cityOptions,
|
|
80
|
+
checkList: ['selected and disabled', 'Option A'],
|
|
81
|
+
checkAll: false,
|
|
82
|
+
checkedCities: ['Shanghai', 'Beijing'],
|
|
83
|
+
isIndeterminate: true,
|
|
84
|
+
time: '',
|
|
85
|
+
sizeForm: {
|
|
86
|
+
name: '',
|
|
87
|
+
region: '',
|
|
88
|
+
date1: '',
|
|
89
|
+
date2: '',
|
|
90
|
+
delivery: false,
|
|
91
|
+
type: [],
|
|
92
|
+
resource: '',
|
|
93
|
+
desc: '',
|
|
94
|
+
},
|
|
95
|
+
loading: false,
|
|
96
|
+
|
|
97
|
+
form: {
|
|
98
|
+
email: '',
|
|
99
|
+
password: '',
|
|
100
|
+
remember: false,
|
|
101
|
+
token: null,
|
|
102
|
+
correlation_id: null,
|
|
103
|
+
action: null,
|
|
104
|
+
platform: 'manager',
|
|
105
|
+
version: '1.0.10',
|
|
106
|
+
},
|
|
107
|
+
rules: {
|
|
108
|
+
email: [
|
|
109
|
+
{
|
|
110
|
+
validator: 'validateEmail',
|
|
111
|
+
trigger: 'submit',
|
|
112
|
+
message: this.$t('messages.please_provide_valid_email'),
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
password: [
|
|
116
|
+
{
|
|
117
|
+
required: true,
|
|
118
|
+
trigger: 'submit',
|
|
119
|
+
message: this.$t('messages.please_fill', {
|
|
120
|
+
field: this.$t('login.password'),
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
methods: {
|
|
128
|
+
handleCheckAllChange(val: string) {
|
|
129
|
+
this.checkedCities = val ? cityOptions : [];
|
|
130
|
+
this.isIndeterminate = false;
|
|
131
|
+
},
|
|
132
|
+
handleCheckedCitiesChange(value: string[]) {
|
|
133
|
+
let checkedCount = value.length;
|
|
134
|
+
this.checkAll = checkedCount === this.cities.length;
|
|
135
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
136
|
+
},
|
|
137
|
+
showAgreementDialog(type: string) {
|
|
138
|
+
console.log('agreement: ', type);
|
|
139
|
+
},
|
|
140
|
+
submit() {
|
|
141
|
+
this.$emit('submit', this.form);
|
|
142
|
+
},
|
|
143
|
+
onSubmit() {
|
|
144
|
+
console.log('submit!');
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
</script>
|