diff --git a/.husky/commit-msg b/.husky/commit-msg index 7fed4850..fa530c80 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no -- commitlint --edit +npx --no -- commitlint@18 --edit diff --git a/jest.config.js b/jest.config.js index 958c09aa..9afe641f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,7 +2,6 @@ const path = require('path'); const JEST_STYLE_MOCK_FILE = path.resolve(__dirname, 'jest.style-mock.ts'); const JEST_FILE_MOCK_FILE = path.resolve(__dirname, 'jest.file-mock.ts'); - module.exports = { preset: 'ts-jest', rootDir: path.resolve(__dirname, './'), @@ -13,6 +12,7 @@ module.exports = { '^src/packages/(.*)$': '/packages/press-ui/src/packages/$1', '^src/pages/(.*)$': '/packages/press-ui/src/pages/$1', '^src/utils/(.*)$': '/packages/press-ui/src/utils/$1', + '^press-ui/(.*)$': 'packages/press-ui/src/packages/$1', }, transform: { '\\.(vue)$': 'vue-jest', @@ -46,4 +46,5 @@ module.exports = { collectCoverage: true, coverageReporters: ['lcov', 'text-summary'], coverageDirectory: '/tests/coverage', + transformIgnorePatterns: ['/packages/press-ui/node_modules/.pnpm/(?!(@popperjs\\+core)@)'], }; diff --git a/package.json b/package.json index cd76a469..afc41053 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "press-ui", - "version": "2.0.7", + "version": "2.0.8", "description": "简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目", "private": true, "repository": { diff --git a/packages/press-ui/CHANGELOG.md b/packages/press-ui/CHANGELOG.md index e0bc5f50..b036fb71 100644 --- a/packages/press-ui/CHANGELOG.md +++ b/packages/press-ui/CHANGELOG.md @@ -2,6 +2,34 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [2.0.8](https://github.com/novlan1/press-ui/compare/v2.0.7...v2.0.8) (2024-07-15) + + +### ✏️ Documentation | 文档 + +* **form:** add form docs ([0f03845](https://github.com/novlan1/press-ui/commit/0f03845399ef293c7768a712fb29170c3cb2c27e)) +* **pull-refresh:** update docs ([20ebb3a](https://github.com/novlan1/press-ui/commit/20ebb3a97a92e1d33cbca14b3439fc5aa70a3855)) + + +### ✨ Features | 新功能 + +* **form:** 优化form ([9434ed8](https://github.com/novlan1/press-ui/commit/9434ed8f54be3ddd7d6eb3dcea295fe8bfaf44c9)) +* **form:** update form line ([6fe785d](https://github.com/novlan1/press-ui/commit/6fe785dbad00dc8f95c14e9c03e0ac5b4fc4a2a9)) + + +### 🚀 Chore | 构建/工程依赖/工具 + +* **form:** chore: lint ([347837a](https://github.com/novlan1/press-ui/commit/347837ac0ee2644345696fba8c0c33dc13e25604)) +* **form:** update demo ([d96358d](https://github.com/novlan1/press-ui/commit/d96358dcf7006f2308b1a8ffe0026b56b29bdd78)) +* **form:** update demo ([b339629](https://github.com/novlan1/press-ui/commit/b339629e349b78d9dfc5276b0240b3ff723ffb6f)) +* **pull-refresh:** update demo ([611c804](https://github.com/novlan1/press-ui/commit/611c804a4956dfdb8752d9ddd25833a1fed73d4d)) +* update manifestAppIdList ([98f85e3](https://github.com/novlan1/press-ui/commit/98f85e306e0c3188f9f75c85b1d09431d8fea8ed)) + + +### 🐛 Bug Fixes | Bug 修复 + +* **scripts:** 修复 windows 环境兼容性问题 ([c9f79ad](https://github.com/novlan1/press-ui/commit/c9f79ad332f2a60fa5c2283e6690d6d32781eb3e)) + ### [2.0.7](https://github.com/novlan1/press-ui/compare/v2.0.6...v2.0.7) (2024-07-12) diff --git a/packages/press-ui/docs/changelog.md b/packages/press-ui/docs/changelog.md index a5d8ab57..b70901be 100644 --- a/packages/press-ui/docs/changelog.md +++ b/packages/press-ui/docs/changelog.md @@ -1,5 +1,33 @@ # 更新日志 +### [2.0.8](https://github.com/novlan1/press-ui/compare/v2.0.7...v2.0.8) (2024-07-15) + + +### Documentation 📖 + +* **form:** add form docs ([0f03845](https://github.com/novlan1/press-ui/commit/0f03845399ef293c7768a712fb29170c3cb2c27e)) +* **pull-refresh:** update docs ([20ebb3a](https://github.com/novlan1/press-ui/commit/20ebb3a97a92e1d33cbca14b3439fc5aa70a3855)) + + +### Features 🎉 + +* **form:** 优化form ([9434ed8](https://github.com/novlan1/press-ui/commit/9434ed8f54be3ddd7d6eb3dcea295fe8bfaf44c9)) +* **form:** update form line ([6fe785d](https://github.com/novlan1/press-ui/commit/6fe785dbad00dc8f95c14e9c03e0ac5b4fc4a2a9)) + + +### Chore 🚀 + +* **form:** chore: lint ([347837a](https://github.com/novlan1/press-ui/commit/347837ac0ee2644345696fba8c0c33dc13e25604)) +* **form:** update demo ([d96358d](https://github.com/novlan1/press-ui/commit/d96358dcf7006f2308b1a8ffe0026b56b29bdd78)) +* **form:** update demo ([b339629](https://github.com/novlan1/press-ui/commit/b339629e349b78d9dfc5276b0240b3ff723ffb6f)) +* **pull-refresh:** update demo ([611c804](https://github.com/novlan1/press-ui/commit/611c804a4956dfdb8752d9ddd25833a1fed73d4d)) +* update manifestAppIdList ([98f85e3](https://github.com/novlan1/press-ui/commit/98f85e306e0c3188f9f75c85b1d09431d8fea8ed)) + + +### Bug Fixes 🐞 + +* **scripts:** 修复 windows 环境兼容性问题 ([c9f79ad](https://github.com/novlan1/press-ui/commit/c9f79ad332f2a60fa5c2283e6690d6d32781eb3e)) + ### [2.0.7](https://github.com/novlan1/press-ui/compare/v2.0.6...v2.0.7) (2024-07-12) diff --git a/packages/press-ui/package.json b/packages/press-ui/package.json index caa47686..ee3ea642 100644 --- a/packages/press-ui/package.json +++ b/packages/press-ui/package.json @@ -1,6 +1,6 @@ { "name": "press-ui", - "version": "2.0.7", + "version": "2.0.8", "description": "简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目", "private": true, "repository": { diff --git a/packages/press-ui/script/component-config/generate-entry.js b/packages/press-ui/script/component-config/generate-entry.js index 42948788..d7067636 100644 --- a/packages/press-ui/script/component-config/generate-entry.js +++ b/packages/press-ui/script/component-config/generate-entry.js @@ -77,7 +77,11 @@ function generateIndexScss() { const list = glob.sync(globMatch); result.push(...list.map((item) => { - const relativePath = path.relative(targetDir, item); + let relativePath = path.relative(targetDir, item); + if (process.platform === 'win32') { + relativePath = relativePath.replace(/\\/g, '/'); + } + const str = `@import "./${relativePath}";`; return str; })); diff --git a/packages/press-ui/src/manifest.json b/packages/press-ui/src/manifest.json index f072aa58..54d04913 100644 --- a/packages/press-ui/src/manifest.json +++ b/packages/press-ui/src/manifest.json @@ -63,7 +63,8 @@ "1112328124", "1112217302", "1112240178", - "1112328122" + "1112328122", + "1112377970" ] }, "mp-alipay": { diff --git a/packages/press-ui/src/packages/common/async-validator/index.js b/packages/press-ui/src/packages/common/async-validator/index.js index ae3098a6..b827f063 100644 --- a/packages/press-ui/src/packages/common/async-validator/index.js +++ b/packages/press-ui/src/packages/common/async-validator/index.js @@ -1,3 +1,5 @@ +/* eslint-disable */ + function _extends() { _extends = Object.assign || function (target) { for (let i = 1; i < arguments.length; i++) { diff --git a/packages/press-ui/src/packages/mixins/relation.d.ts b/packages/press-ui/src/packages/mixins/relation.d.ts index fab26abd..cdf8d63c 100644 --- a/packages/press-ui/src/packages/mixins/relation.d.ts +++ b/packages/press-ui/src/packages/mixins/relation.d.ts @@ -10,12 +10,12 @@ export declare function ChildrenMixin(parent: string, options?: Record Y -
+
G
-
+
diff --git a/packages/press-ui/src/packages/press-back-top/demo.vue b/packages/press-ui/src/packages/press-back-top/demo.vue index c7581781..ab85589a 100644 --- a/packages/press-ui/src/packages/press-back-top/demo.vue +++ b/packages/press-ui/src/packages/press-back-top/demo.vue @@ -10,15 +10,21 @@ @scroll="onScroll" >
- - {{ t(item) }} - + +
@@ -117,15 +123,15 @@ export default { } .demo-inner { height: calc(100% + 300px); - padding: 10px 20px; + padding: 10px 0px; - ::v-deep { - /* #ifdef MP-QQ */ - press-checkbox, - /* #endif */ - .press-checkbox { - margin-bottom: 12px; - } - } + // ::v-deep { + // /* #ifdef MP-QQ */ + // press-checkbox, + // /* #endif */ + // .press-checkbox { + // margin-bottom: 12px; + // } + // } } diff --git a/packages/press-ui/src/packages/press-cell/css/index.scss b/packages/press-ui/src/packages/press-cell/css/index.scss index cdaecfc7..6cbda41d 100644 --- a/packages/press-ui/src/packages/press-cell/css/index.scss +++ b/packages/press-ui/src/packages/press-cell/css/index.scss @@ -107,6 +107,12 @@ line-height: var(--cell-line-height, $cell-line-height); } + &--clickable { + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } + // 【修改点】 &--clickable&--hover不能用 &--clickable.press-cell--hover, &--clickable:active { diff --git a/packages/press-ui/src/packages/press-checkbox/press-checkbox.vue b/packages/press-ui/src/packages/press-checkbox/press-checkbox.vue index b602c0e9..4e7efbc9 100644 --- a/packages/press-ui/src/packages/press-checkbox/press-checkbox.vue +++ b/packages/press-ui/src/packages/press-checkbox/press-checkbox.vue @@ -6,13 +6,13 @@
diff --git a/packages/press-ui/src/packages/press-collapse-item/press-collapse-item.vue b/packages/press-ui/src/packages/press-collapse-item/press-collapse-item.vue index f69bdaf4..290128f7 100644 --- a/packages/press-ui/src/packages/press-collapse-item/press-collapse-item.vue +++ b/packages/press-ui/src/packages/press-collapse-item/press-collapse-item.vue @@ -1,6 +1,6 @@