@fangzhongya/fang-ui 0.1.32 → 0.1.34
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/list.cjs +2 -15
- package/dist/components/common/list.js +2 -15
- package/dist/components/common/urls.cjs +1 -1
- package/dist/components/common/urls.js +1 -1
- package/dist/components/index.scss +1 -2
- package/dist/components/labels/src/data.cjs +7 -2
- package/dist/components/labels/src/data.d.ts +6 -1
- package/dist/components/labels/src/data.js +7 -2
- package/dist/components/labels/src/index2.cjs +5 -5
- package/dist/components/labels/src/index2.js +5 -5
- package/dist/components/listsp/src/index2.cjs +1 -1
- package/dist/components/listsp/src/index2.js +1 -1
- package/dist/components/listspd/src/index2.cjs +6 -1
- package/dist/components/listspd/src/index2.js +6 -1
- package/dist/components/selects/src/data.cjs +4 -0
- package/dist/components/selects/src/data.d.ts +4 -0
- package/dist/components/selects/src/data.js +4 -0
- package/dist/components/selects/src/index2.cjs +69 -7
- package/dist/components/selects/src/index2.js +69 -7
- package/dist/components/tables/common/pagin.cjs +4 -10
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +4 -10
- package/dist/components/tablesp/src/index2.cjs +1 -1
- package/dist/components/tablesp/src/index2.js +1 -1
- package/dist/components/tablespd/src/index2.cjs +5 -1
- package/dist/components/tablespd/src/index2.js +5 -1
- package/dist/components/tablesvp/src/index2.cjs +3 -1
- package/dist/components/tablesvp/src/index2.js +3 -1
- package/dist/components/tablesvpd/src/index2.cjs +6 -1
- package/dist/components/tablesvpd/src/index2.js +6 -1
- package/dist/components/uploads/src/index2.cjs +3 -0
- package/dist/components/uploads/src/index2.js +3 -0
- package/dist/css/index.css +0 -28
- package/dist/icons/index.json +1 -1
- package/dist/index.css +0 -28
- package/package.json +4 -4
- /package/dist/components/{draggable → slider}/index.css +0 -0
- /package/dist/css/{draggable.css → slider.css} +0 -0
|
@@ -53,17 +53,6 @@ const props = {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
const emits = ["update:modelValue", "change", "load"];
|
|
56
|
-
function isValue(v) {
|
|
57
|
-
if (v) {
|
|
58
|
-
return true;
|
|
59
|
-
} else {
|
|
60
|
-
const t = typeof v;
|
|
61
|
-
if (["boolean", "number"].includes(t)) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
56
|
function comHandle(props2, emit, config) {
|
|
68
57
|
const selectMultiple = vue.ref(false);
|
|
69
58
|
let getMultipleValue = (v) => {
|
|
@@ -92,7 +81,7 @@ function comHandle(props2, emit, config) {
|
|
|
92
81
|
});
|
|
93
82
|
function getValueObjs(v) {
|
|
94
83
|
var _a, _b;
|
|
95
|
-
if (
|
|
84
|
+
if (v !== void 0 && v !== null) {
|
|
96
85
|
if (selectMultiple.value && v instanceof Array) {
|
|
97
86
|
return (_a = props2.options) == null ? void 0 : _a.filter((o) => {
|
|
98
87
|
return v.includes(use.useVueValue(o, props2.prop));
|
|
@@ -102,15 +91,13 @@ function comHandle(props2, emit, config) {
|
|
|
102
91
|
return use.useVueValue(o, props2.prop) === v;
|
|
103
92
|
});
|
|
104
93
|
}
|
|
105
|
-
} else {
|
|
106
|
-
return v;
|
|
107
94
|
}
|
|
108
95
|
}
|
|
109
96
|
function setValue(type) {
|
|
110
97
|
let v = props2.modelValue;
|
|
111
98
|
if (type == 2) {
|
|
112
99
|
if (!(v instanceof Array)) {
|
|
113
|
-
if (
|
|
100
|
+
if (v !== void 0 && v !== null && v !== "") {
|
|
114
101
|
v = [v];
|
|
115
102
|
}
|
|
116
103
|
}
|
|
@@ -51,17 +51,6 @@ const props = {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
const emits = ["update:modelValue", "change", "load"];
|
|
54
|
-
function isValue(v) {
|
|
55
|
-
if (v) {
|
|
56
|
-
return true;
|
|
57
|
-
} else {
|
|
58
|
-
const t = typeof v;
|
|
59
|
-
if (["boolean", "number"].includes(t)) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
54
|
function comHandle(props2, emit, config) {
|
|
66
55
|
const selectMultiple = ref(false);
|
|
67
56
|
let getMultipleValue = (v) => {
|
|
@@ -90,7 +79,7 @@ function comHandle(props2, emit, config) {
|
|
|
90
79
|
});
|
|
91
80
|
function getValueObjs(v) {
|
|
92
81
|
var _a, _b;
|
|
93
|
-
if (
|
|
82
|
+
if (v !== void 0 && v !== null) {
|
|
94
83
|
if (selectMultiple.value && v instanceof Array) {
|
|
95
84
|
return (_a = props2.options) == null ? void 0 : _a.filter((o) => {
|
|
96
85
|
return v.includes(useVueValue(o, props2.prop));
|
|
@@ -100,15 +89,13 @@ function comHandle(props2, emit, config) {
|
|
|
100
89
|
return useVueValue(o, props2.prop) === v;
|
|
101
90
|
});
|
|
102
91
|
}
|
|
103
|
-
} else {
|
|
104
|
-
return v;
|
|
105
92
|
}
|
|
106
93
|
}
|
|
107
94
|
function setValue(type) {
|
|
108
95
|
let v = props2.modelValue;
|
|
109
96
|
if (type == 2) {
|
|
110
97
|
if (!(v instanceof Array)) {
|
|
111
|
-
if (
|
|
98
|
+
if (v !== void 0 && v !== null && v !== "") {
|
|
112
99
|
v = [v];
|
|
113
100
|
}
|
|
114
101
|
}
|
|
@@ -5,10 +5,15 @@ const data = require("../../checks/src/data.cjs");
|
|
|
5
5
|
const name = "labels";
|
|
6
6
|
const dataProps = {
|
|
7
7
|
...data.dataProps,
|
|
8
|
-
|
|
9
|
-
type: Boolean
|
|
8
|
+
isWhole: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: true
|
|
10
11
|
},
|
|
11
12
|
whole: {
|
|
13
|
+
type: null,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
wholeName: {
|
|
12
17
|
type: String,
|
|
13
18
|
default: "全部"
|
|
14
19
|
},
|
|
@@ -5,10 +5,15 @@ import { comHandle } from '../../common/list';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const name = "labels";
|
|
7
7
|
export declare const dataProps: {
|
|
8
|
-
|
|
8
|
+
isWhole: {
|
|
9
9
|
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
10
11
|
};
|
|
11
12
|
whole: {
|
|
13
|
+
type: null;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
wholeName: {
|
|
12
17
|
type: StringConstructor;
|
|
13
18
|
default: string;
|
|
14
19
|
};
|
|
@@ -3,10 +3,15 @@ import { dataProps as dataProps$1, dataEmits as dataEmits$1 } from "../../checks
|
|
|
3
3
|
const name = "labels";
|
|
4
4
|
const dataProps = {
|
|
5
5
|
...dataProps$1,
|
|
6
|
-
|
|
7
|
-
type: Boolean
|
|
6
|
+
isWhole: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true
|
|
8
9
|
},
|
|
9
10
|
whole: {
|
|
11
|
+
type: null,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
wholeName: {
|
|
10
15
|
type: String,
|
|
11
16
|
default: "全部"
|
|
12
17
|
},
|
|
@@ -38,19 +38,19 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
38
38
|
obj[d] = value2;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const wholeValue =
|
|
41
|
+
const wholeValue = props.whole;
|
|
42
42
|
const options = vue.computed(() => {
|
|
43
43
|
const opts = [...props.options];
|
|
44
|
-
if (
|
|
44
|
+
if (props.isWhole) {
|
|
45
45
|
const obj = {
|
|
46
46
|
class: wholeClass
|
|
47
47
|
};
|
|
48
48
|
if (multiple.value) {
|
|
49
49
|
setPropsValue(obj, props.prop, wholeValue, "value");
|
|
50
50
|
} else {
|
|
51
|
-
setPropsValue(obj, props.prop,
|
|
51
|
+
setPropsValue(obj, props.prop, props.whole, "value");
|
|
52
52
|
}
|
|
53
|
-
setPropsValue(obj, props.label, props.
|
|
53
|
+
setPropsValue(obj, props.label, props.wholeName, "label");
|
|
54
54
|
opts.unshift(obj);
|
|
55
55
|
}
|
|
56
56
|
return opts;
|
|
@@ -78,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
function onClickWholes(item, is) {
|
|
81
|
-
if (item.class === wholeClass) {
|
|
81
|
+
if ((item == null ? void 0 : item.class) === wholeClass) {
|
|
82
82
|
if (valueMultiple.value.includes(wholeValue)) {
|
|
83
83
|
valueMultiple.value = [];
|
|
84
84
|
} else {
|
|
@@ -36,19 +36,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
obj[d] = value2;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const wholeValue =
|
|
39
|
+
const wholeValue = props.whole;
|
|
40
40
|
const options = computed(() => {
|
|
41
41
|
const opts = [...props.options];
|
|
42
|
-
if (
|
|
42
|
+
if (props.isWhole) {
|
|
43
43
|
const obj = {
|
|
44
44
|
class: wholeClass
|
|
45
45
|
};
|
|
46
46
|
if (multiple.value) {
|
|
47
47
|
setPropsValue(obj, props.prop, wholeValue, "value");
|
|
48
48
|
} else {
|
|
49
|
-
setPropsValue(obj, props.prop,
|
|
49
|
+
setPropsValue(obj, props.prop, props.whole, "value");
|
|
50
50
|
}
|
|
51
|
-
setPropsValue(obj, props.label, props.
|
|
51
|
+
setPropsValue(obj, props.label, props.wholeName, "label");
|
|
52
52
|
opts.unshift(obj);
|
|
53
53
|
}
|
|
54
54
|
return opts;
|
|
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
function onClickWholes(item, is) {
|
|
79
|
-
if (item.class === wholeClass) {
|
|
79
|
+
if ((item == null ? void 0 : item.class) === wholeClass) {
|
|
80
80
|
if (valueMultiple.value.includes(wholeValue)) {
|
|
81
81
|
valueMultiple.value = [];
|
|
82
82
|
} else {
|
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale, { type: 2 });
|
|
48
48
|
__expose({
|
|
49
49
|
getSelection,
|
|
50
50
|
getRef,
|
|
@@ -47,7 +47,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
47
|
onCurrentChange,
|
|
48
48
|
paginat,
|
|
49
49
|
data: data$2
|
|
50
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
50
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
51
|
+
type: 2,
|
|
52
|
+
config: {
|
|
53
|
+
isdrag: true
|
|
54
|
+
}
|
|
55
|
+
});
|
|
51
56
|
__expose({
|
|
52
57
|
getSelection,
|
|
53
58
|
getRef,
|
|
@@ -45,7 +45,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
onCurrentChange,
|
|
46
46
|
paginat,
|
|
47
47
|
data
|
|
48
|
-
} = useInit(props, emit, refTable, getLocale,
|
|
48
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
49
|
+
type: 2,
|
|
50
|
+
config: {
|
|
51
|
+
isdrag: true
|
|
52
|
+
}
|
|
53
|
+
});
|
|
49
54
|
__expose({
|
|
50
55
|
getSelection,
|
|
51
56
|
getRef,
|
|
@@ -34,11 +34,73 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
34
34
|
});
|
|
35
35
|
const emit = __emit;
|
|
36
36
|
const listFuObj = data.dataHandle(props, emit);
|
|
37
|
-
|
|
37
|
+
let value = listFuObj.value;
|
|
38
38
|
const multiple = listFuObj.multiple;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
let setValue = (item) => {
|
|
40
|
+
return use.useVueValue(item, props.prop);
|
|
41
41
|
};
|
|
42
|
+
let onClickMultiple = (v, is) => {
|
|
43
|
+
emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
|
|
44
|
+
};
|
|
45
|
+
if (props.isEmpty) {
|
|
46
|
+
const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
|
|
47
|
+
onClickMultiple = (v, is) => {
|
|
48
|
+
if (v === emptyValue) {
|
|
49
|
+
v = "";
|
|
50
|
+
}
|
|
51
|
+
emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
|
|
52
|
+
};
|
|
53
|
+
const isOptionsEmpty = vue.computed(() => {
|
|
54
|
+
const arr = props.options.filter((o) => {
|
|
55
|
+
return use.useVueValue(o, props.prop) === "";
|
|
56
|
+
});
|
|
57
|
+
return arr.length > 0;
|
|
58
|
+
});
|
|
59
|
+
const setEmptyFun = () => {
|
|
60
|
+
setValue = (item) => {
|
|
61
|
+
const v = use.useVueValue(item, props.prop);
|
|
62
|
+
if (v === "") {
|
|
63
|
+
return emptyValue;
|
|
64
|
+
}
|
|
65
|
+
return v;
|
|
66
|
+
};
|
|
67
|
+
value = vue.computed({
|
|
68
|
+
set(v) {
|
|
69
|
+
if (multiple.value) {
|
|
70
|
+
listFuObj.value.value = (v ?? []).map((o) => {
|
|
71
|
+
if (o === emptyValue) {
|
|
72
|
+
return "";
|
|
73
|
+
}
|
|
74
|
+
return o;
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
if (v === emptyValue) {
|
|
78
|
+
listFuObj.value.value = "";
|
|
79
|
+
} else {
|
|
80
|
+
listFuObj.value.value = v;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
get() {
|
|
85
|
+
const v = listFuObj.value.value;
|
|
86
|
+
if (multiple.value) {
|
|
87
|
+
return (v ?? []).map((o) => {
|
|
88
|
+
if (o === "") {
|
|
89
|
+
return emptyValue;
|
|
90
|
+
}
|
|
91
|
+
return o;
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
if (isOptionsEmpty.value && v === "") {
|
|
95
|
+
return emptyValue;
|
|
96
|
+
}
|
|
97
|
+
return v;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
setEmptyFun();
|
|
103
|
+
}
|
|
42
104
|
const onChange = (v) => {
|
|
43
105
|
if (multiple.value) {
|
|
44
106
|
const obj = compareArray.compareArray(value.value || [], v || []);
|
|
@@ -46,8 +108,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
108
|
onClickMultiple(obj.value[0], is);
|
|
47
109
|
}
|
|
48
110
|
};
|
|
49
|
-
const onRemoveTag = (
|
|
50
|
-
onClickMultiple(
|
|
111
|
+
const onRemoveTag = (v) => {
|
|
112
|
+
onClickMultiple(v, true);
|
|
51
113
|
};
|
|
52
114
|
__expose(
|
|
53
115
|
index$4.useExpose(
|
|
@@ -69,7 +131,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
131
|
ref_key: "elRef",
|
|
70
132
|
ref: elRef,
|
|
71
133
|
modelValue: vue.unref(value),
|
|
72
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(value) ? value.value = $event :
|
|
134
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(value) ? value.value = $event : value = $event)
|
|
73
135
|
}, vue.unref(attrs).assem, {
|
|
74
136
|
multiple: vue.unref(multiple),
|
|
75
137
|
placeholder: placeholder.value,
|
|
@@ -80,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
80
142
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(props).options, (item) => {
|
|
81
143
|
return vue.openBlock(), vue.createBlock(vue.unref(index$6.Option), {
|
|
82
144
|
label: vue.unref(use.useVueValue)(item, vue.unref(props).label),
|
|
83
|
-
value: vue.unref(
|
|
145
|
+
value: vue.unref(setValue)(item),
|
|
84
146
|
disabled: item == null ? void 0 : item.disabled
|
|
85
147
|
}, null, 8, ["label", "value", "disabled"]);
|
|
86
148
|
}), 256))
|
|
@@ -32,11 +32,73 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
});
|
|
33
33
|
const emit = __emit;
|
|
34
34
|
const listFuObj = dataHandle(props, emit);
|
|
35
|
-
|
|
35
|
+
let value = listFuObj.value;
|
|
36
36
|
const multiple = listFuObj.multiple;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
let setValue = (item) => {
|
|
38
|
+
return useVueValue(item, props.prop);
|
|
39
39
|
};
|
|
40
|
+
let onClickMultiple = (v, is) => {
|
|
41
|
+
emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
|
|
42
|
+
};
|
|
43
|
+
if (props.isEmpty) {
|
|
44
|
+
const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
|
|
45
|
+
onClickMultiple = (v, is) => {
|
|
46
|
+
if (v === emptyValue) {
|
|
47
|
+
v = "";
|
|
48
|
+
}
|
|
49
|
+
emit("click-multiple", listFuObj.getValueObjs(v)[0], is);
|
|
50
|
+
};
|
|
51
|
+
const isOptionsEmpty = computed(() => {
|
|
52
|
+
const arr = props.options.filter((o) => {
|
|
53
|
+
return useVueValue(o, props.prop) === "";
|
|
54
|
+
});
|
|
55
|
+
return arr.length > 0;
|
|
56
|
+
});
|
|
57
|
+
const setEmptyFun = () => {
|
|
58
|
+
setValue = (item) => {
|
|
59
|
+
const v = useVueValue(item, props.prop);
|
|
60
|
+
if (v === "") {
|
|
61
|
+
return emptyValue;
|
|
62
|
+
}
|
|
63
|
+
return v;
|
|
64
|
+
};
|
|
65
|
+
value = computed({
|
|
66
|
+
set(v) {
|
|
67
|
+
if (multiple.value) {
|
|
68
|
+
listFuObj.value.value = (v ?? []).map((o) => {
|
|
69
|
+
if (o === emptyValue) {
|
|
70
|
+
return "";
|
|
71
|
+
}
|
|
72
|
+
return o;
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
if (v === emptyValue) {
|
|
76
|
+
listFuObj.value.value = "";
|
|
77
|
+
} else {
|
|
78
|
+
listFuObj.value.value = v;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
get() {
|
|
83
|
+
const v = listFuObj.value.value;
|
|
84
|
+
if (multiple.value) {
|
|
85
|
+
return (v ?? []).map((o) => {
|
|
86
|
+
if (o === "") {
|
|
87
|
+
return emptyValue;
|
|
88
|
+
}
|
|
89
|
+
return o;
|
|
90
|
+
});
|
|
91
|
+
} else {
|
|
92
|
+
if (isOptionsEmpty.value && v === "") {
|
|
93
|
+
return emptyValue;
|
|
94
|
+
}
|
|
95
|
+
return v;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
setEmptyFun();
|
|
101
|
+
}
|
|
40
102
|
const onChange = (v) => {
|
|
41
103
|
if (multiple.value) {
|
|
42
104
|
const obj = compareArray(value.value || [], v || []);
|
|
@@ -44,8 +106,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
106
|
onClickMultiple(obj.value[0], is);
|
|
45
107
|
}
|
|
46
108
|
};
|
|
47
|
-
const onRemoveTag = (
|
|
48
|
-
onClickMultiple(
|
|
109
|
+
const onRemoveTag = (v) => {
|
|
110
|
+
onClickMultiple(v, true);
|
|
49
111
|
};
|
|
50
112
|
__expose(
|
|
51
113
|
useExpose(
|
|
@@ -67,7 +129,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
129
|
ref_key: "elRef",
|
|
68
130
|
ref: elRef,
|
|
69
131
|
modelValue: unref(value),
|
|
70
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event :
|
|
132
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : value = $event)
|
|
71
133
|
}, unref(attrs).assem, {
|
|
72
134
|
multiple: unref(multiple),
|
|
73
135
|
placeholder: placeholder.value,
|
|
@@ -78,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
140
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).options, (item) => {
|
|
79
141
|
return openBlock(), createBlock(unref(Option), {
|
|
80
142
|
label: unref(useVueValue)(item, unref(props).label),
|
|
81
|
-
value: unref(
|
|
143
|
+
value: unref(setValue)(item),
|
|
82
144
|
disabled: item == null ? void 0 : item.disabled
|
|
83
145
|
}, null, 8, ["label", "value", "disabled"]);
|
|
84
146
|
}), 256))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const unmergeObject = require("@fangzhongya/utils/basic/object/unmergeObject");
|
|
4
5
|
require("../../../utils/index.cjs");
|
|
5
6
|
const urls = require("../../common/urls.cjs");
|
|
6
7
|
const firstLower = require("@fangzhongya/utils/basic/string/firstLower");
|
|
@@ -73,7 +74,7 @@ const dataProps = {
|
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
76
|
const dataEmit = ["list-events", "selection", "drag", "update:value"];
|
|
76
|
-
const useInit = (props2, emit, refTable, getLocale,
|
|
77
|
+
const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
|
|
77
78
|
var _a, _b;
|
|
78
79
|
const loading = vue.ref(false);
|
|
79
80
|
const mpagconfig = {
|
|
@@ -207,7 +208,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
207
208
|
paginat.cross = pagin.cross || false;
|
|
208
209
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
209
210
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
210
|
-
tableConfig.value = config;
|
|
211
|
+
tableConfig.value = unmergeObject.unmergeObject(defaultConfig, config, 2);
|
|
211
212
|
};
|
|
212
213
|
vue.watch(
|
|
213
214
|
[() => props2.configs, () => props2.config, () => props2.list],
|
|
@@ -232,13 +233,6 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
232
233
|
});
|
|
233
234
|
return obj;
|
|
234
235
|
});
|
|
235
|
-
const istype = vue.computed(() => {
|
|
236
|
-
if (isEl) {
|
|
237
|
-
return true;
|
|
238
|
-
} else {
|
|
239
|
-
return tableConfig.value.type == 1;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
236
|
function setCrossPage() {
|
|
243
237
|
const v = data.current;
|
|
244
238
|
console.log("v", v);
|
|
@@ -428,7 +422,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
428
422
|
}
|
|
429
423
|
function empty() {
|
|
430
424
|
var _a2, _b2, _c, _d;
|
|
431
|
-
if (
|
|
425
|
+
if (tableConfig.value.type == 1 && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
432
426
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
433
427
|
}
|
|
434
428
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
@@ -93,7 +93,7 @@ export declare const dataProps: {
|
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
export declare const dataEmit: string[];
|
|
96
|
-
export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit: Function, refTable: Ref, getLocale: Translator,
|
|
96
|
+
export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit: Function, refTable: Ref, getLocale: Translator, defaultConfig?: TableConfig) => {
|
|
97
97
|
height: ComputedRef<any>;
|
|
98
98
|
tableConfig: Ref<{
|
|
99
99
|
[x: string]: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, reactive, watch, computed, nextTick } from "vue";
|
|
2
|
+
import { unmergeObject } from "@fangzhongya/utils/basic/object/unmergeObject";
|
|
2
3
|
import "../../../utils/index.js";
|
|
3
4
|
import { props, comHandle } from "../../common/urls.js";
|
|
4
5
|
import { firstLower } from "@fangzhongya/utils/basic/string/firstLower";
|
|
@@ -71,7 +72,7 @@ const dataProps = {
|
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
const dataEmit = ["list-events", "selection", "drag", "update:value"];
|
|
74
|
-
const useInit = (props2, emit, refTable, getLocale,
|
|
75
|
+
const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
|
|
75
76
|
var _a, _b;
|
|
76
77
|
const loading = ref(false);
|
|
77
78
|
const mpagconfig = {
|
|
@@ -205,7 +206,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
205
206
|
paginat.cross = pagin.cross || false;
|
|
206
207
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
207
208
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
208
|
-
tableConfig.value = config;
|
|
209
|
+
tableConfig.value = unmergeObject(defaultConfig, config, 2);
|
|
209
210
|
};
|
|
210
211
|
watch(
|
|
211
212
|
[() => props2.configs, () => props2.config, () => props2.list],
|
|
@@ -230,13 +231,6 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
230
231
|
});
|
|
231
232
|
return obj;
|
|
232
233
|
});
|
|
233
|
-
const istype = computed(() => {
|
|
234
|
-
if (isEl) {
|
|
235
|
-
return true;
|
|
236
|
-
} else {
|
|
237
|
-
return tableConfig.value.type == 1;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
234
|
function setCrossPage() {
|
|
241
235
|
const v = data.current;
|
|
242
236
|
console.log("v", v);
|
|
@@ -426,7 +420,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
426
420
|
}
|
|
427
421
|
function empty() {
|
|
428
422
|
var _a2, _b2, _c, _d;
|
|
429
|
-
if (
|
|
423
|
+
if (tableConfig.value.type == 1 && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
430
424
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
431
425
|
}
|
|
432
426
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale);
|
|
48
48
|
__expose({
|
|
49
49
|
getRef,
|
|
50
50
|
getSelection,
|
|
@@ -46,7 +46,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
onCurrentChange,
|
|
47
47
|
paginat,
|
|
48
48
|
data: data$1
|
|
49
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
49
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
50
|
+
config: {
|
|
51
|
+
isdrag: true
|
|
52
|
+
}
|
|
53
|
+
});
|
|
50
54
|
__expose({
|
|
51
55
|
getSelection,
|
|
52
56
|
getRef,
|
|
@@ -44,7 +44,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data
|
|
47
|
-
} = useInit(props, emit, refTable, getLocale,
|
|
47
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
config: {
|
|
49
|
+
isdrag: true
|
|
50
|
+
}
|
|
51
|
+
});
|
|
48
52
|
__expose({
|
|
49
53
|
getSelection,
|
|
50
54
|
getRef,
|
|
@@ -44,7 +44,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
paginat,
|
|
45
45
|
scroll,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
type: 1
|
|
49
|
+
});
|
|
48
50
|
__expose({
|
|
49
51
|
getSelection,
|
|
50
52
|
getRef,
|
|
@@ -46,7 +46,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
scroll,
|
|
47
47
|
sortable,
|
|
48
48
|
data: data$1
|
|
49
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
49
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
50
|
+
type: 1,
|
|
51
|
+
config: {
|
|
52
|
+
isdrag: true
|
|
53
|
+
}
|
|
54
|
+
});
|
|
50
55
|
__expose({
|
|
51
56
|
getSelection,
|
|
52
57
|
getRef,
|
|
@@ -44,7 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
scroll,
|
|
45
45
|
sortable,
|
|
46
46
|
data
|
|
47
|
-
} = useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
type: 1,
|
|
49
|
+
config: {
|
|
50
|
+
isdrag: true
|
|
51
|
+
}
|
|
52
|
+
});
|
|
48
53
|
__expose({
|
|
49
54
|
getSelection,
|
|
50
55
|
getRef,
|
package/dist/css/index.css
CHANGED
|
@@ -1882,32 +1882,4 @@
|
|
|
1882
1882
|
}
|
|
1883
1883
|
.tablesvp-paginat .el-pagination {
|
|
1884
1884
|
justify-content: flex-end;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
.tablesvpd {
|
|
1888
|
-
width: 100%;
|
|
1889
|
-
height: var(--tablesvpd-height);
|
|
1890
|
-
display: flex;
|
|
1891
|
-
flex-direction: column;
|
|
1892
|
-
}
|
|
1893
|
-
.tablesvpd-main {
|
|
1894
|
-
display: flex;
|
|
1895
|
-
flex-direction: column;
|
|
1896
|
-
flex: 1;
|
|
1897
|
-
width: 100%;
|
|
1898
|
-
}
|
|
1899
|
-
.tablesvpd-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1900
|
-
display: none;
|
|
1901
|
-
}
|
|
1902
|
-
.tablesvpd-main.is-scroll .v-scroll-add {
|
|
1903
|
-
text-align: center;
|
|
1904
|
-
padding: 10px;
|
|
1905
|
-
color: #999;
|
|
1906
|
-
background-color: #eee;
|
|
1907
|
-
}
|
|
1908
|
-
.tablesvpd-paginat {
|
|
1909
|
-
overflow: hidden;
|
|
1910
|
-
}
|
|
1911
|
-
.tablesvpd-paginat .el-pagination {
|
|
1912
|
-
justify-content: flex-end;
|
|
1913
1885
|
}
|
package/dist/icons/index.json
CHANGED
package/dist/index.css
CHANGED
|
@@ -1882,32 +1882,4 @@
|
|
|
1882
1882
|
}
|
|
1883
1883
|
.tablesvp-paginat .el-pagination {
|
|
1884
1884
|
justify-content: flex-end;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
.tablesvpd {
|
|
1888
|
-
width: 100%;
|
|
1889
|
-
height: var(--tablesvpd-height);
|
|
1890
|
-
display: flex;
|
|
1891
|
-
flex-direction: column;
|
|
1892
|
-
}
|
|
1893
|
-
.tablesvpd-main {
|
|
1894
|
-
display: flex;
|
|
1895
|
-
flex-direction: column;
|
|
1896
|
-
flex: 1;
|
|
1897
|
-
width: 100%;
|
|
1898
|
-
}
|
|
1899
|
-
.tablesvpd-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1900
|
-
display: none;
|
|
1901
|
-
}
|
|
1902
|
-
.tablesvpd-main.is-scroll .v-scroll-add {
|
|
1903
|
-
text-align: center;
|
|
1904
|
-
padding: 10px;
|
|
1905
|
-
color: #999;
|
|
1906
|
-
background-color: #eee;
|
|
1907
|
-
}
|
|
1908
|
-
.tablesvpd-paginat {
|
|
1909
|
-
overflow: hidden;
|
|
1910
|
-
}
|
|
1911
|
-
.tablesvpd-paginat .el-pagination {
|
|
1912
|
-
justify-content: flex-end;
|
|
1913
1885
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fangzhongya/fang-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.34",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description ": "fang-ui",
|
|
7
7
|
"keywords": [
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"vue-tsc": "^3.1.4",
|
|
52
52
|
"vxe-table": "4.6.20",
|
|
53
53
|
"@fang-ui/components": "0.0.1-0",
|
|
54
|
+
"@fang-ui/icons": "0.0.1-0",
|
|
54
55
|
"@fang-ui/directives": "0.0.1-0",
|
|
55
56
|
"@fang-ui/hooks": "0.0.1-0",
|
|
56
|
-
"@fang-ui/icons": "0.0.1-0",
|
|
57
57
|
"@fang-ui/locale": "0.0.1-0",
|
|
58
58
|
"@fang-ui/theme": "0.0.1-0",
|
|
59
|
-
"@fang-ui/
|
|
60
|
-
"@fang-ui/
|
|
59
|
+
"@fang-ui/types": "0.0.1-0",
|
|
60
|
+
"@fang-ui/utils": "0.0.1-0"
|
|
61
61
|
},
|
|
62
62
|
"main": "./dist/index.cjs",
|
|
63
63
|
"module": "./dist/index.js",
|
|
File without changes
|
|
File without changes
|