jky-component-lib 0.0.56 → 0.0.60
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/es/add-input/AddInput.vue.d.ts +27 -0
- package/dist/es/add-input/AddInput.vue.js +151 -0
- package/dist/es/add-input/AddInput.vue3.js +5 -0
- package/dist/es/add-input/index.d.ts +4 -0
- package/dist/es/add-input/index.js +8 -0
- package/dist/es/add-input/style.css +35 -0
- package/dist/es/button-nav/ButtonNav.vue.d.ts +4 -4
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.d.ts +4 -4
- package/dist/es/components.d.ts +3 -0
- package/dist/es/components.js +10 -1
- package/dist/es/form/Form.vue.d.ts +2 -2
- package/dist/es/form/FormItem.vue.js +12 -0
- package/dist/es/index.js +6 -0
- package/dist/es/node_modules/@element-plus/icons-vue/dist/index.js +32 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js +52 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js +10 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js +145 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js +160 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js +26 -0
- package/dist/es/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js +4 -0
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-header/PopoverMenu.vue.d.ts +1 -1
- package/dist/es/page-table/PageTable.vue.d.ts +6087 -0
- package/dist/es/page-table/PageTable.vue.js +378 -0
- package/dist/es/page-table/PageTable.vue3.js +5 -0
- package/dist/es/page-table/Toolbar.vue.d.ts +32 -0
- package/dist/es/page-table/Toolbar.vue.js +271 -0
- package/dist/es/page-table/Toolbar.vue3.js +5 -0
- package/dist/es/page-table/index.d.ts +4 -0
- package/dist/es/page-table/index.js +8 -0
- package/dist/es/page-table/style.css +4 -0
- package/dist/es/rich-editor/RichEditor.vue.d.ts +78 -0
- package/dist/es/rich-editor/RichEditor.vue.js +105 -0
- package/dist/es/rich-editor/RichEditor.vue3.js +5 -0
- package/dist/es/rich-editor/index.d.ts +4 -0
- package/dist/es/rich-editor/index.js +8 -0
- package/dist/es/rich-editor/style.css +34 -0
- package/dist/es/style.css +28 -0
- package/dist/es/styles.css +1 -1
- package/dist/es/utils/index.d.ts +1 -0
- package/dist/es/utils/responsive-toolbar.d.ts +78 -0
- package/dist/es/utils/responsive-toolbar.js +64 -0
- package/dist/lib/add-input/AddInput.vue.d.ts +27 -0
- package/dist/lib/add-input/AddInput.vue.js +151 -0
- package/dist/lib/add-input/AddInput.vue3.js +5 -0
- package/dist/lib/add-input/index.d.ts +4 -0
- package/dist/lib/add-input/index.js +8 -0
- package/dist/lib/add-input/style.css +35 -0
- package/dist/lib/button-nav/ButtonNav.vue.d.ts +4 -4
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.d.ts +4 -4
- package/dist/lib/components.d.ts +3 -0
- package/dist/lib/components.js +30 -21
- package/dist/lib/form/Form.vue.d.ts +2 -2
- package/dist/lib/form/FormItem.vue.js +20 -8
- package/dist/lib/index.js +20 -14
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +32 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/ScriptLoader.js +52 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/TinyMCE.js +10 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/Utils.js +145 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/Editor.js +160 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/components/EditorPropTypes.js +26 -0
- package/dist/lib/node_modules/@tinymce/tinymce-vue/lib/es2015/main/ts/index.js +4 -0
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-header/PopoverMenu.vue.d.ts +1 -1
- package/dist/lib/page-table/PageTable.vue.d.ts +6087 -0
- package/dist/lib/page-table/PageTable.vue.js +378 -0
- package/dist/lib/page-table/PageTable.vue3.js +5 -0
- package/dist/lib/page-table/Toolbar.vue.d.ts +32 -0
- package/dist/lib/page-table/Toolbar.vue.js +271 -0
- package/dist/lib/page-table/Toolbar.vue3.js +5 -0
- package/dist/lib/page-table/index.d.ts +4 -0
- package/dist/lib/page-table/index.js +8 -0
- package/dist/lib/page-table/style.css +4 -0
- package/dist/lib/rich-editor/RichEditor.vue.d.ts +78 -0
- package/dist/lib/rich-editor/RichEditor.vue.js +105 -0
- package/dist/lib/rich-editor/RichEditor.vue3.js +5 -0
- package/dist/lib/rich-editor/index.d.ts +4 -0
- package/dist/lib/rich-editor/index.js +8 -0
- package/dist/lib/rich-editor/style.css +34 -0
- package/dist/lib/style.css +28 -0
- package/dist/lib/styles.css +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/responsive-toolbar.d.ts +78 -0
- package/dist/lib/utils/responsive-toolbar.js +64 -0
- package/package.json +4 -1
- package/dist/umd/index.js +0 -3966
- package/dist/umd/styles.css +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
22
|
+
const vue = require("vue");
|
|
23
|
+
const index = require("../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
24
|
+
const ElementPlus = require("element-plus");
|
|
25
|
+
const _hoisted_1 = { class: "jky-add-input" };
|
|
26
|
+
const _hoisted_2 = { class: "jky-add-input__actions" };
|
|
27
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
28
|
+
name: "JkyAddInput"
|
|
29
|
+
}), {
|
|
30
|
+
__name: "AddInput",
|
|
31
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
32
|
+
modelValue: { default: () => [] },
|
|
33
|
+
disabled: { type: Boolean, default: false },
|
|
34
|
+
readonly: { type: Boolean, default: false },
|
|
35
|
+
keyPlaceholder: { default: "key" },
|
|
36
|
+
valuePlaceholder: { default: "value" },
|
|
37
|
+
addButtonText: { default: "添加" },
|
|
38
|
+
deleteButtonText: { default: "删除" }
|
|
39
|
+
}, {
|
|
40
|
+
"modelValue": {
|
|
41
|
+
default: () => []
|
|
42
|
+
},
|
|
43
|
+
"modelModifiers": {}
|
|
44
|
+
}),
|
|
45
|
+
emits: /* @__PURE__ */ vue.mergeModels(["update:modelValue", "change", "add", "delete"], ["update:modelValue"]),
|
|
46
|
+
setup(__props, { emit: __emit }) {
|
|
47
|
+
const props = __props;
|
|
48
|
+
const emit = __emit;
|
|
49
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
50
|
+
const items = vue.ref([]);
|
|
51
|
+
function initData() {
|
|
52
|
+
if (!props.modelValue || props.modelValue.length === 0) {
|
|
53
|
+
items.value = [{ key: "", value: "" }];
|
|
54
|
+
} else {
|
|
55
|
+
items.value = props.modelValue.map((item) => __spreadValues({}, item));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
vue.watch(
|
|
59
|
+
() => props.modelValue,
|
|
60
|
+
(newValue) => {
|
|
61
|
+
if (!newValue || newValue.length === 0) {
|
|
62
|
+
items.value = [{ key: "", value: "" }];
|
|
63
|
+
} else {
|
|
64
|
+
items.value = newValue.map((item) => __spreadValues({}, item));
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{ deep: true }
|
|
68
|
+
);
|
|
69
|
+
function updateModelValue() {
|
|
70
|
+
modelValue.value = items.value.map((item) => __spreadValues({}, item));
|
|
71
|
+
emit("change", items.value.map((item) => __spreadValues({}, item)));
|
|
72
|
+
}
|
|
73
|
+
function handleAdd() {
|
|
74
|
+
if (props.disabled || props.readonly)
|
|
75
|
+
return;
|
|
76
|
+
items.value = [
|
|
77
|
+
...items.value,
|
|
78
|
+
{ key: "", value: "" }
|
|
79
|
+
];
|
|
80
|
+
updateModelValue();
|
|
81
|
+
emit("add");
|
|
82
|
+
}
|
|
83
|
+
function handleDelete(index2) {
|
|
84
|
+
if (props.disabled || props.readonly)
|
|
85
|
+
return;
|
|
86
|
+
if (items.value.length <= 1)
|
|
87
|
+
return;
|
|
88
|
+
items.value.splice(index2, 1);
|
|
89
|
+
updateModelValue();
|
|
90
|
+
emit("delete", index2);
|
|
91
|
+
}
|
|
92
|
+
initData();
|
|
93
|
+
return (_ctx, _cache) => {
|
|
94
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
95
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items.value, (item, index$1) => {
|
|
96
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
97
|
+
key: index$1,
|
|
98
|
+
class: "jky-add-input__row"
|
|
99
|
+
}, [
|
|
100
|
+
vue.createVNode(vue.unref(ElementPlus.ElInput), {
|
|
101
|
+
"model-value": item.key,
|
|
102
|
+
placeholder: __props.keyPlaceholder,
|
|
103
|
+
disabled: __props.disabled || __props.readonly,
|
|
104
|
+
class: "jky-add-input__key",
|
|
105
|
+
"onUpdate:modelValue": (val) => {
|
|
106
|
+
item.key = val;
|
|
107
|
+
updateModelValue();
|
|
108
|
+
}
|
|
109
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
110
|
+
vue.createVNode(vue.unref(ElementPlus.ElInput), {
|
|
111
|
+
"model-value": item.value,
|
|
112
|
+
placeholder: __props.valuePlaceholder,
|
|
113
|
+
disabled: __props.disabled || __props.readonly,
|
|
114
|
+
class: "jky-add-input__value",
|
|
115
|
+
"onUpdate:modelValue": (val) => {
|
|
116
|
+
item.value = val;
|
|
117
|
+
updateModelValue();
|
|
118
|
+
}
|
|
119
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
120
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
121
|
+
index$1 === 0 || __props.readonly ? (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElButton), {
|
|
122
|
+
key: 0,
|
|
123
|
+
type: "primary",
|
|
124
|
+
disabled: __props.disabled || __props.readonly,
|
|
125
|
+
icon: vue.unref(index.Plus),
|
|
126
|
+
onClick: handleAdd
|
|
127
|
+
}, {
|
|
128
|
+
default: vue.withCtx(() => [
|
|
129
|
+
vue.createTextVNode(vue.toDisplayString(__props.addButtonText), 1)
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["disabled", "icon"])) : (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElButton), {
|
|
133
|
+
key: 1,
|
|
134
|
+
type: "danger",
|
|
135
|
+
disabled: __props.disabled || __props.readonly,
|
|
136
|
+
icon: vue.unref(index.Delete),
|
|
137
|
+
onClick: ($event) => handleDelete(index$1)
|
|
138
|
+
}, {
|
|
139
|
+
default: vue.withCtx(() => [
|
|
140
|
+
vue.createTextVNode(vue.toDisplayString(__props.deleteButtonText), 1)
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}, 8, ["disabled", "icon", "onClick"]))
|
|
144
|
+
])
|
|
145
|
+
]);
|
|
146
|
+
}), 128))
|
|
147
|
+
]);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AddInput_vue_vue_type_script_setup_true_lang = require("./AddInput.vue.js");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
exports.default = AddInput_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AddInput_vue_vue_type_script_setup_true_lang = require("./AddInput.vue.js");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
const withInstall = require("../utils/with-install.js");
|
|
6
|
+
const JkyAddInput = withInstall.installWithSFC(AddInput_vue_vue_type_script_setup_true_lang.default);
|
|
7
|
+
exports.JkyAddInput = JkyAddInput;
|
|
8
|
+
exports.default = JkyAddInput;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
/* 禁止使用 @apply,所有 TailwindCSS 工具类直接写在 class 中 */
|
|
3
|
+
/* 样式文件仅用于定义组件特定的自定义纯 CSS 样式 */
|
|
4
|
+
/* AddInput 组件样式变量 */
|
|
5
|
+
:root {
|
|
6
|
+
--jky-add-input-gap: 12px;
|
|
7
|
+
--jky-add-input-row-gap: 8px;
|
|
8
|
+
--jky-add-input-min-width: 100px;
|
|
9
|
+
--jky-add-input-action-width: 80px;
|
|
10
|
+
}
|
|
11
|
+
.jky-add-input {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: var(--jky-add-input-row-gap);
|
|
15
|
+
min-width: var(--jky-add-input-min-width);
|
|
16
|
+
}
|
|
17
|
+
.jky-add-input__row {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--jky-add-input-gap);
|
|
21
|
+
}
|
|
22
|
+
.jky-add-input__key {
|
|
23
|
+
flex: 1;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
}
|
|
26
|
+
.jky-add-input__value {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
}
|
|
30
|
+
.jky-add-input__actions {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: var(--jky-add-input-gap);
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
width: var(--jky-add-input-action-width);
|
|
35
|
+
}
|
|
@@ -18,19 +18,19 @@ interface NavItem {
|
|
|
18
18
|
to?: RouteLocationRaw;
|
|
19
19
|
}
|
|
20
20
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
-
change: (value: string | number) => any;
|
|
22
21
|
"update:modelValue": (value: string | number) => any;
|
|
22
|
+
change: (value: string | number) => any;
|
|
23
23
|
navClick: (item: NavItem) => any;
|
|
24
24
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
-
onChange?: ((value: string | number) => any) | undefined;
|
|
26
25
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
26
|
+
onChange?: ((value: string | number) => any) | undefined;
|
|
27
27
|
onNavClick?: ((item: NavItem) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
29
|
size: "" | "default" | "large" | "small";
|
|
30
|
-
type: "" | "default" | "
|
|
30
|
+
type: "" | "default" | "text" | "primary" | "success" | "warning" | "info" | "danger";
|
|
31
|
+
plain: boolean;
|
|
31
32
|
items: NavItem[];
|
|
32
33
|
limit: number;
|
|
33
|
-
plain: boolean;
|
|
34
34
|
route: boolean;
|
|
35
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
36
36
|
export default _default;
|
|
@@ -5,15 +5,15 @@ declare const _default: import('vue').DefineComponent<CodeMirrorEditorProps, {
|
|
|
5
5
|
getContent: () => string;
|
|
6
6
|
setContent: (content: string) => void;
|
|
7
7
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
-
change: (value: string) => any;
|
|
9
8
|
"update:modelValue": (value: string) => any;
|
|
9
|
+
change: (value: string) => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<CodeMirrorEditorProps> & Readonly<{
|
|
11
|
-
onChange?: ((value: string) => any) | undefined;
|
|
12
11
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
|
+
onChange?: ((value: string) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
modelValue: string;
|
|
16
14
|
height: string;
|
|
15
|
+
modelValue: string;
|
|
16
|
+
disabled: boolean;
|
|
17
17
|
readonly: boolean;
|
|
18
18
|
language: "javascript" | "typescript" | "json" | "css" | "markdown" | "html" | "vue";
|
|
19
19
|
theme: "oneDark" | "default";
|
package/dist/lib/components.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
|
+
export * from './add-input';
|
|
2
3
|
export * from './button';
|
|
3
4
|
export * from './button-nav';
|
|
4
5
|
export * from './code-mirror-editor';
|
|
5
6
|
export * from './form';
|
|
6
7
|
export * from './menu';
|
|
7
8
|
export * from './page-header';
|
|
9
|
+
export * from './page-table';
|
|
10
|
+
export * from './rich-editor';
|
|
8
11
|
export * from './say-hello';
|
|
9
12
|
export declare const components: Plugin[];
|
|
10
13
|
export default components;
|
package/dist/lib/components.js
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./
|
|
4
|
-
const index$1 = require("./button
|
|
5
|
-
const index$2 = require("./
|
|
6
|
-
const index$3 = require("./
|
|
7
|
-
const index$4 = require("./
|
|
8
|
-
const index$5 = require("./
|
|
9
|
-
const index$6 = require("./
|
|
3
|
+
const index = require("./add-input/index.js");
|
|
4
|
+
const index$1 = require("./button/index.js");
|
|
5
|
+
const index$2 = require("./button-nav/index.js");
|
|
6
|
+
const index$3 = require("./code-mirror-editor/index.js");
|
|
7
|
+
const index$4 = require("./form/index.js");
|
|
8
|
+
const index$5 = require("./menu/index.js");
|
|
9
|
+
const index$6 = require("./page-header/index.js");
|
|
10
|
+
const index$7 = require("./page-table/index.js");
|
|
11
|
+
const index$8 = require("./rich-editor/index.js");
|
|
12
|
+
const index$9 = require("./say-hello/index.js");
|
|
10
13
|
const components = [
|
|
11
|
-
index$
|
|
12
|
-
index.JkyButton,
|
|
13
|
-
index$
|
|
14
|
-
index$
|
|
15
|
-
index$
|
|
16
|
-
index$
|
|
17
|
-
index$
|
|
14
|
+
index$9.JkySayHello,
|
|
15
|
+
index$1.JkyButton,
|
|
16
|
+
index$2.JkyButtonNav,
|
|
17
|
+
index$6.JkyPageHeader,
|
|
18
|
+
index$5.JkyMenu,
|
|
19
|
+
index$4.JkyForm,
|
|
20
|
+
index$3.JkyCodeMirrorEditor,
|
|
21
|
+
index.JkyAddInput,
|
|
22
|
+
index$8.JkyRichEditor,
|
|
23
|
+
index$7.JkyPageTable
|
|
18
24
|
];
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
25
|
+
exports.JkyAddInput = index.JkyAddInput;
|
|
26
|
+
exports.JkyButton = index$1.JkyButton;
|
|
27
|
+
exports.JkyButtonNav = index$2.JkyButtonNav;
|
|
28
|
+
exports.JkyCodeMirrorEditor = index$3.JkyCodeMirrorEditor;
|
|
29
|
+
exports.JkyForm = index$4.JkyForm;
|
|
30
|
+
exports.JkyMenu = index$5.JkyMenu;
|
|
31
|
+
exports.JkyPageHeader = index$6.JkyPageHeader;
|
|
32
|
+
exports.JkyPageTable = index$7.JkyPageTable;
|
|
33
|
+
exports.JkyRichEditor = index$8.JkyRichEditor;
|
|
34
|
+
exports.JkySayHello = index$9.JkySayHello;
|
|
26
35
|
exports.components = components;
|
|
@@ -308,19 +308,19 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
308
308
|
};
|
|
309
309
|
}) | undefined>;
|
|
310
310
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
311
|
+
"update:modelValue": (value: Record<string, any>) => any;
|
|
311
312
|
change: (value: Record<string, any>) => any;
|
|
312
313
|
reset: () => any;
|
|
313
314
|
submit: (data: Record<string, any>) => any;
|
|
314
|
-
"update:modelValue": (value: Record<string, any>) => any;
|
|
315
315
|
validate: (result: {
|
|
316
316
|
valid: boolean;
|
|
317
317
|
fields?: any;
|
|
318
318
|
}) => any;
|
|
319
319
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
320
|
+
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
320
321
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
321
322
|
onReset?: (() => any) | undefined;
|
|
322
323
|
onSubmit?: ((data: Record<string, any>) => any) | undefined;
|
|
323
|
-
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
324
324
|
onValidate?: ((result: {
|
|
325
325
|
valid: boolean;
|
|
326
326
|
fields?: any;
|
|
@@ -52,9 +52,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
54
54
|
const vue = require("vue");
|
|
55
|
-
const index$
|
|
55
|
+
const index$3 = require("../node_modules/@element-plus/icons-vue/dist/index.js");
|
|
56
56
|
const ElementPlus = require("element-plus");
|
|
57
|
-
const index = require("../
|
|
57
|
+
const index = require("../add-input/index.js");
|
|
58
|
+
const index$2 = require("../code-mirror-editor/index.js");
|
|
59
|
+
const index$1 = require("../rich-editor/index.js");
|
|
58
60
|
const _hoisted_1 = {
|
|
59
61
|
key: 0,
|
|
60
62
|
style: { "display": "none" }
|
|
@@ -330,7 +332,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
330
332
|
if (uploadProps["list-type"] === "picture-card") {
|
|
331
333
|
return vue.h(ElementPlus.ElUpload, uploadProps, {
|
|
332
334
|
default: () => vue.h("div", { class: "el-upload__picture-card-wrapper" }, [
|
|
333
|
-
vue.h(ElementPlus.ElIcon, { size: 24 }, { default: () => vue.h(index$
|
|
335
|
+
vue.h(ElementPlus.ElIcon, { size: 24 }, { default: () => vue.h(index$3.Plus) })
|
|
334
336
|
])
|
|
335
337
|
});
|
|
336
338
|
}
|
|
@@ -360,7 +362,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
360
362
|
// CodeMirror 编辑器
|
|
361
363
|
case "code-mirror-editor": {
|
|
362
364
|
const codeMirrorProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
363
|
-
return vue.h(index.JkyCodeMirrorEditor, codeMirrorProps);
|
|
365
|
+
return vue.h(index$2.JkyCodeMirrorEditor, codeMirrorProps);
|
|
366
|
+
}
|
|
367
|
+
// RichEditor 富文本编辑器
|
|
368
|
+
case "rich-editor": {
|
|
369
|
+
const richEditorProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
370
|
+
return vue.h(index$1.JkyRichEditor, richEditorProps);
|
|
371
|
+
}
|
|
372
|
+
// AddInput 动态键值对输入框
|
|
373
|
+
case "add-input": {
|
|
374
|
+
const addInputProps = __spreadValues(__spreadValues({}, commonProps), componentProps.value);
|
|
375
|
+
return vue.h(index.JkyAddInput, addInputProps);
|
|
364
376
|
}
|
|
365
377
|
case "custom":
|
|
366
378
|
return (_b = (_a = props.config).render) == null ? void 0 : _b.call(_a, commonProps);
|
|
@@ -374,10 +386,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
374
386
|
const { help } = props.config;
|
|
375
387
|
const { text, type = "info", position = "top" } = help;
|
|
376
388
|
const iconMap = {
|
|
377
|
-
info: { icon: index$
|
|
378
|
-
warning: { icon: index$
|
|
379
|
-
success: { icon: index$
|
|
380
|
-
error: { icon: index$
|
|
389
|
+
info: { icon: index$3.QuestionFilled, color: "var(--el-color-info)" },
|
|
390
|
+
warning: { icon: index$3.WarningFilled, color: "var(--el-color-warning)" },
|
|
391
|
+
success: { icon: index$3.CircleCheckFilled, color: "var(--el-color-success)" },
|
|
392
|
+
error: { icon: index$3.CircleCloseFilled, color: "var(--el-color-error)" }
|
|
381
393
|
};
|
|
382
394
|
const { icon, color } = iconMap[type];
|
|
383
395
|
return vue.h(
|
package/dist/lib/index.js
CHANGED
|
@@ -4,25 +4,31 @@ const components = require("./components.js");
|
|
|
4
4
|
const installer$1 = require("./utils/installer.js");
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const resolver = require("./resolver.js");
|
|
7
|
-
const index = require("./
|
|
8
|
-
const index$1 = require("./button
|
|
9
|
-
const index$2 = require("./
|
|
10
|
-
const index$3 = require("./
|
|
11
|
-
const index$4 = require("./
|
|
12
|
-
const index$5 = require("./
|
|
13
|
-
const index$6 = require("./
|
|
7
|
+
const index = require("./add-input/index.js");
|
|
8
|
+
const index$1 = require("./button/index.js");
|
|
9
|
+
const index$2 = require("./button-nav/index.js");
|
|
10
|
+
const index$3 = require("./code-mirror-editor/index.js");
|
|
11
|
+
const index$4 = require("./form/index.js");
|
|
12
|
+
const index$5 = require("./menu/index.js");
|
|
13
|
+
const index$6 = require("./page-header/index.js");
|
|
14
|
+
const index$7 = require("./page-table/index.js");
|
|
15
|
+
const index$8 = require("./rich-editor/index.js");
|
|
16
|
+
const index$9 = require("./say-hello/index.js");
|
|
14
17
|
const installer = installer$1.createInstaller(components.components);
|
|
15
18
|
const install = installer.install;
|
|
16
19
|
const version = installer.version;
|
|
17
20
|
exports.components = components.components;
|
|
18
21
|
exports.JkyComponentLibResolver = resolver.JkyComponentLibResolver;
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
22
|
+
exports.JkyAddInput = index.JkyAddInput;
|
|
23
|
+
exports.JkyButton = index$1.JkyButton;
|
|
24
|
+
exports.JkyButtonNav = index$2.JkyButtonNav;
|
|
25
|
+
exports.JkyCodeMirrorEditor = index$3.JkyCodeMirrorEditor;
|
|
26
|
+
exports.JkyForm = index$4.JkyForm;
|
|
27
|
+
exports.JkyMenu = index$5.JkyMenu;
|
|
28
|
+
exports.JkyPageHeader = index$6.JkyPageHeader;
|
|
29
|
+
exports.JkyPageTable = index$7.JkyPageTable;
|
|
30
|
+
exports.JkyRichEditor = index$8.JkyRichEditor;
|
|
31
|
+
exports.JkySayHello = index$9.JkySayHello;
|
|
26
32
|
exports.default = installer;
|
|
27
33
|
exports.install = install;
|
|
28
34
|
exports.version = version;
|
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
5
|
+
var _sfc_main6 = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
name: "ArrowDown",
|
|
7
|
+
__name: "arrow-down",
|
|
8
|
+
setup(__props) {
|
|
9
|
+
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
viewBox: "0 0 1024 1024"
|
|
12
|
+
}, [
|
|
13
|
+
vue.createElementVNode("path", {
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
|
|
16
|
+
})
|
|
17
|
+
]));
|
|
18
|
+
}
|
|
19
|
+
}), arrow_down_default = _sfc_main6;
|
|
5
20
|
var _sfc_main48 = /* @__PURE__ */ vue.defineComponent({
|
|
6
21
|
name: "CircleCheckFilled",
|
|
7
22
|
__name: "circle-check-filled",
|
|
@@ -32,6 +47,21 @@ var _sfc_main50 = /* @__PURE__ */ vue.defineComponent({
|
|
|
32
47
|
]));
|
|
33
48
|
}
|
|
34
49
|
}), circle_close_filled_default = _sfc_main50;
|
|
50
|
+
var _sfc_main80 = /* @__PURE__ */ vue.defineComponent({
|
|
51
|
+
name: "Delete",
|
|
52
|
+
__name: "delete",
|
|
53
|
+
setup(__props) {
|
|
54
|
+
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
viewBox: "0 0 1024 1024"
|
|
57
|
+
}, [
|
|
58
|
+
vue.createElementVNode("path", {
|
|
59
|
+
fill: "currentColor",
|
|
60
|
+
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
61
|
+
})
|
|
62
|
+
]));
|
|
63
|
+
}
|
|
64
|
+
}), delete_default = _sfc_main80;
|
|
35
65
|
var _sfc_main201 = /* @__PURE__ */ vue.defineComponent({
|
|
36
66
|
name: "Plus",
|
|
37
67
|
__name: "plus",
|
|
@@ -77,8 +107,10 @@ var _sfc_main287 = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
107
|
]));
|
|
78
108
|
}
|
|
79
109
|
}), warning_filled_default = _sfc_main287;
|
|
110
|
+
exports.ArrowDown = arrow_down_default;
|
|
80
111
|
exports.CircleCheckFilled = circle_check_filled_default;
|
|
81
112
|
exports.CircleCloseFilled = circle_close_filled_default;
|
|
113
|
+
exports.Delete = delete_default;
|
|
82
114
|
exports.Plus = plus_default;
|
|
83
115
|
exports.QuestionFilled = question_filled_default;
|
|
84
116
|
exports.WarningFilled = warning_filled_default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Utils = require("./Utils.js");
|
|
4
|
+
var createState = function() {
|
|
5
|
+
return {
|
|
6
|
+
listeners: [],
|
|
7
|
+
scriptId: Utils.uuid("tiny-script"),
|
|
8
|
+
scriptLoaded: false
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
var CreateScriptLoader = function() {
|
|
12
|
+
var state = createState();
|
|
13
|
+
var injectScriptTag = function(scriptId, doc, url, callback) {
|
|
14
|
+
var scriptTag = doc.createElement("script");
|
|
15
|
+
scriptTag.referrerPolicy = "origin";
|
|
16
|
+
scriptTag.type = "application/javascript";
|
|
17
|
+
scriptTag.id = scriptId;
|
|
18
|
+
scriptTag.src = url;
|
|
19
|
+
var handler = function() {
|
|
20
|
+
scriptTag.removeEventListener("load", handler);
|
|
21
|
+
callback();
|
|
22
|
+
};
|
|
23
|
+
scriptTag.addEventListener("load", handler);
|
|
24
|
+
if (doc.head) {
|
|
25
|
+
doc.head.appendChild(scriptTag);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var load = function(doc, url, callback) {
|
|
29
|
+
if (state.scriptLoaded) {
|
|
30
|
+
callback();
|
|
31
|
+
} else {
|
|
32
|
+
state.listeners.push(callback);
|
|
33
|
+
if (!doc.getElementById(state.scriptId)) {
|
|
34
|
+
injectScriptTag(state.scriptId, doc, url, function() {
|
|
35
|
+
state.listeners.forEach(function(fn) {
|
|
36
|
+
return fn();
|
|
37
|
+
});
|
|
38
|
+
state.scriptLoaded = true;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var reinitialize = function() {
|
|
44
|
+
state = createState();
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
load,
|
|
48
|
+
reinitialize
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
var ScriptLoader = CreateScriptLoader();
|
|
52
|
+
exports.ScriptLoader = ScriptLoader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var getGlobal = function() {
|
|
4
|
+
return typeof window !== "undefined" ? window : global;
|
|
5
|
+
};
|
|
6
|
+
var getTinymce = function() {
|
|
7
|
+
var global2 = getGlobal();
|
|
8
|
+
return global2 && global2.tinymce ? global2.tinymce : null;
|
|
9
|
+
};
|
|
10
|
+
exports.getTinymce = getTinymce;
|