Compare commits
52
Commits
9e94573046
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
717c09a293 | ||
|
|
16365ceb29 | ||
|
|
90fc98fa6a | ||
|
|
b17d62fbed | ||
|
|
57dcbe2d37 | ||
|
|
b0dbad17fe | ||
|
|
5fc0e7a334 | ||
|
|
4959e402b7 | ||
|
|
aed501d308 | ||
|
|
de50ca5f66 | ||
|
|
f2db16447d | ||
|
|
e08155d2cc | ||
|
|
c59a2587dd | ||
|
|
cda60022be | ||
|
|
f0f2d2b8ed | ||
|
|
d4b7f659a1 | ||
|
|
024eef682e | ||
|
|
73fb136b91 | ||
|
|
0558261ba7 | ||
|
|
f8fc42dfec | ||
|
|
21b59e8272 | ||
|
|
3e12b596b2 | ||
|
|
0e521db11e | ||
|
|
df4d5848a2 | ||
|
|
7e407f68a6 | ||
|
|
c827568088 | ||
|
|
35039e1b09 | ||
|
|
7ae38cb277 | ||
|
|
daf2f1f7dc | ||
|
|
8a96ca3bc4 | ||
|
|
9617d80ff4 | ||
|
|
46fead9039 | ||
|
|
f20cd94eec | ||
|
|
2e38fdff5f | ||
|
|
5b078fa607 | ||
|
|
0cfcebdebd | ||
|
|
a859521682 | ||
|
|
f8425de967 | ||
|
|
a77af184df | ||
|
|
fdf572d3ef | ||
|
|
b4541b6f78 | ||
|
|
37a8db0055 | ||
|
|
b3ae608daa | ||
|
|
9e7e7215e9 | ||
|
|
6120d0b8fa | ||
|
|
280847acd1 | ||
|
|
00dd253202 | ||
|
|
cba8f966ac | ||
|
|
f3d5e881af | ||
|
|
5f9e951aa8 | ||
|
|
b455930798 | ||
|
|
351511a2db |
No files matched your search
@@ -1,3 +1,3 @@
|
||||
VITE_ENABLE_MOCK=false
|
||||
VITE_API_PREFIX=/api
|
||||
VITE_PROXY_ENDPOINT=http://localhost:8000
|
||||
VITE_PROXY_ENDPOINT=https://bright.yilibili.com/api
|
||||
+3
-1
@@ -1 +1,3 @@
|
||||
VITE_ENABLE_MOCK=true
|
||||
VITE_ENABLE_MOCK=false
|
||||
VITE_API_PREFIX=/api
|
||||
VITE_PROXY_ENDPOINT=http://localhost:3000
|
||||
Vendored
+20
-2
@@ -8,21 +8,39 @@ export {}
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
Copyright: typeof import('./src/components/Copyright.vue')['default']
|
||||
Editor: typeof import('./src/components/Editor.vue')['default']
|
||||
ImagePreviewer: typeof import('./src/components/ImagePreviewer.vue')['default']
|
||||
ImageUpload: typeof import('./src/components/ImageUpload.vue')['default']
|
||||
RegularPage: typeof import('./src/components/RegularPage.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
TAside: typeof import('tdesign-vue-next')['Aside']
|
||||
TAvatar: typeof import('tdesign-vue-next')['Avatar']
|
||||
TButton: typeof import('tdesign-vue-next')['Button']
|
||||
TCheckbox: typeof import('tdesign-vue-next')['Checkbox']
|
||||
TCard: typeof import('tdesign-vue-next')['Card']
|
||||
TCol: typeof import('tdesign-vue-next')['Col']
|
||||
TDialog: typeof import('tdesign-vue-next')['Dialog']
|
||||
TDropdown: typeof import('tdesign-vue-next')['Dropdown']
|
||||
TForm: typeof import('tdesign-vue-next')['Form']
|
||||
TFormItem: typeof import('tdesign-vue-next')['FormItem']
|
||||
THeader: typeof import('tdesign-vue-next')['Header']
|
||||
TIcon: typeof import('tdesign-vue-next')['Icon']
|
||||
TImageViewer: typeof import('tdesign-vue-next')['ImageViewer']
|
||||
TInput: typeof import('tdesign-vue-next')['Input']
|
||||
TInputNumber: typeof import('tdesign-vue-next')['InputNumber']
|
||||
TLayout: typeof import('tdesign-vue-next')['Layout']
|
||||
TLink: typeof import('tdesign-vue-next')['Link']
|
||||
TMenu: typeof import('tdesign-vue-next')['Menu']
|
||||
TMenuItem: typeof import('tdesign-vue-next')['MenuItem']
|
||||
TPopconfirm: typeof import('tdesign-vue-next')['Popconfirm']
|
||||
TRadioButton: typeof import('tdesign-vue-next')['RadioButton']
|
||||
TRadioGroup: typeof import('tdesign-vue-next')['RadioGroup']
|
||||
TRow: typeof import('tdesign-vue-next')['Row']
|
||||
TSelect: typeof import('tdesign-vue-next')['Select']
|
||||
TSpace: typeof import('tdesign-vue-next')['Space']
|
||||
TTable: typeof import('tdesign-vue-next')['Table']
|
||||
TTag: typeof import('tdesign-vue-next')['Tag']
|
||||
TTagInput: typeof import('tdesign-vue-next')['TagInput']
|
||||
TTextarea: typeof import('tdesign-vue-next')['Textarea']
|
||||
TUpload: typeof import('tdesign-vue-next')['Upload']
|
||||
}
|
||||
}
|
||||
@@ -1 +1,15 @@
|
||||
/// <reference types="vite/client" />
|
||||
import { SlateDescendant, SlateElement, SlateText, Toolbar } from '@wangeditor/editor'
|
||||
|
||||
declare module '@wangeditor/editor' {
|
||||
// 扩展 Text
|
||||
interface SlateText {
|
||||
text: string
|
||||
}
|
||||
|
||||
// 扩展 Element
|
||||
interface SlateElement {
|
||||
type: string
|
||||
children: SlateDescendant[]
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Yili Admin</title>
|
||||
<title>布兰德后台管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"@tiptap/pm": "^2.8.0",
|
||||
"@tiptap/starter-kit": "^2.8.0",
|
||||
"@tiptap/vue-3": "^2.8.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"axios": "^1.7.7",
|
||||
"mockjs": "^1.1.0",
|
||||
"pinia": "^2.2.2",
|
||||
|
||||
Generated
+490
@@ -20,6 +20,12 @@ importers:
|
||||
'@tiptap/vue-3':
|
||||
specifier: ^2.8.0
|
||||
version: 2.8.0(@tiptap/core@2.8.0(@tiptap/pm@2.8.0))(@tiptap/pm@2.8.0)(vue@3.5.8(typescript@5.4.5))
|
||||
'@wangeditor/editor':
|
||||
specifier: ^5.1.23
|
||||
version: 5.1.23
|
||||
'@wangeditor/editor-for-vue':
|
||||
specifier: ^5.1.12
|
||||
version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.8(typescript@5.4.5))
|
||||
axios:
|
||||
specifier: ^1.7.7
|
||||
version: 1.7.7
|
||||
@@ -557,46 +563,55 @@ packages:
|
||||
resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.22.4':
|
||||
resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.22.4':
|
||||
resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.22.4':
|
||||
resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-powerpc64le-gnu@4.22.4':
|
||||
resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.22.4':
|
||||
resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.22.4':
|
||||
resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.22.4':
|
||||
resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.22.4':
|
||||
resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-win32-arm64-msvc@4.22.4':
|
||||
resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==}
|
||||
@@ -762,6 +777,9 @@ packages:
|
||||
'@tiptap/pm': ^2.7.0
|
||||
vue: ^3.0.0
|
||||
|
||||
'@transloadit/prettier-bytes@0.0.7':
|
||||
resolution: {integrity: sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==}
|
||||
|
||||
'@tsconfig/node20@20.1.4':
|
||||
resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==}
|
||||
|
||||
@@ -771,6 +789,9 @@ packages:
|
||||
'@types/estree@1.0.6':
|
||||
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
|
||||
|
||||
'@types/event-emitter@0.3.5':
|
||||
resolution: {integrity: sha512-zx2/Gg0Eg7gwEiOIIh5w9TrhKKTeQh7CPCOPNc0el4pLSwzebA8SmnHwZs2dWlLONvyulykSwGSQxQHLhjGLvQ==}
|
||||
|
||||
'@types/jsdom@21.1.7':
|
||||
resolution: {integrity: sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==}
|
||||
|
||||
@@ -862,6 +883,23 @@ packages:
|
||||
'@ungap/structured-clone@1.2.0':
|
||||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||
|
||||
'@uppy/companion-client@2.2.2':
|
||||
resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==}
|
||||
|
||||
'@uppy/core@2.3.4':
|
||||
resolution: {integrity: sha512-iWAqppC8FD8mMVqewavCz+TNaet6HPXitmGXpGGREGrakZ4FeuWytVdrelydzTdXx6vVKkOmI2FLztGg73sENQ==}
|
||||
|
||||
'@uppy/store-default@2.1.1':
|
||||
resolution: {integrity: sha512-xnpTxvot2SeAwGwbvmJ899ASk5tYXhmZzD/aCFsXePh/v8rNvR2pKlcQUH7cF/y4baUGq3FHO/daKCok/mpKqQ==}
|
||||
|
||||
'@uppy/utils@4.1.3':
|
||||
resolution: {integrity: sha512-nTuMvwWYobnJcytDO3t+D6IkVq/Qs4Xv3vyoEZ+Iaf8gegZP+rEyoaFT2CK5XLRMienPyqRqNbIfRuFaOWSIFw==}
|
||||
|
||||
'@uppy/xhr-upload@2.1.3':
|
||||
resolution: {integrity: sha512-YWOQ6myBVPs+mhNjfdWsQyMRWUlrDLMoaG7nvf/G6Y3GKZf8AyjFDjvvJ49XWQ+DaZOftGkHmF1uh/DBeGivJQ==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^2.3.3
|
||||
|
||||
'@vitejs/plugin-vue@5.1.4':
|
||||
resolution: {integrity: sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
@@ -986,6 +1024,93 @@ packages:
|
||||
'@vue/tsconfig@0.5.1':
|
||||
resolution: {integrity: sha512-VcZK7MvpjuTPx2w6blwnwZAu5/LgBUtejFOi3pPGQFXQN5Ela03FUtd2Qtg4yWGGissVL0dr6Ro1LfOFh+PCuQ==}
|
||||
|
||||
'@wangeditor/basic-modules@1.1.7':
|
||||
resolution: {integrity: sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==}
|
||||
peerDependencies:
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
lodash.throttle: ^4.1.1
|
||||
nanoid: ^3.2.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/code-highlight@1.0.3':
|
||||
resolution: {integrity: sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw==}
|
||||
peerDependencies:
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/core@1.1.19':
|
||||
resolution: {integrity: sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^2.1.1
|
||||
'@uppy/xhr-upload': ^2.0.3
|
||||
dom7: ^3.0.0
|
||||
is-hotkey: ^0.2.0
|
||||
lodash.camelcase: ^4.3.0
|
||||
lodash.clonedeep: ^4.5.0
|
||||
lodash.debounce: ^4.0.8
|
||||
lodash.foreach: ^4.5.0
|
||||
lodash.isequal: ^4.5.0
|
||||
lodash.throttle: ^4.1.1
|
||||
lodash.toarray: ^4.4.0
|
||||
nanoid: ^3.2.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/editor-for-vue@5.1.12':
|
||||
resolution: {integrity: sha512-0Ds3D8I+xnpNWezAeO7HmPRgTfUxHLMd9JKcIw+QzvSmhC5xUHbpCcLU+KLmeBKTR/zffnS5GQo6qi3GhTMJWQ==}
|
||||
peerDependencies:
|
||||
'@wangeditor/editor': '>=5.1.0'
|
||||
vue: ^3.0.5
|
||||
|
||||
'@wangeditor/editor@5.1.23':
|
||||
resolution: {integrity: sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ==}
|
||||
|
||||
'@wangeditor/list-module@1.0.5':
|
||||
resolution: {integrity: sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ==}
|
||||
peerDependencies:
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/table-module@1.1.4':
|
||||
resolution: {integrity: sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w==}
|
||||
peerDependencies:
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
lodash.isequal: ^4.5.0
|
||||
lodash.throttle: ^4.1.1
|
||||
nanoid: ^3.2.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/upload-image-module@1.0.2':
|
||||
resolution: {integrity: sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^2.0.3
|
||||
'@uppy/xhr-upload': ^2.0.3
|
||||
'@wangeditor/basic-modules': 1.x
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
lodash.foreach: ^4.5.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
'@wangeditor/video-module@1.1.4':
|
||||
resolution: {integrity: sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^2.1.4
|
||||
'@uppy/xhr-upload': ^2.0.7
|
||||
'@wangeditor/core': 1.x
|
||||
dom7: ^3.0.0
|
||||
nanoid: ^3.2.0
|
||||
slate: ^0.72.0
|
||||
snabbdom: ^3.1.0
|
||||
|
||||
abbrev@2.0.0:
|
||||
resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==}
|
||||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
@@ -1190,6 +1315,9 @@ packages:
|
||||
compatx@0.1.8:
|
||||
resolution: {integrity: sha512-jcbsEAR81Bt5s1qOFymBufmCbXCXbk0Ql+K5ouj6gCyx2yHlu6AgmGIi9HxfKixpUDO5bCFJUHQ5uM6ecbTebw==}
|
||||
|
||||
compute-scroll-into-view@1.0.20:
|
||||
resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==}
|
||||
|
||||
computeds@0.0.1:
|
||||
resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==}
|
||||
|
||||
@@ -1236,6 +1364,10 @@ packages:
|
||||
csstype@3.1.3:
|
||||
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
||||
|
||||
d@1.0.2:
|
||||
resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==}
|
||||
engines: {node: '>=0.12'}
|
||||
|
||||
data-urls@5.0.0:
|
||||
resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -1319,6 +1451,9 @@ packages:
|
||||
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
|
||||
dom7@3.0.0:
|
||||
resolution: {integrity: sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g==}
|
||||
|
||||
dotenv@16.4.5:
|
||||
resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -1354,6 +1489,17 @@ packages:
|
||||
error-stack-parser-es@0.1.5:
|
||||
resolution: {integrity: sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==}
|
||||
|
||||
es5-ext@0.10.64:
|
||||
resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
||||
es6-iterator@2.0.3:
|
||||
resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==}
|
||||
|
||||
es6-symbol@3.1.4:
|
||||
resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==}
|
||||
engines: {node: '>=0.12'}
|
||||
|
||||
esbuild@0.21.5:
|
||||
resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -1417,6 +1563,10 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
|
||||
esniff@2.0.1:
|
||||
resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
||||
espree@9.6.1:
|
||||
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
@@ -1443,10 +1593,16 @@ packages:
|
||||
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
event-emitter@0.3.5:
|
||||
resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==}
|
||||
|
||||
execa@8.0.1:
|
||||
resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
|
||||
engines: {node: '>=16.17'}
|
||||
|
||||
ext@1.7.0:
|
||||
resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==}
|
||||
|
||||
fast-deep-equal@3.1.3:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
|
||||
@@ -1614,6 +1770,9 @@ packages:
|
||||
resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
html-void-elements@2.0.1:
|
||||
resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==}
|
||||
|
||||
http-proxy-agent@7.0.2:
|
||||
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
|
||||
engines: {node: '>= 14'}
|
||||
@@ -1626,6 +1785,9 @@ packages:
|
||||
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
|
||||
engines: {node: '>=16.17.0'}
|
||||
|
||||
i18next@20.6.1:
|
||||
resolution: {integrity: sha512-yCMYTMEJ9ihCwEQQ3phLo7I/Pwycf8uAx+sRHwwk5U9Aui/IZYgQRyMqXafQOw5QQ7DM1Z+WyEXWIqSuJHhG2A==}
|
||||
|
||||
iconv-lite@0.6.3:
|
||||
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -1634,6 +1796,9 @@ packages:
|
||||
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
|
||||
engines: {node: '>= 4'}
|
||||
|
||||
immer@9.0.21:
|
||||
resolution: {integrity: sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==}
|
||||
|
||||
import-fresh@3.3.0:
|
||||
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -1677,6 +1842,9 @@ packages:
|
||||
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-hotkey@0.2.0:
|
||||
resolution: {integrity: sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==}
|
||||
|
||||
is-inside-container@1.0.0:
|
||||
resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
|
||||
engines: {node: '>=14.16'}
|
||||
@@ -1690,6 +1858,10 @@ packages:
|
||||
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-plain-object@5.0.0:
|
||||
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-potential-custom-element-name@1.0.1:
|
||||
resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==}
|
||||
|
||||
@@ -1697,6 +1869,9 @@ packages:
|
||||
resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
|
||||
is-url@1.2.4:
|
||||
resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==}
|
||||
|
||||
is-what@4.1.16:
|
||||
resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
|
||||
engines: {node: '>=12.13'}
|
||||
@@ -1812,15 +1987,36 @@ packages:
|
||||
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
lodash.camelcase@4.3.0:
|
||||
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
|
||||
|
||||
lodash.castarray@4.4.0:
|
||||
resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==}
|
||||
|
||||
lodash.clonedeep@4.5.0:
|
||||
resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==}
|
||||
|
||||
lodash.debounce@4.0.8:
|
||||
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
|
||||
|
||||
lodash.foreach@4.5.0:
|
||||
resolution: {integrity: sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==}
|
||||
|
||||
lodash.isequal@4.5.0:
|
||||
resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==}
|
||||
|
||||
lodash.isplainobject@4.0.6:
|
||||
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
|
||||
|
||||
lodash.merge@4.6.2:
|
||||
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
|
||||
|
||||
lodash.throttle@4.1.1:
|
||||
resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==}
|
||||
|
||||
lodash.toarray@4.4.0:
|
||||
resolution: {integrity: sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw==}
|
||||
|
||||
lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
|
||||
@@ -1862,6 +2058,9 @@ packages:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
mime-match@1.0.2:
|
||||
resolution: {integrity: sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==}
|
||||
|
||||
mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@@ -1932,6 +2131,9 @@ packages:
|
||||
mz@2.7.0:
|
||||
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
|
||||
|
||||
namespace-emitter@2.0.1:
|
||||
resolution: {integrity: sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==}
|
||||
|
||||
nanoid@3.3.7:
|
||||
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
@@ -1940,6 +2142,9 @@ packages:
|
||||
natural-compare@1.4.0:
|
||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||
|
||||
next-tick@1.1.0:
|
||||
resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==}
|
||||
|
||||
node-fetch-native@1.6.4:
|
||||
resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==}
|
||||
|
||||
@@ -2179,6 +2384,9 @@ packages:
|
||||
resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
|
||||
preact@10.24.3:
|
||||
resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==}
|
||||
|
||||
prelude-ls@1.2.1:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -2196,6 +2404,10 @@ packages:
|
||||
resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
|
||||
prismjs@1.29.0:
|
||||
resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
prosemirror-changeset@2.2.1:
|
||||
resolution: {integrity: sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==}
|
||||
|
||||
@@ -2345,6 +2557,9 @@ packages:
|
||||
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
|
||||
engines: {node: '>=v12.22.7'}
|
||||
|
||||
scroll-into-view-if-needed@2.2.31:
|
||||
resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==}
|
||||
|
||||
scule@1.3.0:
|
||||
resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==}
|
||||
|
||||
@@ -2390,6 +2605,18 @@ packages:
|
||||
resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
||||
slate-history@0.66.0:
|
||||
resolution: {integrity: sha512-6MWpxGQZiMvSINlCbMW43E2YBSVMCMCIwQfBzGssjWw4kb0qfvj0pIdblWNRQZD0hR6WHP+dHHgGSeVdMWzfng==}
|
||||
peerDependencies:
|
||||
slate: '>=0.65.3'
|
||||
|
||||
slate@0.72.8:
|
||||
resolution: {integrity: sha512-/nJwTswQgnRurpK+bGJFH1oM7naD5qDmHd89JyiKNT2oOKD8marW0QSBtuFnwEbL5aGCS8AmrhXQgNOsn4osAw==}
|
||||
|
||||
snabbdom@3.6.2:
|
||||
resolution: {integrity: sha512-ig5qOnCDbugFntKi6c7Xlib8bA6xiJVk8O+WdFrV3wxbMqeHO0hXFQC4nAhPVWfZfi8255lcZkNhtIBINCc4+Q==}
|
||||
engines: {node: '>=12.17.0'}
|
||||
|
||||
sortablejs@1.15.3:
|
||||
resolution: {integrity: sha512-zdK3/kwwAK1cJgy1rwl1YtNTbRmc8qW/+vgXf75A7NHag5of4pyI6uK86ktmQETyWRH7IGaE73uZOOBcGxgqZg==}
|
||||
|
||||
@@ -2401,6 +2628,9 @@ packages:
|
||||
resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
ssr-window@3.0.0:
|
||||
resolution: {integrity: sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA==}
|
||||
|
||||
stackback@0.0.2:
|
||||
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
|
||||
|
||||
@@ -2501,6 +2731,9 @@ packages:
|
||||
tiny-emitter@2.1.0:
|
||||
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
||||
|
||||
tiny-warning@1.0.3:
|
||||
resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==}
|
||||
|
||||
tinybench@2.9.0:
|
||||
resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
|
||||
|
||||
@@ -2562,6 +2795,9 @@ packages:
|
||||
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
type@2.7.3:
|
||||
resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==}
|
||||
|
||||
typescript@5.4.5:
|
||||
resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==}
|
||||
engines: {node: '>=14.17'}
|
||||
@@ -2840,6 +3076,9 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
hasBin: true
|
||||
|
||||
wildcard@1.1.2:
|
||||
resolution: {integrity: sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng==}
|
||||
|
||||
word-wrap@1.2.5:
|
||||
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -3548,12 +3787,16 @@ snapshots:
|
||||
'@tiptap/pm': 2.8.0
|
||||
vue: 3.5.8(typescript@5.4.5)
|
||||
|
||||
'@transloadit/prettier-bytes@0.0.7': {}
|
||||
|
||||
'@tsconfig/node20@20.1.4': {}
|
||||
|
||||
'@types/estree@1.0.5': {}
|
||||
|
||||
'@types/estree@1.0.6': {}
|
||||
|
||||
'@types/event-emitter@0.3.5': {}
|
||||
|
||||
'@types/jsdom@21.1.7':
|
||||
dependencies:
|
||||
'@types/node': 20.16.5
|
||||
@@ -3666,6 +3909,35 @@ snapshots:
|
||||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
|
||||
'@uppy/companion-client@2.2.2':
|
||||
dependencies:
|
||||
'@uppy/utils': 4.1.3
|
||||
namespace-emitter: 2.0.1
|
||||
|
||||
'@uppy/core@2.3.4':
|
||||
dependencies:
|
||||
'@transloadit/prettier-bytes': 0.0.7
|
||||
'@uppy/store-default': 2.1.1
|
||||
'@uppy/utils': 4.1.3
|
||||
lodash.throttle: 4.1.1
|
||||
mime-match: 1.0.2
|
||||
namespace-emitter: 2.0.1
|
||||
nanoid: 3.3.7
|
||||
preact: 10.24.3
|
||||
|
||||
'@uppy/store-default@2.1.1': {}
|
||||
|
||||
'@uppy/utils@4.1.3':
|
||||
dependencies:
|
||||
lodash.throttle: 4.1.1
|
||||
|
||||
'@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4)':
|
||||
dependencies:
|
||||
'@uppy/companion-client': 2.2.2
|
||||
'@uppy/core': 2.3.4
|
||||
'@uppy/utils': 4.1.3
|
||||
nanoid: 3.3.7
|
||||
|
||||
'@vitejs/plugin-vue@5.1.4(vite@5.4.7(@types/node@20.16.5))(vue@3.5.8(typescript@5.4.5))':
|
||||
dependencies:
|
||||
vite: 5.4.7(@types/node@20.16.5)
|
||||
@@ -3870,6 +4142,114 @@ snapshots:
|
||||
|
||||
'@vue/tsconfig@0.5.1': {}
|
||||
|
||||
'@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
is-url: 1.2.4
|
||||
lodash.throttle: 4.1.1
|
||||
nanoid: 3.3.7
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/code-highlight@1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
prismjs: 1.29.0
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@types/event-emitter': 0.3.5
|
||||
'@uppy/core': 2.3.4
|
||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||
dom7: 3.0.0
|
||||
event-emitter: 0.3.5
|
||||
html-void-elements: 2.0.1
|
||||
i18next: 20.6.1
|
||||
is-hotkey: 0.2.0
|
||||
lodash.camelcase: 4.3.0
|
||||
lodash.clonedeep: 4.5.0
|
||||
lodash.debounce: 4.0.8
|
||||
lodash.foreach: 4.5.0
|
||||
lodash.isequal: 4.5.0
|
||||
lodash.throttle: 4.1.1
|
||||
lodash.toarray: 4.4.0
|
||||
nanoid: 3.3.7
|
||||
scroll-into-view-if-needed: 2.2.31
|
||||
slate: 0.72.8
|
||||
slate-history: 0.66.0(slate@0.72.8)
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.8(typescript@5.4.5))':
|
||||
dependencies:
|
||||
'@wangeditor/editor': 5.1.23
|
||||
vue: 3.5.8(typescript@5.4.5)
|
||||
|
||||
'@wangeditor/editor@5.1.23':
|
||||
dependencies:
|
||||
'@uppy/core': 2.3.4
|
||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/code-highlight': 1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/list-module': 1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/table-module': 1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/upload-image-module': 1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/video-module': 1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
is-hotkey: 0.2.0
|
||||
lodash.camelcase: 4.3.0
|
||||
lodash.clonedeep: 4.5.0
|
||||
lodash.debounce: 4.0.8
|
||||
lodash.foreach: 4.5.0
|
||||
lodash.isequal: 4.5.0
|
||||
lodash.throttle: 4.1.1
|
||||
lodash.toarray: 4.4.0
|
||||
nanoid: 3.3.7
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/list-module@1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/table-module@1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
lodash.isequal: 4.5.0
|
||||
lodash.throttle: 4.1.1
|
||||
nanoid: 3.3.7
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/upload-image-module@1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@uppy/core': 2.3.4
|
||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
lodash.foreach: 4.5.0
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
'@wangeditor/video-module@1.1.4(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2))(dom7@3.0.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)':
|
||||
dependencies:
|
||||
'@uppy/core': 2.3.4
|
||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.7)(slate@0.72.8)(snabbdom@3.6.2)
|
||||
dom7: 3.0.0
|
||||
nanoid: 3.3.7
|
||||
slate: 0.72.8
|
||||
snabbdom: 3.6.2
|
||||
|
||||
abbrev@2.0.0: {}
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.12.1):
|
||||
@@ -4079,6 +4459,8 @@ snapshots:
|
||||
|
||||
compatx@0.1.8: {}
|
||||
|
||||
compute-scroll-into-view@1.0.20: {}
|
||||
|
||||
computeds@0.0.1: {}
|
||||
|
||||
concat-map@0.0.1: {}
|
||||
@@ -4123,6 +4505,11 @@ snapshots:
|
||||
|
||||
csstype@3.1.3: {}
|
||||
|
||||
d@1.0.2:
|
||||
dependencies:
|
||||
es5-ext: 0.10.64
|
||||
type: 2.7.3
|
||||
|
||||
data-urls@5.0.0:
|
||||
dependencies:
|
||||
whatwg-mimetype: 4.0.0
|
||||
@@ -4181,6 +4568,10 @@ snapshots:
|
||||
dependencies:
|
||||
esutils: 2.0.3
|
||||
|
||||
dom7@3.0.0:
|
||||
dependencies:
|
||||
ssr-window: 3.0.0
|
||||
|
||||
dotenv@16.4.5: {}
|
||||
|
||||
eastasianwidth@0.2.0: {}
|
||||
@@ -4206,6 +4597,24 @@ snapshots:
|
||||
|
||||
error-stack-parser-es@0.1.5: {}
|
||||
|
||||
es5-ext@0.10.64:
|
||||
dependencies:
|
||||
es6-iterator: 2.0.3
|
||||
es6-symbol: 3.1.4
|
||||
esniff: 2.0.1
|
||||
next-tick: 1.1.0
|
||||
|
||||
es6-iterator@2.0.3:
|
||||
dependencies:
|
||||
d: 1.0.2
|
||||
es5-ext: 0.10.64
|
||||
es6-symbol: 3.1.4
|
||||
|
||||
es6-symbol@3.1.4:
|
||||
dependencies:
|
||||
d: 1.0.2
|
||||
ext: 1.7.0
|
||||
|
||||
esbuild@0.21.5:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.21.5
|
||||
@@ -4319,6 +4728,13 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
esniff@2.0.1:
|
||||
dependencies:
|
||||
d: 1.0.2
|
||||
es5-ext: 0.10.64
|
||||
event-emitter: 0.3.5
|
||||
type: 2.7.3
|
||||
|
||||
espree@9.6.1:
|
||||
dependencies:
|
||||
acorn: 8.12.1
|
||||
@@ -4343,6 +4759,11 @@ snapshots:
|
||||
|
||||
esutils@2.0.3: {}
|
||||
|
||||
event-emitter@0.3.5:
|
||||
dependencies:
|
||||
d: 1.0.2
|
||||
es5-ext: 0.10.64
|
||||
|
||||
execa@8.0.1:
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
@@ -4355,6 +4776,10 @@ snapshots:
|
||||
signal-exit: 4.1.0
|
||||
strip-final-newline: 3.0.0
|
||||
|
||||
ext@1.7.0:
|
||||
dependencies:
|
||||
type: 2.7.3
|
||||
|
||||
fast-deep-equal@3.1.3: {}
|
||||
|
||||
fast-diff@1.3.0: {}
|
||||
@@ -4535,6 +4960,8 @@ snapshots:
|
||||
|
||||
html-tags@3.3.1: {}
|
||||
|
||||
html-void-elements@2.0.1: {}
|
||||
|
||||
http-proxy-agent@7.0.2:
|
||||
dependencies:
|
||||
agent-base: 7.1.1
|
||||
@@ -4551,12 +4978,18 @@ snapshots:
|
||||
|
||||
human-signals@5.0.0: {}
|
||||
|
||||
i18next@20.6.1:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.25.6
|
||||
|
||||
iconv-lite@0.6.3:
|
||||
dependencies:
|
||||
safer-buffer: 2.1.2
|
||||
|
||||
ignore@5.3.2: {}
|
||||
|
||||
immer@9.0.21: {}
|
||||
|
||||
import-fresh@3.3.0:
|
||||
dependencies:
|
||||
parent-module: 1.0.1
|
||||
@@ -4591,6 +5024,8 @@ snapshots:
|
||||
dependencies:
|
||||
is-extglob: 2.1.1
|
||||
|
||||
is-hotkey@0.2.0: {}
|
||||
|
||||
is-inside-container@1.0.0:
|
||||
dependencies:
|
||||
is-docker: 3.0.0
|
||||
@@ -4599,10 +5034,14 @@ snapshots:
|
||||
|
||||
is-path-inside@3.0.3: {}
|
||||
|
||||
is-plain-object@5.0.0: {}
|
||||
|
||||
is-potential-custom-element-name@1.0.1: {}
|
||||
|
||||
is-stream@3.0.0: {}
|
||||
|
||||
is-url@1.2.4: {}
|
||||
|
||||
is-what@4.1.16: {}
|
||||
|
||||
is-wsl@3.1.0:
|
||||
@@ -4719,12 +5158,26 @@ snapshots:
|
||||
dependencies:
|
||||
p-locate: 5.0.0
|
||||
|
||||
lodash.camelcase@4.3.0: {}
|
||||
|
||||
lodash.castarray@4.4.0: {}
|
||||
|
||||
lodash.clonedeep@4.5.0: {}
|
||||
|
||||
lodash.debounce@4.0.8: {}
|
||||
|
||||
lodash.foreach@4.5.0: {}
|
||||
|
||||
lodash.isequal@4.5.0: {}
|
||||
|
||||
lodash.isplainobject@4.0.6: {}
|
||||
|
||||
lodash.merge@4.6.2: {}
|
||||
|
||||
lodash.throttle@4.1.1: {}
|
||||
|
||||
lodash.toarray@4.4.0: {}
|
||||
|
||||
lodash@4.17.21: {}
|
||||
|
||||
loupe@2.3.7:
|
||||
@@ -4765,6 +5218,10 @@ snapshots:
|
||||
|
||||
mime-db@1.52.0: {}
|
||||
|
||||
mime-match@1.0.2:
|
||||
dependencies:
|
||||
wildcard: 1.1.2
|
||||
|
||||
mime-types@2.1.35:
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
@@ -4827,10 +5284,14 @@ snapshots:
|
||||
object-assign: 4.1.1
|
||||
thenify-all: 1.6.0
|
||||
|
||||
namespace-emitter@2.0.1: {}
|
||||
|
||||
nanoid@3.3.7: {}
|
||||
|
||||
natural-compare@1.4.0: {}
|
||||
|
||||
next-tick@1.1.0: {}
|
||||
|
||||
node-fetch-native@1.6.4: {}
|
||||
|
||||
node-releases@2.0.18: {}
|
||||
@@ -5043,6 +5504,8 @@ snapshots:
|
||||
picocolors: 1.1.0
|
||||
source-map-js: 1.2.1
|
||||
|
||||
preact@10.24.3: {}
|
||||
|
||||
prelude-ls@1.2.1: {}
|
||||
|
||||
prettier-linter-helpers@1.0.0:
|
||||
@@ -5057,6 +5520,8 @@ snapshots:
|
||||
ansi-styles: 5.2.0
|
||||
react-is: 18.3.1
|
||||
|
||||
prismjs@1.29.0: {}
|
||||
|
||||
prosemirror-changeset@2.2.1:
|
||||
dependencies:
|
||||
prosemirror-transform: 1.10.0
|
||||
@@ -5252,6 +5717,10 @@ snapshots:
|
||||
dependencies:
|
||||
xmlchars: 2.2.0
|
||||
|
||||
scroll-into-view-if-needed@2.2.31:
|
||||
dependencies:
|
||||
compute-scroll-into-view: 1.0.20
|
||||
|
||||
scule@1.3.0: {}
|
||||
|
||||
select@1.1.2: {}
|
||||
@@ -5282,12 +5751,27 @@ snapshots:
|
||||
|
||||
slash@5.1.0: {}
|
||||
|
||||
slate-history@0.66.0(slate@0.72.8):
|
||||
dependencies:
|
||||
is-plain-object: 5.0.0
|
||||
slate: 0.72.8
|
||||
|
||||
slate@0.72.8:
|
||||
dependencies:
|
||||
immer: 9.0.21
|
||||
is-plain-object: 5.0.0
|
||||
tiny-warning: 1.0.3
|
||||
|
||||
snabbdom@3.6.2: {}
|
||||
|
||||
sortablejs@1.15.3: {}
|
||||
|
||||
source-map-js@1.2.1: {}
|
||||
|
||||
speakingurl@14.0.1: {}
|
||||
|
||||
ssr-window@3.0.0: {}
|
||||
|
||||
stackback@0.0.2: {}
|
||||
|
||||
statuses@1.5.0: {}
|
||||
@@ -5425,6 +5909,8 @@ snapshots:
|
||||
|
||||
tiny-emitter@2.1.0: {}
|
||||
|
||||
tiny-warning@1.0.3: {}
|
||||
|
||||
tinybench@2.9.0: {}
|
||||
|
||||
tinycolor2@1.6.0: {}
|
||||
@@ -5472,6 +5958,8 @@ snapshots:
|
||||
|
||||
type-fest@0.20.2: {}
|
||||
|
||||
type@2.7.3: {}
|
||||
|
||||
typescript@5.4.5: {}
|
||||
|
||||
uc.micro@2.1.0: {}
|
||||
@@ -5801,6 +6289,8 @@ snapshots:
|
||||
siginfo: 2.0.0
|
||||
stackback: 0.0.2
|
||||
|
||||
wildcard@1.1.2: {}
|
||||
|
||||
word-wrap@1.2.5: {}
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import httpClient from '@/api/httpClient'
|
||||
import type { PageResult } from '@/model/base'
|
||||
import type { Article,ArticleSearchFilter,CreateArticleRequest } from '@/model/article'
|
||||
|
||||
export const searchArticlesRequest = (articleFilterParam:ArticleSearchFilter ) => {
|
||||
return httpClient.get<PageResult<Article>>('/articles',articleFilterParam)
|
||||
}
|
||||
|
||||
export const createArticle = (article: CreateArticleRequest) => {
|
||||
return httpClient.post<Article>('/articles',article)
|
||||
}
|
||||
|
||||
export const deleteArticlesRequest = (id:string) => {
|
||||
return httpClient.delete(`/articles/${id}`,)
|
||||
}
|
||||
|
||||
export const searchArticlesByIdRequest = (id: string) => {
|
||||
return httpClient.get<Article>(`/articles/${id}`)
|
||||
}
|
||||
|
||||
export const updateArticle = (id: string, article:CreateArticleRequest) => {
|
||||
return httpClient.put<Article>(`/articles/${id}`,article)
|
||||
}
|
||||
|
||||
export const publishArticlesByIdRequest = (id: string,) => {
|
||||
return httpClient.put<Article>(`/articles/${id}/publish`,)
|
||||
}
|
||||
|
||||
export const closeArticlesByIdRequest = (id: string,) => {
|
||||
return httpClient.put<Article>(`/articles/${id}/close`,)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import httpClient from './httpClient'
|
||||
import type {
|
||||
CarousalResult, Carousals,
|
||||
CreateCarousalsRequest,
|
||||
SearchCarousalsFilter,
|
||||
UpdateCarousalsRequest
|
||||
} from '@/model/carousals'
|
||||
import type { PageResult } from '@/model/base'
|
||||
import type {UnwrapRef} from "vue";
|
||||
|
||||
export const createCarousal = (createCarousalsRequest: CreateCarousalsRequest) => {
|
||||
return httpClient.post<PageResult<CarousalResult>>('/carousals', createCarousalsRequest)
|
||||
}
|
||||
|
||||
export const searchCarousals = (searchCarousalsFilter: SearchCarousalsFilter) => {
|
||||
return httpClient.get<PageResult<Carousals>>('/carousals',searchCarousalsFilter)
|
||||
}
|
||||
export const getCarousalItem = (id:string) => {
|
||||
return httpClient.get<CarousalResult>(`/carousals/${id}`)
|
||||
}
|
||||
|
||||
export const updateCarousalItem = (id: UnwrapRef<UpdateCarousalsRequest["id"]> | undefined, updateCarousalsRequest: CreateCarousalsRequest) => {
|
||||
return httpClient.put<CarousalResult>(`/carousals/${id}`,updateCarousalsRequest)
|
||||
}
|
||||
|
||||
export const deleteCarousal = (id:string | number) => {
|
||||
return httpClient.delete(`/carousals/${id}`)
|
||||
}
|
||||
|
||||
export const activeCarousal = (id: string | number) => {
|
||||
return httpClient.put<CarousalResult>(`/carousals/${id}/active`)
|
||||
}
|
||||
|
||||
export const inactiveCarousal = (id: string | number ) => {
|
||||
return httpClient.put<CarousalResult>(`/carousals/${id}/inactive`)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import httpClient from '@/api/httpClient'
|
||||
import type { PageResult } from '@/model/base'
|
||||
import type { Category,CategorySearchFilter, } from '@/model/category'
|
||||
|
||||
export const searchCategories = (categoryFilterParam :CategorySearchFilter ) => {
|
||||
return httpClient.get<PageResult<Category>>('/categories', categoryFilterParam)
|
||||
}
|
||||
export const searchCategoryListRequest = ( ) => {
|
||||
return httpClient.get<Category[]>('/categories/list',)
|
||||
}
|
||||
|
||||
export const createCategoryRequest = (category: Pick<Category,'name'|'code'|'order'>) => {
|
||||
return httpClient.post<Category>('/categories',category)
|
||||
}
|
||||
|
||||
export const deleteCategoryRequest = (id: string) => {
|
||||
return httpClient.delete(`/categories/${id}`,)
|
||||
}
|
||||
|
||||
export const searchCategoryByIdRequest = (id: string) => {
|
||||
return httpClient.get<Category>(`/categories/${id}`)
|
||||
}
|
||||
|
||||
export const updateCategoryByIdRequest = (id: string,category: Pick<Category,'name'|'code'|'order'>) => {
|
||||
return httpClient.put<Category>(`/categories/${id}`,category)
|
||||
}
|
||||
+6
-1
@@ -1,7 +1,7 @@
|
||||
import type { RequestMethodResponse, UploadFile } from 'tdesign-vue-next'
|
||||
import httpClient from '@/api/httpClient'
|
||||
|
||||
export const uploadFile = async (files: UploadFile): Promise<RequestMethodResponse> => {
|
||||
export const uploadFileOld = async (files: UploadFile): Promise<RequestMethodResponse> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
httpClient.uploadFile<{
|
||||
url: string
|
||||
@@ -22,3 +22,8 @@ export const uploadFile = async (files: UploadFile): Promise<RequestMethodRespon
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const uploadFile = async (file: File) => {
|
||||
return httpClient.uploadFile<{ url: string }>('/files/upload', file)
|
||||
}
|
||||
+19
-10
@@ -1,5 +1,5 @@
|
||||
import axios, { type AxiosInstance } from 'axios'
|
||||
import type { ErrorResponse } from '@/model/base'
|
||||
import axios, { type AxiosInstance, } from 'axios'
|
||||
import type { ErrorResponse,ErrorResponseList } from '@/model/base'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
|
||||
@@ -9,18 +9,27 @@ const client: AxiosInstance = axios.create({
|
||||
})
|
||||
|
||||
const handleError = (errorResponse: ErrorResponse) => {
|
||||
MessagePlugin.error(errorResponse.message)
|
||||
if (errorResponse.code === 401) {
|
||||
useAppStore().logout()
|
||||
MessagePlugin.error('登录信息失效,请重新登录')
|
||||
} else {
|
||||
MessagePlugin.error(errorResponse.message)
|
||||
|
||||
}
|
||||
}
|
||||
client.interceptors.response.use(
|
||||
(response) => {
|
||||
if (response.data.code) {
|
||||
handleError(response.data)
|
||||
return Promise.reject(response.data)
|
||||
}
|
||||
return response
|
||||
},
|
||||
(error) => {
|
||||
const errorResponse = error.response.data as ErrorResponse
|
||||
let errorResponse: ErrorResponse;
|
||||
if (Array.isArray(error.response.data)) {
|
||||
const errorResponseList = error.response.data as ErrorResponseList;
|
||||
errorResponse = errorResponseList[0];
|
||||
} else {
|
||||
// 否则,将其视为单个 ErrorResponse
|
||||
errorResponse = error.response.data as ErrorResponse;
|
||||
}
|
||||
handleError(errorResponse)
|
||||
return Promise.reject(errorResponse)
|
||||
}
|
||||
@@ -43,8 +52,8 @@ export default {
|
||||
const response = await client.post<T>(url, data)
|
||||
return response.data as T
|
||||
},
|
||||
delete: async (url: string) => {
|
||||
await client.delete(url)
|
||||
delete: async (url: string,params?:any) => {
|
||||
await client.delete(url,{params})
|
||||
},
|
||||
put: async <T>(url: string, data: Record<string, any> = {}) => {
|
||||
const response = await client.put<T>(url, data)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import httpClient from '@/api/httpClient'
|
||||
import type { PageResult } from '@/model/base'
|
||||
import type { PetVariety, SearchPetVarietyFilter } from '@/model/pet-variety'
|
||||
|
||||
export const searchPetVarieties = async (searchPetVarietyFilter: SearchPetVarietyFilter) => {
|
||||
return httpClient.get<PageResult<PetVariety>>('/pet-varieties', searchPetVarietyFilter)
|
||||
}
|
||||
|
||||
|
||||
export const createPetVariety = async (name: string) => {
|
||||
return httpClient.post<PetVariety>('/pet-varieties', { name })
|
||||
}
|
||||
|
||||
|
||||
export const editPetVariety = async (id: string, name: string) => {
|
||||
return httpClient.put<PetVariety>(`/pet-varieties/${id}`, { name })
|
||||
}
|
||||
|
||||
|
||||
export const deletePetVariety = async (id: string) => {
|
||||
return httpClient.delete(`/pet-varieties/${id}`)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { CreateProductRequest, Product, SearchProductFilter, UpdateProductRequest } from '@/model/product'
|
||||
import httpClient from '@/api/httpClient'
|
||||
import type { PageResult } from '@/model/base'
|
||||
|
||||
export const searchProducts = async (searchProductFilter: SearchProductFilter) => {
|
||||
return httpClient.get<PageResult<Product>>('/products', searchProductFilter)
|
||||
}
|
||||
|
||||
|
||||
export const createProduct = async (createProductRequest: CreateProductRequest) => {
|
||||
return httpClient.post<Product>('/products', createProductRequest)
|
||||
}
|
||||
|
||||
|
||||
export const editProduct = async (id: string, updateProductRequest: UpdateProductRequest) => {
|
||||
return httpClient.put<Product>(`/products/${id}`, updateProductRequest)
|
||||
}
|
||||
|
||||
|
||||
export const deleteProduct = async (id: string) => {
|
||||
return httpClient.delete(`/products/${id}`)
|
||||
}
|
||||
+1
-1
@@ -10,6 +10,6 @@ export const searchUsers = (userSearchFilter: UserSearchFilter) => {
|
||||
return httpClient.get<PageResult<User>>('/users', userSearchFilter)
|
||||
}
|
||||
|
||||
export const setUserRoles = (id: number, roles: string[]) => {
|
||||
export const setUserRoles = (id: string, roles: string[]) => {
|
||||
return httpClient.put<User>(`/users/${id}/roles`, { roles })
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<script setup lang="ts">
|
||||
import '@wangeditor/editor/dist/css/style.css'
|
||||
|
||||
// @ts-ignore
|
||||
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
import type { IEditorConfig } from '@wangeditor/editor'
|
||||
import { uploadFile, uploadFileOld } from '@/api/file'
|
||||
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
modelValue: string
|
||||
mode?: 'default' | 'simple'
|
||||
}>(), {
|
||||
mode: 'default'
|
||||
})
|
||||
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [string]
|
||||
}>()
|
||||
|
||||
const editorRef = shallowRef()
|
||||
const valueHtml = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value)
|
||||
})
|
||||
|
||||
|
||||
const editorConfig: Partial<IEditorConfig> = {
|
||||
placeholder: '请输入内容...',
|
||||
MENU_CONF: {
|
||||
uploadImage: {
|
||||
async customUpload(file: File, insertFn: (url: string) => void) {
|
||||
const result = await uploadFile(file)
|
||||
insertFn(result.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const toolbarConfig = {}
|
||||
|
||||
|
||||
|
||||
|
||||
const handleCreated = (editor: typeof Editor) => {
|
||||
editorRef.value = editor // 记录 editor 实例,重要!
|
||||
}
|
||||
|
||||
// 组件销毁时,也及时销毁编辑器
|
||||
//
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
const editor = editorRef.value
|
||||
if (editor == null) return
|
||||
editor.destroy()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full border-2">
|
||||
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #ccc"
|
||||
:editor="editorRef"
|
||||
:defaultConfig="toolbarConfig"
|
||||
:mode="mode"
|
||||
/>
|
||||
<Editor
|
||||
style="height: 500px; overflow-y: hidden;"
|
||||
v-model="valueHtml"
|
||||
:defaultConfig="editorConfig"
|
||||
:mode="mode"
|
||||
@onCreated="handleCreated"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<TImageViewer :images="[url]">
|
||||
<template #trigger="{ open }">
|
||||
<div class="w-[100px] h-[100px] relative flex justify-center items-center rounded overflow-hidden">
|
||||
<img alt="test" :src="url" class="w-full h-full object-contain" />
|
||||
<div class="transition-all hover:opacity-100 opacity-0 w-full h-full absolute top-0 left-0 bg-[#00000099] text-white flex items-center justify-center" @click="open">
|
||||
<span><BrowseIcon size="1.4em" /> 预览</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</TImageViewer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import { BrowseIcon } from 'tdesign-icons-vue-next'
|
||||
|
||||
defineProps<{
|
||||
url: string,
|
||||
}>()
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,86 @@
|
||||
<script setup lang="ts">
|
||||
import { MessagePlugin, type UploadProps } from 'tdesign-vue-next'
|
||||
import { ref, watch } from 'vue'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
const imageViewerProps = ref<UploadProps['imageViewerProps']>({
|
||||
closeOnEscKeydown: false,
|
||||
});
|
||||
const sizeLimit = ref<UploadProps['sizeLimit']>({
|
||||
size: 2,
|
||||
unit: 'MB',
|
||||
});
|
||||
const fileList = ref<UploadProps['value']>([]);
|
||||
const disabled = ref<boolean>(false);
|
||||
const autoUpload = ref<boolean>(true);
|
||||
const showImageFileName = ref<boolean>(true);
|
||||
const uploadAllFilesInOneRequest = ref<boolean>(false);
|
||||
const handleFail: UploadProps['onFail'] = ({ file }) => {
|
||||
MessagePlugin.error(`文件 ${file.name} 上传失败`);
|
||||
};
|
||||
const handleSuccess: UploadProps['onSuccess'] = ({ file }) => {
|
||||
if(file?.url){
|
||||
emits('update:modelValue',file.url)
|
||||
}
|
||||
}
|
||||
const appStore = useAppStore()
|
||||
|
||||
const uploadHeaders = ref<UploadProps['headers']>({
|
||||
Authorization: `Bearer ${appStore.token}`
|
||||
})
|
||||
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
modelValue: string
|
||||
}>(), {
|
||||
modelValue: ''
|
||||
})
|
||||
|
||||
|
||||
const emits = defineEmits<{
|
||||
'update:modelValue': [string]
|
||||
}>()
|
||||
watch(() => props.modelValue,(newVal) => {
|
||||
if (newVal) {
|
||||
fileList.value = [{url: newVal}]
|
||||
} else {
|
||||
fileList.value = []
|
||||
}
|
||||
|
||||
},{
|
||||
deep:true,
|
||||
immediate:true
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<t-upload
|
||||
v-model="fileList"
|
||||
:image-viewer-props="imageViewerProps"
|
||||
:size-limit="sizeLimit"
|
||||
action="/api/files/upload"
|
||||
:headers="uploadHeaders"
|
||||
theme="image"
|
||||
tips="图片上传限制为2M"
|
||||
accept="image/*"
|
||||
:disabled="disabled"
|
||||
:auto-upload="autoUpload"
|
||||
:show-image-file-name="showImageFileName"
|
||||
:upload-all-files-in-one-request="uploadAllFilesInOneRequest"
|
||||
:locale="{
|
||||
triggerUploadText: {
|
||||
image: '请选择图片',
|
||||
},
|
||||
}"
|
||||
@fail="handleFail"
|
||||
@success="handleSuccess"
|
||||
>
|
||||
|
||||
</t-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -42,4 +42,9 @@ const slots = defineSlots<{
|
||||
</TCard>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
:deep(.t-card__body) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -15,9 +15,9 @@ export const useSearchable = <T extends BaseFilterRequest, D extends BaseModel>(
|
||||
loading.value = true
|
||||
const result = await api({...filter.value, page: pagination.page, size: pagination.size, ...defaultFilter})
|
||||
data.value = result.data
|
||||
pagination.page = result.paging.page
|
||||
pagination.size = result.paging.size
|
||||
pagination.total = result.paging.total
|
||||
pagination.page = result.pagination.page
|
||||
pagination.size = result.pagination.size
|
||||
pagination.total = result.pagination.total
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template>
|
||||
<div class="w-full h-[56px] flex items-center text-2xl cursor-pointer gap-2 font-bold">
|
||||
<img src="@/assets/icons/logo.svg" class="w-[32px]" />
|
||||
Yili Admin
|
||||
布兰德后台
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
@@ -1,25 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import UserArea from '@/layouts/components/UserArea.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full h-full flex items-center justify-between px-6">
|
||||
<TSpace>
|
||||
<!-- <TButton variant="text" shape="square">-->
|
||||
<!-- <template #icon> <ViewListIcon /></template>-->
|
||||
<!-- </TButton>-->
|
||||
<TButton variant="text" @click="() => router.push({ name: 'platform-manage'
|
||||
})">切换平台</TButton>
|
||||
</TSpace>
|
||||
|
||||
<UserArea></UserArea>
|
||||
</div>
|
||||
<div class="w-full h-full flex items-center justify-end px-6">
|
||||
<UserArea></UserArea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import { ChevronDownIcon } from 'tdesign-icons-vue-next'
|
||||
import type { DropdownOption } from 'tdesign-vue-next'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
const appStore = useAppStore()
|
||||
const currentUser = appStore.currentUser
|
||||
const options: DropdownOption[] = [
|
||||
{
|
||||
content: '退出登录',
|
||||
@@ -20,7 +20,7 @@ const options: DropdownOption[] = [
|
||||
<TButton variant="text">
|
||||
<div class="flex gap-2 items-center">
|
||||
<TAvatar size="24px" image="https://tdesign.gtimg.com/site/avatar.jpg"></TAvatar>
|
||||
依力
|
||||
{{ currentUser?.username }}
|
||||
<ChevronDownIcon />
|
||||
</div>
|
||||
</TButton>
|
||||
@@ -28,6 +28,4 @@ const options: DropdownOption[] = [
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { AuditBaseModel,Paging } from '@/model/base'
|
||||
import type { Category } from './category'
|
||||
|
||||
export enum ArticleStatus {
|
||||
DRAFT = 'draft',
|
||||
PUBLISHED = 'published',
|
||||
Closed = 'closed'
|
||||
}
|
||||
|
||||
export interface Article extends AuditBaseModel{
|
||||
title: string
|
||||
content:string
|
||||
category: Category
|
||||
status: ArticleStatus
|
||||
thumbnail: string
|
||||
description: string
|
||||
}
|
||||
|
||||
|
||||
export interface ArticleSearchFilter extends Partial<Paging>{
|
||||
order?: string
|
||||
title?: string
|
||||
content?:string
|
||||
categoryId?:string
|
||||
}
|
||||
|
||||
export interface CreateArticleRequest{
|
||||
categoryId: string
|
||||
title: string
|
||||
content: string
|
||||
thumbnail: string
|
||||
description:string
|
||||
}
|
||||
+14
-5
@@ -1,11 +1,18 @@
|
||||
import type { User } from "./user";
|
||||
|
||||
export interface ErrorResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
export interface BaseModel {
|
||||
id: number
|
||||
createdTime: Date
|
||||
updateTime: Date
|
||||
id: string
|
||||
createdTime: string
|
||||
updatedTime: string
|
||||
}
|
||||
|
||||
export interface AuditBaseModel extends BaseModel {
|
||||
createBy: User
|
||||
updateBy: User
|
||||
}
|
||||
|
||||
export interface Paging {
|
||||
@@ -18,6 +25,8 @@ export interface BaseFilterRequest extends Partial<Paging>{
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
paging: Paging,
|
||||
pagination: Paging,
|
||||
data: T[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface ErrorResponseList extends Array<ErrorResponse> {}
|
||||
@@ -0,0 +1,25 @@
|
||||
import type { AuditBaseModel, BaseModel, Paging } from '@/model/base'
|
||||
|
||||
export interface CreateCarousalsRequest {
|
||||
imageUrl:string
|
||||
targetType:string
|
||||
targetUrl?:string | null
|
||||
targetId?:string | null
|
||||
}
|
||||
export interface Carousals extends AuditBaseModel,CreateCarousalsRequest {
|
||||
}
|
||||
export interface UpdateCarousalsRequest extends CreateCarousalsRequest{
|
||||
createBy?:null
|
||||
createdTime?:string
|
||||
id?:string
|
||||
updateBy?:null
|
||||
updateTime?:string
|
||||
}
|
||||
export interface SearchCarousalsFilter extends Partial<Paging> {
|
||||
order?:string
|
||||
}
|
||||
|
||||
export interface CarousalResult extends BaseModel,CreateCarousalsRequest{
|
||||
status:string
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { AuditBaseModel,Paging } from '@/model/base'
|
||||
|
||||
|
||||
export interface Category extends AuditBaseModel{
|
||||
name: string
|
||||
code:string
|
||||
order: number
|
||||
}
|
||||
|
||||
|
||||
export interface CategorySearchFilter extends Partial<Paging>{
|
||||
order?: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
|
||||
export interface UpdateCategoryRequest{
|
||||
name: string
|
||||
code:string
|
||||
order: number
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import type { BaseModel } from '@/model/base'
|
||||
|
||||
export interface Classify extends BaseModel{
|
||||
numbering:string
|
||||
name: string
|
||||
sort: string
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { BaseFilterRequest, BaseModel } from '@/model/base'
|
||||
|
||||
export interface PetVariety extends BaseModel{
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface SearchPetVarietyFilter extends BaseFilterRequest {}
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { BaseFilterRequest, BaseModel } from '@/model/base'
|
||||
|
||||
|
||||
|
||||
export interface Product extends BaseModel{
|
||||
name: string;
|
||||
category: ProductCategory
|
||||
photo: string;
|
||||
tags: string[];
|
||||
totalWeight: number;
|
||||
protein: number;
|
||||
fat: number;
|
||||
fiber: number;
|
||||
ash: number;
|
||||
moisture: number;
|
||||
meValue: number | null; // ME值(kcal/g),直接配置的代谢能
|
||||
totalCalories: number; // 产品总能量(kcal),由后端基于ME算法计算或直接配置
|
||||
}
|
||||
|
||||
export interface CreateProductRequest extends Pick<Product, "name" | 'photo' | 'tags' | 'totalWeight' | 'category' | 'protein' | 'fat' | 'fiber' | 'ash' | 'moisture'> {
|
||||
meValue?: number; // ME值(kcal/g),可选
|
||||
}
|
||||
|
||||
export interface SearchProductFilter extends BaseFilterRequest{
|
||||
}
|
||||
|
||||
|
||||
export interface UpdateProductRequest extends CreateProductRequest {}
|
||||
|
||||
export enum ProductCategory {
|
||||
DRY_FOOD,
|
||||
WET_FOOD,
|
||||
}
|
||||
|
||||
export const productCategoryOptions: {
|
||||
label: string
|
||||
value: ProductCategory
|
||||
}[] = [
|
||||
{ label: '干粮', value: ProductCategory.DRY_FOOD },
|
||||
{ label: '湿粮', value: ProductCategory.WET_FOOD },
|
||||
]
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export interface CreateTokenRequest {
|
||||
email: string
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
+8
-8
@@ -1,15 +1,15 @@
|
||||
import type { BaseFilterRequest, BaseModel } from '@/model/base'
|
||||
import type { BaseFilterRequest, AuditBaseModel } from '@/model/base'
|
||||
import type { Role } from '@/model/role'
|
||||
|
||||
export interface User extends BaseModel{
|
||||
name: string
|
||||
email: string
|
||||
avatar: string
|
||||
roles: Role[]
|
||||
permissions: string[]
|
||||
export interface User extends AuditBaseModel{
|
||||
username: string
|
||||
locked: boolean
|
||||
enabled: boolean
|
||||
name?: string
|
||||
roles?: Role[]
|
||||
}
|
||||
|
||||
|
||||
export interface UserSearchFilter extends BaseFilterRequest {
|
||||
name?: string
|
||||
username?: string
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Category } from '@/model/category'
|
||||
import type { Article, CreateArticleRequest } from '@/model/article'
|
||||
import { computed, ref, reactive, watch } from 'vue'
|
||||
import type {
|
||||
FormInstanceFunctions,
|
||||
FormRules,
|
||||
TdSelectProps
|
||||
} from 'tdesign-vue-next'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
import { updateArticle, createArticle } from '@/api/article'
|
||||
import { searchCategories } from '@/api/category'
|
||||
import Editor from '@/components/Editor.vue'
|
||||
import ImageUpload from '@/components/ImageUpload.vue'
|
||||
const props = defineProps<{
|
||||
headerTitle?: String | null
|
||||
article: Article | null
|
||||
categoryList: Category[]
|
||||
}>()
|
||||
const formRef = ref<FormInstanceFunctions | null>(null)
|
||||
const headerText = computed(() => `${props.article ? '编辑' : '创建'}${props.headerTitle || ''}`)
|
||||
const confirmBtnText = computed(() => (props.article ? '保存' : '确定'))
|
||||
const articleData = reactive<CreateArticleRequest>({ title: '', categoryId: '', content: '', thumbnail: '', description: ''})
|
||||
|
||||
const rules: FormRules<CreateArticleRequest> = {
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: '咨询标题不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '咨询标题不能为空',
|
||||
type: 'error',
|
||||
trigger: 'change'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '咨询标题不能为空'
|
||||
},
|
||||
{
|
||||
min: 4,
|
||||
message: '输入汉字长度应在2到120之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 240,
|
||||
message: '输入汉字长度应在2到120之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
categoryId: [
|
||||
{
|
||||
required: true,
|
||||
message: '咨询分类不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '咨询分类不能为空',
|
||||
type: 'error',
|
||||
trigger: 'change'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '咨询分类不能为空'
|
||||
}
|
||||
],
|
||||
content: [
|
||||
{
|
||||
max: 20000,
|
||||
message: '内容不超过10000字',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
thumbnail: [
|
||||
{
|
||||
required: true,
|
||||
message: '请上传封面图',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '请上传封面图'
|
||||
}
|
||||
],
|
||||
description: [
|
||||
{
|
||||
max: 500,
|
||||
message: '描述不超过500字',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
watch(
|
||||
() => props.article,
|
||||
(newArticleData) => {
|
||||
articleData.categoryId = newArticleData?.category.id || ''
|
||||
articleData.title = newArticleData?.title || ''
|
||||
articleData.content = newArticleData?.content || ''
|
||||
articleData.thumbnail = newArticleData?.thumbnail || ''
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
const emit = defineEmits<{
|
||||
success: [void]
|
||||
onInputChange: [void]
|
||||
}>()
|
||||
const handleSave = async () => {
|
||||
if (!formRef.value) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (valid === true) {
|
||||
if (props.article) {
|
||||
await updateArticle(props.article.id, articleData)
|
||||
} else {
|
||||
await createArticle(articleData)
|
||||
}
|
||||
MessagePlugin.success(`${props.article ? '编辑' : '创建'}咨询成功`)
|
||||
emit('success')
|
||||
}
|
||||
}
|
||||
const handleCloseDialog = () => {
|
||||
// 数据&&规则校验结果重置
|
||||
if (!formRef.value) return
|
||||
formRef.value.reset()
|
||||
formRef.value.clearValidate()
|
||||
}
|
||||
|
||||
const categoryOptions = ref<TdSelectProps['options']>([])
|
||||
|
||||
const fetchCategories = async (search: string) => {
|
||||
const { data } = await searchCategories({ name: search })
|
||||
categoryOptions.value = data.map((category) => {
|
||||
return {
|
||||
label: category.name,
|
||||
value: category.id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fetchCategories('')
|
||||
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<t-dialog
|
||||
width="60%"
|
||||
:header="headerText"
|
||||
:confirmBtn="confirmBtnText"
|
||||
:closeOnOverlayClick="false"
|
||||
@close="handleCloseDialog"
|
||||
destroy-on-close
|
||||
@confirm="handleSave"
|
||||
>
|
||||
<t-space direction="vertical" style="width: 100%">
|
||||
<TForm ref="formRef" :data="articleData" :rules="rules" resetType="initial">
|
||||
<TFormItem label="咨询标题:" name="title" help="名称长度大于2个汉字,小于120个汉字">
|
||||
<t-input v-model.trim="articleData.title" clearable placeholder="请输入咨询标题" />
|
||||
</TFormItem>
|
||||
<TFormItem label="咨询描述:" name="description" help="描述长度小于500字符">
|
||||
<TTextarea v-model.trim="articleData.description" clearable placeholder="请输入咨询标题" :maxcharacter="500"/>
|
||||
</TFormItem>
|
||||
<TFormItem label="咨询分类:" name="categoryId">
|
||||
<TSelect
|
||||
v-model="articleData.categoryId"
|
||||
:options="categoryOptions"
|
||||
placeholder="请选择咨询分类"
|
||||
filterable
|
||||
@search="fetchCategories"
|
||||
/>
|
||||
</TFormItem>
|
||||
<TFormItem label="轮播图:" name="thumbnail">
|
||||
<ImageUpload v-model="articleData.thumbnail"/>
|
||||
</TFormItem>
|
||||
<TFormItem label="内容:" name="content">
|
||||
<Editor v-model="articleData.content"></Editor>
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</t-space>
|
||||
</t-dialog>
|
||||
</template>
|
||||
@@ -0,0 +1,164 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import type { Article, ArticleSearchFilter } from '@/model/article'
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
import {
|
||||
searchArticlesRequest,
|
||||
deleteArticlesRequest,
|
||||
publishArticlesByIdRequest,
|
||||
closeArticlesByIdRequest
|
||||
} from '@/api/article'
|
||||
import { searchCategoryListRequest } from '@/api/category'
|
||||
import type { Category } from '@/model/category'
|
||||
import type { BaseTableColumns } from 'tdesign-vue-next'
|
||||
import { useSearchable } from '@/composables/useSearchable'
|
||||
import ArticleDialog from '@/pages/article/components/ArticleDialog.vue'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
const { data, loading, pagination, onPageChange, fetchData } = useSearchable<
|
||||
ArticleSearchFilter,
|
||||
Article
|
||||
>(searchArticlesRequest)
|
||||
const statusArticleListMap = {
|
||||
draft: { label: '草稿', theme: 'default' },
|
||||
published: { label: '已发布', theme: 'success' },
|
||||
closed: { label: '已关闭', theme: 'danger' }
|
||||
}
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: '咨询标题',
|
||||
colKey: 'title',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '分类',
|
||||
colKey: 'categoryName',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
colKey: 'status',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
colKey: 'createdTime',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
const articleDialogVisble = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const currentTableData = ref<Article | null>(null)
|
||||
const categoryList = ref<Category[]>([])
|
||||
onMounted(fetchData)
|
||||
watch(articleDialogVisble, (newValue) => {
|
||||
if (newValue) {
|
||||
searchCategoryList()
|
||||
}
|
||||
})
|
||||
const searchCategoryList = async () => {
|
||||
try {
|
||||
const res = await searchCategoryListRequest()
|
||||
categoryList.value = res
|
||||
} catch (error) {
|
||||
categoryList.value = []
|
||||
}
|
||||
}
|
||||
const editClick = (article: Article) => {
|
||||
isEdit.value = true
|
||||
currentTableData.value = article
|
||||
articleDialogVisble.value = true
|
||||
}
|
||||
const handleArticleDialogSuccess = () => {
|
||||
fetchData()
|
||||
articleDialogVisble.value = false
|
||||
}
|
||||
const handleArticleDialogClosed = () => {
|
||||
isEdit.value = false
|
||||
currentTableData.value = null
|
||||
}
|
||||
const toggleArticleStatus = async (article: Article) => {
|
||||
if (article.status === 'published') {
|
||||
await closeArticlesByIdRequest(article.id)
|
||||
} else {
|
||||
await publishArticlesByIdRequest(article.id)
|
||||
}
|
||||
fetchData()
|
||||
MessagePlugin.success(`${article.status === 'published' ? '关闭' : '发布'}咨询成功`)
|
||||
}
|
||||
const deleteCategoryClick = async (article: Article) => {
|
||||
await deleteArticlesRequest(article.id)
|
||||
fetchData()
|
||||
MessagePlugin.success('删除咨询成功')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="咨询管理">
|
||||
<template #right-area>
|
||||
<TButton @click="articleDialogVisble = true">创建咨询</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
height="92%"
|
||||
table-layout="auto"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
<template #categoryName="{ row }">
|
||||
{{ row.category.name }}
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
<t-tag :theme="statusArticleListMap[row.status as keyof typeof statusArticleListMap].theme">
|
||||
{{ statusArticleListMap[row.status as keyof typeof statusArticleListMap].label }}
|
||||
</t-tag>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<TSpace :size="1">
|
||||
<TButton variant="text" size="small" theme="primary" @click="editClick(row)"
|
||||
>编辑</TButton
|
||||
>
|
||||
<TButton variant="text" size="small" theme="warning" @click="toggleArticleStatus(row)">{{
|
||||
row.status === 'published' ? '关闭' : '发布'
|
||||
}}</TButton>
|
||||
<t-popconfirm
|
||||
theme="default"
|
||||
content="确认删除此项分类吗"
|
||||
@confirm="deleteCategoryClick(row)"
|
||||
>
|
||||
<TButton variant="text" size="small" theme="danger">删除</TButton>
|
||||
</t-popconfirm>
|
||||
</TSpace>
|
||||
</template>
|
||||
</TTable>
|
||||
<ArticleDialog
|
||||
headerTitle="咨询"
|
||||
:article="currentTableData"
|
||||
:categoryList="categoryList"
|
||||
v-model:visible="articleDialogVisble"
|
||||
@closed="handleArticleDialogClosed"
|
||||
@success="handleArticleDialogSuccess"
|
||||
></ArticleDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.t-card__body) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<TDialog
|
||||
width="980px"
|
||||
:header="headerText"
|
||||
:confirmBtn="confirmBtnText"
|
||||
:closeOnOverlayClick="false"
|
||||
@close="handleCloseDialog"
|
||||
@confirm="fetchSaveCarousalData"
|
||||
>
|
||||
<TForm v-if="carousalData" ref="formRef" :data="carousalData" :rules="rules" resetType="initial" label-width="100">
|
||||
<TFormItem label="轮播图:" name="imageUrl">
|
||||
<ImageUpload v-model="carousalData.imageUrl" />
|
||||
</TFormItem>
|
||||
<TFormItem label="跳转类型:" name="targetType" >
|
||||
<t-radio-group :default-value="carousalData.targetType" v-model="carousalData.targetType">
|
||||
<t-radio-button v-for="(item,index) in typeOption" :key="index" :value="item.value">{{item.label}}</t-radio-button>
|
||||
</t-radio-group>
|
||||
</TFormItem>
|
||||
<TFormItem label="跳转文章路径:" name="targetId" v-if="carousalData.targetType === 'article' ">
|
||||
<t-input v-model.trim="carousalData.targetId" clearable placeholder="请输入文章id" />
|
||||
</TFormItem>
|
||||
<TFormItem label="跳转网址路径:" name="targetUrl" v-else-if="carousalData.targetType === 'url' ">
|
||||
<t-input v-model.trim="carousalData.targetUrl" clearable placeholder="请输入网址路径" />
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</TDialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, reactive, watch } from 'vue'
|
||||
import type { FormInstanceFunctions } from 'tdesign-vue-next'
|
||||
import ImageUpload from '@/components/ImageUpload.vue'
|
||||
import { createCarousal, updateCarousalItem } from '@/api/carousal'
|
||||
import type {CreateCarousalsRequest, UpdateCarousalsRequest} from "@/model/carousals";
|
||||
const props = withDefaults(defineProps<{
|
||||
isEdit?: boolean | null
|
||||
headerTitle?: string | null
|
||||
carousal: CreateCarousalsRequest
|
||||
}>(),{
|
||||
headerTitle:''
|
||||
})
|
||||
const emit = defineEmits<{
|
||||
success: [void]
|
||||
}>()
|
||||
const formRef = ref<FormInstanceFunctions | null>(null)
|
||||
const headerText = computed(() => `${props.isEdit ? '编辑' : '创建'}${props.headerTitle || ''}`)
|
||||
const confirmBtnText = computed(() => (props.isEdit ? '保存' : '确定'))
|
||||
const formType = computed(() => `${props.isEdit ? 'update' : 'add'}`)
|
||||
|
||||
const carousalData = ref<UpdateCarousalsRequest>({
|
||||
imageUrl: '',
|
||||
targetType: 'article',
|
||||
targetId: '',
|
||||
targetUrl: '',
|
||||
})
|
||||
const rules = computed(() => {
|
||||
const commonRules = {
|
||||
imageUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: '轮播图必须是上传',
|
||||
type: 'error',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
targetType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择跳转类型',
|
||||
type: 'error',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '请选择跳转类型',
|
||||
type: 'error',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
};
|
||||
return carousalData.value.targetType === 'article'
|
||||
? {...commonRules, targetId: [{ required: true, message: '文章 id 不能为空', type: 'error', trigger: 'blur' }, { required: true, message: '文章 id 不能为空', type: 'error', trigger: 'change' }, { whitespace: true, message: '网址路径不能为空' }] }
|
||||
: {...commonRules, targetUrl: [{ required: true, message: '网址路径不能为空', type: 'error', trigger: 'blur' }, { required: true, message: '网址路径不能为空', type: 'error', trigger: 'change' }, { whitespace: true, message: '网址路径不能为空' }] };
|
||||
});
|
||||
const typeOption = reactive([
|
||||
{ value: 'article', label: '文章' },
|
||||
{ value: 'url', label: '地址' },
|
||||
])
|
||||
const handleFormTypeData = () => {
|
||||
if (carousalData.value.targetType === 'article') {
|
||||
carousalData.value.targetUrl = null
|
||||
} else if (carousalData.value.targetType === 'url') {
|
||||
carousalData.value.targetId = null
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.carousal,
|
||||
(newClassify: CreateCarousalsRequest) => {
|
||||
carousalData.value = Object.assign({}, newClassify)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
)
|
||||
const fetchSaveCarousalData = async () => {
|
||||
/* TODO: 保存分类数据 */
|
||||
if (formRef.value) {
|
||||
const valid = await formRef.value.validate()
|
||||
if (valid && typeof valid === 'boolean') {
|
||||
/* TODO: 校验通过保存分类数据 */
|
||||
handleFormTypeData()
|
||||
formType.value === 'add' ? await createCarousalData() : await updateCarousalData()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
const createCarousalData = async () => {
|
||||
await createCarousal(carousalData.value)
|
||||
emit('success')
|
||||
}
|
||||
const updateCarousalData = async () => {
|
||||
handleFormTypeData()
|
||||
const requestObj: CreateCarousalsRequest = {imageUrl: carousalData.value.imageUrl,targetType:carousalData.value.targetType,targetUrl:carousalData.value.targetUrl,targetId:carousalData.value.targetId}
|
||||
await updateCarousalItem(carousalData.value.id, requestObj)
|
||||
emit('success')
|
||||
}
|
||||
const handleCloseDialog = () => {
|
||||
// 数据&&规则校验结果重置
|
||||
if (formRef.value) {
|
||||
formRef.value.reset()
|
||||
formRef.value.clearValidate()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,140 @@
|
||||
<script setup lang="ts">
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import type { BaseTableColumns } from 'tdesign-vue-next'
|
||||
import CarousalDialog from '@/pages/carousal/components/CarousalDialog.vue'
|
||||
import { activeCarousal, deleteCarousal, searchCarousals, inactiveCarousal } from '@/api/carousal'
|
||||
import type {
|
||||
CarousalResult, Carousals,
|
||||
CreateCarousalsRequest,
|
||||
SearchCarousalsFilter,
|
||||
} from '@/model/carousals'
|
||||
import ImagePreviewer from '@/components/ImagePreviewer.vue'
|
||||
import { useSearchable } from '@/composables/useSearchable'
|
||||
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: 'ID',
|
||||
colKey: 'id',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '轮播图',
|
||||
colKey: 'imageUrl',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '显示状态',
|
||||
colKey: 'status',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
|
||||
const { loading, data, pagination, fetchData, onPageChange } = useSearchable<SearchCarousalsFilter,Carousals>(searchCarousals)
|
||||
onMounted(fetchData)
|
||||
|
||||
|
||||
const carousalDialogVisible = ref<boolean>(false)
|
||||
const isEdit = ref<boolean>(false)
|
||||
const currentTableData = ref<CreateCarousalsRequest>({
|
||||
imageUrl: '',
|
||||
targetType: ''
|
||||
})
|
||||
const handleEdit = (row: CarousalResult): void => {
|
||||
isEdit.value = true
|
||||
currentTableData.value = Object.assign({}, row)
|
||||
carousalDialogVisible.value = true
|
||||
}
|
||||
const handleShow = async (res: CarousalResult): Promise<void> => {
|
||||
if (res.status === 'active') {
|
||||
await inactiveCarousal(res.id)
|
||||
} else {
|
||||
await activeCarousal(res.id)
|
||||
}
|
||||
await fetchData()
|
||||
}
|
||||
const handleDelete = async (row: CarousalResult): Promise<void> => {
|
||||
await deleteCarousal(row.id)
|
||||
await fetchData()
|
||||
}
|
||||
const handleCreateCarousal = (): void => {
|
||||
isEdit.value = false
|
||||
carousalDialogVisible.value = true
|
||||
currentTableData.value = {
|
||||
imageUrl: '',
|
||||
targetId: '',
|
||||
targetType: '',
|
||||
targetUrl: '',
|
||||
}
|
||||
}
|
||||
const handleSuccessDialog = async (): Promise<void> => {
|
||||
await fetchData()
|
||||
carousalDialogVisible.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="轮播图管理">
|
||||
<template #right-area>
|
||||
<TButton @click="handleCreateCarousal">创建轮播图</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
table-layout="auto"
|
||||
height="92%"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
<template #imageUrl="{ row }">
|
||||
<ImagePreviewer :url="row.imageUrl"/>
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
<TSpace>
|
||||
<TTag :theme="row.status === 'active' ? 'success' : 'danger'" variant="light">{{
|
||||
row.status === 'active' ? '显示中' : '已关闭'
|
||||
}}</TTag>
|
||||
</TSpace>
|
||||
</template>
|
||||
<template #roles="{ row }">
|
||||
<TSpace>
|
||||
<TTag v-for="role in row.roles" :key="role.id" theme="success" variant="light">{{
|
||||
role.label
|
||||
}}</TTag>
|
||||
</TSpace>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<TButton variant="text" size="small" theme="primary" @click="handleEdit(row)">编辑</TButton>
|
||||
<TButton variant="text" size="small" theme="primary" @click="handleShow(row)">{{
|
||||
row.status === 'active' ? '关闭显示' : '开启显示'
|
||||
}}</TButton>
|
||||
<TButton variant="text" size="small" theme="danger" @click="handleDelete(row)">删除</TButton>
|
||||
</template>
|
||||
</TTable>
|
||||
<CarousalDialog
|
||||
:carousal="currentTableData"
|
||||
v-model:visible="carousalDialogVisible"
|
||||
:isEdit="isEdit"
|
||||
@success="handleSuccessDialog"
|
||||
headerTitle="轮播图"
|
||||
></CarousalDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<TDialog
|
||||
width="40%"
|
||||
:header="headerText"
|
||||
:confirmBtn="confirmBtnText"
|
||||
:closeOnOverlayClick="false"
|
||||
@close="handleClose"
|
||||
@confirm="handleSave"
|
||||
>
|
||||
<TForm ref="formRef" :data="categoryData" :rules="rules" resetType="initial">
|
||||
<TFormItem label="分类名称:" name="name" help="名称长度小于5个汉字,大于2个汉字">
|
||||
<t-input v-model.trim="categoryData.name" clearable placeholder="请输入分类名称" />
|
||||
</TFormItem>
|
||||
<TFormItem label="分类编号:" name="code" help="编号由大于4个字符的英文字母组成">
|
||||
<t-input v-model.trim="categoryData.code" clearable placeholder="请输入分类编号" />
|
||||
</TFormItem>
|
||||
<TFormItem label="排序级别:" name="order" help="排序级别由正整数组成">
|
||||
<t-input-number
|
||||
:min="0"
|
||||
name="order"
|
||||
theme="normal"
|
||||
class="!w-full"
|
||||
placeholder="请输入排序级别"
|
||||
v-model.trim="categoryData.order"
|
||||
></t-input-number>
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</TDialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { Category } from '@/model/category'
|
||||
import { computed, ref, reactive, watch } from 'vue'
|
||||
import { createCategoryRequest, updateCategoryByIdRequest } from '@/api/category'
|
||||
import type { FormInstanceFunctions, FormProps } from 'tdesign-vue-next'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
const props = defineProps<{
|
||||
headerTitle?: string
|
||||
category: Category | null
|
||||
}>()
|
||||
const formRef = ref<FormInstanceFunctions | null>(null)
|
||||
const headerText = computed(() => `${props.category ? '编辑' : '创建'}${props.headerTitle || ''}`)
|
||||
const confirmBtnText = computed(() => (props.category ? '保存' : '确定'))
|
||||
const categoryData: FormProps['data'] = reactive({ name: '', order: 1 })
|
||||
const rules: FormProps['rules'] = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '分类名称不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 4,
|
||||
message: '输入汉字长度应在2到5之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 10,
|
||||
message: '输入汉字长度应在2到5之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: '分类编号不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
min: 4,
|
||||
message: '输入字符应大于4个字符长度',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
pattern: /^[A-Za-z]+$/,
|
||||
message: '输入字符须为英文字母',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
order: [
|
||||
{
|
||||
required: true,
|
||||
message: '排序级别不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: '排序级别必须为正整数',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
watch(
|
||||
() => props.category,
|
||||
(newCategory) => {
|
||||
Object.assign(categoryData, newCategory)
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
const emit = defineEmits<{
|
||||
success: [void]
|
||||
}>()
|
||||
const handleSave = async () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
const valid = await formRef.value.validate()
|
||||
if (valid === true) {
|
||||
const { code, name, order, id } = categoryData
|
||||
if (!props.category) {
|
||||
await createCategoryRequest({ code, name, order })
|
||||
} else {
|
||||
await updateCategoryByIdRequest(id, { code, name, order })
|
||||
}
|
||||
MessagePlugin.success(`${props.category ? '编辑' : '创建'}分类成功`)
|
||||
emit('success')
|
||||
}
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
if (!formRef.value) return
|
||||
|
||||
formRef.value.reset()
|
||||
formRef.value.clearValidate()
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,114 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import type { Category, CategorySearchFilter } from '@/model/category'
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
import { searchCategories, deleteCategoryRequest } from '@/api/category'
|
||||
import type { BaseTableColumns } from 'tdesign-vue-next'
|
||||
import { useSearchable } from '@/composables/useSearchable'
|
||||
import CategoryDialog from '@/pages/category/components/CategoryDialog.vue'
|
||||
import { MessagePlugin } from 'tdesign-vue-next'
|
||||
|
||||
const { data, loading, pagination, onPageChange, fetchData } = useSearchable<
|
||||
CategorySearchFilter,
|
||||
Category
|
||||
>(searchCategories)
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: '分类名称',
|
||||
colKey: 'name',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '分类编号',
|
||||
colKey: 'code',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
colKey: 'order',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
const categoryDialogVisible = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const currentTableData = ref<Category | null>(null)
|
||||
onMounted(fetchData)
|
||||
const editClick = (category: Category) => {
|
||||
isEdit.value = true
|
||||
currentTableData.value = category
|
||||
categoryDialogVisible.value = true
|
||||
}
|
||||
const handleCategoryDialogSuccess = () => {
|
||||
fetchData()
|
||||
categoryDialogVisible.value = false
|
||||
}
|
||||
const handleCategoryDialogClosed = () => {
|
||||
isEdit.value = false
|
||||
currentTableData.value = null
|
||||
}
|
||||
|
||||
const deleteCategoryClick = async (id: string) => {
|
||||
await deleteCategoryRequest(id)
|
||||
fetchData()
|
||||
MessagePlugin.success('删除分类成功')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="分类管理">
|
||||
<template #right-area>
|
||||
<TButton @click="categoryDialogVisible = true">创建分类</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
height="92%"
|
||||
table-layout="auto"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
<template #operation="{ row }">
|
||||
<TSpace :size="1">
|
||||
<TButton variant="text" size="small" theme="primary" @click="editClick(row)"
|
||||
>编辑</TButton
|
||||
>
|
||||
<t-popconfirm
|
||||
theme="default"
|
||||
content="确认删除此项分类吗"
|
||||
@confirm="deleteCategoryClick(row.id)"
|
||||
>
|
||||
<TButton variant="text" size="small" theme="danger">删除</TButton>
|
||||
</t-popconfirm>
|
||||
</TSpace>
|
||||
</template>
|
||||
</TTable>
|
||||
<CategoryDialog
|
||||
headerTitle="分类"
|
||||
:category="currentTableData"
|
||||
v-model:visible="categoryDialogVisible"
|
||||
@closed="handleCategoryDialogClosed"
|
||||
@success="handleCategoryDialogSuccess"
|
||||
></CategoryDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.t-card__body) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,148 +0,0 @@
|
||||
<template>
|
||||
<t-dialog
|
||||
width="40%"
|
||||
:header="header"
|
||||
:confirmBtn="confirmBtn"
|
||||
:closeOnOverlayClick="false"
|
||||
@close="handleCloseDialog"
|
||||
@confirm="fetchSaveClassifyData"
|
||||
>
|
||||
<t-space direction="vertical" style="width: 100%">
|
||||
<TForm ref="form" :data="classifyData" :rules="rules" resetType="initial">
|
||||
<TFormItem label="分类名称:" name="name" help="名称长度小于5个汉字,大于2个汉字">
|
||||
<t-input v-model.trim="classifyData.name" clearable placeholder="请输入分类名称" />
|
||||
</TFormItem>
|
||||
<TFormItem label="分类编号:" name="numbering" help="编号由大于4个字符的英文字母组成">
|
||||
<t-input v-model.trim="classifyData.numbering" clearable placeholder="请输入分类编号" />
|
||||
</TFormItem>
|
||||
<TFormItem label="排序级别:" name="sort" help="排序级别由正整数组成">
|
||||
<t-input v-model.trim="classifyData.sort" clearable placeholder="请输入排序级别" />
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</t-space>
|
||||
</t-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { Classify } from '@/model/classify'
|
||||
import { computed, ref, reactive, watch } from 'vue'
|
||||
import type { FormInstanceFunctions, FormProps } from 'tdesign-vue-next'
|
||||
const props = defineProps<{
|
||||
isEdit?: Boolean | null
|
||||
headerTitle?: String | null
|
||||
classify: Classify | {}
|
||||
}>()
|
||||
const form = ref<FormInstanceFunctions | null>(null)
|
||||
const header = computed(() => `${props.isEdit ? '编辑' : '创建'}${props.headerTitle || ''}`)
|
||||
const confirmBtn = computed(() => (props.isEdit ? '保存' : '确定'))
|
||||
const classifyData: FormProps['data'] = reactive({ name: '', sort: 0 })
|
||||
const rules: FormProps['rules'] = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '分类名称不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '分类名称不能为空',
|
||||
type: 'error',
|
||||
trigger: 'change'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '分类名称不能为空'
|
||||
},
|
||||
{
|
||||
min: 4,
|
||||
message: '输入汉字长度应在2到5之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
max: 10,
|
||||
message: '输入汉字长度应在2到5之间',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
numbering: [
|
||||
{
|
||||
required: true,
|
||||
message: '分类编号不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '分类编号不能为空',
|
||||
type: 'error',
|
||||
trigger: 'change'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '分类编号不能为空'
|
||||
},
|
||||
{
|
||||
min: 4,
|
||||
message: '输入字符应大于4个字符长度',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
pattern: /^[A-Za-z]+$/,
|
||||
message: '输入字符须为英文字母',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: '排序级别不能为空',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: '排序级别不能为空',
|
||||
type: 'error',
|
||||
trigger: 'change'
|
||||
},
|
||||
{
|
||||
whitespace: true,
|
||||
message: '排序级别不能为空'
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: '排序级别必须为正整数',
|
||||
type: 'error',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
watch(
|
||||
() => props.classify,
|
||||
(newClassify) => {
|
||||
Object.assign(classifyData, newClassify)
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
const fetchSaveClassifyData = async () => {
|
||||
/* TODO: 保存分类数据 */
|
||||
if (form.value) {
|
||||
const valid = await form.value.validate()
|
||||
if (valid && typeof valid === 'boolean') {
|
||||
/* TODO: 校验通过保存分类数据 */
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
const handleCloseDialog = () => {
|
||||
// 数据&&规则校验结果重置
|
||||
if (form.value) {
|
||||
form.value.reset()
|
||||
form.value.clearValidate()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,107 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import type { BaseTableColumns } from 'tdesign-vue-next'
|
||||
import type { Classify } from '@/model/classify'
|
||||
import ClassifyDialog from '@/pages/classify/components/ClassifyDialog.vue'
|
||||
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: '分类名称',
|
||||
colKey: 'name',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '分类编号',
|
||||
colKey: 'numbering',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
colKey: 'sort',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
width: 100
|
||||
}
|
||||
]
|
||||
const loading = ref(false)
|
||||
const data = ref(
|
||||
Array.from({ length: 1 })
|
||||
.fill({ id: '1', name: '趣味科普', numbering: 'enjoy', sort: '1' })
|
||||
.map((item) => item)
|
||||
)
|
||||
const pagination = reactive({
|
||||
total: 1,
|
||||
page: 1,
|
||||
size: 10
|
||||
})
|
||||
const classifyDialogVisible = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const currentTableData = ref<Classify | {}>({})
|
||||
const fetchClassifyTableData = () => {
|
||||
/* TODO: 获取分类表格数据 */
|
||||
}
|
||||
onMounted(fetchClassifyTableData)
|
||||
const editClick = (classify: Classify) => {
|
||||
isEdit.value = true
|
||||
currentTableData.value = classify
|
||||
console.log(classify)
|
||||
|
||||
classifyDialogVisible.value = true
|
||||
}
|
||||
const onPageChange = () => {
|
||||
/* TODO: 分页切换 */
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="分类管理">
|
||||
<template #right-area>
|
||||
<TButton @click="classifyDialogVisible = true">创建分类</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
height="92%"
|
||||
table-layout="auto"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
<template #roles="{ row }">
|
||||
<TSpace>
|
||||
<TTag v-for="role in row.roles" :key="role.id" theme="success" variant="light">{{
|
||||
role.label
|
||||
}}</TTag>
|
||||
</TSpace>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<TButton variant="text" size="small" theme="primary" @click="editClick(row)">编辑</TButton>
|
||||
</template>
|
||||
</TTable>
|
||||
<ClassifyDialog
|
||||
:classify="currentTableData"
|
||||
v-model:visible="classifyDialogVisible"
|
||||
:isEdit="isEdit"
|
||||
headerTitle="分类"
|
||||
></ClassifyDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:deep(.t-card__body) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import Background from '@/pages/common/components/Background.vue'
|
||||
import Copyright from '@/components/Copyright.vue'
|
||||
import { LockOnIcon, UserIcon } from 'tdesign-icons-vue-next'
|
||||
import { reactive, ref } from 'vue'
|
||||
import type { CreateTokenRequest } from '@/model/token'
|
||||
@@ -9,38 +8,33 @@ import { useAppStore } from '@/stores/app'
|
||||
|
||||
const loginForm = reactive<CreateTokenRequest>({
|
||||
password: '',
|
||||
email: ''
|
||||
username: ''
|
||||
})
|
||||
|
||||
const canRegister = ref(false)
|
||||
|
||||
const loading = ref(false)
|
||||
const appStore = useAppStore()
|
||||
|
||||
const handleLogin = async () => {
|
||||
if (!loginForm.email || !loginForm.password) {
|
||||
if (!loginForm.username || !loginForm.password) {
|
||||
MessagePlugin.error('用户名或密码不能为空')
|
||||
return
|
||||
}
|
||||
try {
|
||||
loading.value = true
|
||||
await appStore.login(loginForm)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-[100vw] h-[100vh] px-20 flex items-center">
|
||||
<Background></Background>
|
||||
<div class="w-[400px]">
|
||||
<div class="text-4xl font-bold mb-12">欢迎到<br />Yili Admin</div>
|
||||
<div class="mb-12 flex items-center gap-2" v-if="canRegister">
|
||||
买有账号?<TLink>注册新账号</TLink>
|
||||
</div>
|
||||
<div class="text-4xl font-bold mb-12">欢迎到<br />布兰德后台管理系统</div>
|
||||
<div class="flex flex-col gap-6 mb-11">
|
||||
<TInput size="large" placeholder="用户名/邮箱" v-model="loginForm.email" clearable >
|
||||
<TInput size="large" placeholder="账户" v-model="loginForm.username" clearable>
|
||||
<template #prefix-icon>
|
||||
<UserIcon></UserIcon>
|
||||
</template>
|
||||
@@ -57,15 +51,10 @@ const handleLogin = async () => {
|
||||
<LockOnIcon></LockOnIcon>
|
||||
</template>
|
||||
</TInput>
|
||||
<div class="flex justify-between items-center">
|
||||
<TCheckbox>记住账号</TCheckbox>
|
||||
<TLink>忘记密码?</TLink>
|
||||
</div>
|
||||
</div>
|
||||
<TButton size="large" :block="true" @click="handleLogin" :loading="loading">
|
||||
{{ loading ? '登录中' : '登录' }}
|
||||
</TButton>
|
||||
<Copyright />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { uploadFile } from '@/api/file'
|
||||
import { uploadFileOld } from '@/api/file'
|
||||
import { ref, watch } from 'vue'
|
||||
import type { UploadFile } from 'tdesign-vue-next'
|
||||
|
||||
@@ -37,7 +37,7 @@ watch(() => props.modelValue, (value) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TUpload theme="image" accept="image/jpeg,image/png" :request-method="uploadFile" v-model="fileList">
|
||||
<TUpload theme="image" accept="image/jpeg,image/png" :request-method="uploadFileOld" v-model="fileList">
|
||||
</TUpload>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<script setup lang="ts">
|
||||
import type { PetVariety } from '@/model/pet-variety'
|
||||
import { type FormInstanceFunctions, type FormRules, MessagePlugin } from 'tdesign-vue-next'
|
||||
import { createPetVariety, editPetVariety } from '@/api/petVariety'
|
||||
|
||||
const props = defineProps<{
|
||||
data: PetVariety | null
|
||||
}>()
|
||||
|
||||
|
||||
|
||||
const formData = ref<{
|
||||
name: string
|
||||
}>({
|
||||
name: ''
|
||||
})
|
||||
|
||||
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(newData) => {
|
||||
if (newData) {
|
||||
formData.value = newData
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const rules: FormRules<{ name: string }> = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '品种名称不能为空'
|
||||
}
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
const formRef = ref<FormInstanceFunctions | null>(null)
|
||||
const emits = defineEmits<{
|
||||
success: [void]
|
||||
}>()
|
||||
|
||||
const editId = computed(() => props.data?.id)
|
||||
const handleSave = async () => {
|
||||
const validate = await formRef.value?.validate()
|
||||
|
||||
if (validate !== true) return
|
||||
|
||||
try {
|
||||
editId.value
|
||||
? await editPetVariety(editId.value, formData.value.name)
|
||||
: await createPetVariety(formData.value.name)
|
||||
await MessagePlugin.success(`${editId.value ? '编辑' : '创建'}成功`)
|
||||
emits('success')
|
||||
} finally {
|
||||
formRef.value?.reset()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TDialog @confirm="handleSave">
|
||||
<TForm ref="formRef" :data="formData" :rules="rules" resetType="initial">
|
||||
<TFormItem label="宠物品种名称" name="name">
|
||||
<TInput v-model.trim="formData.name" clearable placeholder="请输入宠物品种名称" />
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</TDialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,118 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
|
||||
import { type BaseTableColumns, MessagePlugin } from 'tdesign-vue-next'
|
||||
import { useSearchable } from '@/composables/useSearchable'
|
||||
import { deleteProduct } from '@/api/product'
|
||||
import type { Product } from '@/model/product'
|
||||
import ProductDialog from '@/pages/product/components/ProductDialog.vue'
|
||||
import ImagePreviewer from '@/components/ImagePreviewer.vue'
|
||||
import type { PetVariety, SearchPetVarietyFilter } from '@/model/pet-variety'
|
||||
import { deletePetVariety, searchPetVarieties } from '@/api/petVariety'
|
||||
import PetVarietyDialog from '@/pages/pet-variety/components/PetVarietyDialog.vue'
|
||||
const { data, loading, pagination, onPageChange, fetchData } = useSearchable<
|
||||
SearchPetVarietyFilter,
|
||||
PetVariety
|
||||
>(searchPetVarieties)
|
||||
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: '品种名称',
|
||||
colKey: 'name',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
colKey: 'createdTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
onMounted(fetchData)
|
||||
|
||||
|
||||
const productDialogVisible = ref(false)
|
||||
|
||||
const editData = ref<PetVariety | null>(null)
|
||||
|
||||
const handleEdit = (data: PetVariety) => {
|
||||
editData.value = data
|
||||
productDialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
const handleDelete = async (id: string) => {
|
||||
loading.value = true
|
||||
try {
|
||||
await deletePetVariety(id)
|
||||
await fetchData()
|
||||
await MessagePlugin.success('删除成功')
|
||||
} catch (e) {
|
||||
await MessagePlugin.error('删除失败')
|
||||
}finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleSuccess = async () => {
|
||||
await fetchData()
|
||||
productDialogVisible.value = false
|
||||
editData.value = null
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
editData.value = null
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="宠物品种">
|
||||
<template #right-area>
|
||||
<TButton @click="productDialogVisible = true">添加品种</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
height="92%"
|
||||
table-layout="auto"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
|
||||
<template #operation="{ row }">
|
||||
<TSpace :size="1">
|
||||
<TButton variant="text" size="small" theme="primary" @click="() => handleEdit(row)"
|
||||
>编辑</TButton
|
||||
>
|
||||
<t-popconfirm
|
||||
theme="default"
|
||||
content="确定删除此品种吗?"
|
||||
@confirm="() => handleDelete(row.id)"
|
||||
>
|
||||
<TButton variant="text" size="small" theme="danger">删除</TButton>
|
||||
</t-popconfirm>
|
||||
</TSpace>
|
||||
</template>
|
||||
</TTable>
|
||||
<PetVarietyDialog v-model:visible="productDialogVisible" :data="editData" @success="handleSuccess" @close="handleClose"></PetVarietyDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<script setup lang="ts">
|
||||
import { type CreateProductRequest, type Product, ProductCategory, productCategoryOptions } from '@/model/product'
|
||||
import { type FormInstanceFunctions, type FormRules, MessagePlugin } from 'tdesign-vue-next'
|
||||
import ImageUpload from '@/components/ImageUpload.vue'
|
||||
import { createProduct, editProduct } from '@/api/product'
|
||||
|
||||
const props = defineProps<{
|
||||
data: Product | null
|
||||
}>()
|
||||
|
||||
const defaultData: CreateProductRequest = {
|
||||
name: '',
|
||||
photo: '',
|
||||
category: ProductCategory.DRY_FOOD,
|
||||
tags: [],
|
||||
totalWeight: 0,
|
||||
protein: 0,
|
||||
fat: 0,
|
||||
fiber: 0,
|
||||
ash: 0,
|
||||
moisture: 0,
|
||||
meValue: undefined
|
||||
}
|
||||
|
||||
const formData = ref<CreateProductRequest>(defaultData)
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(newData) => {
|
||||
if (newData) {
|
||||
// @ts-ignore
|
||||
const existCategory = productCategoryOptions.find((item) => item.label === newData.category)
|
||||
formData.value = {
|
||||
name: newData.name,
|
||||
category: existCategory ? existCategory.value : ProductCategory.DRY_FOOD,
|
||||
photo: newData.photo,
|
||||
tags: newData.tags,
|
||||
protein: newData.protein,
|
||||
fat: newData.fat,
|
||||
fiber: newData.fiber,
|
||||
ash: newData.ash,
|
||||
moisture: newData.moisture,
|
||||
totalWeight: newData.totalWeight,
|
||||
meValue: newData.meValue ?? undefined,
|
||||
}
|
||||
} else {
|
||||
formData.value = defaultData
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const rules: FormRules<CreateProductRequest> = {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '产品名称不能为空'
|
||||
}
|
||||
],
|
||||
photo: [
|
||||
{
|
||||
required: true,
|
||||
message: '产品图片不能为空'
|
||||
}
|
||||
],
|
||||
totalWeight: [
|
||||
{
|
||||
required: true,
|
||||
message: '净重量不能为空'
|
||||
}
|
||||
],
|
||||
protein: [
|
||||
{
|
||||
required: true,
|
||||
message: '蛋白质不能为空'
|
||||
}
|
||||
],
|
||||
fat: [
|
||||
{
|
||||
required: true,
|
||||
message: '脂肪不能为空'
|
||||
}
|
||||
],
|
||||
fiber: [
|
||||
{
|
||||
required: true,
|
||||
message: '纤维不能为空'
|
||||
}
|
||||
],
|
||||
ash: [
|
||||
{
|
||||
required: true,
|
||||
message: '粗灰分不能为空'
|
||||
}
|
||||
],
|
||||
moisture: [
|
||||
{
|
||||
required: true,
|
||||
message: '水分不能为空'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const formRef = ref<FormInstanceFunctions | null>(null)
|
||||
const emits = defineEmits<{
|
||||
success: [void]
|
||||
}>()
|
||||
|
||||
const editId = computed(() => props.data?.id)
|
||||
const handleSave = async () => {
|
||||
const validate = await formRef.value?.validate()
|
||||
|
||||
if (validate !== true) return
|
||||
|
||||
try {
|
||||
editId.value
|
||||
? await editProduct(editId.value, formData.value)
|
||||
: await createProduct(formData.value)
|
||||
await MessagePlugin.success(`${editId.value ? '编辑' : '创建'}成功`)
|
||||
emits('success')
|
||||
} finally {
|
||||
formRef.value?.reset()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TDialog @confirm="handleSave">
|
||||
<TForm ref="formRef" :data="formData" :rules="rules" resetType="initial">
|
||||
<TFormItem label="产品名称" name="name">
|
||||
<TInput v-model.trim="formData.name" clearable placeholder="请输入产品名称" />
|
||||
</TFormItem>
|
||||
<TFormItem label="产品分类" name="category">
|
||||
<TSelect v-model="formData.category" :options="productCategoryOptions" />
|
||||
</TFormItem>
|
||||
<TFormItem label="产品名称" name="photo">
|
||||
<ImageUpload v-model="formData.photo" />
|
||||
</TFormItem>
|
||||
<TFormItem label="产品标签" name="tags">
|
||||
<TTagInput v-model="formData.tags" clearable placeholder="请输入产品标签" />
|
||||
</TFormItem>
|
||||
<TFormItem label="净重量" name="totalWeight">
|
||||
<TInputNumber
|
||||
v-model="formData.totalWeight"
|
||||
clearable
|
||||
placeholder="请输入净重量"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="g"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="蛋白质" name="protein">
|
||||
<TInputNumber
|
||||
v-model="formData.protein"
|
||||
clearable
|
||||
placeholder="请输入蛋白质含比"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="%"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="脂肪" name="fat">
|
||||
<TInputNumber
|
||||
v-model="formData.fat"
|
||||
clearable
|
||||
placeholder="请输入脂肪含比"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="%"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="纤维" name="fiber">
|
||||
<TInputNumber
|
||||
v-model="formData.fiber"
|
||||
clearable
|
||||
placeholder="请输入纤维含比"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="%"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="粗灰分" name="ash">
|
||||
<TInputNumber
|
||||
v-model="formData.ash"
|
||||
clearable
|
||||
placeholder="请输入粗灰分含比"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="%"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="水分" name="moisture">
|
||||
<TInputNumber
|
||||
v-model="formData.moisture"
|
||||
clearable
|
||||
placeholder="请输入水分含比"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="%"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
<TFormItem label="ME值" name="meValue" help="可选项,直接配置每克产品的代谢能(kcal/g)。如果填写则优先使用此值,否则通过营养成分自动计算">
|
||||
<TInputNumber
|
||||
v-model="formData.meValue"
|
||||
clearable
|
||||
placeholder="请输入ME值(可选)"
|
||||
theme="normal"
|
||||
align="right"
|
||||
suffix="kcal/g"
|
||||
:decimalPlaces="2"
|
||||
:min="0"
|
||||
></TInputNumber>
|
||||
</TFormItem>
|
||||
</TForm>
|
||||
</TDialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,179 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import RegularPage from '@/components/RegularPage.vue'
|
||||
|
||||
import { type BaseTableColumns, MessagePlugin } from 'tdesign-vue-next'
|
||||
import { useSearchable } from '@/composables/useSearchable'
|
||||
import { deleteProduct, searchProducts } from '@/api/product'
|
||||
import type { Product, SearchProductFilter } from '@/model/product'
|
||||
import ProductDialog from '@/pages/product/components/ProductDialog.vue'
|
||||
import ImagePreviewer from '@/components/ImagePreviewer.vue'
|
||||
const { data, loading, pagination, onPageChange, fetchData } = useSearchable<
|
||||
SearchProductFilter,
|
||||
Product
|
||||
>(searchProducts)
|
||||
|
||||
const columns: BaseTableColumns = [
|
||||
{
|
||||
title: '产品名称',
|
||||
colKey: 'name',
|
||||
},
|
||||
{
|
||||
title: '产品分类',
|
||||
colKey: 'category',
|
||||
},
|
||||
{
|
||||
title: '产品图片',
|
||||
colKey: 'photo',
|
||||
},
|
||||
{
|
||||
title: '产品标签',
|
||||
colKey: 'tags',
|
||||
},
|
||||
{
|
||||
title: '净重',
|
||||
colKey: 'totalWeight',
|
||||
},
|
||||
{
|
||||
title: 'ME值',
|
||||
colKey: 'meValue',
|
||||
},
|
||||
{
|
||||
title: '总能量',
|
||||
colKey: 'totalCalories',
|
||||
},
|
||||
{
|
||||
title: '蛋白质',
|
||||
colKey: 'protein',
|
||||
},
|
||||
{
|
||||
title: '脂肪',
|
||||
colKey: 'fat',
|
||||
},
|
||||
{
|
||||
title: '纤维',
|
||||
colKey: 'fiber',
|
||||
},
|
||||
{
|
||||
title: '粗灰分',
|
||||
colKey: 'ash',
|
||||
},
|
||||
{
|
||||
title: '水分',
|
||||
colKey: 'moisture',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
colKey: 'createdTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
colKey: 'operation',
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
onMounted(fetchData)
|
||||
|
||||
|
||||
const productDialogVisible = ref(false)
|
||||
|
||||
const editData = ref<Product | null>(null)
|
||||
|
||||
const handleEdit = (data: Product) => {
|
||||
editData.value = data
|
||||
productDialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
const handleDelete = async (id: string) => {
|
||||
loading.value = true
|
||||
try {
|
||||
await deleteProduct(id)
|
||||
await fetchData()
|
||||
await MessagePlugin.success('删除成功')
|
||||
} catch (e) {
|
||||
await MessagePlugin.error('删除失败')
|
||||
}finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleSuccess = async () => {
|
||||
await fetchData()
|
||||
productDialogVisible.value = false
|
||||
editData.value = null
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
editData.value = null
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RegularPage title="产品管理">
|
||||
<template #right-area>
|
||||
<TButton @click="productDialogVisible = true">创建产品</TButton>
|
||||
</template>
|
||||
<TTable
|
||||
class="w-full h-full"
|
||||
row-key="id"
|
||||
height="92%"
|
||||
table-layout="auto"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
cell-empty-content="-"
|
||||
:paginationAffixedBottom="true"
|
||||
:pagination="{
|
||||
total: pagination.total,
|
||||
current: pagination.page,
|
||||
pageSize: pagination.size,
|
||||
onChange: onPageChange
|
||||
}"
|
||||
>
|
||||
|
||||
<template #photo="{ row }">
|
||||
<ImagePreviewer :url="row.photo"/>
|
||||
</template>
|
||||
|
||||
<template #tags="{ row }">
|
||||
<TSpace>
|
||||
<TTag v-for="tag in row.tags" :key="tag">{{ tag }}</TTag>
|
||||
</TSpace>
|
||||
</template>
|
||||
|
||||
<template #totalWeight="{ row }">
|
||||
{{ row.totalWeight }}g
|
||||
</template>
|
||||
<template #meValue="{ row }">
|
||||
<span v-if="row.meValue">{{ row.meValue }} kcal/g</span>
|
||||
<span v-else class="text-gray-400">自动计算</span>
|
||||
</template>
|
||||
<template #totalCalories="{ row }">
|
||||
{{ row.totalCalories }}kcal
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<TSpace :size="1">
|
||||
<TButton variant="text" size="small" theme="primary" @click="() => handleEdit(row)"
|
||||
>编辑</TButton
|
||||
>
|
||||
<t-popconfirm
|
||||
theme="default"
|
||||
content="确定删除此产品吗?"
|
||||
@confirm="() => handleDelete(row.id)"
|
||||
>
|
||||
<TButton variant="text" size="small" theme="danger">删除</TButton>
|
||||
</t-popconfirm>
|
||||
</TSpace>
|
||||
</template>
|
||||
</TTable>
|
||||
<ProductDialog v-model:visible="productDialogVisible" :data="editData" @success="handleSuccess" @close="handleClose"></ProductDialog>
|
||||
</RegularPage>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -13,8 +13,8 @@ const props = defineProps<{
|
||||
const roles = ref<string[]>([])
|
||||
|
||||
watch(() => props.user, (user) => {
|
||||
if (user) {
|
||||
roles.value = user.roles.map(role => role.name)
|
||||
if (user && user.roles) {
|
||||
roles.value = user.roles.map((role: Role) => role.name)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -52,7 +52,7 @@ const handleConfirm = async () => {
|
||||
<TDialog>
|
||||
<TForm v-if="user">
|
||||
<TFormItem label="用户">
|
||||
<div>{{ user.name }}</div>
|
||||
<div>{{ user.name || user.username }}</div>
|
||||
</TFormItem>
|
||||
<TFormItem label="角色">
|
||||
<TSelect v-model="roles" :options="options" multiple></TSelect>
|
||||
|
||||
@@ -79,7 +79,7 @@ const handleRoleSettingSuccess = () => {
|
||||
<TFormItem label="手机号码">
|
||||
<TInput placeholder="请输入需要搜索的用户姓名"></TInput>
|
||||
</TFormItem>
|
||||
</TCol>
|
||||
</TCol>7
|
||||
<TCol :span="3">
|
||||
<TFormItem label="手机号码">
|
||||
<TInput placeholder="请输入需要搜索的用户姓名"></TInput>
|
||||
|
||||
+40
-4
@@ -6,14 +6,50 @@ import Layout from '@/layouts/Layout.vue'
|
||||
|
||||
export const asyncRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
name: 'classify',
|
||||
path: 'classify',
|
||||
component: () => import('@/pages/classify/index.vue'),
|
||||
name: 'category',
|
||||
path: 'category',
|
||||
component: () => import('@/pages/category/index.vue'),
|
||||
meta: {
|
||||
title: '分类管理',
|
||||
icon: 'system-3'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'article',
|
||||
path: 'article',
|
||||
component: () => import('@/pages/article/index.vue'),
|
||||
meta: {
|
||||
title: '咨询管理',
|
||||
icon: 'collection'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'carousal',
|
||||
path: 'carousal',
|
||||
component: () => import('@/pages/carousal/index.vue'),
|
||||
meta: {
|
||||
title: '轮播图管理',
|
||||
icon: 'image'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'product',
|
||||
path: 'product',
|
||||
meta: {
|
||||
title: '产品管理',
|
||||
icon: 'shop'
|
||||
},
|
||||
component: () => import('@/pages/product/index.vue')
|
||||
},
|
||||
{
|
||||
name: 'pet-variety',
|
||||
path: 'pet-variety',
|
||||
meta: {
|
||||
title: '宠物品种',
|
||||
icon: 'cat'
|
||||
},
|
||||
component: () => import('@/pages/pet-variety/index.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
@@ -24,7 +60,7 @@ const router = createRouter({
|
||||
component: Layout,
|
||||
path: '/',
|
||||
redirect: {
|
||||
name: 'dashboard'
|
||||
name: 'category'
|
||||
},
|
||||
children: asyncRoutes
|
||||
},
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"types": ["node"]
|
||||
|
||||
Reference in new issue
Block a user