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:
commit
84fb1198d5
46
package.json
46
package.json
@ -13,42 +13,42 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@arco-design/color": "^0.4.0",
|
"@arco-design/color": "^0.4.0",
|
||||||
"@vueuse/core": "^12.0.0",
|
"@vueuse/core": "^12.7.0",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.8.1",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"echarts": "^5.5.1",
|
"echarts": "^5.6.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"naive-ui": "^2.40.3",
|
"naive-ui": "^2.41.0",
|
||||||
"pinia": "^2.3.0",
|
"pinia": "^3.0.1",
|
||||||
"pinia-plugin-persistedstate": "^4.1.3",
|
"pinia-plugin-persistedstate": "^4.2.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-echarts": "^7.0.3",
|
"vue-echarts": "^7.0.3",
|
||||||
"vue-router": "^4.5.0",
|
"vue-router": "^4.5.0",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^3.12.0",
|
"@antfu/eslint-config": "^4.3.0",
|
||||||
"@iconify/json": "^2.2.282",
|
"@iconify/json": "^2.2.311",
|
||||||
"@unocss/eslint-config": "^0.65.1",
|
"@unocss/eslint-config": "^66.0.0",
|
||||||
"@unocss/eslint-plugin": "^0.65.1",
|
"@unocss/eslint-plugin": "^66.0.0",
|
||||||
"@unocss/preset-rem-to-px": "^0.65.1",
|
"@unocss/preset-rem-to-px": "^66.0.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.1",
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||||
"eslint": "^9.17.0",
|
"eslint": "^9.21.0",
|
||||||
"eslint-plugin-format": "^0.1.3",
|
"eslint-plugin-format": "^1.0.1",
|
||||||
"esno": "^4.8.0",
|
"esno": "^4.8.0",
|
||||||
"fs-extra": "^11.2.0",
|
"fs-extra": "^11.3.0",
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.1",
|
||||||
"lint-staged": "^15.2.11",
|
"lint-staged": "^15.4.3",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.14.0",
|
||||||
"simple-git-hooks": "^2.11.1",
|
"simple-git-hooks": "^2.11.1",
|
||||||
"taze": "^0.18.0",
|
"taze": "^18.6.0",
|
||||||
"unocss": "^0.65.1",
|
"unocss": "^66.0.0",
|
||||||
"unplugin-auto-import": "^0.19.0",
|
"unplugin-auto-import": "^19.1.1",
|
||||||
"unplugin-vue-components": "^0.27.5",
|
"unplugin-vue-components": "^28.4.1",
|
||||||
"vite": "^6.0.3",
|
"vite": "^6.2.0",
|
||||||
"vite-plugin-router-warn": "^1.0.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"
|
"vue3-intro-step": "^1.0.5"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
|
3194
pnpm-lock.yaml
generated
3194
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@
|
|||||||
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
|
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
|
||||||
**********************************/
|
**********************************/
|
||||||
|
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
import { useForm, useModal } from '.'
|
import { useForm, useModal } from '.'
|
||||||
|
|
||||||
const ACTIONS = {
|
const ACTIONS = {
|
||||||
@ -21,7 +22,7 @@ export function useCrud({ name, initForm = {}, doCreate, doDelete, doUpdate, ref
|
|||||||
|
|
||||||
/** 新增 */
|
/** 新增 */
|
||||||
function handleAdd(row = {}, title) {
|
function handleAdd(row = {}, title) {
|
||||||
handleOpen({ action: 'add', title, row: { ...initForm, ...row } })
|
handleOpen({ action: 'add', title, row: Object.assign({}, cloneDeep(initForm), cloneDeep(row)) })
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 修改 */
|
/** 修改 */
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
|
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
|
||||||
**********************************/
|
**********************************/
|
||||||
|
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
export function useForm(initFormData = {}) {
|
export function useForm(initFormData = {}) {
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
const formModel = ref({ ...initFormData })
|
const formModel = ref(cloneDeep(initFormData))
|
||||||
const rules = {
|
const rules = {
|
||||||
required: {
|
required: {
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { lStorage } from '@/utils'
|
|
||||||
import Vue3IntroStep from 'vue3-intro-step'
|
import Vue3IntroStep from 'vue3-intro-step'
|
||||||
|
|
||||||
const myIntroStep = shallowRef(null)
|
const myIntroStep = shallowRef(null)
|
||||||
@ -101,19 +100,11 @@ const config = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
if (lStorage.get('beginner-guide') === true)
|
|
||||||
return
|
|
||||||
show.value = true
|
|
||||||
})
|
|
||||||
|
|
||||||
function skip() {
|
function skip() {
|
||||||
lStorage.set('beginner-guide', true)
|
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function done() {
|
function done() {
|
||||||
lStorage.set('beginner-guide', true)
|
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,14 +11,14 @@ import { createStorage } from './storage'
|
|||||||
|
|
||||||
const prefixKey = 'vue-naive-admin_'
|
const prefixKey = 'vue-naive-admin_'
|
||||||
|
|
||||||
export const createLocalStorage = function (option = {}) {
|
export function createLocalStorage(option = {}) {
|
||||||
return createStorage({
|
return createStorage({
|
||||||
prefixKey: option.prefixKey || '',
|
prefixKey: option.prefixKey || '',
|
||||||
storage: localStorage,
|
storage: localStorage,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createSessionStorage = function (option = {}) {
|
export function createSessionStorage(option = {}) {
|
||||||
return createStorage({
|
return createStorage({
|
||||||
prefixKey: option.prefixKey || '',
|
prefixKey: option.prefixKey || '',
|
||||||
storage: sessionStorage,
|
storage: sessionStorage,
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { sleep } from '@/utils'
|
import { sleep } from '@/utils'
|
||||||
|
|
||||||
const handleDelete = function () {
|
function handleDelete() {
|
||||||
$dialog.confirm({
|
$dialog.confirm({
|
||||||
content: '确认删除?',
|
content: '确认删除?',
|
||||||
confirm() {
|
confirm() {
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
|
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
|
||||||
import presetRemToPx from '@unocss/preset-rem-to-px'
|
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'
|
import { getIcons } from './build/index.js'
|
||||||
|
|
||||||
const icons = getIcons()
|
const icons = getIcons()
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
presets: [
|
presets: [
|
||||||
presetUno(),
|
presetWind3(),
|
||||||
presetAttributify(),
|
presetAttributify(),
|
||||||
presetIcons({
|
presetIcons({
|
||||||
warn: true,
|
warn: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user