1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 14:49:00 +08:00

Merge remote-tracking branch 'upstream/2.x' into 2.x

This commit is contained in:
leipu 2025-03-19 10:28:26 +08:00
commit 84fb1198d5
8 changed files with 1422 additions and 1844 deletions

View File

@ -13,42 +13,42 @@
},
"dependencies": {
"@arco-design/color": "^0.4.0",
"@vueuse/core": "^12.0.0",
"axios": "^1.7.9",
"@vueuse/core": "^12.7.0",
"axios": "^1.8.1",
"dayjs": "^1.11.13",
"echarts": "^5.5.1",
"echarts": "^5.6.0",
"lodash-es": "^4.17.21",
"naive-ui": "^2.40.3",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.1.3",
"naive-ui": "^2.41.0",
"pinia": "^3.0.1",
"pinia-plugin-persistedstate": "^4.2.0",
"vue": "^3.5.13",
"vue-echarts": "^7.0.3",
"vue-router": "^4.5.0",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.0",
"@iconify/json": "^2.2.282",
"@unocss/eslint-config": "^0.65.1",
"@unocss/eslint-plugin": "^0.65.1",
"@unocss/preset-rem-to-px": "^0.65.1",
"@antfu/eslint-config": "^4.3.0",
"@iconify/json": "^2.2.311",
"@unocss/eslint-config": "^66.0.0",
"@unocss/eslint-plugin": "^66.0.0",
"@unocss/preset-rem-to-px": "^66.0.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vitejs/plugin-vue-jsx": "^4.1.1",
"eslint": "^9.17.0",
"eslint-plugin-format": "^0.1.3",
"eslint": "^9.21.0",
"eslint-plugin-format": "^1.0.1",
"esno": "^4.8.0",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"lint-staged": "^15.2.11",
"rollup-plugin-visualizer": "^5.12.0",
"fs-extra": "^11.3.0",
"glob": "^11.0.1",
"lint-staged": "^15.4.3",
"rollup-plugin-visualizer": "^5.14.0",
"simple-git-hooks": "^2.11.1",
"taze": "^0.18.0",
"unocss": "^0.65.1",
"unplugin-auto-import": "^0.19.0",
"unplugin-vue-components": "^0.27.5",
"vite": "^6.0.3",
"taze": "^18.6.0",
"unocss": "^66.0.0",
"unplugin-auto-import": "^19.1.1",
"unplugin-vue-components": "^28.4.1",
"vite": "^6.2.0",
"vite-plugin-router-warn": "^1.0.0",
"vite-plugin-vue-devtools": "^7.6.8",
"vite-plugin-vue-devtools": "^7.7.2",
"vue3-intro-step": "^1.0.5"
},
"simple-git-hooks": {

3194
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/
import { cloneDeep } from 'lodash-es'
import { useForm, useModal } from '.'
const ACTIONS = {
@ -21,7 +22,7 @@ export function useCrud({ name, initForm = {}, doCreate, doDelete, doUpdate, ref
/** 新增 */
function handleAdd(row = {}, title) {
handleOpen({ action: 'add', title, row: { ...initForm, ...row } })
handleOpen({ action: 'add', title, row: Object.assign({}, cloneDeep(initForm), cloneDeep(row)) })
}
/** 修改 */

View File

@ -6,9 +6,11 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/
import { cloneDeep } from 'lodash-es'
export function useForm(initFormData = {}) {
const formRef = ref(null)
const formModel = ref({ ...initFormData })
const formModel = ref(cloneDeep(initFormData))
const rules = {
required: {
required: true,

View File

@ -40,7 +40,6 @@
</template>
<script setup>
import { lStorage } from '@/utils'
import Vue3IntroStep from 'vue3-intro-step'
const myIntroStep = shallowRef(null)
@ -101,19 +100,11 @@ const config = {
],
}
onMounted(() => {
if (lStorage.get('beginner-guide') === true)
return
show.value = true
})
function skip() {
lStorage.set('beginner-guide', true)
show.value = false
}
function done() {
lStorage.set('beginner-guide', true)
show.value = false
}

View File

@ -11,14 +11,14 @@ import { createStorage } from './storage'
const prefixKey = 'vue-naive-admin_'
export const createLocalStorage = function (option = {}) {
export function createLocalStorage(option = {}) {
return createStorage({
prefixKey: option.prefixKey || '',
storage: localStorage,
})
}
export const createSessionStorage = function (option = {}) {
export function createSessionStorage(option = {}) {
return createStorage({
prefixKey: option.prefixKey || '',
storage: sessionStorage,

View File

@ -98,7 +98,7 @@
<script setup>
import { sleep } from '@/utils'
const handleDelete = function () {
function handleDelete() {
$dialog.confirm({
content: '确认删除?',
confirm() {

View File

@ -8,13 +8,13 @@
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
import presetRemToPx from '@unocss/preset-rem-to-px'
import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
import { defineConfig, presetAttributify, presetIcons, presetWind3 } from 'unocss'
import { getIcons } from './build/index.js'
const icons = getIcons()
export default defineConfig({
presets: [
presetUno(),
presetWind3(),
presetAttributify(),
presetIcons({
warn: true,