mirror of https://github.com/halo-dev/halo-admin
refactor: remove formkit auto-animate addon (#687)
#### What type of PR is this? /kind improvement /milestone 2.0 #### What this PR does / why we need it: 移除 FormKit 的 Auto Animate 扩展,因为如果使用了这个扩展,在动态加载表单元素的时候可能会导致 UI 大范围的抖动。而且此扩展比较不可控,无法对其表现进行修改。 #### Screenshots: before:   #### Special notes for your reviewer: /cc @halo-dev/sig-halo-console #### Does this PR introduce a user-facing change? ```release-note 移除表单中的动画效果 ```pull/691/head
parent
fb446d382f
commit
fe89862552
|
@ -26,8 +26,6 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emoji-mart/data": "^1.0.6",
|
"@emoji-mart/data": "^1.0.6",
|
||||||
"@formkit/addons": "^1.0.0-beta.11",
|
|
||||||
"@formkit/auto-animate": "1.0.0-beta.3",
|
|
||||||
"@formkit/core": "^1.0.0-beta.11",
|
"@formkit/core": "^1.0.0-beta.11",
|
||||||
"@formkit/i18n": "^1.0.0-beta.11",
|
"@formkit/i18n": "^1.0.0-beta.11",
|
||||||
"@formkit/inputs": "^1.0.0-beta.11",
|
"@formkit/inputs": "^1.0.0-beta.11",
|
||||||
|
|
|
@ -6,8 +6,6 @@ importers:
|
||||||
specifiers:
|
specifiers:
|
||||||
'@changesets/cli': ^2.25.0
|
'@changesets/cli': ^2.25.0
|
||||||
'@emoji-mart/data': ^1.0.6
|
'@emoji-mart/data': ^1.0.6
|
||||||
'@formkit/addons': ^1.0.0-beta.11
|
|
||||||
'@formkit/auto-animate': 1.0.0-beta.3
|
|
||||||
'@formkit/core': ^1.0.0-beta.11
|
'@formkit/core': ^1.0.0-beta.11
|
||||||
'@formkit/i18n': ^1.0.0-beta.11
|
'@formkit/i18n': ^1.0.0-beta.11
|
||||||
'@formkit/inputs': ^1.0.0-beta.11
|
'@formkit/inputs': ^1.0.0-beta.11
|
||||||
|
@ -101,8 +99,6 @@ importers:
|
||||||
yaml: ^2.1.3
|
yaml: ^2.1.3
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emoji-mart/data': 1.0.6
|
'@emoji-mart/data': 1.0.6
|
||||||
'@formkit/addons': 1.0.0-beta.11
|
|
||||||
'@formkit/auto-animate': 1.0.0-beta.3
|
|
||||||
'@formkit/core': 1.0.0-beta.11
|
'@formkit/core': 1.0.0-beta.11
|
||||||
'@formkit/i18n': 1.0.0-beta.11
|
'@formkit/i18n': 1.0.0-beta.11
|
||||||
'@formkit/inputs': 1.0.0-beta.11
|
'@formkit/inputs': 1.0.0-beta.11
|
||||||
|
@ -1849,18 +1845,6 @@ packages:
|
||||||
'@floating-ui/core': 0.3.1
|
'@floating-ui/core': 0.3.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@formkit/addons/1.0.0-beta.11:
|
|
||||||
resolution: {integrity: sha512-p8q34aOZ54OyxWyjJ6Y3Je/EcCFJTpu4uX5sNbPbgYvn0G3hogdDzC/ysVc42dcpZXg6qgwPZtNMKLGMKH24CQ==}
|
|
||||||
dependencies:
|
|
||||||
'@formkit/auto-animate': 1.0.0-beta.3
|
|
||||||
'@formkit/core': 1.0.0-beta.11
|
|
||||||
'@formkit/utils': 1.0.0-beta.11
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@formkit/auto-animate/1.0.0-beta.3:
|
|
||||||
resolution: {integrity: sha512-glsi+ytwQpxT/Ctr9GtcIfVr4dO6mJ04mQbNU8MFSdCdqMopHtyfU5Fib0+9lNFIeR0luY4/0NW95/2R5pKsag==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@formkit/core/1.0.0-beta.11:
|
/@formkit/core/1.0.0-beta.11:
|
||||||
resolution: {integrity: sha512-1yIQUicY1ZVGkeT0AEVp3ahx5FdJg+snyc8yaitsNmQeCSq1Ju5o1nCRcpcZ7j2ezMbGUiL7nTscGGejC15N2Q==}
|
resolution: {integrity: sha512-1yIQUicY1ZVGkeT0AEVp3ahx5FdJg+snyc8yaitsNmQeCSq1Ju5o1nCRcpcZ7j2ezMbGUiL7nTscGGejC15N2Q==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { generateClasses } from "@formkit/themes";
|
import { generateClasses } from "@formkit/themes";
|
||||||
import theme from "./theme";
|
import theme from "./theme";
|
||||||
import { createAutoAnimatePlugin } from "@formkit/addons";
|
|
||||||
import { zh } from "@formkit/i18n";
|
import { zh } from "@formkit/i18n";
|
||||||
import type { DefaultConfigOptions } from "@formkit/vue";
|
import type { DefaultConfigOptions } from "@formkit/vue";
|
||||||
import { form } from "./inputs/form";
|
import { form } from "./inputs/form";
|
||||||
|
@ -20,7 +19,6 @@ const config: DefaultConfigOptions = {
|
||||||
config: {
|
config: {
|
||||||
classes: generateClasses(theme),
|
classes: generateClasses(theme),
|
||||||
},
|
},
|
||||||
plugins: [createAutoAnimatePlugin()],
|
|
||||||
inputs: {
|
inputs: {
|
||||||
form,
|
form,
|
||||||
attachment,
|
attachment,
|
||||||
|
|
|
@ -29,9 +29,10 @@ const buttonClassification = {
|
||||||
const theme: Record<string, Record<string, string>> = {
|
const theme: Record<string, Record<string, string>> = {
|
||||||
global: {
|
global: {
|
||||||
form: "divide-y divide-gray-100",
|
form: "divide-y divide-gray-100",
|
||||||
outer: "formkit-disabled:opacity-50 py-4 first:pt-0 last:pb-0",
|
outer:
|
||||||
|
"formkit-disabled:opacity-50 py-4 first:pt-0 last:pb-0 transition-all",
|
||||||
help: "text-xs mt-2 text-gray-500",
|
help: "text-xs mt-2 text-gray-500",
|
||||||
messages: "list-none p-0 mt-1.5 mb-0",
|
messages: "list-none p-0 mt-1.5 mb-0 transition-all",
|
||||||
message: "text-red-500 mt-2 text-xs",
|
message: "text-red-500 mt-2 text-xs",
|
||||||
},
|
},
|
||||||
button: buttonClassification,
|
button: buttonClassification,
|
||||||
|
|
Loading…
Reference in New Issue