@done-coding/admin-core 0.1.1-alpha.6 → 0.1.1-alpha.7
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/es/components/form/FormItem.vue.mjs +2 -2
- package/es/components/form/FormItem.vue2.mjs +10 -7
- package/es/components/form/FormMain.vue.mjs +32 -32
- package/es/components/form/FormRadioGroup.vue.mjs +57 -20
- package/es/components/form/index.mjs +23 -26
- package/es/components/form/utils.mjs +79 -72
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +88 -90
- package/es/components/modal/DetailModal.vue.mjs +33 -32
- package/es/index.mjs +95 -96
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/form/FormRadioGroup.vue.d.ts +31 -19
- package/types/components/form/index.d.ts +1 -2
- package/types/components/form/types.d.ts +5 -0
- package/types/components/form/utils.d.ts +7 -0
- package/types/components/list-page/ListPage.vue.d.ts +0 -2
- package/types/components/list-page/types.d.ts +0 -4
- package/types/components/modal/types.d.ts +2 -0
- package/es/components/form/FormRadio.vue.mjs +0 -69
- package/es/components/form/FormRadio.vue2.mjs +0 -4
- package/types/components/form/FormRadio.vue.d.ts +0 -35
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import { OptionItem } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
5
|
+
notNull: {
|
|
6
|
+
type: globalThis.PropType<boolean>;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
mode: {
|
|
10
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
2
13
|
options: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
19
|
+
notNull: {
|
|
20
|
+
type: globalThis.PropType<boolean>;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
mode: {
|
|
24
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
8
27
|
options: {
|
|
9
|
-
|
|
10
|
-
value: string | number;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
-
} : {
|
|
20
|
-
type: import('vue').PropType<T[K]>;
|
|
28
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
21
29
|
required: true;
|
|
22
30
|
};
|
|
23
|
-
}
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
notNull: boolean;
|
|
33
|
+
mode: "radio" | "buttonGroup";
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -2,7 +2,6 @@ import { Plugin } from 'vue';
|
|
|
2
2
|
import { default as FormMain } from './FormMain.vue';
|
|
3
3
|
import { default as FormSelect } from './FormSelect.vue';
|
|
4
4
|
import { default as FormRadioGroup } from './FormRadioGroup.vue';
|
|
5
|
-
import { default as FormRadio } from './FormRadio.vue';
|
|
6
5
|
import { default as FormTree } from './FormTree.vue';
|
|
7
6
|
import { default as FormSearch } from './FormSearch.vue';
|
|
8
7
|
import { default as FormVerifyImage } from './FormVerifyImage.vue';
|
|
@@ -11,5 +10,5 @@ import { default as FormDatePicker } from './FormDatePicker.vue';
|
|
|
11
10
|
|
|
12
11
|
export * from './types';
|
|
13
12
|
export * from './utils';
|
|
14
|
-
export { FormMain, FormSelect, FormSearch, FormRadioGroup,
|
|
13
|
+
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, FormDatePicker, };
|
|
15
14
|
export declare const formInstall: Plugin;
|
|
@@ -50,6 +50,11 @@ SV extends PK extends keyof SO ? SO[PK] : PV = PK extends keyof SO ? SO[PK] : PV
|
|
|
50
50
|
key: PK;
|
|
51
51
|
/** 表单项label */
|
|
52
52
|
label: string;
|
|
53
|
+
/**
|
|
54
|
+
* 隐藏 label 且不占位(label-wrap 整体 display:none,表单元素顶满整行)。
|
|
55
|
+
* 仅当 label 有值时生效——无 label 时 element-plus 会给 content 加 margin-left 留白,需改用 labelWidth:0。
|
|
56
|
+
*/
|
|
57
|
+
labelHide?: boolean;
|
|
53
58
|
/** 提示信息 */
|
|
54
59
|
tip?: string | (() => VNode);
|
|
55
60
|
/** 表单布局 优先级高于FormMain同名属性 */
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { DateTimeRangeSwiftOption, FormItemConfig, FormItemConfigList, ExtractFormStringifyFromObject, FormItemConfigSwiftOptions } from './types';
|
|
2
|
+
import { ColProps } from 'element-plus';
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 将 layout 解析为各屏幕尺寸的显式值:
|
|
6
|
+
* - 配置 span: xxx 时,xs/sm/md/lg/xl 默认全部视为 xxx
|
|
7
|
+
* - 单独设置某个尺寸则该尺寸覆盖 span 推导值
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveFormLayout: (layout?: Partial<ColProps>) => Partial<ColProps>;
|
|
3
10
|
/** 获取日期选择器默认快捷选项:今日、昨日、近7日 */
|
|
4
11
|
export declare const getDatePickerSwiftOptions: () => DateTimeRangeSwiftOption[];
|
|
5
12
|
/**
|
|
@@ -15,8 +15,6 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
|
|
|
15
15
|
} & Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainRequiredKey> & Partial<Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey>> & {
|
|
16
16
|
tableMainProps?: Partial<Omit<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey | import('./types').TableMainRewriteKey>> | undefined;
|
|
17
17
|
} & {
|
|
18
|
-
showOperation?: boolean;
|
|
19
|
-
showHeader?: boolean;
|
|
20
18
|
list?: FormItemConfigList<PO, SO> | undefined;
|
|
21
19
|
api: (params: import('../table').TableApiParams<import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ>) => Promise<import('../table').TableApiResult<T>>;
|
|
22
20
|
query?: SQ | undefined;
|
|
@@ -24,10 +24,6 @@ F extends Record<string, any>> = Partial<Pick<FormSearchProps<PO, SO, {}>, FormS
|
|
|
24
24
|
} & Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainRequiredKey> & Partial<Pick<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey>> & {
|
|
25
25
|
tableMainProps?: Partial<Omit<TableMainProps<T, ExtractFormStringifyFromObject<PO, SO> & SQ, ListPageInnerInjectInfo<PO, F>>, TableMainOptionsKey | TableMainOptionsKey | TableMainRewriteKey>>;
|
|
26
26
|
} & {
|
|
27
|
-
/** 是否展示操作区 */
|
|
28
|
-
showOperation?: boolean;
|
|
29
|
-
/** 是否展示头部区 */
|
|
30
|
-
showHeader?: boolean;
|
|
31
27
|
list?: FormItemConfigList<PO, SO>;
|
|
32
28
|
/** api */
|
|
33
29
|
api: (params: TableApiParams<ExtractFormStringifyFromObject<PO, SO> & SQ>) => Promise<TableApiResult<T>>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ElRadioGroup as h, ElRadioButton as y, ElRadio as B } from "element-plus/es";
|
|
2
|
-
import "element-plus/es/components/base/style/css";
|
|
3
|
-
import "element-plus/es/components/radio-group/style/css";
|
|
4
|
-
import "element-plus/es/components/radio/style/css";
|
|
5
|
-
import "element-plus/es/components/radio-button/style/css";
|
|
6
|
-
import { defineComponent as V, useModel as _, computed as b, watch as g, openBlock as a, createBlock as r, unref as x, withCtx as d, createElementBlock as m, Fragment as c, renderList as s, createTextVNode as v, toDisplayString as p, createCommentVNode as M, mergeModels as N } from "vue";
|
|
7
|
-
const D = /* @__PURE__ */ V({
|
|
8
|
-
name: "FormRadio",
|
|
9
|
-
inheritAttrs: !0,
|
|
10
|
-
__name: "FormRadio",
|
|
11
|
-
props: /* @__PURE__ */ N({
|
|
12
|
-
list: {},
|
|
13
|
-
mode: { default: "radio" },
|
|
14
|
-
notNull: { type: Boolean, default: !0 }
|
|
15
|
-
}, {
|
|
16
|
-
modelValue: {},
|
|
17
|
-
modelModifiers: {}
|
|
18
|
-
}),
|
|
19
|
-
emits: ["update:modelValue"],
|
|
20
|
-
setup(o) {
|
|
21
|
-
const u = o, l = _(o, "modelValue"), n = b(() => {
|
|
22
|
-
if (u.notNull && u.list.length > 0) {
|
|
23
|
-
const e = u.list.some((i) => i.value === l.value);
|
|
24
|
-
if (l.value === void 0 || !e)
|
|
25
|
-
return u.list[0].value;
|
|
26
|
-
}
|
|
27
|
-
return l.value;
|
|
28
|
-
}), f = (e) => {
|
|
29
|
-
l.value = e;
|
|
30
|
-
};
|
|
31
|
-
return g(
|
|
32
|
-
n,
|
|
33
|
-
(e) => {
|
|
34
|
-
e !== void 0 && e !== l.value && (l.value = e);
|
|
35
|
-
},
|
|
36
|
-
{ immediate: !0 }
|
|
37
|
-
), (e, i) => {
|
|
38
|
-
const R = y, k = B, E = h;
|
|
39
|
-
return a(), r(E, {
|
|
40
|
-
"model-value": x(n),
|
|
41
|
-
"onUpdate:modelValue": f
|
|
42
|
-
}, {
|
|
43
|
-
default: d(() => [
|
|
44
|
-
o.mode === "buttonGroup" ? (a(!0), m(c, { key: 0 }, s(o.list, (t) => (a(), r(R, {
|
|
45
|
-
key: t.value,
|
|
46
|
-
value: t.value
|
|
47
|
-
}, {
|
|
48
|
-
default: d(() => [
|
|
49
|
-
v(p(t.label), 1)
|
|
50
|
-
]),
|
|
51
|
-
_: 2
|
|
52
|
-
}, 1032, ["value"]))), 128)) : o.mode === "radio" ? (a(!0), m(c, { key: 1 }, s(o.list, (t) => (a(), r(k, {
|
|
53
|
-
key: t.value,
|
|
54
|
-
value: t.value
|
|
55
|
-
}, {
|
|
56
|
-
default: d(() => [
|
|
57
|
-
v(p(t.label), 1)
|
|
58
|
-
]),
|
|
59
|
-
_: 2
|
|
60
|
-
}, 1032, ["value"]))), 128)) : M("", !0)
|
|
61
|
-
]),
|
|
62
|
-
_: 1
|
|
63
|
-
}, 8, ["model-value"]);
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
export {
|
|
68
|
-
D as default
|
|
69
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { OptionItem } from './types';
|
|
2
|
-
|
|
3
|
-
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
-
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
5
|
-
list: {
|
|
6
|
-
type: globalThis.PropType<OptionItem[]>;
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
notNull: {
|
|
10
|
-
type: globalThis.PropType<boolean>;
|
|
11
|
-
default: boolean;
|
|
12
|
-
};
|
|
13
|
-
mode: {
|
|
14
|
-
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
-
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
19
|
-
list: {
|
|
20
|
-
type: globalThis.PropType<OptionItem[]>;
|
|
21
|
-
required: true;
|
|
22
|
-
};
|
|
23
|
-
notNull: {
|
|
24
|
-
type: globalThis.PropType<boolean>;
|
|
25
|
-
default: boolean;
|
|
26
|
-
};
|
|
27
|
-
mode: {
|
|
28
|
-
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
}>> & Readonly<{}>, {
|
|
32
|
-
notNull: boolean;
|
|
33
|
-
mode: "radio" | "buttonGroup";
|
|
34
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
-
export default _default;
|