starfish-form-custom 1.0.44 → 1.0.45

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.
@@ -3,7 +3,7 @@ import 'element-plus/es/components/base/style/css';
3
3
  import 'element-plus/es/components/form/style/css';
4
4
  import 'element-plus/es/components/form-item/style/css';
5
5
  import { defineComponent, getCurrentInstance, ref, onMounted, openBlock, createElementBlock, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, resolveDynamicComponent, createCommentVNode, toRaw } from 'vue';
6
- import { _ as _export_sfc } from './main-c6aa3683.mjs';
6
+ import { _ as _export_sfc } from './main-c9f94a75.mjs';
7
7
  import 'element-plus/es/components/icon/style/css';
8
8
  import 'element-plus/es/components/input/style/css';
9
9
  import 'element-plus/es/components/checkbox/style/css';
@@ -167,7 +167,6 @@ const _sfc_main = defineComponent({
167
167
  }
168
168
  const handleControlChange = () => {
169
169
  const allFormLists = props.allFormList;
170
- console.log("---handleControlChange--", allFormLists, "props.allFormList", props.allFormList);
171
170
  allFormLists.forEach((item2) => {
172
171
  if (item2.data.showRule === "{}") {
173
172
  item2.show = true;
@@ -323,7 +322,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
323
322
  ref_for: true,
324
323
  ref: "controlObj",
325
324
  onChange: _ctx.handleControlChange
326
- }, _ctx.globalConfig, {
325
+ }, { ref_for: true }, _ctx.globalConfig, {
327
326
  readonly: _ctx.readonly,
328
327
  item: item2,
329
328
  data: _ctx.formResult || "{}",
@@ -333,12 +332,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
333
332
  ]),
334
333
  _: 2
335
334
  }, 1032, ["prop"])) : item2.show ? (openBlock(), createBlock(resolveDynamicComponent(item2.ControlType), mergeProps({
336
- key: 1,
337
335
  ref_for: true,
338
336
  ref: "controlObj",
339
337
  onChange: _ctx.handleControlChange,
340
338
  key: item2.id
341
- }, _ctx.globalConfig, {
339
+ }, { ref_for: true }, _ctx.globalConfig, {
342
340
  readonly: _ctx.readonly,
343
341
  item: item2,
344
342
  data: _ctx.formResult || "{}",
@@ -1,4 +1,4 @@
1
- export { D as Dynamicform, m as default } from './main-c6aa3683.mjs';
1
+ export { D as Dynamicform, m as default } from './main-c9f94a75.mjs';
2
2
  import 'vue';
3
3
  import 'element-plus/es';
4
4
  import 'element-plus/es/components/base/style/css';
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- @charset "UTF-8";.loading[data-v-2b901926] {
1
+ .loading[data-v-2b901926] {
2
2
  width: 100%;
3
3
  height: 100%;
4
4
  min-height: 40px;
@@ -12,50 +12,7 @@
12
12
  .control > div[data-v-4ce4907e] {
13
13
  display: flex;
14
14
  align-items: center;
15
- }
16
- .menu-item[data-v-05298bcd] {
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- width: 32px;
21
- height: 32px;
22
- background: white;
23
- border: 1px solid #ddd;
24
- border-radius: 4px;
25
- cursor: pointer;
26
- transition: all 0.2s ease;
27
- font-style: normal;
28
- }
29
- .menu-item[data-v-05298bcd]:hover {
30
- background-color: #f0f0f0;
31
- border-color: #999;
32
- }
33
- .menu-item.is-active[data-v-05298bcd] {
34
- background-color: #e0e0e0;
35
- border-color: #666;
36
- }
37
- .menu-icon[data-v-05298bcd] {
38
- font-size: 16px;
39
- color: #333;
40
- }
41
-
42
- .editor__header[data-v-714af93c] {
43
- display: flex;
44
- align-items: center;
45
- gap: 4px;
46
- padding: 8px 12px;
47
- border: 1px solid #DCDFE6;
48
- border-bottom: none;
49
- background-color: #f8f9fa;
50
- flex-wrap: wrap;
51
- }
52
- .divider[data-v-714af93c] {
53
- width: 1px;
54
- height: 20px;
55
- background-color: #DCDFE6;
56
- margin: 0 4px;
57
- }
58
- .starfish-editor .el-form-item__content,
15
+ }.starfish-editor .el-form-item__content,
59
16
  .starfish-form .el-form-item__content,
60
17
  .starfish-dynamicform .el-form-item__content {
61
18
  margin-left: 0 !important;
@@ -93,7 +50,7 @@
93
50
  .starfish-form .el-form-item__error,
94
51
  .starfish-dynamicform .el-form-item__error {
95
52
  top: 100%;
96
- left: 15px !important;
53
+ left: 120px !important;
97
54
  }
98
55
  .starfish-editor .el-form,
99
56
  .starfish-form .el-form,
@@ -467,96 +424,32 @@
467
424
  width: 100%;
468
425
  min-height: 60px;
469
426
  height: 100%;
470
- }
471
- .rich-text-editor[data-v-715a995e] {
427
+ }.rich-text-editor[data-v-44f321dd] {
472
428
  min-height: 200px;
429
+ position: relative;
430
+ z-index: 1;
473
431
  }
474
- [data-v-715a995e] .editor-content {
432
+ [data-v-44f321dd] .editor-content {
475
433
  min-height: 200px;
476
434
  }
477
- [data-v-715a995e] .ProseMirror {
478
- min-height: 180px;
479
- outline: none;
480
- padding: 12px;
481
- }
482
- [data-v-715a995e] .ProseMirror p.is-editor-empty:first-child::before {
483
- color: #adb5bd;
484
- content: attr(data-placeholder);
485
- float: left;
486
- height: 0;
487
- pointer-events: none;
488
- }
489
-
490
- /* 行内代码样式 */
491
- [data-v-715a995e] .ProseMirror .inline-code {
492
- background-color: #f3f4f6;
493
- color: #e53e3e;
494
- padding: 2px 6px;
495
- border-radius: 4px;
496
- font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
497
- font-size: 0.875em;
498
- border: 1px solid #e5e7eb;
499
- }
500
-
501
- /* 代码块样式 */
502
- [data-v-715a995e] .ProseMirror .code-block {
503
- background-color: #1f2937;
504
- color: #f9fafb;
505
- padding: 16px;
506
- border-radius: 8px;
507
- margin: 12px 0;
508
- font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
509
- font-size: 0.875em;
510
- line-height: 1.5;
435
+ [data-v-44f321dd] .editor-content .ql-toolbar {
436
+ z-index: 100;
437
+ background: white;
438
+ border: 1px solid #ccc;
439
+ border-top-left-radius: 4px;
440
+ border-top-right-radius: 4px;
511
441
  position: relative;
512
- border: 1px solid #374151;
513
- }
514
-
515
- /* 引用块样式 */
516
- [data-v-715a995e] .ProseMirror blockquote {
517
- border-left: 4px solid #3b82f6;
518
- background-color: #f8fafc;
519
- padding: 12px 16px;
520
- margin: 12px 0;
521
- border-radius: 0 8px 8px 0;
522
- font-style: italic;
523
- color: #4b5563;
524
- }
525
-
526
- /* 水平分割线样式 */
527
- [data-v-715a995e] .ProseMirror hr {
528
- border: none;
529
- border-top: 2px solid #e5e7eb;
530
- margin: 24px 0;
531
- }
532
-
533
- /* 列表样式 */
534
- [data-v-715a995e] .ProseMirror ul,[data-v-715a995e] .ProseMirror ol {
535
- padding-left: 24px;
536
- margin: 12px 0;
537
- }
538
- [data-v-715a995e] .ProseMirror ul {
539
- list-style: disc;
540
- }
541
- [data-v-715a995e] .ProseMirror ol {
542
- list-style: decimal;
543
- }
544
- [data-v-715a995e] .ProseMirror li {
545
- margin: 4px 0;
546
- }
547
-
548
- /* 标题样式 */
549
- [data-v-715a995e] .ProseMirror h1 {
550
- font-size: 1.875em;
551
- font-weight: bold;
552
- margin: 24px 0 16px 0;
553
- color: #111827;
554
442
  }
555
- [data-v-715a995e] .ProseMirror h2 {
556
- font-size: 1.5em;
557
- font-weight: bold;
558
- margin: 20px 0 12px 0;
559
- color: #111827;
443
+ [data-v-44f321dd] .editor-content .ql-container {
444
+ border: 1px solid #ccc;
445
+ border-top: none;
446
+ border-bottom-left-radius: 4px;
447
+ border-bottom-right-radius: 4px;
448
+ min-height: 200px;
449
+ z-index: 99;
450
+ }
451
+ [data-v-44f321dd] .shape .rich-text-editor {
452
+ pointer-events: auto !important;
560
453
  }.cm-gutters.cm-gutters-before {
561
454
  background: #133F63;
562
455
  }.el-collapse-item {
@@ -1,3 +1,3 @@
1
- import type { DefineComponent, ComponentOptionsMixin, EmitsOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
2
- declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
1
+ import type { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3
3
  export default _default;
@@ -1,7 +1,5 @@
1
- import type { Ref } from '@vue/reactivity';
2
- import type { DefineComponent, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
3
- import { App } from "vue";
4
- export declare const Dynamicform: DefineComponent<{
1
+ import type { DefineComponent, ExtractPropTypes, PropType, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, App } from 'vue';
2
+ export declare const Dynamicform: DefineComponent<ExtractPropTypes<{
5
3
  allFormList: {
6
4
  type: PropType<any>;
7
5
  default(): never[];
@@ -18,14 +16,14 @@ export declare const Dynamicform: DefineComponent<{
18
16
  type: BooleanConstructor;
19
17
  default: boolean;
20
18
  };
21
- }, {
19
+ }>, {
22
20
  rules: any;
23
- ruleForm: Ref<any>;
24
- controlObj: Ref<any>;
21
+ ruleForm: Ref<any, any>;
22
+ controlObj: Ref<any, any>;
25
23
  handleControlChange: () => void;
26
24
  reset: () => void;
27
25
  getValidate: () => Promise<unknown>;
28
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
26
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
29
27
  allFormList: {
30
28
  type: PropType<any>;
31
29
  default(): never[];
@@ -42,12 +40,12 @@ export declare const Dynamicform: DefineComponent<{
42
40
  type: BooleanConstructor;
43
41
  default: boolean;
44
42
  };
45
- }>>, {
43
+ }>> & Readonly<{}>, {
46
44
  readonly: boolean;
47
45
  allFormList: any;
48
46
  formResult: Record<string, any>;
49
47
  globalConfig: Record<string, any>;
50
- }>;
48
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
51
49
  declare const _default: {
52
50
  install: (app: App<any>) => void;
53
51
  };
@@ -1,7 +1,5 @@
1
- import type { Ref } from '@vue/reactivity';
2
- import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from '@vue/runtime-core';
3
- import { PropType } from "vue";
4
- declare const _sfc_main: DefineComponent<{
1
+ import type { DefineComponent, ExtractPropTypes, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ declare const _sfc_main: DefineComponent<ExtractPropTypes<{
5
3
  allFormList: {
6
4
  type: PropType<any>;
7
5
  default(): never[];
@@ -18,14 +16,14 @@ declare const _sfc_main: DefineComponent<{
18
16
  type: BooleanConstructor;
19
17
  default: boolean;
20
18
  };
21
- }, {
19
+ }>, {
22
20
  rules: any;
23
- ruleForm: Ref<any>;
24
- controlObj: Ref<any>;
21
+ ruleForm: Ref<any, any>;
22
+ controlObj: Ref<any, any>;
25
23
  handleControlChange: () => void;
26
24
  reset: () => void;
27
25
  getValidate: () => Promise<unknown>;
28
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
26
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
29
27
  allFormList: {
30
28
  type: PropType<any>;
31
29
  default(): never[];
@@ -42,10 +40,10 @@ declare const _sfc_main: DefineComponent<{
42
40
  type: BooleanConstructor;
43
41
  default: boolean;
44
42
  };
45
- }>>, {
43
+ }>> & Readonly<{}>, {
46
44
  readonly: boolean;
47
45
  allFormList: any;
48
46
  formResult: Record<string, any>;
49
47
  globalConfig: Record<string, any>;
50
- }>;
48
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
51
49
  export default _sfc_main;
package/package.json CHANGED
@@ -1,52 +1,43 @@
1
- {
2
- "name": "starfish-form-custom",
3
- "version": "1.0.44",
4
- "main": "dist/starfish-form.mjs",
5
- "style": "dist/style.css",
6
- "module": "dist/starfish-form.mjs",
7
- "types": "dist/types/starfish-form.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/starfish-form.mjs"
11
- },
12
- "./dist/style.css": {
13
- "import": "./dist/style.css"
14
- },
15
- "./*": "./*"
16
- },
17
- "scripts": {
18
- "build": "vite build",
19
- "prepublish": "npm version && npm run build"
20
- },
21
- "dependencies": {
22
- "@codemirror/lang-javascript": "6.0.2",
23
- "@element-plus/icons-vue": "^2.0.8",
24
- "@tiptap/extension-blockquote": "^3.10.7",
25
- "@tiptap/extension-code": "^3.10.7",
26
- "@tiptap/extension-code-block": "^3.13.0",
27
- "@tiptap/extension-code-block-lowlight": "^3.10.7",
28
- "@tiptap/extension-horizontal-rule": "^3.10.7",
29
- "@tiptap/extension-underline": "^3.10.7",
30
- "@tiptap/pm": "^3.10.7",
31
- "@tiptap/starter-kit": "^3.10.7",
32
- "@tiptap/vue-3": "^3.10.7",
33
- "codemirror": "6.0.1",
34
- "element-plus": "^2.2.12",
35
- "jsoneditor": "^9.9.0",
36
- "lowlight": "^3.3.0",
37
- "remixicon": "^4.7.0",
38
- "vue": "^3.2.25",
39
- "vue-codemirror": "6.1.1"
40
- },
41
- "devDependencies": {
42
- "@vitejs/plugin-vue": "^2.3.3",
43
- "rollup-plugin-visualizer": "^5.8.3",
44
- "sass": "^1.35.1",
45
- "typescript": "^4.5.4",
46
- "unplugin-auto-import": "^0.17.5",
47
- "unplugin-vue-components": "^0.26.0",
48
- "vite": "^4.5.2",
49
- "vite-plugin-dts": "^1.2.0",
50
- "vue-tsc": "^0.34.7"
51
- }
52
- }
1
+ {
2
+ "name": "starfish-form-custom",
3
+ "version": "1.0.45",
4
+ "main": "dist/starfish-form.mjs",
5
+ "style": "dist/style.css",
6
+ "module": "dist/starfish-form.mjs",
7
+ "types": "dist/types/starfish-form.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/starfish-form.mjs"
11
+ },
12
+ "./dist/style.css": {
13
+ "import": "./dist/style.css"
14
+ },
15
+ "./*": "./*"
16
+ },
17
+ "scripts": {
18
+ "build": "vite build",
19
+ "prepublish": "npm version && npm run build"
20
+ },
21
+ "dependencies": {
22
+ "@codemirror/lang-javascript": "6.0.2",
23
+ "@element-plus/icons-vue": "^2.0.8",
24
+ "@vueup/vue-quill": "^1.2.0",
25
+ "codemirror": "6.0.1",
26
+ "element-plus": "^2.2.12",
27
+ "jsoneditor": "^9.9.0",
28
+ "lowlight": "^3.3.0",
29
+ "vue": "^3.2.25",
30
+ "vue-codemirror": "6.1.1"
31
+ },
32
+ "devDependencies": {
33
+ "@vitejs/plugin-vue": "^2.3.3",
34
+ "rollup-plugin-visualizer": "^5.8.3",
35
+ "sass": "^1.35.1",
36
+ "typescript": "^4.5.4",
37
+ "unplugin-auto-import": "^0.17.5",
38
+ "unplugin-vue-components": "^0.26.0",
39
+ "vite": "^4.5.2",
40
+ "vite-plugin-dts": "^1.2.0",
41
+ "vue-tsc": "^0.34.7"
42
+ }
43
+ }