Skip to content

Commit

Permalink
fix(deps): 修改readme eslit 更新记录 vite-defined等
Browse files Browse the repository at this point in the history
  • Loading branch information
zane0904 committed Sep 27, 2022
1 parent 9c136da commit 6f6f61e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 41 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = defineConfig({
'plugin:prettier/recommended',
],
rules: {
'vue/no-parsing-error': [2, { 'x-invalid-end-tag': false }],
'vue/no-multiple-template-root': 'off',
'vue/script-setup-uses-vars': 'error',
'@typescript-eslint/ban-ts-ignore': 'off',
Expand Down Expand Up @@ -84,6 +85,12 @@ module.exports = defineConfig({
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/no-mutating-props': 'error' /* 直接修改组件prop报错 */,
'vue/no-async-in-computed-properties':
'error' /* 禁止在计算属性中使用async */,
'vue/no-use-v-if-with-v-for':
'error' /* 不允许在同一个标签或组件上使用v-for和v-if */,
'vue/require-v-for-key': 'error' /** v-for上dom需要设置key */,
'vue/require-default-prop': 'off',
// 优先使用驼峰,element 组件除外
'vue/component-name-in-template-casing': [
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ dist-ssr
auto-import.d.ts
components.d.ts
naive.d.ts
stats.html
stats.html
.eslintcache
22 changes: 12 additions & 10 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
## v 1.0.0 (2022-9.19)

### 升级说明

- v1.0.0 版本发布正式版

<!--
## 1.0.0(2022-9.19)
## 1.0.1(2022-9.27)

### 升级说明

- v1.0.0 版本
- .eslintrc.js 新增规则
- .gitignore 忽略 eslintcache 文件
- README.md 更新浏览器信息
- **APP_INFO** eslint-disable-next-line no-underscore-dangle
- 更新墨菲安全检测信息

### ✨ Features

Expand All @@ -20,4 +17,9 @@

- **xx**
- xxx
-->

## v 1.0.0 (2022-9.19)

### 升级说明

- v1.0.0 版本发布正式版
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ V-Naive Admin is a free and open source middle and back office template. The lat

## security

[![OSCS Status](https://www.oscs1024.com/platform/badge/zane0904/v-naive-admin.svg?size=small)](https://www.murphysec.com/dr/1vtzlp7pg8nXvdUE47)
[![OSCS Status](https://www.oscs1024.com/platform/badge/zane0904/v-naive-admin.svg?size=small)](https://www.murphysec.com/dr/dplIyp3BOCug5k7RuF)

We have accessed [OSCS Murphy Security Scan](https://www.murphysec.com/dr/1vtzlp7pg8nXvdUE47)The admin source code has not been scanned out of any risk items. More than 100% of the items are harmless to humans and animals! You can use it with confidence. Of course, if you don't trust, we recommend that you read the clone admin source code before using it. We are 100% open source, and you can see if there are risks.
We have accessed [OSCS Murphy Security Scan](https://www.murphysec.com/dr/dplIyp3BOCug5k7RuF)The admin source code has not been scanned out of any risk items. More than 100% of the items are harmless to humans and animals! You can use it with confidence. Of course, if you don't trust, we recommend that you read the clone admin source code before using it. We are 100% open source, and you can see if there are risks.

## characteristic

Expand Down Expand Up @@ -194,9 +194,9 @@ The `Chrome 80+` browser is recommended for local development

Support modern browsers, not IE

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

## Relevant warehouse

Expand Down
10 changes: 5 additions & 5 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ V-Naive-Admin 是一个免费开源的中后台模版,使用了最新的`vue3 vi

## 安全

[![OSCS Status](https://www.oscs1024.com/platform/badge/zane0904/v-naive-admin.svg?size=small)](https://www.murphysec.com/dr/1vtzlp7pg8nXvdUE47)
[![OSCS Status](https://www.oscs1024.com/platform/badge/zane0904/v-naive-admin.svg?size=small)](https://www.murphysec.com/dr/dplIyp3BOCug5k7RuF)

我们已接入 [oscs 墨菲安全扫描](https://www.murphysec.com/dr/1vtzlp7pg8nXvdUE47) ,admin 源码中未被扫描出任何风险项,超越 100%的项目,确保人畜无害!大家可以放心使用,当然您如果扔不放心,我们推荐您在使用前 clone admin 源码亲自阅读一番,我们是 100%开源,是否有风险您一看便知.
我们已接入 [oscs 墨菲安全扫描](https://www.murphysec.com/dr/dplIyp3BOCug5k7RuF) ,admin 源码中未被扫描出任何风险项,超越 100%的项目,确保人畜无害!大家可以放心使用,当然您如果扔不放心,我们推荐您在使用前 clone admin 源码亲自阅读一番,我们是 100%开源,是否有风险您一看便知.

## 特性

Expand Down Expand Up @@ -193,9 +193,9 @@ pnpm build

支持现代浏览器, 不支持 IE

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

## 相关仓库

Expand Down
1 change: 1 addition & 0 deletions src/type/vite.defined.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Recordable } from 'vite-plugin-mock'

export {}
declare global {
// eslint-disable-next-line no-underscore-dangle
const __APP_INFO__: {
pkg: {
name: string
Expand Down
22 changes: 2 additions & 20 deletions src/utils/dataType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// 是否类数组 isArrayLike
// isNumeric检测是否为数字
const result = {},
toString = result.toString,
hasOwn = result.hasOwnProperty
toString = result.toString
/**
* @name 检测空对象
**/
Expand Down Expand Up @@ -55,29 +54,12 @@ export const toType = function toType(target: any) {
? (reg.exec(toString.call(target)) as unknown as string)[1].toLowerCase()
: type
}
/**
* @name 是否是纯粹对象
* 检测是否为“纯粹对象/标准普通”对象:obj.__proto__===Object.prototype
**/
export const isPlanObject = function isPlanObject(target: Object) {
let proto, Ctor
if (!target || toString.call(target) !== '[object Object]') {
return false
}
proto = Object.getPrototypeOf(target)
if (!proto) {
//匹配 Object.create(null)的情况
return true
}
Ctor = hasOwn.call(proto, 'constructor') && proto.constructor
return typeof Ctor === 'function' && Ctor === Object
}
/**
* @name 是否是类数组
* 判断的不算是很严谨,如有需要可扩展
**/
export const isArrayLike = function isArrayLike(target: any) {
let length = target && 'target' in target,
const length = target && 'target' in target,
type = toType(target)
return (
length === 0 ||
Expand Down

0 comments on commit 6f6f61e

Please sign in to comment.