@timus-networks/theme 1.0.23 → 1.0.24

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.
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <div class="pt-8 pb-16 flex gap-12 flex-col">
3
+ <section>
4
+ <h1>Sizes</h1>
5
+ <p class="p-md-c my-6">
6
+ Avatarlar, resimler, ikonlar veya alfanumerik karakterleri destekler. Avatar'ın şeklini ve boyutunu ayarlamak için `shape` ve `size`
7
+ özelliklerini kullanabilirsiniz. Ayrıca avatarın resim kaynağını belirlemek için `src` özelliğini kullanabilirsiniz. Şekil tipleri
8
+ <b>'circle | square'</b> şeklindedir. Boyutlar ise <b>'xlarge', 'large', 'medium', 'small', 'xsmall'</b> şeklindedir. Veya boyutu manuel
9
+ olarak `size` özelliğini kullanarak belirleyebilirsiniz, örneğin <b>size='50'</b>.
10
+ </p>
11
+ <div class="grid grid-flow-col auto-cols-max gap-4 items-center">
12
+ <el-avatar :size="50">SK</el-avatar>
13
+ <el-avatar :size="size" v-for="size in sizeList" :key="size + ''">SK</el-avatar>
14
+ <el-divider direction="vertical" content-position="center"></el-divider>
15
+ <el-avatar shape="square" :size="50" :src="url"></el-avatar>
16
+ <el-avatar shape="square" :size="size" :src="url" v-for="size in sizeList" :key="size"></el-avatar>
17
+ </div>
18
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
19
+ <p class="text-xs">
20
+ <code>&lt;el-avatar :size="50"&gt;SK&lt;/el-avatar&gt;</code>
21
+ </p>
22
+ </div>
23
+ </section>
24
+
25
+ <section>
26
+ <h1>Types</h1>
27
+ <p class="p-md-c my-6">Resimler, ikonlar veya alfanumerik karakterleri destekler</p>
28
+ <div class="grid grid-flow-col auto-cols-max gap-4 items-center">
29
+ <el-avatar icon="isax-add-circle"></el-avatar>
30
+ <el-avatar icon="isax-add-circle" size="xlarge"></el-avatar>
31
+ <el-avatar :src="url"></el-avatar>
32
+ <el-avatar>SK</el-avatar>
33
+ </div>
34
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
35
+ <p class="text-xs">
36
+ <code>&lt;el-avatar icon="isax-add-circle" size="xlarge"&gt;&lt;/el-avatar&gt;</code>
37
+ </p>
38
+ </div>
39
+ </section>
40
+ </div>
41
+ </template>
42
+
43
+ <script>
44
+ import Vue from 'vue';
45
+
46
+ export default Vue.extend({
47
+ name: 'TimusCascader',
48
+ data() {
49
+ return {
50
+ url: 'https://api.dicebear.com/7.x/adventurer-neutral/svg?seed=Princess',
51
+ sizeList: ['xlarge', 'large', 'medium', 'small', 'xsmall'],
52
+ };
53
+ },
54
+ });
55
+ </script>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="pt-8 pb-16 flex gap-12 flex-col">
3
+ <section>
4
+ <h1>Temel Kullanım</h1>
5
+ <p class="p-md-c my-6">
6
+ Butonlar ve simgeler üzerinde sayı veya durum işareti. Yeni mesajların miktarını görüntüler. Miktar, `Number` veya `String` kabul eden `value`
7
+ ile tanımlanır.
8
+ </p>
9
+ <div class="grid grid-flow-col auto-cols-max gap-4">
10
+ <el-badge :value="12"> <el-button size="small">Yorumlar</el-button> </el-badge>
11
+ <el-badge :value="randomNumber()" :type="item" v-for="(item, key) in colors" :key="key">
12
+ <el-button size="small" :class="randomButtonType()" :type="randomColor()">{{ item }}</el-button>
13
+ </el-badge>
14
+ <el-dropdown trigger="click">
15
+ <span class="el-dropdown-link"> Beni Tıkla<i class="el-icon-caret-bottom el-icon--right"></i> </span>
16
+ <el-dropdown-menu slot="dropdown">
17
+ <el-dropdown-item class="clearfix">
18
+ Yorumlar
19
+ <el-badge class="mark" :value="12" />
20
+ </el-dropdown-item>
21
+ <el-dropdown-item class="clearfix">
22
+ Yanıtlar
23
+ <el-badge class="mark" :value="3" />
24
+ </el-dropdown-item>
25
+ </el-dropdown-menu>
26
+ </el-dropdown>
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>&lt;el-badge :value="12"&gt; &lt;el-button size="small"&gt;Comments&lt;/el-button&gt; &lt;/el-badge&gt;</code>
31
+ </p>
32
+ </div>
33
+ </section>
34
+
35
+ <section>
36
+ <h1>Max Değer</h1>
37
+ <p class="p-md-c my-6">
38
+ Maksimum değer, bir Sayı (Number) olan max özelliği ile belirlenir. Unutmayın ki, bu özellik yalnızca value özelliği de bir Sayı (Number)
39
+ olduğunda çalışır.
40
+ </p>
41
+ <div class="grid grid-flow-col auto-cols-max gap-4">
42
+ <el-badge :value="200" :max="99" class="item">
43
+ <el-button size="small">Yorumlar</el-button>
44
+ </el-badge>
45
+ <el-badge :value="100" :max="10" class="item">
46
+ <el-button size="small">Yanıtlar</el-button>
47
+ </el-badge>
48
+ </div>
49
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
50
+ <p class="text-xs">
51
+ <code>&lt;el-badge :value="12"&gt; &lt;el-button size="small"&gt;Yorumlar&lt;/el-button&gt; &lt;/el-badge&gt;</code>
52
+ </p>
53
+ </div>
54
+ </section>
55
+ </div>
56
+ </template>
57
+
58
+ <script>
59
+ import Vue from 'vue';
60
+
61
+ export default Vue.extend({
62
+ name: 'TimusCascader',
63
+ data() {
64
+ return {
65
+ colors: ['primary', 'secondary', 'gray', 'info', 'success', 'warning', 'danger'],
66
+ };
67
+ },
68
+ methods: {
69
+ handleChange(value) {
70
+ console.log(value);
71
+ },
72
+ },
73
+ methods: {
74
+ randomNumber() {
75
+ return Math.round(Math.random() * 1000);
76
+ },
77
+ randomColor() {
78
+ return this.colors[Math.round(Math.random() * 7)];
79
+ },
80
+ randomButtonType() {
81
+ const type = ['outline'];
82
+ return type[Math.round(Math.random() * 2)];
83
+ },
84
+ },
85
+ });
86
+ </script>
@@ -0,0 +1,337 @@
1
+ <template>
2
+ <div class="pt-8 pb-16 flex gap-12 flex-col">
3
+ <section>
4
+ <h1>Basic usage</h1>
5
+ <p class="p-lg my-6">There are two ways to expand child option items.</p>
6
+ <div class="grid grid-flow-col auto-cols-max gap-4">
7
+ <el-cascader v-model="value" :options="options" @change="handleChange" clearable></el-cascader>
8
+ <el-cascader v-model="value" :options="options" :props="{ expandTrigger: 'hover' }" @change="handleChange"></el-cascader>
9
+ </div>
10
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
11
+ <p class="text-xs">
12
+ <code>&lt;el-cascader v-model="value" :options="options" @change="handleChange"&gt;&lt;/el-cascader&gt;</code>
13
+ </p>
14
+ </div>
15
+ </section>
16
+ <section>
17
+ <h1>Multiple Selection</h1>
18
+ <p class="p-lg my-6">
19
+ Set `props.multiple = true` to use multiple selection. When using multiple selection, all selected tags will display by default, You can set
20
+ `collapse-tags = true` to fold selected tags.
21
+ </p>
22
+ <div class="flex gap-4">
23
+ <el-cascader :options="options" :props="props" clearable></el-cascader>
24
+ <el-cascader :options="options" :props="props" collapse-tags clearable></el-cascader>
25
+ </div>
26
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
27
+ <p class="text-xs">
28
+ <code>&lt;el-cascader v-model="value" :options="options" @change="handleChange"&gt;&lt;/el-cascader&gt;</code>
29
+ </p>
30
+ </div>
31
+ </section>
32
+ <section>
33
+ <h1>Select any level of options</h1>
34
+ <p class="p-lg my-6">
35
+ In single selection, only the leaf nodes can be checked, and in multiple selection, check parent nodes will lead to leaf nodes be checked
36
+ eventually. When enable this feature, it can make parent and child nodes unlinked and you can select any level of options.
37
+ </p>
38
+ <div class="flex gap-4">
39
+ <el-cascader :options="options" :props="{ checkStrictly: true }" clearable></el-cascader>
40
+ <el-cascader :options="options" :props="{ multiple: true, checkStrictly: true }" clearable></el-cascader>
41
+ </div>
42
+ <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
43
+ <p class="text-xs">
44
+ <code>&lt;el-cascader v-model="value" :options="options" @change="handleChange"&gt;&lt;/el-cascader&gt;</code>
45
+ </p>
46
+ </div>
47
+ </section>
48
+ </div>
49
+ </template>
50
+
51
+ <script>
52
+ import Vue from 'vue';
53
+
54
+ export default Vue.extend({
55
+ name: 'TimusCascader',
56
+ data() {
57
+ return {
58
+ props: { multiple: true },
59
+ value: [],
60
+ options: [
61
+ {
62
+ value: 'guide',
63
+ label: 'Guide',
64
+ disabled: true,
65
+ children: [
66
+ {
67
+ value: 'disciplines',
68
+ label: 'Disciplines',
69
+ children: [
70
+ {
71
+ value: 'consistency',
72
+ label: 'Consistency',
73
+ },
74
+ {
75
+ value: 'feedback',
76
+ label: 'Feedback',
77
+ },
78
+ {
79
+ value: 'efficiency',
80
+ label: 'Efficiency',
81
+ },
82
+ {
83
+ value: 'controllability',
84
+ label: 'Controllability',
85
+ },
86
+ ],
87
+ },
88
+ {
89
+ value: 'navigation',
90
+ label: 'Navigation',
91
+ children: [
92
+ {
93
+ value: 'side nav',
94
+ label: 'Side Navigation',
95
+ },
96
+ {
97
+ value: 'top nav',
98
+ label: 'Top Navigation',
99
+ },
100
+ ],
101
+ },
102
+ ],
103
+ },
104
+ {
105
+ value: 'component',
106
+ label: 'Component',
107
+ children: [
108
+ {
109
+ value: 'basic',
110
+ label: 'Basic',
111
+ children: [
112
+ {
113
+ value: 'layout',
114
+ label: 'Layout',
115
+ },
116
+ {
117
+ value: 'color',
118
+ label: 'Color',
119
+ },
120
+ {
121
+ value: 'typography',
122
+ label: 'Typography',
123
+ },
124
+ {
125
+ value: 'icon',
126
+ label: 'Icon',
127
+ },
128
+ {
129
+ value: 'button',
130
+ label: 'Button',
131
+ },
132
+ ],
133
+ },
134
+ {
135
+ value: 'form',
136
+ label: 'Form',
137
+ children: [
138
+ {
139
+ value: 'radio',
140
+ label: 'Radio',
141
+ },
142
+ {
143
+ value: 'checkbox',
144
+ label: 'Checkbox',
145
+ },
146
+ {
147
+ value: 'input',
148
+ label: 'Input',
149
+ },
150
+ {
151
+ value: 'input-number',
152
+ label: 'InputNumber',
153
+ },
154
+ {
155
+ value: 'select',
156
+ label: 'Select',
157
+ },
158
+ {
159
+ value: 'cascader',
160
+ label: 'Cascader',
161
+ },
162
+ {
163
+ value: 'switch',
164
+ label: 'Switch',
165
+ },
166
+ {
167
+ value: 'slider',
168
+ label: 'Slider',
169
+ },
170
+ {
171
+ value: 'time-picker',
172
+ label: 'TimePicker',
173
+ },
174
+ {
175
+ value: 'date-picker',
176
+ label: 'DatePicker',
177
+ },
178
+ {
179
+ value: 'datetime-picker',
180
+ label: 'DateTimePicker',
181
+ },
182
+ {
183
+ value: 'upload',
184
+ label: 'Upload',
185
+ },
186
+ {
187
+ value: 'rate',
188
+ label: 'Rate',
189
+ },
190
+ {
191
+ value: 'form',
192
+ label: 'Form',
193
+ },
194
+ ],
195
+ },
196
+ {
197
+ value: 'data',
198
+ label: 'Data',
199
+ children: [
200
+ {
201
+ value: 'table',
202
+ label: 'Table',
203
+ },
204
+ {
205
+ value: 'tag',
206
+ label: 'Tag',
207
+ },
208
+ {
209
+ value: 'progress',
210
+ label: 'Progress',
211
+ },
212
+ {
213
+ value: 'tree',
214
+ label: 'Tree',
215
+ },
216
+ {
217
+ value: 'pagination',
218
+ label: 'Pagination',
219
+ },
220
+ {
221
+ value: 'badge',
222
+ label: 'Badge',
223
+ },
224
+ ],
225
+ },
226
+ {
227
+ value: 'notice',
228
+ label: 'Notice',
229
+ children: [
230
+ {
231
+ value: 'alert',
232
+ label: 'Alert',
233
+ },
234
+ {
235
+ value: 'loading',
236
+ label: 'Loading',
237
+ },
238
+ {
239
+ value: 'message',
240
+ label: 'Message',
241
+ },
242
+ {
243
+ value: 'message-box',
244
+ label: 'MessageBox',
245
+ },
246
+ {
247
+ value: 'notification',
248
+ label: 'Notification',
249
+ },
250
+ ],
251
+ },
252
+ {
253
+ value: 'navigation',
254
+ label: 'Navigation',
255
+ children: [
256
+ {
257
+ value: 'menu',
258
+ label: 'NavMenu',
259
+ },
260
+ {
261
+ value: 'tabs',
262
+ label: 'Tabs',
263
+ },
264
+ {
265
+ value: 'breadcrumb',
266
+ label: 'Breadcrumb',
267
+ },
268
+ {
269
+ value: 'dropdown',
270
+ label: 'Dropdown',
271
+ },
272
+ {
273
+ value: 'steps',
274
+ label: 'Steps',
275
+ },
276
+ ],
277
+ },
278
+ {
279
+ value: 'others',
280
+ label: 'Others',
281
+ children: [
282
+ {
283
+ value: 'dialog',
284
+ label: 'Dialog',
285
+ },
286
+ {
287
+ value: 'tooltip',
288
+ label: 'Tooltip',
289
+ },
290
+ {
291
+ value: 'popover',
292
+ label: 'Popover',
293
+ },
294
+ {
295
+ value: 'card',
296
+ label: 'Card',
297
+ },
298
+ {
299
+ value: 'carousel',
300
+ label: 'Carousel',
301
+ },
302
+ {
303
+ value: 'collapse',
304
+ label: 'Collapse',
305
+ },
306
+ ],
307
+ },
308
+ ],
309
+ },
310
+ {
311
+ value: 'resource',
312
+ label: 'Resource',
313
+ children: [
314
+ {
315
+ value: 'axure',
316
+ label: 'Axure Components',
317
+ },
318
+ {
319
+ value: 'sketch',
320
+ label: 'Sketch Templates',
321
+ },
322
+ {
323
+ value: 'docs',
324
+ label: 'Design Documentation',
325
+ },
326
+ ],
327
+ },
328
+ ],
329
+ };
330
+ },
331
+ methods: {
332
+ handleChange(value) {
333
+ console.log(value);
334
+ },
335
+ },
336
+ });
337
+ </script>
@@ -1,84 +1,82 @@
1
1
  <template>
2
2
  <div class="pt-8 pb-16 flex gap-12 flex-col">
3
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>
4
+ <h1>Link</h1>
5
+ <p class="p-lg my-6">
6
+ `el-link` bileşeni, sayfadaki metni veya bağlantıyı temsil eder ve stil ve davranışlarını özelleştirmenize olanak tanır.
7
+ </p>
6
8
  <div class="grid grid-flow-col auto-cols-max gap-4">
7
9
  <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>
10
+ <el-link :type="item" v-for="(item, index) in colors" :key="index">{{ item }}</el-link>
14
11
  </div>
15
12
  <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
16
13
  <p class="text-xs">
17
- <code>&lt;el-input placeholder="Please input" v-model="input"&gt;&lt;/el-input&gt;</code>
14
+ <code>&lt;el-link type="primary"&gt;Bağlantı&lt;/el-link&gt;</code>
18
15
  </p>
19
16
  </div>
20
17
  </section>
21
18
 
22
19
  <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>
20
+ <h1>Nuxt Link ile Kullanım</h1>
21
+ <p class="p-lg my-6">El Link bileşenini Nuxt Link ile kullanabilirsiniz. Bu, Nuxt.js projelerinde sayfa geçişlerini kolaylaştırır.</p>
25
22
  <div class="grid grid-flow-col auto-cols-max gap-4">
