修改路径
This commit is contained in:
9
src/app/utils/color.ts
Normal file
9
src/app/utils/color.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export const ColorList: { bgColor: string, fontColor: string }[] = [
|
||||
{bgColor: '#7bcfa6', fontColor: '#000000'}, // 石青
|
||||
{bgColor: '#bce672', fontColor: '#000000'}, // 松花色
|
||||
{bgColor: '#ff8936', fontColor: '#000000'}, // 橘黄
|
||||
{bgColor: '#f0c239', fontColor: '#000000'}, // 缃色
|
||||
{bgColor: '#808080', fontColor: '#ffffff'}, // 灰色
|
||||
{bgColor: '#3eede7', fontColor: '#000000'}, // 碧蓝
|
||||
{bgColor: '#177cb0', fontColor: '#ffffff'}, // 靛青
|
||||
];
|
||||
26
src/app/utils/dataUtil.ts
Normal file
26
src/app/utils/dataUtil.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {PageList} from '../class/HttpReqAndResp';
|
||||
|
||||
/**
|
||||
* 判断 一个Page<any>[] 中是否存在一条已查询的数据
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 单页数量
|
||||
* @param pageList 源数据
|
||||
* @return 未查到:null 查到:该条数据
|
||||
*/
|
||||
export function exist<T>(pageNum: number, pageSize: number, pageList: PageList<any>[]): Observable<PageList<T>> | null {
|
||||
if (pageList === undefined || pageList == null || pageList.length === 0) {
|
||||
return null;
|
||||
}
|
||||
// tslint:disable-next-line:prefer-for-of
|
||||
for (let i = 0; i < pageList.length; i++) {
|
||||
// tslint:disable-next-line:triple-equals
|
||||
if (pageList[i].pageNum == pageNum && pageList[i].pageSize == pageSize) {
|
||||
const ob: Observable<PageList<T>> = new Observable(o => {
|
||||
o.next(pageList[i]);
|
||||
o.complete();
|
||||
})
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
11
src/app/utils/svgIconUtil.ts
Normal file
11
src/app/utils/svgIconUtil.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class SvgIconUtil {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:max-line-length
|
||||
static readonly nameIcon = '<svg t="1581933298087" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3223" width="200" height="200"><path d="M983.04 163.84H40.96c-24.576 0-40.96 16.384-40.96 40.96v614.4c0 20.48 16.384 40.96 40.96 40.96h942.08c20.48 0 40.96-20.48 40.96-40.96V204.8c0-24.576-20.48-40.96-40.96-40.96zM253.952 749.568c0-102.4 61.44-192.512 147.456-233.472-28.672-24.576-45.056-61.44-45.056-102.4 0-77.824 65.536-143.36 143.36-143.36s143.36 65.536 143.36 143.36c0 40.96-12.288 73.728-36.864 98.304 94.208 36.864 163.84 131.072 163.84 237.568H253.952z" p-id="3224" fill="#1296db"></path></svg>';
|
||||
|
||||
// tslint:disable-next-line:max-line-length
|
||||
static readonly locationIcon = '<svg t="1581933583276" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3981" width="200" height="200"><path d="M511.932268 0c-213.943865 0-387.880498 170.933833-387.880499 381.06211 0 164.815346 238.869364 485.098975 341.66447 620.247558a58.249807 58.249807 0 0 0 46.216029 22.690332c18.129688 0 35.491743-8.443964 46.328916-22.690332 102.704796-135.126006 341.709624-455.432213 341.709624-620.247558C899.970808 170.933833 725.89871 0 511.932268 0z m0 519.574733c-91.393496 0-165.786176-72.902569-165.786176-162.670489 0-89.722765 74.39268-162.738221 165.786176-162.73822 91.438651 0 165.718443 73.015456 165.718443 162.73822 0 89.76792-74.279793 162.670488-165.718443 162.670489z" fill="#1296db" p-id="3982"></path></svg>';
|
||||
}
|
||||
17
src/app/utils/util.ts
Normal file
17
src/app/utils/util.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
class DataProperties {
|
||||
static windowsMode: 'small' | 'middle' | 'large' = null;
|
||||
}
|
||||
|
||||
export function windowWidthChange(func) {
|
||||
DataProperties.windowsMode = window.innerWidth < 910 ? 'small' : (window.innerWidth > 1300 ? 'large' : 'middle');
|
||||
// 监听宽度变化
|
||||
window.addEventListener('resize', () => {
|
||||
DataProperties.windowsMode = window.innerWidth < 910 ? 'small' : (window.innerWidth > 1300 ? 'large' : 'middle');
|
||||
func();
|
||||
});
|
||||
}
|
||||
|
||||
export function windowsMode() {
|
||||
return DataProperties.windowsMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user