tav-ui
Version:
37 lines (34 loc) • 1.64 kB
JavaScript
import '../../../../utils/index2.mjs';
import { buildUUID } from '../../../../utils/uuid2.mjs';
import { ProvinceCityOptions } from '../../../../utils/geo2.mjs';
function buildCascadeProId() {
const uuid = buildUUID();
return `TaCascadePro-${uuid}`;
}
const DEFAULT_CASCADE_PRO_OPTIONS = ProvinceCityOptions;
const DEFAULT_CASCADE_PRO_OPTIONS_KEY_CONFIG = {
name: "label",
id: "value",
children: "children",
pid: "pid"
};
const DEFAULT_HOT = ["610000", "110000", "320000", "310000", "440000"];
const DEFAULT_CASCADE_PRO_PLACEHOLDER = "\u8BF7\u9009\u62E9\u5730\u5740";
const DEFAULT_CASCADE_PRO_SEARCH_PLACEHOLDER = "\u8BF7\u8F93\u5165\u5730\u5740\u540D\u79F0";
const DEFAULT_CASCADE_PRO_TITLE = "\u5730\u5740\u9009\u62E9";
const DEFAULT_CASCADE_PRO_FIRST_LETTER_TITLE = "\u9996\u5B57\u6BCD\uFF1A";
function getHots(list, hots) {
return hots.map((hot) => {
const result = list.filter((item) => item.id === hot);
const hasMunicipalities = result.find((item) => item.isIdSameAsOnlyOneChild);
if (hasMunicipalities) {
return hasMunicipalities;
} else {
return result[0];
}
});
}
const DEFAULT_CASCADE_PRO_FIELDS = ["province", "city", "district"];
const DEFAULT_CASCADE_PRO_FIRST_LETTER_FIELDS = ["province", "city", "district"];
export { DEFAULT_CASCADE_PRO_FIELDS, DEFAULT_CASCADE_PRO_FIRST_LETTER_FIELDS, DEFAULT_CASCADE_PRO_FIRST_LETTER_TITLE, DEFAULT_CASCADE_PRO_OPTIONS, DEFAULT_CASCADE_PRO_OPTIONS_KEY_CONFIG, DEFAULT_CASCADE_PRO_PLACEHOLDER, DEFAULT_CASCADE_PRO_SEARCH_PLACEHOLDER, DEFAULT_CASCADE_PRO_TITLE, DEFAULT_HOT, buildCascadeProId, getHots };
//# sourceMappingURL=props2.mjs.map