26
- <NuxtLink to="/"><el-link type="primary">Nuxt Link</el-link></NuxtLink>
23
+ <NuxtLink to="/" v-for="(item, index) in colors" :key="index">
24
+ <el-link :type="item">Router: {{ item }}</el-link>
25
+ </NuxtLink>
27
26
  </div>
28
27
  <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
29
28
  <p class="text-xs">
30
- <code>&lt;el-input placeholder="Please input" v-model="input"&gt;&lt;/el-input&gt;</code>
29
+ <code>&lt;NuxtLink to="/"&gt;&lt;el-link type="primary"&gt;Bağlantı&lt;/el-link&gt;&lt;/NuxtLink&gt;</code>
31
30
  </p>
32
31
  </div>
33
32
  </section>
34
33
 
35
34
  <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>
35
+ <h1>Devre Dışı Bırakılmış Durum</h1>
36
+ <p class="p-lg my-6">El Link bileşenini devre dışı bırakmak için <code>disabled</code> özelliğini kullanabilirsiniz.</p>
38
37
  <div class="grid grid-flow-col auto-cols-max gap-4">
39
38
  <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>
39
+ <el-link :type="item" v-for="(item, index) in colors" :key="index" disabled>{{ item }}</el-link>
45
40
  </div>
46
41
  <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
