diff --git a/components/index.js b/components/index.js index c4a39dcf3..73405f7e1 100644 --- a/components/index.js +++ b/components/index.js @@ -11,3 +11,5 @@ export { default as Grid } from './grid' export { default as Rate } from './rate' export { default as ToolTip } from './tooltip' + +export { default as Pagination } from './pagination' diff --git a/components/pagination/KeyCode.js b/components/pagination/KeyCode.js new file mode 100644 index 000000000..ab021ec9b --- /dev/null +++ b/components/pagination/KeyCode.js @@ -0,0 +1,14 @@ +export default { + ZERO: 48, + NINE: 57, + + NUMPAD_ZERO: 96, + NUMPAD_NINE: 105, + + BACKSPACE: 8, + DELETE: 46, + ENTER: 13, + + ARROW_UP: 38, + ARROW_DOWN: 40, +} diff --git a/components/pagination/Pager.vue b/components/pagination/Pager.vue new file mode 100644 index 000000000..d9fc0ca54 --- /dev/null +++ b/components/pagination/Pager.vue @@ -0,0 +1,44 @@ + + diff --git a/components/pagination/demo/pagination.vue b/components/pagination/demo/pagination.vue new file mode 100644 index 000000000..882548b64 --- /dev/null +++ b/components/pagination/demo/pagination.vue @@ -0,0 +1,41 @@ + + diff --git a/components/pagination/index.js b/components/pagination/index.js index e69de29bb..146641219 100644 --- a/components/pagination/index.js +++ b/components/pagination/index.js @@ -0,0 +1,3 @@ +import Pagination from './Pagination' + +export default Pagination diff --git a/components/pagination/locale/ar_EG.js b/components/pagination/locale/ar_EG.js new file mode 100644 index 000000000..3d0e9565e --- /dev/null +++ b/components/pagination/locale/ar_EG.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ الصفحة', + jump_to: 'الذهاب إلى', + jump_to_confirm: 'تأكيد', + page: '', + + // Pagination.jsx + prev_page: 'الصفحة السابقة', + next_page: 'الصفحة التالية', + prev_5: 'خمس صفحات سابقة', + next_5: 'خمس صفحات تالية', + prev_3: 'ثلاث صفحات سابقة', + next_3: 'ثلاث صفحات تالية', +}; diff --git a/components/pagination/locale/bg_BG.js b/components/pagination/locale/bg_BG.js new file mode 100644 index 000000000..866229fb1 --- /dev/null +++ b/components/pagination/locale/bg_BG.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ страница', + jump_to: 'Към', + jump_to_confirm: 'потвърждавам', + page: '', + + // Pagination.jsx + prev_page: 'Предишна страница', + next_page: 'Следваща страница', + prev_5: 'Предишни 5 страници', + next_5: 'Следващи 5 страници', + prev_3: 'Предишни 3 страници', + next_3: 'Следващи 3 страници', +}; diff --git a/components/pagination/locale/ca_ES.js b/components/pagination/locale/ca_ES.js new file mode 100644 index 000000000..49e06f74a --- /dev/null +++ b/components/pagination/locale/ca_ES.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ pàgina', + jump_to: 'Anar a', + jump_to_confirm: 'Confirma', + page: '', + + // Pagination.jsx + prev_page: 'Pàgina prèvia', + next_page: 'Pàgina següent', + prev_5: '5 pàgines prèvies', + next_5: '5 pàgines següents', + prev_3: '3 pàgines prèvies', + next_3: '3 pàgines següents', +}; diff --git a/components/pagination/locale/cs_CZ.js b/components/pagination/locale/cs_CZ.js new file mode 100644 index 000000000..9a45a1466 --- /dev/null +++ b/components/pagination/locale/cs_CZ.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ strana', + jump_to: 'Přejít', + jump_to_confirm: 'potvrdit', + page: '', + + // Pagination.jsx + prev_page: 'Předchozí strana', + next_page: 'Následující strana', + prev_5: 'Předchozích 5 stran', + next_5: 'Následujících 5 stran', + prev_3: 'Předchozí 3 strany', + next_3: 'Následující 3 strany', +}; diff --git a/components/pagination/locale/da_DK.js b/components/pagination/locale/da_DK.js new file mode 100644 index 000000000..277e1efdc --- /dev/null +++ b/components/pagination/locale/da_DK.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ side', + jump_to: 'Gå til', + jump_to_confirm: 'bekræft', + page: '', + + // Pagination.jsx + prev_page: 'Forrige Side', + next_page: 'Næste Side', + prev_5: 'Forrige 5 Sider', + next_5: 'Næste 5 Sider', + prev_3: 'Forrige 3 Sider', + next_3: 'Næste 3 Sider', +}; diff --git a/components/pagination/locale/de_DE.js b/components/pagination/locale/de_DE.js new file mode 100644 index 000000000..e6dd0215b --- /dev/null +++ b/components/pagination/locale/de_DE.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ Seite', + jump_to: 'Gehe zu', + jump_to_confirm: 'bestätigen', + page: '', + + // Pagination.jsx + prev_page: 'Vorherige Seite', + next_page: 'Nächste Seite', + prev_5: '5 Seiten zurück', + next_5: '5 Seiten vor', + prev_3: '3 Seiten zurück', + next_3: '3 Seiten vor', +}; diff --git a/components/pagination/locale/el_GR.js b/components/pagination/locale/el_GR.js new file mode 100644 index 000000000..af0d6ea2e --- /dev/null +++ b/components/pagination/locale/el_GR.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ σελίδα', + jump_to: 'Μετάβαση', + jump_to_confirm: 'επιβεβαιώνω', + page: '', + + // Pagination.jsx + prev_page: 'Προηγούμενη Σελίδα', + next_page: 'Επόμενη Σελίδα', + prev_5: 'Προηγούμενες 5 Σελίδες', + next_5: 'Επόμενες 5 σελίδες', + prev_3: 'Προηγούμενες 3 Σελίδες', + next_3: 'Επόμενες 3 Σελίδες', +}; diff --git a/components/pagination/locale/en_GB.js b/components/pagination/locale/en_GB.js new file mode 100644 index 000000000..f603e5e5a --- /dev/null +++ b/components/pagination/locale/en_GB.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ page', + jump_to: 'Goto', + jump_to_confirm: 'confirm', + page: '', + + // Pagination.jsx + prev_page: 'Previous Page', + next_page: 'Next Page', + prev_5: 'Previous 5 Pages', + next_5: 'Next 5 Pages', + prev_3: 'Previous 3 Pages', + next_3: 'Next 3 Pages', +}; diff --git a/components/pagination/locale/en_US.js b/components/pagination/locale/en_US.js new file mode 100644 index 000000000..f603e5e5a --- /dev/null +++ b/components/pagination/locale/en_US.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ page', + jump_to: 'Goto', + jump_to_confirm: 'confirm', + page: '', + + // Pagination.jsx + prev_page: 'Previous Page', + next_page: 'Next Page', + prev_5: 'Previous 5 Pages', + next_5: 'Next 5 Pages', + prev_3: 'Previous 3 Pages', + next_3: 'Next 3 Pages', +}; diff --git a/components/pagination/locale/es_ES.js b/components/pagination/locale/es_ES.js new file mode 100644 index 000000000..595f21976 --- /dev/null +++ b/components/pagination/locale/es_ES.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ página', + jump_to: 'Ir a', + jump_to_confirm: 'confirmar', + page: '', + + // Pagination.jsx + prev_page: 'Página anterior', + next_page: 'Página siguiente', + prev_5: '5 páginas previas', + next_5: '5 páginas siguientes', + prev_3: '3 páginas previas', + next_3: '3 páginas siguientes', +}; diff --git a/components/pagination/locale/et_EE.js b/components/pagination/locale/et_EE.js new file mode 100644 index 000000000..f65740415 --- /dev/null +++ b/components/pagination/locale/et_EE.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ leheküljel', + jump_to: 'Hüppa', + jump_to_confirm: 'Kinnitage', + page: '', + + // Pagination.jsx + prev_page: 'Eelmine leht', + next_page: 'Järgmine leht', + prev_5: 'Eelmised 5 lehekülge', + next_5: 'Järgmised 5 lehekülge', + prev_3: 'Eelmised 3 lehekülge', + next_3: 'Järgmised 3 lehekülge', +}; diff --git a/components/pagination/locale/fa_IR.js b/components/pagination/locale/fa_IR.js new file mode 100644 index 000000000..65409601d --- /dev/null +++ b/components/pagination/locale/fa_IR.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ صفحه', + jump_to: 'برو به', + jump_to_confirm: 'تایید', + page: '', + + // Pagination.jsx + prev_page: 'صفحه قبلی', + next_page: 'صفحه بعدی', + prev_5: '۵ صفحه قبلی', + next_5: '۵ صفحه بعدی', + prev_3: '۳ صفحه قبلی', + next_3: '۳ صفحه بعدی', +}; diff --git a/components/pagination/locale/fi_FI.js b/components/pagination/locale/fi_FI.js new file mode 100644 index 000000000..40305d084 --- /dev/null +++ b/components/pagination/locale/fi_FI.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ sivu', + jump_to: 'Mene', + jump_to_confirm: 'Potvrdite', + page: '', + + // Pagination.jsx + prev_page: 'Edellinen sivu', + next_page: 'Seuraava sivu', + prev_5: 'Edelliset 5 sivua', + next_5: 'Seuraavat 5 sivua', + prev_3: 'Edelliset 3 sivua', + next_3: 'Seuraavat 3 sivua', +}; diff --git a/components/pagination/locale/fr_BE.js b/components/pagination/locale/fr_BE.js new file mode 100644 index 000000000..e71070622 --- /dev/null +++ b/components/pagination/locale/fr_BE.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ page', + jump_to: 'Aller à', + jump_to_confirm: 'confirmer', + page: '', + + // Pagination.jsx + prev_page: 'Page précédente', + next_page: 'Page suivante', + prev_5: '5 Pages précédentes', + next_5: '5 Pages suivantes', + prev_3: '3 Pages précédentes', + next_3: '3 Pages suivantes', +}; diff --git a/components/pagination/locale/fr_FR.js b/components/pagination/locale/fr_FR.js new file mode 100644 index 000000000..e71070622 --- /dev/null +++ b/components/pagination/locale/fr_FR.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ page', + jump_to: 'Aller à', + jump_to_confirm: 'confirmer', + page: '', + + // Pagination.jsx + prev_page: 'Page précédente', + next_page: 'Page suivante', + prev_5: '5 Pages précédentes', + next_5: '5 Pages suivantes', + prev_3: '3 Pages précédentes', + next_3: '3 Pages suivantes', +}; diff --git a/components/pagination/locale/is_IS.js b/components/pagination/locale/is_IS.js new file mode 100644 index 000000000..962c35a9a --- /dev/null +++ b/components/pagination/locale/is_IS.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ síðu', + jump_to: 'Síða', + jump_to_confirm: 'staðfest', + page: '', + + // Pagination.jsx + prev_page: 'Fyrri síða', + next_page: 'Næsta síða', + prev_5: 'Til baka 5 síður', + next_5: 'Áfram 5 síður', + prev_3: 'Til baka 3 síður', + next_3: 'Áfram 3 síður', +}; diff --git a/components/pagination/locale/it_IT.js b/components/pagination/locale/it_IT.js new file mode 100644 index 000000000..11fa62123 --- /dev/null +++ b/components/pagination/locale/it_IT.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ pagina', + jump_to: 'vai a', + jump_to_confirm: 'Conferma', + page: '', + + // Pagination.jsx + prev_page: 'Pagina precedente', + next_page: 'Pagina successiva', + prev_5: 'Precedente 5 pagine', + next_5: 'Prossime 5 pagine', + prev_3: 'Precedente 3 pagine', + next_3: 'Prossime 3 pagine', +}; diff --git a/components/pagination/locale/ja_JP.js b/components/pagination/locale/ja_JP.js new file mode 100644 index 000000000..f0ebaa9f7 --- /dev/null +++ b/components/pagination/locale/ja_JP.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ ページ', + jump_to: '移動', + jump_to_confirm: '確認する', + page: 'ページ', + + // Pagination.jsx + prev_page: '前のページ', + next_page: '次のページ', + prev_5: '前 5ページ', + next_5: '次 5ページ', + prev_3: '前 3ページ', + next_3: '次 3ページ', +}; diff --git a/components/pagination/locale/ko_KR.js b/components/pagination/locale/ko_KR.js new file mode 100644 index 000000000..3bdadcb68 --- /dev/null +++ b/components/pagination/locale/ko_KR.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ 쪽', + jump_to: '이동하기', + jump_to_confirm: '확인하다', + page: '', + + // Pagination.jsx + prev_page: '이전 페이지', + next_page: '다음 페이지', + prev_5: '이전 5 페이지', + next_5: '다음 5 페이지', + prev_3: '이전 3 페이지', + next_3: '다음 3 페이지', +}; diff --git a/components/pagination/locale/nb_NO.js b/components/pagination/locale/nb_NO.js new file mode 100644 index 000000000..fb70c4520 --- /dev/null +++ b/components/pagination/locale/nb_NO.js @@ -0,0 +1,14 @@ +export default { + // Options.jsx + items_per_page: '/ side', + jump_to: 'Gå til side', + page: '', + + // Pagination.jsx + prev_page: 'Forrige side', + next_page: 'Neste side', + prev_5: '5 forrige', + next_5: '5 neste', + prev_3: '3 forrige', + next_3: '3 neste', +}; diff --git a/components/pagination/locale/nl_BE.js b/components/pagination/locale/nl_BE.js new file mode 100644 index 000000000..26a327b37 --- /dev/null +++ b/components/pagination/locale/nl_BE.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ pagina', + jump_to: 'Ga naar', + jump_to_confirm: 'bevestigen', + page: '', + + // Pagination.jsx + prev_page: 'Vorige pagina', + next_page: 'Volgende pagina', + prev_5: 'Vorige 5 pagina\'s', + next_5: 'Volgende 5 pagina\'s', + prev_3: 'Vorige 3 pagina\'s', + next_3: 'Volgende 3 pagina\'s', +}; diff --git a/components/pagination/locale/nl_NL.js b/components/pagination/locale/nl_NL.js new file mode 100644 index 000000000..26a327b37 --- /dev/null +++ b/components/pagination/locale/nl_NL.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ pagina', + jump_to: 'Ga naar', + jump_to_confirm: 'bevestigen', + page: '', + + // Pagination.jsx + prev_page: 'Vorige pagina', + next_page: 'Volgende pagina', + prev_5: 'Vorige 5 pagina\'s', + next_5: 'Volgende 5 pagina\'s', + prev_3: 'Vorige 3 pagina\'s', + next_3: 'Volgende 3 pagina\'s', +}; diff --git a/components/pagination/locale/pl_PL.js b/components/pagination/locale/pl_PL.js new file mode 100644 index 000000000..7c16a7305 --- /dev/null +++ b/components/pagination/locale/pl_PL.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ stronę', + jump_to: 'Idź do', + jump_to_confirm: 'potwierdzać', + page: '', + + // Pagination.jsx + prev_page: 'Poprzednia strona', + next_page: 'Następna strona', + prev_5: 'Poprzednie 5 stron', + next_5: 'Następne 5 stron', + prev_3: 'Poprzednie 3 strony', + next_3: 'Następne 3 strony', +}; diff --git a/components/pagination/locale/pt_BR.js b/components/pagination/locale/pt_BR.js new file mode 100644 index 000000000..399aca9e8 --- /dev/null +++ b/components/pagination/locale/pt_BR.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ páginas', + jump_to: 'Vá até', + jump_to_confirm: 'confirme', + page: '', + + // Pagination.jsx + prev_page: 'Página anterior', + next_page: 'Próxima página', + prev_5: '5 páginas anteriores', + next_5: '5 próximas páginas', + prev_3: '3 páginas anteriores', + next_3: '3 próximas páginas', +}; diff --git a/components/pagination/locale/pt_PT.js b/components/pagination/locale/pt_PT.js new file mode 100644 index 000000000..2f817a70e --- /dev/null +++ b/components/pagination/locale/pt_PT.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ página', + jump_to: 'Saltar', + jump_to_confirm: 'confirmar', + page: '', + + // Pagination.jsx + prev_page: 'Página Anterior', + next_page: 'Página Seguinte', + prev_5: 'Recuar 5 Páginas', + next_5: 'Avançar 5 Páginas', + prev_3: 'Recuar 3 Páginas', + next_3: 'Avançar 3 Páginas', +}; diff --git a/components/pagination/locale/ru_RU.js b/components/pagination/locale/ru_RU.js new file mode 100644 index 000000000..19ece3f95 --- /dev/null +++ b/components/pagination/locale/ru_RU.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/странице', + jump_to: 'Перейти', + jump_to_confirm: 'подтвердить', + page: '', + + // Pagination.jsx + prev_page: 'Назад', + next_page: 'Вперед', + prev_5: 'Предыдущие 5', + next_5: 'Следующие 5', + prev_3: 'Предыдущие 3', + next_3: 'Следующие 3', +}; diff --git a/components/pagination/locale/sk_SK.js b/components/pagination/locale/sk_SK.js new file mode 100644 index 000000000..0cf023021 --- /dev/null +++ b/components/pagination/locale/sk_SK.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ strana', + jump_to: 'Choď na', + jump_to_confirm: 'potvrdit', + page: '', + + // Pagination.jsx + prev_page: 'Predchádzajúca strana', + next_page: 'Nasledujúca strana', + prev_5: 'Predchádzajúcich 5 strán', + next_5: 'Nasledujúcich 5 strán', + prev_3: 'Predchádzajúce 3 strany', + next_3: 'Nasledujúce 3 strany', +}; diff --git a/components/pagination/locale/sr_RS.js b/components/pagination/locale/sr_RS.js new file mode 100644 index 000000000..a8c526b12 --- /dev/null +++ b/components/pagination/locale/sr_RS.js @@ -0,0 +1,14 @@ +export default { + // Options.jsx + items_per_page: '/ strani', + jump_to: 'Idi na', + page: '', + + // Pagination.jsx + prev_page: 'Prethodna strana', + next_page: 'Sledeća strana', + prev_5: 'Prethodnih 5 Strana', + next_5: 'Sledećih 5 Strana', + prev_3: 'Prethodnih 3 Strane', + next_3: 'Sledećih 3 Strane', +}; diff --git a/components/pagination/locale/sv_SE.js b/components/pagination/locale/sv_SE.js new file mode 100644 index 000000000..0c2f48c0e --- /dev/null +++ b/components/pagination/locale/sv_SE.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ sida', + jump_to: 'Gå till', + jump_to_confirm: 'bekräfta', + page: '', + + // Pagination.jsx + prev_page: 'Föreg sida', + next_page: 'Nästa sida', + prev_5: 'Föreg 5 sidor', + next_5: 'Nästa 5 sidor', + prev_3: 'Föreg 3 sidor', + next_3: 'Nästa 3 sidor', +}; diff --git a/components/pagination/locale/th_TH.js b/components/pagination/locale/th_TH.js new file mode 100644 index 000000000..9cfa90a7d --- /dev/null +++ b/components/pagination/locale/th_TH.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ หน้า', + jump_to: 'ไปยัง', + jump_to_confirm: 'ยืนยัน', + page: '', + + // Pagination.jsx + prev_page: 'หน้าก่อนหน้า', + next_page: 'หน้าถัดไป', + prev_5: 'ย้อนกลับ 5 หน้า', + next_5: 'ถัดไป 5 หน้า', + prev_3: 'ย้อนกลับ 3 หน้า', + next_3: 'ถัดไป 3 หน้า', +}; diff --git a/components/pagination/locale/uk_UA.js b/components/pagination/locale/uk_UA.js new file mode 100644 index 000000000..bab3544c4 --- /dev/null +++ b/components/pagination/locale/uk_UA.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ сторінці', + jump_to: 'Перейти', + jump_to_confirm: 'підтвердити', + page: '', + + // Pagination.jsx + prev_page: 'Попередня сторінка', + next_page: 'Наступна сторінка', + prev_5: 'Попередні 5 сторінок', + next_5: 'Наступні 5 сторінок', + prev_3: 'Попередні 3 сторінки', + next_3: 'Наступні 3 сторінки', +}; diff --git a/components/pagination/locale/vi_VN.js b/components/pagination/locale/vi_VN.js new file mode 100644 index 000000000..7ffbf7de9 --- /dev/null +++ b/components/pagination/locale/vi_VN.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '/ trang', + jump_to: 'Đến', + jump_to_confirm: 'xác nhận', + page: '', + + // Pagination.jsx + prev_page: 'Trang Trước', + next_page: 'Trang Kế', + prev_5: 'Về 5 Trang Trước', + next_5: 'Đến 5 Trang Kế', + prev_3: 'Về 3 Trang Trước', + next_3: 'Đến 3 Trang Kế', +}; diff --git a/components/pagination/locale/zh_CN.js b/components/pagination/locale/zh_CN.js new file mode 100644 index 000000000..0db7d226e --- /dev/null +++ b/components/pagination/locale/zh_CN.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '条/页', + jump_to: '跳至', + jump_to_confirm: '确定', + page: '页', + + // Pagination.jsx + prev_page: '上一页', + next_page: '下一页', + prev_5: '向前 5 页', + next_5: '向后 5 页', + prev_3: '向前 3 页', + next_3: '向后 3 页', +}; diff --git a/components/pagination/locale/zh_TW.js b/components/pagination/locale/zh_TW.js new file mode 100644 index 000000000..2654d3bbb --- /dev/null +++ b/components/pagination/locale/zh_TW.js @@ -0,0 +1,15 @@ +export default { + // Options.jsx + items_per_page: '條/頁', + jump_to: '跳至', + jump_to_confirm: '確定', + page: '頁', + + // Pagination.jsx + prev_page: '上一頁', + next_page: '下一頁', + prev_5: '向前 5 頁', + next_5: '向後 5 頁', + prev_3: '向前 3 頁', + next_3: '向後 3 頁', +}; diff --git a/components/pagination/pagination.vue b/components/pagination/pagination.vue index e69de29bb..fe2ea60a5 100644 --- a/components/pagination/pagination.vue +++ b/components/pagination/pagination.vue @@ -0,0 +1,436 @@ + diff --git a/components/pagination/style/index.less b/components/pagination/style/index.less index 5b8e0ddab..58eeb2833 100644 --- a/components/pagination/style/index.less +++ b/components/pagination/style/index.less @@ -1,6 +1,5 @@ @import "../../style/themes/default"; @import "../../style/mixins/index"; -@import "../../input/style/mixin"; @pagination-prefix-cls: ~"@{ant-prefix}-pagination"; @@ -222,11 +221,8 @@ &-quick-jumper { display: inline-block; - height: @input-height-base; - line-height: @input-height-base; input { - .input; margin: 0 8px; width: 50px; } @@ -316,7 +312,6 @@ line-height: 20px; input { - .input-sm; width: 44px; } } diff --git a/components/tooltip/tooltip.vue b/components/tooltip/tooltip.vue index e26091eb6..44ae66d8f 100644 --- a/components/tooltip/tooltip.vue +++ b/components/tooltip/tooltip.vue @@ -9,7 +9,7 @@ export default { }, placement: { default: 'top', - validator: val => ['top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'].includes(val) + validator: val => ['top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'].includes(val), }, transitionName: { default: 'zoom-big-fast', @@ -45,8 +45,8 @@ export default { }, }, methods: { - checkPosition(popup, text, placement) { - let { top, left, bottom, right } = text + checkPosition (popup, text, placement) { + const { top, left, bottom, right } = text const reg = /(top|bottom|left|right)(.*)/ const [, abstractPos, suffix] = placement.match(reg) let ret = placement @@ -57,7 +57,7 @@ export default { if (abstractPos === 'bottom' && document.documentElement.clientHeight - bottom < popup.height) ret = 'left' + suffix return ret }, - mountNode(callback) { + mountNode (callback) { if (this.vnode) { callback() return @@ -66,30 +66,30 @@ export default { document.body.appendChild(div) const that = this const vnode = new Vue({ - data() { + data () { return { left: 0, top: 0, } }, - render(h) { + render (h) { return ( - +
-
-
-
+
+
+
{that.title}
) - } + }, }).$mount(div) this.$nextTick(() => { this.vnode = vnode @@ -98,27 +98,27 @@ export default { }, onPopupAlign: (placement, domNode, target, align) => { if (!placement) { - return; + return } // 根据当前坐标设置动画点 const rect = domNode.getBoundingClientRect() const transformOrigin = { top: '50%', left: '50%', - }; + } if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) { - transformOrigin.top = `${rect.height - align.offset[1]}px`; + transformOrigin.top = `${rect.height - align.offset[1]}px` } else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) { - transformOrigin.top = `${-align.offset[1]}px`; + transformOrigin.top = `${-align.offset[1]}px` } if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) { - transformOrigin.left = `${rect.width - align.offset[0]}px`; + transformOrigin.left = `${rect.width - align.offset[0]}px` } else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) { - transformOrigin.left = `${-align.offset[0]}px`; + transformOrigin.left = `${-align.offset[0]}px` } - target.style.transformOrigin = `${transformOrigin.left} ${transformOrigin.top}`; + target.style.transformOrigin = `${transformOrigin.left} ${transformOrigin.top}` }, - addEventHandle(old, fn) { + addEventHandle (old, fn) { if (!old) { return fn } else if (Array.isArray(old)) { @@ -127,7 +127,7 @@ export default { return old === fn ? old : [old, fn] } }, - computeOffset(popup, text, placement) { + computeOffset (popup, text, placement) { let { width, height, top, left } = text // you cant change the properties of DOMRect top += window.scrollY @@ -140,20 +140,20 @@ export default { if (/right/.test(placement)) ret.left += width + 5 if (/Left/.test(placement)) { - } else if(/Right/.test(placement)) { + } else if (/Right/.test(placement)) { ret.left += (width - popup.width) - } else if(/(top)|(bottom)/.test(placement)) { + } else if (/(top)|(bottom)/.test(placement)) { ret.left += (width - popup.width) / 2 } if (/Top/.test(placement)) { - } else if(/Bottom/.test(placement)) { + } else if (/Bottom/.test(placement)) { ret.top += (height - popup.height) - } else if(/(left)|(right)/.test(placement)) { + } else if (/(left)|(right)/.test(placement)) { ret.top += (height - popup.height) / 2 } return ret }, - showNode() { + showNode () { this.mountNode(() => { this.visible = true this.$nextTick(() => { @@ -165,14 +165,14 @@ export default { this.vnode.left = left this.vnode.top = top }) - this.onPopupAlign(this.realPlacement, this.$el, this.vnode.$el, { offset: [0,0] }) + this.onPopupAlign(this.realPlacement, this.$el, this.vnode.$el, { offset: [0, 0] }) }) }, - hideNode() { + hideNode () { this.visible = false - } + }, }, - render(h) { + render (h) { const inner = this.$slots.default[0] inner.data = inner.data || {} inner.data.on = inner.data.on || {} @@ -181,7 +181,7 @@ export default { return this.$slots.default[0] }, - updated() { + updated () { if (!this.vnode) return const popup = this.vnode.$el.getBoundingClientRect() const content = this.$el.getBoundingClientRect() @@ -189,10 +189,10 @@ export default { this.vnode.left = left this.vnode.top = top }, - beforeDestroy() { + beforeDestroy () { if (!this.vnode) return this.vnode.$el.remove() - this.vnode.$destroy(); - } + this.vnode.$destroy() + }, }