@peng_kai/kit 0.3.0-beta.18 → 0.3.0-beta.19
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useIntervalFn } from '@vueuse/core';
|
|
3
|
-
import
|
|
3
|
+
import { Ckeditor } from '@ckeditor/ckeditor5-vue';
|
|
4
4
|
import { shallowRef } from 'vue';
|
|
5
5
|
import { useInjectDisabled } from 'ant-design-vue/es/config-provider/DisabledContext';
|
|
6
6
|
import { defaultConfig } from './editorConfig';
|
|
@@ -20,7 +20,19 @@ function useClassicEditor() {
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<script setup lang="ts">
|
|
23
|
-
const props =
|
|
23
|
+
const props = withDefaults(
|
|
24
|
+
defineProps<{
|
|
25
|
+
modelValue: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
plugins?: string[];
|
|
28
|
+
height: string;
|
|
29
|
+
}>(),
|
|
30
|
+
{
|
|
31
|
+
disabled: false,
|
|
32
|
+
plugins: () => [],
|
|
33
|
+
height: '500px',
|
|
34
|
+
}
|
|
35
|
+
);
|
|
24
36
|
const emits = defineEmits<{
|
|
25
37
|
(e: 'update:modelValue', value: string): void
|
|
26
38
|
}>();
|
|
@@ -33,7 +45,7 @@ editorConfig.extraPlugins = props.plugins;
|
|
|
33
45
|
|
|
34
46
|
<template>
|
|
35
47
|
<div class="editor-wrapper">
|
|
36
|
-
<
|
|
48
|
+
<Ckeditor
|
|
37
49
|
v-if="ClassicEditor"
|
|
38
50
|
:modelValue="props.modelValue"
|
|
39
51
|
:editor="ClassicEditor"
|
|
@@ -50,9 +62,10 @@ editorConfig.extraPlugins = props.plugins;
|
|
|
50
62
|
<style scoped lang="scss">
|
|
51
63
|
.editor-wrapper {
|
|
52
64
|
--loading-color: var(--antd-colorPrimary);
|
|
65
|
+
min-height: 40px;
|
|
53
66
|
|
|
54
67
|
:deep(.ck-editor__main > .ck-content) {
|
|
55
|
-
height:
|
|
68
|
+
height: v-bind('props.height');
|
|
56
69
|
overflow: auto;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
@@ -95,7 +95,7 @@ export const defaultConfig: Record<string, any> = {
|
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
97
|
link: {
|
|
98
|
-
addTargetToExternalLinks:
|
|
98
|
+
addTargetToExternalLinks: false,
|
|
99
99
|
defaultProtocol: 'https://',
|
|
100
100
|
decorators: {
|
|
101
101
|
toggleDownloadable: {
|
|
@@ -105,6 +105,15 @@ export const defaultConfig: Record<string, any> = {
|
|
|
105
105
|
download: 'file',
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
|
+
openInNewTab: {
|
|
109
|
+
mode: 'manual',
|
|
110
|
+
label: '打开新标签页',
|
|
111
|
+
defaultValue: true, // This option will be selected by default.
|
|
112
|
+
attributes: {
|
|
113
|
+
target: '_blank',
|
|
114
|
+
rel: 'noopener noreferrer'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
108
117
|
},
|
|
109
118
|
},
|
|
110
119
|
table: {
|
|
@@ -8,17 +8,17 @@ export function useTableColumns<LCT extends any[]>() {
|
|
|
8
8
|
let originalColumns: LCT | null = null;
|
|
9
9
|
let tableId = ''
|
|
10
10
|
|
|
11
|
-
const _getTableId = () => {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
// const _getTableId = () => {
|
|
12
|
+
// if (!originalColumns)
|
|
13
|
+
// throw new Error('请先调用 defineColumns() 方法定义 columns');
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
// const indexsStr = originalColumns.map((col: any) => col.dataIndex).join(',');
|
|
16
|
+
// if (!tableId) {
|
|
17
|
+
// tableId = genTableId(indexsStr);
|
|
18
|
+
// }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
}
|
|
20
|
+
// return tableId;
|
|
21
|
+
// }
|
|
22
22
|
|
|
23
23
|
const defineColumns = (columnsGetter: () => LCT) => {
|
|
24
24
|
originalColumns = toValue(columnsGetter) || [] as unknown as LCT;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peng_kai/kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.0-beta.
|
|
4
|
+
"version": "0.3.0-beta.19",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "ISC",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@babel/parser": "^7.27.7",
|
|
25
25
|
"@babel/traverse": "^7.27.7",
|
|
26
26
|
"@babel/types": "^7.27.7",
|
|
27
|
-
"@ckeditor/ckeditor5-vue": "^
|
|
27
|
+
"@ckeditor/ckeditor5-vue": "^7.3.0",
|
|
28
28
|
"@fingerprintjs/fingerprintjs": "^4.6.2",
|
|
29
29
|
"@tanstack/vue-query": "^5.81.5",
|
|
30
30
|
"@vueuse/components": "^13.4.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@vueuse/router": "^13.4.0",
|
|
33
33
|
"archiver": "^7.0.1",
|
|
34
34
|
"axios": "^1.10.0",
|
|
35
|
-
"bignumber.js": "^9.3.
|
|
35
|
+
"bignumber.js": "^9.3.1",
|
|
36
36
|
"chokidar": "^3.6.0",
|
|
37
37
|
"crypto-es": "^2.1.0",
|
|
38
38
|
"dayjs": "^1.11.13",
|
|
@@ -50,46 +50,45 @@
|
|
|
50
50
|
"vue-router": "^4.5.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@ckeditor/ckeditor5-adapter-ckfinder": "^
|
|
54
|
-
"@ckeditor/ckeditor5-alignment": "^
|
|
55
|
-
"@ckeditor/ckeditor5-autoformat": "^
|
|
56
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
57
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
58
|
-
"@ckeditor/ckeditor5-
|
|
59
|
-
"@ckeditor/ckeditor5-
|
|
60
|
-
"@ckeditor/ckeditor5-
|
|
61
|
-
"@ckeditor/ckeditor5-
|
|
62
|
-
"@ckeditor/ckeditor5-
|
|
63
|
-
"@ckeditor/ckeditor5-
|
|
64
|
-
"@ckeditor/ckeditor5-
|
|
65
|
-
"@ckeditor/ckeditor5-
|
|
66
|
-
"@ckeditor/ckeditor5-
|
|
67
|
-
"@ckeditor/ckeditor5-html-
|
|
68
|
-
"@ckeditor/ckeditor5-
|
|
69
|
-
"@ckeditor/ckeditor5-
|
|
70
|
-
"@ckeditor/ckeditor5-
|
|
71
|
-
"@ckeditor/ckeditor5-
|
|
72
|
-
"@ckeditor/ckeditor5-
|
|
73
|
-
"@ckeditor/ckeditor5-
|
|
74
|
-
"@ckeditor/ckeditor5-
|
|
75
|
-
"@ckeditor/ckeditor5-
|
|
76
|
-
"@ckeditor/ckeditor5-
|
|
77
|
-
"@ckeditor/ckeditor5-
|
|
78
|
-
"@ckeditor/ckeditor5-
|
|
79
|
-
"@ckeditor/ckeditor5-
|
|
80
|
-
"@ckeditor/ckeditor5-
|
|
81
|
-
"@ckeditor/ckeditor5-
|
|
82
|
-
"@ckeditor/ckeditor5-
|
|
83
|
-
"@ckeditor/ckeditor5-word-count": "^41.1.0",
|
|
53
|
+
"@ckeditor/ckeditor5-adapter-ckfinder": "^46.0.0",
|
|
54
|
+
"@ckeditor/ckeditor5-alignment": "^46.0.0",
|
|
55
|
+
"@ckeditor/ckeditor5-autoformat": "^46.0.0",
|
|
56
|
+
"@ckeditor/ckeditor5-basic-styles": "^46.0.0",
|
|
57
|
+
"@ckeditor/ckeditor5-block-quote": "^46.0.0",
|
|
58
|
+
"@ckeditor/ckeditor5-code-block": "^46.0.0",
|
|
59
|
+
"@ckeditor/ckeditor5-document-outline": "^46.0.0",
|
|
60
|
+
"@ckeditor/ckeditor5-editor-classic": "^46.0.0",
|
|
61
|
+
"@ckeditor/ckeditor5-essentials": "^46.0.0",
|
|
62
|
+
"@ckeditor/ckeditor5-font": "^46.0.0",
|
|
63
|
+
"@ckeditor/ckeditor5-heading": "^46.0.0",
|
|
64
|
+
"@ckeditor/ckeditor5-highlight": "^46.0.0",
|
|
65
|
+
"@ckeditor/ckeditor5-horizontal-line": "^46.0.0",
|
|
66
|
+
"@ckeditor/ckeditor5-html-embed": "^46.0.0",
|
|
67
|
+
"@ckeditor/ckeditor5-html-support": "^46.0.0",
|
|
68
|
+
"@ckeditor/ckeditor5-image": "^46.0.0",
|
|
69
|
+
"@ckeditor/ckeditor5-import-word": "^46.0.0",
|
|
70
|
+
"@ckeditor/ckeditor5-indent": "^46.0.0",
|
|
71
|
+
"@ckeditor/ckeditor5-link": "^46.0.0",
|
|
72
|
+
"@ckeditor/ckeditor5-list": "^46.0.0",
|
|
73
|
+
"@ckeditor/ckeditor5-media-embed": "^46.0.0",
|
|
74
|
+
"@ckeditor/ckeditor5-paragraph": "^46.0.0",
|
|
75
|
+
"@ckeditor/ckeditor5-remove-format": "^46.0.0",
|
|
76
|
+
"@ckeditor/ckeditor5-show-blocks": "^46.0.0",
|
|
77
|
+
"@ckeditor/ckeditor5-source-editing": "^46.0.0",
|
|
78
|
+
"@ckeditor/ckeditor5-table": "^46.0.0",
|
|
79
|
+
"@ckeditor/ckeditor5-theme-lark": "^46.0.0",
|
|
80
|
+
"@ckeditor/ckeditor5-typing": "^46.0.0",
|
|
81
|
+
"@ckeditor/ckeditor5-upload": "^46.0.0",
|
|
82
|
+
"@ckeditor/ckeditor5-word-count": "^46.0.0",
|
|
84
83
|
"@peng_kai/lint": "^0.1.0",
|
|
85
84
|
"@types/archiver": "^6.0.3",
|
|
86
85
|
"@types/crypto-js": "^4.2.2",
|
|
87
86
|
"@types/lodash-es": "^4.17.12",
|
|
88
|
-
"@types/node": "^22.
|
|
87
|
+
"@types/node": "^22.16.5",
|
|
89
88
|
"@types/nprogress": "^0.2.3",
|
|
90
89
|
"ant-design-vue": "^4.2.6",
|
|
91
90
|
"type-fest": "^4.41.0",
|
|
92
91
|
"typescript": "^5.8.3",
|
|
93
|
-
"vue-component-type-helpers": "^
|
|
92
|
+
"vue-component-type-helpers": "^3.0.3"
|
|
94
93
|
}
|
|
95
94
|
}
|