@dao-style/biz 0.0.0-0-71e3cdf
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/README.md +3 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/cjs/components/instance-cluster/style/instance-cluster.js +1 -0
- package/dist/cjs/components/instance-description/style/instance-description.js +1 -0
- package/dist/cjs/components/instance-name/style/instance-name.js +1 -0
- package/dist/cjs/components/instance-namespace/style/instance-namespace.js +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/instance-cluster/index.d.ts +2 -0
- package/dist/components/instance-cluster/props.d.ts +40 -0
- package/dist/components/instance-cluster/props.js +40 -0
- package/dist/components/instance-cluster/props.mjs +40 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue.d.ts +107 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue.js +27 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue.mjs +28 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue2.js +49 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue2.mjs +50 -0
- package/dist/components/instance-cluster/style/instance-cluster.d.ts +1 -0
- package/dist/components/instance-description/index.d.ts +2 -0
- package/dist/components/instance-description/props.d.ts +36 -0
- package/dist/components/instance-description/props.js +35 -0
- package/dist/components/instance-description/props.mjs +35 -0
- package/dist/components/instance-description/src/InstanceDescription.vue.d.ts +82 -0
- package/dist/components/instance-description/src/InstanceDescription.vue.js +21 -0
- package/dist/components/instance-description/src/InstanceDescription.vue.mjs +22 -0
- package/dist/components/instance-description/src/InstanceDescription.vue2.js +35 -0
- package/dist/components/instance-description/src/InstanceDescription.vue2.mjs +36 -0
- package/dist/components/instance-description/style/instance-description.d.ts +1 -0
- package/dist/components/instance-name/index.d.ts +1 -0
- package/dist/components/instance-name/src/InstanceName.vue.d.ts +60 -0
- package/dist/components/instance-name/src/InstanceName.vue.js +54 -0
- package/dist/components/instance-name/src/InstanceName.vue.mjs +55 -0
- package/dist/components/instance-name/src/InstanceName.vue2.js +3 -0
- package/dist/components/instance-name/src/InstanceName.vue2.mjs +4 -0
- package/dist/components/instance-name/style/instance-name.d.ts +1 -0
- package/dist/components/instance-name/style/instance-name.scss.js +3 -0
- package/dist/components/instance-name/style/instance-name.scss.mjs +4 -0
- package/dist/components/instance-namespace/index.d.ts +2 -0
- package/dist/components/instance-namespace/props.d.ts +40 -0
- package/dist/components/instance-namespace/props.js +40 -0
- package/dist/components/instance-namespace/props.mjs +40 -0
- package/dist/components/instance-namespace/src/InstanceNamespace.vue.d.ts +107 -0
- package/dist/components/instance-namespace/src/InstanceNamespace.vue.js +27 -0
- package/dist/components/instance-namespace/src/InstanceNamespace.vue.mjs +28 -0
- package/dist/components/instance-namespace/src/InstanceNamespace.vue2.js +49 -0
- package/dist/components/instance-namespace/src/InstanceNamespace.vue2.mjs +50 -0
- package/dist/components/instance-namespace/style/instance-namespace.d.ts +1 -0
- package/dist/constants/props.d.ts +8 -0
- package/dist/constants/props.js +9 -0
- package/dist/constants/props.mjs +9 -0
- package/dist/es/components/instance-cluster/style/instance-cluster.mjs +1 -0
- package/dist/es/components/instance-description/style/instance-description.mjs +1 -0
- package/dist/es/components/instance-name/style/instance-name.mjs +1 -0
- package/dist/es/components/instance-namespace/style/instance-namespace.mjs +1 -0
- package/dist/group-mapping.json +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +29 -0
- package/dist/index.mjs +26 -0
- package/dist/locales/en-US/components/InstanceCluster.json.js +8 -0
- package/dist/locales/en-US/components/InstanceCluster.json.mjs +8 -0
- package/dist/locales/en-US/components/InstanceDescription.json.js +8 -0
- package/dist/locales/en-US/components/InstanceDescription.json.mjs +8 -0
- package/dist/locales/en-US/components/InstanceName.json.js +8 -0
- package/dist/locales/en-US/components/InstanceName.json.mjs +8 -0
- package/dist/locales/en-US/components/InstanceNamespace.json.js +8 -0
- package/dist/locales/en-US/components/InstanceNamespace.json.mjs +8 -0
- package/dist/locales/en-US/index.d.ts +4 -0
- package/dist/locales/en-US/index.js +14 -0
- package/dist/locales/en-US/index.mjs +15 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/zh-CN/components/InstanceCluster.json.js +8 -0
- package/dist/locales/zh-CN/components/InstanceCluster.json.mjs +8 -0
- package/dist/locales/zh-CN/components/InstanceDescription.json.js +8 -0
- package/dist/locales/zh-CN/components/InstanceDescription.json.mjs +8 -0
- package/dist/locales/zh-CN/components/InstanceName.json.js +8 -0
- package/dist/locales/zh-CN/components/InstanceName.json.mjs +8 -0
- package/dist/locales/zh-CN/components/InstanceNamespace.json.js +8 -0
- package/dist/locales/zh-CN/components/InstanceNamespace.json.mjs +8 -0
- package/dist/locales/zh-CN/index.d.ts +4 -0
- package/dist/locales/zh-CN/index.js +14 -0
- package/dist/locales/zh-CN/index.mjs +15 -0
- package/dist/style.css +5 -0
- package/dist/styles/common.scss.js +3 -0
- package/dist/styles/common.scss.mjs +4 -0
- package/dist/styles/components/instance-name/instance-name.css +3 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +55 -0
- package/dist/utils/index.mjs +55 -0
- package/package.json +135 -0
- package/volar.d.ts +10 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _sfc_main from "./InstanceDescription.vue2.mjs";
|
|
2
|
+
import { resolveComponent, openBlock, createBlock } from "vue";
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_dao_form_item_validate = resolveComponent("dao-form-item-validate");
|
|
6
|
+
return openBlock(), createBlock(_component_dao_form_item_validate, {
|
|
7
|
+
label: _ctx.actualLabel,
|
|
8
|
+
name: _ctx.field,
|
|
9
|
+
required: _ctx.required && !_ctx.readonly,
|
|
10
|
+
"yup-concat": _ctx.actualYup,
|
|
11
|
+
"control-props": {
|
|
12
|
+
disabled: _ctx.readonly,
|
|
13
|
+
class: "default-form-width"
|
|
14
|
+
},
|
|
15
|
+
tag: "textarea",
|
|
16
|
+
helper: _ctx.helper
|
|
17
|
+
}, null, 8, ["label", "name", "required", "yup-concat", "control-props", "helper"]);
|
|
18
|
+
}
|
|
19
|
+
const InstanceDescription = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
20
|
+
export {
|
|
21
|
+
InstanceDescription as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const yup = require("yup");
|
|
4
|
+
const extend = require("@dao-style/extend");
|
|
5
|
+
const vueI18n = require("vue-i18n");
|
|
6
|
+
const props = require("../props.js");
|
|
7
|
+
require("../../../styles/common.scss.js");
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
name: "DaoInstanceDescription",
|
|
10
|
+
components: {
|
|
11
|
+
DaoFormItemValidate: extend.DaoFormItemValidate
|
|
12
|
+
},
|
|
13
|
+
props: props.instanceDescriptionProps,
|
|
14
|
+
setup(props2) {
|
|
15
|
+
const { t } = vueI18n.useI18n();
|
|
16
|
+
const actualLabel = vue.computed(() => {
|
|
17
|
+
if (props2.label == null) {
|
|
18
|
+
return t("biz.components.InstanceDescription.label");
|
|
19
|
+
}
|
|
20
|
+
return props2.label;
|
|
21
|
+
});
|
|
22
|
+
const actualYup = vue.computed(() => {
|
|
23
|
+
const baseSchema = yup.string().min(props2.min).max(props2.max);
|
|
24
|
+
if (props2.yupConcat) {
|
|
25
|
+
baseSchema.concat(props2.yupConcat);
|
|
26
|
+
}
|
|
27
|
+
return baseSchema;
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
actualLabel,
|
|
31
|
+
actualYup
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent, computed } from "vue";
|
|
2
|
+
import { string } from "yup";
|
|
3
|
+
import { DaoFormItemValidate } from "@dao-style/extend";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
import { instanceDescriptionProps } from "../props.mjs";
|
|
6
|
+
import "../../../styles/common.scss.mjs";
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
name: "DaoInstanceDescription",
|
|
9
|
+
components: {
|
|
10
|
+
DaoFormItemValidate
|
|
11
|
+
},
|
|
12
|
+
props: instanceDescriptionProps,
|
|
13
|
+
setup(props) {
|
|
14
|
+
const { t } = useI18n();
|
|
15
|
+
const actualLabel = computed(() => {
|
|
16
|
+
if (props.label == null) {
|
|
17
|
+
return t("biz.components.InstanceDescription.label");
|
|
18
|
+
}
|
|
19
|
+
return props.label;
|
|
20
|
+
});
|
|
21
|
+
const actualYup = computed(() => {
|
|
22
|
+
const baseSchema = string().min(props.min).max(props.max);
|
|
23
|
+
if (props.yupConcat) {
|
|
24
|
+
baseSchema.concat(props.yupConcat);
|
|
25
|
+
}
|
|
26
|
+
return baseSchema;
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
actualLabel,
|
|
30
|
+
actualYup
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
_sfc_main as default
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../styles/common.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DaoInstanceName } from './src/InstanceName.vue';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import '../style/instance-name';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
yupConcat: {
|
|
4
|
+
type: import("vue").PropType<import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>>;
|
|
5
|
+
default: undefined;
|
|
6
|
+
};
|
|
7
|
+
label: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
name: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
isEdit: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
min: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
max: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
yupConcat: {
|
|
29
|
+
type: import("vue").PropType<import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
label: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
name: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
isEdit: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
min: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: number;
|
|
47
|
+
};
|
|
48
|
+
max: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
}>>, {
|
|
53
|
+
yupConcat: import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>;
|
|
54
|
+
label: string;
|
|
55
|
+
name: string;
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
isEdit: boolean;
|
|
59
|
+
}>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const extend = require("@dao-style/extend");
|
|
4
|
+
const yup = require("yup");
|
|
5
|
+
const vueI18n = require("vue-i18n");
|
|
6
|
+
const props = require("../../../constants/props.js");
|
|
7
|
+
require("../style/instance-name.scss.js");
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
__name: "InstanceName",
|
|
10
|
+
props: {
|
|
11
|
+
label: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "name"
|
|
18
|
+
},
|
|
19
|
+
isEdit: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
min: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 2
|
|
26
|
+
},
|
|
27
|
+
max: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 36
|
|
30
|
+
},
|
|
31
|
+
...props.BaseValidateFormProps
|
|
32
|
+
},
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const props2 = __props;
|
|
35
|
+
const { t } = vueI18n.useI18n();
|
|
36
|
+
const actualYup = vue.computed(() => {
|
|
37
|
+
const baseSchema = yup.string().min(props2.min).max(props2.max);
|
|
38
|
+
if (props2.yupConcat) {
|
|
39
|
+
baseSchema.concat(props2.yupConcat);
|
|
40
|
+
}
|
|
41
|
+
return baseSchema;
|
|
42
|
+
});
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return vue.openBlock(), vue.createBlock(vue.unref(extend.DaoFormItemValidate), {
|
|
45
|
+
label: __props.label || vue.unref(t)("biz.components.InstanceName.label"),
|
|
46
|
+
name: __props.name,
|
|
47
|
+
required: !__props.isEdit,
|
|
48
|
+
"yup-concat": vue.unref(actualYup),
|
|
49
|
+
class: "dao-biz-instance-name"
|
|
50
|
+
}, null, 8, ["label", "name", "required", "yup-concat"]);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref } from "vue";
|
|
2
|
+
import { DaoFormItemValidate } from "@dao-style/extend";
|
|
3
|
+
import { string } from "yup";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
import { BaseValidateFormProps } from "../../../constants/props.mjs";
|
|
6
|
+
import "../style/instance-name.scss.mjs";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "InstanceName",
|
|
9
|
+
props: {
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "name"
|
|
17
|
+
},
|
|
18
|
+
isEdit: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
min: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 2
|
|
25
|
+
},
|
|
26
|
+
max: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 36
|
|
29
|
+
},
|
|
30
|
+
...BaseValidateFormProps
|
|
31
|
+
},
|
|
32
|
+
setup(__props) {
|
|
33
|
+
const props = __props;
|
|
34
|
+
const { t } = useI18n();
|
|
35
|
+
const actualYup = computed(() => {
|
|
36
|
+
const baseSchema = string().min(props.min).max(props.max);
|
|
37
|
+
if (props.yupConcat) {
|
|
38
|
+
baseSchema.concat(props.yupConcat);
|
|
39
|
+
}
|
|
40
|
+
return baseSchema;
|
|
41
|
+
});
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createBlock(unref(DaoFormItemValidate), {
|
|
44
|
+
label: __props.label || unref(t)("biz.components.InstanceName.label"),
|
|
45
|
+
name: __props.name,
|
|
46
|
+
required: !__props.isEdit,
|
|
47
|
+
"yup-concat": unref(actualYup),
|
|
48
|
+
class: "dao-biz-instance-name"
|
|
49
|
+
}, null, 8, ["label", "name", "required", "yup-concat"]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
_sfc_main as default
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './instance-name.scss';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type virtualSelectProps } from '@dao-style/core';
|
|
2
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
export declare const instanceNamespaceProps: {
|
|
4
|
+
yupConcat: {
|
|
5
|
+
type: PropType<import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>>;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
field: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
label: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
required: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
helper: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
options: {
|
|
29
|
+
type: PropType<string[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
controlProps: {
|
|
33
|
+
type: PropType<Record<string, unknown> & Partial<virtualSelectProps>>;
|
|
34
|
+
default: () => {};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const instanceNamespaceEmits: {
|
|
38
|
+
change: () => void;
|
|
39
|
+
};
|
|
40
|
+
export type InstanceNamespaceProps = ExtractPropTypes<typeof instanceNamespaceProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const core = require("@dao-style/core");
|
|
4
|
+
const props = require("../../constants/props.js");
|
|
5
|
+
const instanceNamespaceProps = {
|
|
6
|
+
field: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "namespace"
|
|
9
|
+
},
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: void 0
|
|
13
|
+
},
|
|
14
|
+
required: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
readonly: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
helper: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
options: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
controlProps: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({})
|
|
33
|
+
},
|
|
34
|
+
...props.BaseValidateFormProps
|
|
35
|
+
};
|
|
36
|
+
const instanceNamespaceEmits = {
|
|
37
|
+
change: () => core.emitHelperFn()
|
|
38
|
+
};
|
|
39
|
+
exports.instanceNamespaceEmits = instanceNamespaceEmits;
|
|
40
|
+
exports.instanceNamespaceProps = instanceNamespaceProps;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { emitHelperFn } from "@dao-style/core";
|
|
2
|
+
import { BaseValidateFormProps } from "../../constants/props.mjs";
|
|
3
|
+
const instanceNamespaceProps = {
|
|
4
|
+
field: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "namespace"
|
|
7
|
+
},
|
|
8
|
+
label: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
required: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
readonly: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
helper: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
options: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
controlProps: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => ({})
|
|
31
|
+
},
|
|
32
|
+
...BaseValidateFormProps
|
|
33
|
+
};
|
|
34
|
+
const instanceNamespaceEmits = {
|
|
35
|
+
change: () => emitHelperFn()
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
instanceNamespaceEmits,
|
|
39
|
+
instanceNamespaceProps
|
|
40
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type StringSchema } from 'yup';
|
|
2
|
+
import '../style/instance-namespace';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
yupConcat: {
|
|
5
|
+
type: import("vue").PropType<import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>>;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
field: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
label: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
required: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
helper: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
options: {
|
|
29
|
+
type: import("vue").PropType<string[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
controlProps: {
|
|
33
|
+
type: import("vue").PropType<Record<string, unknown> & Partial<import("@dao-style/core").virtualSelectProps>>;
|
|
34
|
+
default: () => {};
|
|
35
|
+
};
|
|
36
|
+
}, {
|
|
37
|
+
actualLabel: import("vue").ComputedRef<string>;
|
|
38
|
+
actualYup: import("vue").ComputedRef<StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>>;
|
|
39
|
+
actualControlProps: import("vue").ComputedRef<{
|
|
40
|
+
options: {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[];
|
|
44
|
+
search: boolean | import("@dao-style/core").DaoVirtualSelectSearchFn;
|
|
45
|
+
labelKey?: string | undefined;
|
|
46
|
+
valueKey?: string | undefined;
|
|
47
|
+
placeholder?: string | undefined;
|
|
48
|
+
disabled?: boolean | undefined;
|
|
49
|
+
size?: string | undefined;
|
|
50
|
+
menuClass?: string | undefined;
|
|
51
|
+
appendTo?: string | false | HTMLElement | undefined;
|
|
52
|
+
multiple?: boolean | undefined;
|
|
53
|
+
status?: "error" | "default" | "success" | "validating" | undefined;
|
|
54
|
+
loading?: boolean | undefined;
|
|
55
|
+
optionLoading?: boolean | undefined;
|
|
56
|
+
hideSelectAll?: boolean | undefined;
|
|
57
|
+
clearable?: boolean | undefined;
|
|
58
|
+
itemHeight?: number | undefined;
|
|
59
|
+
modelValue?: string | number | boolean | unknown[] | undefined;
|
|
60
|
+
optionsPlaceholder?: string | undefined;
|
|
61
|
+
searchPlaceholder?: string | undefined;
|
|
62
|
+
class: string;
|
|
63
|
+
}>;
|
|
64
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
|
+
yupConcat: {
|
|
66
|
+
type: import("vue").PropType<import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
field: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
label: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
required: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
readonly: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
helper: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
options: {
|
|
90
|
+
type: import("vue").PropType<string[]>;
|
|
91
|
+
default: () => never[];
|
|
92
|
+
};
|
|
93
|
+
controlProps: {
|
|
94
|
+
type: import("vue").PropType<Record<string, unknown> & Partial<import("@dao-style/core").virtualSelectProps>>;
|
|
95
|
+
default: () => {};
|
|
96
|
+
};
|
|
97
|
+
}>>, {
|
|
98
|
+
options: string[];
|
|
99
|
+
yupConcat: import("yup").BaseSchema<any, import("yup/lib/types").AnyObject, any>;
|
|
100
|
+
field: string;
|
|
101
|
+
label: string;
|
|
102
|
+
required: boolean;
|
|
103
|
+
readonly: boolean;
|
|
104
|
+
helper: string;
|
|
105
|
+
controlProps: Record<string, unknown> & Partial<import("@dao-style/core").virtualSelectProps>;
|
|
106
|
+
}>;
|
|
107
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const InstanceNamespace_vue_vue_type_script_lang = require("./InstanceNamespace.vue2.js");
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
5
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
|
+
const _component_dao_form_item_validate = vue.resolveComponent("dao-form-item-validate");
|
|
7
|
+
return vue.openBlock(), vue.createBlock(_component_dao_form_item_validate, {
|
|
8
|
+
label: _ctx.actualLabel,
|
|
9
|
+
name: _ctx.field,
|
|
10
|
+
required: _ctx.required && !_ctx.readonly,
|
|
11
|
+
"yup-concat": _ctx.actualYup,
|
|
12
|
+
"control-props": _ctx.actualControlProps,
|
|
13
|
+
helper: _ctx.helper,
|
|
14
|
+
tag: "dao-virtual-select",
|
|
15
|
+
"wrapper-type": _ctx.readonly ? "text" : void 0
|
|
16
|
+
}, vue.createSlots({ _: 2 }, [
|
|
17
|
+
_ctx.readonly ? {
|
|
18
|
+
name: "control-content",
|
|
19
|
+
fn: vue.withCtx(({ value }) => [
|
|
20
|
+
vue.createTextVNode(vue.toDisplayString(value.value), 1)
|
|
21
|
+
]),
|
|
22
|
+
key: "0"
|
|
23
|
+
} : void 0
|
|
24
|
+
]), 1032, ["label", "name", "required", "yup-concat", "control-props", "helper", "wrapper-type"]);
|
|
25
|
+
}
|
|
26
|
+
const InstanceNamespace = /* @__PURE__ */ _pluginVue_exportHelper(InstanceNamespace_vue_vue_type_script_lang, [["render", _sfc_render]]);
|
|
27
|
+
module.exports = InstanceNamespace;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _sfc_main from "./InstanceNamespace.vue2.mjs";
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, createSlots, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
3
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_dao_form_item_validate = resolveComponent("dao-form-item-validate");
|
|
6
|
+
return openBlock(), createBlock(_component_dao_form_item_validate, {
|
|
7
|
+
label: _ctx.actualLabel,
|
|
8
|
+
name: _ctx.field,
|
|
9
|
+
required: _ctx.required && !_ctx.readonly,
|
|
10
|
+
"yup-concat": _ctx.actualYup,
|
|
11
|
+
"control-props": _ctx.actualControlProps,
|
|
12
|
+
helper: _ctx.helper,
|
|
13
|
+
tag: "dao-virtual-select",
|
|
14
|
+
"wrapper-type": _ctx.readonly ? "text" : void 0
|
|
15
|
+
}, createSlots({ _: 2 }, [
|
|
16
|
+
_ctx.readonly ? {
|
|
17
|
+
name: "control-content",
|
|
18
|
+
fn: withCtx(({ value }) => [
|
|
19
|
+
createTextVNode(toDisplayString(value.value), 1)
|
|
20
|
+
]),
|
|
21
|
+
key: "0"
|
|
22
|
+
} : void 0
|
|
23
|
+
]), 1032, ["label", "name", "required", "yup-concat", "control-props", "helper", "wrapper-type"]);
|
|
24
|
+
}
|
|
25
|
+
const InstanceNamespace = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
26
|
+
export {
|
|
27
|
+
InstanceNamespace as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const yup = require("yup");
|
|
4
|
+
const extend = require("@dao-style/extend");
|
|
5
|
+
const vueI18n = require("vue-i18n");
|
|
6
|
+
const props = require("../props.js");
|
|
7
|
+
require("../../../styles/common.scss.js");
|
|
8
|
+
const _sfc_main = vue.defineComponent({
|
|
9
|
+
name: "DaoInstanceNamespace",
|
|
10
|
+
components: {
|
|
11
|
+
DaoFormItemValidate: extend.DaoFormItemValidate
|
|
12
|
+
},
|
|
13
|
+
props: props.instanceNamespaceProps,
|
|
14
|
+
setup(props2) {
|
|
15
|
+
const { t } = vueI18n.useI18n();
|
|
16
|
+
const actualLabel = vue.computed(() => {
|
|
17
|
+
if (props2.label == null) {
|
|
18
|
+
return t("biz.components.InstanceNamespace.label");
|
|
19
|
+
}
|
|
20
|
+
return props2.label;
|
|
21
|
+
});
|
|
22
|
+
const actualYup = vue.computed(() => {
|
|
23
|
+
const baseSchema = yup.string();
|
|
24
|
+
if (props2.yupConcat) {
|
|
25
|
+
baseSchema.concat(props2.yupConcat);
|
|
26
|
+
}
|
|
27
|
+
return baseSchema;
|
|
28
|
+
});
|
|
29
|
+
const formatOptions = (options) => options.map((item) => ({
|
|
30
|
+
label: item,
|
|
31
|
+
value: item
|
|
32
|
+
}));
|
|
33
|
+
const defaultControlProps = {
|
|
34
|
+
search: true,
|
|
35
|
+
class: "default-form-width"
|
|
36
|
+
};
|
|
37
|
+
const actualControlProps = vue.computed(() => ({
|
|
38
|
+
...defaultControlProps,
|
|
39
|
+
...props2.controlProps,
|
|
40
|
+
options: formatOptions(props2.options)
|
|
41
|
+
}));
|
|
42
|
+
return {
|
|
43
|
+
actualLabel,
|
|
44
|
+
actualYup,
|
|
45
|
+
actualControlProps
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
module.exports = _sfc_main;
|