@fangzhongya/fang-ui 0.0.61 → 0.0.63
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/array/src/data.cjs +32 -0
- package/dist/components/array/src/data.d.ts +32 -0
- package/dist/components/array/src/data.js +32 -0
- package/dist/components/box-title/src/index2.cjs +10 -11
- package/dist/components/box-title/src/index2.js +11 -12
- package/dist/components/common/list.cjs +4 -1
- package/dist/components/common/list.d.ts +5 -1
- package/dist/components/common/list.js +4 -1
- package/dist/components/dates-divide/src/data.cjs +6 -0
- package/dist/components/dates-divide/src/data.d.ts +8 -4
- package/dist/components/dates-divide/src/data.js +6 -0
- package/dist/components/dates-divide/src/index2.cjs +17 -9
- package/dist/components/dates-divide/src/index2.js +17 -9
- package/dist/components/dates2/index.cjs +9 -0
- package/dist/components/{transfer → dates2}/index.css +10 -0
- package/dist/components/dates2/index.d.ts +4 -0
- package/dist/components/dates2/index.js +9 -0
- package/dist/components/dates2/index.scss +14 -0
- package/dist/components/dates2/src/data.cjs +43 -0
- package/dist/components/dates2/src/data.d.ts +121 -0
- package/dist/components/dates2/src/data.js +43 -0
- package/dist/components/dates2/src/index.cjs +4 -0
- package/dist/components/dates2/src/index.js +4 -0
- package/dist/components/dates2/src/index2.cjs +100 -0
- package/dist/components/dates2/src/index2.js +100 -0
- package/dist/components/dates2/src/util.cjs +195 -0
- package/dist/components/dates2/src/util.d.ts +14 -0
- package/dist/components/dates2/src/util.js +195 -0
- package/dist/components/dates2/style/index2.scss +3 -0
- package/dist/components/global-config/index.css +0 -4
- package/dist/components/global-config/index.scss +2 -7
- package/dist/components/global-config/src/data.cjs +1 -1
- package/dist/components/global-config/src/data.d.ts +1 -1
- package/dist/components/global-config/src/data.js +1 -1
- package/dist/components/index.cjs +50 -48
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +1 -0
- package/dist/components/index2.scss +1 -0
- package/dist/components/list/src/data.cjs +1 -1
- package/dist/components/list/src/data.d.ts +1 -1
- package/dist/components/list/src/data.js +1 -1
- package/dist/components/lists/src/data.cjs +9 -1
- package/dist/components/lists/src/data.d.ts +9 -0
- package/dist/components/lists/src/data.js +9 -1
- package/dist/components/loading/src/index.d.ts +1 -1
- package/dist/components/switchs/src/data.d.ts +4 -0
- package/dist/components/switchs/src/index2.cjs +1 -0
- package/dist/components/switchs/src/index2.js +1 -0
- package/dist/components/tables/common/pagin.cjs +2 -0
- package/dist/components/tables/common/pagin.d.ts +2 -0
- package/dist/components/tables/common/pagin.js +2 -0
- package/dist/components/tables/src/data.cjs +3 -0
- package/dist/components/tables/src/data.d.ts +3 -0
- package/dist/components/tables/src/data.js +3 -0
- package/dist/components/window/index.css +1 -0
- package/dist/components/window/index.scss +1 -5
- package/dist/components/window/src/index2.cjs +2 -2
- package/dist/components/window/src/index2.js +2 -2
- package/dist/css/{transfer.css → dates2.css} +10 -0
- package/dist/css/global-config.css +0 -4
- package/dist/css/index.css +11 -4
- package/dist/css/window.css +1 -0
- package/dist/expand/{chunk-3HYUAX6P.js → chunk-BDTC57P3.js} +2 -0
- package/dist/expand/{chunk-IPHLXLMM.cjs → chunk-JHLD73ZJ.cjs} +2 -0
- 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/icons/index.css +27 -33
- package/dist/icons/index.json +9 -9
- package/dist/icons/vue/frame.cjs +2 -6
- package/dist/icons/vue/frame.js +2 -6
- package/dist/icons/vue/star.cjs +7 -4
- package/dist/icons/vue/star.js +7 -4
- package/dist/index.cjs +68 -66
- package/dist/index.css +11 -4
- package/dist/index.js +2 -0
- package/dist/locale/en.cjs +4 -0
- package/dist/locale/en.d.ts +4 -0
- package/dist/locale/en.js +4 -0
- package/dist/locale/zh-cn.cjs +4 -0
- package/dist/locale/zh-cn.d.ts +4 -0
- package/dist/locale/zh-cn.js +4 -0
- package/package.json +12 -12
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
- /package/dist/css/{forms-items.css → forms-item.css} +0 -0
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const dataProps = {
|
|
4
|
+
/**
|
|
5
|
+
* @props { String } rangeSeparator='至'
|
|
6
|
+
* 中间的文字提示
|
|
7
|
+
*/
|
|
4
8
|
rangeSeparator: { type: String },
|
|
9
|
+
/**
|
|
10
|
+
* @props { String } startPlaceholder='开始'
|
|
11
|
+
* 前的文字提示
|
|
12
|
+
*/
|
|
5
13
|
startPlaceholder: { type: String },
|
|
14
|
+
/**
|
|
15
|
+
* @props { String } endPlaceholder='结束'
|
|
16
|
+
* 后的文字提示
|
|
17
|
+
*/
|
|
6
18
|
endPlaceholder: { type: String },
|
|
19
|
+
/**
|
|
20
|
+
* @props { String, Boolean } multiple
|
|
21
|
+
* 是否多合并数据
|
|
22
|
+
*/
|
|
7
23
|
multiple: {
|
|
8
24
|
type: [String, Boolean]
|
|
9
25
|
},
|
|
10
26
|
readonly: {
|
|
11
27
|
type: Boolean
|
|
12
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* @props { Boolean } clearable
|
|
31
|
+
* 是否清除
|
|
32
|
+
*/
|
|
13
33
|
clearable: {
|
|
14
34
|
type: Boolean
|
|
15
35
|
},
|
|
@@ -19,12 +39,20 @@ const dataProps = {
|
|
|
19
39
|
return [];
|
|
20
40
|
}
|
|
21
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* @props { Object } config={}
|
|
44
|
+
* 内容组件配置
|
|
45
|
+
*/
|
|
22
46
|
config: {
|
|
23
47
|
type: Object,
|
|
24
48
|
default() {
|
|
25
49
|
return {};
|
|
26
50
|
}
|
|
27
51
|
},
|
|
52
|
+
/**
|
|
53
|
+
* @props { String, Object } compon='input'
|
|
54
|
+
* 内容组件
|
|
55
|
+
*/
|
|
28
56
|
compon: {
|
|
29
57
|
type: [String, Object],
|
|
30
58
|
default: "input"
|
|
@@ -32,6 +60,10 @@ const dataProps = {
|
|
|
32
60
|
check: {
|
|
33
61
|
type: [Boolean, Function]
|
|
34
62
|
},
|
|
63
|
+
/**
|
|
64
|
+
* @props { Boolean } disabled=false
|
|
65
|
+
* 是否禁用
|
|
66
|
+
*/
|
|
35
67
|
disabled: { type: Boolean, default: false }
|
|
36
68
|
};
|
|
37
69
|
const dataEmits = [
|
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare const dataProps: {
|
|
3
|
+
/**
|
|
4
|
+
* @props { String } rangeSeparator='至'
|
|
5
|
+
* 中间的文字提示
|
|
6
|
+
*/
|
|
3
7
|
rangeSeparator: {
|
|
4
8
|
type: StringConstructor;
|
|
5
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* @props { String } startPlaceholder='开始'
|
|
12
|
+
* 前的文字提示
|
|
13
|
+
*/
|
|
6
14
|
startPlaceholder: {
|
|
7
15
|
type: StringConstructor;
|
|
8
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* @props { String } endPlaceholder='结束'
|
|
19
|
+
* 后的文字提示
|
|
20
|
+
*/
|
|
9
21
|
endPlaceholder: {
|
|
10
22
|
type: StringConstructor;
|
|
11
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* @props { String, Boolean } multiple
|
|
26
|
+
* 是否多合并数据
|
|
27
|
+
*/
|
|
12
28
|
multiple: {
|
|
13
29
|
type: (BooleanConstructor | StringConstructor)[];
|
|
14
30
|
};
|
|
15
31
|
readonly: {
|
|
16
32
|
type: BooleanConstructor;
|
|
17
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* @props { Boolean } clearable
|
|
36
|
+
* 是否清除
|
|
37
|
+
*/
|
|
18
38
|
clearable: {
|
|
19
39
|
type: BooleanConstructor;
|
|
20
40
|
};
|
|
@@ -22,10 +42,18 @@ export declare const dataProps: {
|
|
|
22
42
|
type: (StringConstructor | ArrayConstructor)[];
|
|
23
43
|
default(): never[];
|
|
24
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* @props { Object } config={}
|
|
47
|
+
* 内容组件配置
|
|
48
|
+
*/
|
|
25
49
|
config: {
|
|
26
50
|
type: ObjectConstructor;
|
|
27
51
|
default(): {};
|
|
28
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* @props { String, Object } compon='input'
|
|
55
|
+
* 内容组件
|
|
56
|
+
*/
|
|
29
57
|
compon: {
|
|
30
58
|
type: (ObjectConstructor | StringConstructor)[];
|
|
31
59
|
default: string;
|
|
@@ -33,6 +61,10 @@ export declare const dataProps: {
|
|
|
33
61
|
check: {
|
|
34
62
|
type: (BooleanConstructor | FunctionConstructor)[];
|
|
35
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* @props { Boolean } disabled=false
|
|
66
|
+
* 是否禁用
|
|
67
|
+
*/
|
|
36
68
|
disabled: {
|
|
37
69
|
type: BooleanConstructor;
|
|
38
70
|
default: boolean;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
const dataProps = {
|
|
2
|
+
/**
|
|
3
|
+
* @props { String } rangeSeparator='至'
|
|
4
|
+
* 中间的文字提示
|
|
5
|
+
*/
|
|
2
6
|
rangeSeparator: { type: String },
|
|
7
|
+
/**
|
|
8
|
+
* @props { String } startPlaceholder='开始'
|
|
9
|
+
* 前的文字提示
|
|
10
|
+
*/
|
|
3
11
|
startPlaceholder: { type: String },
|
|
12
|
+
/**
|
|
13
|
+
* @props { String } endPlaceholder='结束'
|
|
14
|
+
* 后的文字提示
|
|
15
|
+
*/
|
|
4
16
|
endPlaceholder: { type: String },
|
|
17
|
+
/**
|
|
18
|
+
* @props { String, Boolean } multiple
|
|
19
|
+
* 是否多合并数据
|
|
20
|
+
*/
|
|
5
21
|
multiple: {
|
|
6
22
|
type: [String, Boolean]
|
|
7
23
|
},
|
|
8
24
|
readonly: {
|
|
9
25
|
type: Boolean
|
|
10
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* @props { Boolean } clearable
|
|
29
|
+
* 是否清除
|
|
30
|
+
*/
|
|
11
31
|
clearable: {
|
|
12
32
|
type: Boolean
|
|
13
33
|
},
|
|
@@ -17,12 +37,20 @@ const dataProps = {
|
|
|
17
37
|
return [];
|
|
18
38
|
}
|
|
19
39
|
},
|
|
40
|
+
/**
|
|
41
|
+
* @props { Object } config={}
|
|
42
|
+
* 内容组件配置
|
|
43
|
+
*/
|
|
20
44
|
config: {
|
|
21
45
|
type: Object,
|
|
22
46
|
default() {
|
|
23
47
|
return {};
|
|
24
48
|
}
|
|
25
49
|
},
|
|
50
|
+
/**
|
|
51
|
+
* @props { String, Object } compon='input'
|
|
52
|
+
* 内容组件
|
|
53
|
+
*/
|
|
26
54
|
compon: {
|
|
27
55
|
type: [String, Object],
|
|
28
56
|
default: "input"
|
|
@@ -30,6 +58,10 @@ const dataProps = {
|
|
|
30
58
|
check: {
|
|
31
59
|
type: [Boolean, Function]
|
|
32
60
|
},
|
|
61
|
+
/**
|
|
62
|
+
* @props { Boolean } disabled=false
|
|
63
|
+
* 是否禁用
|
|
64
|
+
*/
|
|
33
65
|
disabled: { type: Boolean, default: false }
|
|
34
66
|
};
|
|
35
67
|
const dataEmits = [
|
|
@@ -28,21 +28,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
28
|
vue.createElementVNode("span", {
|
|
29
29
|
class: vue.normalizeClass(vue.unref(cs).z("name"))
|
|
30
30
|
}, vue.toDisplayString(props.title), 3),
|
|
31
|
+
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).icon),
|
|
31
32
|
vue.createElementVNode("span", {
|
|
32
33
|
class: vue.normalizeClass(vue.unref(cs).z("close")),
|
|
33
34
|
onClick: onClose
|
|
34
35
|
}, [
|
|
35
|
-
vue.
|
|
36
|
-
vue.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, 8, ["class", "title"])
|
|
45
|
-
])
|
|
36
|
+
vue.createVNode(vue.unref(index$2.Icon), {
|
|
37
|
+
class: vue.normalizeClass(vue.unref(cs).z("close-icon")),
|
|
38
|
+
title: vue.unref(getLocale)("close")
|
|
39
|
+
}, {
|
|
40
|
+
default: vue.withCtx(() => [
|
|
41
|
+
vue.createVNode(close.default)
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
}, 8, ["class", "title"])
|
|
46
45
|
], 2)
|
|
47
46
|
], 2);
|
|
48
47
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx } from "vue";
|
|
2
2
|
import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
|
|
3
3
|
import { Icon } from "../../icon/index.js";
|
|
4
4
|
import Close from "../../../icons/vue/close.js";
|
|
@@ -26,21 +26,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
createElementVNode("span", {
|
|
27
27
|
class: normalizeClass(unref(cs).z("name"))
|
|
28
28
|
}, toDisplayString(props.title), 3),
|
|
29
|
+
renderSlot(_ctx.$slots, unref(dataSlot).icon),
|
|
29
30
|
createElementVNode("span", {
|
|
30
31
|
class: normalizeClass(unref(cs).z("close")),
|
|
31
32
|
onClick: onClose
|
|
32
33
|
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, 8, ["class", "title"])
|
|
43
|
-
])
|
|
34
|
+
createVNode(unref(Icon), {
|
|
35
|
+
class: normalizeClass(unref(cs).z("close-icon")),
|
|
36
|
+
title: unref(getLocale)("close")
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
createVNode(Close)
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
}, 8, ["class", "title"])
|
|
44
43
|
], 2)
|
|
45
44
|
], 2);
|
|
46
45
|
};
|
|
@@ -64,9 +64,10 @@ function isValue(v) {
|
|
|
64
64
|
}
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
|
-
function comHandle(props2, emit) {
|
|
67
|
+
function comHandle(props2, emit, config) {
|
|
68
68
|
const selectMultiple = vue.ref(false);
|
|
69
69
|
let getMultipleValue = (v) => {
|
|
70
|
+
if (config == null ? void 0 : config.getValue) return config.getValue(v);
|
|
70
71
|
return v;
|
|
71
72
|
};
|
|
72
73
|
let setMultipleValue = (v) => {
|
|
@@ -128,6 +129,7 @@ function comHandle(props2, emit) {
|
|
|
128
129
|
if (typeof props2.multiple == "boolean") {
|
|
129
130
|
selectMultiple.value = props2.multiple;
|
|
130
131
|
getMultipleValue = (v) => {
|
|
132
|
+
if (config == null ? void 0 : config.getValue) return config.getValue(v);
|
|
131
133
|
return v;
|
|
132
134
|
};
|
|
133
135
|
setMultipleValue = (v) => {
|
|
@@ -141,6 +143,7 @@ function comHandle(props2, emit) {
|
|
|
141
143
|
} else if (typeof props2.multiple == "string") {
|
|
142
144
|
selectMultiple.value = true;
|
|
143
145
|
getMultipleValue = (v) => {
|
|
146
|
+
if (config == null ? void 0 : config.getValue) v = config.getValue(v);
|
|
144
147
|
if (v && v instanceof Array) {
|
|
145
148
|
return v.join(props2.multiple);
|
|
146
149
|
} else {
|
|
@@ -68,8 +68,12 @@ export declare const props: {
|
|
|
68
68
|
* @emits change ( v: 选中的prop 值, obj:[]选择的值对象 ) 选择事件
|
|
69
69
|
*/
|
|
70
70
|
export declare const emits: string[];
|
|
71
|
-
|
|
71
|
+
type HandleConfig = {
|
|
72
|
+
getValue: <T>(v: T) => T;
|
|
73
|
+
};
|
|
74
|
+
export declare function comHandle(props: any, emit: any, config?: HandleConfig): {
|
|
72
75
|
value: WritableComputedRef<any, any>;
|
|
73
76
|
multiple: Ref<boolean, boolean>;
|
|
74
77
|
};
|
|
75
78
|
export declare const expose: {};
|
|
79
|
+
export {};
|
|
@@ -62,9 +62,10 @@ function isValue(v) {
|
|
|
62
62
|
}
|
|
63
63
|
return false;
|
|
64
64
|
}
|
|
65
|
-
function comHandle(props2, emit) {
|
|
65
|
+
function comHandle(props2, emit, config) {
|
|
66
66
|
const selectMultiple = ref(false);
|
|
67
67
|
let getMultipleValue = (v) => {
|
|
68
|
+
if (config == null ? void 0 : config.getValue) return config.getValue(v);
|
|
68
69
|
return v;
|
|
69
70
|
};
|
|
70
71
|
let setMultipleValue = (v) => {
|
|
@@ -126,6 +127,7 @@ function comHandle(props2, emit) {
|
|
|
126
127
|
if (typeof props2.multiple == "boolean") {
|
|
127
128
|
selectMultiple.value = props2.multiple;
|
|
128
129
|
getMultipleValue = (v) => {
|
|
130
|
+
if (config == null ? void 0 : config.getValue) return config.getValue(v);
|
|
129
131
|
return v;
|
|
130
132
|
};
|
|
131
133
|
setMultipleValue = (v) => {
|
|
@@ -139,6 +141,7 @@ function comHandle(props2, emit) {
|
|
|
139
141
|
} else if (typeof props2.multiple == "string") {
|
|
140
142
|
selectMultiple.value = true;
|
|
141
143
|
getMultipleValue = (v) => {
|
|
144
|
+
if (config == null ? void 0 : config.getValue) v = config.getValue(v);
|
|
142
145
|
if (v && v instanceof Array) {
|
|
143
146
|
return v.join(props2.multiple);
|
|
144
147
|
} else {
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const data = require("../../dates-picker/src/data.cjs");
|
|
4
4
|
const dataProps = {
|
|
5
5
|
...data.props,
|
|
6
|
+
type: {
|
|
7
|
+
type: String
|
|
8
|
+
},
|
|
6
9
|
/**
|
|
7
10
|
* @props {String, Number, Date, Array} modelValue/v-model 时间数据
|
|
8
11
|
*/
|
|
@@ -12,6 +15,9 @@ const dataProps = {
|
|
|
12
15
|
return [];
|
|
13
16
|
}
|
|
14
17
|
},
|
|
18
|
+
defaultTime: {
|
|
19
|
+
type: Object
|
|
20
|
+
},
|
|
15
21
|
rangeSeparator: { type: String, default: "至" },
|
|
16
22
|
startPlaceholder: { type: String, default: "开始" },
|
|
17
23
|
endPlaceholder: { type: String, default: "结束" }
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
2
|
+
type SingleType = 'year' | 'month' | 'date' | 'datetime';
|
|
3
3
|
export declare const dataProps: {
|
|
4
|
+
type: {
|
|
5
|
+
type: () => SingleType;
|
|
6
|
+
};
|
|
4
7
|
/**
|
|
5
8
|
* @props {String, Number, Date, Array} modelValue/v-model 时间数据
|
|
6
9
|
*/
|
|
@@ -23,6 +26,9 @@ export declare const dataProps: {
|
|
|
23
26
|
};
|
|
24
27
|
default(): never[];
|
|
25
28
|
};
|
|
29
|
+
defaultTime: {
|
|
30
|
+
type: () => Date | [Date, Date];
|
|
31
|
+
};
|
|
26
32
|
rangeSeparator: {
|
|
27
33
|
type: StringConstructor;
|
|
28
34
|
default: string;
|
|
@@ -38,9 +44,6 @@ export declare const dataProps: {
|
|
|
38
44
|
format: {
|
|
39
45
|
type: StringConstructor;
|
|
40
46
|
};
|
|
41
|
-
type: {
|
|
42
|
-
type: () => DataType;
|
|
43
|
-
};
|
|
44
47
|
isEnd: {
|
|
45
48
|
type: BooleanConstructor;
|
|
46
49
|
};
|
|
@@ -67,3 +70,4 @@ export declare const dataSlot: {
|
|
|
67
70
|
* 设置值
|
|
68
71
|
*/
|
|
69
72
|
export declare const dataExpose: {};
|
|
73
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { props } from "../../dates-picker/src/data.js";
|
|
2
2
|
const dataProps = {
|
|
3
3
|
...props,
|
|
4
|
+
type: {
|
|
5
|
+
type: String
|
|
6
|
+
},
|
|
4
7
|
/**
|
|
5
8
|
* @props {String, Number, Date, Array} modelValue/v-model 时间数据
|
|
6
9
|
*/
|
|
@@ -10,6 +13,9 @@ const dataProps = {
|
|
|
10
13
|
return [];
|
|
11
14
|
}
|
|
12
15
|
},
|
|
16
|
+
defaultTime: {
|
|
17
|
+
type: Object
|
|
18
|
+
},
|
|
13
19
|
rangeSeparator: { type: String, default: "至" },
|
|
14
20
|
startPlaceholder: { type: String, default: "开始" },
|
|
15
21
|
endPlaceholder: { type: String, default: "结束" }
|
|
@@ -3,7 +3,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const data = require("./data.cjs");
|
|
5
5
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
6
|
-
const
|
|
6
|
+
const util = require("../../dates2/src/util.cjs");
|
|
7
|
+
const index$1 = require("element-plus/es/components/date-picker/index");
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: data.dataProps,
|
|
@@ -12,6 +13,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
12
13
|
const cs = index.useCssName("dates-divide");
|
|
13
14
|
const props = __props;
|
|
14
15
|
const emit = __emit;
|
|
16
|
+
const setDefaultTime = (i) => {
|
|
17
|
+
if (props.defaultTime instanceof Array) {
|
|
18
|
+
return props.defaultTime[i];
|
|
19
|
+
} else {
|
|
20
|
+
return props.defaultTime;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
15
23
|
const start = vue.computed({
|
|
16
24
|
set(value) {
|
|
17
25
|
const v = [value, end.value];
|
|
@@ -33,10 +41,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
33
41
|
}
|
|
34
42
|
});
|
|
35
43
|
const e = vue.computed(() => {
|
|
36
|
-
return
|
|
44
|
+
return util.getDate(end.value).valueOf();
|
|
37
45
|
});
|
|
38
46
|
const s = vue.computed(() => {
|
|
39
|
-
return
|
|
47
|
+
return util.getDate(start.value).valueOf();
|
|
40
48
|
});
|
|
41
49
|
function disabledDateStart(time) {
|
|
42
50
|
if (end.value) {
|
|
@@ -60,27 +68,27 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
68
|
class: vue.normalizeClass(vue.unref(cs).z())
|
|
61
69
|
}, [
|
|
62
70
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).prefix),
|
|
63
|
-
vue.createVNode(vue.unref(index$1.
|
|
71
|
+
vue.createVNode(vue.unref(index$1.ElDatePicker), {
|
|
64
72
|
"disabled-date": disabledDateStart,
|
|
65
73
|
type: props.type,
|
|
66
74
|
format: props.format,
|
|
67
75
|
placeholder: props.startPlaceholder,
|
|
68
|
-
|
|
76
|
+
"default-time": setDefaultTime(0),
|
|
69
77
|
modelValue: start.value,
|
|
70
78
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => start.value = $event)
|
|
71
|
-
}, null, 8, ["type", "format", "placeholder", "modelValue"]),
|
|
79
|
+
}, null, 8, ["type", "format", "placeholder", "default-time", "modelValue"]),
|
|
72
80
|
vue.createElementVNode("span", {
|
|
73
81
|
class: vue.normalizeClass(vue.unref(cs).z("range"))
|
|
74
82
|
}, vue.toDisplayString(props.rangeSeparator), 3),
|
|
75
|
-
vue.createVNode(vue.unref(index$1.
|
|
83
|
+
vue.createVNode(vue.unref(index$1.ElDatePicker), {
|
|
76
84
|
"disabled-date": disabledDateEnd,
|
|
77
85
|
placeholder: props.endPlaceholder,
|
|
78
86
|
type: props.type,
|
|
79
87
|
format: props.format,
|
|
80
|
-
|
|
88
|
+
"default-time": setDefaultTime(1),
|
|
81
89
|
modelValue: end.value,
|
|
82
90
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => end.value = $event)
|
|
83
|
-
}, null, 8, ["placeholder", "type", "format", "modelValue"])
|
|
91
|
+
}, null, 8, ["placeholder", "type", "format", "default-time", "modelValue"])
|
|
84
92
|
], 2);
|
|
85
93
|
};
|
|
86
94
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
|
|
3
3
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getDate } from "../../dates2/src/util.js";
|
|
5
|
+
import { ElDatePicker } from "element-plus/es/components/date-picker/index";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "index",
|
|
7
8
|
props: dataProps,
|
|
@@ -10,6 +11,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
11
|
const cs = useCssName("dates-divide");
|
|
11
12
|
const props = __props;
|
|
12
13
|
const emit = __emit;
|
|
14
|
+
const setDefaultTime = (i) => {
|
|
15
|
+
if (props.defaultTime instanceof Array) {
|
|
16
|
+
return props.defaultTime[i];
|
|
17
|
+
} else {
|
|
18
|
+
return props.defaultTime;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
13
21
|
const start = computed({
|
|
14
22
|
set(value) {
|
|
15
23
|
const v = [value, end.value];
|
|
@@ -31,10 +39,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
41
|
const e = computed(() => {
|
|
34
|
-
return
|
|
42
|
+
return getDate(end.value).valueOf();
|
|
35
43
|
});
|
|
36
44
|
const s = computed(() => {
|
|
37
|
-
return
|
|
45
|
+
return getDate(start.value).valueOf();
|
|
38
46
|
});
|
|
39
47
|
function disabledDateStart(time) {
|
|
40
48
|
if (end.value) {
|
|
@@ -58,27 +66,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
66
|
class: normalizeClass(unref(cs).z())
|
|
59
67
|
}, [
|
|
60
68
|
renderSlot(_ctx.$slots, unref(dataSlot).prefix),
|
|
61
|
-
createVNode(unref(
|
|
69
|
+
createVNode(unref(ElDatePicker), {
|
|
62
70
|
"disabled-date": disabledDateStart,
|
|
63
71
|
type: props.type,
|
|
64
72
|
format: props.format,
|
|
65
73
|
placeholder: props.startPlaceholder,
|
|
66
|
-
|
|
74
|
+
"default-time": setDefaultTime(0),
|
|
67
75
|
modelValue: start.value,
|
|
68
76
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => start.value = $event)
|
|
69
|
-
}, null, 8, ["type", "format", "placeholder", "modelValue"]),
|
|
77
|
+
}, null, 8, ["type", "format", "placeholder", "default-time", "modelValue"]),
|
|
70
78
|
createElementVNode("span", {
|
|
71
79
|
class: normalizeClass(unref(cs).z("range"))
|
|
72
80
|
}, toDisplayString(props.rangeSeparator), 3),
|
|
73
|
-
createVNode(unref(
|
|
81
|
+
createVNode(unref(ElDatePicker), {
|
|
74
82
|
"disabled-date": disabledDateEnd,
|
|
75
83
|
placeholder: props.endPlaceholder,
|
|
76
84
|
type: props.type,
|
|
77
85
|
format: props.format,
|
|
78
|
-
|
|
86
|
+
"default-time": setDefaultTime(1),
|
|
79
87
|
modelValue: end.value,
|
|
80
88
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => end.value = $event)
|
|
81
|
-
}, null, 8, ["placeholder", "type", "format", "modelValue"])
|
|
89
|
+
}, null, 8, ["placeholder", "type", "format", "default-time", "modelValue"])
|
|
82
90
|
], 2);
|
|
83
91
|
};
|
|
84
92
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
|
+
require("./src/index.cjs");
|
|
6
|
+
const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
|
|
7
|
+
const Dates2 = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Dates2");
|
|
8
|
+
exports.Dates2 = Dates2;
|
|
9
|
+
exports.default = Dates2;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./util.cjs");
|
|
4
|
+
const list = require("../../common/list.cjs");
|
|
5
|
+
const dataProps = {
|
|
6
|
+
...list.props,
|
|
7
|
+
format: {
|
|
8
|
+
type: String
|
|
9
|
+
},
|
|
10
|
+
type: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
separate: {
|
|
14
|
+
type: Boolean
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* @props { Boolean } repair 是否格式化时间
|
|
18
|
+
*/
|
|
19
|
+
repair: {
|
|
20
|
+
type: Boolean
|
|
21
|
+
},
|
|
22
|
+
shortcuts: {
|
|
23
|
+
type: Array
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* @props {String, Number, Date, Array} modelValue/v-model 时间数据
|
|
27
|
+
*/
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: [String, Number, Date, Array]
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const dataEmits = [...list.emits];
|
|
33
|
+
const dataHandle = list.comHandle;
|
|
34
|
+
const dataSlot = {
|
|
35
|
+
default: "default",
|
|
36
|
+
prefix: "prefix"
|
|
37
|
+
};
|
|
38
|
+
const dataExpose = {};
|
|
39
|
+
exports.dataEmits = dataEmits;
|
|
40
|
+
exports.dataExpose = dataExpose;
|
|
41
|
+
exports.dataHandle = dataHandle;
|
|
42
|
+
exports.dataProps = dataProps;
|
|
43
|
+
exports.dataSlot = dataSlot;
|