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.
- package/.pnpm-debug.log +828 -828
- package/components.d.ts +0 -2
- package/dist/{formAction-48f1f081.mjs → formAction-47da9ade.mjs} +44 -52
- package/dist/{index-c2fdc90f.mjs → index-2d78c11c.mjs} +55 -81
- package/dist/{index-e7b2d7c0.mjs → index-b3b75fee.mjs} +39 -92
- package/dist/{index-e8b18d70.mjs → index-d029d3de.mjs} +17 -22
- package/dist/{main-c6aa3683.mjs → main-c9f94a75.mjs} +255 -504
- package/dist/{starfish-form-ac5dbff7.mjs → starfish-form-ff99f526.mjs} +3 -5
- package/dist/starfish-form.mjs +1 -1
- package/dist/style.css +23 -130
- package/dist/types/form/src/common/Loading.vue.d.ts +2 -2
- package/dist/types/form/src/main.d.ts +8 -10
- package/dist/types/form/src/starfish-form.vue.d.ts +8 -10
- package/package.json +43 -52
- package/src/components/RichText/index.vue +64 -179
- package/src/components/Rule/index.vue +2 -2
- package/src/components/Rule/rules.js +3 -3
- package/src/starfish-form.vue +0 -1
- package/src/styles/formedit.scss +115 -115
- package/src/styles/keyvalueConfig.scss +56 -56
- package/src/utils/customHooks.ts +0 -1
- package/stats.html +2230 -2123
- package/dist/types/form/src/common/formAction.vue.d.ts +0 -85
- package/dist/types/form/src/components/RichText/MenuBar.vue.d.ts +0 -34
- package/dist/types/form/src/components/RichText/MenuItem.vue.d.ts +0 -42
- package/src/components/RichText/MenuBar.vue +0 -144
- package/src/components/RichText/MenuItem.vue +0 -98
|
@@ -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-
|
|
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 || "{}",
|
package/dist/starfish-form.mjs
CHANGED
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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:
|
|
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-
|
|
432
|
+
[data-v-44f321dd] .editor-content {
|
|
475
433
|
min-height: 200px;
|
|
476
434
|
}
|
|
477
|
-
[data-v-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
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,
|
|
2
|
-
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
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 '
|
|
2
|
-
|
|
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
|
-
},
|
|
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 '
|
|
2
|
-
|
|
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
|
-
},
|
|
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.
|
|
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
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"vue": "^
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
+
}
|