mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
fix: fix some bug
This commit is contained in:
parent
9737014c0c
commit
055296ab53
194
package-lock.json
generated
194
package-lock.json
generated
@ -329,64 +329,64 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/core-base": {
|
"@intlify/core-base": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/core-base/download/@intlify/core-base-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.1.6.tgz",
|
||||||
"integrity": "sha1-5ff7YytwY8ZchIWEXIea1ZA6Sg8=",
|
"integrity": "sha512-d5GDPpsQbqPkisSJA5b6nJFEkalY/IHAd7vOLNd/Sj4YaNRzXtInu2FoqKiOv8e/lQnXGTpurdCZg5Jxq1Gsxw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/devtools-if": "9.1.4",
|
"@intlify/devtools-if": "9.1.6",
|
||||||
"@intlify/message-compiler": "9.1.4",
|
"@intlify/message-compiler": "9.1.6",
|
||||||
"@intlify/message-resolver": "9.1.4",
|
"@intlify/message-resolver": "9.1.6",
|
||||||
"@intlify/runtime": "9.1.4",
|
"@intlify/runtime": "9.1.6",
|
||||||
"@intlify/shared": "9.1.4",
|
"@intlify/shared": "9.1.6",
|
||||||
"@intlify/vue-devtools": "9.1.4"
|
"@intlify/vue-devtools": "9.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/devtools-if": {
|
"@intlify/devtools-if": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/devtools-if/download/@intlify/devtools-if-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.1.6.tgz",
|
||||||
"integrity": "sha1-unnp3sOxNHhCyTAIxr9tq4D2wXA=",
|
"integrity": "sha512-m8Api+kh+BtFa2FZ/JjIdr1ibsGGqBjdKCzWo5BZecEUxBquIeOQZwpokPh/0K5j+/PZleFXkVAMC5mNt+9WdA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/shared": "9.1.4"
|
"@intlify/shared": "9.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/message-compiler": {
|
"@intlify/message-compiler": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/message-compiler/download/@intlify/message-compiler-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.1.6.tgz",
|
||||||
"integrity": "sha1-2/CZecjOi2VqPsb7gOzhXSmP9GE=",
|
"integrity": "sha512-DR8645VOrVK6x/8tkaCpHnckMAIcoOgeNS5j0wB12RfZoXYQp7vAXMaOP511KMll2mXCREgIB0ojpajiof7yzQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/message-resolver": "9.1.4",
|
"@intlify/message-resolver": "9.1.6",
|
||||||
"@intlify/shared": "9.1.4",
|
"@intlify/shared": "9.1.6",
|
||||||
"source-map": "0.6.1"
|
"source-map": "0.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/message-resolver": {
|
"@intlify/message-resolver": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/message-resolver/download/@intlify/message-resolver-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.1.6.tgz",
|
||||||
"integrity": "sha1-biyoVDXo2f4YuMj83mbYr/UGduE="
|
"integrity": "sha512-UUnbawQa5U9sffd5wRIscqtyY1xWlwJbyfwCLPEWLvBhyAnCwPYlvaHGnnO0CSi0fzJTVwlV9DYzobh3agDeMA=="
|
||||||
},
|
},
|
||||||
"@intlify/runtime": {
|
"@intlify/runtime": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/runtime/download/@intlify/runtime-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.1.6.tgz",
|
||||||
"integrity": "sha1-5Knpvr07qCYD9GVkjEZohVYX68I=",
|
"integrity": "sha512-U1QZ+TPf3kQQvWo4BA2mj3cHAxMRHXNTBhu2u+deh6ubTqXdZ19XGBTMSasrXG6RE+zSio9oM+ndoLja7JGtPg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/message-compiler": "9.1.4",
|
"@intlify/message-compiler": "9.1.6",
|
||||||
"@intlify/message-resolver": "9.1.4",
|
"@intlify/message-resolver": "9.1.6",
|
||||||
"@intlify/shared": "9.1.4"
|
"@intlify/shared": "9.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@intlify/shared": {
|
"@intlify/shared": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/shared/download/@intlify/shared-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.6.tgz",
|
||||||
"integrity": "sha1-A4hRXlRY/hojFMj4RNsxutJrhVg="
|
"integrity": "sha512-6MtsKulyfZxdD7OuxjaODjj8QWoHCnLFAk4wkWiHqBCa6UCTC0qXjtEeZ1MxpQihvFmmJZauBUu25EvtngW5qQ=="
|
||||||
},
|
},
|
||||||
"@intlify/vue-devtools": {
|
"@intlify/vue-devtools": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/@intlify/vue-devtools/download/@intlify/vue-devtools-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.1.6.tgz",
|
||||||
"integrity": "sha1-HcQrhtqdJzgDuoWilcr058Ms36I=",
|
"integrity": "sha512-UdNovg4OML9rIr1sOGZzTfNr1nUy4UQpDf5ni4dNC93T6FIkVJz0n1Np7Vp7e6gDjcmufRYcV99tEwjQSN9+5A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/message-resolver": "9.1.4",
|
"@intlify/message-resolver": "9.1.6",
|
||||||
"@intlify/runtime": "9.1.4",
|
"@intlify/runtime": "9.1.6",
|
||||||
"@intlify/shared": "9.1.4"
|
"@intlify/shared": "9.1.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@logicflow/core": {
|
"@logicflow/core": {
|
||||||
@ -431,8 +431,8 @@
|
|||||||
},
|
},
|
||||||
"@popperjs/core": {
|
"@popperjs/core": {
|
||||||
"version": "2.9.2",
|
"version": "2.9.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.9.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40popperjs%2Fcore%2Fdownload%2F%40popperjs%2Fcore-2.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz",
|
||||||
"integrity": "sha1-rep7aVPLs0ZRdmsFSEaOdDxqI1M="
|
"integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q=="
|
||||||
},
|
},
|
||||||
"@rollup/plugin-node-resolve": {
|
"@rollup/plugin-node-resolve": {
|
||||||
"version": "11.2.1",
|
"version": "11.2.1",
|
||||||
@ -475,8 +475,8 @@
|
|||||||
},
|
},
|
||||||
"@types/lodash": {
|
"@types/lodash": {
|
||||||
"version": "4.14.168",
|
"version": "4.14.168",
|
||||||
"resolved": "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.168.tgz?cache=0&sync_timestamp=1613379222224&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Flodash%2Fdownload%2F%40types%2Flodash-4.14.168.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz",
|
||||||
"integrity": "sha1-/iRjLnm3rePxMoka//hsql5c4Ag="
|
"integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q=="
|
||||||
},
|
},
|
||||||
"@types/mockjs": {
|
"@types/mockjs": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@ -604,21 +604,21 @@
|
|||||||
},
|
},
|
||||||
"@vue/devtools-api": {
|
"@vue/devtools-api": {
|
||||||
"version": "6.0.0-beta.7",
|
"version": "6.0.0-beta.7",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vue/devtools-api/download/@vue/devtools-api-6.0.0-beta.7.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.0.0-beta.7.tgz",
|
||||||
"integrity": "sha1-HTBmE8k7moN6N3axuSVVAmYvhQ8="
|
"integrity": "sha512-mIfqX8ZF6s2ulelIzfxGk9sFoigpoeK/2/DlWrtBGWfvwaK3kR1P2bxNkZ0LbJeuKHfcRP6hGZtGist7nxUN9A=="
|
||||||
},
|
},
|
||||||
"@vue/reactivity": {
|
"@vue/reactivity": {
|
||||||
"version": "3.0.11",
|
"version": "3.0.11",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vue/reactivity/download/@vue/reactivity-3.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.11.tgz",
|
||||||
"integrity": "sha1-B7WINJ/QViaxfzUAy+99S9tNvQs=",
|
"integrity": "sha512-SKM3YKxtXHBPMf7yufXeBhCZ4XZDKP9/iXeQSC8bBO3ivBuzAi4aZi0bNoeE2IF2iGfP/AHEt1OU4ARj4ao/Xw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vue/shared": "3.0.11"
|
"@vue/shared": "3.0.11"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vue/runtime-core": {
|
"@vue/runtime-core": {
|
||||||
"version": "3.0.11",
|
"version": "3.0.11",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vue/runtime-core/download/@vue/runtime-core-3.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.11.tgz",
|
||||||
"integrity": "sha1-xS38as8yFUk2I1UsHCkZCAxWLkQ=",
|
"integrity": "sha512-87XPNwHfz9JkmOlayBeCCfMh9PT2NBnv795DSbi//C/RaAnc/bGZgECjmkD7oXJ526BZbgk9QZBPdFT8KMxkAg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vue/reactivity": "3.0.11",
|
"@vue/reactivity": "3.0.11",
|
||||||
"@vue/shared": "3.0.11"
|
"@vue/shared": "3.0.11"
|
||||||
@ -626,8 +626,8 @@
|
|||||||
},
|
},
|
||||||
"@vue/runtime-dom": {
|
"@vue/runtime-dom": {
|
||||||
"version": "3.0.11",
|
"version": "3.0.11",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vue/runtime-dom/download/@vue/runtime-dom-3.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.11.tgz",
|
||||||
"integrity": "sha1-elUt8hkHlCch/raWHEGOIippkzc=",
|
"integrity": "sha512-jm3FVQESY3y2hKZ2wlkcmFDDyqaPyU3p1IdAX92zTNeCH7I8zZ37PtlE1b9NlCtzV53WjB4TZAYh9yDCMIEumA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vue/runtime-core": "3.0.11",
|
"@vue/runtime-core": "3.0.11",
|
||||||
"@vue/shared": "3.0.11",
|
"@vue/shared": "3.0.11",
|
||||||
@ -640,20 +640,20 @@
|
|||||||
"integrity": "sha1-INIt0Np9NYuyHBf5vehigVJkLHc="
|
"integrity": "sha1-INIt0Np9NYuyHBf5vehigVJkLHc="
|
||||||
},
|
},
|
||||||
"@vueuse/core": {
|
"@vueuse/core": {
|
||||||
"version": "4.8.1",
|
"version": "4.8.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vueuse/core/download/@vueuse/core-4.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-4.8.2.tgz",
|
||||||
"integrity": "sha1-16f7LnJhDRli7LkkS9k9rLltkhw=",
|
"integrity": "sha512-d6SX9YSWC8svdCEZvlKH3zmstPqNS1h1RHgZUbkxAC/zoNIYP88Ivl1pF3SYm0Iksl6D4Zu/oImKXWCBW21r6g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vueuse/shared": "4.8.1",
|
"@vueuse/shared": "4.8.2",
|
||||||
"vue-demi": "^0.7.4"
|
"vue-demi": "^0.7.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vueuse/shared": {
|
"@vueuse/shared": {
|
||||||
"version": "4.8.1",
|
"version": "4.8.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/@vueuse/shared/download/@vueuse/shared-4.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-4.8.2.tgz",
|
||||||
"integrity": "sha1-Rf1fZL9OiUTbQqW3L6JwXPx0YIo=",
|
"integrity": "sha512-Bjy15IHyqUpRbg9cRE9afFwD0gLtGI0tJW7fITWGCwYmSWpBoD+EnGBBGvnoP9pOtxkri9Wte/uKwcVnDos7QA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"vue-demi": "^0.7.4"
|
"vue-demi": "^0.7.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
@ -676,8 +676,8 @@
|
|||||||
},
|
},
|
||||||
"async-validator": {
|
"async-validator": {
|
||||||
"version": "3.5.1",
|
"version": "3.5.1",
|
||||||
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-3.5.1.tgz?cache=0&sync_timestamp=1605751798748&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-3.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.5.1.tgz",
|
||||||
"integrity": "sha1-zWK5aIskZfSEIOJ620d2CrG1VZ8="
|
"integrity": "sha512-DDmKA7sdSAJtTVeNZHrnr2yojfFaoeW8MfQN8CeuXg8DDQHTqKk9Fdv38dSvnesHoO8MUwMI2HphOeSyIF+wmQ=="
|
||||||
},
|
},
|
||||||
"autoprefixer": {
|
"autoprefixer": {
|
||||||
"version": "10.2.5",
|
"version": "10.2.5",
|
||||||
@ -884,9 +884,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"csstype": {
|
"csstype": {
|
||||||
"version": "2.6.16",
|
"version": "2.6.17",
|
||||||
"resolved": "https://registry.npm.taobao.org/csstype/download/csstype-2.6.16.tgz",
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.17.tgz",
|
||||||
"integrity": "sha1-VE1p9UcBO4WkDRW/912zjzT+nDk="
|
"integrity": "sha512-u1wmTI1jJGzCJzWndZo8mk4wnPTZd1eOIYTYvuEyOQGfmDl3TrabCCfKnOC86FZwW/9djqTl933UF/cS425i9A=="
|
||||||
},
|
},
|
||||||
"d": {
|
"d": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@ -945,12 +945,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"echarts": {
|
"echarts": {
|
||||||
"version": "5.0.2",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/echarts/download/echarts-5.0.2.tgz?cache=0&sync_timestamp=1612592464414&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fecharts%2Fdownload%2Fecharts-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.1.0.tgz",
|
||||||
"integrity": "sha1-FybRelfPBdYs0FZ7QyXhIBpWuvY=",
|
"integrity": "sha512-/X2nnN5BXW2tuA/Hv9YY279rDfwcXaBAjK9Azi//llshbKyUXXxBknsug21GJRpwTmLZbE8rjjbhchdm01bZtw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "2.0.3",
|
"tslib": "2.0.3",
|
||||||
"zrender": "5.0.4"
|
"zrender": "5.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ee-first": {
|
"ee-first": {
|
||||||
@ -967,8 +967,8 @@
|
|||||||
},
|
},
|
||||||
"element-plus": {
|
"element-plus": {
|
||||||
"version": "1.0.2-beta.40",
|
"version": "1.0.2-beta.40",
|
||||||
"resolved": "https://registry.npm.taobao.org/element-plus/download/element-plus-1.0.2-beta.40.tgz",
|
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-1.0.2-beta.40.tgz",
|
||||||
"integrity": "sha1-MPybFhSWrlh/q4YjXIC3KOpD2Qk=",
|
"integrity": "sha512-8S7JbBpJLUa3ggexuKuKeyrTo451gMDHa/BKJVFiHSyexcHPgnHQwHf2nIoZvY1w6FzmZPdBdZ3NoDLXu51SIw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@popperjs/core": "^2.4.4",
|
"@popperjs/core": "^2.4.4",
|
||||||
"@types/lodash": "^4.14.161",
|
"@types/lodash": "^4.14.161",
|
||||||
@ -1023,8 +1023,8 @@
|
|||||||
},
|
},
|
||||||
"esbuild": {
|
"esbuild": {
|
||||||
"version": "0.9.7",
|
"version": "0.9.7",
|
||||||
"resolved": "https://registry.npm.taobao.org/esbuild/download/esbuild-0.9.7.tgz?cache=0&sync_timestamp=1618309241959&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesbuild%2Fdownload%2Fesbuild-0.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.9.7.tgz",
|
||||||
"integrity": "sha1-6g1jnL5LiOwl++1Nb/AMjXiO9ws=",
|
"integrity": "sha512-VtUf6aQ89VTmMLKrWHYG50uByMF4JQlVysb8dmg6cOgW8JnFCipmz7p+HNBl+RR3LLCuBxFGVauAe2wfnF9bLg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"escalade": {
|
"escalade": {
|
||||||
@ -1475,7 +1475,7 @@
|
|||||||
},
|
},
|
||||||
"normalize-wheel": {
|
"normalize-wheel": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
|
||||||
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
|
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
|
||||||
},
|
},
|
||||||
"nprogress": {
|
"nprogress": {
|
||||||
@ -1678,8 +1678,8 @@
|
|||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
"version": "2.45.2",
|
"version": "2.45.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/rollup/download/rollup-2.45.2.tgz?cache=0&sync_timestamp=1618289798736&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frollup%2Fdownload%2Frollup-2.45.2.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.45.2.tgz",
|
||||||
"integrity": "sha1-j7hZF8nzVgVyDpIyjzzL+6b3i0g=",
|
"integrity": "sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fsevents": "~2.3.1"
|
"fsevents": "~2.3.1"
|
||||||
@ -1783,8 +1783,8 @@
|
|||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npm.taobao.org/tslib/download/tslib-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
|
||||||
"integrity": "sha1-jgdBrEX8DCJuWKF7/D5kubxsphw="
|
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -1793,8 +1793,8 @@
|
|||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.2.4",
|
"version": "4.2.4",
|
||||||
"resolved": "https://registry.npm.taobao.org/typescript/download/typescript-4.2.4.tgz?cache=0&sync_timestamp=1618298573659&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-4.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
|
||||||
"integrity": "sha1-hhC1l0feAo/aiYqK7w4QPxVtCWE=",
|
"integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"unidragger": {
|
"unidragger": {
|
||||||
@ -1851,9 +1851,9 @@
|
|||||||
"integrity": "sha1-9GWYrJivrF1duMZUDfwSMEztEUA="
|
"integrity": "sha1-9GWYrJivrF1duMZUDfwSMEztEUA="
|
||||||
},
|
},
|
||||||
"vite": {
|
"vite": {
|
||||||
"version": "2.1.5",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npm.taobao.org/vite/download/vite-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-2.2.1.tgz",
|
||||||
"integrity": "sha1-SFfaRBxi95gsg8vV9CoAMw8gycE=",
|
"integrity": "sha512-KIqK90EoJJpuqE86Y9DSkZjFNGgsyZX/4I1xENIitLRd3hgRtOlIGCJYrNnBD9/eqipz0OroAiIj9/R1JcOdFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"esbuild": "^0.9.3",
|
"esbuild": "^0.9.3",
|
||||||
@ -1948,8 +1948,8 @@
|
|||||||
},
|
},
|
||||||
"vue": {
|
"vue": {
|
||||||
"version": "3.0.11",
|
"version": "3.0.11",
|
||||||
"resolved": "https://registry.npm.taobao.org/vue/download/vue-3.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/vue/-/vue-3.0.11.tgz",
|
||||||
"integrity": "sha1-yC+VlMv03MhpJB1MjdPgjZqPS18=",
|
"integrity": "sha512-3/eUi4InQz8MPzruHYSTQPxtM3LdZ1/S/BvaU021zBnZi0laRUyH6pfuE4wtUeLvI8wmUNwj5wrZFvbHUXL9dw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vue/compiler-dom": "3.0.11",
|
"@vue/compiler-dom": "3.0.11",
|
||||||
"@vue/runtime-dom": "3.0.11",
|
"@vue/runtime-dom": "3.0.11",
|
||||||
@ -1957,18 +1957,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-demi": {
|
"vue-demi": {
|
||||||
"version": "0.7.4",
|
"version": "0.7.5",
|
||||||
"resolved": "https://registry.npm.taobao.org/vue-demi/download/vue-demi-0.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.7.5.tgz",
|
||||||
"integrity": "sha1-TGvlJXiOH2s/1dT1+fIUjPZkWXk="
|
"integrity": "sha512-eFSQSvbQdY7C9ujOzvM6tn7XxwLjn0VQDXQsiYBLBwf28Na+2nTQR4BBBcomhmdP6mmHlBKAwarq6a0BPG87hQ=="
|
||||||
},
|
},
|
||||||
"vue-i18n": {
|
"vue-i18n": {
|
||||||
"version": "9.1.4",
|
"version": "9.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/vue-i18n/download/vue-i18n-9.1.4.tgz?cache=0&sync_timestamp=1618157988014&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-i18n%2Fdownload%2Fvue-i18n-9.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.1.6.tgz",
|
||||||
"integrity": "sha1-Bm4bjO/xOAZPB07lAKYXwNTeKfw=",
|
"integrity": "sha512-FEC4HZkTH6QRIu/A0wlo0VS/GH3w/fuCC6xfvoC8IyhhtbG9A+go9NfW+HZ1ZXdAcO4EWcVQi04M+iSwuxgixw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@intlify/core-base": "9.1.4",
|
"@intlify/core-base": "9.1.6",
|
||||||
"@intlify/shared": "9.1.4",
|
"@intlify/shared": "9.1.6",
|
||||||
"@intlify/vue-devtools": "9.1.4",
|
"@intlify/vue-devtools": "9.1.6",
|
||||||
"@vue/devtools-api": "^6.0.0-beta.7"
|
"@vue/devtools-api": "^6.0.0-beta.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2004,9 +2004,9 @@
|
|||||||
"integrity": "sha1-rId6p2qcRTaMl5Rx5GG1INOObPU="
|
"integrity": "sha1-rId6p2qcRTaMl5Rx5GG1INOObPU="
|
||||||
},
|
},
|
||||||
"vxe-table": {
|
"vxe-table": {
|
||||||
"version": "4.0.10",
|
"version": "4.0.12",
|
||||||
"resolved": "https://registry.npm.taobao.org/vxe-table/download/vxe-table-4.0.10.tgz?cache=0&sync_timestamp=1618296397988&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvxe-table%2Fdownload%2Fvxe-table-4.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-4.0.12.tgz",
|
||||||
"integrity": "sha1-NBg1jYuJvwvSwdMDP98JoyhTPew="
|
"integrity": "sha512-S//Q2BCTe8dojA+mi6cGX7ONO/2ZrVLPyld0UqclcYf4rMHjYZkGb/CXj475XzBgN4DmXxw8KVsWVMNzGXKnzg=="
|
||||||
},
|
},
|
||||||
"wangeditor": {
|
"wangeditor": {
|
||||||
"version": "4.6.14",
|
"version": "4.6.14",
|
||||||
@ -2071,9 +2071,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"zrender": {
|
"zrender": {
|
||||||
"version": "5.0.4",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/zrender/download/zrender-5.0.4.tgz?cache=0&sync_timestamp=1618215769844&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-5.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.1.0.tgz",
|
||||||
"integrity": "sha1-icNVr5CLn2SjAbOPdRt5UfLIqVo=",
|
"integrity": "sha512-c+8VRx52ycbmqwHeHLlo/BAfIHBl/JZNLM6cfDQFgzIH05yb+f5J9F/fbRsP+zGc8dW9XHuhdt8/iqukgMZSeg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "2.0.3"
|
"tslib": "2.0.3"
|
||||||
}
|
}
|
||||||
|
12
package.json
12
package.json
@ -10,14 +10,14 @@
|
|||||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||||
"@logicflow/core": "^0.3.1",
|
"@logicflow/core": "^0.3.1",
|
||||||
"@logicflow/extension": "^0.3.1",
|
"@logicflow/extension": "^0.3.1",
|
||||||
"@vueuse/core": "^4.8.1",
|
"@vueuse/core": "^4.8.2",
|
||||||
"await-to-js": "^2.1.1",
|
"await-to-js": "^2.1.1",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"cropperjs": "^1.5.11",
|
"cropperjs": "^1.5.11",
|
||||||
"dayjs": "^1.10.4",
|
"dayjs": "^1.10.4",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"echarts": "^5.0.2",
|
"echarts": "^5.1.0",
|
||||||
"element-plus": "^1.0.2-beta.37",
|
"element-plus": "^1.0.2-beta.40",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"mitt": "^2.1.0",
|
"mitt": "^2.1.0",
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
@ -27,13 +27,13 @@
|
|||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"v-contextmenu": "^3.0.0-alpha.4",
|
"v-contextmenu": "^3.0.0-alpha.4",
|
||||||
"vue": "^3.0.11",
|
"vue": "^3.0.11",
|
||||||
"vue-i18n": "^9.1.2",
|
"vue-i18n": "^9.1.6",
|
||||||
"vue-json-pretty": "^2.0.2",
|
"vue-json-pretty": "^2.0.2",
|
||||||
"vue-router": "^4.0.6",
|
"vue-router": "^4.0.6",
|
||||||
"vue-types": "^3.0.2",
|
"vue-types": "^3.0.2",
|
||||||
"vuedraggable": "^4.0.1",
|
"vuedraggable": "^4.0.1",
|
||||||
"vuex": "^4.0.0",
|
"vuex": "^4.0.0",
|
||||||
"vxe-table": "^4.0.7-beta.4",
|
"vxe-table": "^4.0.12",
|
||||||
"wangeditor": "^4.0.3",
|
"wangeditor": "^4.0.3",
|
||||||
"xe-ajax": "^4.0.5",
|
"xe-ajax": "^4.0.5",
|
||||||
"xe-utils": "^3.1.12",
|
"xe-utils": "^3.1.12",
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"sass": "^1.32.8",
|
"sass": "^1.32.8",
|
||||||
"sass-loader": "^11.0.1",
|
"sass-loader": "^11.0.1",
|
||||||
"typescript": "^4.2.4",
|
"typescript": "^4.2.4",
|
||||||
"vite": "^2.1.5",
|
"vite": "^2.2.1",
|
||||||
"vite-plugin-mock": "^2.5.0"
|
"vite-plugin-mock": "^2.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
import type { CSSProperties } from 'vue'
|
import type { CSSProperties } from "vue";
|
||||||
|
|
||||||
import { defineComponent, onBeforeMount, nextTick, ref, unref, computed, PropType } from 'vue'
|
import {
|
||||||
import { templateRef } from '@vueuse/core'
|
defineComponent,
|
||||||
import { useAttrs } from '/@/utils/useAttrs'
|
onBeforeMount,
|
||||||
import { emitter } from '/@/utils/mitt'
|
nextTick,
|
||||||
|
ref,
|
||||||
|
unref,
|
||||||
|
computed,
|
||||||
|
PropType,
|
||||||
|
} from "vue";
|
||||||
|
import { templateRef } from "@vueuse/core";
|
||||||
|
import { useAttrs } from "/@/utils/useAttrs";
|
||||||
|
import { emitter } from "/@/utils/mitt";
|
||||||
|
|
||||||
import Cropper from 'cropperjs'
|
import Cropper from "cropperjs";
|
||||||
import 'cropperjs/dist/cropper.css'
|
import "cropperjs/dist/cropper.css";
|
||||||
|
|
||||||
type Options = Cropper.Options
|
type Options = Cropper.Options;
|
||||||
|
|
||||||
const defaultOptions: Cropper.Options = {
|
const defaultOptions: Cropper.Options = {
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 16 / 9,
|
||||||
@ -31,7 +39,7 @@ const defaultOptions: Cropper.Options = {
|
|||||||
guides: true,
|
guides: true,
|
||||||
movable: true,
|
movable: true,
|
||||||
rotatable: true,
|
rotatable: true,
|
||||||
}
|
};
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "Cropper",
|
name: "Cropper",
|
||||||
props: {
|
props: {
|
||||||
@ -44,11 +52,11 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '',
|
default: "",
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '360px',
|
default: "360px",
|
||||||
},
|
},
|
||||||
crossorigin: {
|
crossorigin: {
|
||||||
type: String || Object,
|
type: String || Object,
|
||||||
@ -61,57 +69,63 @@ export default defineComponent({
|
|||||||
options: {
|
options: {
|
||||||
type: Object as PropType<Options>,
|
type: Object as PropType<Options>,
|
||||||
default: {},
|
default: {},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const cropper: any = ref<Nullable<Cropper>>(null)
|
const cropper: any = ref<Nullable<Cropper>>(null);
|
||||||
const imgElRef = templateRef<HTMLElement | null>('imgElRef', null)
|
const imgElRef = templateRef<HTMLElement | null>("imgElRef", null);
|
||||||
|
|
||||||
const isReady = ref(false)
|
const isReady = ref(false);
|
||||||
|
|
||||||
const getImageStyle = computed(
|
const getImageStyle = computed(
|
||||||
(): CSSProperties => {
|
(): CSSProperties => {
|
||||||
return {
|
return {
|
||||||
height: props.height,
|
height: props.height,
|
||||||
width: props.width,
|
width: props.width,
|
||||||
maxWidth: '100%',
|
maxWidth: "100%",
|
||||||
...props.imageStyle,
|
...props.imageStyle,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
const getWrapperStyle = computed(
|
const getWrapperStyle = computed(
|
||||||
(): CSSProperties => {
|
(): CSSProperties => {
|
||||||
const { height, width } = props
|
const { height, width } = props;
|
||||||
return { width: `${width}`.replace(/px/, '') + 'px', height: `${height}`.replace(/px/, '') + 'px' }
|
return {
|
||||||
|
width: `${width}`.replace(/px/, "") + "px",
|
||||||
|
height: `${height}`.replace(/px/, "") + "px",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const imgEl = unref(imgElRef)
|
const imgEl = unref(imgElRef);
|
||||||
if (!imgEl) {
|
if (!imgEl) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
cropper.value = new Cropper(imgEl, {
|
cropper.value = new Cropper(imgEl, {
|
||||||
...defaultOptions,
|
...defaultOptions,
|
||||||
ready: () => {
|
ready: () => {
|
||||||
isReady.value = true
|
isReady.value = true;
|
||||||
},
|
},
|
||||||
...props.options,
|
...props.options,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
init()
|
init();
|
||||||
// tsx语法返回渲染模板,外部组件想调用内部方法或者获取setup里面的实例,暂时想到的办法是通过公共事件
|
// tsx语法返回渲染模板,外部组件想调用内部方法或者获取setup里面的实例,暂时想到的办法是通过公共事件
|
||||||
emitter.emit("cropperInstance", unref(cropper))
|
emitter.emit("cropperInstance", unref(cropper));
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<>
|
<>
|
||||||
<div class={useAttrs({ excludeListeners: true, excludeKeys: ['class'] })} style={unref(getWrapperStyle)}>
|
<div
|
||||||
|
class={useAttrs({ excludeListeners: true, excludeKeys: ["class"] })}
|
||||||
|
style={unref(getWrapperStyle)}
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
ref="imgElRef"
|
ref="imgElRef"
|
||||||
src={props.src}
|
src={props.src}
|
||||||
@ -121,6 +135,6 @@ export default defineComponent({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { App } from "vue"
|
import { App } from "vue";
|
||||||
import countTo from "./src/CountTo"
|
import countTo from "./src/CountTo";
|
||||||
|
|
||||||
export const CountTo = Object.assign(countTo, {
|
export const CountTo = Object.assign(countTo, {
|
||||||
install(app: App) {
|
install(app: App) {
|
||||||
app.component(countTo.name, countTo)
|
app.component(countTo.name, countTo);
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
export default CountTo
|
export default CountTo;
|
||||||
|
@ -5,10 +5,9 @@ import {
|
|||||||
watch,
|
watch,
|
||||||
onMounted,
|
onMounted,
|
||||||
unref,
|
unref,
|
||||||
toRef
|
} from "vue";
|
||||||
} from "vue"
|
import { countToProps } from "./props";
|
||||||
import { countToProps } from "./props"
|
import { isNumber } from "/@/utils/is";
|
||||||
import { isNumber } from "/@/utils/is"
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "CountTo",
|
name: "CountTo",
|
||||||
@ -16,17 +15,17 @@ export default defineComponent({
|
|||||||
emits: ["mounted", "callback"],
|
emits: ["mounted", "callback"],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
localStartVal: number
|
localStartVal: number;
|
||||||
printVal: number | null
|
printVal: number | null;
|
||||||
displayValue: string
|
displayValue: string;
|
||||||
paused: boolean
|
paused: boolean;
|
||||||
localDuration: number | null
|
localDuration: number | null;
|
||||||
startTime: number | null
|
startTime: number | null;
|
||||||
timestamp: number | null
|
timestamp: number | null;
|
||||||
rAF: any
|
rAF: any;
|
||||||
remaining: number | null
|
remaining: number | null;
|
||||||
color: string
|
color: string;
|
||||||
fontSize: string
|
fontSize: string;
|
||||||
}>({
|
}>({
|
||||||
localStartVal: props.startVal,
|
localStartVal: props.startVal,
|
||||||
displayValue: formatNumber(props.startVal),
|
displayValue: formatNumber(props.startVal),
|
||||||
@ -38,63 +37,63 @@ export default defineComponent({
|
|||||||
remaining: null,
|
remaining: null,
|
||||||
rAF: null,
|
rAF: null,
|
||||||
color: null,
|
color: null,
|
||||||
fontSize: "16px"
|
fontSize: "16px",
|
||||||
})
|
});
|
||||||
|
|
||||||
const getCountDown = computed(() => {
|
const getCountDown = computed(() => {
|
||||||
return props.startVal > props.endVal
|
return props.startVal > props.endVal;
|
||||||
})
|
});
|
||||||
|
|
||||||
watch([() => props.startVal, () => props.endVal], () => {
|
watch([() => props.startVal, () => props.endVal], () => {
|
||||||
if (props.autoplay) {
|
if (props.autoplay) {
|
||||||
start()
|
start();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
const { startVal, duration, color, fontSize } = props
|
const { startVal, duration, color, fontSize } = props;
|
||||||
state.localStartVal = startVal
|
state.localStartVal = startVal;
|
||||||
state.startTime = null
|
state.startTime = null;
|
||||||
state.localDuration = duration
|
state.localDuration = duration;
|
||||||
state.paused = false
|
state.paused = false;
|
||||||
state.color = color
|
state.color = color;
|
||||||
state.fontSize = fontSize
|
state.fontSize = fontSize;
|
||||||
state.rAF = requestAnimationFrame(count)
|
state.rAF = requestAnimationFrame(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pauseResume() {
|
function pauseResume() {
|
||||||
if (state.paused) {
|
if (state.paused) {
|
||||||
resume()
|
resume();
|
||||||
state.paused = false
|
state.paused = false;
|
||||||
} else {
|
} else {
|
||||||
pause()
|
pause();
|
||||||
state.paused = true
|
state.paused = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pause() {
|
function pause() {
|
||||||
cancelAnimationFrame(state.rAF)
|
cancelAnimationFrame(state.rAF);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resume() {
|
function resume() {
|
||||||
state.startTime = null
|
state.startTime = null;
|
||||||
state.localDuration = +(state.remaining as number)
|
state.localDuration = +(state.remaining as number);
|
||||||
state.localStartVal = +(state.printVal as number)
|
state.localStartVal = +(state.printVal as number);
|
||||||
requestAnimationFrame(count)
|
requestAnimationFrame(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
state.startTime = null
|
state.startTime = null;
|
||||||
cancelAnimationFrame(state.rAF)
|
cancelAnimationFrame(state.rAF);
|
||||||
state.displayValue = formatNumber(props.startVal)
|
state.displayValue = formatNumber(props.startVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
function count(timestamp: number) {
|
function count(timestamp: number) {
|
||||||
const { useEasing, easingFn, endVal } = props
|
const { useEasing, easingFn, endVal } = props;
|
||||||
if (!state.startTime) state.startTime = timestamp
|
if (!state.startTime) state.startTime = timestamp;
|
||||||
state.timestamp = timestamp
|
state.timestamp = timestamp;
|
||||||
const progress = timestamp - state.startTime
|
const progress = timestamp - state.startTime;
|
||||||
state.remaining = (state.localDuration as number) - progress
|
state.remaining = (state.localDuration as number) - progress;
|
||||||
if (useEasing) {
|
if (useEasing) {
|
||||||
if (unref(getCountDown)) {
|
if (unref(getCountDown)) {
|
||||||
state.printVal =
|
state.printVal =
|
||||||
@ -104,70 +103,75 @@ export default defineComponent({
|
|||||||
0,
|
0,
|
||||||
state.localStartVal - endVal,
|
state.localStartVal - endVal,
|
||||||
state.localDuration as number
|
state.localDuration as number
|
||||||
)
|
);
|
||||||
} else {
|
} else {
|
||||||
state.printVal = easingFn(
|
state.printVal = easingFn(
|
||||||
progress,
|
progress,
|
||||||
state.localStartVal,
|
state.localStartVal,
|
||||||
endVal - state.localStartVal,
|
endVal - state.localStartVal,
|
||||||
state.localDuration as number
|
state.localDuration as number
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (unref(getCountDown)) {
|
if (unref(getCountDown)) {
|
||||||
state.printVal =
|
state.printVal =
|
||||||
state.localStartVal -
|
state.localStartVal -
|
||||||
(state.localStartVal - endVal) *
|
(state.localStartVal - endVal) *
|
||||||
(progress / (state.localDuration as number))
|
(progress / (state.localDuration as number));
|
||||||
} else {
|
} else {
|
||||||
state.printVal =
|
state.printVal =
|
||||||
state.localStartVal +
|
state.localStartVal +
|
||||||
(endVal - state.localStartVal) *
|
(endVal - state.localStartVal) *
|
||||||
(progress / (state.localDuration as number))
|
(progress / (state.localDuration as number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (unref(getCountDown)) {
|
if (unref(getCountDown)) {
|
||||||
state.printVal = state.printVal < endVal ? endVal : state.printVal
|
state.printVal = state.printVal < endVal ? endVal : state.printVal;
|
||||||
} else {
|
} else {
|
||||||
state.printVal = state.printVal > endVal ? endVal : state.printVal
|
state.printVal = state.printVal > endVal ? endVal : state.printVal;
|
||||||
}
|
}
|
||||||
state.displayValue = formatNumber(state.printVal)
|
state.displayValue = formatNumber(state.printVal);
|
||||||
if (progress < (state.localDuration as number)) {
|
if (progress < (state.localDuration as number)) {
|
||||||
state.rAF = requestAnimationFrame(count)
|
state.rAF = requestAnimationFrame(count);
|
||||||
} else {
|
} else {
|
||||||
emit("callback")
|
emit("callback");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(num: number | string) {
|
function formatNumber(num: number | string) {
|
||||||
const { decimals, decimal, separator, suffix, prefix } = props
|
const { decimals, decimal, separator, suffix, prefix } = props;
|
||||||
num = Number(num).toFixed(decimals)
|
num = Number(num).toFixed(decimals);
|
||||||
num += ""
|
num += "";
|
||||||
const x = num.split(".")
|
const x = num.split(".");
|
||||||
let x1 = x[0]
|
let x1 = x[0];
|
||||||
const x2 = x.length > 1 ? decimal + x[1] : ""
|
const x2 = x.length > 1 ? decimal + x[1] : "";
|
||||||
const rgx = /(\d+)(\d{3})/
|
const rgx = /(\d+)(\d{3})/;
|
||||||
if (separator && !isNumber(separator)) {
|
if (separator && !isNumber(separator)) {
|
||||||
while (rgx.test(x1)) {
|
while (rgx.test(x1)) {
|
||||||
x1 = x1.replace(rgx, "$1" + separator + "$2")
|
x1 = x1.replace(rgx, "$1" + separator + "$2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return prefix + x1 + x2 + suffix
|
return prefix + x1 + x2 + suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.autoplay) {
|
if (props.autoplay) {
|
||||||
start()
|
start();
|
||||||
}
|
}
|
||||||
emit("mounted")
|
emit("mounted");
|
||||||
})
|
});
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<>
|
<>
|
||||||
<span style={{
|
<span
|
||||||
color: props.color, fontSize: props.fontSize
|
style={{
|
||||||
}}>{state.displayValue}</span>
|
color: props.color,
|
||||||
|
fontSize: props.fontSize,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{state.displayValue}
|
||||||
|
</span>
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { PropType } from 'vue'
|
import { PropType } from "vue";
|
||||||
import { propTypes } from '/@/utils/propTypes'
|
import { propTypes } from "/@/utils/propTypes";
|
||||||
export const countToProps = {
|
export const countToProps = {
|
||||||
startVal: propTypes.number.def(0),
|
startVal: propTypes.number.def(0),
|
||||||
endVal: propTypes.number.def(2020),
|
endVal: propTypes.number.def(2020),
|
||||||
@ -10,20 +10,22 @@ export const countToProps = {
|
|||||||
required: false,
|
required: false,
|
||||||
default: 0,
|
default: 0,
|
||||||
validator(value: number) {
|
validator(value: number) {
|
||||||
return value >= 0
|
return value >= 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color: propTypes.string.def(),
|
color: propTypes.string.def(),
|
||||||
fontSize: propTypes.string.def(),
|
fontSize: propTypes.string.def(),
|
||||||
decimal: propTypes.string.def('.'),
|
decimal: propTypes.string.def("."),
|
||||||
separator: propTypes.string.def(','),
|
separator: propTypes.string.def(","),
|
||||||
prefix: propTypes.string.def(''),
|
prefix: propTypes.string.def(""),
|
||||||
suffix: propTypes.string.def(''),
|
suffix: propTypes.string.def(""),
|
||||||
useEasing: propTypes.bool.def(true),
|
useEasing: propTypes.bool.def(true),
|
||||||
easingFn: {
|
easingFn: {
|
||||||
type: Function as PropType<(t: number, b: number, c: number, d: number) => number>,
|
type: Function as PropType<
|
||||||
|
(t: number, b: number, c: number, d: number) => number
|
||||||
|
>,
|
||||||
default(t: number, b: number, c: number, d: number) {
|
default(t: number, b: number, c: number, d: number) {
|
||||||
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b
|
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
@ -10,7 +10,32 @@
|
|||||||
<span v-if="index !== 0 " class="el-icon-close" @click="deleteMenu(item)"></span>
|
<span v-if="index !== 0 " class="el-icon-close" @click="deleteMenu(item)"></span>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<slot></slot>
|
<!-- 右侧功能按钮 -->
|
||||||
|
<ul class="right-func">
|
||||||
|
<li>
|
||||||
|
<i :title="$t('refreshRoute')" class="el-icon-refresh-right rotate" @click="onFresh"></i>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
|
<i class="el-icon-arrow-down"></i>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-for="(item,key) in tagsViews"
|
||||||
|
:key="key"
|
||||||
|
:icon="item.icon"
|
||||||
|
:divided="item.divided"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
@click="onClickDrop(key, item)"
|
||||||
|
>{{item.text}}</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<slot></slot>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,21 +45,52 @@ import { useRoute, useRouter } from "vue-router"
|
|||||||
import { ref, watchEffect, onBeforeMount, unref } from "vue"
|
import { ref, watchEffect, onBeforeMount, unref } from "vue"
|
||||||
import { storageLocal } from "/@/utils/storage"
|
import { storageLocal } from "/@/utils/storage"
|
||||||
import { emitter } from "/@/utils/mitt"
|
import { emitter } from "/@/utils/mitt"
|
||||||
|
import { toggleClass, removeClass } from "/@/utils/operate"
|
||||||
|
import { nextTick } from 'vue'
|
||||||
|
let refreshDiv = "refresh-div"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
const { deleteDynamicTag, dynamicRouteTags, dRoutes, routesLength } = useDynamicRoutesHook()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const showTags = ref(storageLocal.getItem("tagsVal") || false)
|
const showTags = ref(storageLocal.getItem("tagsVal") || false)
|
||||||
|
|
||||||
const { deleteDynamicTag, dRoutes } = ref(useDynamicRoutesHook()).value
|
const tagsViews = ref([
|
||||||
|
{
|
||||||
|
icon: "el-icon-refresh-right",
|
||||||
|
text: "重新加载",
|
||||||
|
divided: false,
|
||||||
|
disabled: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "el-icon-close",
|
||||||
|
text: "关闭当前标签页",
|
||||||
|
divided: false,
|
||||||
|
disabled: unref(routesLength) > 1 ? false : true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "el-icon-more",
|
||||||
|
text: "关闭其他标签页",
|
||||||
|
divided: true,
|
||||||
|
disabled: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "el-icon-minus",
|
||||||
|
text: "关闭全部标签页",
|
||||||
|
divided: false,
|
||||||
|
disabled: false
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
function deleteMenu(item) {
|
function deleteMenu(item) {
|
||||||
|
let tagslen = storageLocal.getItem("routesInStorage").length - 1
|
||||||
|
if (tagslen === 1) {
|
||||||
|
tagsViews.value[1].disabled = true
|
||||||
|
}
|
||||||
deleteDynamicTag(item, route.path)
|
deleteDynamicTag(item, route.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { dynamicRouteTags } = useDynamicRoutesHook()
|
|
||||||
|
|
||||||
// 初始化页面刷新保证当前路由tabview存在
|
// 初始化页面刷新保证当前路由tabview存在
|
||||||
let stop = watchEffect(() => {
|
let stop = watchEffect(() => {
|
||||||
let parentPath = route.path.slice(0, route.path.lastIndexOf("/"))
|
let parentPath = route.path.slice(0, route.path.lastIndexOf("/"))
|
||||||
@ -46,6 +102,49 @@ export default {
|
|||||||
stop()
|
stop()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function onFresh() {
|
||||||
|
toggleClass(true, refreshDiv, document.querySelector(".rotate"))
|
||||||
|
const { path, fullPath } = unref(route)
|
||||||
|
router.replace({
|
||||||
|
path: "/redirect" + fullPath
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
removeClass(document.querySelector(".rotate"), refreshDiv)
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClickDrop(key, item) {
|
||||||
|
if (item.disabled) return
|
||||||
|
switch (key) {
|
||||||
|
case 0:
|
||||||
|
// 重新加载
|
||||||
|
onFresh()
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
// 关闭当前标签页
|
||||||
|
deleteMenu({ meta: route.meta, path: route.path })
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
// 关闭其他标签页
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
// 关闭全部标签页
|
||||||
|
dRoutes.value = [{
|
||||||
|
path: "/welcome",
|
||||||
|
meta: {
|
||||||
|
title: "home",
|
||||||
|
icon: "el-icon-s-home",
|
||||||
|
showLink: true,
|
||||||
|
savedPosition: false,
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
storageLocal.setItem("routesInStorage", dRoutes.value)
|
||||||
|
router.push("/welcome")
|
||||||
|
tagsViews.value[1].disabled = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
emitter.on("tagViewsChange", (key) => {
|
emitter.on("tagViewsChange", (key) => {
|
||||||
if (unref(showTags) === key) return
|
if (unref(showTags) === key) return
|
||||||
@ -56,7 +155,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dynamicTagList: dRoutes,
|
dynamicTagList: dRoutes,
|
||||||
deleteMenu,
|
deleteMenu,
|
||||||
showTags
|
showTags,
|
||||||
|
onFresh,
|
||||||
|
tagsViews,
|
||||||
|
onClickDrop
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -118,4 +220,78 @@ export default {
|
|||||||
:deep(.el-scrollbar__wrap) {
|
:deep(.el-scrollbar__wrap) {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-func {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #fff;
|
||||||
|
border: 0.5px solid rgba($color: #ccc, $alpha: 0.3);
|
||||||
|
font-size: 16px;
|
||||||
|
li {
|
||||||
|
width: 40px;
|
||||||
|
height: 34px;
|
||||||
|
line-height: 34px;
|
||||||
|
text-align: center;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh-div {
|
||||||
|
-webkit-transition-property: -webkit-transform;
|
||||||
|
-webkit-transition-duration: 600ms;
|
||||||
|
-moz-transition-property: -moz-transform;
|
||||||
|
-moz-transition-duration: 600ms;
|
||||||
|
-webkit-animation: rotate 600ms linear infinite;
|
||||||
|
-moz-animation: rotate 600ms linear infinite;
|
||||||
|
-o-animation: rotate 600ms linear infinite;
|
||||||
|
animation: rotate 600ms linear infinite;
|
||||||
|
}
|
||||||
|
@-webkit-keyframes rotate {
|
||||||
|
from {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-moz-keyframes rotate {
|
||||||
|
from {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-moz-transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-o-keyframes rotate {
|
||||||
|
from {
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
-o-transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes rotate {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-dropdown-menu {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.el-dropdown-menu__item:not(.is-disabled):hover {
|
||||||
|
color: #606266;
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
.el-dropdown-menu__item,
|
||||||
|
.el-menu-item {
|
||||||
|
padding: 0 14px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
:deep(.el-dropdown-menu__item) i {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { reactive, toRefs, nextTick } from "vue";
|
import { reactive, toRefs, nextTick, computed } from "vue";
|
||||||
import { storageLocal } from "/@/utils/storage";
|
import { storageLocal } from "/@/utils/storage";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
@ -39,7 +39,6 @@ export function useDynamicRoutesHook() {
|
|||||||
let pathConcat = parentPath + "/" + arrItem.path;
|
let pathConcat = parentPath + "/" + arrItem.path;
|
||||||
if (arrItem.path === value || pathConcat === value) {
|
if (arrItem.path === value || pathConcat === value) {
|
||||||
dynamic.dRoutes.push({ path: value, meta: arrItem.meta });
|
dynamic.dRoutes.push({ path: value, meta: arrItem.meta });
|
||||||
// console.log(dynamic.dRoutes)
|
|
||||||
} else {
|
} else {
|
||||||
if (arrItem.children && arrItem.children.length > 0) {
|
if (arrItem.children && arrItem.children.length > 0) {
|
||||||
concatPath(arrItem.children, value, parentPath);
|
concatPath(arrItem.children, value, parentPath);
|
||||||
@ -49,14 +48,12 @@ export function useDynamicRoutesHook() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
concatPath(router.options.routes, value, parentPath);
|
concatPath(router.options.routes, value, parentPath);
|
||||||
|
|
||||||
// if (storageLocal.getItem("routesInStorage") && storageLocal.getItem("routesInStorage").length > 2) {
|
// if (storageLocal.getItem("routesInStorage") && storageLocal.getItem("routesInStorage").length > 2) {
|
||||||
// let lens = storageLocal.getItem("routesInStorage").length
|
// let lens = storageLocal.getItem("routesInStorage").length
|
||||||
// let itemss = storageLocal.getItem("routesInStorage")[lens - 1]
|
// let itemss = storageLocal.getItem("routesInStorage")[lens - 1]
|
||||||
// dynamic.dRoutes.push({ path: itemss.path, meta: itemss.meta })
|
// dynamic.dRoutes.push({ path: itemss.path, meta: itemss.meta })
|
||||||
// }
|
// }
|
||||||
|
storageLocal.setItem("routesInStorage", dynamic.dRoutes);
|
||||||
// storageLocal.setItem("routesInStorage", dynamic.dRoutes)
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @param value any 当前删除tag路由
|
* @param value any 当前删除tag路由
|
||||||
@ -68,7 +65,7 @@ export function useDynamicRoutesHook() {
|
|||||||
});
|
});
|
||||||
// 从当前匹配到的路径中删除
|
// 从当前匹配到的路径中删除
|
||||||
await dynamic.dRoutes.splice(valueIndex, 1);
|
await dynamic.dRoutes.splice(valueIndex, 1);
|
||||||
// storageLocal.setItem("routesInStorage", dynamic.dRoutes)
|
storageLocal.setItem("routesInStorage", dynamic.dRoutes);
|
||||||
if (current === obj.path) {
|
if (current === obj.path) {
|
||||||
// 如果删除当前激活tag就自动切换到最后一个tag
|
// 如果删除当前激活tag就自动切换到最后一个tag
|
||||||
let newRoute: any = dynamic.dRoutes.slice(-1);
|
let newRoute: any = dynamic.dRoutes.slice(-1);
|
||||||
@ -79,10 +76,14 @@ export function useDynamicRoutesHook() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const routesLength = computed(() => {
|
||||||
|
return storageLocal.getItem("routesInStorage").length;
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(dynamic),
|
...toRefs(dynamic),
|
||||||
dynamicRouteTags,
|
dynamicRouteTags,
|
||||||
deleteDynamicTag,
|
deleteDynamicTag,
|
||||||
|
routesLength,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -13,21 +13,10 @@
|
|||||||
<navbar v-if="!containerHiddenSideBar" />
|
<navbar v-if="!containerHiddenSideBar" />
|
||||||
<!-- tabs标签页 -->
|
<!-- tabs标签页 -->
|
||||||
<tag>
|
<tag>
|
||||||
<!-- 右侧功能按钮 -->
|
<i
|
||||||
<ul class="right-func">
|
:class="containerHiddenSideBar? 'iconfont team-iconhidden-main-container': 'iconfont team-iconshow-main-container'"
|
||||||
<li>
|
@click="onFullScreen"
|
||||||
<i :title="$t('refreshRoute')" class="el-icon-refresh-right rotate" @click="onFresh"></i>
|
></i>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i class="el-icon-arrow-down"></i>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i
|
|
||||||
:class="containerHiddenSideBar? 'iconfont team-iconhidden-main-container': 'iconfont team-iconshow-main-container'"
|
|
||||||
@click="onFullScreen"
|
|
||||||
></i>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</tag>
|
</tag>
|
||||||
</div>
|
</div>
|
||||||
<!-- 主体内容 -->
|
<!-- 主体内容 -->
|
||||||
@ -57,7 +46,6 @@ import { useStore } from "vuex";
|
|||||||
import { useEventListener, useFullscreen } from "@vueuse/core";
|
import { useEventListener, useFullscreen } from "@vueuse/core";
|
||||||
import { toggleClass, removeClass } from "/@/utils/operate";
|
import { toggleClass, removeClass } from "/@/utils/operate";
|
||||||
let hiddenMainContainer = "hidden-main-container";
|
let hiddenMainContainer = "hidden-main-container";
|
||||||
let refreshDiv = "refresh-div";
|
|
||||||
import options from "/@/settings";
|
import options from "/@/settings";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
@ -154,17 +142,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFresh() {
|
|
||||||
toggleClass(true, refreshDiv, document.querySelector(".rotate"));
|
|
||||||
const { path, fullPath } = unref(route);
|
|
||||||
router.replace({
|
|
||||||
path: "/redirect" + fullPath
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
removeClass(document.querySelector(".rotate"), refreshDiv);
|
|
||||||
}, 600);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const isMobile = $_isMobile();
|
const isMobile = $_isMobile();
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
@ -186,8 +163,7 @@ export default {
|
|||||||
...toRefs(set),
|
...toRefs(set),
|
||||||
handleClickOutside,
|
handleClickOutside,
|
||||||
containerHiddenSideBar,
|
containerHiddenSideBar,
|
||||||
onFullScreen,
|
onFullScreen
|
||||||
onFresh
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -240,64 +216,7 @@ $sideBarWidth: 210px;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-func {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
background: #fff;
|
|
||||||
border: 0.5px solid rgba($color: #ccc, $alpha: 0.3);
|
|
||||||
font-size: 16px;
|
|
||||||
li {
|
|
||||||
width: 40px;
|
|
||||||
height: 34px;
|
|
||||||
line-height: 34px;
|
|
||||||
text-align: center;
|
|
||||||
border-right: 1px solid #ccc;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hidden-main-container {
|
.hidden-main-container {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
.refresh-div {
|
|
||||||
-webkit-transition-property: -webkit-transform;
|
|
||||||
-webkit-transition-duration: 600ms;
|
|
||||||
-moz-transition-property: -moz-transform;
|
|
||||||
-moz-transition-duration: 600ms;
|
|
||||||
-webkit-animation: rotate 600ms linear infinite;
|
|
||||||
-moz-animation: rotate 600ms linear infinite;
|
|
||||||
-o-animation: rotate 600ms linear infinite;
|
|
||||||
animation: rotate 600ms linear infinite;
|
|
||||||
}
|
|
||||||
@-webkit-keyframes rotate {
|
|
||||||
from {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-moz-keyframes rotate {
|
|
||||||
from {
|
|
||||||
-moz-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-moz-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@-o-keyframes rotate {
|
|
||||||
from {
|
|
||||||
-o-transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
-o-transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes rotate {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -15,26 +15,14 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"resolveJsonModule": true, // 包含导入的模块。json的扩展
|
"resolveJsonModule": true, // 包含导入的模块。json的扩展
|
||||||
"lib": [
|
"lib": ["dom", "esnext"],
|
||||||
"dom",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"/@/*": [
|
"/@/*": ["src/*"],
|
||||||
"src/*"
|
"/#/*": ["types/*"]
|
||||||
],
|
|
||||||
"/#/*": [
|
|
||||||
"types/*"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"types": [
|
"types": ["node"],
|
||||||
"node"
|
"typeRoots": ["./node_modules/@types/", "./types"]
|
||||||
],
|
|
||||||
"typeRoots": [
|
|
||||||
"./node_modules/@types/",
|
|
||||||
"./types"
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
@ -44,11 +32,9 @@
|
|||||||
"src/utils/path.js",
|
"src/utils/path.js",
|
||||||
"types/**/*.d.ts",
|
"types/**/*.d.ts",
|
||||||
"types/**/*.ts",
|
"types/**/*.ts",
|
||||||
"types/shims-tsx.d.ts"
|
"types/global.d.ts",
|
||||||
|
"types/shims-tsx.d.ts",
|
||||||
|
"types/shims-vue.d.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": ["node_modules", "dist", "**/*.js"]
|
||||||
"node_modules",
|
}
|
||||||
"dist",
|
|
||||||
"**/*.js"
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
112
types/global.d.ts
vendored
112
types/global.d.ts
vendored
@ -4,102 +4,96 @@ import type {
|
|||||||
ComponentPublicInstance,
|
ComponentPublicInstance,
|
||||||
FunctionalComponent,
|
FunctionalComponent,
|
||||||
PropType as VuePropType,
|
PropType as VuePropType,
|
||||||
} from 'vue'
|
} from "vue";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
const __APP_INFO__: {
|
const __APP_INFO__: {
|
||||||
pkg: {
|
pkg: {
|
||||||
name: string
|
name: string;
|
||||||
version: string
|
version: string;
|
||||||
dependencies: Recordable<string>
|
dependencies: Recordable<string>;
|
||||||
devDependencies: Recordable<string>
|
devDependencies: Recordable<string>;
|
||||||
}
|
};
|
||||||
lastBuildTime: string
|
lastBuildTime: string;
|
||||||
}
|
};
|
||||||
declare interface Window {
|
declare interface Window {
|
||||||
// Global vue app instance
|
// Global vue app instance
|
||||||
__APP__: App<Element>,
|
__APP__: App<Element>;
|
||||||
mozCancelAnimationFrame: (id?: any) => any,
|
mozCancelAnimationFrame: (id?: any) => any;
|
||||||
oCancelAnimationFrame: (id?: any) => any,
|
oCancelAnimationFrame: (id?: any) => any;
|
||||||
msCancelAnimationFrame: (id?: any) => any,
|
msCancelAnimationFrame: (id?: any) => any;
|
||||||
mozRequestAnimationFrame: (id?: any) => any,
|
mozRequestAnimationFrame: (id?: any) => any;
|
||||||
oRequestAnimationFrame: (id?: any) => any,
|
oRequestAnimationFrame: (id?: any) => any;
|
||||||
msRequestAnimationFrame: (id?: any) => any
|
msRequestAnimationFrame: (id?: any) => any;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
declare type PropType<T> = VuePropType<T>
|
declare type PropType<T> = VuePropType<T>;
|
||||||
|
|
||||||
export type Writable<T> = {
|
export type Writable<T> = {
|
||||||
-readonly [P in keyof T]: T[P]
|
-readonly [P in keyof T]: T[P];
|
||||||
}
|
};
|
||||||
|
|
||||||
declare type Nullable<T> = T | null
|
declare type Nullable<T> = T | null;
|
||||||
declare type NonNullable<T> = T extends null | undefined ? never : T
|
declare type NonNullable<T> = T extends null | undefined ? never : T;
|
||||||
declare type Recordable<T = any> = Record<string, T>
|
declare type Recordable<T = any> = Record<string, T>;
|
||||||
declare type ReadonlyRecordable<T = any> = {
|
declare type ReadonlyRecordable<T = any> = {
|
||||||
readonly [key: string]: T
|
readonly [key: string]: T;
|
||||||
}
|
};
|
||||||
declare type Indexable<T = any> = {
|
declare type Indexable<T = any> = {
|
||||||
[key: string]: T
|
[key: string]: T;
|
||||||
}
|
};
|
||||||
declare type DeepPartial<T> = {
|
declare type DeepPartial<T> = {
|
||||||
[P in keyof T]?: DeepPartial<T[P]>
|
[P in keyof T]?: DeepPartial<T[P]>;
|
||||||
}
|
};
|
||||||
declare type TimeoutHandle = ReturnType<typeof setTimeout>
|
declare type TimeoutHandle = ReturnType<typeof setTimeout>;
|
||||||
declare type IntervalHandle = ReturnType<typeof setInterval>
|
declare type IntervalHandle = ReturnType<typeof setInterval>;
|
||||||
|
|
||||||
declare interface ChangeEvent extends Event {
|
declare interface ChangeEvent extends Event {
|
||||||
target: HTMLInputElement
|
target: HTMLInputElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface WheelEvent {
|
declare interface WheelEvent {
|
||||||
path?: EventTarget[]
|
path?: EventTarget[];
|
||||||
}
|
}
|
||||||
interface ImportMetaEnv extends ViteEnv {
|
interface ImportMetaEnv extends ViteEnv {
|
||||||
__: unknown
|
__: unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface ViteEnv {
|
declare interface ViteEnv {
|
||||||
VITE_PORT: number
|
VITE_PORT: number;
|
||||||
VITE_USE_MOCK: boolean
|
VITE_USE_MOCK: boolean;
|
||||||
VITE_USE_PWA: boolean
|
VITE_USE_PWA: boolean;
|
||||||
VITE_PUBLIC_PATH: string
|
VITE_PUBLIC_PATH: string;
|
||||||
VITE_PROXY: [string, string][]
|
VITE_PROXY: [string, string][];
|
||||||
VITE_GLOB_APP_TITLE: string
|
VITE_GLOB_APP_TITLE: string;
|
||||||
VITE_GLOB_APP_SHORT_NAME: string
|
VITE_GLOB_APP_SHORT_NAME: string;
|
||||||
VITE_USE_CDN: boolean
|
VITE_USE_CDN: boolean;
|
||||||
VITE_DROP_CONSOLE: boolean
|
VITE_DROP_CONSOLE: boolean;
|
||||||
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'
|
VITE_BUILD_COMPRESS: "gzip" | "brotli" | "none";
|
||||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean
|
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
|
||||||
VITE_LEGACY: boolean
|
VITE_LEGACY: boolean;
|
||||||
VITE_USE_IMAGEMIN: boolean
|
VITE_USE_IMAGEMIN: boolean;
|
||||||
VITE_GENERATE_UI: string
|
VITE_GENERATE_UI: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare function parseInt(s: string | number, radix?: number): number
|
declare function parseInt(s: string | number, radix?: number): number;
|
||||||
|
|
||||||
declare function parseFloat(string: string | number): number
|
declare function parseFloat(string: string | number): number;
|
||||||
|
|
||||||
namespace JSX {
|
namespace JSX {
|
||||||
// tslint:disable no-empty-interface
|
// tslint:disable no-empty-interface
|
||||||
type Element = VNode
|
type Element = VNode;
|
||||||
// tslint:disable no-empty-interface
|
// tslint:disable no-empty-interface
|
||||||
type ElementClass = ComponentRenderProxy
|
type ElementClass = ComponentRenderProxy;
|
||||||
interface ElementAttributesProperty {
|
interface ElementAttributesProperty {
|
||||||
$props: any
|
$props: any;
|
||||||
}
|
}
|
||||||
interface IntrinsicElements {
|
interface IntrinsicElements {
|
||||||
[elem: string]: any
|
[elem: string]: any;
|
||||||
}
|
}
|
||||||
interface IntrinsicAttributes {
|
interface IntrinsicAttributes {
|
||||||
[elem: string]: any
|
[elem: string]: any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue' {
|
|
||||||
export type JSXComponent<Props = any> =
|
|
||||||
| { new(): ComponentPublicInstance<Props> }
|
|
||||||
| FunctionalComponent<Props>
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user