提交 8fd663e0 编写于 作者: 前端啊俊's avatar 前端啊俊

readme更新,删除无用文件

上级 304e7053
> 1%
last 2 versions
not dead
root = true
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=2
max_line_length = 100
[*.{yml,yaml,json}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
vueIndentScriptAndStyle: true,
singleQuote: true,
quoteProps: 'as-needed',
bracketSpacing: true,
trailingComma: 'es5',
jsxBracketSameLine: false,
jsxSingleQuote: false,
arrowParens: 'always',
insertPragma: false,
requirePragma: false,
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'lf',
rangeStart: 0,
};
registry "https://registry.npm.taobao.org"
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
phantomjs_cdnurl "http://cnpmjs.org/downloads"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
MIT License
Copyright (c) 2020 bqy
Copyright (c) 2021-present Naive Ui Admin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
......@@ -15,6 +15,7 @@ Naive Ui Admin 是一个免费开源的中后台模版,使用了最新的`vue3
- [x] 主控台
- [ ] 监控页
- [x] 工作台
- [x] 表单页面
### 页面组件
#### ProTable
......
import { computed, unref, ref } from 'vue';
import { computed } from 'vue';
import { useDesignSettingStore } from '@/store/modules/designSetting';
export function useDesignSetting() {
......
import { computed, unref, ref } from 'vue';
import { computed } from 'vue';
import { useProjectSettingStore } from '@/store/modules/projectSetting';
export function useProjectSetting() {
......
export interface GlobConfig {
// Site title
title: string;
// Service interface url
apiUrl: string;
// Upload url
uploadUrl?: string;
// Service interface url prefix
urlPrefix?: string;
// Project abbreviation
shortName: string;
export interface ProjectSettingState {
navMode: string,//导航模式
navTheme: string,//导航风格
headerSetting: object,//顶部设置
showFooter: boolean, //页脚
menuSetting: object, //多标签
multiTabsSetting: object,//多标签
crumbsSetting: object,//面包屑
permissionMode: string//权限模式
}
import type {
ComponentRenderProxy,
VNode,
VNodeChild,
ComponentPublicInstance,
FunctionalComponent,
PropType as VuePropType,
} from 'vue';
declare global {
const __APP_INFO__: {
pkg: {
name: string;
version: string;
dependencies: Recordable<string>;
devDependencies: Recordable<string>;
};
lastBuildTime: string;
};
// declare interface Window {
// // Global vue app instance
// __APP__: App<Element>;
// }
// vue
declare type PropType<T> = VuePropType<T>;
declare type VueNode = VNodeChild | JSX.Element;
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
declare type Nullable<T> = T | null;
declare type NonNullable<T> = T extends null | undefined ? never : T;
declare type Recordable<T = any> = Record<string, T>;
declare type ReadonlyRecordable<T = any> = {
readonly [key: string]: T;
};
declare type Indexable<T = any> = {
[key: string]: T;
};
declare type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
declare type TimeoutHandle = ReturnType<typeof setTimeout>;
declare type IntervalHandle = ReturnType<typeof setInterval>;
declare interface ChangeEvent extends Event {
target: HTMLInputElement;
}
declare interface WheelEvent {
path?: EventTarget[];
}
interface ImportMetaEnv extends ViteEnv {
__: unknown;
}
declare interface ViteEnv {
VITE_PORT: number;
VITE_USE_MOCK: boolean;
VITE_PUBLIC_PATH: string;
VITE_GLOB_APP_TITLE: string;
VITE_GLOB_APP_SHORT_NAME: string;
VITE_DROP_CONSOLE: boolean;
}
declare function parseInt(s: string | number, radix?: number): number;
declare function parseFloat(string: string | number): number;
namespace JSX {
// tslint:disable no-empty-interface
type Element = VNode;
// tslint:disable no-empty-interface
type ElementClass = ComponentRenderProxy;
interface ElementAttributesProperty {
$props: any;
}
interface IntrinsicElements {
[elem: string]: any;
}
interface IntrinsicAttributes {
[elem: string]: any;
}
}
}
declare module 'vue' {
export type JSXComponent<Props = any> =
| { new(): ComponentPublicInstance<Props> }
| FunctionalComponent<Props>;
}
declare interface Fn<T = any, R = T> {
(...arg: T[]): R;
}
declare interface PromiseFn<T = any, R = T> {
(...arg: T[]): Promise<R>;
}
declare type RefType<T> = T | null;
declare type EmitType = (event: string, ...args: any[]) => void;
declare type TargetContext = '_self' | '_blank';
declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
$el: T;
}
declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
declare module 'mitt' {
import mitt from 'mitt'
export default mitt
declare module '*.vue' {
import { DefineComponent } from 'vue';
const Component: DefineComponent<{}, {}, any>;
export default Component;
}
declare module 'blueimp-md5' {
import md5 from 'blueimp-md5'
export default md5
declare module 'virtual:*' {
const result: any;
export default result;
}
import { VNode, ComponentInternalInstance, HTMLAttributes, CSSProperties } from 'vue'
import { RuleObject } from 'ant-design-vue/lib/form/interface'
import { FormItemProps } from 'ant-design-vue/lib/form/FormItem'
import { FormProps, ValidationRule } from 'ant-design-vue/lib/form/Form'
declare global {
declare interface OptionItem {
label: string
value: string | number
[key: string]: any
}
declare type Rule =
| ValidationRule
| {
trigger?: 'blur' | 'change' | string['blur' | 'change']
}
declare interface FormItem extends Partial<typeof FormItemProps> {
type?:
| 'input'
| 'textarea'
| 'select'
| 'radio'
| 'checkbox'
| 'input-number'
| 'inputRange'
| 'switch'
| VNode
label?: string // 表单标签
field: string // 表单字段
value: any // 表单默认值
props?: Partial<
HTMLAttributes | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | any
> // 表单属性
rules?: Rule[] // 表单验证规则
options?: OptionItem[] // 可选项
eventObject?: object // 事件对象,例如:{ mousedown: doThis, mouseup: doThat } 将会动态绑定为:v-on="{ mousedown: doThis, mouseup: doThat }"
loading?: boolean // 异步数据是否加载
asyncValue?: (
formItem: FormItem,
formInstance: ComponentInternalInstance | null
) => Promise<any> // 异步数据
asyncOptions?: (
formItem: FormItem,
formInstance: ComponentInternalInstance | null
) => Promise<OptionItem[]> // 异步选项的数据
hidden?: boolean // 是否隐藏表单项
placeholder?: string
}
interface FormSchema extends Partial<typeof FormProps> {
style?: CSSProperties // 表单样式
formItemLayout?: object // 表单布局
watchKeys?: string[]
watchCallback?: (watchKeys: string[], { dynamicForm, modelRef }) => any
formItem: FormItem[]
}
}
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 '*.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.less' {
const classes: { readonly [key: string]: string }
export default classes
}
declare module '*.module.sass' {
const classes: { readonly [key: string]: string }
export default classes
}
declare module 'moment/locale/*' {
const LocaleMessage: { [key: string]: any }
export default LocaleMessage
}
declare module 'ant-design-vue/es/locale-provider/*' {
const LocaleMessage: { [key: string]: any }
export default LocaleMessage
}
// ant-design-vue/es/base
declare module 'ant-design-vue/es/base' {
class Base {
static install(vue: typeof Vue): void
}
export default Base
}
import Vue, { VNode } from 'vue'
declare module '*.tsx' {
import Vue from 'compatible-vue'
export default Vue
}
declare global {
namespace JSX {
// tslint:disable no-empty-interface
type Element = VNode
// tslint:disable no-empty-interface
type ElementClass = Vue
interface IntrinsicElements {
[elem: string]: any
}
}
}
declare module '*.vue' {
import { defineComponent } from 'vue'
const component: ReturnType<typeof defineComponent>
export default component
}
// declare module '*.vue' {
// import * as vue from 'vue';
// export declare const render: vue.RootRenderFunction<Element | DocumentFragment>
// }
// declare module '@vue/runtime-core' {
// interface ComponentCustomProperties {
// $createLoading: () => any
// }
// }
declare type Nullable<T> = T | null
declare type CustomizedHTMLElement<T> = HTMLElement & T
declare type Indexable<T> = {
[key: string]: T
}
import { ColumnProps, TableProps } from 'ant-design-vue/lib/table/interface'
declare global {
interface ActionOptions {
type: 'select' | 'button' | 'text' | 'popconfirm' // 控制类型,默认为a,可选: select | button | text
text: string
permission?: {
// 权限
action?: 'create' | 'delete' | 'update' | 'retrieve' // CRUD权限:创建(Create)、更新(Update)、读取(Retrieve)和删除(Delete)操作
effect?: 'disabled'
}
props?: any // 组件属性,v-bind="props"
func?: ({ text, record, index }, callback: (...rest) => any) => any // 动作事件触发回调
}
interface TableColumn extends ColumnProps {
title: string
dataIndex: string
width?: number
slots?: {
customRender: string
}
slotsType?: 'format' | 'link' | 'component'
slotsFunc?: (...rest) => any
actions?: ActionOptions[]
}
}
import { ComponentCustomProperties } from 'vue'
import { Store } from 'vuex'
declare module '@vue/runtime-core' {
// declare your own store states
interface State {
count: number
}
// provide typings for `this.$store`
interface ComponentCustomProperties {
$store: Store<State>
}
}
......@@ -21,6 +21,10 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
esbuild: {},
resolve: {
alias: [
{
find: /\/#\//,
replacement: pathResolve('types') + '/'
},
{
find: '@',
replacement: pathResolve('src') + '/'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册