mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-22 20:56:33 +08:00
fix/githubaction/config (#14)
* fix: githubactions config * fix: update build env * fix: remove cache Co-authored-by: ivringpeng <pengyue970725@gmail.com>
This commit is contained in:
parent
4e0b787829
commit
86f73de893
7
.github/workflows/pull-request.yml
vendored
7
.github/workflows/pull-request.yml
vendored
|
@ -8,5 +8,10 @@ jobs:
|
|||
MAIN_PULL_REQUEST:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/install-dep@develop
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: npm install
|
||||
shell: bash
|
||||
- run: npm run lint
|
24
.github/workflows/push.yml
vendored
24
.github/workflows/push.yml
vendored
|
@ -1,19 +1,27 @@
|
|||
name: All_ON_PUSH
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
All_ON_PUSH:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/install-dep@develop
|
||||
- run: echo '${{ github.ref }} ... ${{ github.sha }}''
|
||||
- name: build
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: npm install
|
||||
shell: bash
|
||||
- run: echo '${{ github.ref }} ... ${{ github.sha }}'
|
||||
- name: build-site
|
||||
run: npm run build
|
||||
- name: upload surge service
|
||||
- name: upload surge service and generate preview URL
|
||||
id: deploy
|
||||
run: |
|
||||
export DEPLOY_DOMAIN=https://preview-${{ github.ref }}-tdesign-vue.surge.sh
|
||||
npx surge --project dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||
- run: echo 'https://preview-${{ github.ref }}-tdesign-vue.surge.sh'
|
||||
export GITHUB_SHA=${{ github.sha }}
|
||||
export GITHUB_SHA_SUB=${GITHUB_SHA: 0: 7 }
|
||||
export DEPLOY_DOMAIN=https://preview-$GITHUB_SHA_SUB-tdesign-vue-next-starter.surge.sh
|
||||
npx surge --project ./dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||
echo the preview URL is $DEPLOY_DOMAIN
|
||||
if: ${{ success() }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
- run: echo "🚀 This job's status is ${{ job.status }}."
|
3
globals.d.ts
vendored
3
globals.d.ts
vendored
|
@ -5,7 +5,8 @@ declare interface ImportMeta {
|
|||
env: {
|
||||
MODE: 'mock' | 'development' | 'test' | 'release';
|
||||
};
|
||||
glob: (url: string) => {};
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
glob: (url: string) => { url };
|
||||
}
|
||||
|
||||
declare module '*.svg' {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"start:mock": "vite --open --mode mock",
|
||||
"start": "vite --open --mode development",
|
||||
"build:test": "vite build --mode test",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"build": "vue-tsc --noEmit && vite build --mode release",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0",
|
||||
"lint:fix": "eslint --ext .vue,.js,jsx,.ts,.tsx ./ --max-warnings 0 --fix",
|
||||
|
|
|
@ -19,5 +19,5 @@ export type SettingType = typeof STYLE_CONFIG;
|
|||
export type ClassName = { [className: string]: any } | ClassName[] | string;
|
||||
|
||||
export type CommonObjType = {
|
||||
[key: string]: string | number
|
||||
}
|
||||
[key: string]: string | number;
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@ import * as echarts from 'echarts/core';
|
|||
import { getBrandColor } from '@/config/color';
|
||||
import store from '@/store';
|
||||
import { CommonObjType } from '@/interface';
|
||||
|
||||
const { state } = store;
|
||||
|
||||
/**
|
||||
|
@ -177,9 +178,11 @@ export function constructInitDataset(dateTime: Array<string> = []) {
|
|||
// console.log('dateAbsTime..', dateAbsTime, enhandTime);
|
||||
timeArray.push(dayjs(enhandTime).format('YYYY-MM-DD'));
|
||||
} else {
|
||||
timeArray.push(dayjs()
|
||||
timeArray.push(
|
||||
dayjs()
|
||||
.subtract(divideNum - i, 'day')
|
||||
.format('YYYY-MM-DD'));
|
||||
.format('YYYY-MM-DD'),
|
||||
);
|
||||
}
|
||||
|
||||
inArray.push(getRandomArray().toString());
|
||||
|
|
|
@ -59,7 +59,12 @@ export default defineComponent({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
data: Object,
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const formVisible = ref(false);
|
||||
|
|
|
@ -6,7 +6,7 @@ export const passwordValidator = (val) => {
|
|||
return { result: false, message: '需包含下划线_', type: 'warning' };
|
||||
}
|
||||
return { result: true };
|
||||
}
|
||||
};
|
||||
|
||||
export const getEmails = (search) => [
|
||||
{
|
||||
|
@ -37,5 +37,5 @@ export const getEmails = (search) => [
|
|||
|
||||
export default {
|
||||
passwordValidator,
|
||||
getEmails
|
||||
}
|
||||
getEmails,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// 定义的state初始值
|
||||
import { NotificationItem } from '../interface'
|
||||
import { NotificationItem } from '../interface';
|
||||
|
||||
const state = {
|
||||
msgData: [
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
// 获取常用时间
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const LAST_7_DAYS = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().subtract(1, 'day').format('YYYY-MM-DD')];
|
||||
export const LAST_7_DAYS = [
|
||||
dayjs().subtract(7, 'day').format('YYYY-MM-DD'),
|
||||
dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
|
||||
];
|
||||
|
||||
export const LAST_30_DAYS = [dayjs().subtract(30, 'day').format('YYYY-MM-DD'), dayjs().subtract(1, 'day').format('YYYY-MM-DD')];
|
||||
export const LAST_30_DAYS = [
|
||||
dayjs().subtract(30, 'day').format('YYYY-MM-DD'),
|
||||
dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
|
||||
];
|
||||
|
|
|
@ -38,7 +38,7 @@ export const useChart = (domId: string): Ref<echarts.ECharts> => {
|
|||
* @returns
|
||||
*/
|
||||
export const useCounter = (duration = 60): [Ref<number>, () => void] => {
|
||||
let intervalTimer: NodeJS.Timer;
|
||||
let intervalTimer;
|
||||
onUnmounted(() => {
|
||||
clearInterval(intervalTimer);
|
||||
});
|
||||
|
|
|
@ -14,7 +14,6 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
|
||||
|
||||
plugins: [
|
||||
createVuePlugin(),
|
||||
vueJsx(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user