@vunk/form 0.0.1-alpha.51 → 0.0.1-alpha.53
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/components/form-item-renderer-template-default/index.js +17 -1
- package/components/link-input/index.css +5 -0
- package/components/link-input/index.d.ts +4 -0
- package/components/link-input/index.js +181 -0
- package/components/link-input/src/ctx.d.ts +143 -0
- package/components/link-input/src/ctx.js +46 -0
- package/components/link-input/src/index.vue.d.ts +373 -0
- package/components/link-input/src/types.d.ts +1 -0
- package/components/link-input/src/types.js +1 -0
- package/components/upload/index.css +4 -0
- package/components/upload/index.js +2 -1
- package/index.css +10 -0
- package/package.json +1 -1
- package/shared/types/renderer-source/index.d.ts +3 -1
- package/shared/types/renderer-source/link-input.d.ts +8 -0
|
@@ -13,6 +13,7 @@ import { VkfUpload } from '@vunk/form/components/upload';
|
|
|
13
13
|
import { VkfColorPicker } from '@vunk/form/components/color-picker';
|
|
14
14
|
import { VkfButton } from '@vunk/form/components/button';
|
|
15
15
|
import { VkfCascader } from '@vunk/form/components/cascader';
|
|
16
|
+
import { VkfLinkInput } from '@vunk/form/components/link-input';
|
|
16
17
|
|
|
17
18
|
const props = {
|
|
18
19
|
data: {
|
|
@@ -46,7 +47,8 @@ const _sfc_main = defineComponent({
|
|
|
46
47
|
VkfUpload,
|
|
47
48
|
VkfColorPicker,
|
|
48
49
|
VkfButton,
|
|
49
|
-
VkfCascader
|
|
50
|
+
VkfCascader,
|
|
51
|
+
VkfLinkInput
|
|
50
52
|
},
|
|
51
53
|
emits,
|
|
52
54
|
props,
|
|
@@ -70,6 +72,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
70
72
|
const _component_VkfDatePicker = resolveComponent("VkfDatePicker");
|
|
71
73
|
const _component_VkfInputNumber = resolveComponent("VkfInputNumber");
|
|
72
74
|
const _component_VkfCascader = resolveComponent("VkfCascader");
|
|
75
|
+
const _component_VkfLinkInput = resolveComponent("VkfLinkInput");
|
|
73
76
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
74
77
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfButton" }, {
|
|
75
78
|
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
@@ -207,6 +210,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
207
210
|
]),
|
|
208
211
|
_: 1
|
|
209
212
|
}),
|
|
213
|
+
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfLinkInput" }, {
|
|
214
|
+
default: withCtx(({ data: sourceData, templateIf }) => [
|
|
215
|
+
templateIf(_ctx.data) ? (openBlock(), createBlock(_component_VkfLinkInput, mergeProps({
|
|
216
|
+
key: 0,
|
|
217
|
+
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
218
|
+
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
219
|
+
k: sourceData.prop,
|
|
220
|
+
v: $event
|
|
221
|
+
})
|
|
222
|
+
}, sourceData), null, 16, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
}),
|
|
210
226
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "Component" }, {
|
|
211
227
|
default: withCtx(({ data, raw, templateIf }) => [
|
|
212
228
|
templateIf(data) ? (openBlock(), createBlock(resolveDynamicComponent(typeof data.is === "function" ? data.is(raw) : data.is), normalizeProps(mergeProps({ key: 0 }, _ctx.pickObject(data, { excludes: ["is"] }))), null, 16)) : createCommentVNode("v-if", true)
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
|
|
2
|
+
import { openBlock, createElementBlock, createElementVNode, defineComponent, computed, h, resolveComponent, createBlock, createCommentVNode, createVNode, mergeProps, toHandlers } from 'vue';
|
|
3
|
+
import { ElButton, ElIcon } from 'element-plus';
|
|
4
|
+
import { isPlainObject } from '@vunk/core/shared/utils-object';
|
|
5
|
+
import { useComputedReadonly } from '@vunk/form/composables';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __defProps = Object.defineProperties;
|
|
9
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
|
|
27
|
+
type: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "textarea"
|
|
30
|
+
},
|
|
31
|
+
rows: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 4
|
|
34
|
+
},
|
|
35
|
+
uploadUrl: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "https://pan.baidu.com/disk/main#/index?category=all"
|
|
38
|
+
},
|
|
39
|
+
placeholder: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"
|
|
42
|
+
},
|
|
43
|
+
readonly: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: void 0
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const emits = __spreadValues({}, _VkfInputCtx.emits);
|
|
49
|
+
|
|
50
|
+
/*! Element Plus Icons Vue v2.1.0 */
|
|
51
|
+
|
|
52
|
+
// unplugin-vue:/plugin-vue/export-helper
|
|
53
|
+
var export_helper_default = (sfc, props) => {
|
|
54
|
+
let target = sfc.__vccOpts || sfc;
|
|
55
|
+
for (let [key, val] of props)
|
|
56
|
+
target[key] = val;
|
|
57
|
+
return target;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/right.vue?vue&type=script&lang.ts
|
|
61
|
+
var right_vue_vue_type_script_lang_default = {
|
|
62
|
+
name: "Right"
|
|
63
|
+
};
|
|
64
|
+
var _hoisted_1221 = {
|
|
65
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
+
viewBox: "0 0 1024 1024"
|
|
67
|
+
}, _hoisted_2221 = /* @__PURE__ */ createElementVNode(
|
|
68
|
+
"path",
|
|
69
|
+
{
|
|
70
|
+
fill: "currentColor",
|
|
71
|
+
d: "M754.752 480H160a32 32 0 1 0 0 64h594.752L521.344 777.344a32 32 0 0 0 45.312 45.312l288-288a32 32 0 0 0 0-45.312l-288-288a32 32 0 1 0-45.312 45.312L754.752 480z"
|
|
72
|
+
},
|
|
73
|
+
null,
|
|
74
|
+
-1
|
|
75
|
+
/* HOISTED */
|
|
76
|
+
), _hoisted_3220 = [
|
|
77
|
+
_hoisted_2221
|
|
78
|
+
];
|
|
79
|
+
function _sfc_render221(_ctx, _cache, $props, $setup, $data, $options) {
|
|
80
|
+
return openBlock(), createElementBlock("svg", _hoisted_1221, _hoisted_3220);
|
|
81
|
+
}
|
|
82
|
+
var right_default = /* @__PURE__ */ export_helper_default(right_vue_vue_type_script_lang_default, [["render", _sfc_render221], ["__file", "right.vue"]]);
|
|
83
|
+
|
|
84
|
+
var _export_sfc = (sfc, props) => {
|
|
85
|
+
const target = sfc.__vccOpts || sfc;
|
|
86
|
+
for (const [key, val] of props) {
|
|
87
|
+
target[key] = val;
|
|
88
|
+
}
|
|
89
|
+
return target;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const _sfc_main = defineComponent({
|
|
93
|
+
name: "VkfLinkInput",
|
|
94
|
+
components: {
|
|
95
|
+
VkfInput
|
|
96
|
+
},
|
|
97
|
+
emits,
|
|
98
|
+
props,
|
|
99
|
+
setup(props2, { emit }) {
|
|
100
|
+
const coreProps = _VkfInputCtx.createBindProps(props2, ["disabled"]);
|
|
101
|
+
const coreEmits = _VkfInputCtx.createOnEmits(emit);
|
|
102
|
+
const readonly = useComputedReadonly(props2);
|
|
103
|
+
const disabled = computed(() => {
|
|
104
|
+
if (readonly.value) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return props2.disabled;
|
|
108
|
+
});
|
|
109
|
+
const createAppendEl = (url) => () => h(
|
|
110
|
+
ElButton,
|
|
111
|
+
{
|
|
112
|
+
onClick: () => window.open(url)
|
|
113
|
+
},
|
|
114
|
+
() => h(
|
|
115
|
+
ElIcon,
|
|
116
|
+
{
|
|
117
|
+
class: "vkf-link-input-icon",
|
|
118
|
+
size: 16
|
|
119
|
+
},
|
|
120
|
+
() => h(right_default)
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
const rules = computed(() => {
|
|
124
|
+
const data = [
|
|
125
|
+
{
|
|
126
|
+
pattern: /^(http|https):\/\/([\w.]+\/?)\S*$/,
|
|
127
|
+
message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u94FE\u63A5\u5730\u5740"
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
if (Array.isArray(props2.rules)) {
|
|
131
|
+
data.push(...props2.rules);
|
|
132
|
+
}
|
|
133
|
+
if (isPlainObject(props2.rules)) {
|
|
134
|
+
data.push(props2.rules);
|
|
135
|
+
}
|
|
136
|
+
return data;
|
|
137
|
+
});
|
|
138
|
+
return {
|
|
139
|
+
coreProps,
|
|
140
|
+
coreEmits,
|
|
141
|
+
createAppendEl,
|
|
142
|
+
rules,
|
|
143
|
+
disabled,
|
|
144
|
+
readonly
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
const _hoisted_1 = { class: "vkf-link-input" };
|
|
149
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
150
|
+
const _component_VkfInput = resolveComponent("VkfInput");
|
|
151
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
152
|
+
!_ctx.readonly ? (openBlock(), createBlock(_component_VkfInput, {
|
|
153
|
+
key: 0,
|
|
154
|
+
label: "\u4E0A\u4F20\u5730\u5740",
|
|
155
|
+
disabled: true,
|
|
156
|
+
modelValue: _ctx.uploadUrl,
|
|
157
|
+
inputSlots: {
|
|
158
|
+
append: _ctx.createAppendEl(_ctx.uploadUrl)
|
|
159
|
+
}
|
|
160
|
+
}, null, 8, ["modelValue", "inputSlots"])) : createCommentVNode("v-if", true),
|
|
161
|
+
createVNode(_component_VkfInput, mergeProps(_ctx.coreProps, toHandlers(_ctx.coreEmits), {
|
|
162
|
+
rules: _ctx.rules,
|
|
163
|
+
disabled: _ctx.disabled,
|
|
164
|
+
type: _ctx.readonly ? "text" : _ctx.type,
|
|
165
|
+
inputSlots: {
|
|
166
|
+
append: _ctx.readonly ? _ctx.createAppendEl(_ctx.modelValue + "") : void 0
|
|
167
|
+
}
|
|
168
|
+
}), null, 16, ["rules", "disabled", "type", "inputSlots"])
|
|
169
|
+
]);
|
|
170
|
+
}
|
|
171
|
+
var VkfLinkInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
|
|
172
|
+
|
|
173
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
174
|
+
__proto__: null
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
VkfLinkInput.install = (app) => {
|
|
178
|
+
app.component(VkfLinkInput.name, VkfLinkInput);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export { VkfLinkInput, types as __VkfLinkInput, VkfLinkInput as default };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare const props: {
|
|
2
|
+
type: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
rows: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
uploadUrl: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
placeholder: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
readonly: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
maxlength: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
required: boolean;
|
|
25
|
+
};
|
|
26
|
+
minlength: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
required: boolean;
|
|
29
|
+
};
|
|
30
|
+
inputSlots: {
|
|
31
|
+
type: import("vue").PropType<import("../../input/src/types").InputSlots>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
35
|
+
label: StringConstructor;
|
|
36
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
37
|
+
prop: {
|
|
38
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
|
+
__epPropKey: true;
|
|
42
|
+
};
|
|
43
|
+
rules: {
|
|
44
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
45
|
+
readonly required: false;
|
|
46
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
|
+
__epPropKey: true;
|
|
48
|
+
};
|
|
49
|
+
error: StringConstructor;
|
|
50
|
+
validateStatus: {
|
|
51
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
52
|
+
readonly required: false;
|
|
53
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
54
|
+
__epPropKey: true;
|
|
55
|
+
};
|
|
56
|
+
for: StringConstructor;
|
|
57
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
58
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
59
|
+
formItemSize: {
|
|
60
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
formItemSlots: {
|
|
64
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
elRef: {
|
|
68
|
+
type: import("vue").PropType<any>;
|
|
69
|
+
required: boolean;
|
|
70
|
+
};
|
|
71
|
+
inline: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
76
|
+
size: {
|
|
77
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
78
|
+
readonly required: false;
|
|
79
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
80
|
+
__epPropKey: true;
|
|
81
|
+
};
|
|
82
|
+
disabled: BooleanConstructor;
|
|
83
|
+
modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, "", boolean>;
|
|
84
|
+
resize: {
|
|
85
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
88
|
+
__epPropKey: true;
|
|
89
|
+
};
|
|
90
|
+
autosize: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize) | ((new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize))[], unknown, unknown, false, boolean>;
|
|
91
|
+
autocomplete: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "off", boolean>;
|
|
92
|
+
formatter: {
|
|
93
|
+
readonly type: import("vue").PropType<Function>;
|
|
94
|
+
readonly required: false;
|
|
95
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
96
|
+
__epPropKey: true;
|
|
97
|
+
};
|
|
98
|
+
parser: {
|
|
99
|
+
readonly type: import("vue").PropType<Function>;
|
|
100
|
+
readonly required: false;
|
|
101
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
102
|
+
__epPropKey: true;
|
|
103
|
+
};
|
|
104
|
+
form: {
|
|
105
|
+
readonly type: import("vue").PropType<string>;
|
|
106
|
+
readonly required: false;
|
|
107
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
|
+
__epPropKey: true;
|
|
109
|
+
};
|
|
110
|
+
clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
111
|
+
showPassword: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
112
|
+
showWordLimit: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
113
|
+
suffixIcon: {
|
|
114
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
115
|
+
readonly required: false;
|
|
116
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
117
|
+
__epPropKey: true;
|
|
118
|
+
};
|
|
119
|
+
prefixIcon: {
|
|
120
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
121
|
+
readonly required: false;
|
|
122
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
123
|
+
__epPropKey: true;
|
|
124
|
+
};
|
|
125
|
+
containerRole: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
126
|
+
tabindex: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
|
127
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
128
|
+
inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
129
|
+
};
|
|
130
|
+
export declare const emits: {
|
|
131
|
+
"update:modelValue": (value: string) => boolean;
|
|
132
|
+
input: (value: string) => boolean;
|
|
133
|
+
change: (value: string) => boolean;
|
|
134
|
+
focus: (evt: FocusEvent) => boolean;
|
|
135
|
+
blur: (evt: FocusEvent) => boolean;
|
|
136
|
+
clear: () => boolean;
|
|
137
|
+
mouseleave: (evt: MouseEvent) => boolean;
|
|
138
|
+
mouseenter: (evt: MouseEvent) => boolean;
|
|
139
|
+
keydown: (evt: Event | KeyboardEvent) => boolean;
|
|
140
|
+
compositionstart: (evt: CompositionEvent) => boolean;
|
|
141
|
+
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
142
|
+
compositionend: (evt: CompositionEvent) => boolean;
|
|
143
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { _VkfInputCtx } from '@vunk/form/components/input';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "textarea"
|
|
26
|
+
},
|
|
27
|
+
rows: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 4
|
|
30
|
+
},
|
|
31
|
+
uploadUrl: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "https://pan.baidu.com/disk/main#/index?category=all"
|
|
34
|
+
},
|
|
35
|
+
placeholder: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "\u4E0A\u4F20\u6587\u4EF6\u540E, \u5C06\u6587\u4EF6\u4E0B\u8F7D\u5730\u5740\u7C98\u8D34\u5230\u6B64\u5904"
|
|
38
|
+
},
|
|
39
|
+
readonly: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: void 0
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const emits = __spreadValues({}, _VkfInputCtx.emits);
|
|
45
|
+
|
|
46
|
+
export { emits, props };
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { FormItemRule } from 'element-plus';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
type: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
rows: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
uploadUrl: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
placeholder: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
readonly: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: undefined;
|
|
22
|
+
};
|
|
23
|
+
maxlength: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
required: boolean;
|
|
26
|
+
};
|
|
27
|
+
minlength: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
required: boolean;
|
|
30
|
+
};
|
|
31
|
+
inputSlots: {
|
|
32
|
+
type: import("vue").PropType<import("../../input/src/types").InputSlots>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
36
|
+
label: StringConstructor;
|
|
37
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
38
|
+
prop: {
|
|
39
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
+
__epPropKey: true;
|
|
43
|
+
};
|
|
44
|
+
rules: {
|
|
45
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>) | ((new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>))[], unknown, unknown>>;
|
|
46
|
+
readonly required: false;
|
|
47
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
48
|
+
__epPropKey: true;
|
|
49
|
+
};
|
|
50
|
+
error: StringConstructor;
|
|
51
|
+
validateStatus: {
|
|
52
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
55
|
+
__epPropKey: true;
|
|
56
|
+
};
|
|
57
|
+
for: StringConstructor;
|
|
58
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
59
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
60
|
+
formItemSize: {
|
|
61
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
formItemSlots: {
|
|
65
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
elRef: {
|
|
69
|
+
type: import("vue").PropType<any>;
|
|
70
|
+
required: boolean;
|
|
71
|
+
};
|
|
72
|
+
inline: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
77
|
+
size: {
|
|
78
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
79
|
+
readonly required: false;
|
|
80
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
81
|
+
__epPropKey: true;
|
|
82
|
+
};
|
|
83
|
+
disabled: BooleanConstructor;
|
|
84
|
+
modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, "", boolean>;
|
|
85
|
+
resize: {
|
|
86
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
87
|
+
readonly required: false;
|
|
88
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
|
+
__epPropKey: true;
|
|
90
|
+
};
|
|
91
|
+
autosize: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize) | ((new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize))[], unknown, unknown, false, boolean>;
|
|
92
|
+
autocomplete: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "off", boolean>;
|
|
93
|
+
formatter: {
|
|
94
|
+
readonly type: import("vue").PropType<Function>;
|
|
95
|
+
readonly required: false;
|
|
96
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
97
|
+
__epPropKey: true;
|
|
98
|
+
};
|
|
99
|
+
parser: {
|
|
100
|
+
readonly type: import("vue").PropType<Function>;
|
|
101
|
+
readonly required: false;
|
|
102
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
103
|
+
__epPropKey: true;
|
|
104
|
+
};
|
|
105
|
+
form: {
|
|
106
|
+
readonly type: import("vue").PropType<string>;
|
|
107
|
+
readonly required: false;
|
|
108
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
109
|
+
__epPropKey: true;
|
|
110
|
+
};
|
|
111
|
+
clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
112
|
+
showPassword: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
113
|
+
showWordLimit: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
114
|
+
suffixIcon: {
|
|
115
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
116
|
+
readonly required: false;
|
|
117
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
118
|
+
__epPropKey: true;
|
|
119
|
+
};
|
|
120
|
+
prefixIcon: {
|
|
121
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
122
|
+
readonly required: false;
|
|
123
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
124
|
+
__epPropKey: true;
|
|
125
|
+
};
|
|
126
|
+
containerRole: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
127
|
+
tabindex: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
|
128
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
129
|
+
inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
130
|
+
}, {
|
|
131
|
+
coreProps: import("vue").ComputedRef<{
|
|
132
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
133
|
+
type: string;
|
|
134
|
+
label: string | undefined;
|
|
135
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
136
|
+
prop: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown> | undefined;
|
|
137
|
+
rules: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>) | ((new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>))[], unknown, unknown> | undefined;
|
|
138
|
+
error: string | undefined;
|
|
139
|
+
validateStatus: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown> | undefined;
|
|
140
|
+
for: string | undefined;
|
|
141
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
142
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
143
|
+
size: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never> | undefined;
|
|
144
|
+
formItemSize: "default" | "small" | "large";
|
|
145
|
+
formItemSlots: import("../../form-item/src/types").FormItemSlots | undefined;
|
|
146
|
+
elRef: any;
|
|
147
|
+
inline: boolean;
|
|
148
|
+
readonly: boolean | undefined;
|
|
149
|
+
form: string | undefined;
|
|
150
|
+
resize: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown> | undefined;
|
|
151
|
+
id: string | undefined;
|
|
152
|
+
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
153
|
+
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
154
|
+
clearable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
155
|
+
prefixIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown> | undefined;
|
|
156
|
+
placeholder: string;
|
|
157
|
+
modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
|
|
158
|
+
autosize: import("element-plus").InputAutoSize;
|
|
159
|
+
autocomplete: string;
|
|
160
|
+
formatter: Function | undefined;
|
|
161
|
+
parser: Function | undefined;
|
|
162
|
+
showPassword: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
163
|
+
showWordLimit: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
164
|
+
suffixIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown> | undefined;
|
|
165
|
+
containerRole: string | undefined;
|
|
166
|
+
inputStyle: import("vue").StyleValue;
|
|
167
|
+
maxlength: number | undefined;
|
|
168
|
+
minlength: number | undefined;
|
|
169
|
+
inputSlots: import("../../input/src/types").InputSlots | undefined;
|
|
170
|
+
rows: number;
|
|
171
|
+
}>;
|
|
172
|
+
coreEmits: {
|
|
173
|
+
input: (value: string) => void;
|
|
174
|
+
blur: (value: string) => void;
|
|
175
|
+
change: (value: string) => void;
|
|
176
|
+
compositionend: (value: string) => void;
|
|
177
|
+
compositionstart: (value: string) => void;
|
|
178
|
+
compositionupdate: (value: string) => void;
|
|
179
|
+
focus: (value: string) => void;
|
|
180
|
+
keydown: (value: string) => void;
|
|
181
|
+
mouseenter: (value: string) => void;
|
|
182
|
+
mouseleave: (value: string) => void;
|
|
183
|
+
clear: (value: string) => void;
|
|
184
|
+
"update:modelValue": (value: string) => void;
|
|
185
|
+
};
|
|
186
|
+
createAppendEl: (url: string) => () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
187
|
+
[key: string]: any;
|
|
188
|
+
}>;
|
|
189
|
+
rules: import("vue").ComputedRef<FormItemRule[]>;
|
|
190
|
+
disabled: import("vue").ComputedRef<boolean>;
|
|
191
|
+
readonly: import("vue").ComputedRef<boolean>;
|
|
192
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
193
|
+
"update:modelValue": (value: string) => boolean;
|
|
194
|
+
input: (value: string) => boolean;
|
|
195
|
+
change: (value: string) => boolean;
|
|
196
|
+
focus: (evt: FocusEvent) => boolean;
|
|
197
|
+
blur: (evt: FocusEvent) => boolean;
|
|
198
|
+
clear: () => boolean;
|
|
199
|
+
mouseleave: (evt: MouseEvent) => boolean;
|
|
200
|
+
mouseenter: (evt: MouseEvent) => boolean;
|
|
201
|
+
keydown: (evt: Event | KeyboardEvent) => boolean;
|
|
202
|
+
compositionstart: (evt: CompositionEvent) => boolean;
|
|
203
|
+
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
204
|
+
compositionend: (evt: CompositionEvent) => boolean;
|
|
205
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
206
|
+
type: {
|
|
207
|
+
type: StringConstructor;
|
|
208
|
+
default: string;
|
|
209
|
+
};
|
|
210
|
+
rows: {
|
|
211
|
+
type: NumberConstructor;
|
|
212
|
+
default: number;
|
|
213
|
+
};
|
|
214
|
+
uploadUrl: {
|
|
215
|
+
type: StringConstructor;
|
|
216
|
+
default: string;
|
|
217
|
+
};
|
|
218
|
+
placeholder: {
|
|
219
|
+
type: StringConstructor;
|
|
220
|
+
default: string;
|
|
221
|
+
};
|
|
222
|
+
readonly: {
|
|
223
|
+
type: BooleanConstructor;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
|
+
maxlength: {
|
|
227
|
+
type: NumberConstructor;
|
|
228
|
+
required: boolean;
|
|
229
|
+
};
|
|
230
|
+
minlength: {
|
|
231
|
+
type: NumberConstructor;
|
|
232
|
+
required: boolean;
|
|
233
|
+
};
|
|
234
|
+
inputSlots: {
|
|
235
|
+
type: import("vue").PropType<import("../../input/src/types").InputSlots>;
|
|
236
|
+
default: undefined;
|
|
237
|
+
};
|
|
238
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
239
|
+
label: StringConstructor;
|
|
240
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
241
|
+
prop: {
|
|
242
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
|
|
243
|
+
readonly required: false;
|
|
244
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
245
|
+
__epPropKey: true;
|
|
246
|
+
};
|
|
247
|
+
rules: {
|
|
248
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>) | ((new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>))[], unknown, unknown>>;
|
|
249
|
+
readonly required: false;
|
|
250
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
251
|
+
__epPropKey: true;
|
|
252
|
+
};
|
|
253
|
+
error: StringConstructor;
|
|
254
|
+
validateStatus: {
|
|
255
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
256
|
+
readonly required: false;
|
|
257
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
258
|
+
__epPropKey: true;
|
|
259
|
+
};
|
|
260
|
+
for: StringConstructor;
|
|
261
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
262
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
263
|
+
formItemSize: {
|
|
264
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
265
|
+
default: string;
|
|
266
|
+
};
|
|
267
|
+
formItemSlots: {
|
|
268
|
+
type: import("vue").PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
269
|
+
default: undefined;
|
|
270
|
+
};
|
|
271
|
+
elRef: {
|
|
272
|
+
type: import("vue").PropType<any>;
|
|
273
|
+
required: boolean;
|
|
274
|
+
};
|
|
275
|
+
inline: {
|
|
276
|
+
type: BooleanConstructor;
|
|
277
|
+
default: boolean;
|
|
278
|
+
};
|
|
279
|
+
id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
280
|
+
size: {
|
|
281
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
282
|
+
readonly required: false;
|
|
283
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
284
|
+
__epPropKey: true;
|
|
285
|
+
};
|
|
286
|
+
disabled: BooleanConstructor;
|
|
287
|
+
modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, "", boolean>;
|
|
288
|
+
resize: {
|
|
289
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
290
|
+
readonly required: false;
|
|
291
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
292
|
+
__epPropKey: true;
|
|
293
|
+
};
|
|
294
|
+
autosize: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize) | ((new (...args: any[]) => import("element-plus").InputAutoSize & {}) | (() => import("element-plus").InputAutoSize))[], unknown, unknown, false, boolean>;
|
|
295
|
+
autocomplete: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "off", boolean>;
|
|
296
|
+
formatter: {
|
|
297
|
+
readonly type: import("vue").PropType<Function>;
|
|
298
|
+
readonly required: false;
|
|
299
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
300
|
+
__epPropKey: true;
|
|
301
|
+
};
|
|
302
|
+
parser: {
|
|
303
|
+
readonly type: import("vue").PropType<Function>;
|
|
304
|
+
readonly required: false;
|
|
305
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
306
|
+
__epPropKey: true;
|
|
307
|
+
};
|
|
308
|
+
form: {
|
|
309
|
+
readonly type: import("vue").PropType<string>;
|
|
310
|
+
readonly required: false;
|
|
311
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
312
|
+
__epPropKey: true;
|
|
313
|
+
};
|
|
314
|
+
clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
315
|
+
showPassword: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
316
|
+
showWordLimit: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
317
|
+
suffixIcon: {
|
|
318
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
319
|
+
readonly required: false;
|
|
320
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
321
|
+
__epPropKey: true;
|
|
322
|
+
};
|
|
323
|
+
prefixIcon: {
|
|
324
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
325
|
+
readonly required: false;
|
|
326
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
327
|
+
__epPropKey: true;
|
|
328
|
+
};
|
|
329
|
+
containerRole: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
330
|
+
tabindex: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
|
331
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
332
|
+
inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
|
|
333
|
+
}>> & {
|
|
334
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
335
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
336
|
+
onChange?: ((value: string) => any) | undefined;
|
|
337
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
338
|
+
onKeydown?: ((evt: Event | KeyboardEvent) => any) | undefined;
|
|
339
|
+
onInput?: ((value: string) => any) | undefined;
|
|
340
|
+
onClear?: (() => any) | undefined;
|
|
341
|
+
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
342
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
343
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
344
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
345
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
346
|
+
}, {
|
|
347
|
+
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
348
|
+
type: string;
|
|
349
|
+
labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
350
|
+
inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
|
|
351
|
+
showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
352
|
+
formItemSize: "default" | "small" | "large";
|
|
353
|
+
formItemSlots: import("../../form-item/src/types").FormItemSlots;
|
|
354
|
+
inline: boolean;
|
|
355
|
+
readonly: boolean;
|
|
356
|
+
disabled: boolean;
|
|
357
|
+
id: string;
|
|
358
|
+
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
359
|
+
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
360
|
+
clearable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
361
|
+
placeholder: string;
|
|
362
|
+
modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
|
|
363
|
+
autosize: import("element-plus").InputAutoSize;
|
|
364
|
+
autocomplete: string;
|
|
365
|
+
showPassword: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
366
|
+
showWordLimit: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
367
|
+
containerRole: string;
|
|
368
|
+
inputStyle: import("vue").StyleValue;
|
|
369
|
+
inputSlots: import("../../input/src/types").InputSlots;
|
|
370
|
+
rows: number;
|
|
371
|
+
uploadUrl: string;
|
|
372
|
+
}>;
|
|
373
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -544,7 +544,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
544
544
|
createVNode(_component_ElUpload, mergeProps({
|
|
545
545
|
class: ["vkf-upload", {
|
|
546
546
|
"is-readonly": _ctx.readonly,
|
|
547
|
-
"is-empty": _ctx.fileList?.length === 0
|
|
547
|
+
"is-empty": _ctx.fileList?.length === 0,
|
|
548
|
+
"is-limit": _ctx.limit && _ctx.fileList?.length >= _ctx.limit
|
|
548
549
|
}]
|
|
549
550
|
}, _ctx.coreBindProps, {
|
|
550
551
|
fileList: _ctx.fileList ?? [],
|
package/index.css
CHANGED
|
@@ -67,6 +67,12 @@
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
|
|
70
|
+
.vkf-link-input-icon{
|
|
71
|
+
color: var(--el-color-primary);
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
70
76
|
.el-radio-group.is-readonly,
|
|
71
77
|
.el-radio-group.is-readonly .el-radio-button{
|
|
72
78
|
--el-readonly-cursor: auto;
|
|
@@ -139,6 +145,10 @@
|
|
|
139
145
|
min-width: 100px;
|
|
140
146
|
}
|
|
141
147
|
|
|
148
|
+
.vkf-upload.is-limit .el-upload{
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
142
152
|
|
|
143
153
|
.el-upload-list__item-status-label{
|
|
144
154
|
z-index: 1;
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import type { VkfUploadSource } from './upload';
|
|
|
10
10
|
import type { VkfColorPickerSource } from './color-picker';
|
|
11
11
|
import type { VkfButtonSource } from './button';
|
|
12
12
|
import type { VkfCascaderSource } from './cascader';
|
|
13
|
+
import type { VkfLinkInputSource } from './link-input';
|
|
13
14
|
export * from './compoent';
|
|
14
15
|
export * from './date-picker';
|
|
15
16
|
export * from './input';
|
|
@@ -22,4 +23,5 @@ export * from './upload';
|
|
|
22
23
|
export * from './color-picker';
|
|
23
24
|
export * from './button';
|
|
24
25
|
export * from './cascader';
|
|
25
|
-
export
|
|
26
|
+
export * from './link-input';
|
|
27
|
+
export declare type FormItemRendererSource<P extends string = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | VkfLinkInputSource<P> | ComponentSource;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VkfLinkInput } from '@vunk/form/components/link-input';
|
|
2
|
+
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export declare type VkfLinkInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfLinkInput>, T>;
|
|
5
|
+
export interface VkfLinkInputSource<P extends string = string> extends VkfLinkInputProps, BasicSource {
|
|
6
|
+
prop: P;
|
|
7
|
+
templateType: 'VkfLinkInput';
|
|
8
|
+
}
|