-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e46b5c
commit 48f7f8a
Showing
12 changed files
with
495 additions
and
1,459 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,24 @@ export default { | |
}, | ||
data() { | ||
return { | ||
columns: ['Name', 'Email', 'Phone Number'], | ||
sort: true, | ||
columns: [ | ||
'Name', | ||
'Email', | ||
{ | ||
name: 'Phone Number', | ||
sort: { | ||
compare: (a, b) => { | ||
a = parseInt(a.replace(/\(|\)|\s/g, '')) | ||
b = parseInt(b.replace(/\(|\)|\s/g, '')) | ||
let out = 0 | ||
if (a > b) out = 1 | ||
if (a < b) out = -1 | ||
return out | ||
} | ||
} | ||
} | ||
], | ||
rows: [ | ||
['John', '[email protected]', '(353) 01 222 3333'], | ||
['Mark', '[email protected]', '(01) 22 888 4444'] | ||
|
@@ -20,6 +37,6 @@ export default { | |
} | ||
}, | ||
template: ` | ||
<div><grid :columns="columns" :rows="rows" @ready="log('Hi to you too!')"></grid></div> | ||
<div><grid :columns="columns" :rows="rows" ref="helloWorld" @ready="log('Hi to you too!')"></grid></div> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,16 @@ export default { | |
columns: ['Name', 'Email', 'Phone Number'], | ||
sort: true, | ||
search: true, | ||
rows:() => { | ||
rows: () => { | ||
return new Promise(resolve => { | ||
setTimeout(() => | ||
resolve([ | ||
['John', '[email protected]', '(353) 01 222 3333'], | ||
['Mark', '[email protected]', '(01) 22 888 4444'] | ||
]), 2000); | ||
setTimeout( | ||
() => | ||
resolve([ | ||
['John', '[email protected]', '(353) 01 222 3333'], | ||
['Mark', '[email protected]', '(01) 22 888 4444'] | ||
]), | ||
2000 | ||
) | ||
}) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.