@fangzhongya/fang-ui 0.1.48 → 0.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/compons/components.cjs +15 -15
- package/dist/components/common/compons/components.js +15 -15
- package/dist/components/date-picker/style/element.scss +4 -7
- package/dist/components/dates-picker/src/util.cjs +4 -55
- package/dist/components/dates-picker/src/util.js +4 -55
- package/dist/components/double/src/index2.cjs +39 -36
- package/dist/components/double/src/index2.js +39 -36
- package/dist/components/forms-div/src/index2.cjs +3 -5
- package/dist/components/forms-div/src/index2.js +3 -5
- package/dist/components/index.cjs +72 -88
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.js +0 -16
- package/dist/components/list/src/index2.cjs +2 -3
- package/dist/components/list/src/index2.js +2 -3
- package/dist/components/list/src/util.cjs +14 -10
- package/dist/components/list/src/util.d.ts +2 -7
- package/dist/components/list/src/util.js +6 -2
- package/dist/expand/{chunk-PBGPF77Y.cjs → chunk-A7IW6WRD.cjs} +0 -8
- package/dist/expand/{chunk-S57QISTZ.js → chunk-L4FI5HCY.js} +0 -8
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/compons/index.cjs +1 -1
- package/dist/hooks/compons/index.d.ts +1 -1
- package/dist/hooks/compons/index.js +1 -1
- package/dist/hooks/compons/load.d.ts +1 -0
- package/dist/hooks/event-aliass/index.cjs +1 -1
- package/dist/hooks/event-aliass/index.js +1 -1
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +94 -110
- package/dist/index.js +0 -16
- package/package.json +4 -4
- package/dist/components/choice-select/index.cjs +0 -8
- package/dist/components/choice-select/index.d.ts +0 -5
- package/dist/components/choice-select/index.js +0 -8
- package/dist/components/choice-select/src/data.cjs +0 -26
- package/dist/components/choice-select/src/data.d.ts +0 -34
- package/dist/components/choice-select/src/data.js +0 -26
- package/dist/components/choice-select/src/index.cjs +0 -4
- package/dist/components/choice-select/src/index.js +0 -4
- package/dist/components/choice-select/src/index2.cjs +0 -30
- package/dist/components/choice-select/src/index2.js +0 -30
- package/dist/components/company-select/index.cjs +0 -8
- package/dist/components/company-select/index.d.ts +0 -5
- package/dist/components/company-select/index.js +0 -8
- package/dist/components/company-select/src/data.cjs +0 -76
- package/dist/components/company-select/src/data.d.ts +0 -109
- package/dist/components/company-select/src/data.js +0 -76
- package/dist/components/company-select/src/index.cjs +0 -4
- package/dist/components/company-select/src/index.js +0 -4
- package/dist/components/company-select/src/index2.cjs +0 -201
- package/dist/components/company-select/src/index2.js +0 -201
- package/dist/components/department-select/index.cjs +0 -8
- package/dist/components/department-select/index.d.ts +0 -5
- package/dist/components/department-select/index.js +0 -8
- package/dist/components/department-select/src/data.cjs +0 -88
- package/dist/components/department-select/src/data.d.ts +0 -128
- package/dist/components/department-select/src/data.js +0 -88
- package/dist/components/department-select/src/index.cjs +0 -4
- package/dist/components/department-select/src/index.js +0 -4
- package/dist/components/department-select/src/index2.cjs +0 -60
- package/dist/components/department-select/src/index2.js +0 -60
- package/dist/components/role-select/index.cjs +0 -8
- package/dist/components/role-select/index.d.ts +0 -5
- package/dist/components/role-select/index.js +0 -8
- package/dist/components/role-select/src/data.cjs +0 -79
- package/dist/components/role-select/src/data.d.ts +0 -107
- package/dist/components/role-select/src/data.js +0 -79
- package/dist/components/role-select/src/index.cjs +0 -4
- package/dist/components/role-select/src/index.js +0 -4
- package/dist/components/role-select/src/index2.cjs +0 -215
- package/dist/components/role-select/src/index2.js +0 -215
- package/dist/components/select-dialog/index.cjs +0 -8
- package/dist/components/select-dialog/index.d.ts +0 -5
- package/dist/components/select-dialog/index.js +0 -8
- package/dist/components/select-dialog/src/data.cjs +0 -92
- package/dist/components/select-dialog/src/data.d.ts +0 -131
- package/dist/components/select-dialog/src/data.js +0 -92
- package/dist/components/select-dialog/src/index.cjs +0 -4
- package/dist/components/select-dialog/src/index.js +0 -4
- package/dist/components/select-dialog/src/index2.cjs +0 -226
- package/dist/components/select-dialog/src/index2.js +0 -226
- package/dist/components/select-popover/index.cjs +0 -8
- package/dist/components/select-popover/index.d.ts +0 -5
- package/dist/components/select-popover/index.js +0 -8
- package/dist/components/select-popover/src/data.cjs +0 -38
- package/dist/components/select-popover/src/data.d.ts +0 -41
- package/dist/components/select-popover/src/data.js +0 -38
- package/dist/components/select-popover/src/index.cjs +0 -4
- package/dist/components/select-popover/src/index.js +0 -4
- package/dist/components/select-popover/src/index2.cjs +0 -177
- package/dist/components/select-popover/src/index2.js +0 -177
- package/dist/components/tree-select-box/index.cjs +0 -8
- package/dist/components/tree-select-box/index.d.ts +0 -5
- package/dist/components/tree-select-box/index.js +0 -8
- package/dist/components/tree-select-box/src/data.cjs +0 -100
- package/dist/components/tree-select-box/src/data.d.ts +0 -143
- package/dist/components/tree-select-box/src/data.js +0 -100
- package/dist/components/tree-select-box/src/index.cjs +0 -4
- package/dist/components/tree-select-box/src/index.js +0 -4
- package/dist/components/tree-select-box/src/index2.cjs +0 -255
- package/dist/components/tree-select-box/src/index2.js +0 -255
- package/dist/components/user-select/index.cjs +0 -8
- package/dist/components/user-select/index.d.ts +0 -5
- package/dist/components/user-select/index.js +0 -8
- package/dist/components/user-select/src/data.cjs +0 -99
- package/dist/components/user-select/src/data.d.ts +0 -144
- package/dist/components/user-select/src/data.js +0 -99
- package/dist/components/user-select/src/index.cjs +0 -4
- package/dist/components/user-select/src/index.js +0 -4
- package/dist/components/user-select/src/index2.cjs +0 -381
- package/dist/components/user-select/src/index2.js +0 -381
- /package/dist/components/{keep-com → option}/index.css +0 -0
- /package/dist/css/{keep-com.css → option.css} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
require("./src/index.cjs");
|
|
4
|
-
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
|
-
const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
|
|
6
|
-
const SelectPopover = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "SelectPopover");
|
|
7
|
-
exports.SelectPopover = SelectPopover;
|
|
8
|
-
exports.default = SelectPopover;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
-
const name = "select-popover";
|
|
5
|
-
const dataProps = buildProps.buildProps({
|
|
6
|
-
readonly: {
|
|
7
|
-
type: Boolean
|
|
8
|
-
},
|
|
9
|
-
disabled: {
|
|
10
|
-
type: Boolean
|
|
11
|
-
},
|
|
12
|
-
clearable: {
|
|
13
|
-
type: Boolean
|
|
14
|
-
},
|
|
15
|
-
/**
|
|
16
|
-
* @props { } modelValue 选择值v-model
|
|
17
|
-
*/
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: String
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
const dataEmits = [
|
|
23
|
-
"update:modelValue",
|
|
24
|
-
"focus",
|
|
25
|
-
"blur",
|
|
26
|
-
"change",
|
|
27
|
-
"input"
|
|
28
|
-
];
|
|
29
|
-
const dataSlot = {
|
|
30
|
-
iconSelect: "icon-select",
|
|
31
|
-
default: "default"
|
|
32
|
-
};
|
|
33
|
-
const dataExpose = {};
|
|
34
|
-
exports.dataEmits = dataEmits;
|
|
35
|
-
exports.dataExpose = dataExpose;
|
|
36
|
-
exports.dataProps = dataProps;
|
|
37
|
-
exports.dataSlot = dataSlot;
|
|
38
|
-
exports.name = name;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* @title {h3} select-popover
|
|
4
|
-
*/
|
|
5
|
-
export declare const name = "select-popover";
|
|
6
|
-
export declare const dataProps: {
|
|
7
|
-
readonly: {
|
|
8
|
-
type: BooleanConstructor;
|
|
9
|
-
};
|
|
10
|
-
disabled: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
};
|
|
13
|
-
clearable: {
|
|
14
|
-
type: BooleanConstructor;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @props { } modelValue 选择值v-model
|
|
18
|
-
*/
|
|
19
|
-
modelValue: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export type DataProps = ExtractPropTypes<typeof dataProps>;
|
|
24
|
-
/**
|
|
25
|
-
* @emits change (val:[String, Array])
|
|
26
|
-
* 选择的时间
|
|
27
|
-
*/
|
|
28
|
-
export declare const dataEmits: string[];
|
|
29
|
-
export type DataEmits = typeof dataEmits;
|
|
30
|
-
/**
|
|
31
|
-
* @slot default 默认插槽
|
|
32
|
-
*/
|
|
33
|
-
export declare const dataSlot: {
|
|
34
|
-
iconSelect: string;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* @expose setValue (val:<string>设置的数据 )
|
|
39
|
-
* 设置值
|
|
40
|
-
*/
|
|
41
|
-
export declare const dataExpose: {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
-
const name = "select-popover";
|
|
3
|
-
const dataProps = buildProps({
|
|
4
|
-
readonly: {
|
|
5
|
-
type: Boolean
|
|
6
|
-
},
|
|
7
|
-
disabled: {
|
|
8
|
-
type: Boolean
|
|
9
|
-
},
|
|
10
|
-
clearable: {
|
|
11
|
-
type: Boolean
|
|
12
|
-
},
|
|
13
|
-
/**
|
|
14
|
-
* @props { } modelValue 选择值v-model
|
|
15
|
-
*/
|
|
16
|
-
modelValue: {
|
|
17
|
-
type: String
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const dataEmits = [
|
|
21
|
-
"update:modelValue",
|
|
22
|
-
"focus",
|
|
23
|
-
"blur",
|
|
24
|
-
"change",
|
|
25
|
-
"input"
|
|
26
|
-
];
|
|
27
|
-
const dataSlot = {
|
|
28
|
-
iconSelect: "icon-select",
|
|
29
|
-
default: "default"
|
|
30
|
-
};
|
|
31
|
-
const dataExpose = {};
|
|
32
|
-
export {
|
|
33
|
-
dataEmits,
|
|
34
|
-
dataExpose,
|
|
35
|
-
dataProps,
|
|
36
|
-
dataSlot,
|
|
37
|
-
name
|
|
38
|
-
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const getCss = require("@fangzhongya/utils/css/getCss");
|
|
5
|
-
const data = require("./data.cjs");
|
|
6
|
-
const index$4 = require("../../popover/index.cjs");
|
|
7
|
-
const index$5 = require("../../inputs/index.cjs");
|
|
8
|
-
const index$2 = require("../../../hooks/cssname/index.cjs");
|
|
9
|
-
const index = require("../../../hooks/inherit/index.cjs");
|
|
10
|
-
const index$1 = require("../../../hooks/locale/index.cjs");
|
|
11
|
-
const index$3 = require("../../../hooks/props-default/index.cjs");
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
-
...{ inheritAttrs: false },
|
|
14
|
-
__name: "index",
|
|
15
|
-
props: index$3.getProps(data.dataProps),
|
|
16
|
-
emits: data.dataEmits,
|
|
17
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
18
|
-
const attrs = index.useInherit();
|
|
19
|
-
const slots = vue.useSlots();
|
|
20
|
-
const { getLocale } = index$1.useLocale();
|
|
21
|
-
const cs = index$2.useCssName(data.name);
|
|
22
|
-
const prs = __props;
|
|
23
|
-
const props = index$3.usePropsDefault(data.name, prs, data.dataProps);
|
|
24
|
-
const emit = __emit;
|
|
25
|
-
const visible = vue.ref(false);
|
|
26
|
-
const width = vue.ref(200);
|
|
27
|
-
const refInput = vue.ref();
|
|
28
|
-
const isfocus = vue.ref(false);
|
|
29
|
-
const isFiletr = vue.ref(false);
|
|
30
|
-
const value = vue.computed({
|
|
31
|
-
get() {
|
|
32
|
-
let v = props.modelValue;
|
|
33
|
-
return v;
|
|
34
|
-
},
|
|
35
|
-
set(value2) {
|
|
36
|
-
emit("update:modelValue", value2);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const isclear = vue.computed(() => {
|
|
40
|
-
if (props.readonly) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
if (props.clearable && value.value && isfocus.value) {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
return false;
|
|
47
|
-
});
|
|
48
|
-
function setWidth() {
|
|
49
|
-
if (refInput.value && refInput.value.el) {
|
|
50
|
-
width.value = getCss.getCss(refInput.value.el, "width");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function onInput(v, ...arr) {
|
|
54
|
-
emit("input", v, ...arr);
|
|
55
|
-
}
|
|
56
|
-
let timeout;
|
|
57
|
-
function onBlur(...arr) {
|
|
58
|
-
emit("blur", ...arr);
|
|
59
|
-
timeout = setTimeout(() => {
|
|
60
|
-
isfocus.value = false;
|
|
61
|
-
visible.value = false;
|
|
62
|
-
}, 200);
|
|
63
|
-
}
|
|
64
|
-
function clearBlur() {
|
|
65
|
-
clearTimeout(timeout);
|
|
66
|
-
}
|
|
67
|
-
function onFocus(...arr) {
|
|
68
|
-
isfocus.value = true;
|
|
69
|
-
clearBlur();
|
|
70
|
-
emit("focus", ...arr);
|
|
71
|
-
}
|
|
72
|
-
function onClear() {
|
|
73
|
-
clearBlur();
|
|
74
|
-
value.value = "";
|
|
75
|
-
refInput.value.focus();
|
|
76
|
-
}
|
|
77
|
-
function onClick() {
|
|
78
|
-
if (!props.readonly) {
|
|
79
|
-
isFiletr.value = false;
|
|
80
|
-
visible.value = !visible.value;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
vue.onMounted(() => {
|
|
84
|
-
setWidth();
|
|
85
|
-
});
|
|
86
|
-
__expose({
|
|
87
|
-
...data.dataExpose
|
|
88
|
-
});
|
|
89
|
-
return (_ctx, _cache) => {
|
|
90
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$4.Popover), {
|
|
91
|
-
trigger: "click",
|
|
92
|
-
"popper-class": vue.unref(cs).z("popper"),
|
|
93
|
-
visible: visible.value,
|
|
94
|
-
disabled: vue.unref(props).disabled,
|
|
95
|
-
width: width.value
|
|
96
|
-
}, {
|
|
97
|
-
reference: vue.withCtx(() => [
|
|
98
|
-
vue.createElementVNode("div", vue.mergeProps({
|
|
99
|
-
class: [vue.unref(cs).z(), vue.unref(cs).is("disabled", vue.unref(props).disabled)]
|
|
100
|
-
}, vue.unref(attrs).root, { onClick }), [
|
|
101
|
-
vue.createVNode(vue.unref(index$5.Inputs), vue.mergeProps({
|
|
102
|
-
ref_key: "refInput",
|
|
103
|
-
ref: refInput,
|
|
104
|
-
modelValue: value.value,
|
|
105
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
106
|
-
}, vue.unref(attrs).assem, {
|
|
107
|
-
disabled: vue.unref(props).disabled,
|
|
108
|
-
readonly: vue.unref(props).readonly,
|
|
109
|
-
onInput,
|
|
110
|
-
onFocus,
|
|
111
|
-
onBlur,
|
|
112
|
-
clearable: false
|
|
113
|
-
}), vue.createSlots({
|
|
114
|
-
suffix: vue.withCtx(() => [
|
|
115
|
-
isclear.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
116
|
-
key: 0,
|
|
117
|
-
class: vue.normalizeClass([vue.unref(cs).z("select-icon"), "clear"]),
|
|
118
|
-
onClick: vue.withModifiers(onClear, ["stop"])
|
|
119
|
-
}, [..._cache[1] || (_cache[1] = [
|
|
120
|
-
vue.createElementVNode("svg", {
|
|
121
|
-
viewBox: "0 0 1024 1024",
|
|
122
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
123
|
-
"data-v-ea893728": ""
|
|
124
|
-
}, [
|
|
125
|
-
vue.createElementVNode("path", {
|
|
126
|
-
fill: "currentColor",
|
|
127
|
-
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"
|
|
128
|
-
}),
|
|
129
|
-
vue.createElementVNode("path", {
|
|
130
|
-
fill: "currentColor",
|
|
131
|
-
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
|
|
132
|
-
})
|
|
133
|
-
], -1)
|
|
134
|
-
])], 2)) : vue.createCommentVNode("", true),
|
|
135
|
-
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
136
|
-
vue.createElementVNode("span", {
|
|
137
|
-
class: vue.normalizeClass([
|
|
138
|
-
vue.unref(cs).z("select-icon"),
|
|
139
|
-
vue.unref(cs).is("reverse", visible.value)
|
|
140
|
-
])
|
|
141
|
-
}, [
|
|
142
|
-
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).iconSelect, {}, () => [
|
|
143
|
-
_cache[2] || (_cache[2] = vue.createElementVNode("svg", {
|
|
144
|
-
viewBox: "0 0 1024 1024",
|
|
145
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
146
|
-
"data-v-ea893728": ""
|
|
147
|
-
}, [
|
|
148
|
-
vue.createElementVNode("path", {
|
|
149
|
-
fill: "currentColor",
|
|
150
|
-
d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
|
|
151
|
-
})
|
|
152
|
-
], -1))
|
|
153
|
-
])
|
|
154
|
-
], 2)
|
|
155
|
-
]),
|
|
156
|
-
_: 2
|
|
157
|
-
}, [
|
|
158
|
-
vue.renderList(Object.keys(vue.unref(slots)), (k, index2) => {
|
|
159
|
-
return {
|
|
160
|
-
name: k,
|
|
161
|
-
fn: vue.withCtx(() => [
|
|
162
|
-
vue.renderSlot(_ctx.$slots, k)
|
|
163
|
-
])
|
|
164
|
-
};
|
|
165
|
-
})
|
|
166
|
-
]), 1040, ["modelValue", "disabled", "readonly"])
|
|
167
|
-
], 16)
|
|
168
|
-
]),
|
|
169
|
-
default: vue.withCtx(() => [
|
|
170
|
-
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).default)
|
|
171
|
-
]),
|
|
172
|
-
_: 3
|
|
173
|
-
}, 8, ["popper-class", "visible", "disabled", "width"]);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
exports.default = _sfc_main;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { defineComponent, useSlots, ref, computed, onMounted, createBlock, openBlock, unref, withCtx, renderSlot, createElementVNode, mergeProps, createVNode, createSlots, createElementBlock, createCommentVNode, withModifiers, normalizeClass, renderList } from "vue";
|
|
2
|
-
import { getCss } from "@fangzhongya/utils/css/getCss";
|
|
3
|
-
import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
4
|
-
import { Popover } from "../../popover/index.js";
|
|
5
|
-
import { Inputs } from "../../inputs/index.js";
|
|
6
|
-
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
7
|
-
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
8
|
-
import { useLocale } from "../../../hooks/locale/index.js";
|
|
9
|
-
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
...{ inheritAttrs: false },
|
|
12
|
-
__name: "index",
|
|
13
|
-
props: getProps(dataProps),
|
|
14
|
-
emits: dataEmits,
|
|
15
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
16
|
-
const attrs = useInherit();
|
|
17
|
-
const slots = useSlots();
|
|
18
|
-
const { getLocale } = useLocale();
|
|
19
|
-
const cs = useCssName(name);
|
|
20
|
-
const prs = __props;
|
|
21
|
-
const props = usePropsDefault(name, prs, dataProps);
|
|
22
|
-
const emit = __emit;
|
|
23
|
-
const visible = ref(false);
|
|
24
|
-
const width = ref(200);
|
|
25
|
-
const refInput = ref();
|
|
26
|
-
const isfocus = ref(false);
|
|
27
|
-
const isFiletr = ref(false);
|
|
28
|
-
const value = computed({
|
|
29
|
-
get() {
|
|
30
|
-
let v = props.modelValue;
|
|
31
|
-
return v;
|
|
32
|
-
},
|
|
33
|
-
set(value2) {
|
|
34
|
-
emit("update:modelValue", value2);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const isclear = computed(() => {
|
|
38
|
-
if (props.readonly) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
if (props.clearable && value.value && isfocus.value) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
return false;
|
|
45
|
-
});
|
|
46
|
-
function setWidth() {
|
|
47
|
-
if (refInput.value && refInput.value.el) {
|
|
48
|
-
width.value = getCss(refInput.value.el, "width");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function onInput(v, ...arr) {
|
|
52
|
-
emit("input", v, ...arr);
|
|
53
|
-
}
|
|
54
|
-
let timeout;
|
|
55
|
-
function onBlur(...arr) {
|
|
56
|
-
emit("blur", ...arr);
|
|
57
|
-
timeout = setTimeout(() => {
|
|
58
|
-
isfocus.value = false;
|
|
59
|
-
visible.value = false;
|
|
60
|
-
}, 200);
|
|
61
|
-
}
|
|
62
|
-
function clearBlur() {
|
|
63
|
-
clearTimeout(timeout);
|
|
64
|
-
}
|
|
65
|
-
function onFocus(...arr) {
|
|
66
|
-
isfocus.value = true;
|
|
67
|
-
clearBlur();
|
|
68
|
-
emit("focus", ...arr);
|
|
69
|
-
}
|
|
70
|
-
function onClear() {
|
|
71
|
-
clearBlur();
|
|
72
|
-
value.value = "";
|
|
73
|
-
refInput.value.focus();
|
|
74
|
-
}
|
|
75
|
-
function onClick() {
|
|
76
|
-
if (!props.readonly) {
|
|
77
|
-
isFiletr.value = false;
|
|
78
|
-
visible.value = !visible.value;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
onMounted(() => {
|
|
82
|
-
setWidth();
|
|
83
|
-
});
|
|
84
|
-
__expose({
|
|
85
|
-
...dataExpose
|
|
86
|
-
});
|
|
87
|
-
return (_ctx, _cache) => {
|
|
88
|
-
return openBlock(), createBlock(unref(Popover), {
|
|
89
|
-
trigger: "click",
|
|
90
|
-
"popper-class": unref(cs).z("popper"),
|
|
91
|
-
visible: visible.value,
|
|
92
|
-
disabled: unref(props).disabled,
|
|
93
|
-
width: width.value
|
|
94
|
-
}, {
|
|
95
|
-
reference: withCtx(() => [
|
|
96
|
-
createElementVNode("div", mergeProps({
|
|
97
|
-
class: [unref(cs).z(), unref(cs).is("disabled", unref(props).disabled)]
|
|
98
|
-
}, unref(attrs).root, { onClick }), [
|
|
99
|
-
createVNode(unref(Inputs), mergeProps({
|
|
100
|
-
ref_key: "refInput",
|
|
101
|
-
ref: refInput,
|
|
102
|
-
modelValue: value.value,
|
|
103
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
|
|
104
|
-
}, unref(attrs).assem, {
|
|
105
|
-
disabled: unref(props).disabled,
|
|
106
|
-
readonly: unref(props).readonly,
|
|
107
|
-
onInput,
|
|
108
|
-
onFocus,
|
|
109
|
-
onBlur,
|
|
110
|
-
clearable: false
|
|
111
|
-
}), createSlots({
|
|
112
|
-
suffix: withCtx(() => [
|
|
113
|
-
isclear.value ? (openBlock(), createElementBlock("span", {
|
|
114
|
-
key: 0,
|
|
115
|
-
class: normalizeClass([unref(cs).z("select-icon"), "clear"]),
|
|
116
|
-
onClick: withModifiers(onClear, ["stop"])
|
|
117
|
-
}, [..._cache[1] || (_cache[1] = [
|
|
118
|
-
createElementVNode("svg", {
|
|
119
|
-
viewBox: "0 0 1024 1024",
|
|
120
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
121
|
-
"data-v-ea893728": ""
|
|
122
|
-
}, [
|
|
123
|
-
createElementVNode("path", {
|
|
124
|
-
fill: "currentColor",
|
|
125
|
-
d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"
|
|
126
|
-
}),
|
|
127
|
-
createElementVNode("path", {
|
|
128
|
-
fill: "currentColor",
|
|
129
|
-
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
|
|
130
|
-
})
|
|
131
|
-
], -1)
|
|
132
|
-
])], 2)) : createCommentVNode("", true),
|
|
133
|
-
renderSlot(_ctx.$slots, "suffix"),
|
|
134
|
-
createElementVNode("span", {
|
|
135
|
-
class: normalizeClass([
|
|
136
|
-
unref(cs).z("select-icon"),
|
|
137
|
-
unref(cs).is("reverse", visible.value)
|
|
138
|
-
])
|
|
139
|
-
}, [
|
|
140
|
-
renderSlot(_ctx.$slots, unref(dataSlot).iconSelect, {}, () => [
|
|
141
|
-
_cache[2] || (_cache[2] = createElementVNode("svg", {
|
|
142
|
-
viewBox: "0 0 1024 1024",
|
|
143
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
144
|
-
"data-v-ea893728": ""
|
|
145
|
-
}, [
|
|
146
|
-
createElementVNode("path", {
|
|
147
|
-
fill: "currentColor",
|
|
148
|
-
d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
|
|
149
|
-
})
|
|
150
|
-
], -1))
|
|
151
|
-
])
|
|
152
|
-
], 2)
|
|
153
|
-
]),
|
|
154
|
-
_: 2
|
|
155
|
-
}, [
|
|
156
|
-
renderList(Object.keys(unref(slots)), (k, index) => {
|
|
157
|
-
return {
|
|
158
|
-
name: k,
|
|
159
|
-
fn: withCtx(() => [
|
|
160
|
-
renderSlot(_ctx.$slots, k)
|
|
161
|
-
])
|
|
162
|
-
};
|
|
163
|
-
})
|
|
164
|
-
]), 1040, ["modelValue", "disabled", "readonly"])
|
|
165
|
-
], 16)
|
|
166
|
-
]),
|
|
167
|
-
default: withCtx(() => [
|
|
168
|
-
renderSlot(_ctx.$slots, unref(dataSlot).default)
|
|
169
|
-
]),
|
|
170
|
-
_: 3
|
|
171
|
-
}, 8, ["popper-class", "visible", "disabled", "width"]);
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
export {
|
|
176
|
-
_sfc_main as default
|
|
177
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
require("./src/index.cjs");
|
|
4
|
-
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
|
-
const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
|
|
6
|
-
const TreeSelectBox = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "TreeSelectBox");
|
|
7
|
-
exports.TreeSelectBox = TreeSelectBox;
|
|
8
|
-
exports.default = TreeSelectBox;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const buildProps = require("../../../utils/vues/buildProps.cjs");
|
|
4
|
-
const definePropType = require("../../../utils/vues/definePropType.cjs");
|
|
5
|
-
const roleSelect = {
|
|
6
|
-
searchPlaceholder: "请输入字段进行查询",
|
|
7
|
-
value: "value",
|
|
8
|
-
//指定选项标签为选项对象的某个属性值
|
|
9
|
-
label: "label",
|
|
10
|
-
//指定选项的子选项为选项对象的某个属性值
|
|
11
|
-
children: "children",
|
|
12
|
-
//指定选项的禁用为选项对象的某个属性值
|
|
13
|
-
disabled: "disabled",
|
|
14
|
-
// 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组
|
|
15
|
-
// 若设置 false,则只返回该节点的值
|
|
16
|
-
emitPath: true,
|
|
17
|
-
// 是否严格的遵守父子节点不互相关联
|
|
18
|
-
checkStrictly: true,
|
|
19
|
-
// 是否动态加载子节点,需与 lazyLoad 方法结合使用
|
|
20
|
-
lazy: false
|
|
21
|
-
// // 是否多选
|
|
22
|
-
// multiple: false,
|
|
23
|
-
};
|
|
24
|
-
const name = "tree-select-box";
|
|
25
|
-
const dataProps = buildProps.buildProps({
|
|
26
|
-
/**
|
|
27
|
-
* @props { Boolean } searchlist= ( )
|
|
28
|
-
* 搜索结果用列表展示
|
|
29
|
-
*/
|
|
30
|
-
searchlist: {
|
|
31
|
-
type: Boolean
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* @props { String} title= ( )
|
|
35
|
-
* 弹框标题
|
|
36
|
-
*/
|
|
37
|
-
title: {
|
|
38
|
-
type: [String],
|
|
39
|
-
default: "选择"
|
|
40
|
-
},
|
|
41
|
-
placeholder: {
|
|
42
|
-
type: String
|
|
43
|
-
},
|
|
44
|
-
/**
|
|
45
|
-
* @props { Array} modelValue=
|
|
46
|
-
* 值
|
|
47
|
-
*/
|
|
48
|
-
modelValue: {
|
|
49
|
-
type: [Array]
|
|
50
|
-
},
|
|
51
|
-
appendToBody: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: true
|
|
54
|
-
},
|
|
55
|
-
/**
|
|
56
|
-
* @props { String, Number} width= ( )
|
|
57
|
-
* 弹框宽度
|
|
58
|
-
*/
|
|
59
|
-
width: {
|
|
60
|
-
type: [String, Number]
|
|
61
|
-
},
|
|
62
|
-
/**
|
|
63
|
-
* @props { Boolean } disabled= ( )
|
|
64
|
-
* 是否禁用
|
|
65
|
-
*/
|
|
66
|
-
disabled: {
|
|
67
|
-
type: [Boolean]
|
|
68
|
-
},
|
|
69
|
-
/**
|
|
70
|
-
* @props { Array } options=[] ( )
|
|
71
|
-
* 选项的数据源, value 和 label 可以通过 props 自定义.
|
|
72
|
-
*/
|
|
73
|
-
options: {
|
|
74
|
-
type: Array,
|
|
75
|
-
default() {
|
|
76
|
-
return [];
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
/**
|
|
80
|
-
* @props { Object } props={} ( )
|
|
81
|
-
* 配置选项
|
|
82
|
-
*/
|
|
83
|
-
props: {
|
|
84
|
-
type: definePropType.definePropType(Object),
|
|
85
|
-
default() {
|
|
86
|
-
return {};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
const dataEmits = ["change", "update:modelValue"];
|
|
91
|
-
const dataSlot = {
|
|
92
|
-
default: "default"
|
|
93
|
-
};
|
|
94
|
-
const dataExpose = {};
|
|
95
|
-
exports.dataEmits = dataEmits;
|
|
96
|
-
exports.dataExpose = dataExpose;
|
|
97
|
-
exports.dataProps = dataProps;
|
|
98
|
-
exports.dataSlot = dataSlot;
|
|
99
|
-
exports.name = name;
|
|
100
|
-
exports.roleSelect = roleSelect;
|