@xm-fe/xm-pc-base
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@xm-fe/xm-pc-base", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "2022 鲜沐pc-base", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -21,1 +21,3 @@ import { App } from 'Vue' | ||
} | ||
export * from './SCustomFilter/interface' |
import { ConcreteComponent } from 'vue' | ||
import { DefaultOptionType } from 'ant-design-vue/lib/select' | ||
import { CommonObject } from '@/interface/Common' | ||
import { PresetFilterConf } from './config' | ||
import { CommonObject } from '../../common' | ||
export interface SCustomFilterPresetOptions extends SCustomFilterOptions { | ||
@@ -15,3 +15,3 @@ base: SCustomFilterBaseOptions | ||
// 使用预选设置 | ||
preset?: PresetFilterConf | ||
preset?: any | ||
// 使用基础组件 | ||
@@ -33,3 +33,3 @@ component?: string | ||
// 使用预选设置 | ||
preset?: PresetFilterConf | ||
preset?: any | ||
// 使用基础组件 | ||
@@ -36,0 +36,0 @@ component?: string |
export * from './hooks' | ||
export * from './utils' | ||
export * from './components' | ||
@@ -3,0 +4,0 @@ import SUpload from './components/SUpload/index.vue' |
@@ -1,3 +0,1 @@ | ||
import { cityData } from '@/components/SCustomFilter/city' | ||
interface Province { | ||
@@ -45,2 +43,3 @@ label: string | ||
const getDistrictByItem = (item: PointStr): PointObj[] => { | ||
const cityData = window._xm_global.getProvinceCityDistrict() | ||
if (!item.length) { | ||
@@ -47,0 +46,0 @@ return [] |
import { DefaultOptionType } from 'ant-design-vue/lib/select' | ||
import dayjs from 'dayjs' | ||
/** 格式化时间 */ | ||
export const formatDateTime = (time: any) => { | ||
if (time == null || time === '') { | ||
return 'N/A' | ||
} | ||
const date = new Date(time) | ||
return dayjs(date).format('YYYY-MM-DD HH:mm:ss') | ||
} | ||
/** 将全局 css 导入 js 中使用 */ | ||
export const getCssVariableValue = (cssVariableName: string) => { | ||
let cssVariableValue = '' | ||
try { | ||
// 没有拿到值时,会返回空串 | ||
cssVariableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariableName) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
return cssVariableValue | ||
} | ||
export const filterOption = (input: string, option: DefaultOptionType) => { | ||
return option?.label?.toLowerCase().indexOf((input || '').toLowerCase()) >= 0 | ||
} | ||
export * from './city-data-utils' |
@@ -1,3 +0,3 @@ | ||
import { filterOption } from '@/utils' | ||
import { SCustomFilterBaseOptions } from './interface' | ||
import { filterOption } from '@xm-fe/xm-pc-base' | ||
import { SCustomFilterBaseOptions } from '@xm-fe/xm-pc-base' | ||
@@ -4,0 +4,0 @@ export const selectBase: SCustomFilterBaseOptions = { |
import { multCascaderBase, CascaderBase, selectBaseWithSearch, selectMultBase } from './config-base' | ||
import { remoteSelectBase, selectBase } from './config-base' | ||
import { SCustomFilterInnerOptions, SCustomFilterPresetOptions } from './interface' | ||
import { SCustomFilterInnerOptions, SCustomFilterPresetOptions } from '@xm-fe/xm-pc-base' | ||
@@ -5,0 +5,0 @@ //#region API |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
63210
38
893