This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as mkdirp from 'mkdirp' | |
import * as rimraf from 'rimraf' | |
import * as write from 'write' | |
import * as fse from 'fs-extra' | |
/** | |
* 创建文件夹 | |
* @param uri 项目根目录相对路径 | |
*/ | |
export async function createFileFolder(uri: string) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
// import persistedState from 'vuex-persistedstate' | |
import getters from './getters' | |
// import { DOMAINID } from '@/config' | |
// eslint-disable-next-line no-unused-vars | |
// import app from './modules/app' | |
// eslint-disable-next-line no-unused-vars | |
// import settings from './modules/settings' | |
Vue.use(Vuex) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<el-card class="box-card custom-box"> | |
<div slot="header" class="clearfix"> | |
<div class="card-header"> | |
<span class="card-title">{{ title }}</span> | |
</div> | |
</div> | |
<div ref="chart" class="chart"></div> | |
</el-card> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Message } from 'element-ui' | |
// 300m之后再弹loading | |
export function loadingMsg (message) { | |
let timer = null | |
let loading = null | |
timer = setTimeout(() => { | |
loading = Message({ | |
message, | |
type: 'info', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 正整数 | |
/^[0-9]+.?[0-9]*$/ | |
// 数字最多保留1位小数 | |
/^(0|[1-9]\d*)(\.[0-9])?$/ | |
// 100到1000万之间的正整数 | |
/^([1-9]\d{2,6}|10000000)$/ | |
// 不匹配某个字符 | |
/^((?!some_text).)*$/ | |
// 匹配某个字符 | |
/(.*some_text).*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LockMap extends Map { | |
constructor (args) { | |
const map = new Map(args) | |
map.set = () => { | |
console.error('禁止修改枚举常量') | |
} | |
map.delete = () => { | |
console.error('禁止修改枚举常量') | |
} | |
map.clear = () => { |