mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-04 13:42:27 +08:00
readme更新,删除无用文件
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
> 1%
|
|
||||||
last 2 versions
|
|
||||||
not dead
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
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
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
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,
|
|
||||||
};
|
|
||||||
8
.yarnrc
8
.yarnrc
@@ -1,8 +0,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"
|
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ Naive Ui Admin 是一个免费开源的中后台模版,使用了最新的`vue3
|
|||||||
- [x] 主控台
|
- [x] 主控台
|
||||||
- [ ] 监控页
|
- [ ] 监控页
|
||||||
- [x] 工作台
|
- [x] 工作台
|
||||||
|
- [x] 表单页面
|
||||||
|
|
||||||
### 页面组件
|
### 页面组件
|
||||||
#### ProTable
|
#### ProTable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, unref, ref } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useDesignSettingStore } from '@/store/modules/designSetting';
|
import { useDesignSettingStore } from '@/store/modules/designSetting';
|
||||||
|
|
||||||
export function useDesignSetting() {
|
export function useDesignSetting() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, unref, ref } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
||||||
|
|
||||||
export function useProjectSetting() {
|
export function useProjectSetting() {
|
||||||
|
|||||||
20
types/config.d.ts
vendored
20
types/config.d.ts
vendored
@@ -1,12 +1,10 @@
|
|||||||
export interface GlobConfig {
|
export interface ProjectSettingState {
|
||||||
// Site title
|
navMode: string,//导航模式
|
||||||
title: string;
|
navTheme: string,//导航风格
|
||||||
// Service interface url
|
headerSetting: object,//顶部设置
|
||||||
apiUrl: string;
|
showFooter: boolean, //页脚
|
||||||
// Upload url
|
menuSetting: object, //多标签
|
||||||
uploadUrl?: string;
|
multiTabsSetting: object,//多标签
|
||||||
// Service interface url prefix
|
crumbsSetting: object,//面包屑
|
||||||
urlPrefix?: string;
|
permissionMode: string//权限模式
|
||||||
// Project abbreviation
|
|
||||||
shortName: string;
|
|
||||||
}
|
}
|
||||||
|
|||||||
97
types/global.d.ts
vendored
Normal file
97
types/global.d.ts
vendored
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
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>;
|
||||||
|
}
|
||||||
22
types/index.d.ts
vendored
Normal file
22
types/index.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
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>;
|
||||||
13
types/modules.d.ts
vendored
13
types/modules.d.ts
vendored
@@ -1,9 +1,10 @@
|
|||||||
declare module 'mitt' {
|
declare module '*.vue' {
|
||||||
import mitt from 'mitt'
|
import { DefineComponent } from 'vue';
|
||||||
export default mitt
|
const Component: DefineComponent<{}, {}, any>;
|
||||||
|
export default Component;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'blueimp-md5' {
|
declare module 'virtual:*' {
|
||||||
import md5 from 'blueimp-md5'
|
const result: any;
|
||||||
export default md5
|
export default result;
|
||||||
}
|
}
|
||||||
|
|||||||
59
types/schema.d.ts
vendored
59
types/schema.d.ts
vendored
@@ -1,59 +0,0 @@
|
|||||||
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[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
67
types/shims/shims-app.d.ts
vendored
67
types/shims/shims-app.d.ts
vendored
@@ -1,67 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
18
types/shims/shims-tsx.d.ts
vendored
18
types/shims/shims-tsx.d.ts
vendored
@@ -1,18 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
24
types/shims/shims-vue.d.ts
vendored
24
types/shims/shims-vue.d.ts
vendored
@@ -1,24 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
||||||
27
types/tableColumn.d.ts
vendored
27
types/tableColumn.d.ts
vendored
@@ -1,27 +0,0 @@
|
|||||||
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[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
14
types/vuex.d.ts
vendored
14
types/vuex.d.ts
vendored
@@ -1,14 +0,0 @@
|
|||||||
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: {},
|
esbuild: {},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
|
{
|
||||||
|
find: /\/#\//,
|
||||||
|
replacement: pathResolve('types') + '/'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
find: '@',
|
find: '@',
|
||||||
replacement: pathResolve('src') + '/'
|
replacement: pathResolve('src') + '/'
|
||||||
|
|||||||
Reference in New Issue
Block a user