@wfrog/vc-ui 1.12.1 → 1.12.3
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/components/button/button.mjs +2 -3
- package/dist/es/components/cdn-tag.vue.d.ts +5 -0
- package/dist/es/components/choice/choice.d.ts +0 -4
- package/dist/es/components/choice/choice.mjs +6 -21
- package/dist/es/components/choice/choice.vue.d.ts +1 -6
- package/dist/es/components/currency/currency.mjs +3 -4
- package/dist/es/components/daterange-picker/daterange-picker.d.ts +0 -3
- package/dist/es/components/daterange-picker/daterange-picker.mjs +4 -21
- package/dist/es/components/daterange-picker/daterange-picker.vue.d.ts +0 -5
- package/dist/es/components/explorer-form/explorer-form.vue.d.ts +16 -16
- package/dist/es/components/explorer-modal-form/explorer-modal-form.mjs +2 -3
- package/dist/es/components/explorer-modal-form/explorer-modal-form.vue.d.ts +16 -16
- package/dist/es/components/explorer-query/explorer-query.vue.d.ts +10 -10
- package/dist/es/components/form-item/form-item.d.ts +2 -0
- package/dist/es/components/form-item/form-item.mjs +26 -10
- package/dist/es/components/form-item/form-item.vue.d.ts +4 -1
- package/dist/es/components/form-item/index.css +9 -2
- package/dist/es/components/icon-picker/icon-picker.mjs +3 -3
- package/dist/es/components/icon-picker/index.css +1 -1
- package/dist/es/components/info-tooltip/index.css +2 -2
- package/dist/es/components/info-tooltip/info-tooltip.d.ts +1 -0
- package/dist/es/components/info-tooltip/info-tooltip.mjs +3 -2
- package/dist/es/components/input/index.css +1 -1
- package/dist/es/components/input/input.d.ts +0 -5
- package/dist/es/components/input/input.mjs +4 -23
- package/dist/es/components/input/input.vue.d.ts +1 -8
- package/dist/es/components/input-number/index.css +1 -1
- package/dist/es/components/input-number/input-number.d.ts +6 -2
- package/dist/es/components/input-number/input-number.mjs +3 -12
- package/dist/es/components/input-number/input-number.vue.d.ts +2 -3
- package/dist/es/components/pca-picker/index.css +1 -1
- package/dist/es/components/pca-picker/pca-picker.mjs +2 -10
- package/dist/es/components/select/index.css +1 -1
- package/dist/es/components/select/select.d.ts +0 -5
- package/dist/es/components/select/select.mjs +5 -24
- package/dist/es/components/select/select.vue.d.ts +1 -8
- package/dist/es/components/switch/switch.mjs +13 -12
- package/dist/es/components/tags/tags.d.ts +6 -0
- package/dist/es/components/thousand-input/thousand-input.d.ts +0 -1
- package/dist/es/components/thousand-input/thousand-input.mjs +1 -2
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +8 -36
- package/dist/es/components/upload-file/index.css +14 -8
- package/dist/es/components/upload-file/upload-file.d.ts +1 -0
- package/dist/es/components/upload-file/upload-file.mjs +13 -9
- package/dist/es/components/upload-file/upload-file.vue.d.ts +1 -0
- package/dist/es/index.mjs +1 -1
- package/dist/index.css +30 -17
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import './index.css'
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { ElFormItem } from 'element-plus/es';
|
|
3
|
+
import 'element-plus/es/components/base/style/css';
|
|
4
|
+
import 'element-plus/es/components/form-item/style/css';
|
|
5
|
+
import { defineComponent, useCssVars, computed, createBlock, openBlock, normalizeClass, withCtx, renderSlot, createElementVNode, createCommentVNode, createVNode, toDisplayString, mergeProps, unref } from 'vue';
|
|
4
6
|
import { C as Component$1 } from '../info-tooltip/info-tooltip.mjs';
|
|
5
7
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
6
8
|
|
|
@@ -9,21 +11,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
11
|
props: {
|
|
10
12
|
label: {},
|
|
11
13
|
tooltipProps: {},
|
|
14
|
+
noEdit: { type: Boolean, default: false },
|
|
15
|
+
noEditText: { default: "创建后无法修改" },
|
|
12
16
|
content: {},
|
|
13
17
|
code: {},
|
|
14
18
|
letter: {},
|
|
15
19
|
maxWidth: {},
|
|
16
20
|
icon: {},
|
|
21
|
+
iconClass: {},
|
|
17
22
|
offsetY: {}
|
|
18
23
|
},
|
|
19
24
|
emits: ["click"],
|
|
20
25
|
setup(__props, { emit: __emit }) {
|
|
26
|
+
useCssVars((_ctx) => ({
|
|
27
|
+
"v3d30eb40": `${_ctx.noEdit ? 4 : 0}px`
|
|
28
|
+
}));
|
|
21
29
|
const props = __props;
|
|
22
30
|
const emits = __emit;
|
|
23
|
-
const component = shallowRef();
|
|
24
|
-
onBeforeMount(() => {
|
|
25
|
-
component.value = ElFormItem;
|
|
26
|
-
});
|
|
27
31
|
const infoTooltipProps = computed(() => ({
|
|
28
32
|
...props,
|
|
29
33
|
...props.tooltipProps
|
|
@@ -32,11 +36,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
36
|
emits("click", props.code, props.label);
|
|
33
37
|
}
|
|
34
38
|
return (_ctx, _cache) => {
|
|
35
|
-
|
|
39
|
+
const _component_ElFormItem = ElFormItem;
|
|
40
|
+
return openBlock(), createBlock(_component_ElFormItem, {
|
|
41
|
+
class: normalizeClass(_ctx.$style["form-item"])
|
|
42
|
+
}, {
|
|
36
43
|
label: withCtx(() => [
|
|
37
44
|
createElementVNode("span", {
|
|
38
45
|
class: normalizeClass(_ctx.$style["label-container"])
|
|
39
46
|
}, [
|
|
47
|
+
__props.noEdit ? (openBlock(), createBlock(Component$1, {
|
|
48
|
+
key: 0,
|
|
49
|
+
content: "创建后无法修改",
|
|
50
|
+
"offset-y": "0px",
|
|
51
|
+
icon: "carbon:locked",
|
|
52
|
+
"icon-class": _ctx.$style["no-edit-icon"]
|
|
53
|
+
}, null, 8, ["icon-class"])) : createCommentVNode("", true),
|
|
40
54
|
createElementVNode("span", {
|
|
41
55
|
class: normalizeClass(_ctx.$style.label)
|
|
42
56
|
}, toDisplayString(__props.label), 3),
|
|
@@ -53,14 +67,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
67
|
renderSlot(_ctx.$slots, "error")
|
|
54
68
|
]),
|
|
55
69
|
_: 3
|
|
56
|
-
}
|
|
70
|
+
}, 8, ["class"]);
|
|
57
71
|
};
|
|
58
72
|
}
|
|
59
73
|
});
|
|
60
74
|
|
|
61
|
-
/* unplugin-vue-components disabled */const label = "
|
|
75
|
+
/* unplugin-vue-components disabled */const label = "_label_wfdaa_5";
|
|
62
76
|
const style0 = {
|
|
63
|
-
"
|
|
77
|
+
"form-item": "_form-item_wfdaa_1",
|
|
78
|
+
"label-container": "_label-container_wfdaa_5",
|
|
79
|
+
"no-edit-icon": "_no-edit-icon_wfdaa_11",
|
|
64
80
|
label: label
|
|
65
81
|
};
|
|
66
82
|
|
|
@@ -13,7 +13,10 @@ declare const __VLS_component: import('vue').DefineComponent<IFormItemProps, {},
|
|
|
13
13
|
click: (code: string | undefined, label: string | undefined) => any;
|
|
14
14
|
}, string, import('vue').PublicProps, Readonly<IFormItemProps> & Readonly<{
|
|
15
15
|
onClick?: ((code: string | undefined, label: string | undefined) => any) | undefined;
|
|
16
|
-
}>, {
|
|
16
|
+
}>, {
|
|
17
|
+
noEdit: boolean;
|
|
18
|
+
noEditText: string;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
21
|
export default _default;
|
|
19
22
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/* source: src/components/form-item/form-item.vue */
|
|
2
|
-
.
|
|
2
|
+
._form-item_wfdaa_1 .el-form-item__label {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
._label-container_wfdaa_5 {
|
|
3
6
|
display: inline-flex;
|
|
4
7
|
align-items: center;
|
|
5
8
|
justify-content: center;
|
|
6
9
|
}
|
|
7
|
-
.
|
|
10
|
+
._no-edit-icon_wfdaa_11 {
|
|
11
|
+
color: var(--el-color-warning);
|
|
12
|
+
}
|
|
13
|
+
._label_wfdaa_5 {
|
|
8
14
|
margin-right: 4px;
|
|
15
|
+
margin-left: var(--v3d30eb40);
|
|
9
16
|
}
|
|
@@ -423,7 +423,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
423
423
|
emits: ["update:modelValue", "change"],
|
|
424
424
|
setup(__props, { emit: __emit }) {
|
|
425
425
|
useCssVars((_ctx) => ({
|
|
426
|
-
"
|
|
426
|
+
"v7b0172e0": !unref(formDisabled) ? "pointer" : "not-allowed"
|
|
427
427
|
}));
|
|
428
428
|
const props = __props;
|
|
429
429
|
const emits = __emit;
|
|
@@ -459,7 +459,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
459
459
|
modelValue: unref(myValue),
|
|
460
460
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(myValue) ? myValue.value = $event : null),
|
|
461
461
|
class: _ctx.$style.input
|
|
462
|
-
}, _ctx.$attrs), {
|
|
462
|
+
}, _ctx.$attrs, { disabled: unref(formDisabled) }), {
|
|
463
463
|
prepend: withCtx(() => [
|
|
464
464
|
createVNode(Component$2, {
|
|
465
465
|
name: unref(iconName),
|
|
@@ -467,7 +467,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
467
467
|
}, null, 8, ["name"])
|
|
468
468
|
]),
|
|
469
469
|
_: 1
|
|
470
|
-
}, 16, ["modelValue", "class"])
|
|
470
|
+
}, 16, ["modelValue", "class", "disabled"])
|
|
471
471
|
]),
|
|
472
472
|
default: withCtx(() => [
|
|
473
473
|
unref(panelVisible) ? (openBlock(), createBlock(Panel, mergeProps({ key: 0 }, props, { onChoiced: handleChoiced }), null, 16)) : createCommentVNode("", true)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
font-size: 0.7em;
|
|
10
10
|
border-radius: 12px;
|
|
11
11
|
cursor: pointer;
|
|
12
|
-
transform: translateY(var(--
|
|
12
|
+
transform: translateY(var(--v77b9e69f));
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
}
|
|
15
15
|
._letter_1hm7m_1:hover {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
._icon_1hm7m_19 {
|
|
20
20
|
cursor: pointer;
|
|
21
21
|
outline: none;
|
|
22
|
-
transform: translateY(var(--
|
|
22
|
+
transform: translateY(var(--v77b9e69f));
|
|
23
23
|
}
|
|
24
24
|
._icon_1hm7m_19:hover {
|
|
25
25
|
color: var(--el-color-primary);
|
|
@@ -349,12 +349,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
349
349
|
letter: {},
|
|
350
350
|
maxWidth: { default: "400px" },
|
|
351
351
|
icon: { default: "carbon:help" },
|
|
352
|
+
iconClass: {},
|
|
352
353
|
offsetY: { default: "-4px" }
|
|
353
354
|
},
|
|
354
355
|
emits: ["click"],
|
|
355
356
|
setup(__props, { emit: __emit }) {
|
|
356
357
|
useCssVars((_ctx) => ({
|
|
357
|
-
"
|
|
358
|
+
"v77b9e69f": unref(myProps).offsetY
|
|
358
359
|
}));
|
|
359
360
|
const props = __props;
|
|
360
361
|
const emits = __emit;
|
|
@@ -409,7 +410,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
409
410
|
}, toDisplayString(unref(myProps).letter), 3)) : (openBlock(), createBlock(Component$1, {
|
|
410
411
|
key: 1,
|
|
411
412
|
name: unref(myProps).icon,
|
|
412
|
-
class: normalizeClass(_ctx.$style.icon),
|
|
413
|
+
class: normalizeClass([_ctx.$style.icon, __props.iconClass]),
|
|
413
414
|
onClick: handleClick
|
|
414
415
|
}, null, 8, ["name", "class"]))
|
|
415
416
|
]),
|
|
@@ -3,7 +3,6 @@ import { ElInput } from 'element-plus/es';
|
|
|
3
3
|
import 'element-plus/es/components/base/style/css';
|
|
4
4
|
import 'element-plus/es/components/input/style/css';
|
|
5
5
|
import { defineComponent, useCssVars, unref, computed, useCssModule, useTemplateRef, createBlock, openBlock, normalizeClass, createSlots, withCtx, renderSlot } from 'vue';
|
|
6
|
-
import { useFormDisabled, useFormItem } from 'element-plus';
|
|
7
6
|
import { f as formatToPx } from '../../chunk/DZ5W9TaA.mjs';
|
|
8
7
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
9
8
|
|
|
@@ -11,34 +10,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
10
|
__name: "input",
|
|
12
11
|
props: {
|
|
13
12
|
width: {},
|
|
14
|
-
disabled: { type: Boolean, default: void 0 },
|
|
15
13
|
clearable: { type: Boolean, default: true }
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
+
setup(__props, { expose: __expose }) {
|
|
19
16
|
useCssVars((_ctx) => ({
|
|
20
|
-
"
|
|
17
|
+
"v3cee380c": unref(myWidth)
|
|
21
18
|
}));
|
|
22
19
|
const props = __props;
|
|
23
|
-
const emits = __emit;
|
|
24
20
|
const $style = useCssModule();
|
|
25
21
|
const inputRef = useTemplateRef("inputRef");
|
|
26
|
-
const formDisabled = useFormDisabled();
|
|
27
|
-
const { formItem } = useFormItem();
|
|
28
22
|
const className = computed(() => ({
|
|
29
23
|
[$style["input-width"]]: !!props.width
|
|
30
24
|
}));
|
|
31
25
|
const myWidth = computed(() => props.width ? formatToPx(props.width) : "auto");
|
|
32
|
-
function handleBlur(evt) {
|
|
33
|
-
formItem?.validate?.("blur").catch(() => {
|
|
34
|
-
});
|
|
35
|
-
emits("blur", evt);
|
|
36
|
-
}
|
|
37
|
-
function handleChange(value, evt) {
|
|
38
|
-
formItem?.validate?.("change").catch(() => {
|
|
39
|
-
});
|
|
40
|
-
emits("change", value, evt);
|
|
41
|
-
}
|
|
42
26
|
__expose({ inputRef });
|
|
43
27
|
return (_ctx, _cache) => {
|
|
44
28
|
const _component_ElInput = ElInput;
|
|
@@ -46,10 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
30
|
ref_key: "inputRef",
|
|
47
31
|
ref: inputRef,
|
|
48
32
|
class: normalizeClass(unref(className)),
|
|
49
|
-
|
|
50
|
-
clearable: __props.clearable,
|
|
51
|
-
onBlur: handleBlur,
|
|
52
|
-
onChange: handleChange
|
|
33
|
+
clearable: __props.clearable
|
|
53
34
|
}, createSlots({ _: 2 }, [
|
|
54
35
|
_ctx.$slots.prefix ? {
|
|
55
36
|
name: "prefix",
|
|
@@ -79,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
60
|
]),
|
|
80
61
|
key: "3"
|
|
81
62
|
} : void 0
|
|
82
|
-
]), 1032, ["class", "
|
|
63
|
+
]), 1032, ["class", "clearable"]);
|
|
83
64
|
};
|
|
84
65
|
}
|
|
85
66
|
});
|
|
@@ -823,14 +823,7 @@ declare const __VLS_component: import('vue').DefineComponent<IInputProps, {
|
|
|
823
823
|
append?: (props: {}) => any;
|
|
824
824
|
};
|
|
825
825
|
}) | null>>;
|
|
826
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
827
|
-
blur: (evnet: FocusEvent) => any;
|
|
828
|
-
change: (value: string, evnet?: Event | undefined) => any;
|
|
829
|
-
}, string, import('vue').PublicProps, Readonly<IInputProps> & Readonly<{
|
|
830
|
-
onBlur?: ((evnet: FocusEvent) => any) | undefined;
|
|
831
|
-
onChange?: ((value: string, evnet?: Event | undefined) => any) | undefined;
|
|
832
|
-
}>, {
|
|
833
|
-
disabled: boolean;
|
|
826
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IInputProps> & Readonly<{}>, {
|
|
834
827
|
clearable: boolean;
|
|
835
828
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
836
829
|
inputRef: ({
|
|
@@ -16,7 +16,7 @@ div._input-number_1e1b7_1.input-with-select .el-input-group__prepend {
|
|
|
16
16
|
background-color: var(--el-fill-color-blank);
|
|
17
17
|
}
|
|
18
18
|
div._input-number-width_1e1b7_18 {
|
|
19
|
-
width: var(--
|
|
19
|
+
width: var(--v437b2bda);
|
|
20
20
|
}
|
|
21
21
|
div._el-input-number_1e1b7_22 {
|
|
22
22
|
display: flex;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export interface IInputNumberProps {
|
|
2
|
-
modelValue: number;
|
|
2
|
+
modelValue: number | undefined;
|
|
3
3
|
precision?: number;
|
|
4
4
|
controlsPosition?: 'right' | '';
|
|
5
5
|
size?: 'large' | 'default' | 'small';
|
|
6
6
|
inputNumberClass?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
7
|
width?: string | number;
|
|
9
8
|
}
|
|
9
|
+
export interface IInputNumberEmits {
|
|
10
|
+
(e: 'update:modelValue', val: number | undefined): void;
|
|
11
|
+
(e: 'change', currentValue: number, oldValue: number): void;
|
|
12
|
+
(e: 'blur', event: Event): void;
|
|
13
|
+
}
|
|
@@ -3,7 +3,6 @@ import { ElInputNumber } from 'element-plus/es';
|
|
|
3
3
|
import 'element-plus/es/components/base/style/css';
|
|
4
4
|
import 'element-plus/es/components/input-number/style/css';
|
|
5
5
|
import { defineComponent, useCssVars, unref, computed, useSlots, useCssModule, ref, useTemplateRef, watch, onUnmounted, createElementBlock, openBlock, normalizeClass, createCommentVNode, createBlock, renderSlot, mergeProps, isRef, createSlots, withCtx, nextTick } from 'vue';
|
|
6
|
-
import { useFormDisabled, useFormItem } from 'element-plus';
|
|
7
6
|
import { f as formatToPx } from '../../chunk/DZ5W9TaA.mjs';
|
|
8
7
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
9
8
|
|
|
@@ -19,13 +18,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
18
|
controlsPosition: {},
|
|
20
19
|
size: {},
|
|
21
20
|
inputNumberClass: {},
|
|
22
|
-
disabled: { type: Boolean, default: void 0 },
|
|
23
21
|
width: {}
|
|
24
22
|
},
|
|
25
23
|
emits: ["update:modelValue", "change", "blur"],
|
|
26
24
|
setup(__props, { emit: __emit }) {
|
|
27
25
|
useCssVars((_ctx) => ({
|
|
28
|
-
"
|
|
26
|
+
"v437b2bda": unref(myWidth)
|
|
29
27
|
}));
|
|
30
28
|
const props = __props;
|
|
31
29
|
const emits = __emit;
|
|
@@ -33,8 +31,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
31
|
const $style = useCssModule();
|
|
34
32
|
const visible = ref(true);
|
|
35
33
|
const inputNumberRef = useTemplateRef("inputNumberRef");
|
|
36
|
-
const formDisabled = useFormDisabled();
|
|
37
|
-
const { formItem } = useFormItem();
|
|
38
34
|
const mainClass = computed(() => {
|
|
39
35
|
const className = {
|
|
40
36
|
[$style["input-number"]]: true,
|
|
@@ -67,8 +63,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
63
|
}
|
|
68
64
|
function handleChange(currentValue, oldValue) {
|
|
69
65
|
myValue.value = currentValue === 0 ? currentValue : currentValue || oldValue || 0;
|
|
70
|
-
formItem?.validate?.("change").catch(() => {
|
|
71
|
-
});
|
|
72
66
|
emits("change", myValue.value, oldValue || 0);
|
|
73
67
|
}
|
|
74
68
|
function rerender() {
|
|
@@ -80,8 +74,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
74
|
if (eleInput.value === "") {
|
|
81
75
|
rerender();
|
|
82
76
|
}
|
|
83
|
-
formItem?.validate?.("blur").catch(() => {
|
|
84
|
-
});
|
|
85
77
|
emits("blur", e);
|
|
86
78
|
}
|
|
87
79
|
const watchHandler = watch(() => props.precision, (val) => val === 0 && rerender());
|
|
@@ -104,8 +96,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
96
|
size: __props.size,
|
|
105
97
|
class: [__props.inputNumberClass, unref($style)["el-input-number"]],
|
|
106
98
|
precision: __props.precision,
|
|
107
|
-
"controls-position": unref(myControlsPosition)
|
|
108
|
-
disabled: unref(formDisabled)
|
|
99
|
+
"controls-position": unref(myControlsPosition)
|
|
109
100
|
}, _ctx.$attrs, {
|
|
110
101
|
onKeydown: limitInputValue,
|
|
111
102
|
onChange: handleChange,
|
|
@@ -125,7 +116,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
125
116
|
]),
|
|
126
117
|
key: "1"
|
|
127
118
|
} : void 0
|
|
128
|
-
]), 1040, ["modelValue", "size", "class", "precision", "controls-position"
|
|
119
|
+
]), 1040, ["modelValue", "size", "class", "precision", "controls-position"])) : createCommentVNode("", true)
|
|
129
120
|
], 2);
|
|
130
121
|
};
|
|
131
122
|
}
|
|
@@ -15,13 +15,12 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
15
15
|
declare const __VLS_component: import('vue').DefineComponent<IInputNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
16
|
blur: (event: Event) => any;
|
|
17
17
|
change: (currentValue: number, oldValue: number) => any;
|
|
18
|
-
"update:modelValue": (val: number) => any;
|
|
18
|
+
"update:modelValue": (val: number | undefined) => any;
|
|
19
19
|
}, string, import('vue').PublicProps, Readonly<IInputNumberProps> & Readonly<{
|
|
20
20
|
onBlur?: ((event: Event) => any) | undefined;
|
|
21
21
|
onChange?: ((currentValue: number, oldValue: number) => any) | undefined;
|
|
22
|
-
"onUpdate:modelValue"?: ((val: number) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
|
-
disabled: boolean;
|
|
25
24
|
precision: number;
|
|
26
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
26
|
inputNumberRef: HTMLDivElement;
|
|
@@ -1119,7 +1119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1119
1119
|
emits: ["update:modelValue", "change", "blur", "limit"],
|
|
1120
1120
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1121
1121
|
useCssVars((_ctx) => ({
|
|
1122
|
-
"
|
|
1122
|
+
"v09c004fc": unref(myWidth)
|
|
1123
1123
|
}));
|
|
1124
1124
|
const props = __props;
|
|
1125
1125
|
const emits = __emit;
|
|
@@ -1195,11 +1195,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1195
1195
|
});
|
|
1196
1196
|
emits("change", void 0);
|
|
1197
1197
|
}
|
|
1198
|
-
function handleBlur(evt) {
|
|
1199
|
-
formItem?.validate?.("blur").catch(() => {
|
|
1200
|
-
});
|
|
1201
|
-
emits("blur", evt);
|
|
1202
|
-
}
|
|
1203
1198
|
useProvide(KEY_NAME, {
|
|
1204
1199
|
props,
|
|
1205
1200
|
...pcaFetchData,
|
|
@@ -1287,10 +1282,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1287
1282
|
class: [unref(selectClassName), unref($style).cascader],
|
|
1288
1283
|
"popper-class": unref($style)["popover-select"],
|
|
1289
1284
|
"before-filter": () => false
|
|
1290
|
-
}, _ctx.$attrs, {
|
|
1291
|
-
onBlur: handleBlur,
|
|
1292
|
-
onClear: clear
|
|
1293
|
-
}), null, 16, ["modelValue", "placeholder", "disabled", "loading", "options", "props", "class", "popper-class"])
|
|
1285
|
+
}, _ctx.$attrs, { onClear: clear }), null, 16, ["modelValue", "placeholder", "disabled", "loading", "options", "props", "class", "popper-class"])
|
|
1294
1286
|
], 34)
|
|
1295
1287
|
]),
|
|
1296
1288
|
default: withCtx(() => [
|
|
@@ -2,9 +2,4 @@ import { SelectProps } from 'element-plus/es/components/select';
|
|
|
2
2
|
export interface ISelectProps {
|
|
3
3
|
width?: string | number;
|
|
4
4
|
options: SelectProps['options'] | string[];
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface ISelectEmits {
|
|
8
|
-
(e: 'change', value: any): void;
|
|
9
|
-
(e: 'blur', event: FocusEvent): void;
|
|
10
5
|
}
|
|
@@ -3,7 +3,6 @@ import { ElSelect } from 'element-plus/es';
|
|
|
3
3
|
import 'element-plus/es/components/base/style/css';
|
|
4
4
|
import 'element-plus/es/components/select/style/css';
|
|
5
5
|
import { defineComponent, useCssVars, unref, computed, useCssModule, createBlock, openBlock, normalizeClass } from 'vue';
|
|
6
|
-
import { useFormDisabled, useFormItem } from 'element-plus';
|
|
7
6
|
import { f as formatToPx } from '../../chunk/DZ5W9TaA.mjs';
|
|
8
7
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
9
8
|
|
|
@@ -11,28 +10,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
10
|
__name: "select",
|
|
12
11
|
props: {
|
|
13
12
|
width: { default: "" },
|
|
14
|
-
options: {}
|
|
15
|
-
disabled: { type: Boolean, default: void 0 }
|
|
13
|
+
options: {}
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
setup(__props, { emit: __emit }) {
|
|
15
|
+
setup(__props) {
|
|
19
16
|
useCssVars((_ctx) => ({
|
|
20
|
-
"
|
|
17
|
+
"d4752262": unref(myWidth)
|
|
21
18
|
}));
|
|
22
19
|
const props = __props;
|
|
23
|
-
const emits = __emit;
|
|
24
|
-
const formDisabled = useFormDisabled();
|
|
25
|
-
const { formItem } = useFormItem();
|
|
26
|
-
function handleChange(value) {
|
|
27
|
-
formItem?.validate?.("change").catch(() => {
|
|
28
|
-
});
|
|
29
|
-
emits("change", value);
|
|
30
|
-
}
|
|
31
|
-
function handleBlur(evt) {
|
|
32
|
-
formItem?.validate?.("blur").catch(() => {
|
|
33
|
-
});
|
|
34
|
-
emits("blur", evt);
|
|
35
|
-
}
|
|
36
20
|
const myOptions = computed(() => {
|
|
37
21
|
if (Array.isArray(props.options) && typeof props.options[0] === "string") {
|
|
38
22
|
return props.options.map((item) => ({ label: item, value: item }));
|
|
@@ -49,11 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
33
|
return openBlock(), createBlock(_component_ElSelect, {
|
|
50
34
|
"collapse-tags": "",
|
|
51
35
|
class: normalizeClass(unref(className)),
|
|
52
|
-
options: unref(myOptions)
|
|
53
|
-
|
|
54
|
-
onChange: handleChange,
|
|
55
|
-
onBlur: handleBlur
|
|
56
|
-
}, null, 8, ["class", "options", "disabled"]);
|
|
36
|
+
options: unref(myOptions)
|
|
37
|
+
}, null, 8, ["class", "options"]);
|
|
57
38
|
};
|
|
58
39
|
}
|
|
59
40
|
});
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { ISelectProps } from './select';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<ISelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
-
blur: (event: FocusEvent) => any;
|
|
4
|
-
change: (value: any) => any;
|
|
5
|
-
}, string, import('vue').PublicProps, Readonly<ISelectProps> & Readonly<{
|
|
6
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
7
|
-
onChange?: ((value: any) => any) | undefined;
|
|
8
|
-
}>, {
|
|
9
|
-
disabled: boolean;
|
|
2
|
+
declare const _default: import('vue').DefineComponent<ISelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ISelectProps> & Readonly<{}>, {
|
|
10
3
|
width: string | number;
|
|
11
4
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { ElSwitch, ElPopconfirm } from 'element-plus/es';
|
|
|
3
3
|
import 'element-plus/es/components/base/style/css';
|
|
4
4
|
import 'element-plus/es/components/popconfirm/style/css';
|
|
5
5
|
import 'element-plus/es/components/switch/style/css';
|
|
6
|
-
import { defineComponent, useTemplateRef,
|
|
6
|
+
import { defineComponent, useTemplateRef, createBlock, unref, openBlock, mergeProps, isRef, withModifiers, withCtx, createElementVNode, normalizeClass, createVNode } from 'vue';
|
|
7
7
|
import { useFormDisabled } from 'element-plus';
|
|
8
8
|
import { useVModel } from '@vueuse/core';
|
|
9
9
|
import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
|
|
@@ -29,15 +29,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
if (!mainRef.value) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
const ele = mainRef.value.getElementsByClassName("
|
|
32
|
+
const ele = mainRef.value.getElementsByClassName("vc-switch")[0];
|
|
33
33
|
return ele;
|
|
34
34
|
}
|
|
35
35
|
const handleConfirm = () => getSwitchEle()?.click();
|
|
36
|
-
onMounted(() => {
|
|
37
|
-
getSwitchEle()?.addEventListener("click", (event) => {
|
|
38
|
-
event.stopPropagation();
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
36
|
return (_ctx, _cache) => {
|
|
42
37
|
const _component_ElSwitch = ElSwitch;
|
|
43
38
|
const _component_ElPopconfirm = ElPopconfirm;
|
|
@@ -46,7 +41,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
41
|
modelValue: unref(myValue),
|
|
47
42
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(myValue) ? myValue.value = $event : null),
|
|
48
43
|
class: __props.className
|
|
49
|
-
}, _ctx.$attrs, {
|
|
44
|
+
}, _ctx.$attrs, {
|
|
45
|
+
disabled: unref(formDisabled),
|
|
46
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
47
|
+
}, ["stop"]))
|
|
48
|
+
}), null, 16, ["modelValue", "class", "disabled"])) : (openBlock(), createBlock(_component_ElPopconfirm, mergeProps({
|
|
50
49
|
key: 1,
|
|
51
50
|
title: __props.confirmTitle
|
|
52
51
|
}, props.confirmProps, { onConfirm: handleConfirm }), {
|
|
@@ -54,13 +53,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
53
|
createElementVNode("span", {
|
|
55
54
|
ref_key: "mainRef",
|
|
56
55
|
ref: mainRef,
|
|
57
|
-
class: normalizeClass(_ctx.$style.main)
|
|
56
|
+
class: normalizeClass(_ctx.$style.main),
|
|
57
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
58
|
+
}, ["stop"]))
|
|
58
59
|
}, [
|
|
59
60
|
createVNode(_component_ElSwitch, mergeProps({
|
|
60
61
|
modelValue: unref(myValue),
|
|
61
|
-
"onUpdate:modelValue": _cache[
|
|
62
|
-
class: ["
|
|
63
|
-
}, _ctx.$attrs), null, 16, ["modelValue", "class"])
|
|
62
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(myValue) ? myValue.value = $event : null),
|
|
63
|
+
class: ["vc-switch", __props.className]
|
|
64
|
+
}, _ctx.$attrs, { disabled: unref(formDisabled) }), null, 16, ["modelValue", "class", "disabled"])
|
|
64
65
|
], 2)
|
|
65
66
|
]),
|
|
66
67
|
_: 1
|
|
@@ -7,3 +7,9 @@ export interface ITagsProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
valueFormat?: (val: string | number) => string | number;
|
|
9
9
|
}
|
|
10
|
+
export interface ITagsEmits {
|
|
11
|
+
(e: 'update:modelValue', val: any[]): void;
|
|
12
|
+
(e: 'change', val: any[]): void;
|
|
13
|
+
(e: 'dragStart', event: any): void;
|
|
14
|
+
(e: 'dragEnd', event: any): void;
|
|
15
|
+
}
|
|
@@ -43,8 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
modelValue: { default: "" },
|
|
44
44
|
formatValue: { default: "" },
|
|
45
45
|
options: { default: () => ({ decimalScale: 2, integerScale: 12 }) },
|
|
46
|
-
padDecimal: { type: Boolean, default: true }
|
|
47
|
-
disabled: { type: Boolean }
|
|
46
|
+
padDecimal: { type: Boolean, default: true }
|
|
48
47
|
},
|
|
49
48
|
emits: ["update:modelValue", "update:formatValue", "change"],
|
|
50
49
|
setup(__props, { emit: __emit }) {
|