@peng_kai/kit 0.3.0-beta.25 → 0.3.0-beta.26

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.
@@ -4,8 +4,8 @@ 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';
7
- import 'https://cdn.ckeditor.com/ckeditor5/41.1.0/super-build/ckeditor.js';
8
- import 'https://cdn.ckeditor.com/ckeditor5/41.1.0/super-build/translations/zh-cn.js';
7
+ import 'https://cdn.ckeditor.com/ckeditor5/41.2.0/super-build/ckeditor.js';
8
+ import 'https://cdn.ckeditor.com/ckeditor5/41.2.0/super-build/translations/zh-cn.js';
9
9
 
10
10
  function useClassicEditor() {
11
11
  const ClassicEditor = shallowRef();
@@ -3,6 +3,72 @@ export const defaultConfig: Record<string, any> = {
3
3
  ui: 'zh-cn',
4
4
  },
5
5
  removePlugins: ['ImportWord', 'ExportWord', 'RevisionHistory', 'RealTimeCollaborativeEditing', 'RealTimeCollaborativeComments', 'RealTimeCollaborativeRevisionHistory', 'RealTimeCollaborativeTrackChanges', 'PresenceList', 'WProofreader', 'DocumentOutline', 'Comments', 'TrackChanges', 'TrackChangesData', 'TableOfContents', 'SlashCommand', 'PasteFromOfficeEnhanced', 'ContentTemplates', 'FormatPainter', 'Mentions', 'PageBreak', 'Pagination', 'AIAssistant', 'CaseChange', 'Template'],
6
+ // plugins: [
7
+ // 'Alignment',
8
+ // 'Autoformat',
9
+ // 'AutoImage',
10
+ // 'AutoLink',
11
+ // 'Autosave',
12
+ // 'BalloonToolbar',
13
+ // 'BlockQuote',
14
+ // 'Bold',
15
+ // 'Code',
16
+ // 'CodeBlock',
17
+ // 'Essentials',
18
+ // 'FindAndReplace',
19
+ // 'FontBackgroundColor',
20
+ // 'FontColor',
21
+ // 'FontFamily',
22
+ // 'FontSize',
23
+ // 'FullPage',
24
+ // 'Fullscreen',
25
+ // 'GeneralHtmlSupport',
26
+ // 'Heading',
27
+ // 'Highlight',
28
+ // 'HorizontalLine',
29
+ // 'HtmlComment',
30
+ // 'HtmlEmbed',
31
+ // 'ImageBlock',
32
+ // 'ImageCaption',
33
+ // 'ImageInline',
34
+ // 'ImageInsert',
35
+ // 'ImageInsertViaUrl',
36
+ // 'ImageResize',
37
+ // 'ImageStyle',
38
+ // 'ImageTextAlternative',
39
+ // 'ImageToolbar',
40
+ // 'ImageUpload',
41
+ // 'Indent',
42
+ // 'IndentBlock',
43
+ // 'Italic',
44
+ // 'Link',
45
+ // 'LinkImage',
46
+ // 'List',
47
+ // 'ListProperties',
48
+ // 'Markdown',
49
+ // 'MediaEmbed',
50
+ // 'Paragraph',
51
+ // 'PasteFromMarkdownExperimental',
52
+ // 'PasteFromOffice',
53
+ // 'PlainTableOutput',
54
+ // 'RemoveFormat',
55
+ // 'ShowBlocks',
56
+ // 'SimpleUploadAdapter',
57
+ // 'SourceEditing',
58
+ // 'Strikethrough',
59
+ // 'Subscript',
60
+ // 'Superscript',
61
+ // 'Table',
62
+ // 'TableCaption',
63
+ // 'TableCellProperties',
64
+ // 'TableColumnResize',
65
+ // 'TableLayout',
66
+ // 'TableProperties',
67
+ // 'TableToolbar',
68
+ // 'TextTransformation',
69
+ // 'Underline',
70
+ // 'WordCount'
71
+ // ],
6
72
  toolbar: {
7
73
  items: [
8
74
  'undo',
@@ -150,14 +150,14 @@ const antdValueResolvers: Record<number, (value: any) => any> = {
150
150
 
151
151
  <script setup lang="ts">
152
152
  const props = withDefaults(defineProps<{
153
- formCofnig: IConfigDetail[]
153
+ formConfig: IConfigDetail[]
154
154
  disabled?: boolean
155
155
  }>(), {
156
156
  disabled: false,
157
157
  });
158
158
 
159
159
  const configList = computed(() => {
160
- const list = cloneDeep(props.formCofnig);
160
+ const list = cloneDeep(props.formConfig);
161
161
 
162
162
  if (!list?.length)
163
163
  return;
@@ -169,7 +169,7 @@ const configList = computed(() => {
169
169
 
170
170
  return list;
171
171
  });
172
- const configMap = computed(() => mapKeys(cloneDeep(props.formCofnig ?? []), 'key'));
172
+ const configMap = computed(() => mapKeys(cloneDeep(props.formConfig ?? []), 'key'));
173
173
  function formSchema() {
174
174
  const _configList = configList.value ?? [];
175
175
  const entries = _configList.map(config => [
@@ -221,9 +221,10 @@ defineExpose({ reset, validate });
221
221
  <slot
222
222
  v-if="$slots[item.key]"
223
223
  :name="item.key"
224
- :state="toRef(settingForm.state, item.key)"
224
+ :state="settingForm.state[item.key]"
225
225
  :config="item"
226
226
  :orginConfig="configMap[item.key]"
227
+ :setState="(v: any) => settingForm.state[item.key] = v"
227
228
  />
228
229
  <template v-else>
229
230
  <slot v-if="item.form_type === FormTypes.NUMBER_INPUT" :name="FormTypes.NUMBER_INPUT">
@@ -66,7 +66,7 @@ async function submitSetting() {
66
66
  >
67
67
  <component
68
68
  :is="$slots.default?.({
69
- formCofnig: configQuerier.data.value ?? [],
69
+ formConfig: configQuerier.data.value ?? [],
70
70
  disabled: settingMutator.isPending.value || props.readonly,
71
71
  })[0]"
72
72
  :ref="setRefs.form"
package/package.json CHANGED
@@ -1,94 +1,64 @@
1
- {
2
- "name": "@peng_kai/kit",
3
- "type": "module",
4
- "version": "0.3.0-beta.25",
5
- "description": "",
6
- "author": "",
7
- "license": "ISC",
8
- "keywords": [],
9
- "main": "index.js",
10
- "scripts": {
11
- "dev:js": "tsx ./admin/scripts/deploy.ts",
12
- "lint": "eslint .",
13
- "lint:fix": "eslint . --fix"
14
- },
15
- "peerDependencies": {
16
- "ant-design-vue": "4.2.6",
17
- "vue": "3.5.18",
18
- "vue-router": "4.5.1"
19
- },
20
- "dependencies": {
21
- "@aws-sdk/client-s3": "^3.855.0",
22
- "@aws-sdk/lib-storage": "^3.855.0",
23
- "@babel/generator": "^7.28.0",
24
- "@babel/parser": "^7.28.0",
25
- "@babel/traverse": "^7.28.0",
26
- "@babel/types": "^7.28.2",
27
- "@ckeditor/ckeditor5-vue": "^7.3.0",
28
- "@fingerprintjs/fingerprintjs": "^4.6.2",
29
- "@tanstack/vue-query": "^5.83.0",
30
- "@vueuse/components": "^13.6.0",
31
- "@vueuse/core": "^13.6.0",
32
- "@vueuse/router": "^13.6.0",
33
- "archiver": "^7.0.1",
34
- "axios": "^1.11.0",
35
- "bignumber.js": "^9.3.1",
36
- "chokidar": "^3.6.0",
37
- "crypto-es": "^2.1.0",
38
- "dayjs": "^1.11.13",
39
- "echarts": "^5.5.1",
40
- "execa": "^9.4.0",
41
- "fast-glob": "^3.3.2",
42
- "fluid-dnd": "^2.4.0",
43
- "localstorage-slim": "^2.7.1",
44
- "lodash-es": "^4.17.21",
45
- "nprogress": "^0.2.0",
46
- "pinia": "^3.0.3",
47
- "tsx": "^4.16.00",
48
- "vue": "^3.5.18",
49
- "vue-i18n": "^11.1.11",
50
- "vue-router": "^4.5.1"
51
- },
52
- "devDependencies": {
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",
83
- "@peng_kai/lint": "^0.1.0",
84
- "@types/archiver": "^6.0.3",
85
- "@types/crypto-js": "^4.2.2",
86
- "@types/lodash-es": "^4.17.12",
87
- "@types/node": "^22.16.5",
88
- "@types/nprogress": "^0.2.3",
89
- "ant-design-vue": "^4.2.6",
90
- "type-fest": "^4.41.0",
91
- "typescript": "^5.8.3",
92
- "vue-component-type-helpers": "^3.0.4"
93
- }
94
- }
1
+ {
2
+ "name": "@peng_kai/kit",
3
+ "type": "module",
4
+ "version": "0.3.0-beta.26",
5
+ "description": "",
6
+ "author": "",
7
+ "license": "ISC",
8
+ "keywords": [],
9
+ "main": "index.js",
10
+ "scripts": {
11
+ "dev:js": "tsx ./admin/scripts/deploy.ts",
12
+ "lint": "eslint .",
13
+ "lint:fix": "eslint . --fix"
14
+ },
15
+ "peerDependencies": {
16
+ "ant-design-vue": "4.2.6",
17
+ "vue": "3.5.21",
18
+ "vue-router": "4.5.1"
19
+ },
20
+ "dependencies": {
21
+ "@aws-sdk/client-s3": "^3.891.0",
22
+ "@aws-sdk/lib-storage": "^3.891.0",
23
+ "@babel/generator": "^7.28.3",
24
+ "@babel/parser": "^7.28.4",
25
+ "@babel/traverse": "^7.28.4",
26
+ "@babel/types": "^7.28.4",
27
+ "@ckeditor/ckeditor5-vue": "^7.3.0",
28
+ "@fingerprintjs/fingerprintjs": "^4.6.2",
29
+ "@tanstack/vue-query": "^5.89.0",
30
+ "@vueuse/components": "^13.9.0",
31
+ "@vueuse/core": "^13.9.0",
32
+ "@vueuse/router": "^13.9.0",
33
+ "archiver": "^7.0.1",
34
+ "axios": "^1.12.2",
35
+ "bignumber.js": "^9.3.1",
36
+ "chokidar": "^4.0.3",
37
+ "crypto-es": "^3.1.2",
38
+ "dayjs": "^1.11.18",
39
+ "echarts": "^5.5.1",
40
+ "execa": "^9.6.0",
41
+ "fast-glob": "^3.3.3",
42
+ "fluid-dnd": "^2.6.2",
43
+ "localstorage-slim": "^2.7.1",
44
+ "lodash-es": "^4.17.21",
45
+ "nprogress": "^0.2.0",
46
+ "pinia": "^3.0.3",
47
+ "tsx": "^4.16.00",
48
+ "vue": "^3.5.21",
49
+ "vue-i18n": "^11.1.12",
50
+ "vue-router": "^4.5.1"
51
+ },
52
+ "devDependencies": {
53
+ "@peng_kai/lint": "^0.1.0",
54
+ "@types/archiver": "^6.0.3",
55
+ "@types/crypto-js": "^4.2.2",
56
+ "@types/lodash-es": "^4.17.12",
57
+ "@types/node": "^22.18.5",
58
+ "@types/nprogress": "^0.2.3",
59
+ "ant-design-vue": "^4.2.6",
60
+ "type-fest": "^5.0.0",
61
+ "typescript": "^5.9.2",
62
+ "vue-component-type-helpers": "^3.0.7"
63
+ }
64
+ }