@antdv-next1/pro-field 1.0.15 → 1.0.16
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/LICENSE +1 -1
- package/dist/ProPureField.d.ts +1 -1
- package/dist/components/Cascader/index.d.ts +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.js +5 -5
- package/dist/components/Checkbox/style/index.d.ts +5 -8
- package/dist/components/Checkbox/style/index.js +6 -10
- package/dist/components/IndexColumn/index.js +4 -4
- package/dist/components/IndexColumn/style/index.d.ts +5 -8
- package/dist/components/IndexColumn/style/index.js +10 -14
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +5 -5
- package/dist/components/Radio/style/index.d.ts +5 -8
- package/dist/components/Radio/style/index.js +6 -10
- package/dist/components/Segmented/index.d.ts +1 -1
- package/dist/components/Select/Highlight/index.js +9 -8
- package/dist/components/Select/Highlight/style/index.d.ts +5 -9
- package/dist/components/Select/Highlight/style/index.js +9 -14
- package/dist/components/Select/LightSelect/index.js +5 -5
- package/dist/components/Select/LightSelect/style/index.d.ts +5 -6
- package/dist/components/Select/LightSelect/style/index.js +7 -11
- package/dist/components/TextArea/readonly/index.js +3 -3
- package/dist/components/TextArea/readonly/style/index.d.ts +5 -8
- package/dist/components/TextArea/readonly/style/index.js +7 -11
- package/dist/components/TreeSelect/index.d.ts +1 -1
- package/dist/pro-field.esm.js +3446 -3474
- package/dist/pro-field.js +26 -26
- package/package.json +4 -4
package/LICENSE
CHANGED
package/dist/ProPureField.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { CustomSlotsType, VueNode as VueNode$1 } from "@v-c/util/dist/type";
|
|
|
8
8
|
//#region src/ProPureField.d.ts
|
|
9
9
|
declare const ProPureField: _$vue.DefineSetupFnComponent<ProFieldProps, {}, CustomSlotsType<{
|
|
10
10
|
default?: () => VueNode$1;
|
|
11
|
-
}>, Omit<ProFieldFCRenderProps, "
|
|
11
|
+
}>, Omit<ProFieldFCRenderProps, "placeholder" | "text"> & ProRenderFieldPropsType<any> & {
|
|
12
12
|
id?: string;
|
|
13
13
|
request?: _$_antdv_next1_pro_utils0.ProFieldRequestData;
|
|
14
14
|
emptyText?: VueNode$1;
|
|
@@ -35,6 +35,6 @@ declare const FieldCascader: _$vue.DefineSetupFnComponent<FieldCascaderProps, {}
|
|
|
35
35
|
variant?: "outlined" | "borderless" | "filled";
|
|
36
36
|
} & {
|
|
37
37
|
id?: string;
|
|
38
|
-
} & Omit<FieldSelectProps, "
|
|
38
|
+
} & Omit<FieldSelectProps, "text" | "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { FieldCascaderProps, FieldCascaderRef, FieldCascader as default };
|
|
@@ -32,6 +32,6 @@ declare const FieldCheckbox: _$vue.DefineSetupFnComponent<FieldCheckBoxProps, {}
|
|
|
32
32
|
options?: CheckboxGroupProps["options"];
|
|
33
33
|
} & {
|
|
34
34
|
id?: string;
|
|
35
|
-
} & Omit<FieldSelectProps, "
|
|
35
|
+
} & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { FieldCheckBoxProps, FieldCheckboxRef, FieldCheckbox as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFieldFetchData } from "../Select/index.js";
|
|
2
|
-
import
|
|
2
|
+
import style_default from "./style/index.js";
|
|
3
3
|
import { Fragment, computed, createVNode, defineComponent, mergeProps, shallowRef } from "vue";
|
|
4
4
|
import { useToken } from "@antdv-next1/pro-provider";
|
|
5
5
|
import { objectToMap, proFieldParsingText } from "@antdv-next1/pro-utils";
|
|
@@ -13,7 +13,7 @@ const FieldCheckbox = /* @__PURE__ */ defineComponent((props, { expose, attrs })
|
|
|
13
13
|
const formItemInputContext = useFormItemInputContext();
|
|
14
14
|
const layoutClassName = computed(() => config.value.getPrefixCls("pro-field-checkbox"));
|
|
15
15
|
const [loading, options, fetchData] = useFieldFetchData(props);
|
|
16
|
-
const
|
|
16
|
+
const [hashId, cssVarCls] = style_default(layoutClassName);
|
|
17
17
|
const { token } = useToken();
|
|
18
18
|
const checkBoxRef = shallowRef(null);
|
|
19
19
|
expose({ fetchData: (keyWord) => fetchData(keyWord) });
|
|
@@ -40,13 +40,13 @@ const FieldCheckbox = /* @__PURE__ */ defineComponent((props, { expose, attrs })
|
|
|
40
40
|
} }, [dom]);
|
|
41
41
|
}
|
|
42
42
|
if (mode === "edit") {
|
|
43
|
-
const dom =
|
|
44
|
-
"class": classNames(rest.fieldProps?.class, hashId.value, `${layoutClassName.value}-${layout}`, {
|
|
43
|
+
const dom = createVNode(CheckboxGroup, mergeProps({ "ref": checkBoxRef }, omit(attrs, ["lightProps"]), rest.fieldProps, {
|
|
44
|
+
"class": classNames(rest.fieldProps?.class, hashId.value, cssVarCls.value, `${layoutClassName.value}-${layout}`, {
|
|
45
45
|
[`${layoutClassName.value}-error`]: formItemInputContext.value.status === "error",
|
|
46
46
|
[`${layoutClassName.value}-warning`]: formItemInputContext.value.status === "warning"
|
|
47
47
|
}),
|
|
48
48
|
"options": options.value
|
|
49
|
-
}), null)
|
|
49
|
+
}), null);
|
|
50
50
|
if (formItemRender) return createVNode(Fragment, null, [formItemRender(rest.text, {
|
|
51
51
|
mode,
|
|
52
52
|
...rest,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/Checkbox/style/index.d.ts
|
|
6
|
-
interface ProFieldCheckboxToken extends
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
|
|
5
|
+
interface ProFieldCheckboxToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
10
7
|
//#endregion
|
|
11
|
-
export { ProFieldCheckboxToken,
|
|
8
|
+
export { ProFieldCheckboxToken, _default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/Checkbox/style/index.ts
|
|
3
4
|
const genProFieldCheckboxStyle = (token) => {
|
|
4
5
|
return { [token.componentCls]: {
|
|
@@ -14,13 +15,8 @@ const genProFieldCheckboxStyle = (token) => {
|
|
|
14
15
|
}
|
|
15
16
|
} };
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
...token,
|
|
21
|
-
componentCls: `.${prefixCls.value}`
|
|
22
|
-
})];
|
|
23
|
-
});
|
|
24
|
-
}
|
|
18
|
+
var style_default = useStyle("ProFieldCheckbox", (token) => {
|
|
19
|
+
return [genProFieldCheckboxStyle(mergeToken(token, {}))];
|
|
20
|
+
});
|
|
25
21
|
//#endregion
|
|
26
|
-
export {
|
|
22
|
+
export { style_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import style_default from "./style/index.js";
|
|
2
2
|
import { computed, createVNode, defineComponent } from "vue";
|
|
3
3
|
import { classNames } from "@v-c/util";
|
|
4
4
|
import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
@@ -6,11 +6,11 @@ import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
|
6
6
|
const FieldIndexColumn = /* @__PURE__ */ defineComponent((props) => {
|
|
7
7
|
const config = useConfig();
|
|
8
8
|
const prefixCls = computed(() => config.value.getPrefixCls("pro-field-index-column"));
|
|
9
|
-
const
|
|
10
|
-
return () =>
|
|
9
|
+
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
10
|
+
return () => createVNode("div", { "class": classNames(prefixCls.value, hashId.value, cssVarCls.value, {
|
|
11
11
|
[`${prefixCls.value}-border`]: props.border,
|
|
12
12
|
"top-three": Number(props.children) > 3
|
|
13
|
-
}) }, [props.children])
|
|
13
|
+
}) }, [props.children]);
|
|
14
14
|
}, {
|
|
15
15
|
props: {
|
|
16
16
|
border: {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/IndexColumn/style/index.d.ts
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
|
|
5
|
+
interface ProIndexColumnToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
10
7
|
//#endregion
|
|
11
|
-
export {
|
|
8
|
+
export { ProIndexColumnToken, _default as default };
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/IndexColumn/style/index.ts
|
|
3
4
|
const genProStyle = (token) => {
|
|
4
5
|
return { [token.componentCls]: {
|
|
5
6
|
display: "inline-flex",
|
|
6
7
|
alignItems: "center",
|
|
7
8
|
justifyContent: "center",
|
|
8
|
-
width:
|
|
9
|
-
height:
|
|
9
|
+
width: 18,
|
|
10
|
+
height: 18,
|
|
10
11
|
"&-border": {
|
|
11
12
|
color: "#fff",
|
|
12
|
-
fontSize:
|
|
13
|
+
fontSize: 12,
|
|
13
14
|
lineHeight: "12px",
|
|
14
15
|
backgroundColor: "#314659",
|
|
15
|
-
borderRadius:
|
|
16
|
+
borderRadius: 9,
|
|
16
17
|
"&.top-three": { backgroundColor: "#979797" }
|
|
17
18
|
}
|
|
18
19
|
} };
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
...token,
|
|
24
|
-
componentCls: `.${prefixCls.value}`
|
|
25
|
-
})];
|
|
26
|
-
});
|
|
27
|
-
}
|
|
21
|
+
var style_default = useStyle("IndexColumn", (token) => {
|
|
22
|
+
return [genProStyle(mergeToken(token, {}))];
|
|
23
|
+
});
|
|
28
24
|
//#endregion
|
|
29
|
-
export {
|
|
25
|
+
export { style_default as default };
|
|
@@ -31,6 +31,6 @@ declare const FieldRadio: _$vue.DefineSetupFnComponent<FieldRadioProps, {}, Cust
|
|
|
31
31
|
radioType?: RadioGroupProps["optionType"];
|
|
32
32
|
} & {
|
|
33
33
|
id?: string;
|
|
34
|
-
} & Omit<FieldSelectProps, "
|
|
34
|
+
} & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { FieldRadioProps, FieldRadio as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFieldFetchData } from "../Select/index.js";
|
|
2
|
-
import
|
|
2
|
+
import style_default from "./style/index.js";
|
|
3
3
|
import { Fragment, computed, createVNode, defineComponent, mergeProps, ref } from "vue";
|
|
4
4
|
import { objectToMap, proFieldParsingText } from "@antdv-next1/pro-utils";
|
|
5
5
|
import { RadioGroup, Spin } from "antdv-next";
|
|
@@ -13,7 +13,7 @@ const FieldRadio = /* @__PURE__ */ defineComponent((props, { expose, attrs }) =>
|
|
|
13
13
|
const layoutClassName = computed(() => config.value.getPrefixCls("pro-field-radio"));
|
|
14
14
|
const [loading, options, fetchData] = useFieldFetchData(props);
|
|
15
15
|
const radioRef = ref();
|
|
16
|
-
const
|
|
16
|
+
const [hashId, cssVarCls] = style_default(layoutClassName);
|
|
17
17
|
expose({ fetchData: (keyWord) => fetchData(keyWord) });
|
|
18
18
|
return () => {
|
|
19
19
|
const { mode, render, formItemRender, options: propsOptions, request, params, debounceTime, defaultKeyWords, radioType, ...rest } = props;
|
|
@@ -33,13 +33,13 @@ const FieldRadio = /* @__PURE__ */ defineComponent((props, { expose, attrs }) =>
|
|
|
33
33
|
return dom;
|
|
34
34
|
}
|
|
35
35
|
if (props.mode === "edit") {
|
|
36
|
-
const dom =
|
|
36
|
+
const dom = createVNode(RadioGroup, mergeProps({ "ref": radioRef }, attrs, { "optionType": radioType }, rest.fieldProps, {
|
|
37
37
|
"class": classNames(rest.fieldProps?.class, {
|
|
38
38
|
[`${layoutClassName.value}-error`]: formItemInputContext.value.status === "error",
|
|
39
39
|
[`${layoutClassName.value}-warning`]: formItemInputContext.value.status === "warning"
|
|
40
|
-
}, hashId.value, `${layoutClassName.value}-${props.fieldProps?.layout || "horizontal"}`),
|
|
40
|
+
}, hashId.value, cssVarCls.value, `${layoutClassName.value}-${props.fieldProps?.layout || "horizontal"}`),
|
|
41
41
|
"options": options.value
|
|
42
|
-
}), null)
|
|
42
|
+
}), null);
|
|
43
43
|
if (formItemRender) return createVNode(Fragment, null, [formItemRender(rest.text, {
|
|
44
44
|
mode,
|
|
45
45
|
...rest,
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/Radio/style/index.d.ts
|
|
6
|
-
interface ProFieldRadioToken extends
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
|
|
5
|
+
interface ProFieldRadioToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
10
7
|
//#endregion
|
|
11
|
-
export { ProFieldRadioToken,
|
|
8
|
+
export { ProFieldRadioToken, _default as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/Radio/style/index.ts
|
|
3
4
|
const genProFieldRadioStyle = (token) => {
|
|
4
5
|
return { [token.componentCls]: {
|
|
@@ -9,13 +10,8 @@ const genProFieldRadioStyle = (token) => {
|
|
|
9
10
|
} }
|
|
10
11
|
} };
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
...token,
|
|
16
|
-
componentCls: `.${prefixCls.value}`
|
|
17
|
-
})];
|
|
18
|
-
});
|
|
19
|
-
}
|
|
13
|
+
var style_default = useStyle("ProFieldRadio", (token) => {
|
|
14
|
+
return [genProFieldRadioStyle(mergeToken(token, {}))];
|
|
15
|
+
});
|
|
20
16
|
//#endregion
|
|
21
|
-
export {
|
|
17
|
+
export { style_default as default };
|
|
@@ -31,6 +31,6 @@ declare const FieldSegmented: _$vue.DefineSetupFnComponent<FieldSegmentedProps,
|
|
|
31
31
|
emptyText?: VueNode$1;
|
|
32
32
|
} & {
|
|
33
33
|
id?: string;
|
|
34
|
-
} & Omit<FieldSelectProps, "
|
|
34
|
+
} & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { FieldSegmentedProps, FieldSegmented as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import style_default from "./style/index.js";
|
|
2
2
|
import { computed, createVNode, defineComponent, h } from "vue";
|
|
3
|
+
import { classNames } from "@v-c/util";
|
|
3
4
|
import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
4
5
|
//#region src/components/Select/Highlight/index.tsx
|
|
5
6
|
const Highlight = /* @__PURE__ */ defineComponent((props) => {
|
|
6
7
|
const config = useConfig();
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const prefixCls = computed(() => config.value.getPrefixCls("pro"));
|
|
9
|
+
const baseClassName = computed(() => `${prefixCls.value}-pro-select-item-option-content`);
|
|
10
|
+
const [hashId, cssVarCls] = style_default(baseClassName);
|
|
10
11
|
const matchKeywordsRE = computed(() => new RegExp(props.words?.map((word) => word.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&")).join("|"), "gi"));
|
|
11
12
|
const elements = computed(() => {
|
|
12
13
|
let matchText = props.label;
|
|
@@ -19,15 +20,15 @@ const Highlight = /* @__PURE__ */ defineComponent((props) => {
|
|
|
19
20
|
}
|
|
20
21
|
const start = match.index;
|
|
21
22
|
const matchLength = match[0].length + start;
|
|
22
|
-
vnodes.push(matchText.slice(0, start), h("span", { class:
|
|
23
|
+
vnodes.push(matchText.slice(0, start), h("span", { class: classNames(`${baseClassName.value}-light`, hashId.value, cssVarCls.value) }, matchText.slice(start, matchLength)));
|
|
23
24
|
matchText = matchText.slice(matchLength);
|
|
24
25
|
}
|
|
25
26
|
return vnodes;
|
|
26
27
|
});
|
|
27
|
-
return () =>
|
|
28
|
+
return () => createVNode("div", {
|
|
28
29
|
"title": props.label,
|
|
29
|
-
"class":
|
|
30
|
-
}, [elements.value])
|
|
30
|
+
"class": classNames(baseClassName.value, hashId.value, cssVarCls.value)
|
|
31
|
+
}, [elements.value]);
|
|
31
32
|
}, {
|
|
32
33
|
props: {
|
|
33
34
|
label: {
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/Select/Highlight/style/index.d.ts
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
optionCls: string;
|
|
9
|
-
}
|
|
10
|
-
declare function useStyle(lightCls: ComputedRef<string>, optionCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
|
|
5
|
+
interface ProHighlightToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
11
7
|
//#endregion
|
|
12
|
-
export {
|
|
8
|
+
export { ProHighlightToken, _default as default };
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/Select/Highlight/style/index.ts
|
|
3
4
|
const genProStyle = (token) => {
|
|
4
5
|
return {
|
|
5
|
-
[token.
|
|
6
|
-
[token.optionCls]: {
|
|
6
|
+
[token.componentCls]: {
|
|
7
7
|
flex: "auto",
|
|
8
8
|
overflow: "hidden",
|
|
9
9
|
whiteSpace: "nowrap",
|
|
10
10
|
textOverflow: "ellipsis"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
[`${token.componentCls}-light`]: { color: token.colorPrimary }
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
...token,
|
|
18
|
-
lightCls: `.${lightCls.value}`,
|
|
19
|
-
optionCls: `.${optionCls.value}`
|
|
20
|
-
})];
|
|
21
|
-
});
|
|
22
|
-
}
|
|
15
|
+
var style_default = useStyle("Highlight", (token) => {
|
|
16
|
+
return [genProStyle(mergeToken(token, {}))];
|
|
17
|
+
});
|
|
23
18
|
//#endregion
|
|
24
|
-
export {
|
|
19
|
+
export { style_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import style_default from "./style/index.js";
|
|
2
2
|
import { Fragment, computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
3
3
|
import { FieldLabel, useMemo, useState } from "@antdv-next1/pro-utils";
|
|
4
4
|
import { Input, Select } from "antdv-next";
|
|
@@ -23,7 +23,7 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
23
23
|
const baseClassName = computed(() => `${prefixCls.value}-field-select-light-select`);
|
|
24
24
|
const [open, setOpen] = useState(props.open || false);
|
|
25
25
|
const [keyword, setKeyword] = useState("");
|
|
26
|
-
const
|
|
26
|
+
const [hashId, cssVarCls] = style_default(baseClassName);
|
|
27
27
|
const fieldNames = computed(() => ({
|
|
28
28
|
label: props.fieldNames?.label || "label",
|
|
29
29
|
value: props.fieldNames?.value || "value"
|
|
@@ -46,8 +46,8 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
46
46
|
return () => {
|
|
47
47
|
const { label, prefixCls: customizePrefixCls, onChange, value, mode, defaultValue, labelVariant, size, showSearch, "onUpdate:value": onUpdateValue, disabled, options, allowClear, labelInValue, fieldNames = {}, lightLabel, labelTrigger, optionLabelProp = "", valueMaxLength = 41, fetchDataOnSearch = false, fetchData, variant = "outlined", searchPlaceholder, ...restProps } = props;
|
|
48
48
|
const { placeholder = label } = props;
|
|
49
|
-
return
|
|
50
|
-
"class": classNames(baseClassName.value, attrs.class, hashId.value, { [`${baseClassName.value}-searchable`]: showSearch }, `${baseClassName.value}-container-${restProps.placement || "bottomLeft"}`),
|
|
49
|
+
return createVNode("div", {
|
|
50
|
+
"class": classNames(baseClassName.value, attrs.class, hashId.value, cssVarCls.value, { [`${baseClassName.value}-searchable`]: showSearch }, `${baseClassName.value}-container-${restProps.placement || "bottomLeft"}`),
|
|
51
51
|
"onClick": (e) => {
|
|
52
52
|
if (disabled) return;
|
|
53
53
|
if (!lightLabel?.value?.labelRef.value?.contains(e.target)) setOpen(true);
|
|
@@ -122,7 +122,7 @@ const LightSelect = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
122
122
|
},
|
|
123
123
|
"ref": lightLabel,
|
|
124
124
|
"valueMaxLength": valueMaxLength
|
|
125
|
-
}, null)])
|
|
125
|
+
}, null)]);
|
|
126
126
|
};
|
|
127
127
|
}, {
|
|
128
128
|
props: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/Select/LightSelect/style/index.d.ts
|
|
6
|
-
interface
|
|
5
|
+
interface ProLightSelectToken extends ProAliasCssVarToken {
|
|
7
6
|
componentCls: string;
|
|
8
7
|
}
|
|
9
|
-
declare
|
|
8
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
10
9
|
//#endregion
|
|
11
|
-
export {
|
|
10
|
+
export { ProLightSelectToken, _default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/Select/LightSelect/style/index.ts
|
|
3
|
-
const
|
|
4
|
+
const genProLightSelectStyle = (token) => {
|
|
4
5
|
return { [token.componentCls]: {
|
|
5
6
|
[`${token.antCls}-select`]: {
|
|
6
7
|
position: "absolute",
|
|
@@ -16,13 +17,8 @@ const genProStyle = (token) => {
|
|
|
16
17
|
} }
|
|
17
18
|
} };
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
...token,
|
|
23
|
-
componentCls: `.${prefixCls.value}`
|
|
24
|
-
})];
|
|
25
|
-
});
|
|
26
|
-
}
|
|
20
|
+
var style_default = useStyle("LightSelect", (token) => {
|
|
21
|
+
return [genProLightSelectStyle(mergeToken(token, {}))];
|
|
22
|
+
});
|
|
27
23
|
//#endregion
|
|
28
|
-
export {
|
|
24
|
+
export { style_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import style_default from "./style/index.js";
|
|
2
2
|
import { computed, createVNode, defineComponent } from "vue";
|
|
3
3
|
import { classNames } from "@v-c/util";
|
|
4
4
|
import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
@@ -6,10 +6,10 @@ import { useConfig } from "antdv-next/dist/config-provider/context";
|
|
|
6
6
|
const FieldTextAreaReadonly = /* @__PURE__ */ defineComponent((props) => {
|
|
7
7
|
const config = useConfig();
|
|
8
8
|
const readonlyClassName = computed(() => config.value.getPrefixCls("pro-field-readonly-textarea"));
|
|
9
|
-
const
|
|
9
|
+
const [hashId, cssVarCls] = style_default(readonlyClassName);
|
|
10
10
|
return () => {
|
|
11
11
|
const { text } = props;
|
|
12
|
-
return
|
|
12
|
+
return createVNode("span", { "class": classNames(hashId.value, cssVarCls.value, readonlyClassName.value) }, [text ?? "-"]);
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
name: "FieldTextAreaReadonly",
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ProAliasToken } from "@antdv-next1/pro-provider";
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-next1/pro-provider";
|
|
4
3
|
|
|
5
4
|
//#region src/components/TextArea/readonly/style/index.d.ts
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function useStyle(prefixCls: ComputedRef<string>): _$_antdv_next1_pro_provider0.UseStyleResult;
|
|
5
|
+
interface ProTextAreaToken extends ProAliasCssVarToken {}
|
|
6
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
10
7
|
//#endregion
|
|
11
|
-
export {
|
|
8
|
+
export { ProTextAreaToken, _default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useStyle
|
|
1
|
+
import { useStyle } from "@antdv-next1/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
2
3
|
//#region src/components/TextArea/readonly/style/index.ts
|
|
3
|
-
const
|
|
4
|
+
const genProTextAreaStyle = (token) => {
|
|
4
5
|
return { [token.componentCls]: {
|
|
5
6
|
display: "inline-block",
|
|
6
7
|
lineHeight: "1.5715",
|
|
@@ -8,13 +9,8 @@ const genProStyle = (token) => {
|
|
|
8
9
|
whiteSpace: "pre-wrap"
|
|
9
10
|
} };
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
...token,
|
|
15
|
-
componentCls: `.${prefixCls.value}`
|
|
16
|
-
})];
|
|
17
|
-
});
|
|
18
|
-
}
|
|
12
|
+
var style_default = useStyle("TextArea", (token) => {
|
|
13
|
+
return [genProTextAreaStyle(mergeToken(token, {}))];
|
|
14
|
+
});
|
|
19
15
|
//#endregion
|
|
20
|
-
export {
|
|
16
|
+
export { style_default as default };
|
|
@@ -40,6 +40,6 @@ declare const FieldTreeSelect: _$vue.DefineSetupFnComponent<FieldTreeSelectProps
|
|
|
40
40
|
fetchDataOnSearch?: boolean;
|
|
41
41
|
} & {
|
|
42
42
|
id?: string;
|
|
43
|
-
} & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "
|
|
43
|
+
} & TreeSelectProps<any, _$_v_c_tree_select0.DataNode> & Omit<FieldSelectProps, "fieldProps" | "light" | "label" | "id" | "variant" | "labelTrigger" | "lightLabel" | "plain"> & {}, _$vue.PublicProps>;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { FieldTreeSelectProps, FieldTreeSelect as default };
|