From ca41a57f30fd8c4be6b0486b2b330540c0875d9a Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 11 Nov 2021 19:31:32 +0800 Subject: [PATCH] fix(Switch): switch node inherit font-size (#9842) * fix(Switch): switch node inherit font-size * chore: upd --- package.json | 1 + packages/vant/src/switch/index.less | 2 ++ pnpm-lock.yaml | 10 ++++------ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 10bccb497..df8a60c36 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@vant/cli": "workspace:*", "@vant/eslint-config": "workspace:*", + "@vant/stylelint-config": "workspace:*", "eslint": "^8.2.0", "husky": "^7.0.4", "lint-staged": "^11.2.6", diff --git a/packages/vant/src/switch/index.less b/packages/vant/src/switch/index.less index 570f08bc2..8af117767 100644 --- a/packages/vant/src/switch/index.less +++ b/packages/vant/src/switch/index.less @@ -33,6 +33,8 @@ left: 0; width: var(--van-switch-node-size); height: var(--van-switch-node-size); + // https://github.com/youzan/vant/issues/9839 + font-size: inherit; background: var(--van-switch-node-background-color); border-radius: 100%; box-shadow: var(--van-switch-node-box-shadow); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index afffd9396..0a752aa50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ importers: specifiers: '@vant/cli': workspace:* '@vant/eslint-config': workspace:* + '@vant/stylelint-config': workspace:* eslint: ^8.2.0 husky: ^7.0.4 lint-staged: ^11.2.6 @@ -14,6 +15,7 @@ importers: devDependencies: '@vant/cli': link:packages/vant-cli '@vant/eslint-config': link:packages/vant-eslint-config + '@vant/stylelint-config': link:packages/vant-stylelint-config eslint: 8.2.0 husky: 7.0.4 lint-staged: 11.2.6 @@ -58,7 +60,7 @@ importers: dependencies: '@vant/icons': link:../vant-icons '@vant/popperjs': link:../vant-popperjs - '@vant/use': 1.3.3 + '@vant/use': link:../vant-use devDependencies: '@vant/area-data': link:../vant-area-data '@vant/cli': link:../vant-cli @@ -2335,10 +2337,6 @@ packages: eslint-visitor-keys: 3.0.0 dev: false - /@vant/use/1.3.3: - resolution: {integrity: sha512-EM06Wgc+2sy4VhAECBTRd4NuoUdVeprcfClMdAnS1HNibk13XYd8iGNi8XqijWzrIO/KCCgudnDW9Ja/iYy+rA==, tarball: '@vant/use/download/@vant/use-1.3.3.tgz?cache=0&sync_timestamp=1636624316375&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40vant%2Fuse%2Fdownload%2F%40vant%2Fuse-1.3.3.tgz'} - dev: false - /@vitejs/plugin-vue-jsx/1.2.0: resolution: {integrity: sha1-pCFr27ixKABTfTnjtXEfzy60cO8=, tarball: '@vitejs/plugin-vue-jsx/download/@vitejs/plugin-vue-jsx-1.2.0.tgz'} engines: {node: '>=12.0.0'} @@ -7489,7 +7487,7 @@ packages: engines: {node: '>=0.10.0'} /source-map/0.6.1: - resolution: {integrity: sha1-dHIq8y6WFOnCh6jQu95IteLxomM=, tarball: source-map/download/source-map-0.6.1.tgz} + resolution: {integrity: sha1-dHIq8y6WFOnCh6jQu95IteLxomM=, tarball: source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1632822727980&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz} engines: {node: '>=0.10.0'} /source-map/0.7.3: