@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 CKEditor from '@ckeditor/ckeditor5-vue';
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 = defineProps(['modelValue', 'disabled', 'plugins']);
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
- <CKEditor.component
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: 500px;
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: true,
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
- if (!originalColumns)
13
- throw new Error('请先调用 defineColumns() 方法定义 columns');
11
+ // const _getTableId = () => {
12
+ // if (!originalColumns)
13
+ // throw new Error('请先调用 defineColumns() 方法定义 columns');
14
14
 
15
- const indexsStr = originalColumns.map((col: any) => col.dataIndex).join(',');
16
- if (!tableId) {
17
- tableId = genTableId(indexsStr);
18
- }
15
+ // const indexsStr = originalColumns.map((col: any) => col.dataIndex).join(',');
16
+ // if (!tableId) {
17
+ // tableId = genTableId(indexsStr);
18
+ // }
19
19
 
20
- return tableId;
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.18",
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": "^5.1.0",
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.0",
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": "^41.1.0",
54
- "@ckeditor/ckeditor5-alignment": "^41.1.0",
55
- "@ckeditor/ckeditor5-autoformat": "^41.1.0",
56
- "@ckeditor/ckeditor5-basic-styles": "^41.1.0",
57
- "@ckeditor/ckeditor5-block-quote": "^41.1.0",
58
- "@ckeditor/ckeditor5-build-classic": "^41.1.0",
59
- "@ckeditor/ckeditor5-code-block": "^41.1.0",
60
- "@ckeditor/ckeditor5-document-outline": "^41.1.0",
61
- "@ckeditor/ckeditor5-editor-classic": "^41.1.0",
62
- "@ckeditor/ckeditor5-essentials": "^41.1.0",
63
- "@ckeditor/ckeditor5-font": "^41.1.0",
64
- "@ckeditor/ckeditor5-heading": "^41.1.0",
65
- "@ckeditor/ckeditor5-highlight": "^41.1.0",
66
- "@ckeditor/ckeditor5-horizontal-line": "^41.1.0",
67
- "@ckeditor/ckeditor5-html-embed": "^41.1.0",
68
- "@ckeditor/ckeditor5-html-support": "^41.1.0",
69
- "@ckeditor/ckeditor5-image": "^41.1.0",
70
- "@ckeditor/ckeditor5-import-word": "^41.1.0",
71
- "@ckeditor/ckeditor5-indent": "^41.1.0",
72
- "@ckeditor/ckeditor5-link": "^41.1.0",
73
- "@ckeditor/ckeditor5-list": "^41.1.0",
74
- "@ckeditor/ckeditor5-media-embed": "^41.1.0",
75
- "@ckeditor/ckeditor5-paragraph": "^41.1.0",
76
- "@ckeditor/ckeditor5-remove-format": "^41.1.0",
77
- "@ckeditor/ckeditor5-show-blocks": "^41.1.0",
78
- "@ckeditor/ckeditor5-source-editing": "^41.1.0",
79
- "@ckeditor/ckeditor5-table": "^41.1.0",
80
- "@ckeditor/ckeditor5-theme-lark": "^41.1.0",
81
- "@ckeditor/ckeditor5-typing": "^41.1.0",
82
- "@ckeditor/ckeditor5-upload": "^41.1.0",
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.15.33",
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": "^2.2.10"
92
+ "vue-component-type-helpers": "^3.0.3"
94
93
  }
95
94
  }