@a2simcode/ui 0.0.149 → 0.0.150
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/dist/components/code-mirror/index.d.ts +8 -8
- package/dist/components/code-mirror/src/code-mirror.vue.d.ts +4 -4
- package/dist/simcode-ui.es.js +18 -18
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/docs/components/code-mirror.md +1 -1
- package/docs/components/meta/code-mirror.ts +3 -3
- package/docs/examples/code-mirror/basic.vue +1 -1
- package/docs/examples/code-mirror/events.vue +1 -1
- package/docs/examples/code-mirror/height.vue +1 -1
- package/docs/examples/code-mirror/mode.vue +1 -1
- package/docs/examples/code-mirror/readonly.vue +1 -1
- package/docs/examples/form/basic.vue +6 -0
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
declare const JCodeMirror: {
|
|
2
2
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').CodeMirrorProps> & Readonly<{
|
|
3
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
3
4
|
onChange?: ((data: {
|
|
4
5
|
value: string;
|
|
5
6
|
}) => any) | undefined;
|
|
6
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
8
|
sqlFormatter: () => void;
|
|
9
9
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: string) => any;
|
|
10
11
|
change: (data: {
|
|
11
12
|
value: string;
|
|
12
13
|
}) => any;
|
|
13
|
-
"update:value": (value: string) => any;
|
|
14
14
|
}, import('vue').PublicProps, {
|
|
15
15
|
height: number;
|
|
16
16
|
mode: string;
|
|
17
|
-
|
|
17
|
+
modelValue: string;
|
|
18
18
|
readonly: boolean;
|
|
19
19
|
isHint: boolean;
|
|
20
20
|
handleHint: (str: string) => any[];
|
|
@@ -29,16 +29,16 @@ declare const JCodeMirror: {
|
|
|
29
29
|
M: {};
|
|
30
30
|
Defaults: {};
|
|
31
31
|
}, Readonly<import('..').CodeMirrorProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
32
33
|
onChange?: ((data: {
|
|
33
34
|
value: string;
|
|
34
35
|
}) => any) | undefined;
|
|
35
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
sqlFormatter: () => void;
|
|
38
38
|
}, {}, {}, {}, {
|
|
39
39
|
height: number;
|
|
40
40
|
mode: string;
|
|
41
|
-
|
|
41
|
+
modelValue: string;
|
|
42
42
|
readonly: boolean;
|
|
43
43
|
isHint: boolean;
|
|
44
44
|
handleHint: (str: string) => any[];
|
|
@@ -48,21 +48,21 @@ declare const JCodeMirror: {
|
|
|
48
48
|
__isTeleport?: never;
|
|
49
49
|
__isSuspense?: never;
|
|
50
50
|
} & import('vue').ComponentOptionsBase<Readonly<import('..').CodeMirrorProps> & Readonly<{
|
|
51
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
51
52
|
onChange?: ((data: {
|
|
52
53
|
value: string;
|
|
53
54
|
}) => any) | undefined;
|
|
54
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
55
55
|
}>, {
|
|
56
56
|
sqlFormatter: () => void;
|
|
57
57
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
|
+
"update:modelValue": (value: string) => any;
|
|
58
59
|
change: (data: {
|
|
59
60
|
value: string;
|
|
60
61
|
}) => any;
|
|
61
|
-
"update:value": (value: string) => any;
|
|
62
62
|
}, string, {
|
|
63
63
|
height: number;
|
|
64
64
|
mode: string;
|
|
65
|
-
|
|
65
|
+
modelValue: string;
|
|
66
66
|
readonly: boolean;
|
|
67
67
|
isHint: boolean;
|
|
68
68
|
handleHint: (str: string) => any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface CodeMirrorProps {
|
|
2
2
|
/** 值 */
|
|
3
|
-
|
|
3
|
+
modelValue?: string;
|
|
4
4
|
/** 语言模式 */
|
|
5
5
|
mode?: string;
|
|
6
6
|
/** 只读 */
|
|
@@ -21,19 +21,19 @@ declare const _default: import('vue').DefineComponent<CodeMirrorProps, {
|
|
|
21
21
|
*/
|
|
22
22
|
sqlFormatter: () => void;
|
|
23
23
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: string) => any;
|
|
24
25
|
change: (data: {
|
|
25
26
|
value: string;
|
|
26
27
|
}) => any;
|
|
27
|
-
"update:value": (value: string) => any;
|
|
28
28
|
}, string, import('vue').PublicProps, Readonly<CodeMirrorProps> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
30
|
onChange?: ((data: {
|
|
30
31
|
value: string;
|
|
31
32
|
}) => any) | undefined;
|
|
32
|
-
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
height: number;
|
|
35
35
|
mode: string;
|
|
36
|
-
|
|
36
|
+
modelValue: string;
|
|
37
37
|
readonly: boolean;
|
|
38
38
|
isHint: boolean;
|
|
39
39
|
handleHint: (str: string) => any[];
|
package/dist/simcode-ui.es.js
CHANGED
|
@@ -5367,13 +5367,13 @@ var xp = class {
|
|
|
5367
5367
|
getTableData: v
|
|
5368
5368
|
}) || "")), T = O(() => {
|
|
5369
5369
|
if (A.value !== "j-tree")
|
|
5370
|
-
return r({
|
|
5370
|
+
return r ? r({
|
|
5371
5371
|
type: A.value,
|
|
5372
5372
|
config: C.value,
|
|
5373
5373
|
formData: s || {},
|
|
5374
5374
|
row: m,
|
|
5375
5375
|
getTableData: v
|
|
5376
|
-
}) || [];
|
|
5376
|
+
}) || [] : [];
|
|
5377
5377
|
}), A = O(() => n.isTableCell && (x.value === "j-radio" || x.value === "j-checkbox") ? "j-select" : x.value === "j-textarea" ? "j-input" : ((x.value == null || x.value === "") && console.warn("组件类型不能为空"), x.value)), j = (B) => l({
|
|
5378
5378
|
value: B,
|
|
5379
5379
|
config: D.value || {},
|
|
@@ -10032,13 +10032,13 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10032
10032
|
right: 560
|
|
10033
10033
|
}, Dn({
|
|
10034
10034
|
default: K(() => [X(h, {
|
|
10035
|
-
|
|
10036
|
-
"onUpdate:
|
|
10035
|
+
modelValue: i.value,
|
|
10036
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => i.value = v),
|
|
10037
10037
|
mode: e.mode,
|
|
10038
10038
|
"is-hint": e.isHint,
|
|
10039
10039
|
"handle-hint": e.handleHint
|
|
10040
10040
|
}, null, 8, [
|
|
10041
|
-
"
|
|
10041
|
+
"modelValue",
|
|
10042
10042
|
"mode",
|
|
10043
10043
|
"is-hint",
|
|
10044
10044
|
"handle-hint"
|
|
@@ -10047,10 +10047,10 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10047
10047
|
}, [e.example ? {
|
|
10048
10048
|
name: "right",
|
|
10049
10049
|
fn: K(() => [X(h, {
|
|
10050
|
-
value: e.example,
|
|
10050
|
+
"model-value": e.example,
|
|
10051
10051
|
mode: e.mode,
|
|
10052
|
-
|
|
10053
|
-
}, null, 8, ["value", "mode"])]),
|
|
10052
|
+
readonly: ""
|
|
10053
|
+
}, null, 8, ["model-value", "mode"])]),
|
|
10054
10054
|
key: "0"
|
|
10055
10055
|
} : void 0]), 1024)]),
|
|
10056
10056
|
_: 1
|
|
@@ -10499,7 +10499,7 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10499
10499
|
name: "JCodeMirror",
|
|
10500
10500
|
__name: "code-mirror",
|
|
10501
10501
|
props: {
|
|
10502
|
-
|
|
10502
|
+
modelValue: { default: "" },
|
|
10503
10503
|
mode: { default: "javascript" },
|
|
10504
10504
|
readonly: {
|
|
10505
10505
|
type: Boolean,
|
|
@@ -10519,7 +10519,7 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10519
10519
|
default: !1
|
|
10520
10520
|
}
|
|
10521
10521
|
},
|
|
10522
|
-
emits: ["update:
|
|
10522
|
+
emits: ["update:modelValue", "change"],
|
|
10523
10523
|
setup(e, { expose: t, emit: n }) {
|
|
10524
10524
|
const a = e, o = n, i = I(), r = I("");
|
|
10525
10525
|
let l = null;
|
|
@@ -10616,17 +10616,17 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10616
10616
|
}] })), g.push(Zi.updateListener.of((v) => {
|
|
10617
10617
|
if (v.docChanged) {
|
|
10618
10618
|
const _ = v.state.doc.toString();
|
|
10619
|
-
r.value = _, o("update:
|
|
10619
|
+
r.value = _, o("update:modelValue", _), o("change", { value: _ });
|
|
10620
10620
|
}
|
|
10621
10621
|
})), g;
|
|
10622
10622
|
}, u = async () => {
|
|
10623
10623
|
i.value && (l = new Zi({
|
|
10624
10624
|
state: Qi.create({
|
|
10625
|
-
doc: a.
|
|
10625
|
+
doc: a.modelValue,
|
|
10626
10626
|
extensions: s()
|
|
10627
10627
|
}),
|
|
10628
10628
|
parent: i.value
|
|
10629
|
-
}), r.value = a.
|
|
10629
|
+
}), r.value = a.modelValue);
|
|
10630
10630
|
}, f = () => {
|
|
10631
10631
|
if (!l) return;
|
|
10632
10632
|
const g = l.state.doc.toString();
|
|
@@ -10640,10 +10640,10 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10640
10640
|
parent: i.value
|
|
10641
10641
|
}));
|
|
10642
10642
|
const _ = l.state.doc.toString();
|
|
10643
|
-
_ !== a.
|
|
10643
|
+
_ !== a.modelValue && l.dispatch({ changes: {
|
|
10644
10644
|
from: 0,
|
|
10645
10645
|
to: _.length,
|
|
10646
|
-
insert: a.
|
|
10646
|
+
insert: a.modelValue
|
|
10647
10647
|
} });
|
|
10648
10648
|
}, d = () => {
|
|
10649
10649
|
if (!l) return;
|
|
@@ -10667,11 +10667,11 @@ var Ap = { class: "j-table-footer" }, Mp = {
|
|
|
10667
10667
|
}
|
|
10668
10668
|
}, 100);
|
|
10669
10669
|
}, h = () => {
|
|
10670
|
-
let g = Cd(a.
|
|
10671
|
-
g = g.replace(/{ JCODE_SASSID }/g, "{JCODE_SASSID}").replace(/{ JCODE_SASSID_NOTT }/g, "{JCODE_SASSID_NOTT}").replace(/{ JCODE_SASSID_NOTA }/g, "{JCODE_SASSID_NOTA}").replace(/@ /g, "@"), o("update:
|
|
10670
|
+
let g = Cd(a.modelValue);
|
|
10671
|
+
g = g.replace(/{ JCODE_SASSID }/g, "{JCODE_SASSID}").replace(/{ JCODE_SASSID_NOTT }/g, "{JCODE_SASSID_NOTT}").replace(/{ JCODE_SASSID_NOTA }/g, "{JCODE_SASSID_NOTA}").replace(/@ /g, "@"), o("update:modelValue", g), o("change", { value: g });
|
|
10672
10672
|
};
|
|
10673
10673
|
let p = null;
|
|
10674
|
-
return nt(() => a.
|
|
10674
|
+
return nt(() => a.modelValue, (g) => {
|
|
10675
10675
|
g !== r.value && (r.value = g, l && f(), setTimeout(() => {
|
|
10676
10676
|
l && a.isScrollToBottom && d();
|
|
10677
10677
|
}));
|