map
This commit is contained in:
parent
ef100bbb52
commit
d223741f4c
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-dialog": "../../miniprogram_npm/lin-ui/dialog/index",
|
||||
"l-button": "../../miniprogram_npm/lin-ui/button/index",
|
||||
"popover": "../../miniprogram_npm/popover/popover",
|
||||
"popover-item": "../../miniprogram_npm/popover/popover-item"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-dialog": "../../miniprogram_npm/lin-ui/dialog/index",
|
||||
"l-button": "../../miniprogram_npm/lin-ui/button/index",
|
||||
"popover": "../../miniprogram_npm/popover/popover",
|
||||
"popover-item": "../../miniprogram_npm/popover/popover-item"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"oak-icon": "../../icon/index",
|
||||
"l-dialog": "../../miniprogram_npm/lin-ui/dialog/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-dialog": "../../miniprogram_npm/lin-ui/dialog/index",
|
||||
"l-button": "../../miniprogram_npm/lin-ui/button/index",
|
||||
"popover": "../../miniprogram_npm/popover/popover",
|
||||
"popover-item": "../../miniprogram_npm/popover/popover-item"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("../..").ReactComponentProps<true, {
|
||||
entity: StringConstructor;
|
||||
multiple: BooleanConstructor;
|
||||
onSelect: FunctionConstructor;
|
||||
title: FunctionConstructor;
|
||||
titleLabel: StringConstructor;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = OakComponent({
|
||||
entity: function () {
|
||||
var entity = this.props.entity;
|
||||
return entity;
|
||||
},
|
||||
formData: function (_a) {
|
||||
var _b = _a.data, data = _b === void 0 ? [] : _b;
|
||||
var title = this.props.title;
|
||||
return {
|
||||
rows: data.map(function (ele) { return ({
|
||||
id: ele.id,
|
||||
title: title(ele)
|
||||
}); }),
|
||||
};
|
||||
},
|
||||
isList: true,
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
properties: {
|
||||
entity: String,
|
||||
multiple: Boolean,
|
||||
onSelect: Function,
|
||||
title: Function,
|
||||
titleLabel: String,
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
export default function Render(props: WebComponentProps<ED, keyof ED, false, {
|
||||
entity: string;
|
||||
rows: ED[keyof ED]['Schema'][];
|
||||
projection: Record<string, any>;
|
||||
onSelect: (rows: ED[keyof ED]['Schema'][]) => void;
|
||||
multiple: boolean;
|
||||
titleLabel: string;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
function Render(props) {
|
||||
var _a = props.data, oakLoading = _a.oakLoading, rows = _a.rows, onSelect = _a.onSelect, titleLabel = _a.titleLabel, _b = _a.multiple, multiple = _b === void 0 ? false : _b;
|
||||
var t = props.methods.t;
|
||||
var columns = [{
|
||||
dataIndex: 'title',
|
||||
title: titleLabel,
|
||||
}];
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, dataSource: rows, rowKey: "id", rowSelection: {
|
||||
type: multiple ? 'checkbox' : 'radio',
|
||||
// onSelect: (record) => {
|
||||
// onSelect(record);
|
||||
// },
|
||||
onChange: function (selectedRowKeys, selectedRows, info) {
|
||||
onSelect(selectedRows);
|
||||
},
|
||||
}, onRow: !multiple ? function (record) {
|
||||
return {
|
||||
onClick: function (event) {
|
||||
onSelect([record]);
|
||||
}, // 点击行
|
||||
};
|
||||
} : undefined, columns: columns }) }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
{
|
||||
"placeholder": {
|
||||
"input": "请输入",
|
||||
"select": "请选择"
|
||||
},
|
||||
"attr": {
|
||||
"id": "编号",
|
||||
"$$createAt$$": "创建时间",
|
||||
"$$updateAt$$": "更新时间",
|
||||
"$$deleteAt$$": "删除时间",
|
||||
"$$seq$$": "序号",
|
||||
"$text": "全文检索"
|
||||
},
|
||||
"tip": {
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"unselected": "未选"
|
||||
},
|
||||
"op": {
|
||||
"$includes": "包含"
|
||||
}
|
||||
}
|
||||
|
|
@ -264,10 +264,10 @@ function Render(props) {
|
|||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
if (op && ['$in', '$nin'].includes(op)) {
|
||||
V = ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: true, entityIds: _value, pickerDef: column.refProps, onChange: function (ids) { console.log(ids, '这里等测试到了再写(Xc)'); } }));
|
||||
V = ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: true, entityIds: _value, pickerRender: column.refProps, onChange: function (ids) { console.log(ids, '这里等测试到了再写(Xc)'); } }));
|
||||
}
|
||||
else {
|
||||
V = ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: false, entityIds: _value, pickerDef: column.refProps, onChange: function (id) { console.log(id, '这里等测试到了再写(Xc)'); } }));
|
||||
V = ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: false, entityIds: _value, pickerRender: column.refProps, onChange: function (id) { console.log(id, '这里等测试到了再写(Xc)'); } }));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("../..").ReactComponentProps<true, {
|
||||
entity: StringConstructor;
|
||||
column: ObjectConstructor;
|
||||
formItem: BooleanConstructor;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var relation_1 = require("oak-domain/lib/store/relation");
|
||||
var utils_1 = require("../filter/utils");
|
||||
exports.default = OakComponent({
|
||||
entity: function () {
|
||||
var entity = this.props.entity;
|
||||
return entity;
|
||||
},
|
||||
isList: true,
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
properties: {
|
||||
entity: String,
|
||||
column: Object,
|
||||
formItem: Boolean,
|
||||
},
|
||||
methods: {
|
||||
getNamedFilter: function (name) {
|
||||
if (this.state.oakFullpath) {
|
||||
var filter = this.getFilterByName(name);
|
||||
return filter;
|
||||
}
|
||||
},
|
||||
getRefByAttr: function (entity, field) {
|
||||
if (!this.state.oakFullpath) {
|
||||
return;
|
||||
}
|
||||
var dataSchema = this.features.cache.getSchema();
|
||||
var attrs = field.split('.');
|
||||
var idx = 0;
|
||||
var _entity = entity;
|
||||
var attr;
|
||||
var attrType;
|
||||
var attribute;
|
||||
var entityI18n = entity;
|
||||
var attrI18n;
|
||||
while (idx <= attrs.length - 1) {
|
||||
attr = attrs[idx];
|
||||
attrI18n = attr;
|
||||
var relation = (0, relation_1.judgeRelation)(dataSchema, _entity, attr);
|
||||
if (relation === 1) {
|
||||
var attributes = (0, utils_1.getAttributes)(dataSchema[_entity].attributes);
|
||||
attribute = attributes[attr];
|
||||
attrType = attribute.type;
|
||||
if (attrType === 'ref') {
|
||||
attrI18n = attribute.ref;
|
||||
}
|
||||
}
|
||||
else if (relation === 2) {
|
||||
// entity entityId
|
||||
var ref = attr;
|
||||
_entity = ref;
|
||||
entityI18n = ref;
|
||||
}
|
||||
else if (typeof relation === 'string') {
|
||||
var ref = relation;
|
||||
_entity = ref;
|
||||
entityI18n = ref;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return {
|
||||
entity: _entity,
|
||||
attr: attr,
|
||||
attrType: attrType,
|
||||
entityI18n: entityI18n,
|
||||
attrI18n: attrI18n,
|
||||
attribute: attribute,
|
||||
};
|
||||
},
|
||||
getEntityData: function (entity, ids) {
|
||||
var _a;
|
||||
var column = this.props.column;
|
||||
var projection = ((_a = column === null || column === void 0 ? void 0 : column.refProps) === null || _a === void 0 ? void 0 : _a.projection) || { id: 1, name: 1 };
|
||||
var entityData = this.features.cache.get(entity, {
|
||||
data: projection,
|
||||
filter: {
|
||||
id: {
|
||||
$in: ids,
|
||||
},
|
||||
},
|
||||
}, true);
|
||||
return entityData;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
{
|
||||
"placeholder": {
|
||||
"input": "请输入",
|
||||
"select": "请选择"
|
||||
},
|
||||
"attr": {
|
||||
"id": "编号",
|
||||
"$$createAt$$": "创建时间",
|
||||
"$$updateAt$$": "更新时间",
|
||||
"$$deleteAt$$": "删除时间",
|
||||
"$$seq$$": "序号"
|
||||
},
|
||||
"closed": "关闭",
|
||||
"select": "请选择"
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
import { ColumnProps } from '../../types/Filter';
|
||||
export default function Render<ED2 extends ED>(props: WebComponentProps<ED, keyof ED, false, {
|
||||
entity: keyof ED2;
|
||||
column: ColumnProps<ED2, keyof ED2>;
|
||||
onSearch: () => void;
|
||||
formItem: boolean;
|
||||
}, {
|
||||
getNamedFilter: (name: string) => Record<string, any>;
|
||||
getRefByAttr: <T extends keyof ED2>(entity: T, attr: keyof ED2[T]['OpSchema']) => {
|
||||
entity: keyof ED2;
|
||||
attr: string;
|
||||
attrType: string;
|
||||
entityI18n: keyof ED2;
|
||||
attrI18n: string;
|
||||
attribute: Record<string, any>;
|
||||
};
|
||||
getEntityData: (entity: keyof ED2, ids: string[]) => ED2[keyof ED2]['Schema'][];
|
||||
}>): JSX.Element | null;
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = require("react");
|
||||
var antd_1 = require("antd");
|
||||
var icons_1 = require("@ant-design/icons");
|
||||
var utils_1 = require("../filter/utils");
|
||||
var picker_1 = tslib_1.__importDefault(require("../picker"));
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var assert_1 = require("oak-domain/lib/utils/assert");
|
||||
function Render(props) {
|
||||
var _a = props.data, onSearch = _a.onSearch, entity = _a.entity, oakFullpath = _a.oakFullpath, _b = _a.formItem, formItem = _b === void 0 ? true : _b, column = _a.column;
|
||||
var _c = props.methods, t = _c.t, refresh = _c.refresh, getNamedFilter = _c.getNamedFilter, removeNamedFilterByName = _c.removeNamedFilterByName, addNamedFilter = _c.addNamedFilter, getRefByAttr = _c.getRefByAttr, setMessage = _c.setMessage, getEntityData = _c.getEntityData;
|
||||
var _d = tslib_1.__read((0, react_1.useState)(false), 2), open = _d[0], setOpen = _d[1];
|
||||
var _e = tslib_1.__read((0, react_1.useState)([]), 2), selectRows = _e[0], setSelectRows = _e[1];
|
||||
var op = column.op, attr = column.attr, label = column.label, _f = column.transformValue, transformValue = _f === void 0 ? function (column, filter) { return (0, lodash_1.get)(filter, (0, utils_1.getOp)(column), ''); } : _f, _g = column.transformFilter, transformFilter = _g === void 0 ? function (column, value) { return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), value); } : _g, placeholder = column.placeholder, refProps = column.refProps;
|
||||
var name = (0, utils_1.getFilterName)(column);
|
||||
var filter = getNamedFilter(name);
|
||||
var params = getRefByAttr(entity, attr);
|
||||
if (!params) {
|
||||
return null;
|
||||
}
|
||||
var _value = transformValue(column, filter);
|
||||
var entity2 = params.entity, attr2 = params.attr, attrType = params.attrType, entityI18n = params.entityI18n, attrI18n = params.attrI18n, attribute = params.attribute;
|
||||
if (attribute.type !== 'ref') {
|
||||
(0, assert_1.assert)(false, "attr\u4E3A".concat(attr, "\uFF0C\u7C7B\u578B\u3010").concat(attribute.type, "\u3011\u4E0D\u662Fref"));
|
||||
return null;
|
||||
}
|
||||
var _label = '';
|
||||
if (label && label.indexOf(':') === -1) {
|
||||
_label = label;
|
||||
}
|
||||
else {
|
||||
_label = t("".concat(entityI18n, ":attr.").concat(attrI18n));
|
||||
}
|
||||
var inputKey = 'name';
|
||||
var projection = (refProps === null || refProps === void 0 ? void 0 : refProps.projection) || { id: 1, name: 1 };
|
||||
var modalProps = {};
|
||||
var rows = [];
|
||||
var multiple = !!op && ['$in', '$nin'].includes(op);
|
||||
if (!multiple) {
|
||||
modalProps = {
|
||||
footer: false,
|
||||
};
|
||||
rows = _value
|
||||
? getEntityData(attribute.ref, [_value])
|
||||
: [];
|
||||
}
|
||||
else {
|
||||
rows = _value
|
||||
? getEntityData(attribute.ref, _value)
|
||||
: [];
|
||||
}
|
||||
var _value2;
|
||||
if (rows.length > 0) {
|
||||
_value2 = rows.map(function (ele) { return ele[inputKey]; }).join('、');
|
||||
}
|
||||
var deleteFilter = function (interval) {
|
||||
removeNamedFilterByName(name);
|
||||
};
|
||||
var setFilterAndResetFilter = function (value, getFilter) {
|
||||
if (value === '' ||
|
||||
value === undefined ||
|
||||
value === null ||
|
||||
(value === null || value === void 0 ? void 0 : value.length) === 0) {
|
||||
removeNamedFilterByName(name);
|
||||
return;
|
||||
}
|
||||
var filter2 = typeof getFilter === 'function'
|
||||
? getFilter()
|
||||
: transformFilter(column, value);
|
||||
addNamedFilter({
|
||||
filter: filter2,
|
||||
'#name': name,
|
||||
});
|
||||
};
|
||||
var V = ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.select'), onClick: function () {
|
||||
setOpen(true);
|
||||
},
|
||||
// allowClear
|
||||
// onChange={() => {
|
||||
// deleteFilter();
|
||||
// }}
|
||||
value: _value2, readOnly: true, suffix: _value && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ onClick: function () {
|
||||
deleteFilter();
|
||||
setSelectRows([]);
|
||||
} }, { children: (0, jsx_runtime_1.jsx)(icons_1.CloseOutlined, { size: 14 }) }))) }) }));
|
||||
if (formItem) {
|
||||
V = (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: _label }, { children: V }));
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [V, (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: t('select'), centered: true, open: open, onOk: function () {
|
||||
if (selectRows.length === 0) {
|
||||
setMessage({
|
||||
type: 'warning',
|
||||
content: t('select'),
|
||||
});
|
||||
return;
|
||||
}
|
||||
var ids = selectRows.map(function (ele) { return ele.id; });
|
||||
setFilterAndResetFilter(ids);
|
||||
setOpen(false);
|
||||
}, cancelText: t('closed'), onCancel: function () { return setOpen(false); }, width: "50%", destroyOnClose: true }, modalProps, { children: (0, jsx_runtime_1.jsx)(picker_1.default, { multiple: multiple, oakAutoUnmount: true, oakProjection: projection, entity: attribute.ref, oakPath: "$foreignKeyFilter-entity/picker-".concat(entity), onSelect: function (rows) {
|
||||
setSelectRows(rows);
|
||||
if (!multiple) {
|
||||
var ids = rows.map(function (ele) { return ele.id; });
|
||||
setFilterAndResetFilter(ids[0]);
|
||||
setOpen(false);
|
||||
}
|
||||
} }) }))] }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.actionBox {
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-dialog": "../../miniprogram_npm/lin-ui/dialog/index",
|
||||
"l-button": "../../miniprogram_npm/lin-ui/button/index",
|
||||
"popover": "../../miniprogram_npm/popover/popover",
|
||||
"popover-item": "../../miniprogram_npm/popover/popover-item"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/// <reference types="react" />
|
||||
declare type LocationProps = {
|
||||
poiName?: string;
|
||||
coordinate?: [number, number];
|
||||
areaId?: string;
|
||||
};
|
||||
export default function Location(props: LocationProps): JSX.Element;
|
||||
export {};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var map_1 = tslib_1.__importDefault(require("../map"));
|
||||
function Location(props) {
|
||||
if (window.innerWidth < 500) {
|
||||
// 窄屏
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Row, tslib_1.__assign({ gutter: [16, 16] }, { children: (0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ xs: 24, sm: 14 }, { children: (0, jsx_runtime_1.jsx)(map_1.default, { center: props.coordinate, undragable: true, unzoomable: true }) })) })));
|
||||
}
|
||||
exports.default = Location;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/// <reference types="react" />
|
||||
import 'ol/ol.css';
|
||||
declare type MapProps = {
|
||||
center?: [number, number];
|
||||
zoom?: number;
|
||||
unzoomable?: boolean;
|
||||
undragable?: boolean;
|
||||
style?: object;
|
||||
autoLocate?: boolean;
|
||||
markers?: Array<[number, number]>;
|
||||
};
|
||||
export default function Map(props: MapProps): JSX.Element;
|
||||
export {};
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = require("react");
|
||||
var Map_1 = tslib_1.__importDefault(require("ol/Map"));
|
||||
var XYZ_1 = tslib_1.__importDefault(require("ol/source/XYZ"));
|
||||
var Tile_1 = tslib_1.__importDefault(require("ol/layer/Tile"));
|
||||
var View_1 = tslib_1.__importDefault(require("ol/View"));
|
||||
var proj_1 = require("ol/proj");
|
||||
var DragPan_1 = tslib_1.__importDefault(require("ol/interaction/DragPan"));
|
||||
require("ol/ol.css");
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
var locate_1 = require("../../../utils/locate");
|
||||
var prefix = Math.ceil(Math.random() * 1000);
|
||||
var DEFAULT_CENTER = [120.123, 30.259]; // 浙大玉泉
|
||||
var DEFAULT_ZOOM = 15;
|
||||
function Map(props) {
|
||||
var map;
|
||||
(0, react_1.useEffect)(function () {
|
||||
map = new Map_1.default({
|
||||
target: "map-".concat(prefix),
|
||||
layers: [
|
||||
new Tile_1.default({
|
||||
source: new XYZ_1.default({
|
||||
url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
|
||||
wrapX: false,
|
||||
}),
|
||||
}),
|
||||
],
|
||||
view: new View_1.default({
|
||||
center: (0, proj_1.fromLonLat)(props.center || DEFAULT_CENTER),
|
||||
zoom: props.zoom || DEFAULT_ZOOM,
|
||||
minZoom: props.unzoomable ? props.zoom : undefined,
|
||||
maxZoom: props.unzoomable ? props.zoom : undefined,
|
||||
}),
|
||||
controls: props.unzoomable ? [] : undefined,
|
||||
});
|
||||
if (props.undragable) {
|
||||
map.getInteractions().forEach(function (ele) {
|
||||
if (ele instanceof DragPan_1.default) {
|
||||
ele.setActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (props.autoLocate) {
|
||||
(0, locate_1.locate)().then(function (_a) {
|
||||
var latitude = _a.latitude, longitude = _a.longitude;
|
||||
map.getView().setCenter((0, proj_1.fromLonLat)([longitude, latitude]));
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
(0, react_1.useEffect)(function () {
|
||||
if (props.center) {
|
||||
map && map.getView().setCenter((0, proj_1.fromLonLat)(props.center));
|
||||
}
|
||||
}, [props.center]);
|
||||
(0, react_1.useEffect)(function () {
|
||||
if (props.markers) {
|
||||
var markerLayer = map.getLayers().get('markerLayer');
|
||||
if (!markerLayer) {
|
||||
// todo
|
||||
}
|
||||
}
|
||||
}, [props.markers]);
|
||||
return (0, jsx_runtime_1.jsx)("div", { id: "map-".concat(prefix), className: web_module_less_1.default.map, style: props.style });
|
||||
}
|
||||
exports.default = Map;
|
||||
;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
.map {
|
||||
height: 400px;
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("../..").ReactComponentProps<true, {
|
||||
entity: StringConstructor;
|
||||
column: ObjectConstructor;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var relation_1 = require("oak-domain/lib/store/relation");
|
||||
var utils_1 = require("./utils");
|
||||
exports.default = OakComponent({
|
||||
entity: function () {
|
||||
var entity = this.props.entity;
|
||||
return entity;
|
||||
},
|
||||
isList: true,
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
properties: {
|
||||
entity: String,
|
||||
column: Object,
|
||||
},
|
||||
methods: {
|
||||
getNamedFilter: function (name) {
|
||||
if (this.state.oakFullpath) {
|
||||
var filter = this.getFilterByName(name);
|
||||
return filter;
|
||||
}
|
||||
},
|
||||
getRefByAttr: function (entity, field) {
|
||||
if (!this.state.oakFullpath) {
|
||||
return;
|
||||
}
|
||||
var dataSchema = this.features.cache.getSchema();
|
||||
var attrs = field.split('.');
|
||||
var idx = 0;
|
||||
var _entity = entity;
|
||||
var attr;
|
||||
var attrType;
|
||||
var attribute;
|
||||
var entityI18n = entity;
|
||||
var attrI18n;
|
||||
while (idx <= attrs.length - 1) {
|
||||
attr = attrs[idx];
|
||||
attrI18n = attr;
|
||||
if (attr.startsWith('$text')) {
|
||||
// 全文的话
|
||||
attrType = '$text';
|
||||
}
|
||||
else {
|
||||
var relation = (0, relation_1.judgeRelation)(dataSchema, _entity, attr);
|
||||
if (relation === 1) {
|
||||
var attributes = (0, utils_1.getAttributes)(dataSchema[_entity].attributes);
|
||||
attribute = attributes[attr];
|
||||
attrType = attribute.type;
|
||||
if (attrType === 'ref') {
|
||||
attrI18n = attribute.ref;
|
||||
}
|
||||
}
|
||||
else if (relation === 2) {
|
||||
// entity entityId
|
||||
var ref = attr;
|
||||
_entity = ref;
|
||||
entityI18n = ref;
|
||||
}
|
||||
else if (typeof relation === 'string') {
|
||||
var ref = relation;
|
||||
_entity = ref;
|
||||
entityI18n = ref;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return {
|
||||
entity: _entity,
|
||||
attr: attr,
|
||||
attrType: attrType,
|
||||
entityI18n: entityI18n,
|
||||
attrI18n: attrI18n,
|
||||
attribute: attribute,
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
import { ColumnProps, Ops } from './column';
|
||||
export declare function getOp(column: ColumnProps): string;
|
||||
export declare function getOp2(column: ColumnProps, op: Ops): string;
|
||||
export declare function getFilterName(column: ColumnProps): string;
|
||||
export declare function getAttributes(attributes: Record<string, any>): Record<string, any> & {
|
||||
id: {
|
||||
type: string;
|
||||
};
|
||||
$$createAt$$: {
|
||||
type: string;
|
||||
};
|
||||
$$updateAt$$: {
|
||||
type: string;
|
||||
};
|
||||
$$deleteAt$$: {
|
||||
type: string;
|
||||
};
|
||||
$$seq$$: {
|
||||
type: string;
|
||||
};
|
||||
};
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getAttributes = exports.getFilterName = exports.getOp2 = exports.getOp = void 0;
|
||||
function getOp(column) {
|
||||
return "".concat(column.attr).concat(column.op ? ".".concat(column.op) : '');
|
||||
}
|
||||
exports.getOp = getOp;
|
||||
function getOp2(column, op) {
|
||||
return "".concat(column.attr).concat(column.op || op ? ".".concat(column.op || op) : '');
|
||||
}
|
||||
exports.getOp2 = getOp2;
|
||||
function getFilterName(column) {
|
||||
return column.filterName || getOp(column);
|
||||
}
|
||||
exports.getFilterName = getFilterName;
|
||||
function getAttributes(attributes) {
|
||||
return Object.assign({}, attributes, {
|
||||
id: {
|
||||
type: 'char',
|
||||
},
|
||||
$$createAt$$: {
|
||||
type: 'datetime',
|
||||
},
|
||||
$$updateAt$$: {
|
||||
type: 'datetime',
|
||||
},
|
||||
$$deleteAt$$: {
|
||||
type: 'datetime',
|
||||
},
|
||||
$$seq$$: {
|
||||
type: 'datetime',
|
||||
},
|
||||
});
|
||||
}
|
||||
exports.getAttributes = getAttributes;
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
import { ColumnProps } from './column';
|
||||
export default function Render(props: WebComponentProps<ED, keyof ED, false, {
|
||||
entity: keyof ED;
|
||||
column: ColumnProps;
|
||||
searchValue: string;
|
||||
onSearch: () => void;
|
||||
}, {
|
||||
getNamedFilter: (name: string) => Record<string, any>;
|
||||
getRefByAttr: (entity: keyof ED, attr: string) => {
|
||||
entity: keyof ED;
|
||||
attr: string;
|
||||
attrType: string;
|
||||
entityI18n: keyof ED;
|
||||
attrI18n: string;
|
||||
attribute: Record<string, any>;
|
||||
};
|
||||
}>): JSX.Element | null;
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var money_1 = require("oak-domain/lib/utils/money");
|
||||
var Entity_1 = require("oak-domain/lib/types/Entity");
|
||||
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
||||
var weekday_1 = tslib_1.__importDefault(require("dayjs/plugin/weekday"));
|
||||
var localeData_1 = tslib_1.__importDefault(require("dayjs/plugin/localeData"));
|
||||
dayjs_1.default.extend(weekday_1.default);
|
||||
dayjs_1.default.extend(localeData_1.default);
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var assert_1 = require("oak-domain/lib/utils/assert");
|
||||
var utils_1 = require("./utils");
|
||||
var foreignKeyFilter_1 = tslib_1.__importDefault(require("../foreignKeyFilter"));
|
||||
function Render(props) {
|
||||
var _a = props.data, entity = _a.entity, column = _a.column, oakFullpath = _a.oakFullpath;
|
||||
var _b = props.methods, t = _b.t, addNamedFilter = _b.addNamedFilter, removeNamedFilterByName = _b.removeNamedFilterByName, refresh = _b.refresh, getNamedFilter = _b.getNamedFilter, getRefByAttr = _b.getRefByAttr;
|
||||
var name = (0, utils_1.getFilterName)(column);
|
||||
var filter = getNamedFilter(name);
|
||||
var _c = column.type, type = _c === void 0 ? 'text' : _c, op = column.op, attr = column.attr, label = column.label, _d = column.transformValue, transformValue = _d === void 0 ? function (column, filter) { return (0, lodash_1.get)(filter, (0, utils_1.getOp)(column), ''); } : _d, _e = column.transformFilter, transformFilter = _e === void 0 ? function (column, value) { return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), value); } : _e, placeholder = column.placeholder;
|
||||
var params = getRefByAttr(entity, attr);
|
||||
if (!params) {
|
||||
return null;
|
||||
}
|
||||
var entity2 = params.entity, attr2 = params.attr, attrType = params.attrType, entityI18n = params.entityI18n, attrI18n = params.attrI18n, attribute = params.attribute;
|
||||
var _label = '';
|
||||
if (label && label.indexOf(':') === -1) {
|
||||
_label = label;
|
||||
}
|
||||
else if (['$text'].includes(attr2)) {
|
||||
_label = t("attr.".concat(attr2));
|
||||
}
|
||||
else if (Entity_1.initinctiveAttributes.includes(attr2)) {
|
||||
_label = t("attr.".concat(attr2));
|
||||
}
|
||||
else {
|
||||
_label = t("".concat(entityI18n, ":attr.").concat(attrI18n));
|
||||
}
|
||||
var deleteFilter = function (interval) {
|
||||
removeNamedFilterByName(name);
|
||||
};
|
||||
var setFilterAndResetFilter = function (value, getFilter) {
|
||||
if (value === '' ||
|
||||
value === undefined ||
|
||||
value === null ||
|
||||
(value === null || value === void 0 ? void 0 : value.length) === 0) {
|
||||
removeNamedFilterByName(name);
|
||||
return;
|
||||
}
|
||||
var filter2 = typeof getFilter === 'function'
|
||||
? getFilter()
|
||||
: transformFilter(column, value);
|
||||
addNamedFilter({
|
||||
filter: filter2,
|
||||
'#name': name,
|
||||
});
|
||||
};
|
||||
var V;
|
||||
if (attrType === '$text') {
|
||||
var ops = ['$search'];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
var _f = column.transformFilter, transformFilter_1 = _f === void 0 ? function (column, value) {
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp2)(column, '$search'), value);
|
||||
} : _f, _g = column.transformValue, transformValue_1 = _g === void 0 ? function (column, filter) { return (0, lodash_1.get)(filter, (0, utils_1.getOp2)(column, '$search'), ''); } : _g;
|
||||
var _value_1 = transformValue_1(column, filter);
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: _label }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.input'), value: _value_1, onChange: function (e) {
|
||||
var val = e.target.value;
|
||||
setFilterAndResetFilter(val, function () {
|
||||
return transformFilter_1(column, val);
|
||||
});
|
||||
}, allowClear: true, onPressEnter: function () { } }) }) })));
|
||||
}
|
||||
var _value = transformValue(column, filter);
|
||||
switch (attrType) {
|
||||
case 'money': {
|
||||
var ops = ['$eq', '$ne', '$gt', '$gte', '$lt', '$lte'];
|
||||
var moneyVal_1 = _value ? (0, money_1.ToYuan)(_value) : '';
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.input'), value: moneyVal_1, onChange: function (e) {
|
||||
var val = e.target.value;
|
||||
var val2 = /^(-?[1-9]\d*(\.\d*[1-9])?)|(-?0\.\d*[1-9])$/.test(val) ? (0, money_1.ToCent)(Number(val)) : moneyVal_1;
|
||||
setFilterAndResetFilter(val2);
|
||||
}, allowClear: true, onPressEnter: function () { } }));
|
||||
break;
|
||||
}
|
||||
case 'float': {
|
||||
var ops = ['$eq', '$ne', '$gt', '$gte', '$lt', '$lte'];
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.input'), value: _value, onChange: function (e) {
|
||||
var val = e.target.value;
|
||||
setFilterAndResetFilter(val);
|
||||
}, allowClear: true, onPressEnter: function () { } }));
|
||||
break;
|
||||
}
|
||||
case 'integer':
|
||||
case 'int': {
|
||||
var ops = ['$eq', '$ne', '$gt', '$gte', '$lt', '$lte'];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.input'), value: _value, onChange: function (e) {
|
||||
var val = e.target.value;
|
||||
setFilterAndResetFilter(val);
|
||||
}, allowClear: true, onPressEnter: function () { } }));
|
||||
break;
|
||||
}
|
||||
case 'char':
|
||||
case 'varchar': {
|
||||
var ops = [
|
||||
'$eq',
|
||||
'$ne',
|
||||
'$endsWith',
|
||||
'$includes',
|
||||
'$startsWith',
|
||||
];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: placeholder || t('placeholder.input'), value: _value, onChange: function (e) {
|
||||
var val = e.target.value;
|
||||
setFilterAndResetFilter(val);
|
||||
}, allowClear: true, onPressEnter: function () { } }));
|
||||
break;
|
||||
}
|
||||
case 'boolean': {
|
||||
var text2 = void 0;
|
||||
switch (_value) {
|
||||
case true: {
|
||||
text2 = t('tip.yes');
|
||||
break;
|
||||
}
|
||||
case false: {
|
||||
text2 = t('tip.no');
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
text2 = t('tip.unselected');
|
||||
break;
|
||||
}
|
||||
}
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () {
|
||||
var val;
|
||||
if (_value === true) {
|
||||
val = false;
|
||||
}
|
||||
else if (_value === false) {
|
||||
val = '';
|
||||
}
|
||||
else {
|
||||
val = true;
|
||||
}
|
||||
setFilterAndResetFilter(val);
|
||||
} }, { children: text2 })));
|
||||
break;
|
||||
}
|
||||
case 'enum': {
|
||||
var ops = ['$in', '$nin', '$eq', '$ne'];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
var enumeration = attribute === null || attribute === void 0 ? void 0 : attribute.enumeration;
|
||||
var selectProps = column.selectProps;
|
||||
var _h = selectProps || {}, options = _h.options, _j = _h.transformInOption, transformInOption = _j === void 0 ? function (option) { return (typeof option === 'object' ? option.value : option); } : _j, // 根据
|
||||
_k = _h.transformOutOption, // 根据
|
||||
transformOutOption = _k === void 0 ? function (option) { return (typeof option === 'object' ? option.label : option); } : _k;
|
||||
var options2 = options ||
|
||||
(enumeration === null || enumeration === void 0 ? void 0 : enumeration.map(function (ele) { return ({
|
||||
label: t("".concat(entityI18n, ":v.").concat(attrI18n, ".").concat(ele)),
|
||||
value: ele,
|
||||
}); }));
|
||||
if (op && ['$in', '$nin'].includes(op)) {
|
||||
var _l = column.transformValue, transformValue_2 = _l === void 0 ? function (column, filter) {
|
||||
return (0, lodash_1.get)(filter, (0, utils_1.getOp)(column), []);
|
||||
} : _l;
|
||||
var selectValue = transformValue_2(column, filter);
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Select, { mode: "multiple", allowClear: true, placeholder: placeholder || t('placeholder.select'), value: selectValue, onChange: function (value) {
|
||||
setFilterAndResetFilter(value);
|
||||
}, options: (options2 === null || options2 === void 0 ? void 0 : options2.length) > 0 ? options2 : [], onClear: function () {
|
||||
deleteFilter();
|
||||
} }));
|
||||
}
|
||||
else {
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.Select, { allowClear: true, placeholder: placeholder || t('placeholder.select'), value: _value, onChange: function (value) {
|
||||
setFilterAndResetFilter(value);
|
||||
}, options: (options2 === null || options2 === void 0 ? void 0 : options2.length) > 0 ? options2 : [], onClear: function () {
|
||||
deleteFilter();
|
||||
} }));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'datetime': {
|
||||
var dateProps = column.dateProps;
|
||||
var _m = dateProps || {}, _o = _m.range, range = _o === void 0 ? false : _o, _p = _m.showTime, showTime = _p === void 0 ? false : _p;
|
||||
var unitOfTime_1 = 'day';
|
||||
if (range) {
|
||||
var ops = ['$between'];
|
||||
(0, assert_1.assert)(op, '选择时间范围,算子必须传入');
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
var _q = column.transformValue, transformValue_3 = _q === void 0 ? function (column, filter) {
|
||||
return (0, lodash_1.get)(filter, "".concat((0, utils_1.getOp)(column)), []);
|
||||
} : _q, _r = column.transformFilter, transformFilter_2 = _r === void 0 ? function (column, value) {
|
||||
var startTime = (0, dayjs_1.default)(value[0])
|
||||
.startOf(unitOfTime_1)
|
||||
.valueOf();
|
||||
var endTime = (0, dayjs_1.default)(value[1])
|
||||
.endOf(unitOfTime_1)
|
||||
.valueOf();
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), [startTime, endTime]);
|
||||
} : _r;
|
||||
var dateValues = transformValue_3(column, filter);
|
||||
var _s = tslib_1.__read(dateValues, 2), startTime = _s[0], endTIme = _s[1];
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.DatePicker.RangePicker, { showTime: showTime, value: [
|
||||
startTime ? (0, dayjs_1.default)(startTime) : '',
|
||||
endTIme ? (0, dayjs_1.default)(endTIme) : '',
|
||||
], onChange: function (dates, dateStrings) {
|
||||
setFilterAndResetFilter(dates, function () {
|
||||
return transformFilter_2(column, dates);
|
||||
});
|
||||
} }));
|
||||
}
|
||||
else {
|
||||
var ops = ['$between', '$gt', '$gte', '$lt', '$lte'];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
var _t = column.transformFilter, transformFilter_3 = _t === void 0 ? function (column, value) {
|
||||
var startTime = (0, dayjs_1.default)(value)
|
||||
.startOf(unitOfTime_1)
|
||||
.valueOf();
|
||||
var endTime = (0, dayjs_1.default)(value)
|
||||
.endOf(unitOfTime_1)
|
||||
.valueOf();
|
||||
if (column.op === '$between') {
|
||||
var values2 = [startTime, endTime];
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), values2);
|
||||
}
|
||||
if (column.op === '$gt' || column.op === '$gte') {
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), startTime);
|
||||
}
|
||||
if (column.op === '$lt' || column.op === '$lte') {
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), endTime);
|
||||
}
|
||||
return (0, lodash_1.set)({}, (0, utils_1.getOp)(column), (0, dayjs_1.default)(value).valueOf());
|
||||
} : _t, _u = column.transformValue, transformValue_4 = _u === void 0 ? function (column, filter) {
|
||||
if (column.op === '$between') {
|
||||
return (0, lodash_1.get)(filter, "".concat((0, utils_1.getOp)(column), ".0"), null);
|
||||
}
|
||||
return (0, lodash_1.get)(filter, (0, utils_1.getOp)(column), null);
|
||||
} : _u;
|
||||
var dateValue = transformValue_4(column, filter);
|
||||
V = ((0, jsx_runtime_1.jsx)(antd_1.DatePicker, { format: "YYYY-MM-DD", showTime: showTime, value: dateValue ? (0, dayjs_1.default)(dateValue) : null, onChange: function (date, dateString) {
|
||||
setFilterAndResetFilter(date, function () {
|
||||
return transformFilter_3(column, date);
|
||||
});
|
||||
} }));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'ref': {
|
||||
var ops = ['$in', '$nin', '$eq', '$ne'];
|
||||
if (op) {
|
||||
(0, assert_1.assert)(ops.includes(op), assertMessage(attr, attrType, op, ops));
|
||||
}
|
||||
V = ((0, jsx_runtime_1.jsx)(foreignKeyFilter_1.default, { formItem: false, entity: entity, oakPath: oakFullpath, column: column }));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
(0, assert_1.assert)(false, "\u7C7B\u578B\u3010".concat(attrType, "\u3011\u6682\u4E0D\u652F\u6301"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: _label }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: V }) })));
|
||||
}
|
||||
exports.default = Render;
|
||||
function assertMessage(attr, attrType, op, ops) {
|
||||
return "attr\u4E3A\u3010".concat(attr, "\u3011, \u4F20\u5165\u7684\u7B97\u5B50\u3010").concat(op, "\u3011\u4E0D\u652F\u6301\uFF0C\u7C7B\u578B\u3010").concat(attrType, "\u3011\u53EA\u652F\u6301\u3010").concat(JSON.stringify(ops), "\u3011");
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("../..").ReactComponentProps<true, {
|
||||
entity: StringConstructor;
|
||||
columns: ArrayConstructor;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = OakComponent({
|
||||
entity: function () {
|
||||
var entity = this.props.entity;
|
||||
return entity;
|
||||
},
|
||||
isList: true,
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
properties: {
|
||||
entity: String,
|
||||
columns: Array,
|
||||
},
|
||||
methods: {
|
||||
getNamedFilters: function () {
|
||||
if (this.state.oakFullpath) {
|
||||
var namedFilters = this.features.runningTree.getNamedFilters(this.state.oakFullpath);
|
||||
return namedFilters;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
import { ColSpanType, ColumnProps } from '../query/column';
|
||||
declare type Width = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
||||
declare type ColumnMapType = {
|
||||
xxl: ColSpanType;
|
||||
xl: ColSpanType;
|
||||
lg: ColSpanType;
|
||||
md: ColSpanType;
|
||||
sm: ColSpanType;
|
||||
xs: ColSpanType;
|
||||
};
|
||||
export default function Render(props: WebComponentProps<ED, keyof ED, false, {
|
||||
entity: string;
|
||||
columns: Array<ColumnProps>;
|
||||
onSearch: () => void;
|
||||
column?: ColSpanType | ColumnMapType;
|
||||
width: Width;
|
||||
}, {
|
||||
getNamedFilters: () => Record<string, any>[];
|
||||
}>): JSX.Element | null;
|
||||
export {};
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = require("react");
|
||||
var antd_1 = require("antd");
|
||||
var icons_1 = require("@ant-design/icons");
|
||||
var query_1 = tslib_1.__importDefault(require("../query"));
|
||||
var utils_1 = require("../query/utils");
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
var DEFAULT_COLUMN_MAP = {
|
||||
xxl: 4,
|
||||
xl: 4,
|
||||
lg: 4,
|
||||
md: 3,
|
||||
sm: 2,
|
||||
xs: 1,
|
||||
};
|
||||
function transformColumns(columns) {
|
||||
return columns.map(function (column, index) {
|
||||
var _filterName = (0, utils_1.getFilterName)(column);
|
||||
return tslib_1.__assign(tslib_1.__assign({}, column), { filterName: _filterName });
|
||||
});
|
||||
}
|
||||
function getColumn(column, width) {
|
||||
if (typeof column === 'number') {
|
||||
return column;
|
||||
}
|
||||
if (typeof column === 'object') {
|
||||
if (column[width] !== undefined) {
|
||||
return column[width] || DEFAULT_COLUMN_MAP[width];
|
||||
}
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
function getSpan(colSpan, column) {
|
||||
return colSpan > column ? column : colSpan;
|
||||
}
|
||||
function Render(props) {
|
||||
var _a = props.data, onSearch = _a.onSearch, columns = _a.columns, _b = _a.column, column = _b === void 0 ? DEFAULT_COLUMN_MAP : _b, width = _a.width, entity = _a.entity, oakFullpath = _a.oakFullpath;
|
||||
var _c = props.methods, t = _c.t, refresh = _c.refresh, getNamedFilters = _c.getNamedFilters, removeNamedFilterByName = _c.removeNamedFilterByName;
|
||||
var _d = tslib_1.__read((0, react_1.useState)(false), 2), open = _d[0], setOpen = _d[1];
|
||||
if (!columns || columns.length === 0) {
|
||||
return null;
|
||||
}
|
||||
var tfColumns = transformColumns(columns);
|
||||
var mergedColumn = getColumn(column, width); // 一行放几个
|
||||
var gridColumn = Math.ceil(24 / mergedColumn); // 24格 计算一个所需几格
|
||||
var totalColSpan = tfColumns.reduce(function (prev, cur, index, arr) {
|
||||
return getSpan(cur.colSpan || 1, mergedColumn) + prev;
|
||||
}, 0); //总共多少份
|
||||
var rows = Math.ceil(totalColSpan / mergedColumn);
|
||||
var showExpandButton = totalColSpan > mergedColumn - 1; //需要显示展开按钮
|
||||
var filters = getNamedFilters() || [];
|
||||
var filterNames = tfColumns.map(function (ele) { return ele.filterName; });
|
||||
var filters2 = filters === null || filters === void 0 ? void 0 : filters.filter(function (ele) {
|
||||
return filterNames.includes(ele['#name']);
|
||||
});
|
||||
var count = (filters2 === null || filters2 === void 0 ? void 0 : filters2.length) || 0; //查询条件个数
|
||||
var items = [];
|
||||
var rowSum = 0;
|
||||
var rowSum2 = 0;
|
||||
var rows2 = 1;
|
||||
var firstItem;
|
||||
var _gridColumn = gridColumn;
|
||||
tfColumns.forEach(function (column, index) {
|
||||
var colSpan = column.colSpan;
|
||||
var colSpan2 = getSpan(colSpan || 1, mergedColumn);
|
||||
var item = ((0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ span: gridColumn * colSpan2 }, { children: (0, jsx_runtime_1.jsx)(query_1.default, { column: column, entity: entity, oakPath: oakFullpath }) })));
|
||||
if (index === 0) {
|
||||
firstItem = item;
|
||||
}
|
||||
if (!open) {
|
||||
if (width !== 'xs') {
|
||||
rowSum += colSpan2;
|
||||
if (mergedColumn === 1) {
|
||||
//一行一个
|
||||
items.push(item);
|
||||
}
|
||||
else if (rowSum <= mergedColumn - 1) {
|
||||
items.push(item);
|
||||
rowSum2 = rowSum;
|
||||
if (totalColSpan === mergedColumn - 1) {
|
||||
_gridColumn = gridColumn * 1;
|
||||
}
|
||||
else if (totalColSpan < mergedColumn) {
|
||||
_gridColumn = gridColumn * (mergedColumn - rowSum2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
_gridColumn = gridColumn * (mergedColumn - rowSum2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
items.push(item);
|
||||
if (rowSum + colSpan2 > rows2 * mergedColumn &&
|
||||
rowSum < rows2 * mergedColumn) {
|
||||
rowSum += rows2 * mergedColumn - rowSum;
|
||||
rowSum += colSpan2;
|
||||
rows2 += 1;
|
||||
}
|
||||
else if (rowSum + colSpan2 === rows2 * mergedColumn) {
|
||||
rowSum += colSpan2;
|
||||
rows2 += 1;
|
||||
}
|
||||
else {
|
||||
rowSum += colSpan2;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (open) {
|
||||
_gridColumn = 24;
|
||||
if (rowSum >= mergedColumn) {
|
||||
var other = rows * mergedColumn - rowSum;
|
||||
if (other > 0) {
|
||||
_gridColumn = gridColumn * other;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_gridColumn = gridColumn * (mergedColumn - rowSum);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (width === 'xs') {
|
||||
items.push(firstItem);
|
||||
}
|
||||
}
|
||||
items.push((0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ span: _gridColumn }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, tslib_1.__assign({ size: 16, className: web_module_less_1.default.actionBox }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Badge, tslib_1.__assign({ count: count }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "default", onClick: function () {
|
||||
filterNames.forEach(function (ele) {
|
||||
return removeNamedFilterByName(ele);
|
||||
});
|
||||
refresh();
|
||||
} }, { children: t('common:reset') })) })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
if (typeof onSearch === 'function') {
|
||||
onSearch();
|
||||
return;
|
||||
}
|
||||
refresh();
|
||||
} }, { children: t('common:select') })), showExpandButton && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
setOpen(!open);
|
||||
} }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [open ? t('common:shrink') : t('common:expand'), open ? (0, jsx_runtime_1.jsx)(icons_1.UpOutlined, {}) : (0, jsx_runtime_1.jsx)(icons_1.DownOutlined, {})] }) })))] })) }) })));
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Form, { children: (0, jsx_runtime_1.jsx)(antd_1.Row, tslib_1.__assign({ gutter: [16, 16] }, { children: items })) }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -3,7 +3,7 @@ declare const _default: (props: import("../..").ReactComponentProps<false, {
|
|||
multiple: BooleanConstructor;
|
||||
entityId: StringConstructor;
|
||||
entityIds: ArrayConstructor;
|
||||
pickerDef: ObjectConstructor;
|
||||
pickerRender: ObjectConstructor;
|
||||
onChange: FunctionConstructor;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ exports.default = OakComponent({
|
|||
multiple: Boolean,
|
||||
entityId: String,
|
||||
entityIds: Array,
|
||||
pickerDef: Object,
|
||||
pickerRender: Object,
|
||||
onChange: Function,
|
||||
},
|
||||
formData: function () {
|
||||
var _a = this.props, multiple = _a.multiple, entityIds = _a.entityIds, entityId = _a.entityId, pickerDef = _a.pickerDef;
|
||||
var _b = pickerDef, entity = _b.entity, projection = _b.projection, title = _b.title;
|
||||
var _a = this.props, multiple = _a.multiple, entityIds = _a.entityIds, entityId = _a.entityId, pickerRender = _a.pickerRender;
|
||||
var _b = pickerRender, entity = _b.entity, projection = _b.projection, title = _b.title;
|
||||
if (multiple) {
|
||||
var rows = entityIds && this.features.cache.get(entity, {
|
||||
data: typeof projection === 'function' ? projection() : projection,
|
||||
|
|
@ -66,12 +66,12 @@ exports.default = OakComponent({
|
|||
methods: {
|
||||
refreshData: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var _a, pickerDef, multiple, _b, mode, entity, projection, filter, count, title, proj, filter2, data, data2;
|
||||
var _a, pickerRender, multiple, _b, mode, entity, projection, filter, count, title, proj, filter2, data, data2;
|
||||
return tslib_1.__generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
_a = this.props, pickerDef = _a.pickerDef, multiple = _a.multiple;
|
||||
_b = pickerDef, mode = _b.mode, entity = _b.entity, projection = _b.projection, filter = _b.filter, count = _b.count, title = _b.title;
|
||||
_a = this.props, pickerRender = _a.pickerRender, multiple = _a.multiple;
|
||||
_b = pickerRender, mode = _b.mode, entity = _b.entity, projection = _b.projection, filter = _b.filter, count = _b.count, title = _b.title;
|
||||
if (mode === 'radio') {
|
||||
// radio的要先取数据出来
|
||||
(0, assert_1.default)(typeof count === 'number' && count <= 5, 'radio类型的外键选择,总数必须小于5');
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default function render(props: WebComponentProps<ED, keyof EntityDict, fa
|
|||
id: string;
|
||||
title: string;
|
||||
}[];
|
||||
pickerDef: OakAbsRefAttrPickerRender<ED, keyof ED>;
|
||||
pickerRender: OakAbsRefAttrPickerRender<ED, keyof ED>;
|
||||
onChange: (value: any) => void;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ var react_1 = require("react");
|
|||
var antd_1 = require("antd");
|
||||
var picker_1 = tslib_1.__importDefault(require("../picker"));
|
||||
function render(props) {
|
||||
var _a = props.data, pickerDef = _a.pickerDef, renderValue = _a.renderValue, data = _a.data, multiple = _a.multiple, onChange = _a.onChange, entityId = _a.entityId, entityIds = _a.entityIds;
|
||||
var _a = props.data, pickerRender = _a.pickerRender, renderValue = _a.renderValue, data = _a.data, multiple = _a.multiple, onChange = _a.onChange, entityId = _a.entityId, entityIds = _a.entityIds;
|
||||
var t = props.methods.t;
|
||||
var mode = pickerDef.mode;
|
||||
var mode = pickerRender.mode;
|
||||
var _b = tslib_1.__read((0, react_1.useState)(false), 2), visibile = _b[0], setVisible = _b[1];
|
||||
if (!data && mode !== 'list') {
|
||||
return (0, jsx_runtime_1.jsx)("div", { children: " loading... " });
|
||||
|
|
@ -16,10 +16,10 @@ function render(props) {
|
|||
else {
|
||||
switch (mode) {
|
||||
case 'select': {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Select, { value: entityId, onChange: onChange, style: { width: '50%' }, options: data.map(function (ele) { return ({
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Select, { value: entityId, onChange: onChange, options: data.map(function (ele) { return ({
|
||||
value: ele.id,
|
||||
label: ele.title,
|
||||
}); }), allowClear: true }));
|
||||
}); }), allowClear: !pickerRender.required }));
|
||||
}
|
||||
case 'radio': {
|
||||
if (multiple) {
|
||||
|
|
@ -37,16 +37,16 @@ function render(props) {
|
|||
}); }) }));
|
||||
}
|
||||
case 'list': {
|
||||
var entity = pickerDef.entity, projection = pickerDef.projection, title = pickerDef.title, titleLabel = pickerDef.titleLabel, filter = pickerDef.filter, sorter = pickerDef.sorter;
|
||||
var entity = pickerRender.entity, projection = pickerRender.projection, title = pickerRender.title, titleLabel = pickerRender.titleLabel, filter = pickerRender.filter, sorter = pickerRender.sorter, required = pickerRender.required;
|
||||
var p = typeof projection === 'function' ? projection() : projection;
|
||||
var f = typeof filter === 'function' ? filter() : filter;
|
||||
var s = typeof sorter === 'function' ? sorter() : sorter;
|
||||
return ((0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Input, { value: renderValue, allowClear: true, onClick: function () { return setVisible(true); }, onChange: function (_a) {
|
||||
return ((0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Input, { value: renderValue, allowClear: !required, onClick: function () { return setVisible(true); }, onChange: function (_a) {
|
||||
var currentTarget = _a.currentTarget;
|
||||
if (!currentTarget.value) {
|
||||
onChange(undefined);
|
||||
}
|
||||
} }), (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: "\u9009\u62E9".concat(t("".concat(pickerDef.entity, ":name"))), open: visibile, closable: true, onCancel: function () { return setVisible(false); }, destroyOnClose: true, footer: null }, { children: (0, jsx_runtime_1.jsx)(picker_1.default, { oakPath: "$refAttr-picker-".concat(entity), entity: entity, title: title, titleLabel: titleLabel, oakProjection: p, oakFilters: f ? [f] : undefined, oakSorters: s, onSelect: function (_a) {
|
||||
} }), (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: "\u9009\u62E9".concat(t("".concat(pickerRender.entity, ":name"))), open: visibile, closable: true, onCancel: function () { return setVisible(false); }, destroyOnClose: true, footer: null }, { children: (0, jsx_runtime_1.jsx)(picker_1.default, { oakPath: "$refAttr-picker-".concat(entity), entity: entity, title: title, titleLabel: titleLabel, oakProjection: p, oakFilters: f ? [f] : undefined, oakSorters: s, onSelect: function (_a) {
|
||||
var _b = tslib_1.__read(_a, 1), id = _b[0].id;
|
||||
onChange(id);
|
||||
setVisible(false);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function makeAttrInput(attrRender, onValueChange) {
|
|||
}) })));
|
||||
}
|
||||
case 'ref': {
|
||||
return ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: false, entityId: value, pickerDef: attrRender, onChange: function (value) { onValueChange(value); } }));
|
||||
return ((0, jsx_runtime_1.jsx)(refAttr_1.default, { multiple: false, entityId: value, pickerRender: attrRender, onChange: function (value) { onValueChange(value); } }));
|
||||
}
|
||||
default: {
|
||||
throw new Error("\u3010Abstract Update\u3011\u65E0\u6CD5\u652F\u6301\u7684\u6570\u636E\u7C7B\u522B".concat(type, "\u7684\u6E32\u67D3"));
|
||||
|
|
@ -107,7 +107,7 @@ function render(props) {
|
|||
var update = props.methods.update;
|
||||
return ((0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ labelCol: { span: 4 }, layout: "horizontal", style: {
|
||||
margin: '0px auto',
|
||||
maxWidth: 675,
|
||||
maxWidth: '100%',
|
||||
} }, { children: [renderData.map(function (ele) { return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: ele.label, rules: [
|
||||
{
|
||||
required: ele.required,
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index",
|
||||
"l-popup":"../popup/index",
|
||||
"l-button":"../button/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-popup": "../popup/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"day":"../day/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"header":"./components/header/index",
|
||||
"mounth":"./components/mounth/index",
|
||||
"l-toast": "../toast/index",
|
||||
"l-popup": "../popup/index",
|
||||
"l-button": "../button/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-error-tip":"../error-tip/index",
|
||||
"l-checkbox": "../checkbox/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-button": "../button/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-list": "../list/index",
|
||||
"l-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index",
|
||||
"l-badge":"../badge/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-popup": "../popup/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-error-tip":"../error-tip/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-grid-item":"../grid-item/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"l-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-index-list": "../index-list/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon": "../icon/index",
|
||||
"l-error-tip":"../error-tip/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon": "../icon/index",
|
||||
"l-badge": "../badge/index",
|
||||
"l-tag": "../tag/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-loading":"../loading/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents":
|
||||
{
|
||||
"l-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon": "../icon/index",
|
||||
"l-error-tip": "../error-tip/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-error-tip": "../error-tip/index",
|
||||
"l-radio":"../radio/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-input": "../input/index",
|
||||
"l-icon": "../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon": "../icon/index",
|
||||
"l-badge": "../badge/index",
|
||||
"l-segment-item":"../segment-item/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-button":"../button/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"l-icon":"../icon/index",
|
||||
"l-step":"../step/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"l-badge":"../badge/index"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue