@fangzhongya/fang-ui 0.1.36 → 0.1.38
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/box-adjust/src/data.cjs +2 -2
- package/dist/components/box-adjust/src/data.d.ts +2 -2
- package/dist/components/box-adjust/src/data.js +2 -2
- package/dist/components/buttons/src/data.cjs +8 -4
- package/dist/components/buttons/src/data.d.ts +33 -4
- package/dist/components/buttons/src/data.js +8 -4
- package/dist/components/buttons/src/index2.cjs +12 -2
- package/dist/components/buttons/src/index2.js +14 -4
- package/dist/components/common/use.cjs +5 -3
- package/dist/components/common/use.js +5 -3
- package/dist/components/dates2/src/data.cjs +1 -1
- package/dist/components/dates2/src/data.d.ts +1 -1
- package/dist/components/dates2/src/data.js +1 -1
- package/dist/components/double/index.css +2 -1
- package/dist/components/double/index.scss +2 -1
- package/dist/components/forms/index.css +2 -1
- package/dist/components/forms/src/setup.cjs +8 -23
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +11 -26
- package/dist/components/forms/src/util.cjs +85 -17
- package/dist/components/forms/src/util.d.ts +2 -1
- package/dist/components/forms/src/util.js +87 -19
- package/dist/components/list/index.css +1 -1
- package/dist/components/list/index.scss +1 -1
- package/dist/components/list/src/data.cjs +3 -0
- package/dist/components/list/src/data.d.ts +3 -0
- package/dist/components/list/src/data.js +3 -0
- package/dist/components/list/src/index2.cjs +18 -13
- package/dist/components/list/src/index2.js +16 -11
- package/dist/components/list/src/util.cjs +12 -2
- package/dist/components/list/src/util.d.ts +1 -0
- package/dist/components/list/src/util.js +12 -2
- package/dist/components/list/style/index2.scss +1 -0
- package/dist/components/lists/index.css +1 -1
- package/dist/components/lists/src/data.d.ts +3 -3
- package/dist/components/lists/src/index2.cjs +9 -9
- package/dist/components/lists/src/index2.js +9 -9
- package/dist/components/listsp/index.css +1 -1
- package/dist/components/listspd/index.css +1 -1
- package/dist/components/no-data/src/data.cjs +2 -2
- package/dist/components/no-data/src/data.d.ts +2 -2
- package/dist/components/no-data/src/data.js +2 -2
- package/dist/components/no-data/src/index2.cjs +2 -2
- package/dist/components/no-data/src/index2.js +2 -2
- package/dist/components/page/index.css +3 -2
- package/dist/components/selector/index.css +2 -1
- package/dist/components/tables/common/com-but.cjs +4 -0
- package/dist/components/tables/common/com-but.js +4 -0
- package/dist/components/tables/common/{table-but2.cjs → com-but2.cjs} +17 -13
- package/dist/components/tables/common/{table-but2.js → com-but2.js} +14 -10
- package/dist/components/tables/common/com-color.cjs +4 -0
- package/dist/components/tables/common/com-color.js +4 -0
- package/dist/components/tables/common/{table-color2.cjs → com-color2.cjs} +21 -8
- package/dist/components/tables/common/{table-color2.js → com-color2.js} +23 -10
- package/dist/components/tables/common/com-fig.cjs +4 -0
- package/dist/components/tables/common/com-fig.js +4 -0
- package/dist/components/tables/common/com-fig2.cjs +92 -0
- package/dist/components/tables/common/com-fig2.js +92 -0
- package/dist/components/tables/common/com-lis.cjs +4 -0
- package/dist/components/tables/common/com-lis.js +4 -0
- package/dist/components/tables/common/com-lis2.cjs +151 -0
- package/dist/components/tables/common/com-lis2.js +151 -0
- package/dist/components/tables/common/pagin.d.ts +14 -6
- package/dist/components/tables/common/util.cjs +12 -0
- package/dist/components/tables/common/util.d.ts +1 -0
- package/dist/components/tables/common/util.js +12 -0
- package/dist/components/tables/src/column.cjs +5 -2
- package/dist/components/tables/src/column.js +6 -3
- package/dist/components/tables/src/columns2.cjs +9 -7
- package/dist/components/tables/src/columns2.js +9 -7
- package/dist/components/tables/src/data.d.ts +3 -3
- package/dist/components/tables/style/index2.scss +1 -0
- package/dist/components/tablesv/src/column.cjs +7 -4
- package/dist/components/tablesv/src/column.js +8 -5
- package/dist/components/tablesv/src/columns2.cjs +9 -7
- package/dist/components/tablesv/src/columns2.js +9 -7
- package/dist/components/tablesv/src/data.d.ts +3 -3
- package/dist/components/tablesv/src/index2.cjs +10 -1
- package/dist/components/tablesv/src/index2.js +10 -1
- package/dist/components/window/src/data.cjs +1 -1
- package/dist/components/window/src/data.d.ts +1 -1
- package/dist/components/window/src/data.js +1 -1
- package/dist/css/double.css +2 -1
- package/dist/css/forms.css +2 -1
- package/dist/css/index.css +3 -2
- package/dist/css/list.css +1 -1
- package/dist/css/lists.css +1 -1
- package/dist/css/listsp.css +1 -1
- package/dist/css/listspd.css +1 -1
- package/dist/css/page.css +3 -2
- package/dist/css/selector.css +2 -1
- package/dist/icons/index.json +1 -1
- package/dist/index.css +3 -2
- package/dist/type.d.ts +12 -3
- package/package.json +2 -2
- package/dist/components/tables/common/img.cjs +0 -4
- package/dist/components/tables/common/img.js +0 -4
- package/dist/components/tables/common/img2.cjs +0 -37
- package/dist/components/tables/common/img2.js +0 -37
- package/dist/components/tables/common/table-but.cjs +0 -4
- package/dist/components/tables/common/table-but.js +0 -4
- package/dist/components/tables/common/table-color.cjs +0 -4
- package/dist/components/tables/common/table-color.js +0 -4
- package/dist/components/tables/common/table-list.cjs +0 -4
- package/dist/components/tables/common/table-list.js +0 -4
- package/dist/components/tables/common/table-list2.cjs +0 -125
- package/dist/components/tables/common/table-list2.js +0 -125
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
- /package/dist/components/{draggable → keep-com}/index.css +0 -0
- /package/dist/css/{forms-items.css → forms-item.css} +0 -0
- /package/dist/css/{draggable.css → keep-com.css} +0 -0
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, normalizeStyle, normalizeClass, toDisplayString } from "vue";
|
|
2
|
-
import { eventAliass } from "./util.js";
|
|
3
|
-
import { isObject } from "@fangzhongya/utils/basic/object/isObject";
|
|
4
|
-
import { isArray } from "@fangzhongya/utils/basic/array/isArray";
|
|
5
|
-
const _hoisted_1 = ["onClick"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "table-list",
|
|
8
|
-
props: {
|
|
9
|
-
/**
|
|
10
|
-
* table列表
|
|
11
|
-
* {
|
|
12
|
-
* label:"列表名称"
|
|
13
|
-
* prop:"列表取值"
|
|
14
|
-
* type:"列表类型"
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
tableListObj: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default() {
|
|
21
|
-
return {};
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
/**
|
|
25
|
-
* table数据
|
|
26
|
-
* row, column, $index
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
tableScope: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default() {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ["scope-click"],
|
|
37
|
-
setup(__props, { emit: __emit }) {
|
|
38
|
-
const props = __props;
|
|
39
|
-
const emit = __emit;
|
|
40
|
-
function setValue(v) {
|
|
41
|
-
if (isArray(v)) {
|
|
42
|
-
return v;
|
|
43
|
-
} else if (isObject(v)) {
|
|
44
|
-
return [v];
|
|
45
|
-
} else {
|
|
46
|
-
return [
|
|
47
|
-
{
|
|
48
|
-
value: v
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function getValue(row, column, cellValue, index, formatter) {
|
|
54
|
-
if (formatter) {
|
|
55
|
-
const v = formatter(row, column, cellValue, index);
|
|
56
|
-
return setValue(v);
|
|
57
|
-
} else {
|
|
58
|
-
return setValue(cellValue);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const valueArr = computed(() => {
|
|
62
|
-
var _a;
|
|
63
|
-
const prop = props.tableListObj.prop || "";
|
|
64
|
-
const row = props.tableScope.row || {};
|
|
65
|
-
const column = props.tableScope.column || {};
|
|
66
|
-
const cellValue = row[prop];
|
|
67
|
-
const index = props.tableScope.$index;
|
|
68
|
-
const formatter = props.tableListObj.formatter;
|
|
69
|
-
const configFormatter = (_a = props.tableListObj.config) == null ? void 0 : _a.formatter;
|
|
70
|
-
if (configFormatter) {
|
|
71
|
-
const arr = configFormatter(row, column, cellValue, index);
|
|
72
|
-
return setValue(arr);
|
|
73
|
-
} else {
|
|
74
|
-
return getValue(row, column, cellValue, index, formatter);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
function onClick($event) {
|
|
78
|
-
let obj = valueArr.value;
|
|
79
|
-
eventAliass(
|
|
80
|
-
(callback) => {
|
|
81
|
-
callback(obj, props.tableScope, props.tableListObj, "list-li");
|
|
82
|
-
},
|
|
83
|
-
"click",
|
|
84
|
-
props.tableListObj,
|
|
85
|
-
$event
|
|
86
|
-
);
|
|
87
|
-
emit("scope-click", obj, props.tableScope, props.tableListObj, "list");
|
|
88
|
-
}
|
|
89
|
-
function onClickList(obj, $event) {
|
|
90
|
-
eventAliass(
|
|
91
|
-
(callback) => {
|
|
92
|
-
callback(obj, props.tableScope, props.tableListObj, "list-li");
|
|
93
|
-
},
|
|
94
|
-
"click",
|
|
95
|
-
obj,
|
|
96
|
-
$event
|
|
97
|
-
);
|
|
98
|
-
emit(
|
|
99
|
-
"scope-click",
|
|
100
|
-
obj,
|
|
101
|
-
props.tableScope,
|
|
102
|
-
props.tableListObj,
|
|
103
|
-
"list-li"
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
return (_ctx, _cache) => {
|
|
107
|
-
return openBlock(), createElementBlock("span", {
|
|
108
|
-
onClick: _cache[0] || (_cache[0] = ($event) => onClick($event)),
|
|
109
|
-
class: "table-list"
|
|
110
|
-
}, [
|
|
111
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(valueArr.value, (item, index) => {
|
|
112
|
-
return openBlock(), createElementBlock("span", {
|
|
113
|
-
class: normalizeClass(["table-list-li", item.class]),
|
|
114
|
-
key: index,
|
|
115
|
-
onClick: ($event) => onClickList(item, $event),
|
|
116
|
-
style: normalizeStyle(item.style)
|
|
117
|
-
}, toDisplayString(item.value), 15, _hoisted_1);
|
|
118
|
-
}), 128))
|
|
119
|
-
]);
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
export {
|
|
124
|
-
_sfc_main as default
|
|
125
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|