47
42
  <p class="text-xs">
48
- <code>&lt;el-input placeholder="Please input" v-model="input"&gt;&lt;/el-input&gt;</code>
43
+ <code>&lt;el-link disabled&gt;Devre Dışı&lt;/el-link&gt;</code>
49
44
  </p>
50
45
  </div>
51
46
  </section>
52
47
 
53
48
  <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>
49
+ <h1>Alt Çizgi</h1>
50
+ <p class="p-lg my-6">
51
+ El Link bileşeninin alt çizgisini göstermek veya gizlemek için <code>:underline="false"</code> özelliğini kullanabilirsiniz.
52
+ </p>
56
53
  <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>
54
+ <el-link type="primary" :underline="false">Alt Çizgi Yok</el-link>
55
+ <el-link type="primary">Alt Çizgiyle</el-link>
59
56
  </div>
60
57
  <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
61
58
  <p class="text-xs">
62
- <code>&lt;el-input placeholder="Please input" v-model="input"&gt;&lt;/el-input&gt;</code>
59
+ <code>&lt;el-link :underline="false"&gt;Alt Çizgi Yok&lt;/el-link&gt;</code>
63
60
  </p>
64
61
  </div>
65
62
  </section>
66
63
 
67
64
  <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>
65
+ <h1>İkon</h1>
66
+ <p class="p-lg my-6">El Link bileşeni, metin veya bağlantı ile birlikte ikonlar eklemenize olanak tanır.</p>
70
67
  <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>
68
+ <el-link type="primary" icon="el-icon-edit">Düzenle</el-link>
69
+ <el-link type="primary">Onayla<i class="el-icon-view el-icon--right"></i> </el-link>
73
70
  </div>
74
71
  <div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
75
72
  <p class="text-xs">
76
- <code>&lt;el-input placeholder="Please input" v-model="input"&gt;&lt;/el-input&gt;</code>
73
+ <code>&lt;el-link icon="el-icon-edit"&gt;Düzenle&lt;/el-link&gt;</code>
77
74
  </p>
78
75
  </div>
79
76
  </section>
80
77
  </div>
81
78
  </template>
79
+
82
80
  <script>
83
81
  import Vue from 'vue';
84
82
 
@@ -86,76 +84,8 @@ export default Vue.extend({
86
84
  name: 'TimusButtonSample',
87
85
  data() {
88
86
  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,
87
+ colors: ['primary', 'secondary', 'gray', 'info', 'success', 'warning', 'danger'],
105
88
  };
106
89
  },
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
90
  });
161
91
  </script>