Skip to content

Commit 4b7e09e

Browse files
authored
refactor(markdown): 默认工具栏添加checkbox不加入list语法 (DevCloudFE#1754)
1 parent b6a998c commit 4b7e09e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/devui-vue/devui/editor-md/src/toolbar-config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ class ToolBarHandler {
153153
const selection = editor.getSelection();
154154
editor.focus();
155155
if (selection === '') {
156-
editor.replaceSelection('- [ ] ' + selection);
156+
editor.replaceSelection('[ ] ' + selection);
157157
} else {
158158
const selectionText = selection.split('\n');
159159

160160
for (let i = 0, len = selectionText.length; i < len; i++) {
161-
selectionText[i] = selectionText[i] === '' ? '' : '- [ ] ' + selectionText[i];
161+
selectionText[i] = selectionText[i] === '' ? '' : '[ ] ' + selectionText[i];
162162
}
163163

164164
editor.replaceSelection(selectionText.join('\n'));

packages/devui-vue/docs/components/dragdrop/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default defineComponent({
5555
</script>
5656
5757
<style>
58-
.card-container {
58+
div.card-container {
5959
display: flex;
6060
flex-wrap: wrap;
6161
width: 100%;
@@ -204,7 +204,9 @@ export default defineComponent({
204204
| drop | EventEmitter\<DropEvent\> | 放置一个元素, 接收的事件,其中 nativeEvent 表示原生的 drop 事件,其他见定义注释 | [Sortable-基本用法](#sortable-基本用法) |
205205

206206
### Sortable 类型定义
207+
207208
#### DropEvent
209+
208210
```ts
209211
type DropEvent = {
210212
event: DragEvent, // 原生drag事件
@@ -213,5 +215,3 @@ type DropEvent = {
213215
targetIndex: number // drop到的元素的index
214216
}
215217
```
216-
217-

packages/devui-vue/docs/components/editor-md/checkbox.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { reactive, ref } from 'vue';
2121
// import { checkbox } from 'vue-devui/editor-md'; // demo无法进行import,使用时请放开注释
2222
23-
const content = ref('- [x] checked \n - [ ] unchecked // demo无法进行import,使用时请放开代码中注释');
23+
const content = ref('[x] checked \n[ ] unchecked // demo无法进行import,使用时请放开代码中注释');
2424
const mdRules = reactive({
2525
linkify: {
2626
fuzzyLink: false,

0 commit comments

Comments
 (0)