From 45a402ba03ce7a518f1cf6a76ee51e037a921a26 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:40:27 +0800 Subject: [PATCH 01/23] chore(deps): update dependency markdown-it to v14 (#2716) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1dd905a98e..c182b56fc3 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "inquirer": "^9.2.11", "lint-staged": "^15.0.1", "lzutf8": "^0.6.3", - "markdown-it": "^13.0.2", + "markdown-it": "^14.0.0", "prettier": "^3.0.3", "rimraf": "^5.0.5", "typescript": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6c57761d1..9d6af33c1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,8 +85,8 @@ importers: specifier: ^0.6.3 version: 0.6.3 markdown-it: - specifier: ^13.0.2 - version: 13.0.2 + specifier: ^14.0.0 + version: 14.0.0 prettier: specifier: ^3.0.3 version: 3.0.3 @@ -7435,6 +7435,7 @@ packages: /entities@3.0.1: resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==} engines: {node: '>=0.12'} + dev: false /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} @@ -10450,6 +10451,13 @@ packages: resolution: {integrity: sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==} dependencies: uc.micro: 1.0.6 + dev: false + + /linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + dependencies: + uc.micro: 2.0.0 + dev: true /lint-staged@15.0.1: resolution: {integrity: sha512-2IU5OWmCaxch0X0+IBF4/v7sutpB+F3qoXbro43pYjQTOo5wumckjxoxn47pQBqqBsCWrD5HnI2uG/zJA7isew==} @@ -10820,6 +10828,19 @@ packages: linkify-it: 4.0.1 mdurl: 1.0.1 uc.micro: 1.0.6 + dev: false + + /markdown-it@14.0.0: + resolution: {integrity: sha512-seFjF0FIcPt4P9U39Bq1JYblX0KZCjDLFFQPHpL5AzHpqPEKtosxmdq/LTVZnjfH7tjt9BxStm+wXcDBNuYmzw==} + hasBin: true + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.0.0 + dev: true /mathml-tag-names@2.1.3: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} @@ -10852,6 +10873,10 @@ packages: /mdurl@1.0.1: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} + /mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + dev: true + /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -12823,6 +12848,11 @@ packages: pump: 2.0.1 dev: true + /punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + dev: true + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} @@ -14935,6 +14965,10 @@ packages: /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} + /uc.micro@2.0.0: + resolution: {integrity: sha512-DffL94LsNOccVn4hyfRe5rdKa273swqeA5DJpMOeFmEn1wCDc7nAbbB0gXlgBCL7TNzeTv6G7XVWzan7iJtfig==} + dev: true + /ufo@1.3.1: resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} dev: true From 574b89a55785c27e7d7fcfadb8627d68f349eebb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:41:58 +0800 Subject: [PATCH 02/23] chore(deps): update dependency stylelint to v16 (#2717) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/nutui-taro-demo/package.json | 2 +- pnpm-lock.yaml | 194 +++++++++++--------------- 2 files changed, 80 insertions(+), 116 deletions(-) diff --git a/packages/nutui-taro-demo/package.json b/packages/nutui-taro-demo/package.json index 3b3a2a3012..89ca781732 100644 --- a/packages/nutui-taro-demo/package.json +++ b/packages/nutui-taro-demo/package.json @@ -48,7 +48,7 @@ "eslint": "^8.51.0", "eslint-config-taro": "3.6.19", "style-loader": "^3.3.3", - "stylelint": "^15.10.3", + "stylelint": "^16.0.0", "typescript": "^5.2.2", "vue-loader": "^17.3.0", "webpack": "^5.89.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d6af33c1e..d012ed12c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,8 +274,8 @@ importers: specifier: ^3.3.3 version: 3.3.3(webpack@5.89.0) stylelint: - specifier: ^15.10.3 - version: 15.10.3(typescript@5.2.2) + specifier: ^16.0.0 + version: 16.0.0(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -5611,16 +5611,6 @@ packages: quick-lru: 4.0.1 dev: true - /camelcase-keys@7.0.2: - resolution: {integrity: sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==} - engines: {node: '>=12'} - dependencies: - camelcase: 6.3.0 - map-obj: 4.3.0 - quick-lru: 5.1.1 - type-fest: 1.4.0 - dev: true - /camelcase@4.1.0: resolution: {integrity: sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==} engines: {node: '>=4'} @@ -6511,6 +6501,22 @@ packages: typescript: 5.2.2 dev: true + /cosmiconfig@9.0.0(typescript@5.2.2): + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + typescript: 5.2.2 + dev: true + /create-error-class@3.0.2: resolution: {integrity: sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==} engines: {node: '>=0.10.0'} @@ -6901,11 +6907,6 @@ packages: engines: {node: '>=10'} dev: true - /decamelize@5.0.1: - resolution: {integrity: sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==} - engines: {node: '>=10'} - dev: true - /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: true @@ -7442,6 +7443,11 @@ packages: engines: {node: '>=0.12'} dev: true + /env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + dev: true + /envinfo@7.10.0: resolution: {integrity: sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==} engines: {node: '>=4'} @@ -8236,6 +8242,13 @@ packages: dependencies: flat-cache: 3.1.1 + /file-entry-cache@7.0.2: + resolution: {integrity: sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==} + engines: {node: '>=12.0.0'} + dependencies: + flat-cache: 3.2.0 + dev: true + /file-loader@6.0.0(webpack@5.89.0): resolution: {integrity: sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ==} engines: {node: '>= 10.13.0'} @@ -8428,6 +8441,15 @@ packages: keyv: 4.5.4 rimraf: 3.0.2 + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.9 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -9416,6 +9438,11 @@ packages: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} + /ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} + engines: {node: '>= 4'} + dev: true + /image-size@0.5.5: resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} engines: {node: '>=0.10.0'} @@ -9451,11 +9478,6 @@ packages: engines: {node: '>=4'} dev: true - /import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - dev: true - /import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} @@ -9474,11 +9496,6 @@ packages: engines: {node: '>=8'} dev: true - /indent-string@5.0.0: - resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} - engines: {node: '>=12'} - dev: true - /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -10236,8 +10253,8 @@ packages: engines: {node: '>= 8'} dev: true - /known-css-properties@0.28.0: - resolution: {integrity: sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==} + /known-css-properties@0.29.0: + resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==} dev: true /latest-version@3.1.0: @@ -10924,24 +10941,6 @@ packages: /memoize-one@6.0.0: resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==} - /meow@10.1.5: - resolution: {integrity: sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - '@types/minimist': 1.2.3 - camelcase-keys: 7.0.2 - decamelize: 5.0.1 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 8.0.0 - redent: 4.0.0 - trim-newlines: 4.1.1 - type-fest: 1.4.0 - yargs-parser: 20.2.9 - dev: true - /meow@12.1.1: resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} engines: {node: '>=16.10'} @@ -11410,6 +11409,12 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: true @@ -11985,7 +11990,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.4 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -12592,13 +12597,13 @@ packages: resolution: {integrity: sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==} dev: true - /postcss-safe-parser@6.0.0(postcss@8.4.31): - resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} - engines: {node: '>=12.0'} + /postcss-safe-parser@7.0.0(postcss@8.4.32): + resolution: {integrity: sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==} + engines: {node: '>=18.0'} peerDependencies: - postcss: ^8.3.3 + postcss: ^8.4.31 dependencies: - postcss: 8.4.31 + postcss: 8.4.32 dev: true /postcss-selector-parser@6.0.13: @@ -12662,6 +12667,15 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postcss@8.4.32: + resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -12912,11 +12926,6 @@ packages: engines: {node: '>=8'} dev: true - /quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - dev: true - /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -12992,15 +13001,6 @@ packages: type-fest: 0.8.1 dev: true - /read-pkg-up@8.0.0: - resolution: {integrity: sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==} - engines: {node: '>=12'} - dependencies: - find-up: 5.0.0 - read-pkg: 6.0.0 - type-fest: 1.4.0 - dev: true - /read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} @@ -13011,16 +13011,6 @@ packages: type-fest: 0.6.0 dev: true - /read-pkg@6.0.0: - resolution: {integrity: sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==} - engines: {node: '>=12'} - dependencies: - '@types/normalize-package-data': 2.4.2 - normalize-package-data: 3.0.3 - parse-json: 5.2.0 - type-fest: 1.4.0 - dev: true - /read@1.0.7: resolution: {integrity: sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==} engines: {node: '>=0.8'} @@ -13078,14 +13068,6 @@ packages: strip-indent: 3.0.0 dev: true - /redent@4.0.0: - resolution: {integrity: sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==} - engines: {node: '>=12'} - dependencies: - indent-string: 5.0.0 - strip-indent: 4.0.0 - dev: true - /regenerate-unicode-properties@10.1.1: resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} engines: {node: '>=4'} @@ -14189,13 +14171,6 @@ packages: min-indent: 1.0.1 dev: true - /strip-indent@4.0.0: - resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} - engines: {node: '>=12'} - dependencies: - min-indent: 1.0.1 - dev: true - /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -14236,10 +14211,6 @@ packages: webpack: 5.89.0(@swc/core@1.3.23) dev: true - /style-search@0.1.0: - resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} - dev: true - /stylehacks@5.1.1(postcss@8.4.31): resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} engines: {node: ^10 || ^12 || >=14.0} @@ -14251,9 +14222,9 @@ packages: postcss-selector-parser: 6.0.13 dev: true - /stylelint@15.10.3(typescript@5.2.2): - resolution: {integrity: sha512-aBQMMxYvFzJJwkmg+BUUg3YfPyeuCuKo2f+LOw7yYbU8AZMblibwzp9OV4srHVeQldxvSFdz0/Xu8blq2AesiA==} - engines: {node: ^14.13.1 || >=16.0.0} + /stylelint@16.0.0(typescript@5.2.2): + resolution: {integrity: sha512-AKwRjOL+a+QYIrjQLaY1uqsxEd2I/QlYvExelWxJ5hbobfBNzM0hkIc6d+CSVJP6KaVme9D3Jlr7VIXfXmHDKA==} + engines: {node: '>=18.12.0'} hasBin: true dependencies: '@csstools/css-parser-algorithms': 2.3.2(@csstools/css-tokenizer@2.2.1) @@ -14262,36 +14233,34 @@ packages: '@csstools/selector-specificity': 3.0.0(postcss-selector-parser@6.0.13) balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 8.3.6(typescript@5.2.2) + cosmiconfig: 9.0.0(typescript@5.2.2) css-functions-list: 3.2.1 css-tree: 2.3.1 debug: 4.3.4 - fast-glob: 3.3.1 + fast-glob: 3.3.2 fastest-levenshtein: 1.0.16 - file-entry-cache: 6.0.1 + file-entry-cache: 7.0.2 global-modules: 2.0.0 globby: 11.1.0 globjoin: 0.1.4 html-tags: 3.3.1 - ignore: 5.2.4 - import-lazy: 4.0.0 + ignore: 5.3.0 imurmurhash: 0.1.4 is-plain-object: 5.0.0 - known-css-properties: 0.28.0 + known-css-properties: 0.29.0 mathml-tag-names: 2.1.3 - meow: 10.1.5 + meow: 12.1.1 micromatch: 4.0.5 normalize-path: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.31 + postcss: 8.4.32 postcss-resolve-nested-selector: 0.1.1 - postcss-safe-parser: 6.0.0(postcss@8.4.31) + postcss-safe-parser: 7.0.0(postcss@8.4.32) postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 string-width: 4.2.3 - strip-ansi: 6.0.1 - style-search: 0.1.0 + strip-ansi: 7.1.0 supports-hyperlinks: 3.0.0 svg-tags: 1.0.0 table: 6.8.1 @@ -14739,11 +14708,6 @@ packages: engines: {node: '>=8'} dev: true - /trim-newlines@4.1.1: - resolution: {integrity: sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==} - engines: {node: '>=12'} - dev: true - /trim-repeated@1.0.0: resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} engines: {node: '>=0.10.0'} From db53c39a30e1b2a508e19c69aa62a2e752f629a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:42:13 +0800 Subject: [PATCH 03/23] fix(deps): update dependency markdown-it-container to v4 (#2718) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/nutui-vite-plugins/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/nutui-vite-plugins/package.json b/packages/nutui-vite-plugins/package.json index 4673f7d361..5861130e25 100644 --- a/packages/nutui-vite-plugins/package.json +++ b/packages/nutui-vite-plugins/package.json @@ -29,7 +29,7 @@ "license": "MIT", "dependencies": { "lzutf8": "^0.6.3", - "markdown-it-container": "^3.0.0", + "markdown-it-container": "^4.0.0", "unplugin-vue-markdown": "^0.25.2", "highlight.js": "^11.9.0", "fs-extra": "^11.1.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d012ed12c4..d54c5c83ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -300,8 +300,8 @@ importers: specifier: ^0.6.3 version: 0.6.3 markdown-it-container: - specifier: ^3.0.0 - version: 3.0.0 + specifier: ^4.0.0 + version: 4.0.0 unplugin-vue-markdown: specifier: ^0.25.2 version: 0.25.2(vite@5.0.4) @@ -10821,8 +10821,8 @@ packages: engines: {node: '>=8'} dev: true - /markdown-it-container@3.0.0: - resolution: {integrity: sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==} + /markdown-it-container@4.0.0: + resolution: {integrity: sha512-HaNccxUH0l7BNGYbFbjmGpf5aLHAMTinqRZQAEQbMr2cdD3z91Q6kIo1oUn1CQndkT03jat6ckrdRYuwwqLlQw==} dev: false /markdown-it@12.3.2: From 69163147dc3cc40adf58b8098805dd17058f9ff8 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Fri, 8 Dec 2023 23:38:00 +0800 Subject: [PATCH 04/23] refactor(picker, taro): modify to gen better dts (#2720) --- src/packages/__VUE/picker/common.ts | 159 ----------------------- src/packages/__VUE/picker/index.taro.vue | 117 ++++++++++++++++- 2 files changed, 112 insertions(+), 164 deletions(-) delete mode 100644 src/packages/__VUE/picker/common.ts diff --git a/src/packages/__VUE/picker/common.ts b/src/packages/__VUE/picker/common.ts deleted file mode 100644 index 1afbccd516..0000000000 --- a/src/packages/__VUE/picker/common.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { ref, reactive, computed, CSSProperties, toRefs } from 'vue'; -import { pxCheck } from '@/packages/utils/pxCheck'; -import { usePicker } from './usePicker'; -import NutPickerColumn from './Column.vue'; -import Taro from '@tarojs/taro'; -import baseProps from './baseProps'; -import { useLocale } from '@/packages/utils/useLocale'; - -const cN = 'NutPicker'; - -export const componentWeb = { - components: { - NutPickerColumn - }, - props: baseProps, - emits: ['cancel', 'change', 'confirm', 'update:modelValue'], - setup(props: any, { emit }: any) { - const translate = useLocale(cN); - const { changeHandler, confirm, defaultValues, columnsList, columnsType, columnFieldNames, cancel } = usePicker( - props, - emit - ); - - const state = reactive<{ - ENV: TaroGeneral.ENV_TYPE; - ENV_TYPE: Taro.TARO_ENV_TYPE; - }>({ - ENV: Taro.getEnv(), - ENV_TYPE: Taro.ENV_TYPE - }); - - const pickerColumn = ref([]); - - const swipeRef = (el: any) => { - if (el && pickerColumn.value.length < columnsList.value.length) { - pickerColumn.value.push(el); - } - }; - - const confirmHandler = () => { - pickerColumn.value.length > 0 && - pickerColumn.value.forEach((column) => { - column.stopMomentum(); - }); - - confirm(); - }; - - const columnStyle = computed(() => { - const styles: CSSProperties = {}; - styles.height = `${+props.visibleOptionNum * +props.optionHeight}px`; - styles['--lineHeight'] = `${+props.optionHeight}px`; - return styles; - }); - - return { - ...toRefs(state), - columnsType, - columnsList, - columnFieldNames, - cancel, - changeHandler, - confirmHandler, - defaultValues, - pickerColumn, - swipeRef, - translate, - columnStyle - }; - } -}; - -export const componentWeapp = { - components: { - NutPickerColumn - }, - props: baseProps, - emits: ['cancel', 'change', 'confirm', 'update:modelValue'], - setup(props: any, { emit }: any) { - const translate = useLocale(cN); - const { - changeHandler, - confirm, - defaultValues, - defaultIndexes, - columnsList, - columnsType, - columnFieldNames, - cancel - } = usePicker(props, emit); - const state = reactive({ - show: false, - picking: false, - ENV: Taro.getEnv(), - ENV_TYPE: Taro.ENV_TYPE - }); - - const pickerViewStyles = computed(() => { - const styles: CSSProperties = {}; - styles.height = `${+props.visibleOptionNum * +props.optionHeight}px`; - styles['--lineHeight'] = `${+props.optionHeight}px`; - return styles; - }); - - // 平铺展示时,滚动选择 - const tileChange = (data: any) => { - const prevDefaultValue = defaultIndexes.value; - let changeIndex = 0; - // 判断变化的是第几个 - for (let i = 0; i < data.detail.value?.length; i++) { - if (prevDefaultValue[i] !== data.detail.value?.[i]) { - changeIndex = i; - break; - } - } - - // 选择的是哪个 option - changeHandler(changeIndex, columnsList.value[changeIndex][data.detail.value[changeIndex]]); - }; - - // 确定 - const confirmHandler = () => { - if (state.picking) { - setTimeout(() => { - confirm(); - }, 0); - } else { - confirm(); - } - }; - - // 开始滚动 - const handlePickstart = () => { - state.picking = true; - }; - // 开始滚动 - const handlePickend = () => { - state.picking = false; - }; - - return { - ...toRefs(state), - columnsType, - columnsList, - columnFieldNames, - cancel, - changeHandler, - confirmHandler, - defaultValues, - defaultIndexes, - tileChange, - handlePickstart, - translate, - handlePickend, - pickerViewStyles, - pxCheck - }; - } -}; diff --git a/src/packages/__VUE/picker/index.taro.vue b/src/packages/__VUE/picker/index.taro.vue index ac25e2cb3b..341e27cc14 100644 --- a/src/packages/__VUE/picker/index.taro.vue +++ b/src/packages/__VUE/picker/index.taro.vue @@ -42,7 +42,7 @@ - + From 2a8b4ad675007ae4fac16804f5ddcb4cd7cb96f4 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Sat, 9 Dec 2023 00:43:34 +0800 Subject: [PATCH 05/23] refactor(checkbox): modify to gen better dts (#2721) --- .../__VUE/checkbox/__tests__/checkbox.spec.ts | 2 +- src/packages/__VUE/checkbox/common.ts | 185 ----------------- src/packages/__VUE/checkbox/index.taro.vue | 186 +++++++++++++++++- src/packages/__VUE/checkbox/index.vue | 186 +++++++++++++++++- 4 files changed, 367 insertions(+), 192 deletions(-) delete mode 100644 src/packages/__VUE/checkbox/common.ts diff --git a/src/packages/__VUE/checkbox/__tests__/checkbox.spec.ts b/src/packages/__VUE/checkbox/__tests__/checkbox.spec.ts index d937d10a1c..70e1deb3b1 100644 --- a/src/packages/__VUE/checkbox/__tests__/checkbox.spec.ts +++ b/src/packages/__VUE/checkbox/__tests__/checkbox.spec.ts @@ -5,7 +5,7 @@ import { reactive, toRefs } from 'vue'; test('basic usage', () => { const wrapper = mount(Checkbox, { props: { - modelValue: '', + modelValue: true, label: '复选框' } }); diff --git a/src/packages/__VUE/checkbox/common.ts b/src/packages/__VUE/checkbox/common.ts deleted file mode 100644 index 02abbf5032..0000000000 --- a/src/packages/__VUE/checkbox/common.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { h, computed, inject, getCurrentInstance, onMounted, reactive, watch, Component, onBeforeUnmount } from 'vue'; -import { pxCheck } from '@/packages/utils/pxCheck'; -import { CHECKBOX_KEY } from './types'; - -export const component = (componentName: string, components: Record): any => { - return { - components: components, - props: { - modelValue: { - type: Boolean, - default: false - }, - disabled: { - type: Boolean, - default: false - }, - textPosition: { - type: String, - default: 'right' - }, - iconSize: { - type: [String, Number], - default: '' - }, - label: { - type: String, - default: '' - }, - indeterminate: { - type: Boolean, - default: false - }, - shape: { - type: String, - default: 'round' // button - } - }, - emits: ['change', 'update:modelValue'], - setup(props: any, { emit, slots }: any) { - const parent: any = inject(CHECKBOX_KEY, null); - const state = reactive({ - partialSelect: props.indeterminate - }); - - const hasParent = computed(() => !!parent); - - const pValue = computed(() => { - if (hasParent.value) { - return parent.value.value.includes(props.label); - } else { - return props.modelValue; - } - }); - - const pDisabled = computed(() => { - return hasParent.value ? (parent.disabled.value ? parent.disabled.value : props.disabled) : props.disabled; - }); - - const checked = computed(() => !!props.modelValue); - - const color = computed(() => { - return !pDisabled.value - ? state.partialSelect - ? 'nut-checkbox__icon--indeterminate' - : !pValue.value - ? 'nut-checkbox__icon--unchecked' - : 'nut-checkbox__icon' - : 'nut-checkbox__icon--disable'; - }); - - let updateType = ''; - - const emitChange = (value: string | boolean, label?: string) => { - updateType = 'click'; - emit('update:modelValue', value); - emit('change', value, label); - }; - - watch( - () => props.modelValue, - (v) => { - if (updateType == 'click') { - updateType = ''; - } else { - emit('change', v); - } - } - ); - - const renderIcon = () => { - const { iconSize } = props; - const iconNodeMap = { - CheckNormal: slots.icon ? slots.icon : components.CheckNormal, - Checked: slots.checkedIcon ? slots.checkedIcon : components.Checked, - CheckDisabled: slots.indeterminate ? slots.indeterminate : components.CheckDisabled - }; - const iconNode = state.partialSelect - ? iconNodeMap.CheckDisabled - : !pValue.value - ? iconNodeMap.CheckNormal - : iconNodeMap.Checked; - const size = pxCheck(iconSize); - return h(iconNode, { - width: size, - height: size, - size: size, - class: color.value - }); - }; - - const renderLabel = () => { - return h( - 'view', - { - class: `${componentName}__label ${pDisabled.value ? `${componentName}__label--disabled` : ''}` - }, - slots.default?.() - ); - }; - - const renderButton = () => { - return h( - 'view', - { - class: `${componentName}__button ${pValue.value && `${componentName}__button--active`} ${ - pDisabled.value ? `${componentName}__button--disabled` : '' - }` - }, - slots.default?.() - ); - }; - - const handleClick = () => { - if (pDisabled.value) return; - if (checked.value && state.partialSelect) { - state.partialSelect = false; - emitChange(checked.value, slots.default?.()[0].children as string); - return; - } - emitChange(!checked.value, slots.default?.()[0].children as string); - if (hasParent.value) { - const value = parent.value.value; - const max = parent.max.value; - const { label } = props; - const index = value.indexOf(label); - if (index > -1) { - value.splice(index, 1); - } else if (index <= -1 && (value.length < max || !max)) { - value.push(label); - } - parent.updateValue(value); - } - }; - - onMounted(() => { - hasParent.value && parent.link(getCurrentInstance()); - }); - - onBeforeUnmount(() => { - hasParent.value && parent.unlink(getCurrentInstance()); - }); - - watch( - () => props.indeterminate, - (newVal) => { - state.partialSelect = newVal; - } - ); - - return () => { - return h( - 'view', - { - class: `${componentName} ${componentName}--${props.shape} ${ - props.textPosition === 'left' ? `${componentName}--reverse` : '' - }`, - - onClick: handleClick - }, - [props.shape == 'button' ? renderButton() : [renderIcon(), renderLabel()]] - ); - }; - } - }; -}; diff --git a/src/packages/__VUE/checkbox/index.taro.vue b/src/packages/__VUE/checkbox/index.taro.vue index 3c3212678b..ac5c74111c 100644 --- a/src/packages/__VUE/checkbox/index.taro.vue +++ b/src/packages/__VUE/checkbox/index.taro.vue @@ -1,8 +1,188 @@ diff --git a/src/packages/__VUE/checkbox/index.vue b/src/packages/__VUE/checkbox/index.vue index bc392d1ebc..1e5feb6341 100644 --- a/src/packages/__VUE/checkbox/index.vue +++ b/src/packages/__VUE/checkbox/index.vue @@ -1,8 +1,188 @@ From d6f0eadd9a49ba263905a52a7aa6296c8afc8378 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Sat, 9 Dec 2023 02:49:27 +0800 Subject: [PATCH 06/23] chore(collapse): upd type of props.modelValue (#2723) --- src/packages/__VUE/collapse/index.taro.vue | 4 ++-- src/packages/__VUE/collapse/index.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/__VUE/collapse/index.taro.vue b/src/packages/__VUE/collapse/index.taro.vue index b9f10d72d2..8461f746f5 100644 --- a/src/packages/__VUE/collapse/index.taro.vue +++ b/src/packages/__VUE/collapse/index.taro.vue @@ -4,14 +4,14 @@ diff --git a/packages/nutui-taro-demo/src/basic/pages/button/index.vue b/packages/nutui-taro-demo/src/basic/pages/button/index.vue index c7def20a9c..aa72797f47 100644 --- a/packages/nutui-taro-demo/src/basic/pages/button/index.vue +++ b/packages/nutui-taro-demo/src/basic/pages/button/index.vue @@ -1,105 +1,78 @@ diff --git a/packages/nutui-taro-demo/src/layout/pages/layout/flex.vue b/packages/nutui-taro-demo/src/layout/pages/layout/flex.vue new file mode 100644 index 0000000000..187fa2fe10 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/layout/flex.vue @@ -0,0 +1,81 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/layout/gap.vue b/packages/nutui-taro-demo/src/layout/pages/layout/gap.vue new file mode 100644 index 0000000000..ca858edea6 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/layout/gap.vue @@ -0,0 +1,26 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/layout/index.vue b/packages/nutui-taro-demo/src/layout/pages/layout/index.vue index 2aa1711783..22606b2f1a 100644 --- a/packages/nutui-taro-demo/src/layout/pages/layout/index.vue +++ b/packages/nutui-taro-demo/src/layout/pages/layout/index.vue @@ -1,144 +1,31 @@ - +}); + diff --git a/src/packages/__VUE/layout/demo.vue b/src/packages/__VUE/layout/demo.vue deleted file mode 100644 index fad4039de3..0000000000 --- a/src/packages/__VUE/layout/demo.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - - - diff --git a/src/packages/__VUE/layout/demo/basic.vue b/src/packages/__VUE/layout/demo/basic.vue new file mode 100644 index 0000000000..dbea259e50 --- /dev/null +++ b/src/packages/__VUE/layout/demo/basic.vue @@ -0,0 +1,53 @@ + + diff --git a/src/packages/__VUE/layout/demo/flex.vue b/src/packages/__VUE/layout/demo/flex.vue new file mode 100644 index 0000000000..187fa2fe10 --- /dev/null +++ b/src/packages/__VUE/layout/demo/flex.vue @@ -0,0 +1,81 @@ + + diff --git a/src/packages/__VUE/layout/demo/gap.vue b/src/packages/__VUE/layout/demo/gap.vue new file mode 100644 index 0000000000..ca858edea6 --- /dev/null +++ b/src/packages/__VUE/layout/demo/gap.vue @@ -0,0 +1,26 @@ + + diff --git a/src/packages/__VUE/layout/demo/index.vue b/src/packages/__VUE/layout/demo/index.vue new file mode 100644 index 0000000000..4e4695d9e7 --- /dev/null +++ b/src/packages/__VUE/layout/demo/index.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/packages/__VUE/layout/doc.en-US.md b/src/packages/__VUE/layout/doc.en-US.md index 45d2033244..f56dc7d50c 100644 --- a/src/packages/__VUE/layout/doc.en-US.md +++ b/src/packages/__VUE/layout/doc.en-US.md @@ -19,245 +19,43 @@ app.use(Col); The Layout component provides a 24-column grid, by adding the span attribute on Col to set the percentage of the width of the column. The offset attribute can set the offset width of the column, and the calculation method is the same as span. -:::demo - -```vue - - -``` - -::: +> demo: layout basic ### Column spacing -:::demo - -```vue - - -``` - -::: +> demo: layout gap ### Flex layout -:::demo - -```vue - - -``` - -::: +> demo: layout flex ## API ### Row Props -| Attribute | Description | Type | Default | -| --------- | ------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------ | -| type | layout method, optional value is `flex` | string | `-` | -| gutter | spacing between column elements (`px`) | string \| number | `-` | -| justify | Flex main axis alignment, optional values are `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | -| align | Flex cross axis alignment, optional values are `flex-start` `center` `flex-end` | string | `flex-start` | -| flex-wrap | Whether flex wraps, optional values are `nowrap` `wrap` `reverse` | string | `nowrap` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| type | layout method, optional value is `flex` | string | `-` | +| gutter | spacing between column elements (`px`) | string \| number | `-` | +| justify | Flex main axis alignment, optional values are `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | +| align | Flex cross axis alignment, optional values are `flex-start` `center` `flex-end` | string | `flex-start` | +| flex-wrap | Whether flex wraps, optional values are `nowrap` `wrap` `reverse` | string | `nowrap` | ### Col Props -| Attribute | Description | Type | Default | -| --------- | --------------------------------------------------------------------------------------------------------------------- | ---------------- | ------- | -| span | column element width (divided into 24 parts in total, for example, if there are 3 in a row, then the span value is 8) | string \| number | `24` | -| offset | column element offset distance | string \| number | `0` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| span | column element width (divided into 24 parts in total, for example, if there are 3 in a row, then the span value is 8) | string \| number | `24` | +| offset | column element offset distance | string \| number | `0` | ### Row Events -| Event | Description | callback parameter | -| ----- | ---------------------- | ------------------- | +| Event | Description | callback parameter | +| --- | --- | --- | | click | Triggered when clicked | `event: MouseEvent` | ### Col Events -| Event | Description | callback parameter | -| ----- | ---------------------- | ------------------- | +| Event | Description | callback parameter | +| --- | --- | --- | | click | Triggered when clicked | `event: MouseEvent` | diff --git a/src/packages/__VUE/layout/doc.md b/src/packages/__VUE/layout/doc.md index 0ffc5aa0c7..945a4fc1ea 100644 --- a/src/packages/__VUE/layout/doc.md +++ b/src/packages/__VUE/layout/doc.md @@ -19,245 +19,43 @@ app.use(Col); Layout 组件提供 24 列栅格,通过在 Col 上添加 span 属性设置列所占的宽度百分比。 offset 属性可以设置列的偏移宽度,计算方式与 span 相同。 -:::demo - -```vue - - -``` - -::: +> demo: layout basic ### 分栏间隔 -:::demo - -```vue - - -``` - -::: +> demo: layout gap ### Flex 布局 -:::demo - -```vue - - -``` - -::: +> demo: layout flex ## API ### Row Props -| 参数 | 说明 | 类型 | 默认值 | -| --------- | ------------------------------------------------------------------------------------------------ | ---------------- | ------------ | -| type | 布局方式,可选值为 `flex` | string | `-` | -| gutter | 列元素之间的间距(单位为`px`) | string \| number | `-` | -| justify | Flex 主轴对齐方式,可选值为 `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | -| align | `Flex` 交叉轴对齐方式,可选值为 `flex-start` `center` `flex-end` | string | `flex-start` | -| flex-wrap | `Flex` 是否换行,可选值为 `nowrap` `wrap` `reverse` | string | `nowrap` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| type | 布局方式,可选值为 `flex` | string | `-` | +| gutter | 列元素之间的间距(单位为`px`) | string \| number | `-` | +| justify | Flex 主轴对齐方式,可选值为 `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | +| align | `Flex` 交叉轴对齐方式,可选值为 `flex-start` `center` `flex-end` | string | `flex-start` | +| flex-wrap | `Flex` 是否换行,可选值为 `nowrap` `wrap` `reverse` | string | `nowrap` | ### Col Props -| 参数 | 说明 | 类型 | 默认值 | -| ------ | --------------------------------------------------------------- | ---------------- | ------ | -| span | 列元素宽度(共分为 24 份,例如设置一行 3 个,那么 span 值为 8) | string \| number | `24` | -| offset | 列元素偏移距离 | string \| number | `0` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| span | 列元素宽度(共分为 24 份,例如设置一行 3 个,那么 span 值为 8) | string \| number | `24` | +| offset | 列元素偏移距离 | string \| number | `0` | ### Row Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ------------------- | -| click | 点击时触发 | `event: MouseEvent` | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | `event: MouseEvent` | ### Col Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ------------------- | -| click | 点击时触发 | `event: MouseEvent` | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | `event: MouseEvent` | diff --git a/src/packages/__VUE/layout/doc.taro.md b/src/packages/__VUE/layout/doc.taro.md index 3f1f350eda..9dc703b821 100644 --- a/src/packages/__VUE/layout/doc.taro.md +++ b/src/packages/__VUE/layout/doc.taro.md @@ -19,245 +19,43 @@ app.use(Col); Layout 组件提供 24 列栅格,通过在 Col 上添加 span 属性设置列所占的宽度百分比。 offset 属性可以设置列的偏移宽度,计算方式与 span 相同。 -:::demo - -```vue - - -``` - -::: +> demo: layout basic layout ### 分栏间隔 -:::demo - -```vue - - -``` - -::: +> demo: layout gap layout ### Flex 布局 -:::demo - -```vue - - -``` - -::: +> demo: layout flex layout ## API ### Row Props -| 参数 | 说明 | 类型 | 默认值 | -| --------- | -------------------------------------------------------------------------------------------------- | ---------------- | ------------ | -| type | 布局方式,可选值为 `flex` | string | `-` | -| gutter | 列元素之间的间距(单位为 `px`) | string \| number | `-` | -| justify | `Flex` 主轴对齐方式,可选值为 `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | -| align | `Flex` 交叉轴对齐方式,可选值为 `flex-start` `center` `flex-end` | string | `flex-start` | -| flex-wrap | `Flex` 是否换行,可选值为 `nowrap` `wrap` `reverse` | string | `nowrap` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| type | 布局方式,可选值为 `flex` | string | `-` | +| gutter | 列元素之间的间距(单位为`px`) | string \| number | `-` | +| justify | Flex 主轴对齐方式,可选值为 `start` `end` `center` `space-around` `space-between` `space-evenly` | string | `start` | +| align | `Flex` 交叉轴对齐方式,可选值为 `flex-start` `center` `flex-end` | string | `flex-start` | +| flex-wrap | `Flex` 是否换行,可选值为 `nowrap` `wrap` `reverse` | string | `nowrap` | ### Col Props -| 参数 | 说明 | 类型 | 默认值 | -| ------ | ----------------------------------------------------------------- | ---------------- | ------ | -| span | 列元素宽度(共分为 24 份,例如设置一行 3 个,那么 `span` 值为 8) | string \| number | `24` | -| offset | 列元素偏移距离 | string \| number | `0` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| span | 列元素宽度(共分为 24 份,例如设置一行 3 个,那么 span 值为 8) | string \| number | `24` | +| offset | 列元素偏移距离 | string \| number | `0` | ### Row Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ------------------- | -| click | 点击时触发 | `event: MouseEvent` | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | `event: MouseEvent` | ### Col Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ------------------- | -| click | 点击时触发 | `event: MouseEvent` | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | `event: MouseEvent` | From a04aeda03ab952c7c310aafeeb52c7b5de4c3953 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 13 Dec 2023 17:51:45 +0800 Subject: [PATCH 18/23] chore(space): split demo (#2732) --- .../src/layout/pages/space/basic.vue | 8 ++ .../src/layout/pages/space/direction.vue | 8 ++ .../src/layout/pages/space/gutter.vue | 14 ++++ .../src/layout/pages/space/index.vue | 82 ++++++++----------- .../src/layout/pages/space/wrap.vue | 12 +++ src/packages/__VUE/button/demo/index.vue | 4 +- src/packages/__VUE/divider/demo/index.vue | 4 +- src/packages/__VUE/layout/demo/index.vue | 4 +- src/packages/__VUE/space/demo.vue | 70 ---------------- src/packages/__VUE/space/demo/basic.vue | 8 ++ src/packages/__VUE/space/demo/direction.vue | 8 ++ src/packages/__VUE/space/demo/gutter.vue | 14 ++++ src/packages/__VUE/space/demo/index.vue | 38 +++++++++ src/packages/__VUE/space/demo/wrap.vue | 12 +++ src/packages/__VUE/space/doc.en-US.md | 81 ++---------------- src/packages/__VUE/space/doc.md | 75 ++--------------- src/packages/__VUE/space/doc.taro.md | 75 ++--------------- src/sites/mobile/components/demo.vue | 51 ++++++++++++ src/sites/mobile/main.ts | 9 +- 19 files changed, 243 insertions(+), 334 deletions(-) create mode 100644 packages/nutui-taro-demo/src/layout/pages/space/basic.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/space/direction.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/space/gutter.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/space/wrap.vue delete mode 100644 src/packages/__VUE/space/demo.vue create mode 100644 src/packages/__VUE/space/demo/basic.vue create mode 100644 src/packages/__VUE/space/demo/direction.vue create mode 100644 src/packages/__VUE/space/demo/gutter.vue create mode 100644 src/packages/__VUE/space/demo/index.vue create mode 100644 src/packages/__VUE/space/demo/wrap.vue create mode 100644 src/sites/mobile/components/demo.vue diff --git a/packages/nutui-taro-demo/src/layout/pages/space/basic.vue b/packages/nutui-taro-demo/src/layout/pages/space/basic.vue new file mode 100644 index 0000000000..caaeb8dc45 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/space/basic.vue @@ -0,0 +1,8 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/space/direction.vue b/packages/nutui-taro-demo/src/layout/pages/space/direction.vue new file mode 100644 index 0000000000..8c1131831e --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/space/direction.vue @@ -0,0 +1,8 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/space/gutter.vue b/packages/nutui-taro-demo/src/layout/pages/space/gutter.vue new file mode 100644 index 0000000000..bc427f9d9c --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/space/gutter.vue @@ -0,0 +1,14 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/space/index.vue b/packages/nutui-taro-demo/src/layout/pages/space/index.vue index b64352762c..edd0049882 100644 --- a/packages/nutui-taro-demo/src/layout/pages/space/index.vue +++ b/packages/nutui-taro-demo/src/layout/pages/space/index.vue @@ -1,50 +1,38 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/space/wrap.vue b/packages/nutui-taro-demo/src/layout/pages/space/wrap.vue new file mode 100644 index 0000000000..0ea1d11a62 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/space/wrap.vue @@ -0,0 +1,12 @@ + diff --git a/src/packages/__VUE/button/demo/index.vue b/src/packages/__VUE/button/demo/index.vue index b00f406dd8..33e82fa288 100644 --- a/src/packages/__VUE/button/demo/index.vue +++ b/src/packages/__VUE/button/demo/index.vue @@ -1,5 +1,5 @@ diff --git a/src/packages/__VUE/space/demo/basic.vue b/src/packages/__VUE/space/demo/basic.vue new file mode 100644 index 0000000000..caaeb8dc45 --- /dev/null +++ b/src/packages/__VUE/space/demo/basic.vue @@ -0,0 +1,8 @@ + diff --git a/src/packages/__VUE/space/demo/direction.vue b/src/packages/__VUE/space/demo/direction.vue new file mode 100644 index 0000000000..8c1131831e --- /dev/null +++ b/src/packages/__VUE/space/demo/direction.vue @@ -0,0 +1,8 @@ + diff --git a/src/packages/__VUE/space/demo/gutter.vue b/src/packages/__VUE/space/demo/gutter.vue new file mode 100644 index 0000000000..bc427f9d9c --- /dev/null +++ b/src/packages/__VUE/space/demo/gutter.vue @@ -0,0 +1,14 @@ + diff --git a/src/packages/__VUE/space/demo/index.vue b/src/packages/__VUE/space/demo/index.vue new file mode 100644 index 0000000000..be8b068d33 --- /dev/null +++ b/src/packages/__VUE/space/demo/index.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/packages/__VUE/space/demo/wrap.vue b/src/packages/__VUE/space/demo/wrap.vue new file mode 100644 index 0000000000..0ea1d11a62 --- /dev/null +++ b/src/packages/__VUE/space/demo/wrap.vue @@ -0,0 +1,12 @@ + diff --git a/src/packages/__VUE/space/doc.en-US.md b/src/packages/__VUE/space/doc.en-US.md index 227de88d9f..1cdcd4ffb0 100644 --- a/src/packages/__VUE/space/doc.en-US.md +++ b/src/packages/__VUE/space/doc.en-US.md @@ -18,92 +18,29 @@ app.use(Space); The Space component sets a certain spacing between the subcomponents, the default spacing is 8px. -:::demo - -```vue - -``` +> demo: space basic ::: -### Direction +### Custom Direction By setting the direction property to vertical, you can set the spacing of the vertical alignment. -:::demo - -```vue - -``` +> demo: space direction -::: - -### Custom Spacing +### Custom gutter Control the size of the spacing by adjusting the gutter value. When the number type is passed, px units are used by default; You can also pass in a string, such as a value with units like 2rem or 5vw. -You can also set css variables -nut-space-gap control, priority: gutter>css Variables > Default Style. - -:::demo - -```vue - -``` -::: +You can also set css variables `-nut-space-gap`, priority: property > css Variables > Default Style. -### word wrap +> demo: space gutter -In horizontal mode, the wrap property controls whether child elements are wrapped automatically. +### Word wrap -:::demo - -```vue - -``` +In horizontal mode, the wrap property controls whether child elements are wrapped automatically. -::: +> demo: space wrap ### Props diff --git a/src/packages/__VUE/space/doc.md b/src/packages/__VUE/space/doc.md index 045d7c6b1c..d0ade908ac 100644 --- a/src/packages/__VUE/space/doc.md +++ b/src/packages/__VUE/space/doc.md @@ -18,18 +18,7 @@ app.use(Space); Space 组件会在各个子组件之间设置一定的间距,默认间距为 8px。 -:::demo - -```vue - -``` +> demo: space basic ::: @@ -37,73 +26,21 @@ Space 组件会在各个子组件之间设置一定的间距,默认间距为 8 将 direction 属性设置为 vertical,可以设置垂直方向排列的间距。 -:::demo - -```vue - -``` - -::: +> demo: space direction ### 自定义间距 通过调整 gutter 的值来控制间距的大小。传入 number 类型时,会默认使用 px 单位;也可以传入 string 类型,比如 2rem 或 5vw 等带有单位的值。 -也可以设置css变量--nut-space-gap控制,优先级:gutter>css变量>默认样式 - -:::demo - -```vue - -``` -::: +也可以设置 css 变量 `--nut-space-gap` 控制,优先级:属性 > css 变量 > 默认样式。 + +> demo: space gutter ### 自动换行 在水平模式下, 通过 wrap 属性来控制子元素是否自动换行。 -:::demo - -```vue - -``` - -::: +> demo: space wrap ### Props diff --git a/src/packages/__VUE/space/doc.taro.md b/src/packages/__VUE/space/doc.taro.md index 3f7d3b5f17..f5684c295c 100644 --- a/src/packages/__VUE/space/doc.taro.md +++ b/src/packages/__VUE/space/doc.taro.md @@ -18,18 +18,7 @@ app.use(Space); Space 组件会在各个子组件之间设置一定的间距,默认间距为 8px。 -:::demo - -```vue - -``` +> demo: space basic layout ::: @@ -37,73 +26,21 @@ Space 组件会在各个子组件之间设置一定的间距,默认间距为 8 将 direction 属性设置为 vertical,可以设置垂直方向排列的间距。 -:::demo - -```vue - -``` - -::: +> demo: space direction layout ### 自定义间距 通过调整 gutter 的值来控制间距的大小。传入 number 类型时,会默认使用 px 单位;也可以传入 string 类型,比如 2rem 或 5vw 等带有单位的值。 -也可以设置css变量--nut-space-gap控制,优先级:gutter>css变量>默认样式 - -:::demo - -```vue - -``` -::: +也可以设置 css 变量 `--nut-space-gap` 控制,优先级:属性 > css 变量 > 默认样式。 + +> demo: space gutter layout ### 自动换行 在水平模式下, 通过 wrap 属性来控制子元素是否自动换行。 -:::demo - -```vue - -``` - -::: +> demo: space wrap layout ### Props diff --git a/src/sites/mobile/components/demo.vue b/src/sites/mobile/components/demo.vue new file mode 100644 index 0000000000..17ffb50ae9 --- /dev/null +++ b/src/sites/mobile/components/demo.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/sites/mobile/main.ts b/src/sites/mobile/main.ts index e9b090e019..0ea604dcfb 100644 --- a/src/sites/mobile/main.ts +++ b/src/sites/mobile/main.ts @@ -2,5 +2,12 @@ import { createApp } from 'vue'; import App from './App.vue'; import router from './router'; import NutUI from '@/packages/nutui.vue'; +import Demo from './components/demo.vue'; import '@nutui/touch-emulator'; -createApp(App).use(router).use(NutUI).mount('#app'); + +const app = createApp(App); +app.use(router); +app.use(NutUI); +app.component('Demo', Demo); + +app.mount('#app'); From 282de6ede83513ab77ed2f3ce9f8db4a9f003816 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 13 Dec 2023 20:17:29 +0800 Subject: [PATCH 19/23] chore(sticky): split demo (#2733) --- .../src/layout/pages/sticky/basic.vue | 5 ++ .../src/layout/pages/sticky/index.vue | 32 ++++--- .../src/layout/pages/sticky/top.vue | 6 ++ src/packages/__VUE/sticky/demo.vue | 45 ---------- src/packages/__VUE/sticky/demo/basic.vue | 5 ++ src/packages/__VUE/sticky/demo/bottom.vue | 7 ++ src/packages/__VUE/sticky/demo/container.vue | 13 +++ src/packages/__VUE/sticky/demo/index.vue | 37 ++++++++ src/packages/__VUE/sticky/demo/top.vue | 5 ++ src/packages/__VUE/sticky/doc.en-US.md | 86 ++++--------------- src/packages/__VUE/sticky/doc.md | 80 +++-------------- src/packages/__VUE/sticky/doc.taro.md | 36 ++------ 12 files changed, 135 insertions(+), 222 deletions(-) create mode 100644 packages/nutui-taro-demo/src/layout/pages/sticky/basic.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/sticky/top.vue delete mode 100644 src/packages/__VUE/sticky/demo.vue create mode 100644 src/packages/__VUE/sticky/demo/basic.vue create mode 100644 src/packages/__VUE/sticky/demo/bottom.vue create mode 100644 src/packages/__VUE/sticky/demo/container.vue create mode 100644 src/packages/__VUE/sticky/demo/index.vue create mode 100644 src/packages/__VUE/sticky/demo/top.vue diff --git a/packages/nutui-taro-demo/src/layout/pages/sticky/basic.vue b/packages/nutui-taro-demo/src/layout/pages/sticky/basic.vue new file mode 100644 index 0000000000..5644a73522 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/sticky/basic.vue @@ -0,0 +1,5 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/sticky/index.vue b/packages/nutui-taro-demo/src/layout/pages/sticky/index.vue index fd69fc841d..d3264c0b09 100644 --- a/packages/nutui-taro-demo/src/layout/pages/sticky/index.vue +++ b/packages/nutui-taro-demo/src/layout/pages/sticky/index.vue @@ -1,13 +1,25 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/sticky/top.vue b/packages/nutui-taro-demo/src/layout/pages/sticky/top.vue new file mode 100644 index 0000000000..4918dddba2 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/sticky/top.vue @@ -0,0 +1,6 @@ + diff --git a/src/packages/__VUE/sticky/demo.vue b/src/packages/__VUE/sticky/demo.vue deleted file mode 100644 index 0cbe5d8c58..0000000000 --- a/src/packages/__VUE/sticky/demo.vue +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/src/packages/__VUE/sticky/demo/basic.vue b/src/packages/__VUE/sticky/demo/basic.vue new file mode 100644 index 0000000000..5644a73522 --- /dev/null +++ b/src/packages/__VUE/sticky/demo/basic.vue @@ -0,0 +1,5 @@ + diff --git a/src/packages/__VUE/sticky/demo/bottom.vue b/src/packages/__VUE/sticky/demo/bottom.vue new file mode 100644 index 0000000000..f05504a2b7 --- /dev/null +++ b/src/packages/__VUE/sticky/demo/bottom.vue @@ -0,0 +1,7 @@ + diff --git a/src/packages/__VUE/sticky/demo/container.vue b/src/packages/__VUE/sticky/demo/container.vue new file mode 100644 index 0000000000..64ab317df4 --- /dev/null +++ b/src/packages/__VUE/sticky/demo/container.vue @@ -0,0 +1,13 @@ + + diff --git a/src/packages/__VUE/sticky/demo/index.vue b/src/packages/__VUE/sticky/demo/index.vue new file mode 100644 index 0000000000..fe0eab6604 --- /dev/null +++ b/src/packages/__VUE/sticky/demo/index.vue @@ -0,0 +1,37 @@ + + diff --git a/src/packages/__VUE/sticky/demo/top.vue b/src/packages/__VUE/sticky/demo/top.vue new file mode 100644 index 0000000000..4468ad085e --- /dev/null +++ b/src/packages/__VUE/sticky/demo/top.vue @@ -0,0 +1,5 @@ + diff --git a/src/packages/__VUE/sticky/doc.en-US.md b/src/packages/__VUE/sticky/doc.en-US.md index 60ddd17755..eeb5d7c16d 100644 --- a/src/packages/__VUE/sticky/doc.en-US.md +++ b/src/packages/__VUE/sticky/doc.en-US.md @@ -16,88 +16,34 @@ app.use(Sticky); ### Basic Usage -:::demo - -```vue - -``` - -::: - -### Ceiling distance - -:::demo +> demo: sticky basic -```vue - -``` - -::: - -### Specify container - -:::demo - -```vue - - -``` +### Top Distance -::: +> demo: sticky top -### Suction distance +### Custom Container -:::demo +> demo: sticky container -```vue - -``` +### Bottom Distance -::: +> demo: sticky bottom ## API ### Props -| Attribute | Description | Type | Default | -| --------- | ------------------------------------------------- | ------- | ------- | -| position | Adsorption position(`top`、`bottom`) | string | `top` | -| top | Ceiling distance, enable when `position = top` | number | `0` | -| bottom | Suction distance, enable when `position = bottom` | number | `0` | -| container | The 'HTML' node of the container | Element | - | -| z-index | Level of adsorption | number | `99` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| position | Adsorption position(`top`、`bottom`) | string | `top` | +| top | Ceiling distance, enable when `position = top` | number | `0` | +| bottom | Suction distance, enable when `position = bottom` | number | `0` | +| container | The 'HTML' node of the container | Element | - | +| z-index | Level of adsorption | number | `99` | ### Events -| Event | Description | Arguments | -| ------ | ------------------------------------------- | ---------------- | +| Event | Description | Arguments | +| --- | --- | --- | | change | Triggered when the adsorption state changes | `fixed: boolean` | diff --git a/src/packages/__VUE/sticky/doc.md b/src/packages/__VUE/sticky/doc.md index d006d13895..7fc0ec20ec 100644 --- a/src/packages/__VUE/sticky/doc.md +++ b/src/packages/__VUE/sticky/doc.md @@ -16,88 +16,34 @@ app.use(Sticky); ### 基础用法 -:::demo - -```vue - -``` - -::: +> demo: sticky basic ### 吸顶距离 -:::demo - -```vue - -``` - -::: +> demo: sticky top ### 指定容器 -:::demo - -```vue - - -``` - -::: +> demo: sticky container ### 吸底距离 -:::demo - -```vue - -``` - -::: +> demo: sticky bottom ## API ### Props -| 参数 | 说明 | 类型 | 默认值 | -| --------- | --------------------------------------- | ------- | ------ | -| position | 吸附位置(`top`、`bottom`) | string | `top` | -| top | 吸顶距离,`position` 为 `top` 时生效 | number | `0` | -| bottom | 吸底距离,`position` 为 `bottom` 时生效 | number | `0` | -| container | 容器的 `HTML` 节点 | Element | - | -| z-index | 吸附时的层级 | number | `99` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| position | 吸附位置(`top`、`bottom`) | string | `top` | +| top | 吸顶距离,`position` 为 `top` 时生效 | number | `0` | +| bottom | 吸底距离,`position` 为 `bottom` 时生效 | number | `0` | +| container | 容器的 `HTML` 节点 | Element | - | +| z-index | 吸附时的层级 | number | `99` | ### Events -| 事件名 | 说明 | 回调参数 | -| ------ | ------------------ | ---------------- | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | | change | 吸附状态改变时触发 | `fixed: boolean` | diff --git a/src/packages/__VUE/sticky/doc.taro.md b/src/packages/__VUE/sticky/doc.taro.md index bebf40d994..82aefe4cb7 100644 --- a/src/packages/__VUE/sticky/doc.taro.md +++ b/src/packages/__VUE/sticky/doc.taro.md @@ -16,41 +16,17 @@ app.use(Sticky); ### 基础用法 -:::demo - -```vue - -``` - -::: +> demo: sticky basic layout ### 吸顶距离 -:::demo - -```vue - -``` - -::: +> demo: sticky top layout ## API ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ------- | ------------ | ------ | ------ | -| top | 吸顶距离 | number | `0` | -| z-index | 吸附时的层级 | number | `99` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| top | 吸顶距离 | number | `0` | +| z-index | 吸附时的层级 | number | `99` | From 839ae9e5a48faf0785885b2bd77d08178150cb2d Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 13 Dec 2023 22:10:51 +0800 Subject: [PATCH 20/23] chore(grid): split demo (#2734) --- .../src/layout/pages/grid/basic.vue | 15 ++ .../src/layout/pages/grid/column.vue | 10 + .../src/layout/pages/grid/content.vue | 11 + .../src/layout/pages/grid/gutter.vue | 15 ++ .../src/layout/pages/grid/horizontal.vue | 11 + .../src/layout/pages/grid/index.vue | 120 ++++----- .../src/layout/pages/grid/reverse.vue | 11 + .../src/layout/pages/grid/square.vue | 10 + src/packages/__VUE/grid/demo.vue | 186 -------------- src/packages/__VUE/grid/demo/basic.vue | 15 ++ src/packages/__VUE/grid/demo/column.vue | 10 + src/packages/__VUE/grid/demo/content.vue | 11 + src/packages/__VUE/grid/demo/gutter.vue | 15 ++ src/packages/__VUE/grid/demo/horizontal.vue | 11 + src/packages/__VUE/grid/demo/index.vue | 58 +++++ src/packages/__VUE/grid/demo/reverse.vue | 11 + src/packages/__VUE/grid/demo/square.vue | 10 + src/packages/__VUE/grid/doc.en-US.md | 230 +++-------------- src/packages/__VUE/grid/doc.md | 232 +++--------------- src/packages/__VUE/grid/doc.taro.md | 207 +++------------- 20 files changed, 371 insertions(+), 828 deletions(-) create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/basic.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/column.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/content.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/gutter.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/horizontal.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/reverse.vue create mode 100644 packages/nutui-taro-demo/src/layout/pages/grid/square.vue delete mode 100644 src/packages/__VUE/grid/demo.vue create mode 100644 src/packages/__VUE/grid/demo/basic.vue create mode 100644 src/packages/__VUE/grid/demo/column.vue create mode 100644 src/packages/__VUE/grid/demo/content.vue create mode 100644 src/packages/__VUE/grid/demo/gutter.vue create mode 100644 src/packages/__VUE/grid/demo/horizontal.vue create mode 100644 src/packages/__VUE/grid/demo/index.vue create mode 100644 src/packages/__VUE/grid/demo/reverse.vue create mode 100644 src/packages/__VUE/grid/demo/square.vue diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/basic.vue b/packages/nutui-taro-demo/src/layout/pages/grid/basic.vue new file mode 100644 index 0000000000..424c207c98 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/basic.vue @@ -0,0 +1,15 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/column.vue b/packages/nutui-taro-demo/src/layout/pages/grid/column.vue new file mode 100644 index 0000000000..9eb622a16b --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/column.vue @@ -0,0 +1,10 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/content.vue b/packages/nutui-taro-demo/src/layout/pages/grid/content.vue new file mode 100644 index 0000000000..01317bcc05 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/content.vue @@ -0,0 +1,11 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/gutter.vue b/packages/nutui-taro-demo/src/layout/pages/grid/gutter.vue new file mode 100644 index 0000000000..0453e29c15 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/gutter.vue @@ -0,0 +1,15 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/horizontal.vue b/packages/nutui-taro-demo/src/layout/pages/grid/horizontal.vue new file mode 100644 index 0000000000..fba24c2425 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/horizontal.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/index.vue b/packages/nutui-taro-demo/src/layout/pages/grid/index.vue index 678f9200b0..e10db41b06 100644 --- a/packages/nutui-taro-demo/src/layout/pages/grid/index.vue +++ b/packages/nutui-taro-demo/src/layout/pages/grid/index.vue @@ -1,86 +1,58 @@ + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/reverse.vue b/packages/nutui-taro-demo/src/layout/pages/grid/reverse.vue new file mode 100644 index 0000000000..8fc9f706e7 --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/reverse.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/nutui-taro-demo/src/layout/pages/grid/square.vue b/packages/nutui-taro-demo/src/layout/pages/grid/square.vue new file mode 100644 index 0000000000..25c014182f --- /dev/null +++ b/packages/nutui-taro-demo/src/layout/pages/grid/square.vue @@ -0,0 +1,10 @@ + + diff --git a/src/packages/__VUE/grid/demo.vue b/src/packages/__VUE/grid/demo.vue deleted file mode 100644 index e23c19e369..0000000000 --- a/src/packages/__VUE/grid/demo.vue +++ /dev/null @@ -1,186 +0,0 @@ - - - diff --git a/src/packages/__VUE/grid/demo/basic.vue b/src/packages/__VUE/grid/demo/basic.vue new file mode 100644 index 0000000000..424c207c98 --- /dev/null +++ b/src/packages/__VUE/grid/demo/basic.vue @@ -0,0 +1,15 @@ + + diff --git a/src/packages/__VUE/grid/demo/column.vue b/src/packages/__VUE/grid/demo/column.vue new file mode 100644 index 0000000000..9eb622a16b --- /dev/null +++ b/src/packages/__VUE/grid/demo/column.vue @@ -0,0 +1,10 @@ + + diff --git a/src/packages/__VUE/grid/demo/content.vue b/src/packages/__VUE/grid/demo/content.vue new file mode 100644 index 0000000000..01317bcc05 --- /dev/null +++ b/src/packages/__VUE/grid/demo/content.vue @@ -0,0 +1,11 @@ + diff --git a/src/packages/__VUE/grid/demo/gutter.vue b/src/packages/__VUE/grid/demo/gutter.vue new file mode 100644 index 0000000000..0453e29c15 --- /dev/null +++ b/src/packages/__VUE/grid/demo/gutter.vue @@ -0,0 +1,15 @@ + + diff --git a/src/packages/__VUE/grid/demo/horizontal.vue b/src/packages/__VUE/grid/demo/horizontal.vue new file mode 100644 index 0000000000..fba24c2425 --- /dev/null +++ b/src/packages/__VUE/grid/demo/horizontal.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/grid/demo/index.vue b/src/packages/__VUE/grid/demo/index.vue new file mode 100644 index 0000000000..57c30c2c6e --- /dev/null +++ b/src/packages/__VUE/grid/demo/index.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/packages/__VUE/grid/demo/reverse.vue b/src/packages/__VUE/grid/demo/reverse.vue new file mode 100644 index 0000000000..8fc9f706e7 --- /dev/null +++ b/src/packages/__VUE/grid/demo/reverse.vue @@ -0,0 +1,11 @@ + + diff --git a/src/packages/__VUE/grid/demo/square.vue b/src/packages/__VUE/grid/demo/square.vue new file mode 100644 index 0000000000..25c014182f --- /dev/null +++ b/src/packages/__VUE/grid/demo/square.vue @@ -0,0 +1,10 @@ + + diff --git a/src/packages/__VUE/grid/doc.en-US.md b/src/packages/__VUE/grid/doc.en-US.md index 82f508774f..ba11fddeee 100644 --- a/src/packages/__VUE/grid/doc.en-US.md +++ b/src/packages/__VUE/grid/doc.en-US.md @@ -17,228 +17,64 @@ app.use(GridItem); ### Basic Usage -:::demo - -```vue - - -``` - -::: +> demo: grid basic ### Column Num -:::demo - -```vue - - -``` - -::: +> demo: grid column ### Square -:::demo - -```vue - - -``` - -::: +> demo: grid square ### Gutter -:::demo - -```vue - - -``` - -::: +> demo: grid gutter ### Reverse -:::demo - -```vue - - -``` - -::: +> demo: grid reverse ### Horizontal -:::demo - -```vue - - -``` - -::: - -### Icon Style - -:::demo - -```vue - - -``` - -::: - -### Route - -:::demo - -```vue - - -``` - -::: +> demo: grid horizontal ### Custom Content -:::demo - -```vue - -``` - -::: +> demo: grid content ## API ### Grid Props -| Attribute | Description | Type | 默认值 | -| ---------- | --------------------------------------------------------- | ---------------- | ---------- | -| column-num | Column Num | number \| string | `4` | -| border | Whether to show border | boolean | `true` | -| gutter | Gutter,The default unit is `px` | number \| string | `0` | -| center | Whether to center content | boolean | `true` | -| square | Whether to be square shape | boolean | `false` | -| reverse | Whether to reverse the position of icon and text | boolean | `false` | -| direction | Content arrangement direction, can be set to `horizontal` | string | `vertical` | -| clickable | Whether to show click feedback when clicked | boolean | `false` | +| Attribute | Description | Type | 默认值 | +| --- | --- | --- | --- | +| column-num | Column Num | number \| string | `4` | +| border | Whether to show border | boolean | `true` | +| gutter | Gutter,The default unit is `px` | number \| string | `0` | +| center | Whether to center content | boolean | `true` | +| square | Whether to be square shape | boolean | `false` | +| reverse | Whether to reverse the position of icon and text | boolean | `false` | +| direction | Content arrangement direction, can be set to `horizontal` | string | `vertical` | +| clickable | Whether to show click feedback when clicked | boolean | `false` | ### GridItem Props -| Attribute | Description | Type | Default | -| --------- | ----------------------------------------------------------------------------------------- | ---------------- | ------- | -| text | text | string | - | -| url | Link URL | string | `''` | -| to | Target route of the link, same as [to](https://router.vuejs.org/zh/api/#to) of vue-router | string \| object | - | -| replace | If true, the navigation will not leave a history record | boolean | `false` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| text | text | string | - | ### GridItem Slots -| Name | Description | -| ------- | -------------- | +| Name | Description | +| --- | --- | | default | Custom content | -| text | Custom text | +| text | Custom text | ### GridItem Events -| Event | Description | Arguments | -| ----- | --------------------------------- | ------------ | +| Event | Description | Arguments | +| --- | --- | --- | | click | Emitted when component is clicked | event: Event | ## Theming @@ -247,11 +83,11 @@ import { Home, Search } from '@nutui/icons-vue'; The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| -------------------------------- | ------------------------- | -| --nut-grid-border-color | _#f5f6f7_ | -| --nut-grid-item-content-padding | _16px 8px_ | -| --nut-grid-item-content-bg-color | _var(--nut-white)_ | -| --nut-grid-item-text-margin | _8px_ | -| --nut-grid-item-text-color | _var(--nut-title-color2)_ | -| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | +| Name | Default Value | +| --- | --- | +| --nut-grid-border-color | _#f5f6f7_ | +| --nut-grid-item-content-padding | _16px 8px_ | +| --nut-grid-item-content-bg-color | _var(--nut-white)_ | +| --nut-grid-item-text-margin | _8px_ | +| --nut-grid-item-text-color | _var(--nut-title-color2)_ | +| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | diff --git a/src/packages/__VUE/grid/doc.md b/src/packages/__VUE/grid/doc.md index 65555a9c49..4b47a31c97 100644 --- a/src/packages/__VUE/grid/doc.md +++ b/src/packages/__VUE/grid/doc.md @@ -17,229 +17,65 @@ app.use(GridItem); ### 基础用法 -:::demo - -```vue - - -``` - -::: +> demo: grid basic ### 自定义列数 -:::demo - -```vue - - -``` - -::: +> demo: grid column ### 正方形格子 -:::demo - -```vue - - -``` - -::: +> demo: grid square ### 格子间距 -:::demo - -```vue - - -``` - -::: +> demo: grid gutter ### 内容翻转 -:::demo - -```vue - - -``` - -::: +> demo: grid reverse ### 内容横向 -:::demo - -```vue - - -``` - -::: - -### 图标颜色/大小 - -:::demo - -```vue - - -``` - -::: - -### 页面导航 - -:::demo - -```vue - - -``` - -::: +> demo: grid horizontal ### 自定义内容 -:::demo - -```vue - -``` - -::: +> demo: grid content ## API ### Grid Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------- | ----------------------------------------- | ---------------- | ---------- | -| column-num | 列数 | number \| string | `4` | -| border | 是否显示边框 | boolean | `true` | -| gutter | 格子之间的间距,默认单位为 `px` | number \| string | `0` | -| center | 是否将格子内容居中显示 | boolean | `true` | -| square | 是否将格子固定为正方形 | boolean | `false` | -| reverse | 内容翻转 | boolean | `false` | -| direction | 格子内容排列的方向,可选值为 `horizontal` | string | `vertical` | -| clickable | 是否开启格子点击反馈 | boolean | `false` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| column-num | 列数 | number \| string | `4` | +| border | 是否显示边框 | boolean | `true` | +| gutter | 格子之间的间距,默认单位为 `px` | number \| string | `0` | +| center | 是否将格子内容居中显示 | boolean | `true` | +| square | 是否将格子固定为正方形 | boolean | `false` | +| reverse | 内容翻转 | boolean | `false` | +| direction | 格子内容排列的方向,可选值为 `horizontal` | string | `vertical` | +| clickable | 是否开启格子点击反馈 | boolean | `false` | ### GridItem Props -| 参数 | 说明 | 类型 | 默认值 | -| ------- | ---------------------------------------------------------------------------------------------- | ---------------- | ------- | -| text | 文字 | string | - | -| url | 点击后跳转的链接地址 | string | `''` | -| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) 属性 | string \| object | - | -| replace | 是否在跳转时替换当前页面历史 | boolean | `false` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| text | 文字 | string | - | ### GridItem Slots -| 名称 | 说明 | -| ------- | -------------- | +| 名称 | 说明 | +| --- | --- | | default | 自定义所有内容 | -| text | 自定义文字 | +| text | 自定义文字 | ### GridItem Events -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | ------------ | -| click | 点击格子时触发 | event: Event | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击格子时触发 | event: Event | ## 主题定制 @@ -247,11 +83,11 @@ import { Home, Search } from '@nutui/icons-vue'; 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| -------------------------------- | ------------------------- | -| --nut-grid-border-color | _#f5f6f7_ | -| --nut-grid-item-content-padding | _16px 8px_ | -| --nut-grid-item-content-bg-color | _var(--nut-white)_ | -| --nut-grid-item-text-margin | _8px_ | -| --nut-grid-item-text-color | _var(--nut-title-color2)_ | -| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-grid-border-color | _#f5f6f7_ | +| --nut-grid-item-content-padding | _16px 8px_ | +| --nut-grid-item-content-bg-color | _var(--nut-white)_ | +| --nut-grid-item-text-margin | _8px_ | +| --nut-grid-item-text-color | _var(--nut-title-color2)_ | +| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | diff --git a/src/packages/__VUE/grid/doc.taro.md b/src/packages/__VUE/grid/doc.taro.md index fb46557dee..c9fafb4e61 100644 --- a/src/packages/__VUE/grid/doc.taro.md +++ b/src/packages/__VUE/grid/doc.taro.md @@ -17,204 +17,65 @@ app.use(GridItem); ### 基础用法 -:::demo - -```vue - - -``` - -::: +> demo: grid basic ### 自定义列数 -:::demo - -```vue - - -``` - -::: +> demo: grid column ### 正方形格子 -:::demo - -```vue - - -``` - -::: +> demo: grid square ### 格子间距 -:::demo - -```vue - - -``` - -::: +> demo: grid gutter ### 内容翻转 -:::demo - -```vue - - -``` - -::: +> demo: grid reverse ### 内容横向 -:::demo - -```vue - - -``` - -::: - -### 图标颜色/大小 - -:::demo - -```vue - - -``` - -::: +> demo: grid horizontal ### 自定义内容 -:::demo - -```vue - -``` - -::: +> demo: grid content ## API ### Grid Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------- | ----------------------------------------- | ---------------- | ---------- | -| column-num | 列数 | number \| string | `4` | -| border | 是否显示边框 | boolean | `true` | -| gutter | 格子之间的间距,默认单位为 `px` | number \| string | `0` | -| center | 是否将格子内容居中显示 | boolean | `true` | -| square | 是否将格子固定为正方形 | boolean | `false` | -| reverse | 内容翻转 | boolean | `false` | -| direction | 格子内容排列的方向,可选值为 `horizontal` | string | `vertical` | -| clickable | 是否开启格子点击反馈 | boolean | `false` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| column-num | 列数 | number \| string | `4` | +| border | 是否显示边框 | boolean | `true` | +| gutter | 格子之间的间距,默认单位为 `px` | number \| string | `0` | +| center | 是否将格子内容居中显示 | boolean | `true` | +| square | 是否将格子固定为正方形 | boolean | `false` | +| reverse | 内容翻转 | boolean | `false` | +| direction | 格子内容排列的方向,可选值为 `horizontal` | string | `vertical` | +| clickable | 是否开启格子点击反馈 | boolean | `false` | ### GridItem Props -| 参数 | 说明 | 类型 | 默认值 | -| ---- | ---- | ------ | ------ | -| text | 文字 | string | - | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| text | 文字 | string | - | ### GridItem Slots -| 名称 | 说明 | -| ------- | -------------- | +| 名称 | 说明 | +| --- | --- | | default | 自定义所有内容 | -| text | 自定义文字 | +| text | 自定义文字 | ### GridItem Events -| 事件名 | 说明 | 回调参数 | -| ------ | -------------- | ------------ | -| click | 点击格子时触发 | event: Event | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击格子时触发 | event: Event | ## 主题定制 @@ -222,11 +83,11 @@ import { Dongdong } from '@nutui/icons-vue-taro'; 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| -------------------------------- | ------------------------- | -| --nut-grid-border-color | _#f5f6f7_ | -| --nut-grid-item-content-padding | _16px 8px_ | -| --nut-grid-item-content-bg-color | _var(--nut-white)_ | -| --nut-grid-item-text-margin | _8px_ | -| --nut-grid-item-text-color | _var(--nut-title-color2)_ | -| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | +| 名称 | 默认值 | +| --- | --- | +| --nut-grid-border-color | _#f5f6f7_ | +| --nut-grid-item-content-padding | _16px 8px_ | +| --nut-grid-item-content-bg-color | _var(--nut-white)_ | +| --nut-grid-item-text-margin | _8px_ | +| --nut-grid-item-text-color | _var(--nut-title-color2)_ | +| --nut-grid-item-text-font-size | _var(--nut-font-size-1)_ | From afa522bf9f090244e3a4bcd8eaae777a0e2ccf23 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 13 Dec 2023 22:14:45 +0800 Subject: [PATCH 21/23] docs(grid): update --- src/packages/__VUE/grid/doc.taro.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/packages/__VUE/grid/doc.taro.md b/src/packages/__VUE/grid/doc.taro.md index c9fafb4e61..bb937ee013 100644 --- a/src/packages/__VUE/grid/doc.taro.md +++ b/src/packages/__VUE/grid/doc.taro.md @@ -17,31 +17,31 @@ app.use(GridItem); ### 基础用法 -> demo: grid basic +> demo: grid basic layout ### 自定义列数 -> demo: grid column +> demo: grid column layout ### 正方形格子 -> demo: grid square +> demo: grid square layout ### 格子间距 -> demo: grid gutter +> demo: grid gutter layout ### 内容翻转 -> demo: grid reverse +> demo: grid reverse layout ### 内容横向 -> demo: grid horizontal +> demo: grid horizontal layout ### 自定义内容 -> demo: grid content +> demo: grid content layout ## API From d2d661b25062b00317d778f7b01c8e19a5a776bf Mon Sep 17 00:00:00 2001 From: Eiinu Date: Wed, 13 Dec 2023 23:21:49 +0800 Subject: [PATCH 22/23] chore(overlay): split demo (#2735) --- .../src/basic/pages/overlay/basic.vue | 8 + .../src/basic/pages/overlay/close.vue | 30 ++++ .../src/basic/pages/overlay/duration.vue | 8 + .../src/basic/pages/overlay/index.vue | 108 +++++------ .../src/basic/pages/overlay/lock.vue | 8 + .../src/basic/pages/overlay/mask.vue | 13 ++ .../src/basic/pages/overlay/nest.vue | 30 ++++ src/packages/__VUE/overlay/demo.vue | 102 ----------- src/packages/__VUE/overlay/demo/basic.vue | 8 + src/packages/__VUE/overlay/demo/close.vue | 30 ++++ src/packages/__VUE/overlay/demo/duration.vue | 8 + src/packages/__VUE/overlay/demo/index.vue | 50 ++++++ src/packages/__VUE/overlay/demo/lock.vue | 8 + src/packages/__VUE/overlay/demo/mask.vue | 13 ++ src/packages/__VUE/overlay/demo/nest.vue | 30 ++++ src/packages/__VUE/overlay/doc.en-US.md | 167 +++-------------- src/packages/__VUE/overlay/doc.md | 169 +++--------------- src/packages/__VUE/overlay/doc.taro.md | 169 +++--------------- 18 files changed, 350 insertions(+), 609 deletions(-) create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/basic.vue create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/close.vue create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/duration.vue create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/lock.vue create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/mask.vue create mode 100644 packages/nutui-taro-demo/src/basic/pages/overlay/nest.vue delete mode 100644 src/packages/__VUE/overlay/demo.vue create mode 100644 src/packages/__VUE/overlay/demo/basic.vue create mode 100644 src/packages/__VUE/overlay/demo/close.vue create mode 100644 src/packages/__VUE/overlay/demo/duration.vue create mode 100644 src/packages/__VUE/overlay/demo/index.vue create mode 100644 src/packages/__VUE/overlay/demo/lock.vue create mode 100644 src/packages/__VUE/overlay/demo/mask.vue create mode 100644 src/packages/__VUE/overlay/demo/nest.vue diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/basic.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/basic.vue new file mode 100644 index 0000000000..b8690df63e --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/basic.vue @@ -0,0 +1,8 @@ + + diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/close.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/close.vue new file mode 100644 index 0000000000..6a69c8f1ab --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/close.vue @@ -0,0 +1,30 @@ + + + diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/duration.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/duration.vue new file mode 100644 index 0000000000..4a797501bc --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/duration.vue @@ -0,0 +1,8 @@ + + diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/index.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/index.vue index 01c56c42f8..253bc7957a 100644 --- a/packages/nutui-taro-demo/src/basic/pages/overlay/index.vue +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/index.vue @@ -1,76 +1,50 @@ - - diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/lock.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/lock.vue new file mode 100644 index 0000000000..3c47b57228 --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/lock.vue @@ -0,0 +1,8 @@ + + diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/mask.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/mask.vue new file mode 100644 index 0000000000..98cbe84c0f --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/mask.vue @@ -0,0 +1,13 @@ + + diff --git a/packages/nutui-taro-demo/src/basic/pages/overlay/nest.vue b/packages/nutui-taro-demo/src/basic/pages/overlay/nest.vue new file mode 100644 index 0000000000..224c887c7b --- /dev/null +++ b/packages/nutui-taro-demo/src/basic/pages/overlay/nest.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/packages/__VUE/overlay/demo.vue b/src/packages/__VUE/overlay/demo.vue deleted file mode 100644 index 9ca6e1aabb..0000000000 --- a/src/packages/__VUE/overlay/demo.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/src/packages/__VUE/overlay/demo/basic.vue b/src/packages/__VUE/overlay/demo/basic.vue new file mode 100644 index 0000000000..b8690df63e --- /dev/null +++ b/src/packages/__VUE/overlay/demo/basic.vue @@ -0,0 +1,8 @@ + + diff --git a/src/packages/__VUE/overlay/demo/close.vue b/src/packages/__VUE/overlay/demo/close.vue new file mode 100644 index 0000000000..6a69c8f1ab --- /dev/null +++ b/src/packages/__VUE/overlay/demo/close.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/packages/__VUE/overlay/demo/duration.vue b/src/packages/__VUE/overlay/demo/duration.vue new file mode 100644 index 0000000000..4a797501bc --- /dev/null +++ b/src/packages/__VUE/overlay/demo/duration.vue @@ -0,0 +1,8 @@ + + diff --git a/src/packages/__VUE/overlay/demo/index.vue b/src/packages/__VUE/overlay/demo/index.vue new file mode 100644 index 0000000000..1e07ca38e8 --- /dev/null +++ b/src/packages/__VUE/overlay/demo/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/packages/__VUE/overlay/demo/lock.vue b/src/packages/__VUE/overlay/demo/lock.vue new file mode 100644 index 0000000000..3c47b57228 --- /dev/null +++ b/src/packages/__VUE/overlay/demo/lock.vue @@ -0,0 +1,8 @@ + + diff --git a/src/packages/__VUE/overlay/demo/mask.vue b/src/packages/__VUE/overlay/demo/mask.vue new file mode 100644 index 0000000000..98cbe84c0f --- /dev/null +++ b/src/packages/__VUE/overlay/demo/mask.vue @@ -0,0 +1,13 @@ + + diff --git a/src/packages/__VUE/overlay/demo/nest.vue b/src/packages/__VUE/overlay/demo/nest.vue new file mode 100644 index 0000000000..224c887c7b --- /dev/null +++ b/src/packages/__VUE/overlay/demo/nest.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/packages/__VUE/overlay/doc.en-US.md b/src/packages/__VUE/overlay/doc.en-US.md index 98c10fce62..ceb074cb95 100644 --- a/src/packages/__VUE/overlay/doc.en-US.md +++ b/src/packages/__VUE/overlay/doc.en-US.md @@ -18,187 +18,62 @@ app.use(Overlay); Use `visible` to control the display/hiding of mask layers -:::demo - -```vue - - -``` - -::: +> demo: overlay basic ### Mask style It can be set through `overlay-style` -:::demo - -```vue - - -``` - -::: +> demo: overlay mask ### Set animation time Set mask display/hide time through `duration`, time `s` -:::demo - -```vue - - -``` - -::: +> demo: overlay duration ### Lock Background Scroll Use `lock scroll` to set whether the mask locks the background when displaying, and prohibit scrolling -:::demo - -```vue - - -``` - -::: +> demo: overlay lock ### Nested content The default `slot` is supported, and any content can be nested -:::demo - -```vue - - - -``` - -::: +> demo: overlay nest ### Click the mask not to close Set `close on click override` to control whether the click mask is closed. If it is set to `true`, the `click` event will also become invalid -:::demo - -```vue - - - -``` - -::: +> demo: overlay close ## API ### Props -| Attribute | Description | Type | Default | -| ---------------------- | ----------------------------------------------------------- | ---------------- | ------- | -| v-model:visible | Control the display/hide of masks | boolean | `false` | -| z-index | Custom Mask Level | string \| number | `2000` | -| duration | Display/hide animation duration, in seconds | string \| number | `0.3` | -| overlay-class | Custom mask class name | string | - | -| overlay-style | Custom Mask Style | CSSProperties | - | -| lock-scroll | Whether the background is locked when the mask is displayed | boolean | `true` | -| close-on-click-overlay | Whether to close the mask when clicking. | boolean | `true` | +| Attribute | Description | Type | Default | +| --- | --- | --- | --- | +| v-model:visible | Control the display/hide of masks | boolean | `false` | +| z-index | Custom Mask Level | string \| number | `2000` | +| duration | Display/hide animation duration, in seconds | string \| number | `0.3` | +| overlay-class | Custom mask class name | string | - | +| overlay-style | Custom Mask Style | CSSProperties | - | +| lock-scroll | Whether the background is locked when the mask is displayed | boolean | `true` | +| close-on-click-overlay | Whether to close the mask when clicking. | boolean | `true` | ### Events -| Event | Description | Arguments | -| ----- | ----------------------- | ----------------- | +| Event | Description | Arguments | +| --- | --- | --- | | click | Triggered when clicked. | event: MouseEvent | ### Slots -| Name | Description | -| ------- | ----------------------------------- | +| Name | Description | +| --- | --- | | default | Embedded Mask Content Customization | ## Theming @@ -207,6 +82,6 @@ const show = ref(false); The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/component/configprovider). -| Name | Default Value | -| ---------------------- | -------------------- | +| Name | Default Value | +| --- | --- | | --nut-overlay-bg-color | _rgba(0, 0, 0, 0.7)_ | diff --git a/src/packages/__VUE/overlay/doc.md b/src/packages/__VUE/overlay/doc.md index d43288cad9..7a6bfd7d9a 100644 --- a/src/packages/__VUE/overlay/doc.md +++ b/src/packages/__VUE/overlay/doc.md @@ -18,187 +18,62 @@ app.use(Overlay); 使用 `visible` 控制遮罩层的显示/隐藏 -:::demo - -```vue - - -``` - -::: +> demo: overlay basic ### 遮罩样式 通过 `overlay-style` 进行设置遮罩样式 -:::demo - -```vue - - -``` - -::: +> demo: overlay mask ### 设置动画时间 通过 `duration` 设置遮罩显示/隐藏的时间,时间 `s` -:::demo - -```vue - - -``` - -::: +> demo: overlay duration ### 锁定背景滚动 通过 `lock-scroll` 设置遮罩在显示时是否锁定背景,禁止滚动 -:::demo - -```vue - - -``` - -::: +> demo: overlay lock ### 嵌套内容 支持默认 `slot`,可嵌套任意内容 -:::demo - -```vue - - - -``` - -::: +> demo: overlay nest ### 点击遮罩不关闭 设置 `close-on-click-overlay` 可控制点击遮罩是否关闭,如果设置为 `true`,那么 `click` 事件也将同时失效 -:::demo - -```vue - - - -``` - -::: +> demo: overlay close ## API ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------------- | --------------------------- | ---------------- | ------- | -| v-model:visible | 控制遮罩的显示/隐藏 | boolean | `false` | -| z-index | 自定义遮罩层级 | string \| number | `2000` | -| duration | 显示/隐藏的动画时长,单位秒 | string \| number | `0.3` | -| overlay-class | 自定义遮罩类名 | string | - | -| overlay-style | 自定义遮罩样式 | CSSProperties | - | -| lock-scroll | 遮罩显示时的背景是否锁定 | boolean | `true` | -| close-on-click-overlay | 点击遮罩时是否关闭 | boolean | `true` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 控制遮罩的显示/隐藏 | boolean | `false` | +| z-index | 自定义遮罩层级 | string \| number | `2000` | +| duration | 显示/隐藏的动画时长,单位秒 | string \| number | `0.3` | +| overlay-class | 自定义遮罩类名 | string | - | +| overlay-style | 自定义遮罩样式 | CSSProperties | - | +| lock-scroll | 遮罩显示时的背景是否锁定 | boolean | `true` | +| close-on-click-overlay | 点击遮罩时是否关闭 | boolean | `true` | ### Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ----------------- | -| click | 点击时触发 | event: MouseEvent | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | event: MouseEvent | ### Slots -| 名称 | 说明 | -| ------- | ------------------ | +| 名称 | 说明 | +| --- | --- | | default | 内嵌遮罩内容自定义 | ## 主题定制 @@ -207,6 +82,6 @@ const show = ref(false); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ---------------------- | -------------------- | +| 名称 | 默认值 | +| --- | --- | | --nut-overlay-bg-color | _rgba(0, 0, 0, 0.7)_ | diff --git a/src/packages/__VUE/overlay/doc.taro.md b/src/packages/__VUE/overlay/doc.taro.md index a0dfc4cbde..c00d32038e 100644 --- a/src/packages/__VUE/overlay/doc.taro.md +++ b/src/packages/__VUE/overlay/doc.taro.md @@ -18,187 +18,62 @@ app.use(Overlay); 使用 `visible` 控制遮罩层的显示/隐藏 -:::demo - -```vue - - -``` - -::: +> demo: overlay basic basic ### 遮罩样式 通过 `overlay-style` 进行设置遮罩样式 -:::demo - -```vue - - -``` - -::: +> demo: overlay mask basic ### 设置动画时间 通过 `duration` 设置遮罩显示/隐藏的时间,时间 `s` -:::demo - -```vue - - -``` - -::: +> demo: overlay duration basic ### 锁定背景滚动 通过 `lock-scroll` 设置遮罩在显示时是否锁定背景,禁止滚动 -:::demo - -```vue - - -``` - -::: +> demo: overlay lock basic ### 嵌套内容 支持默认 `slot`,可嵌套任意内容 -:::demo - -```vue - - - -``` - -::: +> demo: overlay nest basic ### 点击遮罩不关闭 设置 `close-on-click-overlay` 可控制点击遮罩是否关闭,如果设置为 `true`,那么 `click` 事件也将同时失效 -:::demo - -```vue - - - -``` - -::: +> demo: overlay close basic ## API ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------------- | --------------------------- | ---------------- | ------- | -| v-model:visible | 控制遮罩的显示/隐藏 | boolean | `false` | -| z-index | 自定义遮罩层级 | string \| number | `2000` | -| duration | 显示/隐藏的动画时长,单位秒 | string \| number | `0.3` | -| overlay-class | 自定义遮罩类名 | string | - | -| overlay-style | 自定义遮罩样式 | CSSProperties | - | -| lock-scroll | 遮罩显示时的背景是否锁定 | boolean | `true` | -| close-on-click-overlay | 点击遮罩时是否关闭 | boolean | `true` | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model:visible | 控制遮罩的显示/隐藏 | boolean | `false` | +| z-index | 自定义遮罩层级 | string \| number | `2000` | +| duration | 显示/隐藏的动画时长,单位秒 | string \| number | `0.3` | +| overlay-class | 自定义遮罩类名 | string | - | +| overlay-style | 自定义遮罩样式 | CSSProperties | - | +| lock-scroll | 遮罩显示时的背景是否锁定 | boolean | `true` | +| close-on-click-overlay | 点击遮罩时是否关闭 | boolean | `true` | ### Events -| 事件名 | 说明 | 回调参数 | -| ------ | ---------- | ----------------- | -| click | 点击时触发 | event: MouseEvent | +| 事件名 | 说明 | 回调参数 | +| --- | --- | --- | +| click | 点击时触发 | event: MouseEvent | ### Slots -| 名称 | 说明 | -| ------- | ------------------ | +| 名称 | 说明 | +| --- | --- | | default | 内嵌遮罩内容自定义 | ## 主题定制 @@ -207,6 +82,6 @@ const show = ref(false); 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。 -| 名称 | 默认值 | -| ---------------------- | -------------------- | +| 名称 | 默认值 | +| --- | --- | | --nut-overlay-bg-color | _rgba(0, 0, 0, 0.7)_ | From 2f7707e6066d780ac09ddece3903590e84080af9 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Thu, 14 Dec 2023 16:11:21 +0800 Subject: [PATCH 23/23] =?UTF-8?q?fix(sku):=20=E4=BF=AE=E5=A4=8D=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=B8=8B=E5=86=85=E5=AE=B9=E7=9A=84=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98=20(#2737)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #2736 --- src/packages/__VUE/sku/index.taro.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/packages/__VUE/sku/index.taro.vue b/src/packages/__VUE/sku/index.taro.vue index b73d79cdfe..e972555b2e 100644 --- a/src/packages/__VUE/sku/index.taro.vue +++ b/src/packages/__VUE/sku/index.taro.vue @@ -23,7 +23,7 @@ - + @@ -44,7 +44,7 @@ > - +