Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Oct 29, 2020
1 parent 404c73d commit 7658f4d
Show file tree
Hide file tree
Showing 13 changed files with 297 additions and 111 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"scripts": {
"bootstrap": "yarn install",
"serve": "esno ./build/script/preserve.ts && cross-env NODE_ENV=development vite",
"build": "rimraf dist && cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
"build": " rimraf dist && cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
"build:site": "cross-env SITE=true npm run build ",
"build:no-cache": "yarn clean:cache && npm run build",
"typecheck": "typecheck .",
"report": "cross-env REPORT=true npm run build ",
"preview": "npm run build && esno ./build/script/preview.ts",
"preview:dist": "esno ./build/script/preview.ts",
Expand Down Expand Up @@ -59,6 +60,8 @@
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"@vue/compiler-sfc": "^3.0.2",
"@vuedx/typecheck": "^0.2.4-0",
"@vuedx/typescript-plugin-vue": "^0.2.4-0",
"autoprefixer": "^9.8.6",
"commitizen": "^4.2.2",
"conventional-changelog-cli": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Authority/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
props: {
// 指定角色可见
value: {
type: [Number, Array, String] as PropType<RoleEnum | RoleEnum[]>,
type: [Number, Array, String] as PropType<RoleEnum | RoleEnum[] | string | string[]>,
default: '',
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
default: 'throttle',
},
color: {
type: String as PropType<'error' | 'warning' | 'success'>,
type: String as PropType<'error' | 'warning' | 'success' | ''>,
},
// 防抖节流时间
throttleTime: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Description/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface DescItem {
labelStyle?: any;

field: string;
label: string;
label: any;
// 和并列
span?: number;
show?: (...arg: any) => boolean;
Expand All @@ -30,7 +30,7 @@ export interface DescOptions {
* 数据
* @type object
*/
data: object;
data: any;
/**
* 内置的CollapseContainer组件配置
* @type CollapseContainerOptions
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ColSpanType } from 'ant-design-vue/types/grid/col';

export interface ColEx {
style: object;
style?: any;
/**
* raster number of cells to occupy, 0 corresponds to display: none
* @default none (0)
Expand Down
6 changes: 3 additions & 3 deletions src/components/Tinymce/src/Editor.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="tinymce-container" :style="{ width: containerWidth }">
<textarea :id="tinymceId" visibility="hidden" ref="elRef"></textarea>
<textarea :id="tinymceId" ref="elRef"></textarea>
</div>
</template>

Expand All @@ -23,7 +23,7 @@
import { useScript } from '/@/hooks/web/useScript';
import { snowUuid } from '/@/utils/uuid';
import { bindHandlers } from './helper';
// import lineHeight from './lineHeight';
import lineHeight from './lineHeight';
const CDN_URL = 'https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1';
Expand Down Expand Up @@ -120,7 +120,7 @@
}
function initEditor() {
// getTinymce().PluginManager.add('lineHeight', lineHeight(getTinymce()));
getTinymce().PluginManager.add('lineHeight', lineHeight(getTinymce()));
getTinymce().init(unref(initOptions));
}
Expand Down
4 changes: 4 additions & 0 deletions src/types/module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'ant-design-vue/es/locale/zh_CN';
declare module 'globby!/@/router/routes/modules/**/*.@(ts)';
declare module 'globby!/@/router/menus/modules/**/*.@(ts)';
declare const React: string;
11 changes: 0 additions & 11 deletions src/types/shim-vue.d.ts

This file was deleted.

83 changes: 0 additions & 83 deletions src/types/source.d.ts

This file was deleted.

103 changes: 103 additions & 0 deletions src/types/vue-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
declare module '*.vue' {
import { defineComponent } from 'vue';
const Component: ReturnType<typeof defineComponent>;
export default Component;
}

declare namespace NodeJS {
interface Process {
env: ProcessEnv;
}
interface ProcessEnv {
/**
* By default, there are two modes in Vite:
*
* * `development` is used by vite and vite serve
* * `production` is used by vite build
*
* You can overwrite the default mode used for a command by passing the --mode option flag.
*
*/
readonly NODE_ENV: 'development' | 'production';
}
}

declare let process: NodeJS.Process;

declare module '*.bmp' {
const src: string;
export default src;
}

declare module '*.gif' {
const src: string;
export default src;
}

declare module '*.jpg' {
const src: string;
export default src;
}

declare module '*.jpeg' {
const src: string;
export default src;
}

declare module '*.png' {
const src: string;
export default src;
}

declare module '*.webp' {
const src: string;
export default src;
}

declare module '*.svg' {
const src: string;
export default src;
}

declare module '*.json' {
const content: any | any[];
export default content;
}

declare module '*.scss' {
const content: {
readonly [className: string]: string;
};
export default content;
}
declare module '*.less' {
const content: {
readonly [className: string]: string;
};
export default content;
}
declare module '*.styl' {
const content: {
readonly [className: string]: string;
};
export default content;
}
declare module '*.css' {
const content: any;
export default content;
}

declare module '*.module.css' {
const classes: { readonly [key: string]: string };
export default classes;
}

declare module '*.module.scss' {
const classes: { readonly [key: string]: string };
export default classes;
}

declare module '*.module.sass' {
const classes: { readonly [key: string]: string };
export default classes;
}
5 changes: 3 additions & 2 deletions src/views/demo/table/FixedHeight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template #customTitle>
<span>
姓名
<BaseHelp class="ml-2" text="姓名" />
<BasicHelp class="ml-2" text="姓名" />
</span>
</template>
<template #customAddress>
Expand All @@ -20,9 +20,10 @@
import { getCustomHeaderColumns } from './tableData';
import { FormOutlined } from '@ant-design/icons-vue';
import { demoListApi } from '/@/api/demo/table';
import { BasicHelp } from '/@/components/Basic';
export default defineComponent({
components: { BasicTable, FormOutlined },
components: { BasicTable, FormOutlined, BasicHelp },
setup() {
const [registerTable] = useTable({
title: '定高/头部自定义',
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"jsx": "react",
"baseUrl": ".",
"allowJs": true,
"sourceMap": true,
"esModuleInterop": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand All @@ -26,6 +27,17 @@
]
}
},
"plugins": [
{
"name": "@vuedx/typescript-plugin-vue"
}
],
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"exclude": [
"node_modules",
"dist",
Expand Down
Loading

0 comments on commit 7658f4d

Please sign in to comment.