@vunk/form 1.1.84 → 1.2.0
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/_plugin-vue_export-helper.cjs +11 -0
- package/components/button/index.cjs +112 -0
- package/components/cascader/index.cjs +130 -0
- package/components/checkbox/index.cjs +153 -0
- package/components/color-picker/index.cjs +80 -0
- package/components/date-picker/index.cjs +120 -0
- package/components/date-picker-range/index.cjs +170 -0
- package/components/download-plus/index.cjs +445 -0
- package/components/esri-input-geojson/index.cjs +1120 -0
- package/components/form/index.cjs +220 -0
- package/components/form-item/index.cjs +162 -0
- package/components/form-item-renderer/index.cjs +103 -0
- package/components/form-item-renderer-template/index.cjs +47 -0
- package/components/geoinput/index.cjs +95 -0
- package/components/geoinput-read/index.cjs +304 -0
- package/components/geoinput-update/index.cjs +406 -0
- package/components/index.cjs +13 -0
- package/components/index2.cjs +323 -0
- package/components/index3.cjs +486 -0
- package/components/input/index.cjs +119 -0
- package/components/input-link/index.cjs +157 -0
- package/components/input-number/index.cjs +100 -0
- package/components/radio/index.cjs +142 -0
- package/components/select/index.cjs +165 -0
- package/components/slider/index.cjs +89 -0
- package/components/switch/index.cjs +92 -0
- package/components/templates-default/index.cjs +308 -0
- package/components/templates-element-plus/index.cjs +112 -0
- package/components/templates-esri/index.cjs +65 -0
- package/components/templates-layout/index.cjs +137 -0
- package/components/templates-mapbox/index.cjs +65 -0
- package/components/templates-variant/index.cjs +70 -0
- package/components/upload/index.cjs +508 -0
- package/components/upload-plus/index.cjs +18658 -0
- package/components/van-cascader/index.cjs +128 -0
- package/components/var-datetime-picker/index.cjs +330 -0
- package/components/vditor/index.cjs +451 -0
- package/composables/index.cjs +89 -0
- package/package.json +97 -49
- package/shared/const/index.cjs +59 -0
- package/shared/element-plus/index.cjs +317 -0
- package/shared/form/index.cjs +33 -0
- package/shared/helper/index.cjs +11 -0
- package/shared/index.cjs +8 -0
- package/shared/infer-prop/index.cjs +36 -0
- package/shared/progress-it/index.cjs +40 -0
- package/shared/rules/index.cjs +56 -0
- package/shared/types/form/index.cjs +2 -0
- package/shared/types/index.cjs +2 -0
- package/shared/types/source/index.cjs +2 -0
- package/shared/types/source-manager/index.cjs +2 -0
- package/shared/upload/index.cjs +774 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var vue = require('vue');
|
|
8
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
9
|
+
var form = require('@vunk/form/shared/form');
|
|
10
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
11
|
+
|
|
12
|
+
const props = {
|
|
13
|
+
...formItem._VkfFormItemCtx.props,
|
|
14
|
+
...elementPlus.buttonProps,
|
|
15
|
+
buttonSlots: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
buttonLabel: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
validate: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const emits = {
|
|
29
|
+
...elementPlus.buttonEmits
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var _sfc_main = vue.defineComponent({
|
|
33
|
+
name: "VkfButton",
|
|
34
|
+
components: {
|
|
35
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
36
|
+
ElButton: elementPlus.ElButton
|
|
37
|
+
},
|
|
38
|
+
emits,
|
|
39
|
+
props,
|
|
40
|
+
setup(props2, { emit }) {
|
|
41
|
+
const coreBindProps = elementPlus$1.createButtonBindProps(props2);
|
|
42
|
+
const coreOnEmits = elementPlus$1.createButtonOnEmits(emit, ["click"]);
|
|
43
|
+
const formBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
44
|
+
const elFormRef = vue.inject("elFormRef", null);
|
|
45
|
+
const handleClick = (e) => {
|
|
46
|
+
if (!elFormRef || !props2.validate) return emit("click", e);
|
|
47
|
+
elFormRef.value.validate().then((flag) => {
|
|
48
|
+
if (flag) {
|
|
49
|
+
emit("click", e);
|
|
50
|
+
}
|
|
51
|
+
}).catch(form.validateCatch);
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
formBindProps,
|
|
55
|
+
coreBindProps,
|
|
56
|
+
coreOnEmits,
|
|
57
|
+
handleClick
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
63
|
+
const _component_ElButton = vue.resolveComponent("ElButton");
|
|
64
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
65
|
+
return vue.openBlock(), vue.createBlock(
|
|
66
|
+
_component_VkfFormItem,
|
|
67
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formBindProps)),
|
|
68
|
+
{
|
|
69
|
+
default: vue.withCtx(() => [
|
|
70
|
+
vue.createVNode(_component_ElButton, vue.mergeProps(_ctx.coreBindProps, vue.toHandlers(_ctx.coreOnEmits), { onClick: _ctx.handleClick }), vue.createSlots({
|
|
71
|
+
default: vue.withCtx(() => [
|
|
72
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
73
|
+
vue.createTextVNode(
|
|
74
|
+
vue.toDisplayString(_ctx.buttonLabel),
|
|
75
|
+
1
|
|
76
|
+
/* TEXT */
|
|
77
|
+
)
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
_: 2
|
|
81
|
+
/* DYNAMIC */
|
|
82
|
+
}, [
|
|
83
|
+
vue.renderList(_ctx.buttonSlots, (item, key) => {
|
|
84
|
+
return {
|
|
85
|
+
name: key,
|
|
86
|
+
fn: vue.withCtx((e) => [
|
|
87
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item?.(e))))
|
|
88
|
+
])
|
|
89
|
+
};
|
|
90
|
+
})
|
|
91
|
+
]), 1040, ["onClick"])
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
/* FORWARDED */
|
|
95
|
+
},
|
|
96
|
+
16
|
|
97
|
+
/* FULL_PROPS */
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
var VkfButton = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/button/src/index.vue"]]);
|
|
101
|
+
|
|
102
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
103
|
+
__proto__: null
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
VkfButton.install = (app) => {
|
|
107
|
+
app.component(VkfButton.name, VkfButton);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
exports.VkfButton = VkfButton;
|
|
111
|
+
exports.__VkfButton = types;
|
|
112
|
+
exports.default = VkfButton;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
7
|
+
var elementPlus = require('element-plus');
|
|
8
|
+
var vue = require('vue');
|
|
9
|
+
var composables = require('@vunk/form/composables');
|
|
10
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
11
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
12
|
+
|
|
13
|
+
const props = {
|
|
14
|
+
...elementPlus.cascaderProps,
|
|
15
|
+
...formItem._VkfFormItemCtx.props,
|
|
16
|
+
optionsUrl: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
readonly: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: void 0
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
26
|
+
const emits = {
|
|
27
|
+
...elementPlus.cascaderEmits
|
|
28
|
+
};
|
|
29
|
+
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
30
|
+
|
|
31
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
32
|
+
__proto__: null,
|
|
33
|
+
createBindProps: createBindProps,
|
|
34
|
+
createOnEmits: createOnEmits,
|
|
35
|
+
emits: emits,
|
|
36
|
+
props: props
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const useOptions = (props, emit) => {
|
|
40
|
+
const optionsFromUrl = vue.ref([]);
|
|
41
|
+
const rUrlOptions = (url) => {
|
|
42
|
+
if (url) {
|
|
43
|
+
fetch(url).then((res) => res.json()).then((data) => {
|
|
44
|
+
optionsFromUrl.value = data;
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
optionsFromUrl.value = [];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
if (props.optionsUrl) {
|
|
51
|
+
rUrlOptions(props.optionsUrl);
|
|
52
|
+
}
|
|
53
|
+
vue.watch(() => props.optionsUrl, (url) => {
|
|
54
|
+
emit("update:modelValue", void 0);
|
|
55
|
+
if (url) rUrlOptions(url);
|
|
56
|
+
});
|
|
57
|
+
const options = vue.computed(
|
|
58
|
+
() => optionsFromUrl.value.length ? optionsFromUrl.value : props.options
|
|
59
|
+
);
|
|
60
|
+
return options;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var use = /*#__PURE__*/Object.freeze({
|
|
64
|
+
__proto__: null,
|
|
65
|
+
useOptions: useOptions
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
var _sfc_main = vue.defineComponent({
|
|
69
|
+
name: "VkfCascader",
|
|
70
|
+
components: {
|
|
71
|
+
ElCascader: elementPlus.ElCascader,
|
|
72
|
+
VkfFormItem: formItem.VkfFormItem
|
|
73
|
+
},
|
|
74
|
+
emits,
|
|
75
|
+
props,
|
|
76
|
+
setup(props2, { emit }) {
|
|
77
|
+
const coreBindProps = elementPlus$1.createCascaderBindProps(props2, ["options"]);
|
|
78
|
+
const coreOnEmits = elementPlus$1.createCascaderOnEmits(emit);
|
|
79
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
80
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
81
|
+
const options = useOptions(props2, emit);
|
|
82
|
+
return {
|
|
83
|
+
coreBindProps,
|
|
84
|
+
coreOnEmits,
|
|
85
|
+
formItemBindProps,
|
|
86
|
+
readonly,
|
|
87
|
+
options
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
|
+
const _component_ElCascader = vue.resolveComponent("ElCascader");
|
|
94
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
95
|
+
return vue.openBlock(), vue.createBlock(
|
|
96
|
+
_component_VkfFormItem,
|
|
97
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
98
|
+
{
|
|
99
|
+
default: vue.withCtx(() => [
|
|
100
|
+
vue.createVNode(_component_ElCascader, vue.mergeProps(_ctx.coreBindProps, vue.toHandlers(_ctx.coreOnEmits), {
|
|
101
|
+
readonly: _ctx.readonly,
|
|
102
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
103
|
+
options: _ctx.options,
|
|
104
|
+
class: {
|
|
105
|
+
"is-readonly": _ctx.readonly
|
|
106
|
+
}
|
|
107
|
+
}), null, 16, ["readonly", "disabled", "options", "class"])
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
/* STABLE */
|
|
111
|
+
},
|
|
112
|
+
16
|
|
113
|
+
/* FULL_PROPS */
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
var VkfCascader = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/cascader/src/index.vue"]]);
|
|
117
|
+
|
|
118
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
119
|
+
__proto__: null
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
VkfCascader.install = (app) => {
|
|
123
|
+
app.component(VkfCascader.name, VkfCascader);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
exports.VkfCascader = VkfCascader;
|
|
127
|
+
exports._VkfCascaderCtx = ctx;
|
|
128
|
+
exports._VkfCascaderUse = use;
|
|
129
|
+
exports.__VkfCascader = types;
|
|
130
|
+
exports.default = VkfCascader;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var elementPlus = require('element-plus');
|
|
7
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
8
|
+
var vue = require('vue');
|
|
9
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
10
|
+
var utilsObject = require('@vunk/core/shared/utils-object');
|
|
11
|
+
var composables = require('@vunk/form/composables');
|
|
12
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
13
|
+
|
|
14
|
+
const props = {
|
|
15
|
+
...formItem._VkfFormItemCtx.props,
|
|
16
|
+
...elementPlus.checkboxGroupProps,
|
|
17
|
+
options: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => []
|
|
20
|
+
},
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "default"
|
|
24
|
+
},
|
|
25
|
+
defaultModelValue: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: void 0
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
35
|
+
const emits = {
|
|
36
|
+
...elementPlus.checkboxGroupEmits
|
|
37
|
+
};
|
|
38
|
+
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
39
|
+
|
|
40
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
41
|
+
__proto__: null,
|
|
42
|
+
createBindProps: createBindProps,
|
|
43
|
+
createOnEmits: createOnEmits,
|
|
44
|
+
emits: emits,
|
|
45
|
+
props: props
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
var _sfc_main = vue.defineComponent({
|
|
49
|
+
name: "VkfCheckbox",
|
|
50
|
+
components: {
|
|
51
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
52
|
+
ElCheckbox: elementPlus.ElCheckbox,
|
|
53
|
+
ElCheckboxGroup: elementPlus.ElCheckboxGroup,
|
|
54
|
+
ElCheckboxButton: elementPlus.ElCheckboxButton
|
|
55
|
+
},
|
|
56
|
+
emits,
|
|
57
|
+
props,
|
|
58
|
+
setup(props2, { emit }) {
|
|
59
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
60
|
+
const coreBindProps = elementPlus$1.createCheckboxGroupBindProps(props2, ["disabled", "label"]);
|
|
61
|
+
const coreOnEmits = elementPlus$1.createCheckboxGroupOnEmits(emit);
|
|
62
|
+
const options = vue.computed(() => {
|
|
63
|
+
return props2.options.filter((item) => item.value !== void 0 && item.value !== null);
|
|
64
|
+
});
|
|
65
|
+
!props2.modelValue && props2.defaultModelValue && emit("update:modelValue", props2.defaultModelValue);
|
|
66
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
67
|
+
const pickRadioProps = (item) => {
|
|
68
|
+
const obj = utilsObject.pickObject(item, {
|
|
69
|
+
excludes: ["label", "value"]
|
|
70
|
+
});
|
|
71
|
+
if (elementPlus$1.isGte2_6_0) {
|
|
72
|
+
obj.value = item.value;
|
|
73
|
+
} else {
|
|
74
|
+
obj.label = item.value;
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
formItemBindProps,
|
|
80
|
+
coreBindProps,
|
|
81
|
+
coreOnEmits,
|
|
82
|
+
options,
|
|
83
|
+
readonly,
|
|
84
|
+
pickRadioProps
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
90
|
+
const _component_ElCheckboxGroup = vue.resolveComponent("ElCheckboxGroup");
|
|
91
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
92
|
+
return vue.openBlock(), vue.createBlock(
|
|
93
|
+
_component_VkfFormItem,
|
|
94
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
95
|
+
{
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.createVNode(_component_ElCheckboxGroup, vue.mergeProps({
|
|
98
|
+
class: {
|
|
99
|
+
"is-readonly": _ctx.readonly
|
|
100
|
+
}
|
|
101
|
+
}, _ctx.coreBindProps, vue.toHandlers(_ctx.coreOnEmits), {
|
|
102
|
+
disabled: _ctx.readonly || _ctx.disabled
|
|
103
|
+
}), {
|
|
104
|
+
default: vue.withCtx(() => [
|
|
105
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
106
|
+
vue.Fragment,
|
|
107
|
+
null,
|
|
108
|
+
vue.renderList(_ctx.options, (item) => {
|
|
109
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.type === "button" ? "ElCheckboxButton" : "ElCheckbox"), vue.mergeProps({
|
|
110
|
+
key: item.value,
|
|
111
|
+
label: item.value,
|
|
112
|
+
ref_for: true
|
|
113
|
+
}, _ctx.pickRadioProps(item)), {
|
|
114
|
+
default: vue.withCtx(() => [
|
|
115
|
+
vue.createTextVNode(
|
|
116
|
+
vue.toDisplayString(item.label ?? item.value),
|
|
117
|
+
1
|
|
118
|
+
/* TEXT */
|
|
119
|
+
)
|
|
120
|
+
]),
|
|
121
|
+
_: 2
|
|
122
|
+
/* DYNAMIC */
|
|
123
|
+
}, 1040, ["label"]);
|
|
124
|
+
}),
|
|
125
|
+
128
|
|
126
|
+
/* KEYED_FRAGMENT */
|
|
127
|
+
))
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
/* STABLE */
|
|
131
|
+
}, 16, ["class", "disabled"])
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
/* STABLE */
|
|
135
|
+
},
|
|
136
|
+
16
|
|
137
|
+
/* FULL_PROPS */
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
var VkfCheckbox = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/checkbox/src/index.vue"]]);
|
|
141
|
+
|
|
142
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
143
|
+
__proto__: null
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
VkfCheckbox.install = (app) => {
|
|
147
|
+
app.component(VkfCheckbox.name, VkfCheckbox);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
exports.VkfCheckbox = VkfCheckbox;
|
|
151
|
+
exports._VkfCheckboxCtx = ctx;
|
|
152
|
+
exports.__VkfCheckbox = types;
|
|
153
|
+
exports.default = VkfCheckbox;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var elementPlus = require('element-plus');
|
|
6
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
7
|
+
var vue = require('vue');
|
|
8
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
9
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
10
|
+
|
|
11
|
+
const props = {
|
|
12
|
+
...formItem._VkfFormItemCtx.props,
|
|
13
|
+
...elementPlus.colorPickerProps
|
|
14
|
+
};
|
|
15
|
+
const emits = {
|
|
16
|
+
...elementPlus.colorPickerEmits
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var _sfc_main = vue.defineComponent({
|
|
20
|
+
name: "VkfColorPicker",
|
|
21
|
+
components: {
|
|
22
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
23
|
+
ElColorPicker: elementPlus.ElColorPicker
|
|
24
|
+
},
|
|
25
|
+
emits,
|
|
26
|
+
props,
|
|
27
|
+
setup(props2, { emit }) {
|
|
28
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
29
|
+
const coreBindProps = elementPlus$1.createColorPickerBindProps(props2, ["label"]);
|
|
30
|
+
const coreOnEmits = elementPlus$1.createColorPickerOnEmits(emit);
|
|
31
|
+
return {
|
|
32
|
+
formItemBindProps,
|
|
33
|
+
coreBindProps,
|
|
34
|
+
coreOnEmits
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
40
|
+
const _component_ElColorPicker = vue.resolveComponent("ElColorPicker");
|
|
41
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
42
|
+
return vue.openBlock(), vue.createBlock(
|
|
43
|
+
_component_VkfFormItem,
|
|
44
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
45
|
+
{
|
|
46
|
+
default: vue.withCtx(() => [
|
|
47
|
+
vue.createVNode(
|
|
48
|
+
_component_ElColorPicker,
|
|
49
|
+
vue.mergeProps(_ctx.coreBindProps, vue.toHandlers(_ctx.coreOnEmits)),
|
|
50
|
+
{
|
|
51
|
+
default: vue.withCtx(() => [
|
|
52
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
53
|
+
]),
|
|
54
|
+
_: 3
|
|
55
|
+
/* FORWARDED */
|
|
56
|
+
},
|
|
57
|
+
16
|
|
58
|
+
/* FULL_PROPS */
|
|
59
|
+
)
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
/* FORWARDED */
|
|
63
|
+
},
|
|
64
|
+
16
|
|
65
|
+
/* FULL_PROPS */
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
var VkfColorPicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/color-picker/src/index.vue"]]);
|
|
69
|
+
|
|
70
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
71
|
+
__proto__: null
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
VkfColorPicker.install = (app) => {
|
|
75
|
+
app.component(VkfColorPicker.name, VkfColorPicker);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.VkfColorPicker = VkfColorPicker;
|
|
79
|
+
exports.__VkfColorPicker = types;
|
|
80
|
+
exports.default = VkfColorPicker;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var elementPlus = require('@vunk/form/shared/element-plus');
|
|
7
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
8
|
+
var vue = require('vue');
|
|
9
|
+
var elementPlus$1 = require('element-plus');
|
|
10
|
+
var composables = require('@vunk/form/composables');
|
|
11
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
12
|
+
|
|
13
|
+
const props = {
|
|
14
|
+
...elementPlus.datePickerProps,
|
|
15
|
+
...formItem._VkfFormItemCtx.props,
|
|
16
|
+
datePickerSlots: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: void 0
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
22
|
+
const emits = {
|
|
23
|
+
...elementPlus.datePickerEmits
|
|
24
|
+
};
|
|
25
|
+
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
26
|
+
|
|
27
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
createBindProps: createBindProps,
|
|
30
|
+
createOnEmits: createOnEmits,
|
|
31
|
+
emits: emits,
|
|
32
|
+
props: props
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _sfc_main = vue.defineComponent({
|
|
36
|
+
name: "VkfDatePicker",
|
|
37
|
+
components: {
|
|
38
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
39
|
+
ElDatePicker: elementPlus$1.ElDatePicker
|
|
40
|
+
},
|
|
41
|
+
props,
|
|
42
|
+
emits,
|
|
43
|
+
setup(props2, { emit }) {
|
|
44
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
45
|
+
const datePickerBindProps = elementPlus.createDatePickerBindProps(props2, [
|
|
46
|
+
"type",
|
|
47
|
+
"readonly",
|
|
48
|
+
"label"
|
|
49
|
+
]);
|
|
50
|
+
const datePickerOnEmits = elementPlus.createDatePickerOnEmits(emit);
|
|
51
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
52
|
+
return {
|
|
53
|
+
formItemBindProps,
|
|
54
|
+
datePickerBindProps,
|
|
55
|
+
datePickerOnEmits,
|
|
56
|
+
readonly
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
62
|
+
const _component_ElDatePicker = vue.resolveComponent("ElDatePicker");
|
|
63
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
64
|
+
return vue.openBlock(), vue.createBlock(
|
|
65
|
+
_component_VkfFormItem,
|
|
66
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
67
|
+
{
|
|
68
|
+
default: vue.withCtx(() => [
|
|
69
|
+
vue.createVNode(_component_ElDatePicker, vue.mergeProps(_ctx.datePickerBindProps, {
|
|
70
|
+
type: _ctx.type,
|
|
71
|
+
readonly: _ctx.readonly
|
|
72
|
+
}, vue.toHandlers(_ctx.datePickerOnEmits)), vue.createSlots({
|
|
73
|
+
_: 2
|
|
74
|
+
/* DYNAMIC */
|
|
75
|
+
}, [
|
|
76
|
+
vue.renderList(_ctx.datePickerSlots, (item, key) => {
|
|
77
|
+
return {
|
|
78
|
+
name: key,
|
|
79
|
+
fn: vue.withCtx((e) => [
|
|
80
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item?.(e))))
|
|
81
|
+
])
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
]), 1040, ["type", "readonly"])
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
/* STABLE */
|
|
88
|
+
},
|
|
89
|
+
16
|
|
90
|
+
/* FULL_PROPS */
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
var VkfDatePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/date-picker/src/index.vue"]]);
|
|
94
|
+
|
|
95
|
+
const datePickerEmits = {
|
|
96
|
+
"update:modelValue": null,
|
|
97
|
+
"change": null,
|
|
98
|
+
"focus": null,
|
|
99
|
+
"blur": null,
|
|
100
|
+
"calendar-change": null,
|
|
101
|
+
"panel-change": null,
|
|
102
|
+
"visible-change": null
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
106
|
+
__proto__: null,
|
|
107
|
+
datePickerEmits: datePickerEmits
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
VkfDatePicker.install = (app) => {
|
|
111
|
+
app.component(
|
|
112
|
+
VkfDatePicker.name || "VkfDatePicker",
|
|
113
|
+
VkfDatePicker
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
exports.VkfDatePicker = VkfDatePicker;
|
|
118
|
+
exports._VkfDatePickerCtx = ctx;
|
|
119
|
+
exports.__VkfDatePicker = types;
|
|
120
|
+
exports.default = VkfDatePicker;
|