jky-component-lib 0.0.98 → 0.0.100
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/style.css +1 -1
- package/dist/es/amap/ATrackPlayback.vue.d.ts +69 -0
- package/dist/es/amap/ATrackPlayback.vue.js +237 -0
- package/dist/es/amap/ATrackPlayback.vue3.js +5 -0
- package/dist/es/amap/index.d.ts +3 -1
- package/dist/es/amap/index.js +5 -0
- package/dist/es/amap/style.css +5 -12
- package/dist/es/amap/style2.css +12 -5
- package/dist/es/amap/style3.css +3 -0
- package/dist/es/components.js +5 -1
- package/dist/es/form/Form.vue.d.ts +5 -103
- package/dist/es/form/Form.vue.js +91 -156
- package/dist/es/form/FormItem.vue.js +3 -1
- package/dist/es/form/SelectTable.vue.js +14 -5
- package/dist/es/form/style.css +1 -21
- package/dist/es/index.js +8 -2
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-table/ActionColumn.vue.d.ts +11 -0
- package/dist/es/page-table/ActionColumn.vue.js +137 -0
- package/dist/es/page-table/ActionColumn.vue3.js +5 -0
- package/dist/es/page-table/PageTable.vue.d.ts +51 -433
- package/dist/es/page-table/PageTable.vue.js +136 -76
- package/dist/es/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/es/page-table/PageTableColumn.vue.js +121 -0
- package/dist/es/page-table/PageTableColumn.vue3.js +5 -0
- package/dist/es/page-table/Toolbar.vue.d.ts +1 -1
- package/dist/es/page-table/Toolbar.vue.js +2 -2
- package/dist/es/page-table/index.d.ts +5 -1
- package/dist/es/page-table/index.js +8 -0
- package/dist/es/page-table/style.css +9 -0
- package/dist/es/style.css +144 -0
- package/dist/es/styles.css +1 -1
- package/dist/lib/add-input/style.css +1 -1
- package/dist/lib/amap/ATrackPlayback.vue.d.ts +69 -0
- package/dist/lib/amap/ATrackPlayback.vue.js +237 -0
- package/dist/lib/amap/ATrackPlayback.vue3.js +5 -0
- package/dist/lib/amap/index.d.ts +3 -1
- package/dist/lib/amap/index.js +5 -0
- package/dist/lib/amap/style.css +5 -12
- package/dist/lib/amap/style2.css +12 -5
- package/dist/lib/amap/style3.css +3 -0
- package/dist/lib/components.js +33 -30
- package/dist/lib/form/Form.vue.d.ts +5 -103
- package/dist/lib/form/Form.vue.js +89 -154
- package/dist/lib/form/FormItem.vue.js +3 -1
- package/dist/lib/form/SelectTable.vue.js +13 -4
- package/dist/lib/form/style.css +1 -21
- package/dist/lib/index.js +26 -20
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-table/ActionColumn.vue.d.ts +11 -0
- package/dist/lib/page-table/ActionColumn.vue.js +137 -0
- package/dist/lib/page-table/ActionColumn.vue3.js +5 -0
- package/dist/lib/page-table/PageTable.vue.d.ts +51 -433
- package/dist/lib/page-table/PageTable.vue.js +135 -75
- package/dist/lib/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/lib/page-table/PageTableColumn.vue.js +121 -0
- package/dist/lib/page-table/PageTableColumn.vue3.js +5 -0
- package/dist/lib/page-table/Toolbar.vue.d.ts +1 -1
- package/dist/lib/page-table/Toolbar.vue.js +2 -2
- package/dist/lib/page-table/index.d.ts +5 -1
- package/dist/lib/page-table/index.js +8 -0
- package/dist/lib/page-table/style.css +9 -0
- package/dist/lib/style.css +144 -0
- package/dist/lib/styles.css +1 -1
- package/package.json +1 -1
package/dist/lib/components.js
CHANGED
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index$
|
|
3
|
+
const index$2 = require("./add-input/index.js");
|
|
4
4
|
const index = require("./amap/index.js");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
12
|
-
const index$
|
|
13
|
-
const index$
|
|
5
|
+
const index$3 = require("./button/index.js");
|
|
6
|
+
const index$4 = require("./button-nav/index.js");
|
|
7
|
+
const index$5 = require("./code-mirror-editor/index.js");
|
|
8
|
+
const index$6 = require("./form/index.js");
|
|
9
|
+
const index$7 = require("./menu/index.js");
|
|
10
|
+
const index$8 = require("./modal/index.js");
|
|
11
|
+
const index$9 = require("./page-header/index.js");
|
|
12
|
+
const index$a = require("./page-layout/index.js");
|
|
13
|
+
const index$1 = require("./page-table/index.js");
|
|
14
14
|
const index$b = require("./rich-editor/index.js");
|
|
15
15
|
const index$c = require("./say-hello/index.js");
|
|
16
16
|
const index$d = require("./tabs/index.js");
|
|
17
17
|
const components = [
|
|
18
18
|
index$c.JkySayHello,
|
|
19
|
-
index$
|
|
20
|
-
index$
|
|
21
|
-
index$
|
|
22
|
-
index$
|
|
23
|
-
index$
|
|
24
|
-
index$
|
|
25
|
-
index$
|
|
19
|
+
index$3.JkyButton,
|
|
20
|
+
index$4.JkyButtonNav,
|
|
21
|
+
index$9.JkyPageHeader,
|
|
22
|
+
index$7.JkyMenu,
|
|
23
|
+
index$6.JkyForm,
|
|
24
|
+
index$5.JkyCodeMirrorEditor,
|
|
25
|
+
index$2.JkyAddInput,
|
|
26
26
|
index$b.JkyRichEditor,
|
|
27
|
-
index$
|
|
28
|
-
index$
|
|
27
|
+
index$1.JkyPageTable,
|
|
28
|
+
index$a.JkyPageLayout,
|
|
29
29
|
index$d.JkyTabs,
|
|
30
|
-
index$
|
|
30
|
+
index$8.JkyModal,
|
|
31
31
|
index.JkyAMap
|
|
32
32
|
];
|
|
33
|
-
exports.JkyAddInput = index$
|
|
33
|
+
exports.JkyAddInput = index$2.JkyAddInput;
|
|
34
34
|
exports.JkyAMap = index.JkyAMap;
|
|
35
35
|
exports.JkyAMarker = index.JkyAMarker;
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
36
|
+
exports.JkyATrackPlayback = index.JkyATrackPlayback;
|
|
37
|
+
exports.JkyButton = index$3.JkyButton;
|
|
38
|
+
exports.JkyButtonNav = index$4.JkyButtonNav;
|
|
39
|
+
exports.JkyCodeMirrorEditor = index$5.JkyCodeMirrorEditor;
|
|
40
|
+
exports.JkyForm = index$6.JkyForm;
|
|
41
|
+
exports.JkyMenu = index$7.JkyMenu;
|
|
42
|
+
exports.JkyModal = index$8.JkyModal;
|
|
43
|
+
exports.JkyPageHeader = index$9.JkyPageHeader;
|
|
44
|
+
exports.JkyPageLayout = index$a.JkyPageLayout;
|
|
45
|
+
exports.JkyActionColumn = index$1.JkyActionColumn;
|
|
46
|
+
exports.JkyPageTable = index$1.JkyPageTable;
|
|
47
|
+
exports.JkyPageTableColumn = index$1.JkyPageTableColumn;
|
|
45
48
|
exports.JkyRichEditor = index$b.JkyRichEditor;
|
|
46
49
|
exports.JkySayHello = index$c.JkySayHello;
|
|
47
50
|
exports.JkyTabs = index$d.JkyTabs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FormProps } from './types';
|
|
2
2
|
type __VLS_Props = FormProps;
|
|
3
3
|
declare function validate(callback?: (isValid: boolean, invalidFields?: any) => void): Promise<boolean>;
|
|
4
|
-
declare function resetFields(): void;
|
|
5
4
|
declare function clearValidate(props?: any): void;
|
|
6
5
|
declare function getFormInstance(): ({
|
|
7
6
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -107,10 +106,9 @@ type __VLS_PublicProps = {
|
|
|
107
106
|
} & __VLS_Props;
|
|
108
107
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
109
108
|
validate: typeof validate;
|
|
110
|
-
resetFields: typeof resetFields;
|
|
111
109
|
clearValidate: typeof clearValidate;
|
|
112
110
|
getFormInstance: typeof getFormInstance;
|
|
113
|
-
|
|
111
|
+
form: ({
|
|
114
112
|
$: import('vue').ComponentInternalInstance;
|
|
115
113
|
$data: {};
|
|
116
114
|
$props: {
|
|
@@ -208,105 +206,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
208
206
|
$slots: {
|
|
209
207
|
default?: (props: {}) => any;
|
|
210
208
|
};
|
|
211
|
-
}) | undefined
|
|
212
|
-
$: import('vue').ComponentInternalInstance;
|
|
213
|
-
$data: {};
|
|
214
|
-
$props: {
|
|
215
|
-
readonly model?: Record<string, any> | undefined;
|
|
216
|
-
readonly rules?: import('element-plus').FormRules | undefined;
|
|
217
|
-
readonly labelPosition?: "left" | "right" | "top" | undefined;
|
|
218
|
-
readonly requireAsteriskPosition?: "left" | "right" | undefined;
|
|
219
|
-
readonly labelWidth?: string | number | undefined;
|
|
220
|
-
readonly labelSuffix?: string | undefined;
|
|
221
|
-
readonly inline?: boolean | undefined;
|
|
222
|
-
readonly inlineMessage?: boolean | undefined;
|
|
223
|
-
readonly statusIcon?: boolean | undefined;
|
|
224
|
-
readonly showMessage?: boolean | undefined;
|
|
225
|
-
readonly validateOnRuleChange?: boolean | undefined;
|
|
226
|
-
readonly hideRequiredAsterisk?: boolean | undefined;
|
|
227
|
-
readonly scrollToError?: boolean | undefined;
|
|
228
|
-
readonly scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
|
|
229
|
-
readonly size?: import('element-plus').ComponentSize | undefined;
|
|
230
|
-
readonly disabled?: boolean | undefined;
|
|
231
|
-
readonly onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined | undefined;
|
|
232
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
233
|
-
$attrs: import('vue').Attrs;
|
|
234
|
-
$refs: {
|
|
235
|
-
[x: string]: unknown;
|
|
236
|
-
};
|
|
237
|
-
$slots: Readonly<{
|
|
238
|
-
[name: string]: globalThis.Slot | undefined;
|
|
239
|
-
}>;
|
|
240
|
-
$root: ComponentPublicInstance | null;
|
|
241
|
-
$parent: ComponentPublicInstance | null;
|
|
242
|
-
$host: Element | null;
|
|
243
|
-
$emit: (event: "validate", prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
244
|
-
$el: any;
|
|
245
|
-
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
246
|
-
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
247
|
-
}>, {
|
|
248
|
-
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
249
|
-
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
250
|
-
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
251
|
-
clearValidate: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
252
|
-
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
253
|
-
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
254
|
-
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
255
|
-
setInitialValues: (initModel: Record<string, any>) => void;
|
|
256
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
257
|
-
validate: (prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => void;
|
|
258
|
-
}, string, {
|
|
259
|
-
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
260
|
-
labelWidth: string | number;
|
|
261
|
-
labelPosition: "left" | "right" | "top";
|
|
262
|
-
requireAsteriskPosition: "left" | "right";
|
|
263
|
-
labelSuffix: string;
|
|
264
|
-
showMessage: boolean;
|
|
265
|
-
validateOnRuleChange: boolean;
|
|
266
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
267
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
268
|
-
created?: (() => void) | (() => void)[];
|
|
269
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
270
|
-
mounted?: (() => void) | (() => void)[];
|
|
271
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
272
|
-
updated?: (() => void) | (() => void)[];
|
|
273
|
-
activated?: (() => void) | (() => void)[];
|
|
274
|
-
deactivated?: (() => void) | (() => void)[];
|
|
275
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
276
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
277
|
-
destroyed?: (() => void) | (() => void)[];
|
|
278
|
-
unmounted?: (() => void) | (() => void)[];
|
|
279
|
-
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
280
|
-
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
281
|
-
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
282
|
-
};
|
|
283
|
-
$forceUpdate: () => void;
|
|
284
|
-
$nextTick: typeof import('vue').nextTick;
|
|
285
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
286
|
-
} & Readonly<{
|
|
287
|
-
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
288
|
-
labelWidth: string | number;
|
|
289
|
-
labelPosition: "left" | "right" | "top";
|
|
290
|
-
requireAsteriskPosition: "left" | "right";
|
|
291
|
-
labelSuffix: string;
|
|
292
|
-
showMessage: boolean;
|
|
293
|
-
validateOnRuleChange: boolean;
|
|
294
|
-
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
295
|
-
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
296
|
-
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & {
|
|
297
|
-
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
298
|
-
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
299
|
-
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
300
|
-
clearValidate: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
301
|
-
scrollToField: (prop: import('element-plus').FormItemProp) => void;
|
|
302
|
-
getField: (prop: import('element-plus').FormItemProp) => import('element-plus').FormItemContext | undefined;
|
|
303
|
-
fields: import('vue').Reactive<import('element-plus').FormItemContext[]>;
|
|
304
|
-
setInitialValues: (initModel: Record<string, any>) => void;
|
|
305
|
-
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
306
|
-
$slots: {
|
|
307
|
-
default?: (props: {}) => any;
|
|
308
|
-
};
|
|
309
|
-
}) | undefined>;
|
|
209
|
+
}) | undefined;
|
|
310
210
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
311
211
|
"update:modelValue": (value: Record<string, any>) => any;
|
|
312
212
|
change: (value: Record<string, any>) => any;
|
|
@@ -327,11 +227,11 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
327
227
|
}) => any) | undefined;
|
|
328
228
|
}>, {
|
|
329
229
|
size: import('element-plus').ComponentSize;
|
|
230
|
+
disabled: boolean;
|
|
330
231
|
grid: import('./types').GridConfig;
|
|
331
232
|
inline: boolean;
|
|
332
233
|
labelPosition: "left" | "right" | "top";
|
|
333
234
|
labelWidth: string | number;
|
|
334
|
-
showTitle: boolean;
|
|
335
235
|
gutter: number;
|
|
336
236
|
defaultSpan: number;
|
|
337
237
|
responsive: boolean;
|
|
@@ -340,6 +240,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
340
240
|
footerClass: string;
|
|
341
241
|
submitText: string;
|
|
342
242
|
cancelText: string;
|
|
243
|
+
submitDisabled: boolean;
|
|
244
|
+
cancelDisabled: boolean;
|
|
343
245
|
showCount: number;
|
|
344
246
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
345
247
|
formRef: ({
|
|
@@ -18,18 +18,6 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
return a;
|
|
19
19
|
};
|
|
20
20
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
21
|
var __async = (__this, __arguments, generator) => {
|
|
34
22
|
return new Promise((resolve, reject) => {
|
|
35
23
|
var fulfilled = (value) => {
|
|
@@ -55,10 +43,6 @@ const vue = require("vue");
|
|
|
55
43
|
const ElementPlus = require("element-plus");
|
|
56
44
|
const FormItem_vue_vue_type_script_setup_true_lang = require("./FormItem.vue.js");
|
|
57
45
|
;/* empty css */
|
|
58
|
-
const _hoisted_1 = {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: "jky-form__title mb-4 text-xl font-semibold"
|
|
61
|
-
};
|
|
62
46
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
63
47
|
name: "JkyForm",
|
|
64
48
|
inheritAttrs: false
|
|
@@ -67,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
67
51
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
68
52
|
modelValue: {},
|
|
69
53
|
items: {},
|
|
70
|
-
showTitle: { type: Boolean
|
|
54
|
+
showTitle: { type: Boolean },
|
|
71
55
|
title: {},
|
|
72
56
|
gutter: { default: 0 },
|
|
73
57
|
defaultSpan: { default: 24 },
|
|
@@ -75,14 +59,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
75
59
|
grid: { type: [Boolean, Object], default: false },
|
|
76
60
|
className: {},
|
|
77
61
|
readonly: { type: Boolean },
|
|
78
|
-
disabled: { type: Boolean },
|
|
62
|
+
disabled: { type: Boolean, default: false },
|
|
79
63
|
watchDeep: { type: Boolean, default: true },
|
|
80
64
|
showFooter: { type: Boolean, default: true },
|
|
81
65
|
footerClass: { default: "" },
|
|
82
66
|
submitText: { default: "提交" },
|
|
83
67
|
cancelText: { default: "取消" },
|
|
84
|
-
submitDisabled: { type: Boolean },
|
|
85
|
-
cancelDisabled: { type: Boolean },
|
|
68
|
+
submitDisabled: { type: Boolean, default: false },
|
|
69
|
+
cancelDisabled: { type: Boolean, default: false },
|
|
86
70
|
showCount: { default: 999 },
|
|
87
71
|
onValidate: {},
|
|
88
72
|
onSubmit: {},
|
|
@@ -113,50 +97,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
113
97
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
114
98
|
vue.provide("formModel", modelValue);
|
|
115
99
|
const formRef = vue.ref();
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"defaultSpan",
|
|
124
|
-
"responsive",
|
|
125
|
-
"readonly",
|
|
126
|
-
"disabled",
|
|
127
|
-
"watchDeep",
|
|
128
|
-
"showFooter",
|
|
129
|
-
"footerClass",
|
|
130
|
-
"submitText",
|
|
131
|
-
"cancelText",
|
|
132
|
-
"submitDisabled",
|
|
133
|
-
"cancelDisabled",
|
|
134
|
-
"onValidate",
|
|
135
|
-
"onSubmit",
|
|
136
|
-
"onReset",
|
|
137
|
-
"grid",
|
|
138
|
-
"showCount"
|
|
139
|
-
];
|
|
140
|
-
const elFormProps = vue.computed(() => {
|
|
141
|
-
const formProps = Object.fromEntries(
|
|
142
|
-
Object.entries(props).filter(([key]) => !JKY_FORM_PROPS.includes(key))
|
|
143
|
-
);
|
|
144
|
-
const _a = attrs, { class: _, style } = _a, restAttrs = __objRest(_a, ["class", "style"]);
|
|
145
|
-
return __spreadValues(__spreadValues({ class: props.className || attrs.className || "" }, formProps), restAttrs);
|
|
146
|
-
});
|
|
147
|
-
const formClass = vue.computed(() => {
|
|
148
|
-
return [
|
|
149
|
-
"jky-form",
|
|
150
|
-
attrs.class
|
|
151
|
-
].filter(Boolean).join(" ");
|
|
152
|
-
});
|
|
153
|
-
const _elFormClass = vue.computed(() => {
|
|
154
|
-
const classes = [];
|
|
155
|
-
if (props.inline && props.grid) {
|
|
156
|
-
classes.push("jky-form--grid");
|
|
100
|
+
const showAllItems = vue.ref(false);
|
|
101
|
+
const _visibleItems = vue.computed(() => {
|
|
102
|
+
if (!props.items || props.items.length <= props.showCount) {
|
|
103
|
+
return props.items;
|
|
104
|
+
}
|
|
105
|
+
if (showAllItems.value) {
|
|
106
|
+
return props.items;
|
|
157
107
|
}
|
|
158
|
-
return
|
|
108
|
+
return props.items.slice(0, props.showCount);
|
|
159
109
|
});
|
|
110
|
+
const _showMoreButton = vue.computed(() => {
|
|
111
|
+
return props.items && props.items.length > props.showCount;
|
|
112
|
+
});
|
|
113
|
+
function toggleShowMore() {
|
|
114
|
+
showAllItems.value = !showAllItems.value;
|
|
115
|
+
}
|
|
160
116
|
const _gridStyle = vue.computed(() => {
|
|
161
117
|
if (!props.inline || !props.grid || typeof props.grid === "boolean") {
|
|
162
118
|
return {};
|
|
@@ -171,22 +127,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
171
127
|
});
|
|
172
128
|
return style;
|
|
173
129
|
});
|
|
174
|
-
const showAllItems = vue.ref(false);
|
|
175
|
-
const visibleItems = vue.computed(() => {
|
|
176
|
-
if (!props.items || props.items.length <= props.showCount) {
|
|
177
|
-
return props.items;
|
|
178
|
-
}
|
|
179
|
-
if (showAllItems.value) {
|
|
180
|
-
return props.items;
|
|
181
|
-
}
|
|
182
|
-
return props.items.slice(0, props.showCount);
|
|
183
|
-
});
|
|
184
|
-
const showMoreButton = vue.computed(() => {
|
|
185
|
-
return props.items && props.items.length > props.showCount;
|
|
186
|
-
});
|
|
187
|
-
function toggleShowMore() {
|
|
188
|
-
showAllItems.value = !showAllItems.value;
|
|
189
|
-
}
|
|
190
130
|
vue.watch(
|
|
191
131
|
() => props.modelValue,
|
|
192
132
|
(newVal, oldVal) => {
|
|
@@ -211,12 +151,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
211
151
|
}
|
|
212
152
|
});
|
|
213
153
|
}
|
|
214
|
-
function resetFields() {
|
|
215
|
-
var _a, _b;
|
|
216
|
-
(_a = formRef.value) == null ? void 0 : _a.resetFields();
|
|
217
|
-
emit("reset");
|
|
218
|
-
(_b = props.onReset) == null ? void 0 : _b.call(props);
|
|
219
|
-
}
|
|
220
154
|
function clearValidate(props2) {
|
|
221
155
|
var _a;
|
|
222
156
|
(_a = formRef.value) == null ? void 0 : _a.clearValidate(props2);
|
|
@@ -226,11 +160,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
226
160
|
}
|
|
227
161
|
function handleSubmit() {
|
|
228
162
|
return __async(this, null, function* () {
|
|
229
|
-
var _a
|
|
163
|
+
var _a;
|
|
230
164
|
try {
|
|
231
165
|
yield (_a = formRef.value) == null ? void 0 : _a.validate();
|
|
232
166
|
emit("submit", __spreadValues({}, modelValue.value));
|
|
233
|
-
(_b = props.onSubmit) == null ? void 0 : _b.call(props, __spreadValues({}, modelValue.value));
|
|
234
167
|
} catch (error) {
|
|
235
168
|
emit("validate", { valid: false, fields: error.fields });
|
|
236
169
|
}
|
|
@@ -239,85 +172,87 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
239
172
|
function handleCancel() {
|
|
240
173
|
resetFields();
|
|
241
174
|
}
|
|
175
|
+
function resetFields() {
|
|
176
|
+
var _a;
|
|
177
|
+
(_a = formRef.value) == null ? void 0 : _a.resetFields();
|
|
178
|
+
emit("reset");
|
|
179
|
+
}
|
|
242
180
|
__expose({
|
|
243
181
|
validate,
|
|
244
|
-
resetFields,
|
|
245
182
|
clearValidate,
|
|
246
183
|
getFormInstance,
|
|
247
|
-
|
|
184
|
+
get form() {
|
|
185
|
+
return formRef.value;
|
|
186
|
+
}
|
|
248
187
|
});
|
|
249
188
|
return (_ctx, _cache) => {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
vue.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
189
|
+
const _component_ElButton = vue.resolveComponent("ElButton");
|
|
190
|
+
const _component_ElFormItem = vue.resolveComponent("ElFormItem");
|
|
191
|
+
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElForm), {
|
|
192
|
+
ref_key: "formRef",
|
|
193
|
+
ref: formRef,
|
|
194
|
+
class: vue.normalizeClass(["jky-form", [__props.inline && "jky-form--inline", __props.grid && "jky-form--grid"]]),
|
|
195
|
+
model: modelValue.value,
|
|
196
|
+
style: vue.normalizeStyle(_gridStyle.value)
|
|
197
|
+
}, {
|
|
198
|
+
default: vue.withCtx(() => [
|
|
199
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_visibleItems.value, (item) => {
|
|
200
|
+
return vue.openBlock(), vue.createBlock(FormItem_vue_vue_type_script_setup_true_lang.default, {
|
|
201
|
+
key: item.field,
|
|
202
|
+
field: item.field,
|
|
203
|
+
config: item,
|
|
204
|
+
model: modelValue.value,
|
|
205
|
+
readonly: __props.readonly,
|
|
206
|
+
disabled: __props.disabled
|
|
207
|
+
}, null, 8, ["field", "config", "model", "readonly", "disabled"]);
|
|
208
|
+
}), 128)),
|
|
209
|
+
_showMoreButton.value || props.showFooter ? (vue.openBlock(), vue.createBlock(_component_ElFormItem, {
|
|
210
|
+
key: 0,
|
|
211
|
+
"label-width": 0
|
|
212
|
+
}, {
|
|
213
|
+
default: vue.withCtx(() => [
|
|
214
|
+
vue.createElementVNode("div", {
|
|
215
|
+
class: vue.normalizeClass(["w-full flex gap-2", [props.grid && props.inline ? "justify-center" : "justify-end", props.footerClass]])
|
|
216
|
+
}, [
|
|
217
|
+
_showMoreButton.value ? (vue.openBlock(), vue.createBlock(_component_ElButton, {
|
|
218
|
+
key: 0,
|
|
219
|
+
type: "primary",
|
|
220
|
+
onClick: toggleShowMore
|
|
221
|
+
}, {
|
|
222
|
+
default: vue.withCtx(() => [
|
|
223
|
+
vue.createTextVNode(vue.toDisplayString(showAllItems.value ? "收起" : `展开 (${props.items.length - props.showCount})`), 1)
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
})) : vue.createCommentVNode("", true),
|
|
227
|
+
props.showFooter ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
228
|
+
vue.createVNode(_component_ElButton, {
|
|
229
|
+
disabled: __props.cancelDisabled || __props.disabled,
|
|
230
|
+
onClick: handleCancel
|
|
231
|
+
}, {
|
|
232
|
+
default: vue.withCtx(() => [
|
|
233
|
+
vue.createTextVNode(vue.toDisplayString(__props.cancelText), 1)
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["disabled"]),
|
|
237
|
+
vue.createVNode(_component_ElButton, {
|
|
283
238
|
type: "primary",
|
|
284
|
-
|
|
239
|
+
disabled: __props.submitDisabled || __props.disabled,
|
|
240
|
+
loading: false,
|
|
241
|
+
onClick: handleSubmit
|
|
285
242
|
}, {
|
|
286
243
|
default: vue.withCtx(() => [
|
|
287
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
244
|
+
vue.createTextVNode(vue.toDisplayString(__props.submitText), 1)
|
|
288
245
|
]),
|
|
289
246
|
_: 1
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
_: 1
|
|
300
|
-
}, 8, ["disabled"]),
|
|
301
|
-
vue.createVNode(vue.unref(ElementPlus.ElButton), {
|
|
302
|
-
type: "primary",
|
|
303
|
-
disabled: __props.submitDisabled || __props.disabled,
|
|
304
|
-
loading: false,
|
|
305
|
-
onClick: handleSubmit
|
|
306
|
-
}, {
|
|
307
|
-
default: vue.withCtx(() => [
|
|
308
|
-
vue.createTextVNode(vue.toDisplayString(__props.submitText), 1)
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
}, 8, ["disabled"])
|
|
312
|
-
], 64)) : vue.createCommentVNode("", true)
|
|
313
|
-
], 2)
|
|
314
|
-
]),
|
|
315
|
-
_: 1
|
|
316
|
-
})) : vue.createCommentVNode("", true)
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
}, 16, ["model", "class", "style"])
|
|
320
|
-
], 2);
|
|
247
|
+
}, 8, ["disabled"])
|
|
248
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
249
|
+
], 2)
|
|
250
|
+
]),
|
|
251
|
+
_: 1
|
|
252
|
+
})) : vue.createCommentVNode("", true)
|
|
253
|
+
]),
|
|
254
|
+
_: 1
|
|
255
|
+
}, 8, ["class", "model", "style"]);
|
|
321
256
|
};
|
|
322
257
|
}
|
|
323
258
|
}));
|
|
@@ -368,7 +368,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
368
368
|
}
|
|
369
369
|
// 表格选择器
|
|
370
370
|
case "select-table":
|
|
371
|
-
return vue.h(SelectTable_vue_vue_type_script_setup_true_lang.default, __spreadValues(__spreadValues({}, commonProps), componentProps.value)
|
|
371
|
+
return vue.h(SelectTable_vue_vue_type_script_setup_true_lang.default, __spreadProps(__spreadValues(__spreadValues({}, commonProps), componentProps.value), {
|
|
372
|
+
labelWidth: formItemProps.value.labelWidth
|
|
373
|
+
}));
|
|
372
374
|
case "rate":
|
|
373
375
|
return vue.h(ElementPlus.ElRate, __spreadValues(__spreadValues({}, commonProps), componentProps.value));
|
|
374
376
|
case "input-number": {
|
|
@@ -44,7 +44,6 @@ const ElementPlus = require("element-plus");
|
|
|
44
44
|
const index = require("../page-table/index.js");
|
|
45
45
|
const _hoisted_1 = { class: "jky-select-table" };
|
|
46
46
|
const _hoisted_2 = { class: "jky-select-table__tags" };
|
|
47
|
-
const _hoisted_3 = { class: "jky-select-table__dropdown" };
|
|
48
47
|
const __default__ = {
|
|
49
48
|
name: "JkySelectTable"
|
|
50
49
|
};
|
|
@@ -173,6 +172,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
173
172
|
selectedRows: selectedRows.value
|
|
174
173
|
});
|
|
175
174
|
});
|
|
175
|
+
const _tableOffsetStyle = vue.computed(() => {
|
|
176
|
+
const labelWidth = props.labelWidth || 100;
|
|
177
|
+
const width = typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth;
|
|
178
|
+
return {
|
|
179
|
+
transform: `translateX(-${width})`
|
|
180
|
+
};
|
|
181
|
+
});
|
|
176
182
|
return (_ctx, _cache) => {
|
|
177
183
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
178
184
|
vue.createElementVNode("div", _hoisted_2, [
|
|
@@ -201,13 +207,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
201
207
|
_: 1
|
|
202
208
|
})) : vue.createCommentVNode("", true)
|
|
203
209
|
]),
|
|
204
|
-
vue.withDirectives(vue.createElementVNode("div",
|
|
205
|
-
|
|
210
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
211
|
+
class: "jky-select-table__dropdown w-full",
|
|
212
|
+
style: vue.normalizeStyle(_tableOffsetStyle.value)
|
|
213
|
+
}, [
|
|
214
|
+
vue.createVNode(vue.unref(index.JkyPageTable), vue.mergeProps({ class: "w-full" }, pageTableProps.value, {
|
|
206
215
|
selection: true,
|
|
207
216
|
"selected-rows": selectedRows.value,
|
|
208
217
|
onSelectionChange: handleSelectionChange
|
|
209
218
|
}), null, 16, ["selected-rows"])
|
|
210
|
-
],
|
|
219
|
+
], 4), [
|
|
211
220
|
[vue.vShow, showTable.value]
|
|
212
221
|
])
|
|
213
222
|
]);
|
package/dist/lib/form/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:root {
|
|
1
|
+
.jky-form, :root {
|
|
2
2
|
/* 表单组件间距 */
|
|
3
3
|
/* --jky-form-item-gap: 12px; */
|
|
4
4
|
--jky-form-item-border-width: 4px;
|
|
@@ -67,23 +67,3 @@
|
|
|
67
67
|
grid-template-columns: repeat(var(--jky-form-grid-cols-3xl, var(--jky-form-grid-cols-2xl)), minmax(0, 1fr));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
.jky-form__title {
|
|
71
|
-
/* 表单标题样式 */
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/* FormItem 组件样式 */
|
|
76
|
-
.jky-form-item {
|
|
77
|
-
/* 表单项容器样式 */
|
|
78
|
-
}
|
|
79
|
-
.jky-form-item--no-label {
|
|
80
|
-
/* 表单项标题样式(无 label 时) */
|
|
81
|
-
/* border-left: var(--jky-form-item-border-width) solid var(--jky-form-item-border-color); */
|
|
82
|
-
/* background-color: var(--jky-form-item-bg-color); */
|
|
83
|
-
/* padding-left: var(--jky-form-item-border-width); */
|
|
84
|
-
}
|
|
85
|
-
.jky-form-item__title {
|
|
86
|
-
/* 表单项标题样式(无 label 时) */
|
|
87
|
-
}
|
|
88
|
-
.jky-form-item__title--no-label {
|
|
89
|
-
}
|