@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,131 +0,0 @@
|
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
|
2
|
-
export type ModelValue = string | number;
|
|
3
|
-
export type ObjStrAny = {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* @title {h3} select-dialog
|
|
8
|
-
*/
|
|
9
|
-
export declare const name = "select-dialog";
|
|
10
|
-
export declare const dataProps: {
|
|
11
|
-
/**
|
|
12
|
-
* @props { String, Number} width= ( )
|
|
13
|
-
* 弹框宽度
|
|
14
|
-
*/
|
|
15
|
-
width: {
|
|
16
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @props { String} title= ( )
|
|
20
|
-
* 弹框标题
|
|
21
|
-
*/
|
|
22
|
-
title: {
|
|
23
|
-
type: StringConstructor[];
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* @props { Array} modelValue=
|
|
27
|
-
* 值
|
|
28
|
-
*/
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: {
|
|
31
|
-
(arrayLength: number): ModelValue[];
|
|
32
|
-
(...items: ModelValue[]): ModelValue[];
|
|
33
|
-
new (arrayLength: number): ModelValue[];
|
|
34
|
-
new (...items: ModelValue[]): ModelValue[];
|
|
35
|
-
isArray(arg: any): arg is any[];
|
|
36
|
-
readonly prototype: any[];
|
|
37
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
38
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
39
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
40
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
41
|
-
of<T>(...items: T[]): T[];
|
|
42
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
43
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
44
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
47
|
-
placeholder: {
|
|
48
|
-
type: StringConstructor;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* @props { Array} value=
|
|
52
|
-
* 设置的值
|
|
53
|
-
*/
|
|
54
|
-
value: {
|
|
55
|
-
type: {
|
|
56
|
-
(arrayLength: number): ModelValue[];
|
|
57
|
-
(...items: ModelValue[]): ModelValue[];
|
|
58
|
-
new (arrayLength: number): ModelValue[];
|
|
59
|
-
new (...items: ModelValue[]): ModelValue[];
|
|
60
|
-
isArray(arg: any): arg is any[];
|
|
61
|
-
readonly prototype: any[];
|
|
62
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
63
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
64
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
65
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
66
|
-
of<T>(...items: T[]): T[];
|
|
67
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
68
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
69
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
70
|
-
}[];
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* @props { String} separator=','
|
|
74
|
-
* 分隔选项的字符
|
|
75
|
-
*/
|
|
76
|
-
separator: {
|
|
77
|
-
type: StringConstructor[];
|
|
78
|
-
default: string;
|
|
79
|
-
};
|
|
80
|
-
appendToBody: {
|
|
81
|
-
type: BooleanConstructor;
|
|
82
|
-
default: boolean;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* @props { Function } getName= ( )
|
|
86
|
-
* 对应展示名称
|
|
87
|
-
*/
|
|
88
|
-
getName: {
|
|
89
|
-
type: FunctionConstructor[];
|
|
90
|
-
default(): (v: any) => any;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* @props { Function } getInputName= ( )
|
|
94
|
-
* 选择框上展示名称
|
|
95
|
-
*/
|
|
96
|
-
setInputName: {
|
|
97
|
-
type: FunctionConstructor[];
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* @props { Function } getNameExplain= ( )
|
|
101
|
-
* 对应展示详情名称
|
|
102
|
-
*/
|
|
103
|
-
getNameExplain: {
|
|
104
|
-
type: FunctionConstructor[];
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* @props { Boolean } disabled= ( )
|
|
108
|
-
* 是否禁用
|
|
109
|
-
*/
|
|
110
|
-
disabled: {
|
|
111
|
-
type: BooleanConstructor[];
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
export type DataProps = ExtractPropTypes<typeof dataProps>;
|
|
115
|
-
/**
|
|
116
|
-
* @emits change (val:[String, Array])
|
|
117
|
-
* 选择的时间
|
|
118
|
-
*/
|
|
119
|
-
export declare const dataEmits: string[];
|
|
120
|
-
export type DataEmits = typeof dataEmits;
|
|
121
|
-
/**
|
|
122
|
-
* @slot default 默认插槽
|
|
123
|
-
*/
|
|
124
|
-
export declare const dataSlot: {
|
|
125
|
-
default: string;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* @expose setValue (val:<string>设置的数据 )
|
|
129
|
-
* 设置值
|
|
130
|
-
*/
|
|
131
|
-
export declare const dataExpose: {};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { buildProps } from "../../../utils/vues/buildProps.js";
|
|
2
|
-
const name = "select-dialog";
|
|
3
|
-
const dataProps = buildProps({
|
|
4
|
-
/**
|
|
5
|
-
* @props { String, Number} width= ( )
|
|
6
|
-
* 弹框宽度
|
|
7
|
-
*/
|
|
8
|
-
width: {
|
|
9
|
-
type: [String, Number]
|
|
10
|
-
},
|
|
11
|
-
/**
|
|
12
|
-
* @props { String} title= ( )
|
|
13
|
-
* 弹框标题
|
|
14
|
-
*/
|
|
15
|
-
title: {
|
|
16
|
-
type: [String]
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* @props { Array} modelValue=
|
|
20
|
-
* 值
|
|
21
|
-
*/
|
|
22
|
-
modelValue: {
|
|
23
|
-
type: [Array]
|
|
24
|
-
},
|
|
25
|
-
placeholder: {
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* @props { Array} value=
|
|
30
|
-
* 设置的值
|
|
31
|
-
*/
|
|
32
|
-
value: {
|
|
33
|
-
type: [Array]
|
|
34
|
-
},
|
|
35
|
-
/**
|
|
36
|
-
* @props { String} separator=','
|
|
37
|
-
* 分隔选项的字符
|
|
38
|
-
*/
|
|
39
|
-
separator: {
|
|
40
|
-
type: [String],
|
|
41
|
-
default: ","
|
|
42
|
-
},
|
|
43
|
-
appendToBody: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: true
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* @props { Function } getName= ( )
|
|
49
|
-
* 对应展示名称
|
|
50
|
-
*/
|
|
51
|
-
getName: {
|
|
52
|
-
type: [Function],
|
|
53
|
-
default() {
|
|
54
|
-
return (v) => {
|
|
55
|
-
return v;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* @props { Function } getInputName= ( )
|
|
61
|
-
* 选择框上展示名称
|
|
62
|
-
*/
|
|
63
|
-
setInputName: {
|
|
64
|
-
type: [Function]
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* @props { Function } getNameExplain= ( )
|
|
68
|
-
* 对应展示详情名称
|
|
69
|
-
*/
|
|
70
|
-
getNameExplain: {
|
|
71
|
-
type: [Function]
|
|
72
|
-
},
|
|
73
|
-
/**
|
|
74
|
-
* @props { Boolean } disabled= ( )
|
|
75
|
-
* 是否禁用
|
|
76
|
-
*/
|
|
77
|
-
disabled: {
|
|
78
|
-
type: [Boolean]
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
const dataEmits = ["change", "confirm", "dialog", "update:modelValue"];
|
|
82
|
-
const dataSlot = {
|
|
83
|
-
default: "default"
|
|
84
|
-
};
|
|
85
|
-
const dataExpose = {};
|
|
86
|
-
export {
|
|
87
|
-
dataEmits,
|
|
88
|
-
dataExpose,
|
|
89
|
-
dataProps,
|
|
90
|
-
dataSlot,
|
|
91
|
-
name
|
|
92
|
-
};
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const data = require("./data.cjs");
|
|
5
|
-
const index$1 = require("../../../hooks/cssname/index.cjs");
|
|
6
|
-
const index = require("../../../hooks/locale/index.cjs");
|
|
7
|
-
const index$3 = require("../../input/index.cjs");
|
|
8
|
-
const index$4 = require("../../dialogs/index.cjs");
|
|
9
|
-
const index$5 = require("../../button/index.cjs");
|
|
10
|
-
const index$2 = require("../../../hooks/props-default/index.cjs");
|
|
11
|
-
const _hoisted_1 = ["onClick"];
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
-
__name: "index",
|
|
14
|
-
props: index$2.getProps(data.dataProps),
|
|
15
|
-
emits: data.dataEmits,
|
|
16
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
17
|
-
const { getLocale } = index.useLocale();
|
|
18
|
-
const cs = index$1.useCssName(data.name);
|
|
19
|
-
const prs = __props;
|
|
20
|
-
const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
|
|
21
|
-
const emit = __emit;
|
|
22
|
-
const value = vue.computed({
|
|
23
|
-
get() {
|
|
24
|
-
return props.modelValue;
|
|
25
|
-
},
|
|
26
|
-
set(value2) {
|
|
27
|
-
emit("update:modelValue", value2);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const inputName = vue.computed(() => {
|
|
31
|
-
if (props.value) {
|
|
32
|
-
return props.value.map((v) => {
|
|
33
|
-
return props.setInputName ? props.setInputName(v) : props.getName(v);
|
|
34
|
-
}).join(props.separator);
|
|
35
|
-
} else {
|
|
36
|
-
return "";
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const dialogVisible = vue.ref(false);
|
|
40
|
-
function onClear() {
|
|
41
|
-
value.value = [];
|
|
42
|
-
vue.nextTick(() => {
|
|
43
|
-
emit("update:modelValue", value.value);
|
|
44
|
-
emit("change", value.value);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function onDelete(key) {
|
|
48
|
-
if (value.value) {
|
|
49
|
-
value.value = value.value.filter((o) => {
|
|
50
|
-
return o != key;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
vue.nextTick(() => {
|
|
54
|
-
emit("update:modelValue", value.value);
|
|
55
|
-
emit("change", value.value);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function onDialogffirm() {
|
|
59
|
-
if (value.value) {
|
|
60
|
-
emit("confirm", [...value.value]);
|
|
61
|
-
} else {
|
|
62
|
-
emit("confirm", []);
|
|
63
|
-
}
|
|
64
|
-
dialogVisible.value = false;
|
|
65
|
-
emit("dialog", dialogVisible.value);
|
|
66
|
-
}
|
|
67
|
-
function onClick() {
|
|
68
|
-
if (!props.disabled) {
|
|
69
|
-
if (props.value) {
|
|
70
|
-
value.value = [...props.value];
|
|
71
|
-
} else {
|
|
72
|
-
value.value = [];
|
|
73
|
-
}
|
|
74
|
-
dialogVisible.value = true;
|
|
75
|
-
emit("update:modelValue", value.value);
|
|
76
|
-
emit("dialog", dialogVisible.value);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
__expose({
|
|
80
|
-
...data.dataExpose,
|
|
81
|
-
inputName
|
|
82
|
-
});
|
|
83
|
-
return (_ctx, _cache) => {
|
|
84
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
85
|
-
class: vue.normalizeClass(vue.unref(cs).z())
|
|
86
|
-
}, [
|
|
87
|
-
vue.withDirectives(vue.createVNode(vue.unref(index$3.Input), {
|
|
88
|
-
disabled: "",
|
|
89
|
-
readonly: ""
|
|
90
|
-
}, null, 512), [
|
|
91
|
-
[vue.vShow, false]
|
|
92
|
-
]),
|
|
93
|
-
vue.createVNode(vue.unref(index$3.Input), {
|
|
94
|
-
modelValue: inputName.value,
|
|
95
|
-
onClick,
|
|
96
|
-
placeholder: vue.unref(props).placeholder || vue.unref(getLocale)("form.select"),
|
|
97
|
-
disabled: vue.unref(props).disabled,
|
|
98
|
-
readonly: ""
|
|
99
|
-
}, {
|
|
100
|
-
suffix: vue.withCtx(() => [
|
|
101
|
-
vue.renderSlot(_ctx.$slots, "suffix")
|
|
102
|
-
]),
|
|
103
|
-
_: 3
|
|
104
|
-
}, 8, ["modelValue", "placeholder", "disabled"]),
|
|
105
|
-
vue.createVNode(vue.unref(index$4.Dialogs), {
|
|
106
|
-
modelValue: dialogVisible.value,
|
|
107
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
|
|
108
|
-
class: vue.normalizeClass(vue.unref(cs).z("dialog")),
|
|
109
|
-
"custom-class": vue.unref(cs).z("dialog"),
|
|
110
|
-
title: vue.unref(props).title,
|
|
111
|
-
"append-to-body": vue.unref(props).appendToBody,
|
|
112
|
-
width: "calc(40px + " + vue.unref(props).width + ")",
|
|
113
|
-
"before-close": () => {
|
|
114
|
-
dialogVisible.value = false;
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
footer: vue.withCtx(() => [
|
|
118
|
-
vue.createElementVNode("span", {
|
|
119
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-footer")])
|
|
120
|
-
}, [
|
|
121
|
-
vue.createVNode(vue.unref(index$5.Button), {
|
|
122
|
-
onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = false)
|
|
123
|
-
}, {
|
|
124
|
-
default: vue.withCtx(() => [
|
|
125
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("form.cancel")), 1)
|
|
126
|
-
]),
|
|
127
|
-
_: 1
|
|
128
|
-
}),
|
|
129
|
-
vue.createVNode(vue.unref(index$5.Button), {
|
|
130
|
-
type: "primary",
|
|
131
|
-
onClick: onDialogffirm
|
|
132
|
-
}, {
|
|
133
|
-
default: vue.withCtx(() => [
|
|
134
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(getLocale)("form.confirm")), 1)
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
], 2)
|
|
139
|
-
]),
|
|
140
|
-
default: vue.withCtx(() => [
|
|
141
|
-
vue.createElementVNode("div", {
|
|
142
|
-
class: vue.normalizeClass(vue.unref(cs).z("dialog-list"))
|
|
143
|
-
}, [
|
|
144
|
-
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).default),
|
|
145
|
-
vue.createElementVNode("div", {
|
|
146
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li")])
|
|
147
|
-
}, [
|
|
148
|
-
vue.createElementVNode("div", {
|
|
149
|
-
class: vue.normalizeClass([
|
|
150
|
-
vue.unref(cs).z("dialog-li-top"),
|
|
151
|
-
vue.unref(cs).z("dialog-li-top-select")
|
|
152
|
-
])
|
|
153
|
-
}, [
|
|
154
|
-
_cache[3] || (_cache[3] = vue.createElementVNode("span", null, "已选择", -1)),
|
|
155
|
-
vue.createElementVNode("span", {
|
|
156
|
-
onClick: onClear,
|
|
157
|
-
class: vue.normalizeClass([
|
|
158
|
-
vue.unref(cs).z("dialog-li-top"),
|
|
159
|
-
vue.unref(cs).z("dialog-li-top-clear")
|
|
160
|
-
])
|
|
161
|
-
}, [..._cache[2] || (_cache[2] = [
|
|
162
|
-
vue.createElementVNode("svg", {
|
|
163
|
-
viewBox: "0 0 1024 1024",
|
|
164
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
165
|
-
"data-v-ea893728": ""
|
|
166
|
-
}, [
|
|
167
|
-
vue.createElementVNode("path", {
|
|
168
|
-
fill: "currentColor",
|
|
169
|
-
d: "M896 448H128v192a64 64 0 0 0 64 64h192v192h256V704h192a64 64 0 0 0 64-64V448zm-770.752-64c0-47.552 5.248-90.24 15.552-128 14.72-54.016 42.496-107.392 83.2-160h417.28l-15.36 70.336L736 96h211.2c-24.832 42.88-41.92 96.256-51.2 160a663.872 663.872 0 0 0-6.144 128H960v256a128 128 0 0 1-128 128H704v160a32 32 0 0 1-32 32H352a32 32 0 0 1-32-32V768H192A128 128 0 0 1 64 640V384h61.248zm64 0h636.544c-2.048-45.824.256-91.584 6.848-137.216 4.48-30.848 10.688-59.776 18.688-86.784h-96.64l-221.12 141.248L561.92 160H256.512c-25.856 37.888-43.776 75.456-53.952 112.832-8.768 32.064-13.248 69.12-13.312 111.168z"
|
|
170
|
-
})
|
|
171
|
-
], -1)
|
|
172
|
-
])], 2)
|
|
173
|
-
], 2),
|
|
174
|
-
vue.createElementVNode("div", {
|
|
175
|
-
class: vue.normalizeClass(vue.unref(cs).z("dialog-gap"))
|
|
176
|
-
}, null, 2),
|
|
177
|
-
vue.createElementVNode("div", {
|
|
178
|
-
class: vue.normalizeClass([
|
|
179
|
-
vue.unref(cs).z("dialog-li-div"),
|
|
180
|
-
vue.unref(cs).z("dialog-li-select")
|
|
181
|
-
])
|
|
182
|
-
}, [
|
|
183
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value.value, (item, index2) => {
|
|
184
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
185
|
-
key: index2,
|
|
186
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li-select-li")])
|
|
187
|
-
}, [
|
|
188
|
-
vue.createElementVNode("div", {
|
|
189
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li-top-select")])
|
|
190
|
-
}, [
|
|
191
|
-
vue.createElementVNode("span", {
|
|
192
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li-select-li-p1")])
|
|
193
|
-
}, vue.toDisplayString(vue.unref(props).getName(item)), 3),
|
|
194
|
-
vue.createElementVNode("span", {
|
|
195
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li-select-li-del")]),
|
|
196
|
-
onClick: ($event) => onDelete(item)
|
|
197
|
-
}, [..._cache[4] || (_cache[4] = [
|
|
198
|
-
vue.createElementVNode("svg", {
|
|
199
|
-
viewBox: "0 0 1024 1024",
|
|
200
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
201
|
-
"data-v-ea893728": ""
|
|
202
|
-
}, [
|
|
203
|
-
vue.createElementVNode("path", {
|
|
204
|
-
fill: "currentColor",
|
|
205
|
-
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
206
|
-
})
|
|
207
|
-
], -1)
|
|
208
|
-
])], 10, _hoisted_1)
|
|
209
|
-
], 2),
|
|
210
|
-
vue.unref(props).getNameExplain ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
211
|
-
key: 0,
|
|
212
|
-
class: vue.normalizeClass([vue.unref(cs).z("dialog-li-select-li-p2")])
|
|
213
|
-
}, vue.toDisplayString(vue.unref(props).getNameExplain(item)), 3)) : vue.createCommentVNode("", true)
|
|
214
|
-
], 2);
|
|
215
|
-
}), 128))
|
|
216
|
-
], 2)
|
|
217
|
-
], 2)
|
|
218
|
-
], 2)
|
|
219
|
-
]),
|
|
220
|
-
_: 3
|
|
221
|
-
}, 8, ["modelValue", "class", "custom-class", "title", "append-to-body", "width", "before-close"])
|
|
222
|
-
], 2);
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
exports.default = _sfc_main;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, nextTick, createElementBlock, openBlock, normalizeClass, unref, withDirectives, createVNode, vShow, withCtx, renderSlot, createElementVNode, Fragment, renderList, createCommentVNode, toDisplayString, createTextVNode } from "vue";
|
|
2
|
-
import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
|
|
3
|
-
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
|
-
import { useLocale } from "../../../hooks/locale/index.js";
|
|
5
|
-
import { Input } from "../../input/index.js";
|
|
6
|
-
import { Dialogs } from "../../dialogs/index.js";
|
|
7
|
-
import { Button } from "../../button/index.js";
|
|
8
|
-
import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
|
|
9
|
-
const _hoisted_1 = ["onClick"];
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "index",
|
|
12
|
-
props: getProps(dataProps),
|
|
13
|
-
emits: dataEmits,
|
|
14
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
-
const { getLocale } = useLocale();
|
|
16
|
-
const cs = useCssName(name);
|
|
17
|
-
const prs = __props;
|
|
18
|
-
const props = usePropsDefault(name, prs, dataProps);
|
|
19
|
-
const emit = __emit;
|
|
20
|
-
const value = computed({
|
|
21
|
-
get() {
|
|
22
|
-
return props.modelValue;
|
|
23
|
-
},
|
|
24
|
-
set(value2) {
|
|
25
|
-
emit("update:modelValue", value2);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const inputName = computed(() => {
|
|
29
|
-
if (props.value) {
|
|
30
|
-
return props.value.map((v) => {
|
|
31
|
-
return props.setInputName ? props.setInputName(v) : props.getName(v);
|
|
32
|
-
}).join(props.separator);
|
|
33
|
-
} else {
|
|
34
|
-
return "";
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const dialogVisible = ref(false);
|
|
38
|
-
function onClear() {
|
|
39
|
-
value.value = [];
|
|
40
|
-
nextTick(() => {
|
|
41
|
-
emit("update:modelValue", value.value);
|
|
42
|
-
emit("change", value.value);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function onDelete(key) {
|
|
46
|
-
if (value.value) {
|
|
47
|
-
value.value = value.value.filter((o) => {
|
|
48
|
-
return o != key;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
nextTick(() => {
|
|
52
|
-
emit("update:modelValue", value.value);
|
|
53
|
-
emit("change", value.value);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function onDialogffirm() {
|
|
57
|
-
if (value.value) {
|
|
58
|
-
emit("confirm", [...value.value]);
|
|
59
|
-
} else {
|
|
60
|
-
emit("confirm", []);
|
|
61
|
-
}
|
|
62
|
-
dialogVisible.value = false;
|
|
63
|
-
emit("dialog", dialogVisible.value);
|
|
64
|
-
}
|
|
65
|
-
function onClick() {
|
|
66
|
-
if (!props.disabled) {
|
|
67
|
-
if (props.value) {
|
|
68
|
-
value.value = [...props.value];
|
|
69
|
-
} else {
|
|
70
|
-
value.value = [];
|
|
71
|
-
}
|
|
72
|
-
dialogVisible.value = true;
|
|
73
|
-
emit("update:modelValue", value.value);
|
|
74
|
-
emit("dialog", dialogVisible.value);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
__expose({
|
|
78
|
-
...dataExpose,
|
|
79
|
-
inputName
|
|
80
|
-
});
|
|
81
|
-
return (_ctx, _cache) => {
|
|
82
|
-
return openBlock(), createElementBlock("div", {
|
|
83
|
-
class: normalizeClass(unref(cs).z())
|
|
84
|
-
}, [
|
|
85
|
-
withDirectives(createVNode(unref(Input), {
|
|
86
|
-
disabled: "",
|
|
87
|
-
readonly: ""
|
|
88
|
-
}, null, 512), [
|
|
89
|
-
[vShow, false]
|
|
90
|
-
]),
|
|
91
|
-
createVNode(unref(Input), {
|
|
92
|
-
modelValue: inputName.value,
|
|
93
|
-
onClick,
|
|
94
|
-
placeholder: unref(props).placeholder || unref(getLocale)("form.select"),
|
|
95
|
-
disabled: unref(props).disabled,
|
|
96
|
-
readonly: ""
|
|
97
|
-
}, {
|
|
98
|
-
suffix: withCtx(() => [
|
|
99
|
-
renderSlot(_ctx.$slots, "suffix")
|
|
100
|
-
]),
|
|
101
|
-
_: 3
|
|
102
|
-
}, 8, ["modelValue", "placeholder", "disabled"]),
|
|
103
|
-
createVNode(unref(Dialogs), {
|
|
104
|
-
modelValue: dialogVisible.value,
|
|
105
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
|
|
106
|
-
class: normalizeClass(unref(cs).z("dialog")),
|
|
107
|
-
"custom-class": unref(cs).z("dialog"),
|
|
108
|
-
title: unref(props).title,
|
|
109
|
-
"append-to-body": unref(props).appendToBody,
|
|
110
|
-
width: "calc(40px + " + unref(props).width + ")",
|
|
111
|
-
"before-close": () => {
|
|
112
|
-
dialogVisible.value = false;
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
footer: withCtx(() => [
|
|
116
|
-
createElementVNode("span", {
|
|
117
|
-
class: normalizeClass([unref(cs).z("dialog-footer")])
|
|
118
|
-
}, [
|
|
119
|
-
createVNode(unref(Button), {
|
|
120
|
-
onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = false)
|
|
121
|
-
}, {
|
|
122
|
-
default: withCtx(() => [
|
|
123
|
-
createTextVNode(toDisplayString(unref(getLocale)("form.cancel")), 1)
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
}),
|
|
127
|
-
createVNode(unref(Button), {
|
|
128
|
-
type: "primary",
|
|
129
|
-
onClick: onDialogffirm
|
|
130
|
-
}, {
|
|
131
|
-
default: withCtx(() => [
|
|
132
|
-
createTextVNode(toDisplayString(unref(getLocale)("form.confirm")), 1)
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
})
|
|
136
|
-
], 2)
|
|
137
|
-
]),
|
|
138
|
-
default: withCtx(() => [
|
|
139
|
-
createElementVNode("div", {
|
|
140
|
-
class: normalizeClass(unref(cs).z("dialog-list"))
|
|
141
|
-
}, [
|
|
142
|
-
renderSlot(_ctx.$slots, unref(dataSlot).default),
|
|
143
|
-
createElementVNode("div", {
|
|
144
|
-
class: normalizeClass([unref(cs).z("dialog-li")])
|
|
145
|
-
}, [
|
|
146
|
-
createElementVNode("div", {
|
|
147
|
-
class: normalizeClass([
|
|
148
|
-
unref(cs).z("dialog-li-top"),
|
|
149
|
-
unref(cs).z("dialog-li-top-select")
|
|
150
|
-
])
|
|
151
|
-
}, [
|
|
152
|
-
_cache[3] || (_cache[3] = createElementVNode("span", null, "已选择", -1)),
|
|
153
|
-
createElementVNode("span", {
|
|
154
|
-
onClick: onClear,
|
|
155
|
-
class: normalizeClass([
|
|
156
|
-
unref(cs).z("dialog-li-top"),
|
|
157
|
-
unref(cs).z("dialog-li-top-clear")
|
|
158
|
-
])
|
|
159
|
-
}, [..._cache[2] || (_cache[2] = [
|
|
160
|
-
createElementVNode("svg", {
|
|
161
|
-
viewBox: "0 0 1024 1024",
|
|
162
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
163
|
-
"data-v-ea893728": ""
|
|
164
|
-
}, [
|
|
165
|
-
createElementVNode("path", {
|
|
166
|
-
fill: "currentColor",
|
|
167
|
-
d: "M896 448H128v192a64 64 0 0 0 64 64h192v192h256V704h192a64 64 0 0 0 64-64V448zm-770.752-64c0-47.552 5.248-90.24 15.552-128 14.72-54.016 42.496-107.392 83.2-160h417.28l-15.36 70.336L736 96h211.2c-24.832 42.88-41.92 96.256-51.2 160a663.872 663.872 0 0 0-6.144 128H960v256a128 128 0 0 1-128 128H704v160a32 32 0 0 1-32 32H352a32 32 0 0 1-32-32V768H192A128 128 0 0 1 64 640V384h61.248zm64 0h636.544c-2.048-45.824.256-91.584 6.848-137.216 4.48-30.848 10.688-59.776 18.688-86.784h-96.64l-221.12 141.248L561.92 160H256.512c-25.856 37.888-43.776 75.456-53.952 112.832-8.768 32.064-13.248 69.12-13.312 111.168z"
|
|
168
|
-
})
|
|
169
|
-
], -1)
|
|
170
|
-
])], 2)
|
|
171
|
-
], 2),
|
|
172
|
-
createElementVNode("div", {
|
|
173
|
-
class: normalizeClass(unref(cs).z("dialog-gap"))
|
|
174
|
-
}, null, 2),
|
|
175
|
-
createElementVNode("div", {
|
|
176
|
-
class: normalizeClass([
|
|
177
|
-
unref(cs).z("dialog-li-div"),
|
|
178
|
-
unref(cs).z("dialog-li-select")
|
|
179
|
-
])
|
|
180
|
-
}, [
|
|
181
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(value.value, (item, index) => {
|
|
182
|
-
return openBlock(), createElementBlock("div", {
|
|
183
|
-
key: index,
|
|
184
|
-
class: normalizeClass([unref(cs).z("dialog-li-select-li")])
|
|
185
|
-
}, [
|
|
186
|
-
createElementVNode("div", {
|
|
187
|
-
class: normalizeClass([unref(cs).z("dialog-li-top-select")])
|
|
188
|
-
}, [
|
|
189
|
-
createElementVNode("span", {
|
|
190
|
-
class: normalizeClass([unref(cs).z("dialog-li-select-li-p1")])
|
|
191
|
-
}, toDisplayString(unref(props).getName(item)), 3),
|
|
192
|
-
createElementVNode("span", {
|
|
193
|
-
class: normalizeClass([unref(cs).z("dialog-li-select-li-del")]),
|
|
194
|
-
onClick: ($event) => onDelete(item)
|
|
195
|
-
}, [..._cache[4] || (_cache[4] = [
|
|
196
|
-
createElementVNode("svg", {
|
|
197
|
-
viewBox: "0 0 1024 1024",
|
|
198
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
199
|
-
"data-v-ea893728": ""
|
|
200
|
-
}, [
|
|
201
|
-
createElementVNode("path", {
|
|
202
|
-
fill: "currentColor",
|
|
203
|
-
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
204
|
-
})
|
|
205
|
-
], -1)
|
|
206
|
-
])], 10, _hoisted_1)
|
|
207
|
-
], 2),
|
|
208
|
-
unref(props).getNameExplain ? (openBlock(), createElementBlock("div", {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: normalizeClass([unref(cs).z("dialog-li-select-li-p2")])
|
|
211
|
-
}, toDisplayString(unref(props).getNameExplain(item)), 3)) : createCommentVNode("", true)
|
|
212
|
-
], 2);
|
|
213
|
-
}), 128))
|
|
214
|
-
], 2)
|
|
215
|
-
], 2)
|
|
216
|
-
], 2)
|
|
217
|
-
]),
|
|
218
|
-
_: 3
|
|
219
|
-
}, 8, ["modelValue", "class", "custom-class", "title", "append-to-body", "width", "before-close"])
|
|
220
|
-
], 2);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
export {
|
|
225
|
-
_sfc_main as default
|
|
226
|
-
};
|