diff --git a/.env.production b/.env.production index fef0d7a..acf41eb 100644 --- a/.env.production +++ b/.env.production @@ -1,11 +1,10 @@ ENV = 'production' -VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址 - - +VITE_APP_API_BASEURL =https://orico.com.cn/admapi/v1 +#前端回显图片之类的地址 # 线上环境 VITE_USER_NODE_ENV = production #前端回显图片之类的地址 -VITE_APP_API_BASE_UPLOAD_URL =https://dev.ow.f2b211.com/ +VITE_APP_API_BASE_UPLOAD_URL =https://orico.com.cn/ # 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔 # Optional: gzip | brotli | none diff --git a/README.md b/README.md index 66eed70..a78a894 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # node 版本 -16.12.0 +16.12.0 -16.18.0 # nrm 安装(镜像源管理) diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..3e50a00 Binary files /dev/null and b/dist.zip differ diff --git a/index.html b/index.html index 31fd592..6a5d5bb 100644 --- a/index.html +++ b/index.html @@ -103,51 +103,6 @@ } - + diff --git a/package-lock.json b/package-lock.json index e09bb2d..c98248d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,9 +10,11 @@ "dependencies": { "@element-plus/icons-vue": "^2.1.0", "@types/decimal.js": "^7.4.0", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "^10.1.2", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", + "@zhj-target/vue3-kind-editor": "^0.1.3", "async-validator": "^4.2.5", "axios": "^1.4.0", "bwip-js": "^4.3.2", @@ -27,12 +29,14 @@ "jsbarcode": "^3.11.6", "jsonpack": "^1.1.5", "lodash-es": "^4.17.21", + "mavon-editor": "^3.0.2", "mitt": "^3.0.0", "nprogress": "^0.2.0", "pinia": "^2.1.3", "pinia-plugin-persistedstate": "^3.1.0", "print-js": "^1.6.0", "qs": "^6.13.1", + "quill": "^2.0.3", "sortablejs": "^1.15.0", "vue": "^3.3.4", "vue-router": "^4.2.2", @@ -3607,6 +3611,74 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz", "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==" }, + "node_modules/@vueup/vue-quill": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@vueup/vue-quill/-/vue-quill-1.2.0.tgz", + "integrity": "sha512-kd5QPSHMDpycklojPXno2Kw2JSiKMYduKYQckTm1RJoVDA557MnyUXgcuuDpry4HY/Rny9nGNcK+m3AHk94wag==", + "dependencies": { + "quill": "^1.3.7", + "quill-delta": "^4.2.2" + }, + "peerDependencies": { + "vue": "^3.2.41" + } + }, + "node_modules/@vueup/vue-quill/node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + }, + "node_modules/@vueup/vue-quill/node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + }, + "node_modules/@vueup/vue-quill/node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==" + }, + "node_modules/@vueup/vue-quill/node_modules/quill": { + "version": "1.3.7", + "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/@vueup/vue-quill/node_modules/quill-delta": { + "version": "4.2.2", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz", + "integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==", + "dependencies": { + "fast-diff": "1.2.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + } + }, + "node_modules/@vueup/vue-quill/node_modules/quill/node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + }, + "node_modules/@vueup/vue-quill/node_modules/quill/node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/@vueuse/core": { "version": "10.1.2", "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz", @@ -3825,6 +3897,11 @@ "snabbdom": "^3.1.0" } }, + "node_modules/@zhj-target/vue3-kind-editor": { + "version": "0.1.3", + "resolved": "https://registry.npmmirror.com/@zhj-target/vue3-kind-editor/-/vue3-kind-editor-0.1.3.tgz", + "integrity": "sha512-tzSutZUBmGBRFBW8UMu2w5qmFMzp0RbaER8YQnMytq3COc04BHETiQkMOQ2PCHkrUXitzjBOWNSquW/AibizQA==" + }, "node_modules/acorn": { "version": "8.8.2", "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.2.tgz", @@ -4323,13 +4400,20 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/call-bind-apply-helpers": { @@ -4683,7 +4767,6 @@ "version": "2.1.2", "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, "engines": { "node": ">=0.8" } @@ -5448,6 +5531,11 @@ "node": ">=4" } }, + "node_modules/cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" + }, "node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz", @@ -5617,6 +5705,25 @@ "node": ">=0.10" } }, + "node_modules/deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "dependencies": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz", @@ -5637,6 +5744,22 @@ "resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz", "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==" }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -5647,16 +5770,19 @@ } }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-property": { @@ -6566,6 +6692,11 @@ "es5-ext": "~0.10.14" } }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", @@ -6715,6 +6846,11 @@ "resolved": "https://registry.npmmirror.com/type/-/type-2.7.2.tgz", "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "node_modules/extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -6755,8 +6891,7 @@ "node_modules/fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" }, "node_modules/fast-glob": { "version": "3.2.12", @@ -7061,8 +7196,7 @@ "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -7576,12 +7710,14 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { @@ -7605,15 +7741,17 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-value": { @@ -7958,6 +8096,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -8049,7 +8202,6 @@ "version": "1.0.5", "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -8202,7 +8354,6 @@ "version": "1.1.4", "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -9161,6 +9312,14 @@ "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", "dev": true }, + "node_modules/mavon-editor": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.2.tgz", + "integrity": "sha512-QmmsypznEkru3Gj9u/i3OLs7uWOwrAUDyLAiQnl7bj2lvZZ++J7MPA+Al0G26cQZ8GwzyC69T5l6NQjZ2z1Nuw==", + "dependencies": { + "xss": "^1.0.10" + } + }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz", @@ -9725,11 +9884,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -9898,6 +10071,11 @@ "tslib": "^2.0.3" } }, + "node_modules/parchment": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -10653,6 +10831,33 @@ "node": ">=8" } }, + "node_modules/quill": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/quill/-/quill-2.0.3.tgz", + "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", + "dependencies": { + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" + }, + "engines": { + "npm": ">=8.2.3" + } + }, + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "dependencies": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", @@ -10925,17 +11130,22 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/regexpu-core": { @@ -11284,6 +11494,36 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz", @@ -14839,6 +15079,26 @@ "node": ">=12" } }, + "node_modules/xss": { + "version": "1.0.15", + "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz", + "integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==", + "dependencies": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "bin": { + "xss": "bin/xss" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/xss/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", @@ -17502,6 +17762,72 @@ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz", "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==" }, + "@vueup/vue-quill": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@vueup/vue-quill/-/vue-quill-1.2.0.tgz", + "integrity": "sha512-kd5QPSHMDpycklojPXno2Kw2JSiKMYduKYQckTm1RJoVDA557MnyUXgcuuDpry4HY/Rny9nGNcK+m3AHk94wag==", + "requires": { + "quill": "^1.3.7", + "quill-delta": "^4.2.2" + }, + "dependencies": { + "eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + }, + "parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==" + }, + "quill": { + "version": "1.3.7", + "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "requires": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + }, + "dependencies": { + "fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + }, + "quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "requires": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + } + } + } + }, + "quill-delta": { + "version": "4.2.2", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz", + "integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==", + "requires": { + "fast-diff": "1.2.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + } + } + } + }, "@vueuse/core": { "version": "10.1.2", "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.1.2.tgz", @@ -17629,6 +17955,11 @@ "integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==", "requires": {} }, + "@zhj-target/vue3-kind-editor": { + "version": "0.1.3", + "resolved": "https://registry.npmmirror.com/@zhj-target/vue3-kind-editor/-/vue3-kind-editor-0.1.3.tgz", + "integrity": "sha512-tzSutZUBmGBRFBW8UMu2w5qmFMzp0RbaER8YQnMytq3COc04BHETiQkMOQ2PCHkrUXitzjBOWNSquW/AibizQA==" + }, "acorn": { "version": "8.8.2", "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.8.2.tgz", @@ -18014,13 +18345,14 @@ } }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" } }, "call-bind-apply-helpers": { @@ -18301,8 +18633,7 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" }, "codepage": { "version": "1.15.0", @@ -18909,6 +19240,11 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, + "cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" + }, "csso": { "version": "4.2.0", "resolved": "https://registry.npmmirror.com/csso/-/csso-4.2.0.tgz", @@ -19040,6 +19376,19 @@ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, + "deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "requires": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + } + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz", @@ -19057,6 +19406,16 @@ "resolved": "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz", "integrity": "sha512-eMtt76GpDVngZQ3ocgvRcNCklUMwID1PaNbCNxfpDXuiOXttSh0HzBbda1HU9SIUsDc02vb7g9+3I5tlqe/qMQ==" }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, "define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -19064,11 +19423,11 @@ "dev": true }, "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "requires": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } @@ -19784,6 +20143,11 @@ "es5-ext": "~0.10.14" } }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", @@ -19914,6 +20278,11 @@ } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -19948,8 +20317,7 @@ "fast-diff": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" }, "fast-glob": { "version": "3.2.12", @@ -20191,8 +20559,7 @@ "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, "gensync": { "version": "1.0.0-beta.2", @@ -20600,12 +20967,11 @@ "dev": true }, "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "requires": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" } }, "has-proto": { @@ -20620,12 +20986,11 @@ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" } }, "has-value": { @@ -20901,6 +21266,15 @@ "kind-of": "^6.0.0" } }, + "is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "requires": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + } + }, "is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -20980,7 +21354,6 @@ "version": "1.0.5", "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -21088,7 +21461,6 @@ "version": "1.1.4", "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -21866,6 +22238,14 @@ "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", "dev": true }, + "mavon-editor": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/mavon-editor/-/mavon-editor-3.0.2.tgz", + "integrity": "sha512-QmmsypznEkru3Gj9u/i3OLs7uWOwrAUDyLAiQnl7bj2lvZZ++J7MPA+Al0G26cQZ8GwzyC69T5l6NQjZ2z1Nuw==", + "requires": { + "xss": "^1.0.10" + } + }, "mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz", @@ -22328,11 +22708,19 @@ "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.3.tgz", "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==" }, + "object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + } + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object-visit": { "version": "1.0.1", @@ -22466,6 +22854,11 @@ "tslib": "^2.0.3" } }, + "parchment": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -23059,6 +23452,27 @@ "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true }, + "quill": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/quill/-/quill-2.0.3.tgz", + "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", + "requires": { + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" + } + }, + "quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "requires": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", @@ -23280,14 +23694,16 @@ } }, "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" } }, "regexpu-core": { @@ -23557,6 +23973,30 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, + "set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + } + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz", @@ -26355,6 +26795,22 @@ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true }, + "xss": { + "version": "1.0.15", + "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz", + "integrity": "sha512-FVdlVVC67WOIPvfOwhoMETV72f6GbW7aOabBC3WxN/oUdoEMDyLz4OgRv5/gck2ZeNqEQu+Tb0kloovXOfpYVg==", + "requires": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index d9c89d6..16a0148 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,11 @@ "dependencies": { "@element-plus/icons-vue": "^2.1.0", "@types/decimal.js": "^7.4.0", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "^10.1.2", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", + "@zhj-target/vue3-kind-editor": "^0.1.3", "async-validator": "^4.2.5", "axios": "^1.4.0", "bwip-js": "^4.3.2", @@ -39,12 +41,14 @@ "jsbarcode": "^3.11.6", "jsonpack": "^1.1.5", "lodash-es": "^4.17.21", + "mavon-editor": "^3.0.2", "mitt": "^3.0.0", "nprogress": "^0.2.0", "pinia": "^2.1.3", "pinia-plugin-persistedstate": "^3.1.0", "print-js": "^1.6.0", "qs": "^6.13.1", + "quill": "^2.0.3", "sortablejs": "^1.15.0", "vue": "^3.3.4", "vue-router": "^4.2.2", diff --git a/src/App.vue b/src/App.vue index 08f9635..04a2129 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,8 @@ diff --git a/src/api/index.ts b/src/api/index.ts index 42219a6..1dfce33 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -6,7 +6,7 @@ import { showFullScreenLoading, tryHideFullScreenLoading } from "@/config/servic import { ElMessage } from "element-plus"; import { ResultData } from "@/api/interface"; import { ResultEnum } from "@/enums/httpEnum"; -import { checkStatus } from "./helper/checkStatus"; +// import { checkStatus } from "./helper/checkStatus"; import { useUserStore } from "@/stores/modules/user"; import router from "@/routers"; //获取导出表格name @@ -14,8 +14,10 @@ const getDispositionName = (response: any) => { //导出表格,从content-disposition获取表格的名称 只有导出服务端才会返回该字段 const contentDisposition = response.headers["content-disposition"]; if (contentDisposition) { + let contentDispositionClone = decodeURIComponent(contentDisposition); + console.log(contentDispositionClone); // 解析 Content-Disposition 以提取文件名 - const filenameMatch = contentDisposition.match(/filename=(.*)/i); + const filenameMatch = contentDispositionClone.match(/filename=(.*)/i); if (filenameMatch && filenameMatch[1]) { let filename = filenameMatch[1].trim(); localStorage.setItem("filename", filename); @@ -54,7 +56,7 @@ class RequestHttp { // 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制 config.noLoading || showFullScreenLoading(); if (config.headers && typeof config.headers.set === "function") { - config.headers.set("Authorization", "Bearer" + " " + userStore.token); + config.headers.set("Authorization", userStore.token); } return config; }, @@ -69,10 +71,27 @@ class RequestHttp { */ this.service.interceptors.response.use( (response: AxiosResponse) => { - const { data } = response; + const { data, request } = response; + tryHideFullScreenLoading(); + const imgId = request?.responseURL?.split("imgId=")[1]; //获取导出表格名称 getDispositionName(response); + // 获取响应头中的 Authorization 信息 + const authorization = response.headers["authorization"]; + if (imgId) { + return { + imgId, + data + }; + } + if (authorization) { + // 可以在这里更新用户的 token 信息 + const userStore = useUserStore(); + userStore.setToken(authorization); + return data; + } + //0正常,1非正常 if (data.code == 1) { ElMessage.error(data.msg); @@ -94,7 +113,7 @@ class RequestHttp { // 根据服务器响应的错误状态码,做不同的处理 if (response) { console.log("error-走到了这里", response.status); - checkStatus(response.status, response.data); + // checkStatus(response.status, response.data); } // 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面 if (!window.navigator.onLine) router.replace("/500"); diff --git a/src/api/modules/articleClass.ts b/src/api/modules/articleClass.ts index ed325c7..ec5752d 100644 --- a/src/api/modules/articleClass.ts +++ b/src/api/modules/articleClass.ts @@ -5,6 +5,10 @@ const ARTICLE_CATEGORY = `/article/category`; export const getArticleClassListApi = (params: any) => { return http.get(`${ARTICLE_CATEGORY}/index`, params); }; +//文章分类下拉框 +export const getArticleClassApi = () => { + return http.get(`/article/categorys`); +}; //文章分类新增 export const getArticleClassAddSaveApi = (params: any) => { return http.post(`${ARTICLE_CATEGORY}/save`, params); @@ -15,18 +19,24 @@ export const getArticleClassDelApi = (params: any) => { }; //文章分类更新(用于编辑后) export const getArticleClassEditUpApi = (params: any) => { - const { id, name, sort, is_show, seo_title, seo_keywords, seo_desc } = params; + const { id, name, sort, is_show, pid, seo_title, seo_keywords, seo_desc, icon } = params; return http.put(`/article/category/update/${id}`, { name, sort, is_show, + pid, seo_title, seo_keywords, - seo_desc + seo_desc, + icon }); }; //文章分类详情(用于编辑) export const getArticleClassDetailsApi = (params: any) => { return http.get(`${ARTICLE_CATEGORY}/read/${params}`); }; +export const getArticleClassSortApi = (params: any) => { + const { id, sort } = params; + return http.post(`${ARTICLE_CATEGORY}/sort/${id}`, { sort }); +}; diff --git a/src/api/modules/banner.ts b/src/api/modules/banner.ts index e0ed5a4..1dd93bb 100644 --- a/src/api/modules/banner.ts +++ b/src/api/modules/banner.ts @@ -6,7 +6,6 @@ export const getBannerListApi = (params: any) => { }; //新增 export const getBannerListSaveApi = (params: any) => { - console.log("1232323"); return http.post(`${B}/save`, params, { headers: { "Content-Type": "application/x-www-form-urlencoded" @@ -37,3 +36,7 @@ export const getBannerListExportApi = (params: any) => { responseType: "arraybuffer" }); }; +//分类 +export const getBannerClassListApi = (params?: any) => { + return http.get(`/banner/list`, params); //v1/banner/list +}; diff --git a/src/api/modules/downloadClass.ts b/src/api/modules/downloadClass.ts index 38e1bf1..9a7b77b 100644 --- a/src/api/modules/downloadClass.ts +++ b/src/api/modules/downloadClass.ts @@ -26,6 +26,6 @@ export const getCategorySortApi = (params: any) => { return http.post(`${ATT_C}/sort/${params.id}`, { sort: params.sort }); }; //下载分类下拉列表 -export const getCategorysApi = () => { - return http.get(`/attachment/categorys`); +export const getCategorysApi = (params?: any) => { + return http.get(`/attachment/tree`, params); }; diff --git a/src/api/modules/productAttributeList.ts b/src/api/modules/productAttributeList.ts index 87cbfe9..8497c9a 100644 --- a/src/api/modules/productAttributeList.ts +++ b/src/api/modules/productAttributeList.ts @@ -16,7 +16,6 @@ export const getProductAttrDelApi = (params: any) => { // 产品属性更新 export const getProductAttrUpApi = (params: any) => { const { id } = params; - return http.put(`${PRODUCT_ATTR}/update/${id}`, params); }; //产品属性新增 diff --git a/src/api/modules/productLink.ts b/src/api/modules/productLink.ts index 24bd8fa..07d5918 100644 --- a/src/api/modules/productLink.ts +++ b/src/api/modules/productLink.ts @@ -23,3 +23,12 @@ export const getProductBuypassUpdateApi = (params: any) => { const { id, param } = params; return http.put(`${PRODUCT_BUYPASS}/update/${id}`, param); }; + +//新增 +export const getProductBuypassListSaveApi = (params: any) => { + return http.post(`${PRODUCT_BUYPASS}/save`, params, { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + } + }); +}; diff --git a/src/api/modules/productList.ts b/src/api/modules/productList.ts index 958b542..68606aa 100644 --- a/src/api/modules/productList.ts +++ b/src/api/modules/productList.ts @@ -36,3 +36,7 @@ export const getProductListSortApi = (params: any) => { const { id, sort } = params; return http.post(`${PRODUCT}/sort/${id}`, { sort }); }; +// 产品分类 +export const getProductCategoryListApi = (params?: any) => { + return http.get(`/product/categorys`, params); +}; diff --git a/src/api/modules/upload.ts b/src/api/modules/upload.ts index bf988df..63df1b9 100644 --- a/src/api/modules/upload.ts +++ b/src/api/modules/upload.ts @@ -11,8 +11,8 @@ import http from "@/api"; * @name 文件上传模块 */ // 图片上传 -export const uploadImg = (params: any, name?: any) => { - return http.post(`/images/${name}/upload`, params); +export const uploadImg = (params: any, name?: any, id?: any) => { + return http.post(`/images/${name}/upload?imgId=${id}`, params); }; // 视频上传 diff --git a/src/api/modules/videoClass.ts b/src/api/modules/videoClass.ts index c18d164..4bddfc9 100644 --- a/src/api/modules/videoClass.ts +++ b/src/api/modules/videoClass.ts @@ -1,7 +1,7 @@ import http from "@/api"; const VIDEO_CATEGORY = `video/category`; // 视频分类分页列表 -export const getVideoClassListApi = (params: any) => { +export const getVideoClassListApi = (params?: any) => { return http.get(`${VIDEO_CATEGORY}/index`, params); }; //视频分类详情 diff --git a/src/api/modules/videoList.ts b/src/api/modules/videoList.ts index ae13edd..5f9eb97 100644 --- a/src/api/modules/videoList.ts +++ b/src/api/modules/videoList.ts @@ -26,3 +26,7 @@ export const getVideoListExportApi = (params: any) => { responseType: "arraybuffer" }); }; +//视频分类 +export const getVideoClassListApi = (params?: any) => { + return http.get(`/video/categorys`, params); +}; diff --git a/src/auto-import.d.ts b/src/auto-import.d.ts index 33b4755..44bf070 100644 --- a/src/auto-import.d.ts +++ b/src/auto-import.d.ts @@ -4,67 +4,66 @@ // Generated by unplugin-auto-import export {} declare global { - const EffectScope: typeof import('vue')['EffectScope'] - const ElNotification: typeof import('element-plus/es')['ElNotification'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const effectScope: typeof import('vue')['effectScope'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const h: typeof import('vue')['h'] - const inject: typeof import('vue')['inject'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const toValue: typeof import('vue')['toValue'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useLink: typeof import('vue-router')['useLink'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] - const useSlots: typeof import('vue')['useSlots'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] + const EffectScope: typeof import("vue")["EffectScope"]; + const computed: typeof import("vue")["computed"]; + const createApp: typeof import("vue")["createApp"]; + const customRef: typeof import("vue")["customRef"]; + const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"]; + const defineComponent: typeof import("vue")["defineComponent"]; + const effectScope: typeof import("vue")["effectScope"]; + const getCurrentInstance: typeof import("vue")["getCurrentInstance"]; + const getCurrentScope: typeof import("vue")["getCurrentScope"]; + const h: typeof import("vue")["h"]; + const inject: typeof import("vue")["inject"]; + const isProxy: typeof import("vue")["isProxy"]; + const isReactive: typeof import("vue")["isReactive"]; + const isReadonly: typeof import("vue")["isReadonly"]; + const isRef: typeof import("vue")["isRef"]; + const markRaw: typeof import("vue")["markRaw"]; + const nextTick: typeof import("vue")["nextTick"]; + const onActivated: typeof import("vue")["onActivated"]; + const onBeforeMount: typeof import("vue")["onBeforeMount"]; + const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"]; + const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"]; + const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"]; + const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"]; + const onDeactivated: typeof import("vue")["onDeactivated"]; + const onErrorCaptured: typeof import("vue")["onErrorCaptured"]; + const onMounted: typeof import("vue")["onMounted"]; + const onRenderTracked: typeof import("vue")["onRenderTracked"]; + const onRenderTriggered: typeof import("vue")["onRenderTriggered"]; + const onScopeDispose: typeof import("vue")["onScopeDispose"]; + const onServerPrefetch: typeof import("vue")["onServerPrefetch"]; + const onUnmounted: typeof import("vue")["onUnmounted"]; + const onUpdated: typeof import("vue")["onUpdated"]; + const provide: typeof import("vue")["provide"]; + const reactive: typeof import("vue")["reactive"]; + const readonly: typeof import("vue")["readonly"]; + const ref: typeof import("vue")["ref"]; + const resolveComponent: typeof import("vue")["resolveComponent"]; + const shallowReactive: typeof import("vue")["shallowReactive"]; + const shallowReadonly: typeof import("vue")["shallowReadonly"]; + const shallowRef: typeof import("vue")["shallowRef"]; + const toRaw: typeof import("vue")["toRaw"]; + const toRef: typeof import("vue")["toRef"]; + const toRefs: typeof import("vue")["toRefs"]; + const toValue: typeof import("vue")["toValue"]; + const triggerRef: typeof import("vue")["triggerRef"]; + const unref: typeof import("vue")["unref"]; + const useAttrs: typeof import("vue")["useAttrs"]; + const useCssModule: typeof import("vue")["useCssModule"]; + const useCssVars: typeof import("vue")["useCssVars"]; + const useLink: typeof import("vue-router")["useLink"]; + const useRoute: typeof import("vue-router")["useRoute"]; + const useRouter: typeof import("vue-router")["useRouter"]; + const useSlots: typeof import("vue")["useSlots"]; + const watch: typeof import("vue")["watch"]; + const watchEffect: typeof import("vue")["watchEffect"]; + const watchPostEffect: typeof import("vue")["watchPostEffect"]; + const watchSyncEffect: typeof import("vue")["watchSyncEffect"]; } // for type re-export declare global { - // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue"; } diff --git a/src/components.d.ts b/src/components.d.ts index b03dfa2..207249a 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,10 +7,6 @@ export {} declare module "vue" { export interface GlobalComponents { - 403: typeof import("./components/ErrorMessage/403.vue")["default"]; - 404: typeof import("./components/ErrorMessage/404.vue")["default"]; - 500: typeof import("./components/ErrorMessage/500.vue")["default"]; - ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"]; ElAside: typeof import("element-plus/es")["ElAside"]; ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"]; ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"]; @@ -57,10 +53,6 @@ declare module "vue" { ElTree: typeof import("element-plus/es")["ElTree"]; ElTreeSelect: typeof import("element-plus/es")["ElTreeSelect"]; ElUpload: typeof import("element-plus/es")["ElUpload"]; - Empty: typeof import("./components/ProTable/components/Empty.vue")["default"]; - FormTable: typeof import("./components/FormTable/index.vue")["default"]; - Grid: typeof import("./components/Grid/index.vue")["default"]; - GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"]; IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"]; IEpCircleClose: typeof import("~icons/ep/circle-close")["default"]; IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"]; @@ -68,19 +60,7 @@ declare module "vue" { IEpRemove: typeof import("~icons/ep/remove")["default"]; IEpSearch: typeof import("~icons/ep/search")["default"]; IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"]; - ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"]; - Loading: typeof import("./components/Loading/index.vue")["default"]; - Pagination: typeof import("./components/ProTable/components/Pagination.vue")["default"]; - ProTable: typeof import("./components/ProTable/index.vue")["default"]; RouterLink: typeof import("vue-router")["RouterLink"]; RouterView: typeof import("vue-router")["RouterView"]; - RulesForm: typeof import("./components/rulesForm/index.vue")["default"]; - SearchForm: typeof import("./components/SearchForm/index.vue")["default"]; - SearchFormItem: typeof import("./components/SearchForm/components/SearchFormItem.vue")["default"]; - TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"]; - UploadImg: typeof import("./components/Upload/UploadImg.vue")["default"]; - UploadImgs: typeof import("./components/Upload/UploadImgs.vue")["default"]; - UploadVideo: typeof import("./components/Upload/UploadVideo.vue")["default"]; - WangEditor: typeof import("./components/WangEditor/index.vue")["default"]; } } diff --git a/src/components/Editor/index.scss b/src/components/Editor/index.scss new file mode 100644 index 0000000..e5f946b --- /dev/null +++ b/src/components/Editor/index.scss @@ -0,0 +1,227 @@ +.editor, +.ql-toolbar { + line-height: normal !important; + white-space: pre-wrap !important; +} +.editor-img-uploader { + display: none; +} +.ql-editor { + min-height: 600px; + max-height: 600px; + overflow: auto; +} +.ql-snow .ql-tooltip[data-mode="link"]::before { + content: "请输入链接地址:"; +} +.ql-snow .ql-tooltip.ql-editing a.ql-action::after { + padding-right: 0; + content: "保存"; + border-right: 0; +} +.ql-snow .ql-tooltip[data-mode="video"]::before { + content: "请输入视频地址:"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: "12px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { + content: "10px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { + content: "18px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { + content: "32px"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label::before, +.ql-snow .ql-picker.ql-header .ql-picker-item::before { + content: "文本"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + content: "标题1"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + content: "标题2"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + content: "标题3"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + content: "标题4"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + content: "标题5"; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + content: "标题6"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: "标准字体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { + content: "衬线字体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { + content: "等宽字体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimSun"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimSun"]::before { + font-family: SimSun, sans-serif; + content: "宋体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="SimHei"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="SimHei"]::before { + font-family: SimHei, sans-serif; + content: "黑体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Microsoft-YaHei"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Microsoft-YaHei"]::before { + font-family: "Microsoft YaHei", sans-serif; + content: "微软雅黑"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="KaiTi"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="KaiTi"]::before { + font-family: KaiTi, sans-serif; + content: "楷体"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="FangSong"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="FangSong"]::before { + font-family: FangSong, sans-serif; + content: "仿宋"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Arial"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Arial"]::before { + font-family: Arial, sans-serif; + content: "Arial"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Times-New-Roman"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Times-New-Roman"]::before { + font-family: "Times New Roman", sans-serif; + content: "Times New Roman"; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sans-serif"]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sans-serif"]::before { + font-family: sans-serif; + content: "sans-serif"; +} +.ql-font-SimSun { + font-family: SimSun, sans-serif; +} +.ql-font-SimHei { + font-family: SimHei, sans-serif; +} +.ql-font-Microsoft-YaHei { + font-family: "Microsoft YaHei", sans-serif; +} +.ql-font-KaiTi { + font-family: KaiTi, sans-serif; +} +.ql-font-FangSong { + font-family: FangSong, sans-serif; +} +.ql-font-Arial { + font-family: Arial, sans-serif; +} +.ql-font-Times-New-Roman { + font-family: "Times New Roman", sans-serif; +} +.ql-font-sans-serif { + font-family: sans-serif; +} + +// .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10px"]::before, +// .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before { +// content: "10px"; +// } +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before { + content: "12px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before { + content: "14px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before { + content: "16px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before { + content: "18px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before { + content: "20px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="22px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="22px"]::before { + content: "22px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="24px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24px"]::before { + content: "24px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="26px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="26px"]::before { + content: "26px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28px"]::before { + content: "28px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="30px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="30px"]::before { + content: "30px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before { + content: "32px"; +} + +// .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32px"]::before, +// .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before { +// content: "32px"; +// } +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="36px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="36px"]::before { + content: "36px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="38px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="38px"]::before { + content: "38px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="40px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="40px"]::before { + content: "40px"; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="42px"]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="42px"]::before { + content: "44px"; +} + +// .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="44px"]::before, +// .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="44px"]::before { +// content: "44px"; +// } +// .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="45px"]::before, +// .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="45px"]::before { +// content: "45px"; +// } +// .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="50px"]::before, +// .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="50px"]::before { +// content: "50px"; +// } diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue new file mode 100644 index 0000000..ec3162d --- /dev/null +++ b/src/components/Editor/index.vue @@ -0,0 +1,941 @@ + + + + + diff --git a/src/components/Editor/index2.vue b/src/components/Editor/index2.vue new file mode 100644 index 0000000..77b9047 --- /dev/null +++ b/src/components/Editor/index2.vue @@ -0,0 +1,960 @@ + + + + + diff --git a/src/components/Editor/quill-detail-div.js b/src/components/Editor/quill-detail-div.js new file mode 100644 index 0000000..7ab3fbb --- /dev/null +++ b/src/components/Editor/quill-detail-div.js @@ -0,0 +1,49 @@ +// quill-dynamic-div.js +import { Quill } from "@vueup/vue-quill"; +const Block = Quill.import("blots/block"); + +class DynamicDivBlot extends Block { + // 从 DOM 节点创建 Blot 时,保留所有属性和类名 + static create(value) { + const node = super.create(); + // 如果是从数据恢复(value 存在),还原类名 + if (value?.className) { + node.className = value.className; // 直接设置完整类名字符串(支持多类名) + } + // 保留其他属性(如 id、data-* 等,按需添加) + if (value?.attrs) { + Object.keys(value.attrs).forEach(key => { + node.setAttribute(key, value.attrs[key]); + }); + } + return node; + } + + // 从 Blot 提取值(序列化时用),保留所有类名和属性 + static value(node) { + return { + className: node.className, // 保留完整类名(如 "o_detail_all big") + attrs: Array.from(node.attributes).reduce((attrs, attr) => { + attrs[attr.name] = attr.value; + return attrs; + }, {}) // 保留所有属性 + }; + } + + // 格式化时识别所有 div 标签 + static formats(domNode) { + // 只要是 div 标签,就返回其类名和属性(确保 Quill 不清理) + return { + className: domNode.className, + attrs: Array.from(domNode.attributes).reduce((attrs, attr) => { + attrs[attr.name] = attr.value; + return attrs; + }, {}) + }; + } +} + +DynamicDivBlot.blotName = "dynamicDiv"; // 唯一标识 +DynamicDivBlot.tagName = "div"; // 处理所有 div 标签 + +export default DynamicDivBlot; diff --git a/src/components/Editor/quill-image.js b/src/components/Editor/quill-image.js new file mode 100644 index 0000000..34652ac --- /dev/null +++ b/src/components/Editor/quill-image.js @@ -0,0 +1,25 @@ +import { Quill } from "@vueup/vue-quill"; +let BlockEmbed = Quill.import("blots/block/embed"); +class ImageBlot extends BlockEmbed { + static create(value) { + let node = super.create(); + node.setAttribute("src", value.url); + node.setAttribute("id", value.id); + + console.log("图片信息", node); + return node; + } + // 允许通过键盘删除 + deleteAt(index, length) { + super.deleteAt(index, length); + } + static value(node) { + return { + url: node.getAttribute("src"), + id: node.getAttribute("id") + }; + } +} +ImageBlot.blotName = "customImage"; +ImageBlot.tagName = "img"; +export default ImageBlot; diff --git a/src/components/Editor/quill-image1111.js b/src/components/Editor/quill-image1111.js new file mode 100644 index 0000000..34652ac --- /dev/null +++ b/src/components/Editor/quill-image1111.js @@ -0,0 +1,25 @@ +import { Quill } from "@vueup/vue-quill"; +let BlockEmbed = Quill.import("blots/block/embed"); +class ImageBlot extends BlockEmbed { + static create(value) { + let node = super.create(); + node.setAttribute("src", value.url); + node.setAttribute("id", value.id); + + console.log("图片信息", node); + return node; + } + // 允许通过键盘删除 + deleteAt(index, length) { + super.deleteAt(index, length); + } + static value(node) { + return { + url: node.getAttribute("src"), + id: node.getAttribute("id") + }; + } +} +ImageBlot.blotName = "customImage"; +ImageBlot.tagName = "img"; +export default ImageBlot; diff --git a/src/components/Editor/quill-tabs.js b/src/components/Editor/quill-tabs.js new file mode 100644 index 0000000..f2fe846 --- /dev/null +++ b/src/components/Editor/quill-tabs.js @@ -0,0 +1,407 @@ +import { Quill } from "@vueup/vue-quill"; + +const BlockEmbed = Quill.import("blots/block/embed"); + +class TabsBlot extends BlockEmbed { + static blotName = "tabs"; + static tagName = "div"; + static className = "m-quill-tabs"; + + constructor(domNode) { + super(domNode); + this.bindEvents(); + this.bindDeleteKeyEvent(); // 绑定删除键事件 + } + + static create(value) { + const node = super.create(value); + const tabs = value || []; + + // 主容器样式 + node.setAttribute( + "style", + ` + margin: 15px 0; + overflow: hidden; + border-radius: 4px; + position: relative; + ` + ); + + // 标签栏滚动容器 - 优化高度计算 + const tabScrollContainer = document.createElement("div"); + tabScrollContainer.className = "m-quill-tab-scroll-container"; + tabScrollContainer.setAttribute( + "style", + ` + -webkit-overflow-scrolling: touch; + scrollbar-width: none; + -ms-overflow-style: none; + overflow-y: hidden; + overflow-x: auto; + height: auto; + ` + ); + + // height: auto; /* 自动高度 */ + + // Chrome, Safari 隐藏滚动条 + tabScrollContainer.style.overflow = "auto"; + tabScrollContainer.style.webkitOverflowScrolling = "touch"; + tabScrollContainer.style.scrollbarWidth = "none"; + tabScrollContainer.style.msOverflowStyle = "none"; + + // 标签栏 - 保持原有样式不变 + const tabList = document.createElement("div"); + tabList.className = "m-quill-tab-list"; + tabList.setAttribute( + "style", + ` + display: flex; + border-bottom: 2px solid #dddddd; + min-width: max-content; /* 确保内容撑开容器 */ + ` + ); + + // 生成标签按钮 - 优化内边距计算 + tabs.forEach((tab, index) => { + const btn = document.createElement("button"); + btn.className = `m-quill-tab-button`; + btn.setAttribute("data-index", index); + btn.textContent = tab.title; + btn.setAttribute( + "style", + ` + font-weight: 900; + color: #8f9099; + cursor: pointer; + background: transparent; + border: none; + padding-bottom:14px; + margin-right:3%; /* 增大间距 */ + cursor: pointer; + white-space:nowrap; + font-size:16px; + ${index === 0 ? "color: #1f2635; border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + tabList.appendChild(btn); + }); + + // 编辑按钮 - 保持原有样式不变 + const editBtn = document.createElement("button"); + editBtn.className = "m-quill-tab-edit-btn"; + editBtn.innerHTML = "编辑"; + editBtn.setAttribute("data-action", "edit"); + editBtn.setAttribute( + "style", + ` + padding: 10px; + margin-left: auto; + color: #606266; + cursor: pointer; + width:60px; + padding-left:20px; + background: transparent; + border: none; + display:block; + ` + ); + tabList.appendChild(editBtn); + + // 内容区 - 保持原有样式不变 + const contentList = document.createElement("div"); + contentList.className = "m-quill-tab-content-list"; + contentList.setAttribute( + "style", + ` + padding: 15px; + ` + ); + + // 生成内容面板 - 保持原有样式不变 + tabs.forEach((tab, index) => { + const panel = document.createElement("div"); + panel.className = `m-quill-tab-content`; + panel.setAttribute("data-index", index); + panel.innerHTML = tab.content; + panel.setAttribute( + "style", + ` + display: ${index === 0 ? "block" : "none"}; + min-height: 50px; + ` + ); + panel.contentEditable = "false"; + contentList.appendChild(panel); + }); + + // 组装结构 + tabScrollContainer.appendChild(tabList); + node.appendChild(tabScrollContainer); // 滚动容器添加到主节点 + node.appendChild(contentList); // 内容区 + + // 标签页切换逻辑 - 保持原有逻辑不变 + const scriptTag = document.createElement("script"); + scriptTag.textContent = ` + (function() { + const container = document.currentScript.parentElement; + const isAdmin = window.location.pathname.includes('/admin'); + const editBtn1 = container.querySelector('.m-quill-tab-edit-btn'); + // 仅在非管理系统(文章网站)隐藏编辑按钮,管理系统保持显示 + if (!isAdmin && editBtn1) { + editBtn1.style.display = 'none'; // 文章网站隐藏按钮 + } else if (isAdmin && editBtn1) { + editBtn1.style.display = 'block'; // 管理系统强制显示按钮 + editBtn1.style.width='60px'; + editBtn1.style.minWidth='60px'; + } + + // 非管理系统才执行标签切换逻辑(管理系统不执行) + if (!isAdmin) { + const tabButtons = container.querySelectorAll('.m-quill-tab-button:not([data-action])'); + const contentPanels = container.querySelectorAll('.m-quill-tab-content'); + tabButtons.forEach(btn => { + btn.addEventListener('click', function() { + const index = parseInt(this.dataset.index); + tabButtons.forEach((b, i) => { + b.setAttribute('style', \` + font-weight: 900; + cursor: pointer; + background: transparent; + font-size:16px; + white-space:nowrap; + padding-bottom:14px; + margin-right:3%; + color: #8f9099; + border: none; + \${i === index ? + 'color: #1f2635;border-bottom: 3px solid #537CD8;font-size:16px;' : + '' + } + \`); + }); + contentPanels.forEach((panel, i) => { + panel.style.display = i === index ? 'block' : 'none'; + }); + // 添加滚动逻辑到自执行函数中 + const scrollContainer = container.querySelector(".m-quill-tab-scroll-container"); + const activeBtn = tabButtons[index]; + if (scrollContainer && activeBtn) { + activeBtn.scrollIntoView({ + behavior: "smooth", + block: "nearest", + inline: "center" + }); + } + }); + }); + } + })(); + `; + + node.appendChild(scriptTag); + node.setAttribute("contenteditable", "false"); + return node; + } + + bindEvents() { + if (!this.eventBoundElements) { + this.eventBoundElements = new WeakMap(); + } + + // 编辑按钮事件 - 保持原有逻辑不变 + const editBtn = this.domNode.querySelector(".m-quill-tab-edit-btn"); + if (editBtn) { + editBtn.removeEventListener("click", this.handleEditClick); + this.handleEditClick = e => { + e.stopPropagation(); + this.domNode.dispatchEvent( + new CustomEvent("edit-tabs", { + bubbles: true, + detail: { blot: this } + }) + ); + }; + editBtn.addEventListener("click", this.handleEditClick); + } + + // 标签切换事件 - 保持原有逻辑不变 + const tabButtons = this.domNode.querySelectorAll(".m-quill-tab-button:not([data-action])"); + tabButtons.forEach(btn => { + if (!this.eventBoundElements.has(btn)) { + btn.addEventListener("click", () => { + const index = parseInt(btn.dataset.index, 10); + this.selectTab(index); + }); + this.eventBoundElements.set(btn, true); + } + }); + } + + // 增强版删除键处理 - 保持原有逻辑不变 + bindDeleteKeyEvent() { + this.domNode.addEventListener( + "keydown", + e => { + if (e.key === "Backspace" || e.key === "Delete") { + const selection = window.getSelection(); + if (!selection.rangeCount) return; + + const range = selection.getRangeAt(0); + const parentBlock = this.domNode; + + const isInside = parentBlock.contains(range.commonAncestorContainer); + + if (!isInside) { + e.preventDefault(); + return; + } + + if ( + range.startContainer === parentBlock && + range.endContainer === parentBlock && + range.startOffset === 0 && + range.endOffset >= parentBlock.childNodes.length + ) { + e.preventDefault(); + } + } + }, + true + ); + + const tabList = this.domNode.querySelector(".m-quill-tab-list"); + if (tabList) { + tabList.querySelectorAll("*").forEach(el => { + el.contentEditable = "false"; + }); + } + } + + selectTab(index) { + const buttons = this.domNode.querySelectorAll(".m-quill-tab-button:not([data-action])"); + const panels = this.domNode.querySelectorAll(".m-quill-tab-content"); + + // 保持原有样式逻辑不变 + buttons.forEach((btn, i) => { + btn.setAttribute( + "style", + ` + font-weight: 900; + cursor: pointer; + background: transparent; + border: none; + font-size:16px; + padding-bottom:14px; + margin-right:3%; + white-space:nowrap; + color: #8f9099; + border-bottom: 3px solid transparent; + ${i === index ? "color: #1f2635;border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + }); + + panels.forEach((panel, i) => { + panel.style.display = i === index ? "block" : "none"; + }); + + // 滚动到当前选中的标签 + const scrollContainer = this.domNode.querySelector(".m-quill-tab-scroll-container"); + const activeBtn = buttons[index]; + if (scrollContainer && activeBtn) { + activeBtn.scrollIntoView({ + behavior: "smooth", + block: "nearest", + inline: "center" + }); + } + } + + static value(node) { + const tabs = []; + const buttons = node.querySelectorAll(".m-quill-tab-button:not([data-action])"); + const panels = node.querySelectorAll(".m-quill-tab-content"); + + buttons.forEach((btn, i) => { + tabs.push({ + title: btn.textContent, + content: panels[i]?.innerHTML || "" + }); + }); + + return tabs; + } + + update(mutations, context) { + super.update(mutations, context); + const scriptTag = this.domNode.querySelector("script"); + if (scriptTag) { + const newScript = document.createElement("script"); + newScript.textContent = scriptTag.textContent; + scriptTag.parentNode.replaceChild(newScript, scriptTag); + } + this.bindEvents(); + this.bindDeleteKeyEvent(); + } + + getValue() { + return TabsBlot.value(this.domNode); + } + + // 更新标签页数据 - 保持原有逻辑不变 + updateContents(tabs) { + const contentList = this.domNode.querySelector(".m-quill-tab-content-list"); + const tabList = this.domNode.querySelector(".m-quill-tab-list"); + const editBtn = this.domNode.querySelector(".m-quill-tab-edit-btn"); + + Array.from(tabList.children).forEach(child => { + if (!child.classList.contains("m-quill-tab-edit-btn")) { + child.remove(); + } + }); + contentList.innerHTML = ""; + + tabs.forEach((tab, index) => { + const btn = document.createElement("button"); + btn.className = "m-quill-tab-button"; + btn.setAttribute("data-index", index); + btn.textContent = tab.title; + btn.setAttribute( + "style", + ` + font-weight: 900; + color: #8f9099; + cursor: pointer; + background: transparent; + border: none; + padding-bottom:14px; + margin-right:3%; + white-space:nowrap; + font-size:16px; + ${index === 0 ? "color: #1f2635; border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + tabList.insertBefore(btn, editBtn); + + const panel = document.createElement("div"); + panel.className = "m-quill-tab-content"; + panel.setAttribute("data-index", index); + panel.innerHTML = tab.content; + panel.setAttribute( + "style", + ` + display: ${index === 0 ? "block" : "none"}; + min-height: 50px; + ` + ); + panel.contentEditable = "false"; + contentList.appendChild(panel); + }); + + this.bindEvents(); + } +} + +export default TabsBlot; diff --git a/src/components/Editor/quill-tabs1.js b/src/components/Editor/quill-tabs1.js new file mode 100644 index 0000000..82a9ea3 --- /dev/null +++ b/src/components/Editor/quill-tabs1.js @@ -0,0 +1,398 @@ +import { Quill } from "@vueup/vue-quill"; + +const BlockEmbed = Quill.import("blots/block/embed"); + +class TabsBlot extends BlockEmbed { + static blotName = "tabs"; + static tagName = "div"; + static className = "m-quill-tabs"; + + constructor(domNode) { + super(domNode); + this.bindEvents(); + this.bindDeleteKeyEvent(); // 绑定删除键事件 + } + + static create(value) { + const node = super.create(value); + const tabs = value || []; + + // 主容器样式 + node.setAttribute( + "style", + ` + margin: 15px 0; + overflow: hidden; + border-radius: 4px; + position: relative; + ` + ); + + // 标签栏滚动容器 - 添加隐藏滚动条样式 + const tabScrollContainer = document.createElement("div"); + tabScrollContainer.className = "m-quill-tab-scroll-container"; + tabScrollContainer.setAttribute( + "style", + ` + overflow-x: auto; + overflow-y: hidden; + + -webkit-overflow-scrolling: touch; /* 增强移动端滚动体验 */ + scrollbar-width: none; /* Firefox 隐藏滚动条 */ + -ms-overflow-style: none; /* IE 10+ 隐藏滚动条 */ + ` + ); + + // Chrome, Safari 隐藏滚动条 + tabScrollContainer.style.overflow = "auto"; + tabScrollContainer.style.webkitOverflowScrolling = "touch"; + tabScrollContainer.style.scrollbarWidth = "none"; + tabScrollContainer.style.msOverflowStyle = "none"; + + // 关键:隐藏滚动条但保留功能 + tabScrollContainer.innerHTML = ` + + `; + + // 标签栏 - 保持原有样式不变 + const tabList = document.createElement("div"); + tabList.className = "m-quill-tab-list"; + tabList.setAttribute( + "style", + ` + display: flex; + border-bottom: 1px solid #dddddd; + min-width: max-content; /* 确保内容撑开容器 */ + ` + ); + + // 生成标签按钮 - 保持原有样式不变 + tabs.forEach((tab, index) => { + const btn = document.createElement("button"); + btn.className = `m-quill-tab-button`; + btn.setAttribute("data-index", index); + btn.textContent = tab.title; + btn.setAttribute( + "style", + ` + padding: 1%; + font-weight: 900; + color: #8f9099; + cursor: pointer; + background: transparent; + border: none; + margin-right: 1%; + cursor: pointer; + font-size:16px; + ${index === 0 ? "color: #1f2635; border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + tabList.appendChild(btn); + }); + + // 编辑按钮 - 保持原有样式不变 + const editBtn = document.createElement("button"); + editBtn.className = "m-quill-tab-edit-btn"; + editBtn.innerHTML = "编辑"; + editBtn.setAttribute("data-action", "edit"); + editBtn.setAttribute( + "style", + ` + padding: 10px; + margin-left: auto; + color: #606266; + cursor: pointer; + width:50px; + background: transparent; + border: none; + display:block; + ` + ); + tabList.appendChild(editBtn); + + // 内容区 - 保持原有样式不变 + const contentList = document.createElement("div"); + contentList.className = "m-quill-tab-content-list"; + contentList.setAttribute( + "style", + ` + padding: 15px; + ` + ); + + // 生成内容面板 - 保持原有样式不变 + tabs.forEach((tab, index) => { + const panel = document.createElement("div"); + panel.className = `m-quill-tab-content`; + panel.setAttribute("data-index", index); + panel.innerHTML = tab.content; + panel.setAttribute( + "style", + ` + display: ${index === 0 ? "block" : "none"}; + min-height: 50px; + ` + ); + panel.contentEditable = "false"; + contentList.appendChild(panel); + }); + + // 组装结构 + tabScrollContainer.appendChild(tabList); + node.appendChild(tabScrollContainer); // 滚动容器添加到主节点 + node.appendChild(contentList); // 内容区 + + // 标签页切换逻辑 - 保持原有逻辑不变 + const scriptTag = document.createElement("script"); + scriptTag.textContent = ` + (function() { + const container = document.currentScript.parentElement; + const isAdmin = window.location.pathname.includes('/admin'); + const editBtn1 = container.querySelector('.m-quill-tab-edit-btn'); + + // 仅在非管理系统(文章网站)隐藏编辑按钮,管理系统保持显示 + if (!isAdmin && editBtn1) { + editBtn1.style.display = 'none'; // 文章网站隐藏按钮 + } else if (isAdmin && editBtn1) { + editBtn1.style.display = 'block'; // 管理系统强制显示按钮 + } + + // 非管理系统才执行标签切换逻辑(管理系统不执行) + if (!isAdmin) { + const tabButtons = container.querySelectorAll('.m-quill-tab-button:not([data-action])'); + const contentPanels = container.querySelectorAll('.m-quill-tab-content'); + tabButtons.forEach(btn => { + btn.addEventListener('click', function() { + const index = parseInt(this.dataset.index); + tabButtons.forEach((b, i) => { + b.setAttribute('style', \` + padding: 1%; + font-weight: 900; + cursor: pointer; + background: transparent; + font-size:16px; + margin-right: 1%; + color: #8f9099; + border: none; + \${i === index ? + 'color: #1f2635;border-bottom: 3px solid #537CD8;font-size:16px;' : + '' + } + \`); + }); + contentPanels.forEach((panel, i) => { + panel.style.display = i === index ? 'block' : 'none'; + }); + }); + }); + } + })(); + `; + + node.appendChild(scriptTag); + node.setAttribute("contenteditable", "false"); + return node; + } + + bindEvents() { + if (!this.eventBoundElements) { + this.eventBoundElements = new WeakMap(); + } + + // 编辑按钮事件 - 保持原有逻辑不变 + const editBtn = this.domNode.querySelector(".m-quill-tab-edit-btn"); + if (editBtn) { + editBtn.removeEventListener("click", this.handleEditClick); + this.handleEditClick = e => { + e.stopPropagation(); + this.domNode.dispatchEvent( + new CustomEvent("edit-tabs", { + bubbles: true, + detail: { blot: this } + }) + ); + }; + editBtn.addEventListener("click", this.handleEditClick); + } + + // 标签切换事件 - 保持原有逻辑不变 + const tabButtons = this.domNode.querySelectorAll(".m-quill-tab-button:not([data-action])"); + tabButtons.forEach(btn => { + if (!this.eventBoundElements.has(btn)) { + btn.addEventListener("click", () => { + const index = parseInt(btn.dataset.index, 10); + this.selectTab(index); + }); + this.eventBoundElements.set(btn, true); + } + }); + } + + // 增强版删除键处理 - 保持原有逻辑不变 + bindDeleteKeyEvent() { + this.domNode.addEventListener( + "keydown", + e => { + if (e.key === "Backspace" || e.key === "Delete") { + const selection = window.getSelection(); + if (!selection.rangeCount) return; + + const range = selection.getRangeAt(0); + const parentBlock = this.domNode; + + const isInside = parentBlock.contains(range.commonAncestorContainer); + + if (!isInside) { + e.preventDefault(); + return; + } + + if ( + range.startContainer === parentBlock && + range.endContainer === parentBlock && + range.startOffset === 0 && + range.endOffset >= parentBlock.childNodes.length + ) { + e.preventDefault(); + } + } + }, + true + ); + + const tabList = this.domNode.querySelector(".m-quill-tab-list"); + if (tabList) { + tabList.querySelectorAll("*").forEach(el => { + el.contentEditable = "false"; + }); + } + } + + selectTab(index) { + const buttons = this.domNode.querySelectorAll(".m-quill-tab-button:not([data-action])"); + const panels = this.domNode.querySelectorAll(".m-quill-tab-content"); + + // 保持原有样式逻辑不变 + buttons.forEach((btn, i) => { + btn.setAttribute( + "style", + ` + padding: 1%; + font-weight: 900; + cursor: pointer; + background: transparent; + border: none; + font-size:16px; + margin-right: 1%; + color: #8f9099; + border-bottom: 3px solid transparent; + ${i === index ? "color: #1f2635;border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + }); + + panels.forEach((panel, i) => { + panel.style.display = i === index ? "block" : "none"; + }); + + // 滚动到当前选中的标签 + const scrollContainer = this.domNode.querySelector(".m-quill-tab-scroll-container"); + const activeBtn = buttons[index]; + if (scrollContainer && activeBtn) { + activeBtn.scrollIntoView({ + behavior: "smooth", + block: "nearest", + inline: "center" + }); + } + } + + static value(node) { + const tabs = []; + const buttons = node.querySelectorAll(".m-quill-tab-button:not([data-action])"); + const panels = node.querySelectorAll(".m-quill-tab-content"); + + buttons.forEach((btn, i) => { + tabs.push({ + title: btn.textContent, + content: panels[i]?.innerHTML || "" + }); + }); + + return tabs; + } + + update(mutations, context) { + super.update(mutations, context); + const scriptTag = this.domNode.querySelector("script"); + if (scriptTag) { + const newScript = document.createElement("script"); + newScript.textContent = scriptTag.textContent; + scriptTag.parentNode.replaceChild(newScript, scriptTag); + } + this.bindEvents(); + this.bindDeleteKeyEvent(); + } + + getValue() { + return TabsBlot.value(this.domNode); + } + + // 更新标签页数据 - 保持原有逻辑不变 + updateContents(tabs) { + const contentList = this.domNode.querySelector(".m-quill-tab-content-list"); + const tabList = this.domNode.querySelector(".m-quill-tab-list"); + const editBtn = this.domNode.querySelector(".m-quill-tab-edit-btn"); + + Array.from(tabList.children).forEach(child => { + if (!child.classList.contains("m-quill-tab-edit-btn")) { + child.remove(); + } + }); + contentList.innerHTML = ""; + + tabs.forEach((tab, index) => { + const btn = document.createElement("button"); + btn.className = "m-quill-tab-button"; + btn.setAttribute("data-index", index); + btn.textContent = tab.title; + btn.setAttribute( + "style", + ` + padding: 1%; + font-weight: 900; + color: #8f9099; + cursor: pointer; + background: transparent; + border: none; + margin-right: 1%; + font-size:16px; + ${index === 0 ? "color: #1f2635; border-bottom: 3px solid #537CD8;font-size:16px;" : ""} + ` + ); + tabList.insertBefore(btn, editBtn); + + const panel = document.createElement("div"); + panel.className = "m-quill-tab-content"; + panel.setAttribute("data-index", index); + panel.innerHTML = tab.content; + panel.setAttribute( + "style", + ` + display: ${index === 0 ? "block" : "none"}; + min-height: 50px; + ` + ); + panel.contentEditable = "false"; + contentList.appendChild(panel); + }); + + this.bindEvents(); + } +} + +export default TabsBlot; diff --git a/src/components/Editor/quill-video.js b/src/components/Editor/quill-video.js new file mode 100644 index 0000000..0b36b9e --- /dev/null +++ b/src/components/Editor/quill-video.js @@ -0,0 +1,139 @@ +import { Quill } from "@vueup/vue-quill"; +const BlockEmbed = Quill.import("blots/block/embed"); +const Link = Quill.import("formats/link"); + +const ATTRIBUTES = ["height", "width", "poster"]; + +class Video extends BlockEmbed { + static create(value) { + let node = super.create(); + + // 基础视频属性 + node.setAttribute("controls", "controls"); + node.setAttribute("playsinline", "true"); + node.setAttribute("webkit-playsinline", "true"); + node.setAttribute("type", "video/mp4"); + + // 处理视频URL,添加时间片段定位到0.001秒(避开黑屏) + const baseUrl = this.sanitize(value.url); + const videoUrl = baseUrl.includes("#") ? `${baseUrl}&t=0.001` : `${baseUrl}#t=0.001`; + node.setAttribute("src", videoUrl); + + // 临时封面(加载中显示) + node.setAttribute( + "poster", + "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Crect width='100%25' height='100%25' fill='%23f0f0f0'/%3E%3Ccircle cx='300' cy='150' r='40' fill='%23ccc'/%3E%3Cpolygon points='300,130 330,160 270,160' fill='white'/%3E%3C/svg%3E" + ); + + // 自动截取封面(未提供poster时) + if (!value.poster) { + this.captureFrameAsBlob(videoUrl, node); + } else { + node.setAttribute("poster", this.sanitize(value.poster)); + } + // width: 600px; + // height: 300px; + // object-fit: contain; + // 视频样式 + node.setAttribute( + "style", + ` + ` + ); + + return node; + } + + /** + * 生成视频帧Blob(核心方法,返回Promise) + * @param {string} videoUrl - 视频的本地Blob URL + * @returns {Promise} - 视频帧Blob或null + */ + /** + * 将视频Blob URL转换为JPG图片Blob + * @param {string} videoBlobUrl - 本地视频Blob URL(blob:xxx) + * @returns {Promise} - JPG格式图片Blob,失败返回null + */ + static async captureVideoFrame(videoBlobUrl) { + return new Promise(resolve => { + // 1. 创建视频元素加载Blob + const video = document.createElement("video"); + video.src = videoBlobUrl; + video.muted = true; + video.playsInline = true; + video.preload = "auto"; + + // 2. 视频可播放时开始转换 + video.oncanplay = () => { + // 3. 创建Canvas绘制视频帧 + const canvas = document.createElement("canvas"); + canvas.width = video.videoWidth || 640; // 使用视频实际宽度 + canvas.height = video.videoHeight || 360; // 使用视频实际高度 + const ctx = canvas.getContext("2d"); + + // 绘制视频当前帧到Canvas + ctx.drawImage(video, 0, 0, canvas.width, canvas.height); + + // 4. 将Canvas转换为JPG Blob + canvas.toBlob( + blob => { + console.log(blob, "================>"); + video.remove(); // 清理视频元素 + resolve(blob || null); // 返回JPG Blob + }, + "image/jpeg", // 强制JPG格式 + 0.8 // 图片质量(0-1) + ); + }; + + // 错误处理 + video.onerror = () => { + video.remove(); + resolve(null); + }; + }); + } + // 以下方法保持不变 + static formats(domNode) { + return ATTRIBUTES.reduce((formats, attribute) => { + if (domNode.hasAttribute(attribute)) { + formats[attribute] = domNode.getAttribute(attribute); + } + return formats; + }, {}); + } + + static sanitize(url) { + return Link.sanitize(url); + } + + static value(domNode) { + return { + url: domNode.getAttribute("src").split("#")[0], + poster: domNode.getAttribute("poster") || "" + }; + } + + format(name, value) { + if (ATTRIBUTES.includes(name)) { + if (value) { + this.domNode.setAttribute(name, value); + } else { + this.domNode.removeAttribute(name); + } + } else { + super.format(name, value); + } + } + + html() { + const { url, poster } = this.value(); + return ``; + } +} +//style="width:600px;height:300px;" +Video.blotName = "customVideo"; +// Video.className = "ql-video"; +Video.tagName = "video"; + +export default Video; diff --git a/src/components/Editor/quill-video11.js b/src/components/Editor/quill-video11.js new file mode 100644 index 0000000..c36f249 --- /dev/null +++ b/src/components/Editor/quill-video11.js @@ -0,0 +1,72 @@ +import { Quill } from "@vueup/vue-quill"; +// 源码中是import直接倒入,这里要用Quill.import引入 +const BlockEmbed = Quill.import("blots/block/embed"); +const Link = Quill.import("formats/link"); + +const ATTRIBUTES = ["height", "width"]; + +class Video extends BlockEmbed { + static create(value) { + let node = super.create(); + // 添加video标签所需的属性 + node.setAttribute("controls", "controls"); + node.setAttribute("playsinline", "true"); + node.setAttribute("webkit-playsinline", "true"); + node.setAttribute("type", "video/mp4"); + // poster 属性指定视频下载时显示的图像,或者在用户点击播放按钮前显示的图像。 + // console.log(value.url, "= value.poster="); + // node.setAttribute("poster", this.sanitize(value.url)); + node.setAttribute("src", this.sanitize(value.url)); + node.setAttribute( + "style", + ` + width: 600px; + height: 300px; + ` + ); + return node; + } + + static formats(domNode) { + return ATTRIBUTES.reduce((formats, attribute) => { + if (domNode.hasAttribute(attribute)) { + formats[attribute] = domNode.getAttribute(attribute); + } + return formats; + }, {}); + } + + static sanitize(url) { + return Link.sanitize(url); + } + + static value(domNode) { + // 设置自定义的属性值 + return { + url: domNode.getAttribute("src") + // poster: domNode.getAttribute("src") + }; + } + + format(name, value) { + if (ATTRIBUTES.indexOf(name) > -1) { + if (value) { + this.domNode.setAttribute(name, value); + } else { + this.domNode.removeAttribute(name); + } + } else { + super.format(name, value); + } + } + + html() { + const { video } = this.value(); + return `${video}`; + } +} +Video.blotName = "customVideo"; // 这里不用改,不用iframe,直接替换掉原来,如果需要也可以保留原来的,这里用个新的blot +Video.className = "ql-video"; // 可添加样式,看实际使用需要 +Video.tagName = "video"; // 用video标签替换iframe + +export default Video; diff --git a/src/components/Editor/titleConfig.js b/src/components/Editor/titleConfig.js new file mode 100644 index 0000000..43d093e --- /dev/null +++ b/src/components/Editor/titleConfig.js @@ -0,0 +1,47 @@ +// toolbar标题(此项是用来增加hover标题) +export const titleConfig = ref([ + { Choice: ".ql-insertMetric", title: "跳转配置" }, + { Choice: ".ql-bold", title: "加粗" }, + { Choice: ".ql-italic", title: "斜体" }, + { Choice: ".ql-underline", title: "下划线" }, + { Choice: ".ql-header", title: "段落格式" }, + { Choice: ".ql-strike", title: "删除线" }, + { Choice: ".ql-blockquote", title: "块引用" }, + { Choice: ".ql-code", title: "插入代码" }, + { Choice: ".ql-code-block", title: "插入代码段" }, + { Choice: ".ql-font", title: "字体" }, + { Choice: ".ql-size", title: "字体大小" }, + { Choice: '.ql-list[value="ordered"]', title: "编号列表" }, + { Choice: '.ql-list[value="bullet"]', title: "项目列表" }, + { Choice: ".ql-direction", title: "文本方向" }, + { Choice: '.ql-header[value="1"]', title: "h1" }, + { Choice: '.ql-header[value="2"]', title: "h2" }, + { Choice: ".ql-align", title: "对齐方式" }, + { Choice: ".ql-color", title: "字体颜色" }, + { Choice: ".ql-background", title: "背景颜色" }, + { Choice: ".ql-image", title: "图像" }, + { Choice: ".ql-video", title: "视频" }, + { Choice: ".ql-link", title: "添加链接" }, + { Choice: ".ql-formula", title: "插入公式" }, + { Choice: ".ql-clean", title: "清除字体格式" }, + { Choice: '.ql-script[value="sub"]', title: "下标" }, + { Choice: '.ql-script[value="super"]', title: "上标" }, + { Choice: '.ql-indent[value="-1"]', title: "向左缩进" }, + { Choice: '.ql-indent[value="+1"]', title: "向右缩进" }, + { Choice: ".ql-header .ql-picker-label", title: "标题大小" }, + { Choice: '.ql-header .ql-picker-item[data-value="1"]', title: "标题一" }, + { Choice: '.ql-header .ql-picker-item[data-value="2"]', title: "标题二" }, + { Choice: '.ql-header .ql-picker-item[data-value="3"]', title: "标题三" }, + { Choice: '.ql-header .ql-picker-item[data-value="4"]', title: "标题四" }, + { Choice: '.ql-header .ql-picker-item[data-value="5"]', title: "标题五" }, + { Choice: '.ql-header .ql-picker-item[data-value="6"]', title: "标题六" }, + { Choice: ".ql-header .ql-picker-item:last-child", title: "标准" }, + { Choice: '.ql-size .ql-picker-item[data-value="small"]', title: "小号" }, + { Choice: '.ql-size .ql-picker-item[data-value="large"]', title: "大号" }, + { Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: "超大号" }, + { Choice: ".ql-size .ql-picker-item:nth-child(2)", title: "标准" }, + { Choice: ".ql-align .ql-picker-item:first-child", title: "居左对齐" }, + { Choice: '.ql-align .ql-picker-item[data-value="center"]', title: "居中对齐" }, + { Choice: '.ql-align .ql-picker-item[data-value="right"]', title: "居右对齐" }, + { Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: "两端对齐" } +]); diff --git a/src/components/Editor/utils.js b/src/components/Editor/utils.js new file mode 100644 index 0000000..3239b12 --- /dev/null +++ b/src/components/Editor/utils.js @@ -0,0 +1,8 @@ +export const routerObj = { + articleEditIndex: "article", + productEditIndex: "product", + bannerListIndex: "banner", + downloadListIndex: "download", + videoListIndex: "video", + QAListIndex: "QA" +}; diff --git a/src/components/FormTable/index.vue b/src/components/FormTable/index.vue index 03d0bd9..940f5e7 100644 --- a/src/components/FormTable/index.vue +++ b/src/components/FormTable/index.vue @@ -28,11 +28,11 @@ - diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 83b82aa..4a12823 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -36,25 +36,25 @@ autocomplete="off" /> + style=" + width: 350px; + font-size: 12px; + line-height: 1; + color: #4178d5; + text-align: right; + cursor: pointer; + " + @click="handleTabClick(2)" + > + 忘记密码? + --> + 验证码 + + + 刷新 + --> { const { username, uid, token, avatar } = data; console.log(); // 设置token - userStore.setToken(token); + userStore.setToken("Bearer" + " " + token); userStore.setUid(uid); userStore.setNickname(username); userStore.setAvatar(avatar); diff --git a/src/views/login/index2.vue b/src/views/login/index2.vue new file mode 100644 index 0000000..5318e11 --- /dev/null +++ b/src/views/login/index2.vue @@ -0,0 +1,291 @@ + + + diff --git a/src/views/productManagement/attributeList/index.vue b/src/views/productManagement/attributeList/index.vue index 4e06278..cae1f39 100644 --- a/src/views/productManagement/attributeList/index.vue +++ b/src/views/productManagement/attributeList/index.vue @@ -105,6 +105,10 @@ const getProductAttrUp = async () => { if (obj.prop_name) { dataStore.editRuleForm.props.push(obj); } + + let dataClone = cloneDeep(dataStore.editRuleForm.props); + let props = JSON.stringify([...dataClone]); + dataStore.editRuleForm.props = props; const result = await getProductAttrUpApi(dataStore.editRuleForm); if (result?.code === 0) { useMsg("success", result?.msg); diff --git a/src/views/productManagement/classList/index.vue b/src/views/productManagement/classList/index.vue index e8c4277..a59c5b0 100644 --- a/src/views/productManagement/classList/index.vue +++ b/src/views/productManagement/classList/index.vue @@ -8,13 +8,8 @@ :formData="dataStore.searchFormData" :search-param="dataStore.searchParam" /> - + + @@ -26,7 +21,7 @@ @@ -100,7 +95,7 @@ import { getArticleCategorySortApi, getProductClassTcoTreeApi } from "@/api/modules/productClass"; -import { addLabelValue } from "../list/utils/common/addLabelValue"; +import { addLabelValue } from "@/utils/addLabelValue"; import { useMsg } from "@/hooks/useMsg"; @@ -154,7 +149,9 @@ const getArticleCategorySave = async (params: any) => { }; const handleSelectChangeEmits = (value: any) => { - dataStore.ruleForm.pid = value.id; + if (value.prop === "pid") { + dataStore.ruleForm.pid = value.id; + } }; const handleTreesSelectChangeEmits = (value: any) => { console.log(value, "=========value========="); @@ -170,6 +167,11 @@ const getProductCategoryUpdate = async () => { dataStore.visible = false; resetFrom(); getProductCategoryList(); + console.log("走的进来吗"); + } else { + dataStore.ruleForm.related_tco_category = dataStore.ruleForm.related_tco_category + .split(",") + .map((item: any) => Number(item)); } }; //产品详情 @@ -204,12 +206,12 @@ const reset = () => { }; //重置表单配置 const resetFrom = () => { - if (dataStore.selectLevel === 1 || dataStore.selectLevel === 2) { + if (dataStore.selectLevel == 1 || dataStore.selectLevel == 2) { dataStore.ruleForm = cloneDeep(RULE_FORM_LV1); dataStore.formData = cloneDeep(FORM_DATA_LV1); dataStore.rules = RULES_LV1; } - if (dataStore.selectLevel === 3) { + if (dataStore.selectLevel == 3) { dataStore.ruleForm = cloneDeep(RULE_FORM_LV2); dataStore.formData = cloneDeep(FORM_DATA_LV2); dataStore.rules = RULES_LV2; diff --git a/src/views/productManagement/link/index.vue b/src/views/productManagement/link/index.vue index 95e9966..f34e84f 100644 --- a/src/views/productManagement/link/index.vue +++ b/src/views/productManagement/link/index.vue @@ -14,9 +14,6 @@ :request-api="getProductBuypassListApi" :init-param="dataStore.initParam" > - @@ -63,6 +60,7 @@ import { useUserStore } from "@/stores/modules/user"; //列表接口 // getProductBuypassListImportApi import { + getProductBuypassListSaveApi, getProductBuypassListApi, getProductPlatformsListApi, getProductBuypassListExportApi, @@ -92,53 +90,24 @@ const dataStore = reactive({ ruleForm: cloneDeep(RULE_FORM), // 搜索參數 formData: FORM_DATA //搜索配置项 }); - +//添加 +const getProductBuypassListSave = async (params: any) => { + const result = await getProductBuypassListSaveApi(params); + if (result?.code === 0) { + useMsg("success", result?.msg); + // proTableRef?.value?.getTableList(); + // console.log(result?.data); + } +}; //更新 const getProductBuypassUpdate = async (params: any) => { const result = await getProductBuypassUpdateApi(params); if (result?.code === 0) { - console.log(result?.data); - } else { + useMsg("success", result?.msg); + // console.log(result?.data); } }; -// const handleChange=()=>{ -// } - -// const up=(it: any, scope: any, itIndex: any)=>{ -// const { link, platform_name, link_id } = it; -// let is = scope.row.rowspan.some((item: any, index: number) => { -// if (index !== itIndex && item.platform_name === platform_name) { -// return true; -// } -// }); -// if (is) { -// useMsg("warning", "同型号平台不能重复 !"); -// return; -// } -// if (!platform_name) { -// useMsg("warning", "平台不能为空 !"); -// return; -// } -// if (!link) { -// useMsg("warning", "链接不能为空 !"); -// return; -// } -// //获取ID -// let platform_id: any = null; -// dataStore.options.forEach((item: any) => { -// if (item.platform === platform_name) { -// platform_id = item.id; -// } -// }); -// getProductBuypassUpdate({ -// id: link_id, -// param: { -// platform_id, -// link -// } -// }); -// } //输入框失焦 const handleInputOrChange = (it: any, scope: any, itIndex: any) => { const { link, platform_name, link_id } = it; @@ -166,13 +135,24 @@ const handleInputOrChange = (it: any, scope: any, itIndex: any) => { platform_id = item.id; } }); - getProductBuypassUpdate({ - id: link_id, - param: { + + //添加 + if (!link_id) { + getProductBuypassListSave({ + product_id: scope.row.id, platform_id, link - } - }); + }); + } else { + // 更新 + getProductBuypassUpdate({ + id: link_id, + param: { + platform_id, + link + } + }); + } }; //平台 const getProductPlatformsList = async () => { @@ -195,7 +175,10 @@ const handleExport = () => { //导出接口 const getProductBuypassListExport = async () => { - const result = await getProductBuypassListExportApi(dataStore.ruleForm); + const result = await getProductBuypassListExportApi({ + ...proTableRef?.value?.searchParam, + ...proTableRef?.value?.pageable + }); await useExport(result); }; diff --git a/src/views/productManagement/list/components/basicInfo.vue b/src/views/productManagement/list/components/basicInfo.vue index 5cda214..6026737 100644 --- a/src/views/productManagement/list/components/basicInfo.vue +++ b/src/views/productManagement/list/components/basicInfo.vue @@ -9,33 +9,39 @@ - + - + - + - + - + @@ -90,6 +101,11 @@ const reset = () => { }; let _ruleFormParam: any = computed(() => props.data); + +const handleTreeChange = () => { + _ruleFormParam.value.category_id = _ruleFormParam.value.category_id1; +}; + // 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去) defineExpose({ ruleForm: _ruleFormParam, diff --git a/src/views/productManagement/list/components/imgInfo.vue b/src/views/productManagement/list/components/imgInfo.vue index 5316597..91ae6f9 100644 --- a/src/views/productManagement/list/components/imgInfo.vue +++ b/src/views/productManagement/list/components/imgInfo.vue @@ -3,11 +3,23 @@
封面图
- - - + +
+
+ + + +
+ +
@@ -44,7 +56,7 @@