From 6e940cad7b93825f9ef6880808ca4f865f59b858 Mon Sep 17 00:00:00 2001 From: Micle Bu Date: Fri, 1 May 2020 23:18:30 +0800 Subject: [PATCH] fix(list): list dropdown menu --- src/components/buttons/OListDropdown.vue | 89 ++++++++++++++++++++++ src/components/menubars/OEditorMenuBar.vue | 2 + src/data/editor.js | 1 + src/i18n/en-us/index.js | 1 + src/i18n/pl/index.js | 1 + src/i18n/zh-hans/index.js | 1 + src/pages/examples/basic.vue | 6 +- 7 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 src/components/buttons/OListDropdown.vue diff --git a/src/components/buttons/OListDropdown.vue b/src/components/buttons/OListDropdown.vue new file mode 100644 index 0000000..15a0465 --- /dev/null +++ b/src/components/buttons/OListDropdown.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/components/menubars/OEditorMenuBar.vue b/src/components/menubars/OEditorMenuBar.vue index f066e70..24cd5f8 100644 --- a/src/components/menubars/OEditorMenuBar.vue +++ b/src/components/menubars/OEditorMenuBar.vue @@ -79,6 +79,7 @@ import OAlignGroup from 'src/components/buttons/OAlignGroup' import OLineHeightDropdown from 'src/components/buttons/OLineHeightDropdown' import OHeadingDropdown from 'src/components/buttons/OHeadingDropdown' import OHeadingList from 'src/components/buttons/OHeadingList' +import OListDropdown from 'src/components/buttons/OListDropdown' import OAddMoreBtn from 'src/components/buttons/OAddMoreBtn' import OPhotoBtn from 'src/components/buttons/OPhotoBtn' @@ -123,6 +124,7 @@ export default { OLineHeightDropdown, OHeadingDropdown, OHeadingList, + OListDropdown, OAddMoreBtn, OPhotoBtn, OLinkBtn, diff --git a/src/data/editor.js b/src/data/editor.js index d842255..72e8bba 100644 --- a/src/data/editor.js +++ b/src/data/editor.js @@ -17,6 +17,7 @@ export const CommandComponents = { 'align-dropdown': 'o-align-dropdown', 'align-group': 'o-align-group', 'line-height': 'o-line-height-dropdown', + 'list-dropdown': 'o-list-dropdown', heading: 'o-heading-dropdown', link: 'o-link-btn', photo: 'o-photo-btn', diff --git a/src/i18n/en-us/index.js b/src/i18n/en-us/index.js index 26bc3ca..3e7ed7f 100644 --- a/src/i18n/en-us/index.js +++ b/src/i18n/en-us/index.js @@ -18,6 +18,7 @@ export default { italic: 'Italic', strikethrough: 'Strikethrough', underline: 'Underline', + list: 'List', unorderedList: 'Unordered List', orderedList: 'Ordered List', todoList: 'Todo List', diff --git a/src/i18n/pl/index.js b/src/i18n/pl/index.js index a4da4fe..e8df0d7 100644 --- a/src/i18n/pl/index.js +++ b/src/i18n/pl/index.js @@ -20,6 +20,7 @@ export default { underline: 'Podkreślenie', unorderedList: 'Lista wypunktowana', orderedList: 'Lista numerowana', + list: 'List', todoList: 'Lista rzeczy do zrobienia', subscript: 'Indeks dolny', superscript: 'Indeks górny', diff --git a/src/i18n/zh-hans/index.js b/src/i18n/zh-hans/index.js index d7edd13..f37e610 100644 --- a/src/i18n/zh-hans/index.js +++ b/src/i18n/zh-hans/index.js @@ -18,6 +18,7 @@ export default { italic: '斜体', strikethrough: '删除线', underline: '下划线', + list: '列表', unorderedList: '无序列表', orderedList: '有序列表', todoList: '任务列表', diff --git a/src/pages/examples/basic.vue b/src/pages/examples/basic.vue index 1d64a6e..d5469a3 100644 --- a/src/pages/examples/basic.vue +++ b/src/pages/examples/basic.vue @@ -85,13 +85,11 @@ export default { 'line-height', 'separator', 'horizontal', - 'bullet_list', - 'ordered_list', - 'todo_list', + 'list-dropdown', 'separator', 'blockquote', 'code_block', - 'link', + // 'link', OLinkBtn, // use custom component 'photo', 'table',