fix color-picker bug and update changelog (#631)

* docs: update release notes (#397)

* fix Playground Page (#399)

* fix(sites): 切换 sites 引用 @opentiny/vue-repl包

* fix(sites): fix Playground Page

* fix(sites): fix (#400)

* feat(release): delete color-picker

* feat(release): delete color-picker

* feat(release): fix grid tips contentMethod

* fix(playground):  fix process.env \ changeVersion \sortablejs  bugs (#422)

* fix(sites): fix grid demo api link jump error url (#421)

* fix(form-demo): add form validateField api demo (#424)

* fix: fix demo import vue-modal; fix playground share (#428)

* fix(playground):  fix process.env \ changeVersion \sortablejs  bugs

* fix:  fix demo import vue-modal; fix playground share

* fix: import Modal (#430)

* fix(select): Fix label not displaying correctly when using optimization attribute in select component (#438)

* fix(search): the enter bug of the search component is fixed (#439)

* feat(release): fix grid watch data

* feat(grid): fix grid custom tooltip

* fix: fix grid pager events

* docs: fix the problem of missing container component style (#453)

* docs(container): fix container composition demos fix #425 (#441)

* docs: remove :::warning

* fix(checkbox): fix checkbox selected icon bug close #450 (#451)

* fix: fix input attrs id

* fix(slider): fix slider range demo bug

* fix: fix when datetime component in dialog-box, the popper scroll away; fix dialog-box (#455)

* fix(mobile-tabbar): fixed a tabbar component switchover issue on the mobile client (#458)

* fix(slider): fix upload destory bug

* fix(smb-theme): smb theme change fix (#469)

* fix(checkbox): fix checkbox group wrap (#467)

* fix(dropdown): Fix the issue of incorrect theme icons for Dropdown components. (#468)

* fix(dropdown-item): (#472)

Fix DropdownItem component clicking to disable menu items but triggering item-click event

* fix(button): button smb theme change fix (#470)

* fix(button): button smb theme change fix

* fix(checkbox-button): smb theme change fix

* fix(playground): fix jump to incorrect demo (#466)

* fix(link): smb theme change fix (#474)

* fix(theme): smb theme change fix (#480)

* fix(grid): fix grid checkbox radio x-design theme

* chore(ts): change code style for import ts type (#511)

* fix(Cascader, DropDown, Popeditor): fixed Cascader component panel not closing when clicked elsewhere (#513)

* fix(popper): fix popper element  offset error in micro-app (#570)

* chore(popper): stop bubbling when parent is fixed

* fix(popper): fix popper element in micro-app

* feat: update code

* Merge branch 'dev' of github.com:opentiny/tiny-vue into release

* fix(docs): add support vue2.7 docs (#630)

* fix(docs): add support vue2.7 docs

* fix: fix version

* fix: fix color-picker error

* docs: update changelog v3.11.0 (#629)

* fix: update site version

---------

Co-authored-by: Kagol <kagol@sina.com>
Co-authored-by: 申君健 <40288193@qq.com>
Co-authored-by: gimmyhehe <975402925@qq.com>
Co-authored-by: MomoPoppy <125256456+MomoPoppy@users.noreply.github.com>
Co-authored-by: chenxi-20 <76168465+chenxi-20@users.noreply.github.com>
Co-authored-by: yoyo <104079404+yoyo201626@users.noreply.github.com>
This commit is contained in:
ajaxzheng 2023-10-24 00:06:31 -07:00 committed by GitHub
parent 1484ee3ac8
commit 06dbb38707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 600 additions and 427 deletions

2
examples/react-site/scripts/build-react.mjs Executable file → Normal file
View File

@ -66,7 +66,7 @@ async function buildReact() {
lib: {
entry: entries,
formats: ['es'],
fileName: (format, entryName) => `${entryName}.js`
fileName: (_, entryName) => `${entryName}.js`
}
}
})

View File

@ -1,6 +1,8 @@
<template>
<tiny-color-picker v-model="color" />
<tiny-button @click="changeColor"> 切换 </tiny-button>
<div>
<tiny-color-picker v-model="color" />
<tiny-button @click="changeColor"> 切换 </tiny-button>
</div>
</template>
<script>

View File

@ -1,13 +1,168 @@
# 更新日志
## v2.11.0/v3.11.0
`2023/10/24`
### Exciting New Features 🎉
* feat(color-picker): add color-picker component by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#383](https://github.com/opentiny/tiny-vue/pull/383)
* feat: add rich-text-editor component by [@kagol](https://github.com/kagol) in [#401](https://github.com/opentiny/tiny-vue/pull/401)
* feat(rich-text-editor): add row height and merge h1-h6 and pargraph by [@Caesar-ch](https://github.com/Caesar-ch) in [#414](https://github.com/opentiny/tiny-vue/pull/414)
* feat(rich-text-editor): support code highlight by [@Caesar-ch](https://github.com/Caesar-ch) in [#440](https://github.com/opentiny/tiny-vue/pull/440)
* feat: optimize rich text editor toolbar style by [@kagol](https://github.com/kagol) in [#444](https://github.com/opentiny/tiny-vue/pull/444)
* feat(rich-text-editor): add font-size selection by [@Caesar-ch](https://github.com/Caesar-ch) in [#448](https://github.com/opentiny/tiny-vue/pull/448)
* feat(rich-text-editor): css style adjustment by [@Caesar-ch](https://github.com/Caesar-ch) in [#459](https://github.com/opentiny/tiny-vue/pull/459)
* feature(divider): 增加 Divider 组件 ([#354](https://github.com/opentiny/tiny-vue/issues/354) close) by [@vaebe](https://github.com/vaebe) in [#471](https://github.com/opentiny/tiny-vue/pull/471)
* feat(rich-text-editor): add vue2 support by [@Caesar-ch](https://github.com/Caesar-ch) in [#483](https://github.com/opentiny/tiny-vue/pull/483)
* feat(rich-text-editor): fix bug, add font-size and add api demo by [@Caesar-ch](https://github.com/Caesar-ch) in [#497](https://github.com/opentiny/tiny-vue/pull/497)
* feat(rich-text-editor): support media url by [@Caesar-ch](https://github.com/Caesar-ch) in [#508](https://github.com/opentiny/tiny-vue/pull/508)
* feat: color select panel component by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#492](https://github.com/opentiny/tiny-vue/pull/492)
* feat: scripts support cross-platform by [@gweesin](https://github.com/gweesin) in [#554](https://github.com/opentiny/tiny-vue/pull/554)
* feat(react): collect refs and children in one traverse by [@pe-3](https://github.com/pe-3) in [#551](https://github.com/opentiny/tiny-vue/pull/551)
* feat(color-select-panel): history & predefine color by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#530](https://github.com/opentiny/tiny-vue/pull/530)
* feat(react): add switch comp with mobile & pc mode by [@pe-3](https://github.com/pe-3) in [#565](https://github.com/opentiny/tiny-vue/pull/565)
* feat(react): add badge comp with mobile & pc mode by [@pe-3](https://github.com/pe-3) in [#566](https://github.com/opentiny/tiny-vue/pull/566)
* feat(react): ehance virtual compeach comp has v-ifdefault as true by [@pe-3](https://github.com/pe-3) in [#564](https://github.com/opentiny/tiny-vue/pull/564)
* feat(popeditor): adds the autoreset property by [@wkif](https://github.com/wkif) in [#562](https://github.com/opentiny/tiny-vue/pull/562)
* feat(react): add mobile mode in tiny react alert by [@pe-3](https://github.com/pe-3) in [#550](https://github.com/opentiny/tiny-vue/pull/550)
* feat(anchor): Add anchor component dot type theme by [@chenxi-20](https://github.com/chenxi-20) in [#587](https://github.com/opentiny/tiny-vue/pull/587)
* feat(fileupload): Added the function of pasting and uploading files by [@chenxi-20](https://github.com/chenxi-20) in [#593](https://github.com/opentiny/tiny-vue/pull/593)
* feat(search): Add default selection function for search types and pre… by [@chenxi-20](https://github.com/chenxi-20) in [#614](https://github.com/opentiny/tiny-vue/pull/614)
* feat(calendar-view): add calendar-view component
* feat(search):增加搜索类型默认值属性
* feat(fileupload):增加粘贴上传功能
* feat(anchor): 增加锚点 dot 类型
* feat: 使用一套组件库包支持vue2.6.x和vue2.7.x
* feat(form): XDesign表单校验失败新增错误图标
* feat(select): Select组件新增clearNoMatchValue属性自动清空不匹配值
* feat(tree): tree组件适配XDesign设计规范
* feat(timeline): Timeline组件增加line-width属性, 用以设置连接线长度
### Bug Fixes 🐛
* fix(sites): 切换 sites 引用 @opentiny/vue-repl包 by [@shenjunjian](https://github.com/shenjunjian) in [#391](https://github.com/opentiny/tiny-vue/pull/391)
* fix:When nesting using Split, the mouse direction on the left and right split line is wrong when the upper and lower division is nested by [@jack-zishan](https://github.com/jack-zishan) in [#392](https://github.com/opentiny/tiny-vue/pull/392)
* fix: fix packages/vue/package.json format error when execute pnpm dev by [@kagol](https://github.com/kagol) in [#387](https://github.com/opentiny/tiny-vue/pull/387)
* fix(sites): change design config when change theme by [@gimmyhehe](https://github.com/gimmyhehe) in [#393](https://github.com/opentiny/tiny-vue/pull/393)
* fix(color-picker): 修复组件若干问题 by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#394](https://github.com/opentiny/tiny-vue/pull/394)
* fix Playground Page by [@shenjunjian](https://github.com/shenjunjian) in [#399](https://github.com/opentiny/tiny-vue/pull/399)
* fix(sites): fix by [@shenjunjian](https://github.com/shenjunjian) in [#400](https://github.com/opentiny/tiny-vue/pull/400)
* fix(playground): fix process.env \ changeVersion \sortablejs bugs by [@shenjunjian](https://github.com/shenjunjian) in [#422](https://github.com/opentiny/tiny-vue/pull/422)
* fix(sites): fix grid demo api link jump error url by [@gimmyhehe](https://github.com/gimmyhehe) in [#421](https://github.com/opentiny/tiny-vue/pull/421)
* fix(modal): fix css value error by [@Zz-ZzzZ](https://github.com/Zz-ZzzZ) in [#426](https://github.com/opentiny/tiny-vue/pull/426)
* fix(search): the enter bug of the search component is fixed by [@chenxi-20](https://github.com/chenxi-20) in [#439](https://github.com/opentiny/tiny-vue/pull/439)
* fix(checkbox): fix checkbox selected icon bug close [#450](https://github.com/opentiny/tiny-vue/issues/450) by [@gimmyhehe](https://github.com/gimmyhehe) in [#451](https://github.com/opentiny/tiny-vue/pull/451)
* fix: fix when datetime component in dialog-box, the popper scroll awa… by [@shenjunjian](https://github.com/shenjunjian) in [#455](https://github.com/opentiny/tiny-vue/pull/455)
* fix(time-picker): fix time-picker arrow-control bug by [@kagol](https://github.com/kagol) in [#464](https://github.com/opentiny/tiny-vue/pull/464)
* fix: alert mobile close should works by [@LinboLen](https://github.com/LinboLen) in [#478](https://github.com/opentiny/tiny-vue/pull/478)
* 🐛 fork tiny-vue 启动失败,添加字符串末尾缺少的引号 by [@allenli178](https://github.com/allenli178) in [#488](https://github.com/opentiny/tiny-vue/pull/488)
* fix(dialog-box): 修复右侧弹窗不能滚动问题 by [@Binks123](https://github.com/Binks123) in [#500](https://github.com/opentiny/tiny-vue/pull/500)
* fix(Cascader, DropDown, Popeditor): fixed Cascader component panel no… by [@yoyo201626](https://github.com/yoyo201626) in [#513](https://github.com/opentiny/tiny-vue/pull/513)
* feat(rich-text-editor): resolve svg viewbox by [@Caesar-ch](https://github.com/Caesar-ch) in [#515](https://github.com/opentiny/tiny-vue/pull/515)
* fix(collapse): 修复collapse未深度监听导致Pc端tiny-collapse activeNames直接push无法响… by [@wkif](https://github.com/wkif) in [#512](https://github.com/opentiny/tiny-vue/pull/512)
* fix(slider): slider range select bug ([#390](https://github.com/opentiny/tiny-vue/issues/390)) by [@chenguang1994](https://github.com/chenguang1994) in [#518](https://github.com/opentiny/tiny-vue/pull/518)
* fix(dialog-box): dialog mask err([#495](https://github.com/opentiny/tiny-vue/issues/495)) by [@Zuowendong](https://github.com/Zuowendong) in [#503](https://github.com/opentiny/tiny-vue/pull/503)
* fix(theme): 修复官网组件标题背景色异常 by [@vaebe](https://github.com/vaebe) in [#496](https://github.com/opentiny/tiny-vue/pull/496)
* fix: fix pnpm dev:site error by [@kagol](https://github.com/kagol) in [#536](https://github.com/opentiny/tiny-vue/pull/536)
* docs(guide): fix alert out of bounds by [@Binks123](https://github.com/Binks123) in [#541](https://github.com/opentiny/tiny-vue/pull/541)
* fix: fix extra highlight color when press button in mobile mode by [@gweesin](https://github.com/gweesin) in [#537](https://github.com/opentiny/tiny-vue/pull/537)
* docs: fix popover demo position error when toggle code block by [@gweesin](https://github.com/gweesin) in [#535](https://github.com/opentiny/tiny-vue/pull/535)
* fix(color-select-panel): z-index by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#560](https://github.com/opentiny/tiny-vue/pull/560)
* fix(guider): 箭头部分情况超出了指定位置,优化样式 ,解决计算问题([#454](https://github.com/opentiny/tiny-vue/issues/454)) by [@chenguang1994](https://github.com/chenguang1994) in [#539](https://github.com/opentiny/tiny-vue/pull/539)
* fix(tree): Click margin-top zoom will collapse treemenu([#559](https://github.com/opentiny/tiny-vue/issues/559)) by [@chenguang1994](https://github.com/chenguang1994) in [#568](https://github.com/opentiny/tiny-vue/pull/568)
* fix(popper): fix popper element offset error in micro-app by [@gimmyhehe](https://github.com/gimmyhehe) in [#570](https://github.com/opentiny/tiny-vue/pull/570)
* fix: Guide component mobile overflow by [@xlearns](https://github.com/xlearns) in [#574](https://github.com/opentiny/tiny-vue/pull/574)
* fix(numeric):numeric 修复输入超大数字变为科学计数法时失焦后组件消失的问题 by [@shonen7](https://github.com/shonen7) in [#563](https://github.com/opentiny/tiny-vue/pull/563)
* fix(rich-text-editor): fix Unsupported URL Type "link:" when execute npm i by [@kagol](https://github.com/kagol) in [#579](https://github.com/opentiny/tiny-vue/pull/579)
* fixAdded version import to component templates by [@wkif](https://github.com/wkif) in [#578](https://github.com/opentiny/tiny-vue/pull/578)
* fix(popper): remove window variable code by [@gimmyhehe](https://github.com/gimmyhehe) in [#586](https://github.com/opentiny/tiny-vue/pull/586)
* fix(rich-text-edtior):fix rich-text-edtior functionality and style issues by [@shonen7](https://github.com/shonen7) in [#592](https://github.com/opentiny/tiny-vue/pull/592)
* fix(doc): rename dom id avioding conflicts([#595](https://github.com/opentiny/tiny-vue/issues/595)) by [@chenguang1994](https://github.com/chenguang1994) in [#597](https://github.com/opentiny/tiny-vue/pull/597)
* chore: support alpha version and fix build error by [@kagol](https://github.com/kagol) in [#600](https://github.com/opentiny/tiny-vue/pull/600)
* fix(form): form tooltip append-to-body fix by [@gimmyhehe](https://github.com/gimmyhehe) in [#599](https://github.com/opentiny/tiny-vue/pull/599)
* fix(rich-text-editor): fix Unsupported URL Type link by [@kagol](https://github.com/kagol) in [#601](https://github.com/opentiny/tiny-vue/pull/601)
* fix: fix global registration error with rich-text-editor by [@zzcr](https://github.com/zzcr) in [#602](https://github.com/opentiny/tiny-vue/pull/602)
* fix(vue-icon_left-ward-arrow): Correct LeftWardArrow import path by [@yoyo201626](https://github.com/yoyo201626) in [#603](https://github.com/opentiny/tiny-vue/pull/603)
* fix: fix incorrect target in webComponent by [@gimmyhehe](https://github.com/gimmyhehe) in [#605](https://github.com/opentiny/tiny-vue/pull/605)
* fix: fix rich-text build error by [@zzcr](https://github.com/zzcr) in [#618](https://github.com/opentiny/tiny-vue/pull/618)
* fix(Rich Text Editor): Fix bugs in the Rich Text Editor by [@shonen7](https://github.com/shonen7) in [#616](https://github.com/opentiny/tiny-vue/pull/616)
* fix(color-picker、divider):Fix 'color picker' switch color failure, de… by [@shonen7](https://github.com/shonen7) in [#619](https://github.com/opentiny/tiny-vue/pull/619)
* fix(select-text-field): Selecttext-fiel And value-field Example For One by [@Xppp0217](https://github.com/Xppp0217) in [#610](https://github.com/opentiny/tiny-vue/pull/610)
* Fix the issue of blocked headers in dialogBox by [@Huangyilin19](https://github.com/Huangyilin19) in [#620](https://github.com/opentiny/tiny-vue/pull/620)
* fix: add missing svg to fix build:ui error
* fix: fix vue-renderless/types path error
* fix(search): 修复enter回车键搜索报错问题
* fix(search): 修复搜索类型文字过长显示错位问题
* fix(fileupload):修复上传组件在文件上传时,点击取消上传报错问题
* fix(anchor):修复官网使用锚点时,固定模式闪现的问题**
* fix(grid): 修复grid表格筛选手动调用clearFilter不会触发filter-change方法的问题
* fix(popeditor): 修复popeditor组件在vue2.7下报错bug
* fix(form): 修复表单项下多个子元素导致tooltip重复
* fix(collapse): collspse组件图标与文体间距修改
* fix(checkbox): 修复checkbox禁用态悬浮bug
* fix(select): 修复 Select 组件,多选时初始化输入框高度不对
* fix(select): 修复Select组件下拉框没有默认添加到body上
* fix(select): 修复 Select 组件,折叠 Tag时位置够却换行了
* fix(dropdown): 修复dropdownItem禁用时触发itemclick
* fix(dropdown): 修复Dropdown组件smb图标显示不正确
* fix(select): 修复select组件大数据开启optimization时未显示正确label
* fix(Slider): fix slider 范围选择
* fix(input): 修复当input组件传入id时造成内部标签会接收透传id造成双id问题
* fix(Cascader): 修复在验证Cascader单组件引入时面板不能正常关闭的问题
* fix(modal): Modal组件不响应动态宽度与高度
* fix(tree-menu): TreeMenu组件Saas主题下TreeMenu元素排布变形, 默认主题下图标位置不正确, 节点选中与悬浮的样式不对
* fix(tree-menu): TreeMenu组件的collapsible属性同时控制多个功能
* fix(tabbar): 移动端tabbar组件点击事件报错
* fix(tree): Tree组件自定义渲染内容时, 节点没对齐
* fix(steps): Steps组件内容鼠标悬浮光标不正确; 节点序号与图标颜色不正确
* fix(tree): Tree树懒加载数据无法渲染第一层节点
### Other Changes
* test(badge): add unit test by [@lyx-jay](https://github.com/lyx-jay) in [#388](https://github.com/opentiny/tiny-vue/pull/388)
* test(modal): add modal unit test by [@Zz-ZzzZ](https://github.com/Zz-ZzzZ) in [#374](https://github.com/opentiny/tiny-vue/pull/374)
* docs: update release notes by [@kagol](https://github.com/kagol) in [#397](https://github.com/opentiny/tiny-vue/pull/397)
* style(rich-text-editor): format code style by [@kagol](https://github.com/kagol) in [#402](https://github.com/opentiny/tiny-vue/pull/402)
* docs(rich-text-editor): add demo and api docs by [@kagol](https://github.com/kagol) in [#404](https://github.com/opentiny/tiny-vue/pull/404)
* docs(container): fix container composition demos fix [#425](https://github.com/opentiny/tiny-vue/issues/425) by [@kagol](https://github.com/kagol) in [#441](https://github.com/opentiny/tiny-vue/pull/441)
* test(modal): add surplus unit test by [@Zz-ZzzZ](https://github.com/Zz-ZzzZ) in [#435](https://github.com/opentiny/tiny-vue/pull/435)
* docs: fix the problem of missing container component style by [@kagol](https://github.com/kagol) in [#453](https://github.com/opentiny/tiny-vue/pull/453)
* feat(unit): add breadcrumb unit test by [@lyx-jay](https://github.com/lyx-jay) in [#457](https://github.com/opentiny/tiny-vue/pull/457)
* refactor(date-table): supplement the ts type declaration of the date-table component by [@kagol](https://github.com/kagol) in [#456](https://github.com/opentiny/tiny-vue/pull/456)
* feat(rich-text-editor): Add api design by [@Caesar-ch](https://github.com/Caesar-ch) in [#475](https://github.com/opentiny/tiny-vue/pull/475)
* docs: optimize time picker demo api docs by [@kagol](https://github.com/kagol) in [#482](https://github.com/opentiny/tiny-vue/pull/482)
* docs: optimzie date picker demo/api by [@kagol](https://github.com/kagol) in [#486](https://github.com/opentiny/tiny-vue/pull/486)
* optimize button docs by [@Binks123](https://github.com/Binks123) in [#522](https://github.com/opentiny/tiny-vue/pull/522)
* docs(anchor): optimize anchor demo api docs by [@Binks123](https://github.com/Binks123) in [#540](https://github.com/opentiny/tiny-vue/pull/540)
* docs(breadcrumb): optimize breadcrumb docs by [@Binks123](https://github.com/Binks123) in [#547](https://github.com/opentiny/tiny-vue/pull/547)
* feat(react): 添加贡献文档readme 改名为 README by [@pe-3](https://github.com/pe-3) in [#538](https://github.com/opentiny/tiny-vue/pull/538)
* docs(README): correct misspellings by [@Zz-ZzzZ](https://github.com/Zz-ZzzZ) in [#561](https://github.com/opentiny/tiny-vue/pull/561)
* fix(divider,color-picker): divider组件content-position描述完善以及部分api关联示例变动color-picker组件修改错误变量 by [@shonen7](https://github.com/shonen7) in [#567](https://github.com/opentiny/tiny-vue/pull/567)
* feat: update pc/mobile/mobile-first docs by [@zzcr](https://github.com/zzcr) in [#583](https://github.com/opentiny/tiny-vue/pull/583)
* docs: update component number by [@kagol](https://github.com/kagol) in [#585](https://github.com/opentiny/tiny-vue/pull/585)
* feat: update docs api by [@zzcr](https://github.com/zzcr) in [#613](https://github.com/opentiny/tiny-vue/pull/613)
* feat(grid-size): table size integration by [@ianxinnew](https://github.com/ianxinnew) in [#617](https://github.com/opentiny/tiny-vue/pull/617)
* fix(grid-slot): Table Example Add Editor Slot by [@ianxinnew](https://github.com/ianxinnew) in [#608](https://github.com/opentiny/tiny-vue/pull/608)
* feat(grid-api): API Remove Default Text by [@ianxinnew](https://github.com/ianxinnew) in [#622](https://github.com/opentiny/tiny-vue/pull/622)
* fix(select-size): select component mediumsmallmini Type For One by [@Xppp0217](https://github.com/Xppp0217) in [#607](https://github.com/opentiny/tiny-vue/pull/607)
* chore: examples/site demo support ts intellisense
* chore(picker): add picker ts declaration(vue.ts)
* chore(timeline): timeline与timelineItem组件补充ts类型
* chore(modal): modal组件补充ts类型声明
* chore(floatbar): floatbar组件补充ts类型声明
* chore(dialog-box): dialog-box组件补充ts类型声明
* chore(numeric): Numeric补充ts类型声明
* chore(playground): 优化playground的编辑器和分享功能
## v2.10.0/v3.10.0
`2023/08/14`
### Exciting New Features 🎉
* feat(pop-editor): 当编辑框弹出时添加自定义事件 fix #268 by @yuanningning in https://github.com/opentiny/tiny-vue/pull/315
* feat(ip-address): 更改ipAddress组件的IPv6类型 close #272 by @yuanningning in https://github.com/opentiny/tiny-vue/pull/337
* feat(pop-editor): 当编辑框弹出时添加自定义事件 fix [#268](https://github.com/opentiny/tiny-vue/issues/268) by [@yuanningning](https://github.com/yuanningning) in [#315](https://github.com/opentiny/tiny-vue/pull/315)
* feat(ip-address): 更改ipAddress组件的IPv6类型 close [#272](https://github.com/opentiny/tiny-vue/issues/272) by [@yuanningning](https://github.com/yuanningning) in [#337](https://github.com/opentiny/tiny-vue/pull/337)
* feat(filter-panel): 新增过滤器面板组件
* feat(dialog-select): 新增 DialogSelect 组件
* feat(infinite-scroll): 新增 InfiniteScroll 无限滚动组件
@ -34,19 +189,19 @@
* feat(date-picker): 支持某日起始/某日为止功能 `type: 'startFrom'`
### Bug Fixes 🐛
* fix(numeric): 修复当前值+Step>max时不能取max的问题 by @Huangyilin19 in https://github.com/opentiny/tiny-vue/pull/297
* fix(grid): 修复了列冻结且没有滚动条时表格组件中的异常样式 by @zzcr in https://github.com/opentiny/tiny-vue/pull/298
* fix(button): 修复了朴素按钮图标禁用颜色的问题 by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/299
* fix(grid): 修复了表过滤器面板的错误样式修复了webpack本地环境下ResizeWatch接口的警告问题 by @zzcr in https://github.com/opentiny/tiny-vue/pull/305
* fix(theme): 从容器、布局中删除样式 by @shenjunjian in https://github.com/opentiny/tiny-vue/pull/306
* fix(vue-theme): 在文本区域组件中修复 `@apply` by @shenjunjian in https://github.com/opentiny/tiny-vue/pull/319
* fix(input): 修复了禁用的输入在表单错误中不生效的问题 by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/322
* fix(checkbox): 修复了复选框标签为0时不显示错误的问题 by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/331
* fix(select): 修复了计算选择组件的高度和错误创建项目的问题 by @MomoPoppy in https://github.com/opentiny/tiny-vue/pull/358
* fix(carousel): 将箭头圆宽度调整为28px by @lyx-jay in https://github.com/opentiny/tiny-vue/pull/376
* fix(drawer): 蒙版消失的速度比内容更快 by @lyx-jay in https://github.com/opentiny/tiny-vue/pull/375
* fix(badge): 修复显示重复内容的问题 by @lyx-jay in https://github.com/opentiny/tiny-vue/pull/382
* fix: 修复了执行 pnpm build:ui vue 命令时的ts声明错误 by @kagol in https://github.com/opentiny/tiny-vue/pull/386
* fix(numeric): 修复当前值+Step>max时不能取max的问题 by [@Huangyilin19](https://github.com/Huangyilin19) in [#297](https://github.com/opentiny/tiny-vue/pull/297)
* fix(grid): 修复了列冻结且没有滚动条时表格组件中的异常样式 by [@zzcr](https://github.com/zzcr) in [#298](https://github.com/opentiny/tiny-vue/pull/298)
* fix(button): 修复了朴素按钮图标禁用颜色的问题 by [@gimmyhehe](https://github.com/gimmyhehe) in [#299](https://github.com/opentiny/tiny-vue/pull/299)
* fix(grid): 修复了表过滤器面板的错误样式修复了webpack本地环境下ResizeWatch接口的警告问题 by [@zzcr](https://github.com/zzcr) in [#305](https://github.com/opentiny/tiny-vue/pull/305)
* fix(theme): 从容器、布局中删除样式 by [@shenjunjian](https://github.com/shenjunjian) in [#306](https://github.com/opentiny/tiny-vue/pull/306)
* fix(vue-theme): 在文本区域组件中修复 `@apply` by [@shenjunjian](https://github.com/shenjunjian) in [#319](https://github.com/opentiny/tiny-vue/pull/319)
* fix(input): 修复了禁用的输入在表单错误中不生效的问题 by [@gimmyhehe](https://github.com/gimmyhehe) in [#322](https://github.com/opentiny/tiny-vue/pull/322)
* fix(checkbox): 修复了复选框标签为0时不显示错误的问题 by [@gimmyhehe](https://github.com/gimmyhehe) in [#331](https://github.com/opentiny/tiny-vue/pull/331)
* fix(select): 修复了计算选择组件的高度和错误创建项目的问题 by [@MomoPoppy](https://github.com/MomoPoppy) in [#358](https://github.com/opentiny/tiny-vue/pull/358)
* fix(carousel): 将箭头圆宽度调整为28px by [@lyx-jay](https://github.com/lyx-jay) in [#376](https://github.com/opentiny/tiny-vue/pull/376)
* fix(drawer): 蒙版消失的速度比内容更快 by [@lyx-jay](https://github.com/lyx-jay) in [#375](https://github.com/opentiny/tiny-vue/pull/375)
* fix(badge): 修复显示重复内容的问题 by [@lyx-jay](https://github.com/lyx-jay) in [#382](https://github.com/opentiny/tiny-vue/pull/382)
* fix: 修复了执行 pnpm build:ui vue 命令时的ts声明错误 by [@kagol](https://github.com/kagol) in [#386](https://github.com/opentiny/tiny-vue/pull/386)
* fix(grid): 修复表格冻结列在x-design规范显示异常问题
* fix(grid): 修复表格冻结列在表格有纵向滚动条时
* fix(grid):修复表格fetchdata情况下表格数据被处理两次问题
@ -65,11 +220,11 @@
* fix(popEditor): 编辑框关闭时先隐藏了内容的问题
### Other Changes
* perf(tooltip): Tooltip 组件性能优化 by @shenjunjian in https://github.com/opentiny/tiny-vue/pull/368
* chore(row): 恢复演示示例中的样式 by @shenjunjian in https://github.com/opentiny/tiny-vue/pull/311
* feat(pnpm-lock): 添加 pnpm-lock.ymal 文件 by @zzcr in https://github.com/opentiny/tiny-vue/pull/320
* feat(button): 完善单元测试 by @chenqifeng66 in https://github.com/opentiny/tiny-vue/pull/364
* test(alert): 增加 Alert 组件单元测试 by @Zz-ZzzZ in https://github.com/opentiny/tiny-vue/pull/369
* perf(tooltip): Tooltip 组件性能优化 by [@shenjunjian](https://github.com/shenjunjian) in [#368](https://github.com/opentiny/tiny-vue/pull/368)
* chore(row): 恢复演示示例中的样式 by [@shenjunjian](https://github.com/shenjunjian) in [#311](https://github.com/opentiny/tiny-vue/pull/311)
* feat(pnpm-lock): 添加 pnpm-lock.ymal 文件 by [@zzcr](https://github.com/zzcr) in [#320](https://github.com/opentiny/tiny-vue/pull/320)
* feat(button): 完善单元测试 by [@chenqifeng66](https://github.com/chenqifeng66) in [#364](https://github.com/opentiny/tiny-vue/pull/364)
* test(alert): 增加 Alert 组件单元测试 by [@Zz-ZzzZ](https://github.com/Zz-ZzzZ) in [#369](https://github.com/opentiny/tiny-vue/pull/369)
* docs(tag): 增加标签灵活用法超出隐藏显示title示例
## v2.9.0/v3.9.0
@ -112,34 +267,34 @@
### Bug Fixes 🐛
- fix: 修复 windows 下 pnpm install rm rf not found by @coderbaozi in <https://github.com/opentiny/tiny-vue/pull/149>
- 修复 build:ui 打包出来的产物有问题 bug修复 input 组件本地开发报警告 bug by @zzcr in <https://github.com/opentiny/tiny-vue/pull/150>
- fix(tabs): fix tab header bottom border line close #154 by @kagol in <https://github.com/opentiny/tiny-vue/pull/155>
- chore: Compatible with windows users by @ErKeLost in <https://github.com/opentiny/tiny-vue/pull/151>
- fix(carousel-item): 合并重复属性 by @linxiang07 in <https://github.com/opentiny/tiny-vue/pull/152>
- fix(checkbox): icon position when checked by @zuixinwang in <https://github.com/opentiny/tiny-vue/pull/164>
- fix(build:runtime): 修复打包 runtime 产物的脚本 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/183>
- fix(build runtime) 修复打包运行时报错问题 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/185>
- fix(carousel) 走马灯手动轮播切换到此处数据会偶现与实际不符 by @WXC-Spring in <https://github.com/opentiny/tiny-vue/pull/188>
- fix(runtime-build) 修复:运行时多入口打包会抽取公共依赖,导致加载报错 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/191>
- fix(dialog-box): 修复对话框移动后动态 style 没更新的 bug by @Huangyilin19 in <https://github.com/opentiny/tiny-vue/pull/195>
- fix(upload) 修复 upload 组件销毁时报错的 bug by @zzcr in <https://github.com/opentiny/tiny-vue/pull/196>
- fix(fileupload): 上传组件增加用户不配置 action 属性产生的报错,告知用户需要配置 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/199>
- fix(button): 修复无内容的情况下上下错位的问题(#194) by @qinwencheng in <https://github.com/opentiny/tiny-vue/pull/203>
- fix: 修复 pullRefresh 组件,数据类型不匹配,导致控制台告警日志超大量打印,导致页面渲染慢的问题 by @MrWang2016 in <https://github.com/opentiny/tiny-vue/pull/211>
- fix: 修复 Breadcrumb 配置 textField 的 demo 不显示面包屑内容 #207 by @yuanningning in <https://github.com/opentiny/tiny-vue/pull/210>
- fix(rate) 修复组件 Rate 半选加禁选后2.5 与 3 星实际不匹配的问题 by @wwttff in <https://github.com/opentiny/tiny-vue/pull/200>
- fix(build) 修复 grid、pager 组件 bug by @zzcr in <https://github.com/opentiny/tiny-vue/pull/240>
- fix: fix npm publish 402 error by @kagol in <https://github.com/opentiny/tiny-vue/pull/241>
* fix: 修复windows下pnpm install rm rf not found by [@coderbaozi](https://github.com/coderbaozi) in [#149](https://github.com/opentiny/tiny-vue/pull/149)
* 修复build:ui打包出来的产物有问题bug修复input组件本地开发报警告bug by [@zzcr](https://github.com/zzcr) in [#150](https://github.com/opentiny/tiny-vue/pull/150)
* fix(tabs): fix tab header bottom border line close [#154](https://github.com/opentiny/tiny-vue/issues/154) by [@kagol](https://github.com/kagol) in [#155](https://github.com/opentiny/tiny-vue/pull/155)
* chore: Compatible with windows users by [@ErKeLost](https://github.com/ErKeLost) in [#151](https://github.com/opentiny/tiny-vue/pull/151)
* fix(carousel-item): 合并重复属性 by [@linxiang07](https://github.com/linxiang07) in [#152](https://github.com/opentiny/tiny-vue/pull/152)
* fix(checkbox): icon position when checked by [@zuixinwang](https://github.com/zuixinwang) in [#164](https://github.com/opentiny/tiny-vue/pull/164)
* fix(build:runtime): 修复打包runtime产物的脚本 by [@shenjunjian](https://github.com/shenjunjian) in [#183](https://github.com/opentiny/tiny-vue/pull/183)
* fix(build runtime) 修复打包运行时报错问题 by [@zzcr](https://github.com/zzcr) in [#185](https://github.com/opentiny/tiny-vue/pull/185)
* fix(carousel) 走马灯手动轮播切换到此处数据会偶现与实际不符 by [@WXC-Spring](https://github.com/WXC-Spring) in [#188](https://github.com/opentiny/tiny-vue/pull/188)
* fix(runtime-build) 修复:运行时多入口打包会抽取公共依赖,导致加载报错 by [@zzcr](https://github.com/zzcr) in [#191](https://github.com/opentiny/tiny-vue/pull/191)
* fix(dialog-box): 修复对话框移动后动态style没更新的bug by [@Huangyilin19](https://github.com/Huangyilin19) in [#195](https://github.com/opentiny/tiny-vue/pull/195)
* fix(upload) 修复upload组件销毁时报错的bug by [@zzcr](https://github.com/zzcr) in [#196](https://github.com/opentiny/tiny-vue/pull/196)
* fix(fileupload): 上传组件增加用户不配置action属性产生的报错告知用户需要配置 by [@chenxi-20](https://github.com/chenxi-20) in [#199](https://github.com/opentiny/tiny-vue/pull/199)
* fix(button): 修复无内容的情况下上下错位的问题([#194](https://github.com/opentiny/tiny-vue/issues/194)) by [@qinwencheng](https://github.com/qinwencheng) in [#203](https://github.com/opentiny/tiny-vue/pull/203)
* fix: 修复pullRefresh组件,数据类型不匹配,导致控制台告警日志超大量打印,导致页面渲染慢的问题 by [@MrWang2016](https://github.com/MrWang2016) in [#211](https://github.com/opentiny/tiny-vue/pull/211)
* fix: 修复Breadcrumb配置textField的demo不显示面包屑内容 [#207](https://github.com/opentiny/tiny-vue/issues/207) by [@yuanningning](https://github.com/yuanningning) in [#210](https://github.com/opentiny/tiny-vue/pull/210)
* fix(rate) 修复组件Rate半选加禁选后2.5与3星实际不匹配的问题 by [@wwttff](https://github.com/wwttff) in [#200](https://github.com/opentiny/tiny-vue/pull/200)
* fix(build) 修复grid、pager组件bug by [@zzcr](https://github.com/zzcr) in [#240](https://github.com/opentiny/tiny-vue/pull/240)
* fix: fix npm publish 402 error by [@kagol](https://github.com/kagol) in [#241](https://github.com/opentiny/tiny-vue/pull/241)
### Other Changes
- chore: 添加文件后缀名 by @CatsAndMice in <https://github.com/opentiny/tiny-vue/pull/160>
- refactor(button): 优化 size 属性校验 by @LadyChatterleyLover in <https://github.com/opentiny/tiny-vue/pull/162>
- docs中英文 README 和贡献指南文档中端口号的修正,以及 Issue 模板中的小助手微信号修正 by @heygsc in <https://github.com/opentiny/tiny-vue/pull/171>
- docs: 增加 all-contributors 机器人 🤖️ 用于自动添加贡献者 by @kagol in <https://github.com/opentiny/tiny-vue/pull/214>
- docs: update README.zh-CN.md by @kagol in <https://github.com/opentiny/tiny-vue/pull/216>
- doc: 修改文档示例 by @GaoNeng-wWw in <https://github.com/opentiny/tiny-vue/pull/224>
* chore: 添加文件后缀名 by [@CatsAndMice](https://github.com/CatsAndMice) in [#160](https://github.com/opentiny/tiny-vue/pull/160)
* refactor(button): 优化size属性校验 by [@LadyChatterleyLover](https://github.com/LadyChatterleyLover) in [#162](https://github.com/opentiny/tiny-vue/pull/162)
* docs中英文README和贡献指南文档中端口号的修正以及Issue模板中的小助手微信号修正 by [@heygsc](https://github.com/heygsc) in [#171](https://github.com/opentiny/tiny-vue/pull/171)
* docs: 增加 all-contributors 机器人🤖️用于自动添加贡献者 by [@kagol](https://github.com/kagol) in [#214](https://github.com/opentiny/tiny-vue/pull/214)
* docs: update README.zh-CN.md by [@kagol](https://github.com/kagol) in [#216](https://github.com/opentiny/tiny-vue/pull/216)
* doc: 修改文档示例 by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#224](https://github.com/opentiny/tiny-vue/pull/224)
## v2.6.6/v3.6.6
@ -147,25 +302,25 @@
### Exciting New Features 🎉
- feat: 增加 vue-vite-import 插件 by @kagol in <https://github.com/opentiny/tiny-vue/pull/135>
- feat: 当 children 为空数组是认为是叶子节点 by @GaoNeng-wWw in <https://github.com/opentiny/tiny-vue/pull/143>
* feat: 增加 vue-vite-import 插件 by [@kagol](https://github.com/kagol) in [#135](https://github.com/opentiny/tiny-vue/pull/135)
* feat: 当children为空数组是认为是叶子节点 by [@GaoNeng-wWw](https://github.com/GaoNeng-wWw) in [#143](https://github.com/opentiny/tiny-vue/pull/143)
### Bug Fixes 🐛
- fix(ipaddress): 切换 tab 键会从 192 跳过 168 到 0 by @rayhaoqin in <https://github.com/opentiny/tiny-vue/pull/122>
- fix: 修复 pnpm dev:docs 报错的问题。 by @ygj6 in <https://github.com/opentiny/tiny-vue/pull/123>
- fix: fix vuepress-vite version error when execute pnpm i by @kagol in <https://github.com/opentiny/tiny-vue/pull/126>
- fix(chart-line): fix line-chart tooltip.axisPointer.lineStyle does not take effect close #130 by @kagol in <https://github.com/opentiny/tiny-vue/pull/131>
- fix(types): 修复 vue3-example 项目中的 ts 报错。 by @ygj6 in <https://github.com/opentiny/tiny-vue/pull/132>
- fix(date-picker): fix date-picker style by @kagol in <https://github.com/opentiny/tiny-vue/pull/136>
- Fix issue #115 by @acyza in <https://github.com/opentiny/tiny-vue/pull/116>
- fix(table): table-misaligned when frozen columns by @awspi in <https://github.com/opentiny/tiny-vue/pull/140>
- 修复 tooltip`append-to-body="false"`时在表格中位置计算错误 by @acyza in <https://github.com/opentiny/tiny-vue/pull/146>
- fix(pull-refresh): 修复下拉刷新组件频繁触发的问题 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/145>
* fix(ipaddress): 切换tab键会从192跳过168到0 by [@rayhaoqin](https://github.com/rayhaoqin) in [#122](https://github.com/opentiny/tiny-vue/pull/122)
* fix: 修复 pnpm dev:docs 报错的问题。 by [@ygj6](https://github.com/ygj6) in [#123](https://github.com/opentiny/tiny-vue/pull/123)
* fix: fix vuepress-vite version error when execute pnpm i by [@kagol](https://github.com/kagol) in [#126](https://github.com/opentiny/tiny-vue/pull/126)
* fix(chart-line): fix line-chart tooltip.axisPointer.lineStyle does not take effect close [#130](https://github.com/opentiny/tiny-vue/issues/130) by [@kagol](https://github.com/kagol) in [#131](https://github.com/opentiny/tiny-vue/pull/131)
* fix(types): 修复vue3-example项目中的ts报错。 by [@ygj6](https://github.com/ygj6) in [#132](https://github.com/opentiny/tiny-vue/pull/132)
* fix(date-picker): fix date-picker style by [@kagol](https://github.com/kagol) in [#136](https://github.com/opentiny/tiny-vue/pull/136)
* Fix issue [#115](https://github.com/opentiny/tiny-vue/issues/115) by [@acyza](https://github.com/acyza) in [#116](https://github.com/opentiny/tiny-vue/pull/116)
* fix(table): table-misaligned when frozen columns by [@awspi](https://github.com/awspi) in [#140](https://github.com/opentiny/tiny-vue/pull/140)
* 修复tooltip`append-to-body="false"`时在表格中位置计算错误 by [@acyza](https://github.com/acyza) in [#146](https://github.com/opentiny/tiny-vue/pull/146)
* fix(pull-refresh): 修复下拉刷新组件频繁触发的问题 by [@TC-twwang](https://github.com/TC-twwang) in [#145](https://github.com/opentiny/tiny-vue/pull/145)
### Other Changes
- refactor(tabs): optimize new tab button postion close #127 by @kagol in <https://github.com/opentiny/tiny-vue/pull/128>
* refactor(tabs): optimize new tab button postion close [#127](https://github.com/opentiny/tiny-vue/issues/127) by [@kagol](https://github.com/kagol) in [#128](https://github.com/opentiny/tiny-vue/pull/128)
## v2.6.1/v3.6.1
@ -173,32 +328,32 @@
### Exciting New Features 🎉
- feat(timeline): 增加箭头点击区域 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/103>
* feat(timeline): 增加箭头点击区域 by [@MNZhu](https://github.com/MNZhu) in [#103](https://github.com/opentiny/tiny-vue/pull/103)
### Bug Fixes 🐛
- fix(radio): 修复主题配置 radio-button 无法继承属性的 bug打开可继承属性 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/82>
- fix: fix monorepo by @kagol in <https://github.com/opentiny/tiny-vue/pull/91>
- fix(anchor): 修复父锚点指示异常的问题 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/93>
- fix: Failed to resolve entry for package "@opentiny/vue" close #99 by @kagol in <https://github.com/opentiny/tiny-vue/pull/100>
- fix(upload): 取消 fileupload 组件的自动隐藏和提示功能,修改成用户可自定义配置 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/95>
- fix(exception): 优化定位布局样式 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/104>
- fix(timeline): 修复单个节点数据显示线条问题 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/105>
- fix: 修复打包,发布报错等问题,调整类型声明等问题 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/108>
- fix(vue-common): 修复 adapter 中的 mode 的传值问题 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/110>
- fix: 修复文档初始`pathname`错误 by @acyza in <https://github.com/opentiny/tiny-vue/pull/107>
- fix: 修复国际化键值的问题 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/111>
- fix: 添加打包前置脚本 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/112>
- fix(vue-panel): 修复 panel 的问题 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/113>
- fix: Removing the invalid resource path enables `pnpm dev` to succeed. by @ygj6 in <https://github.com/opentiny/tiny-vue/pull/109>
- fix: fix build error by @kagol in <https://github.com/opentiny/tiny-vue/pull/119>
- fix(grid): 使用 gpu 加速优化虚拟滚动性能,修复筛选面板单选框无法选中问题 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/121>
* fix(radio): 修复主题配置radio-button无法继承属性的bug打开可继承属性 by [@chenxi-20](https://github.com/chenxi-20) in [#82](https://github.com/opentiny/tiny-vue/pull/82)
* fix: fix monorepo by [@kagol](https://github.com/kagol) in [#91](https://github.com/opentiny/tiny-vue/pull/91)
* fix(anchor): 修复父锚点指示异常的问题 by [@chenxi-20](https://github.com/chenxi-20) in [#93](https://github.com/opentiny/tiny-vue/pull/93)
* fix: Failed to resolve entry for package "@opentiny/vue" close [#99](https://github.com/opentiny/tiny-vue/issues/99) by [@kagol](https://github.com/kagol) in [#100](https://github.com/opentiny/tiny-vue/pull/100)
* fix(upload): 取消fileupload组件的自动隐藏和提示功能修改成用户可自定义配置 by [@chenxi-20](https://github.com/chenxi-20) in [#95](https://github.com/opentiny/tiny-vue/pull/95)
* fix(exception): 优化定位布局样式 by [@MNZhu](https://github.com/MNZhu) in [#104](https://github.com/opentiny/tiny-vue/pull/104)
* fix(timeline): 修复单个节点数据显示线条问题 by [@MNZhu](https://github.com/MNZhu) in [#105](https://github.com/opentiny/tiny-vue/pull/105)
* fix: 修复打包,发布报错等问题,调整类型声明等问题 by [@zzcr](https://github.com/zzcr) in [#108](https://github.com/opentiny/tiny-vue/pull/108)
* fix(vue-common): 修复adapter中的mode的传值问题 by [@shenjunjian](https://github.com/shenjunjian) in [#110](https://github.com/opentiny/tiny-vue/pull/110)
* fix: 修复文档初始`pathname`错误 by [@acyza](https://github.com/acyza) in [#107](https://github.com/opentiny/tiny-vue/pull/107)
* fix: 修复国际化键值的问题 by [@shenjunjian](https://github.com/shenjunjian) in [#111](https://github.com/opentiny/tiny-vue/pull/111)
* fix: 添加打包前置脚本 by [@zzcr](https://github.com/zzcr) in [#112](https://github.com/opentiny/tiny-vue/pull/112)
* fix(vue-panel): 修复panel 的问题 by [@shenjunjian](https://github.com/shenjunjian) in [#113](https://github.com/opentiny/tiny-vue/pull/113)
* fix: Removing the invalid resource path enables `pnpm dev` to succeed. by [@ygj6](https://github.com/ygj6) in [#109](https://github.com/opentiny/tiny-vue/pull/109)
* fix: fix build error by [@kagol](https://github.com/kagol) in [#119](https://github.com/opentiny/tiny-vue/pull/119)
* fix(grid): 使用gpu加速优化虚拟滚动性能修复筛选面板单选框无法选中问题 by [@zzcr](https://github.com/zzcr) in [#121](https://github.com/opentiny/tiny-vue/pull/121)
### Other Changes
- refactor: Refactor project to Monorepo and TypeScript by @kagol in <https://github.com/opentiny/tiny-vue/pull/90>
- refactor: remove useless files by @kagol in <https://github.com/opentiny/tiny-vue/pull/92>
- docs: update README by @kagol in <https://github.com/opentiny/tiny-vue/pull/98>
* refactor: Refactor project to Monorepo and TypeScript by [@kagol](https://github.com/kagol) in [#90](https://github.com/opentiny/tiny-vue/pull/90)
* refactor: remove useless files by [@kagol](https://github.com/kagol) in [#92](https://github.com/opentiny/tiny-vue/pull/92)
* docs: update README by [@kagol](https://github.com/kagol) in [#98](https://github.com/opentiny/tiny-vue/pull/98)
## v2.6.0/v3.6.0
@ -206,56 +361,56 @@
### Exciting New Features 🎉
- feat(anchor): 新增 anchor 组件第一个功能:基本使用 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/30>
- feat(modal): 增加反馈弹窗 modal 组件 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/19>
- feat(button): 按钮组件样式修改 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/21>
- feat(multi-select): 增加下拉选择器 multi-select 组件 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/22>
- feat(search): 搜索组件样式修改 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/33>
- feat(anchor): 添加锚点 anchor 组件 onchange 事件 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/35>
- feat(timeline): 时间线插槽作用域增加 index 属性 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/39>
- feat(timeline): timeline 样式修改 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/38>
- feat(form): form 组件增加自动换行 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/40>
- feat(indexbar): 增加索引组件 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/47>
- feat(form): form 组件增加自动换行-检视意见修改 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/54>
- feat(anchor): 锚点组件增加固定模式,修复示例文档 bug 问题 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/49>
- feat(anchor): 修复检视意见,同步远程代码 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/55>
- feat(anchor): 调整 anchor 组件,让其可以适配主题配置 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/57>
- feat(badge): add badge-class close #50 by @kagol in <https://github.com/opentiny/tiny-vue/pull/51>
- feat(tag): add beforeDelete props by @kagol in <https://github.com/opentiny/tiny-vue/pull/52>
- feat(form): form 组件增加自动换行-增加移动端条件校验 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/58>
- feat(switch): add beforeChange props by @kagol in <https://github.com/opentiny/tiny-vue/pull/59>
- feat(fullscreen): add beforeChange props by @kagol in <https://github.com/opentiny/tiny-vue/pull/61>
- feat(badge): add offset props by @kagol in <https://github.com/opentiny/tiny-vue/pull/63>
- feat(tabs): tabs 组件支持展开 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/60>
- feat(split): add collapsible props by @kagol in <https://github.com/opentiny/tiny-vue/pull/64>
- feat(pull-refresh): pull-refresh 组件支持上拉刷新 by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/67>
- feat(tabs): 增加 tabs 组件超出隐藏提示 tip 配置 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/68>
- feat(action-menu): 修复 ActionMenu 下拉后箭头旋转向上 by @MomoPoppy in <https://github.com/opentiny/tiny-vue/pull/70>
- feat(transfer): add beforeTransfer props by @kagol in <https://github.com/opentiny/tiny-vue/pull/75>
- feat(search): add prefix/suffix slots by @kagol in <https://github.com/opentiny/tiny-vue/pull/77>
* feat(anchor): 新增anchor组件第一个功能基本使用 by [@chenxi-20](https://github.com/chenxi-20) in [#30](https://github.com/opentiny/tiny-vue/pull/30)
* feat(modal): 增加反馈弹窗modal组件 by [@MNZhu](https://github.com/MNZhu) in [#19](https://github.com/opentiny/tiny-vue/pull/19)
* feat(button): 按钮组件样式修改 by [@MNZhu](https://github.com/MNZhu) in [#21](https://github.com/opentiny/tiny-vue/pull/21)
* feat(multi-select): 增加下拉选择器multi-select组件 by [@TC-twwang](https://github.com/TC-twwang) in [#22](https://github.com/opentiny/tiny-vue/pull/22)
* feat(search): 搜索组件样式修改 by [@MNZhu](https://github.com/MNZhu) in [#33](https://github.com/opentiny/tiny-vue/pull/33)
* feat(anchor): 添加锚点anchor组件onchange事件 by [@chenxi-20](https://github.com/chenxi-20) in [#35](https://github.com/opentiny/tiny-vue/pull/35)
* feat(timeline): 时间线插槽作用域增加index属性 by [@chenxi-20](https://github.com/chenxi-20) in [#39](https://github.com/opentiny/tiny-vue/pull/39)
* feat(timeline): timeline样式修改 by [@MNZhu](https://github.com/MNZhu) in [#38](https://github.com/opentiny/tiny-vue/pull/38)
* feat(form): form组件增加自动换行 by [@TC-twwang](https://github.com/TC-twwang) in [#40](https://github.com/opentiny/tiny-vue/pull/40)
* feat(indexbar): 增加索引组件 by [@MNZhu](https://github.com/MNZhu) in [#47](https://github.com/opentiny/tiny-vue/pull/47)
* feat(form): form组件增加自动换行-检视意见修改 by [@TC-twwang](https://github.com/TC-twwang) in [#54](https://github.com/opentiny/tiny-vue/pull/54)
* feat(anchor): 锚点组件增加固定模式修复示例文档bug问题 by [@chenxi-20](https://github.com/chenxi-20) in [#49](https://github.com/opentiny/tiny-vue/pull/49)
* feat(anchor): 修复检视意见,同步远程代码 by [@chenxi-20](https://github.com/chenxi-20) in [#55](https://github.com/opentiny/tiny-vue/pull/55)
* feat(anchor): 调整anchor组件让其可以适配主题配置 by [@chenxi-20](https://github.com/chenxi-20) in [#57](https://github.com/opentiny/tiny-vue/pull/57)
* feat(badge): add badge-class close [#50](https://github.com/opentiny/tiny-vue/issues/50) by [@kagol](https://github.com/kagol) in [#51](https://github.com/opentiny/tiny-vue/pull/51)
* feat(tag): add beforeDelete props by [@kagol](https://github.com/kagol) in [#52](https://github.com/opentiny/tiny-vue/pull/52)
* feat(form): form组件增加自动换行-增加移动端条件校验 by [@TC-twwang](https://github.com/TC-twwang) in [#58](https://github.com/opentiny/tiny-vue/pull/58)
* feat(switch): add beforeChange props by [@kagol](https://github.com/kagol) in [#59](https://github.com/opentiny/tiny-vue/pull/59)
* feat(fullscreen): add beforeChange props by [@kagol](https://github.com/kagol) in [#61](https://github.com/opentiny/tiny-vue/pull/61)
* feat(badge): add offset props by [@kagol](https://github.com/kagol) in [#63](https://github.com/opentiny/tiny-vue/pull/63)
* feat(tabs): tabs组件支持展开 by [@TC-twwang](https://github.com/TC-twwang) in [#60](https://github.com/opentiny/tiny-vue/pull/60)
* feat(split): add collapsible props by [@kagol](https://github.com/kagol) in [#64](https://github.com/opentiny/tiny-vue/pull/64)
* feat(pull-refresh): pull-refresh组件支持上拉刷新 by [@TC-twwang](https://github.com/TC-twwang) in [#67](https://github.com/opentiny/tiny-vue/pull/67)
* feat(tabs): 增加tabs组件超出隐藏提示tip配置 by [@chenxi-20](https://github.com/chenxi-20) in [#68](https://github.com/opentiny/tiny-vue/pull/68)
* feat(action-menu): 修复 ActionMenu 下拉后箭头旋转向上 by [@MomoPoppy](https://github.com/MomoPoppy) in [#70](https://github.com/opentiny/tiny-vue/pull/70)
* feat(transfer): add beforeTransfer props by [@kagol](https://github.com/kagol) in [#75](https://github.com/opentiny/tiny-vue/pull/75)
* feat(search): add prefix/suffix slots by [@kagol](https://github.com/kagol) in [#77](https://github.com/opentiny/tiny-vue/pull/77)
### Bug Fixes 🐛
- fix(ipaddress): form 的示例增加 numeric,ipaddress 的校验示例 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/29>
- fix: 修复构建错误 by @kagol in <https://github.com/opentiny/tiny-vue/pull/25>
- fix: 修复 echarts 和 cropperjs 依赖版本落后问题 by @yuanningning in <https://github.com/opentiny/tiny-vue/pull/27>
- fix(grid): 修复表格再虚拟滚动模式下,始终有横向滚动条问题 by @zzcr in <https://github.com/opentiny/tiny-vue/pull/32>
- fix(checkbox): 修复 vue3 模式下checkbox-group 的 change 事件触发 2 次的问题 by @shenjunjian in <https://github.com/opentiny/tiny-vue/pull/31>
- fix(anchor): 修复 anchor 组件 MD 文档说明 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/34>
- fix(milestone): 修复里程碑图标不对齐 bug by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/37>
- fix: 修复存在 2 个高度不一样的 notify 时,新增的 notify 高度错误 by @rayhaoqin in <https://github.com/opentiny/tiny-vue/pull/26>
- fix(switch): switch 组件提示文字只在首次显示,切换开关状态后提示文字消失 by @yuanningning in <https://github.com/opentiny/tiny-vue/pull/42>
- fix(tiny-loading): 修复 loading 组件在 vue2.0 版本报错 bug by @zzcr in <https://github.com/opentiny/tiny-vue/pull/46>
- fix(indexbar): 类命名整改 by @MNZhu in <https://github.com/opentiny/tiny-vue/pull/56>
- fix(dropdown): 修复 dropdown 下拉后箭头旋转向上 by @MomoPoppy in <https://github.com/opentiny/tiny-vue/pull/45>
- fix(cascader): 修复级联组件属性无法透传问题 by @rayhaoqin in <https://github.com/opentiny/tiny-vue/pull/66>
- fix(dropdown-mobile): 修复移动端组件 dropdownMenu 无法正常渲染的问题,顺带修复 pc 端 dropDown 组件的警告 by @chenxi-20 in <https://github.com/opentiny/tiny-vue/pull/80>
- fix: 修复 tabs 组件展开内容被遮盖multi-slect 返回值增加 value by @TC-twwang in <https://github.com/opentiny/tiny-vue/pull/81>
* fix(ipaddress): form的示例增加numeric,ipaddress的校验示例 by [@shenjunjian](https://github.com/shenjunjian) in [#29](https://github.com/opentiny/tiny-vue/pull/29)
* fix: 修复构建错误 by [@kagol](https://github.com/kagol) in [#25](https://github.com/opentiny/tiny-vue/pull/25)
* fix: 修复echarts和cropperjs依赖版本落后问题 by [@yuanningning](https://github.com/yuanningning) in [#27](https://github.com/opentiny/tiny-vue/pull/27)
* fix(grid): 修复表格再虚拟滚动模式下,始终有横向滚动条问题 by [@zzcr](https://github.com/zzcr) in [#32](https://github.com/opentiny/tiny-vue/pull/32)
* fix(checkbox): 修复vue3模式下checkbox-group的change事件触发2次的问题 by [@shenjunjian](https://github.com/shenjunjian) in [#31](https://github.com/opentiny/tiny-vue/pull/31)
* fix(anchor): 修复anchor组件MD文档说明 by [@chenxi-20](https://github.com/chenxi-20) in [#34](https://github.com/opentiny/tiny-vue/pull/34)
* fix(milestone): 修复里程碑图标不对齐bug by [@chenxi-20](https://github.com/chenxi-20) in [#37](https://github.com/opentiny/tiny-vue/pull/37)
* fix: 修复存在2个高度不一样的notify时新增的notify高度错误 by [@rayhaoqin](https://github.com/rayhaoqin) in [#26](https://github.com/opentiny/tiny-vue/pull/26)
* fix(switch): switch组件提示文字只在首次显示切换开关状态后提示文字消失 by [@yuanningning](https://github.com/yuanningning) in [#42](https://github.com/opentiny/tiny-vue/pull/42)
* fix(tiny-loading): 修复loading组件在vue2.0版本报错bug by [@zzcr](https://github.com/zzcr) in [#46](https://github.com/opentiny/tiny-vue/pull/46)
* fix(indexbar): 类命名整改 by [@MNZhu](https://github.com/MNZhu) in [#56](https://github.com/opentiny/tiny-vue/pull/56)
* fix(dropdown): 修复 dropdown 下拉后箭头旋转向上 by [@MomoPoppy](https://github.com/MomoPoppy) in [#45](https://github.com/opentiny/tiny-vue/pull/45)
* fix(cascader): 修复级联组件属性无法透传问题 by [@rayhaoqin](https://github.com/rayhaoqin) in [#66](https://github.com/opentiny/tiny-vue/pull/66)
* fix(dropdown-mobile): 修复移动端组件dropdownMenu无法正常渲染的问题顺带修复pc端dropDown组件的警告 by [@chenxi-20](https://github.com/chenxi-20) in [#80](https://github.com/opentiny/tiny-vue/pull/80)
* fix: 修复tabs组件展开内容被遮盖multi-slect返回值增加value by [@TC-twwang](https://github.com/TC-twwang) in [#81](https://github.com/opentiny/tiny-vue/pull/81)
### Other Changes
- docs: update CONTRIBUTING.md by @kagol in <https://github.com/opentiny/tiny-vue/pull/62>
- docs: add english README and CONTRIBUTING by @kagol in <https://github.com/opentiny/tiny-vue/pull/79>
* docs: update CONTRIBUTING.md by [@kagol](https://github.com/kagol) in [#62](https://github.com/opentiny/tiny-vue/pull/62)
* docs: add english README and CONTRIBUTING by [@kagol](https://github.com/kagol) in [#79](https://github.com/opentiny/tiny-vue/pull/79)
## v2.5.0/v3.5.0

View File

@ -9,7 +9,9 @@
| Vue2.x | @opentiny/vue@2.x |
| Vue3.x | @opentiny/vue@3.x |
Currently, TinyVue does not support Vue2.7. When the project uses the Vue2.0 framework, the recommended version format is `"vue": "~2.6.14", "vue-template-compiler": "~2.6.14"`.
**Vue2 Engineering Description**
For a long time, TinyVue only supports Vue 2.6.14. Starting from TinyVue 2.11.0, the project of Vue 2.7+ is also supported. Make sure that you have installed the correct Vue 2.x dependency.
### New Project Configuration

View File

@ -9,7 +9,9 @@
| Vue2.x | @opentiny/vue@2.x |
| Vue3.x | @opentiny/vue@3.x |
`TinyVue` 暂时不支持 `Vue2.7`, 当项目使用`Vue2.0`框架时,推荐版本写法:`"vue": "~2.6.14" , "vue-template-compiler": "~2.6.14"` 。
**Vue2工程说明**
长期以来TinyVue 都是只支持 Vue 2.6.14 版本。 从 TinyVue 2.11.0 开始,也支持 Vue 2.7+的工程了请确保你安装了正确的Vue 2.x的依赖。
### 全新项目配置

View File

@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-docs",
"version": "2.1.32",
"version": "2.1.1",
"scripts": {
"start": "vite",
"start:saas": "vite --mode saas",

View File

@ -13,7 +13,7 @@ import Sun from './icons/Sun.vue'
import Moon from './icons/Moon.vue'
import Share from './icons/Share.vue'
const versions = ['3.10.0', '3.9.1', '3.8.4']
const versions = ['3.11', '3.10', '3.9', '3.8']
const latestVersion = versions[0]
const cdnHost = 'https://unpkg.com'
window.localStorage.setItem('setting-cdn', cdnHost)

View File

@ -7,7 +7,7 @@ declare module '*.vue' {
}
interface ImportMetaEnv {
readonly VITE_AUI_MODE: 'pc' | 'mobile' | 'mobile-first'
readonly VITE_TINY_MODE: 'pc' | 'mobile' | 'mobile-first'
// 更多环境变量...
}

View File

@ -57,7 +57,7 @@
"esno": "^0.16.3",
"fast-glob": "^3.2.12",
"rollup-plugin-replace": "^2.2.0",
"vite-plugin-dts": "^3.0.0",
"vite-plugin-dts": "~3.0.0",
"vite-plugin-svgr": "^3.2.0",
"vite-svg-loader": "^3.6.0"
}

View File

@ -1,9 +1,7 @@
import type { IColorSelectPanel } from "@/types";
import type { IColorSelectPanel } from '@/types'
export const calcLeftByAlpha = (wrapper: HTMLElement, thumb: HTMLElement, alpha: number) => {
return Math.round(
(alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2)) / 100
)
return Math.round((alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2)) / 100)
}
export const updateThumb = (alpha: number, thumb: HTMLElement, wrapper: HTMLElement) => {
@ -11,7 +9,9 @@ export const updateThumb = (alpha: number, thumb: HTMLElement, wrapper: HTMLElem
}
export const onDrag = (
event: MouseEvent, bar: IColorSelectPanel<HTMLElement>, thumb: IColorSelectPanel<HTMLElement>,
event: MouseEvent,
bar: IColorSelectPanel<HTMLElement>,
thumb: IColorSelectPanel<HTMLElement>,
alpha: IColorSelectPanel<number>
) => {
const rect = bar.value.getBoundingClientRect()
@ -19,7 +19,5 @@ export const onDrag = (
let left = clientX - rect.left
left = Math.max(thumb.value.offsetWidth / 2, left)
left = Math.min(left, rect.width - thumb.value.offsetWidth / 2)
alpha.value = Math.round(
((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth)) * 100
)
alpha.value = Math.round(((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth)) * 100)
}

View File

@ -1,4 +1,4 @@
import {IColorPickerRef as Ref} from '@/types';
import { IColorPickerRef as Ref } from '@/types'
import Color from '../utils/color'
import { draggable } from '../utils/use-drag'
import { onDrag, updateThumb } from '.'
@ -16,13 +16,16 @@ export const renderless = (props, context, { emit }) => {
const alphaWrapper: Ref<HTMLElement> = context.ref()
const alphaThumb: Ref<HTMLElement> = context.ref()
const alpha = context.ref(color.get('a'))
context.watch(() => props.color, (hex: string) => {
color.reset(hex)
const [rr, gg, bb] = color.getRGB()
r.value = rr
g.value = gg
b.value = bb
})
context.watch(
() => props.color,
(hex: string) => {
color.reset(hex)
const [rr, gg, bb] = color.getRGB()
r.value = rr
g.value = gg
b.value = bb
}
)
context.watch(alpha, (newAlpha) => {
updateThumb(newAlpha, alphaThumb.value, alphaWrapper.value)
emit('alpha-update', alpha.value)
@ -36,10 +39,9 @@ export const renderless = (props, context, { emit }) => {
})
const api = {
state,
color: props.color,
slider,
alphaWrapper,
alphaThumb,
alphaThumb
}
context.onMounted(() => {
updateThumb(alpha.value, alphaThumb.value, slider.value)
@ -49,7 +51,7 @@ export const renderless = (props, context, { emit }) => {
},
start(event) {
onDrag(event as MouseEvent, slider, alphaThumb, alpha)
},
}
})
})
return api

View File

@ -7,7 +7,11 @@ export const setPosition = (el: HTMLElement, x: number, y: number) => {
}
export const getXBySaturation = (s: number, width: number) => (s * width) / 100
export const getYByLight = (l: number, height: number) => ((100 - l) * height) / 100
export const updatePosition = (event: MouseEvent | TouchEvent, rect: DOMRect, cursor: IColorSelectPanel<HTMLElement>) => {
export const updatePosition = (
event: MouseEvent | TouchEvent,
rect: DOMRect,
cursor: IColorSelectPanel<HTMLElement>
) => {
let x = (event as MouseEvent).clientX - rect.left
let y = (event as MouseEvent).clientY - rect.top
x = Math.max(0, x)
@ -15,27 +19,27 @@ export const updatePosition = (event: MouseEvent | TouchEvent, rect: DOMRect, cu
y = Math.max(0, y)
y = Math.min(y, rect.height)
setPosition(cursor.value, x - 1 / 2 * cursor.value.offsetWidth, y - 1 / 2 * cursor.value.offsetWidth)
setPosition(cursor.value, x - (1 / 2) * cursor.value.offsetWidth, y - (1 / 2) * cursor.value.offsetWidth)
return { x, y }
}
export const calcSaturation = (x: number, width: number) => (x / width)
export const calcSaturation = (x: number, width: number) => x / width
export const calcBrightness = (y: number, height: number) => 100 - (y / height) * 100
export const getThumbTop = (wrapper: HTMLElement, thumb: HTMLElement, hue: number) => {
return Math.round(
(hue * (wrapper.offsetHeight - thumb.offsetHeight / 2)) / 360
)
return Math.round((hue * (wrapper.offsetHeight - thumb.offsetHeight / 2)) / 360)
}
export const resetCursor = (
s: number, v: number,
s: number,
v: number,
wrapper: IColorSelectPanel<HTMLElement>,
cursor: IColorSelectPanel<HTMLElement>,
thumb: IColorSelectPanel<HTMLElement>,
color: Color, h: IColorSelectPanel<number>
color: Color,
h: IColorSelectPanel<number>
) => {
const { width, height } = wrapper.value.getBoundingClientRect()
const x = getXBySaturation(s, width) - 1 / 2 * cursor.value.offsetWidth
const y = getYByLight(v, height) - 1 / 2 * cursor.value.offsetWidth
const x = getXBySaturation(s, width) - (1 / 2) * cursor.value.offsetWidth
const y = getYByLight(v, height) - (1 / 2) * cursor.value.offsetWidth
setPosition(cursor.value, x < 0 ? 0 : x, y < 0 ? 0 : y)
const thummbTop = getThumbTop(wrapper.value, thumb.value, color.get('h'))
thumb.value.style.top = `${thummbTop}px`
@ -43,9 +47,9 @@ export const resetCursor = (
}
export const updateCursor = (wrapper: IColorSelectPanel<HTMLElement>, cursor: IColorSelectPanel<HTMLElement>, emit) => {
return (color: Color, event: MouseEvent)=>{
const rect = wrapper.value.getBoundingClientRect();
const {x,y} = updatePosition(event, rect, cursor)
return (color: Color, event: MouseEvent) => {
const rect = wrapper.value.getBoundingClientRect()
const { x, y } = updatePosition(event, rect, cursor)
color.set({
s: calcSaturation(x, rect.width) * 100,
v: calcBrightness(y, rect.height)
@ -63,18 +67,14 @@ export const updateThumb = (
h: IColorSelectPanel<Number>,
emit
) => {
return (event: MouseEvent)=>{
return (event: MouseEvent) => {
const e = event as MouseEvent
const rect = bar.value.getBoundingClientRect()
let top = e.clientY - rect.top
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)
top = Math.max(thumb.value.offsetHeight / 2, top)
thumb.value.style.top = `${top}px`
h.value = Math.round(
((top - thumb.value.offsetHeight / 2) /
(rect.height - thumb.value.offsetHeight)) *
360
)
emit('hue-update', h.value)
const rect = bar.value.getBoundingClientRect()
let top = e.clientY - rect.top
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)
top = Math.max(thumb.value.offsetHeight / 2, top)
thumb.value.style.top = `${top}px`
h.value = Math.round(((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight)) * 360)
emit('hue-update', h.value)
}
}
}

View File

@ -1,12 +1,7 @@
import {IColorSelectPanel as Ref} from '@/types';
import { IColorSelectPanel as Ref } from '@/types'
import { draggable } from '../utils/use-drag'
import Color from '../utils/color'
import {
getThumbTop,
resetCursor,
updateThumb,
updateCursor,
} from './index'
import { getThumbTop, resetCursor, updateThumb, updateCursor } from './index'
export const api = ['state', 'cursor', 'wrapper', 'bar', 'thumb']
export const renderless = (props, context, { emit }) => {
@ -24,40 +19,35 @@ export const renderless = (props, context, { emit }) => {
background
})
const api = { state, cursor, wrapper, bar, thumb }
context.watch(() => props.color, (newColor) => {
color.reset(newColor)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
})
context.watch(
() => props.color,
(newColor) => {
color.reset(newColor)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
}
)
context.onMounted(() => {
const update = {
thumb: updateThumb(bar, thumb, h, emit),
cursor: updateCursor(wrapper,cursor,emit)
};
cursor: updateCursor(wrapper, cursor, emit)
}
const thumbTop = getThumbTop(wrapper.value, thumb.value, h.value)
thumb.value.style.top = `${thumbTop}px`
resetCursor(
color.get('s'),
color.get('v'),
wrapper,
cursor,
thumb,
color,
h
)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
draggable(wrapper.value, {
drag(event) {
update.cursor(color, event as MouseEvent);
update.cursor(color, event as MouseEvent)
},
start(event) {
update.cursor(color, event as MouseEvent);
},
update.cursor(color, event as MouseEvent)
}
})
draggable(bar.value, {
drag(event) {
update.thumb(event as MouseEvent)
},
start(event){
update.thumb(event as MouseEvent);
start(event) {
update.thumb(event as MouseEvent)
}
})
})

View File

@ -1,12 +1,15 @@
import {IColorPickerRef, IColorSelectPanelRef} from '@/types';
import { IColorPickerRef, IColorSelectPanelRef } from '@/types'
import type Color from './utils/color'
export const onConfirm = (
hex: IColorSelectPanelRef<string>, triggerBg: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>, emit, isShow: IColorSelectPanelRef<boolean>
hex: IColorSelectPanelRef<string>,
triggerBg: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>,
emit,
isShow: IColorSelectPanelRef<boolean>
) => {
return (color: string) => {
res.value=color;
res.value = color
hex.value = res.value
triggerBg.value = res.value
emit('confirm', res.value)
@ -15,11 +18,15 @@ export const onConfirm = (
}
export const onCancel = (
res: IColorSelectPanelRef<string>, triggerBg: IColorSelectPanelRef<string>, emit, isShow: IColorSelectPanelRef<boolean>,
hex: IColorSelectPanelRef<string>, color: Color
res: IColorSelectPanelRef<string>,
triggerBg: IColorSelectPanelRef<string>,
emit,
isShow: IColorSelectPanelRef<boolean>,
hex: IColorSelectPanelRef<string>,
color: Color
) => {
return () => {
if (isShow.value){
if (isShow.value) {
res.value = triggerBg.value
hex.value = triggerBg.value
color.reset(hex.value)

View File

@ -10,7 +10,10 @@ function hexToRgb(hex: string) {
const normalizeHexColor = (color: string) => {
let normalizedColor: string = color.replace('#', '')
if (normalizedColor.length === 3) {
normalizedColor = normalizedColor.split('').map(char => char + char).join('')
normalizedColor = normalizedColor
.split('')
.map((char) => char + char)
.join('')
}
normalizedColor = normalizedColor.padEnd(6, '0')
@ -79,7 +82,9 @@ export default class Color {
if (!this.enableAlpha) {
return hsv(this.h, this.s, this.v).hex().toString()
}
return hsv(this.h, this.s, this.v, this.a / 100).hexa().toString()
return hsv(this.h, this.s, this.v, this.a / 100)
.hexa()
.toString()
}
/**

View File

@ -1,4 +1,4 @@
import {IColorSelectPanelRef as Ref} from '@/types';
import { IColorSelectPanelRef as Ref } from '@/types'
import Color from './utils/color'
import { onConfirm, onCancel, onHSVUpdate, onAlphaUpdate } from '.'
@ -15,11 +15,7 @@ export const api = [
'alpha'
]
export const renderless = (
props,
context,
{ emit }
) => {
export const renderless = (props, context, { emit }) => {
const { modelValue, visible } = context.toRefs(props)
const hex = context.ref(modelValue.value ?? 'transparent')
const res = context.ref(modelValue.value ?? 'transparent')
@ -47,6 +43,7 @@ export const renderless = (
context.watch(visible, (visible) => {
isShow.value = visible
})
const { onHueUpdate, onSVUpdate } = onHSVUpdate(color, res, hex)
const { update } = onAlphaUpdate(color, res)
const api = {
@ -57,8 +54,7 @@ export const renderless = (
onConfirm: onConfirm(hex, triggerBg, res, emit, isShow),
onCancel: onCancel(res, triggerBg, emit, isShow, hex, color),
onAlphaUpdate: update,
cursor,
alpha: props.alpha
cursor
}
return api
}

View File

@ -1,9 +1,7 @@
import type { IColorSelectPanelRef } from "@/types";
import type { IColorSelectPanelRef } from '@/types'
export const calcLeftByAlpha = (wrapper: HTMLElement, thumb: HTMLElement, alpha: number) => {
return Math.round(
(alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2)) / 100
)
return Math.round((alpha * (wrapper.offsetWidth - thumb.offsetWidth / 2)) / 100)
}
export const updateThumb = (alpha: number, thumb: HTMLElement, wrapper: HTMLElement) => {
@ -11,7 +9,9 @@ export const updateThumb = (alpha: number, thumb: HTMLElement, wrapper: HTMLElem
}
export const onDrag = (
event: MouseEvent, bar: IColorSelectPanelRef<HTMLElement>, thumb: IColorSelectPanelRef<HTMLElement>,
event: MouseEvent,
bar: IColorSelectPanelRef<HTMLElement>,
thumb: IColorSelectPanelRef<HTMLElement>,
alpha: IColorSelectPanelRef<number>
) => {
const rect = bar.value.getBoundingClientRect()
@ -19,7 +19,5 @@ export const onDrag = (
let left = clientX - rect.left
left = Math.max(thumb.value.offsetWidth / 2, left)
left = Math.min(left, rect.width - thumb.value.offsetWidth / 2)
alpha.value = Math.round(
((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth)) * 100
)
alpha.value = Math.round(((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth)) * 100)
}

View File

@ -1,4 +1,4 @@
import {IColorSelectPanelRef as Ref} from '@/types';
import { IColorSelectPanelRef as Ref } from '@/types'
import Color from '../utils/color'
import { draggable } from '../utils/use-drag'
import { onDrag, updateThumb } from '.'
@ -16,14 +16,17 @@ export const renderless = (props, context, { emit }) => {
const alphaWrapper: Ref<HTMLElement> = context.ref()
const alphaThumb: Ref<HTMLElement> = context.ref()
const alpha = context.ref(color.get('a'))
context.watch(() => props.color, (hex: string) => {
color.reset(hex)
const [rr, gg, bb] = color.getRGB()
r.value = rr
g.value = gg
b.value = bb
alpha.value = color.get('a');
})
context.watch(
() => props.color,
(hex: string) => {
color.reset(hex)
const [rr, gg, bb] = color.getRGB()
r.value = rr
g.value = gg
b.value = bb
alpha.value = color.get('a')
}
)
context.watch(alpha, (newAlpha) => {
updateThumb(newAlpha, alphaThumb.value, alphaWrapper.value)
emit('alpha-update', alpha.value)
@ -37,10 +40,9 @@ export const renderless = (props, context, { emit }) => {
})
const api = {
state,
color: props.color,
slider,
alphaWrapper,
alphaThumb,
alphaThumb
}
context.onMounted(() => {
updateThumb(alpha.value, alphaThumb.value, slider.value)
@ -50,7 +52,7 @@ export const renderless = (props, context, { emit }) => {
},
start(event) {
onDrag(event as MouseEvent, slider, alphaThumb, alpha)
},
}
})
})
return api

View File

@ -7,7 +7,11 @@ export const setPosition = (el: HTMLElement, x: number, y: number) => {
}
export const getXBySaturation = (s: number, width: number) => (s * width) / 100
export const getYByLight = (l: number, height: number) => ((100 - l) * height) / 100
export const updatePosition = (event: MouseEvent | TouchEvent, rect: DOMRect, cursor: IColorSelectPanelRef<HTMLElement>) => {
export const updatePosition = (
event: MouseEvent | TouchEvent,
rect: DOMRect,
cursor: IColorSelectPanelRef<HTMLElement>
) => {
let x = (event as MouseEvent).clientX - rect.left
let y = (event as MouseEvent).clientY - rect.top
x = Math.max(0, x)
@ -15,37 +19,41 @@ export const updatePosition = (event: MouseEvent | TouchEvent, rect: DOMRect, cu
y = Math.max(0, y)
y = Math.min(y, rect.height)
setPosition(cursor.value, x - 1 / 2 * cursor.value.offsetWidth, y - 1 / 2 * cursor.value.offsetWidth)
setPosition(cursor.value, x - (1 / 2) * cursor.value.offsetWidth, y - (1 / 2) * cursor.value.offsetWidth)
return { x, y }
}
export const calcSaturation = (x: number, width: number) => (x / width)
export const calcSaturation = (x: number, width: number) => x / width
export const calcBrightness = (y: number, height: number) => 100 - (y / height) * 100
export const getThumbTop = (wrapper: HTMLElement, thumb: HTMLElement, hue: number) => {
return Math.round(
(hue * (wrapper.offsetHeight - thumb.offsetHeight / 2)) / 360
)
return Math.round((hue * (wrapper.offsetHeight - thumb.offsetHeight / 2)) / 360)
}
export const resetCursor = (
s: number, v: number,
s: number,
v: number,
wrapper: IColorSelectPanelRef<HTMLElement>,
cursor: IColorSelectPanelRef<HTMLElement>,
thumb: IColorSelectPanelRef<HTMLElement>,
color: Color, h: IColorSelectPanelRef<number>
color: Color,
h: IColorSelectPanelRef<number>
) => {
const { width, height } = wrapper.value.getBoundingClientRect()
const x = getXBySaturation(s, width) - 1 / 2 * cursor.value.offsetWidth
const y = getYByLight(v, height) - 1 / 2 * cursor.value.offsetWidth
const x = getXBySaturation(s, width) - (1 / 2) * cursor.value.offsetWidth
const y = getYByLight(v, height) - (1 / 2) * cursor.value.offsetWidth
setPosition(cursor.value, x < 0 ? 0 : x, y < 0 ? 0 : y)
const thummbTop = getThumbTop(wrapper.value, thumb.value, color.get('h'))
thumb.value.style.top = `${thummbTop}px`
h.value = color.get('h')
}
export const updateCursor = (wrapper: IColorSelectPanelRef<HTMLElement>, cursor: IColorSelectPanelRef<HTMLElement>, emit) => {
return (color: Color, event: MouseEvent)=>{
const rect = wrapper.value.getBoundingClientRect();
const {x,y} = updatePosition(event, rect, cursor)
export const updateCursor = (
wrapper: IColorSelectPanelRef<HTMLElement>,
cursor: IColorSelectPanelRef<HTMLElement>,
emit
) => {
return (color: Color, event: MouseEvent) => {
const rect = wrapper.value.getBoundingClientRect()
const { x, y } = updatePosition(event, rect, cursor)
color.set({
s: calcSaturation(x, rect.width) * 100,
v: calcBrightness(y, rect.height)
@ -63,18 +71,14 @@ export const updateThumb = (
h: IColorSelectPanelRef<Number>,
emit
) => {
return (event: MouseEvent)=>{
return (event: MouseEvent) => {
const e = event as MouseEvent
const rect = bar.value.getBoundingClientRect()
let top = e.clientY - rect.top
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)
top = Math.max(thumb.value.offsetHeight / 2, top)
thumb.value.style.top = `${top}px`
h.value = Math.round(
((top - thumb.value.offsetHeight / 2) /
(rect.height - thumb.value.offsetHeight)) *
360
)
emit('hue-update', h.value)
const rect = bar.value.getBoundingClientRect()
let top = e.clientY - rect.top
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2)
top = Math.max(thumb.value.offsetHeight / 2, top)
thumb.value.style.top = `${top}px`
h.value = Math.round(((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight)) * 360)
emit('hue-update', h.value)
}
}
}

View File

@ -1,12 +1,7 @@
import {IColorSelectPanelRef as Ref} from '@/types';
import { IColorSelectPanelRef as Ref } from '@/types'
import { draggable } from '../utils/use-drag'
import Color from '../utils/color'
import {
getThumbTop,
resetCursor,
updateThumb,
updateCursor,
} from './index'
import { getThumbTop, resetCursor, updateThumb, updateCursor } from './index'
export const api = ['state', 'cursor', 'wrapper', 'bar', 'thumb']
export const renderless = (props, context, { emit }) => {
@ -24,42 +19,37 @@ export const renderless = (props, context, { emit }) => {
background
})
const api = { state, cursor, wrapper, bar, thumb }
context.watch(() => props.color, (newColor) => {
color.reset(newColor)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
})
context.watch(
() => props.color,
(newColor) => {
color.reset(newColor)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
}
)
context.onMounted(() => {
const update = {
thumb: updateThumb(bar, thumb, h, emit),
cursor: updateCursor(wrapper,cursor,emit)
};
cursor: updateCursor(wrapper, cursor, emit)
}
const thumbTop = getThumbTop(wrapper.value, thumb.value, h.value)
thumb.value.style.top = `${thumbTop}px`
resetCursor(
color.get('s'),
color.get('v'),
wrapper,
cursor,
thumb,
color,
h
)
resetCursor(color.get('s'), color.get('v'), wrapper, cursor, thumb, color, h)
draggable(wrapper.value, {
drag(event) {
update.cursor(color, event as MouseEvent);
update.cursor(color, event as MouseEvent)
},
start(event) {
update.cursor(color, event as MouseEvent);
},
update.cursor(color, event as MouseEvent)
}
})
draggable(bar.value, {
drag(event) {
update.thumb(event as MouseEvent)
},
start(event){
update.thumb(event as MouseEvent);
start(event) {
update.thumb(event as MouseEvent)
}
})
})
return api
}
}

View File

@ -1,31 +1,42 @@
import {IColorSelectPanelRef} from '@/types';
import { IColorSelectPanelRef } from '@/types'
import type Color from './utils/color'
export const onConfirm = (
hex: IColorSelectPanelRef<string>, triggerBg: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>, emit, stack: IColorSelectPanelRef<string[]>,
hex: IColorSelectPanelRef<string>,
triggerBg: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>,
emit,
stack: IColorSelectPanelRef<string[]>,
enableHistory: boolean
) => {
return () => {
hex.value = res.value;
triggerBg.value = res.value;
if (enableHistory){
const itemIdx = Math.max(stack.value.indexOf(res.value), stack.value.indexOf(res.value.toLowerCase()), stack.value.indexOf(res.value.toUpperCase()));
if (itemIdx !== -1){
stack.value.splice(itemIdx,1)
hex.value = res.value
triggerBg.value = res.value
if (enableHistory) {
const itemIdx = Math.max(
stack.value.indexOf(res.value),
stack.value.indexOf(res.value.toLowerCase()),
stack.value.indexOf(res.value.toUpperCase())
)
if (itemIdx !== -1) {
stack.value.splice(itemIdx, 1)
}
stack.value.unshift(res.value);
stack.value.unshift(res.value)
}
emit('confirm', res.value)
}
}
export const onCancel = (
res: IColorSelectPanelRef<string>, triggerBg: IColorSelectPanelRef<string>, emit, isShow: IColorSelectPanelRef<boolean>,
hex: IColorSelectPanelRef<string>, color: Color
res: IColorSelectPanelRef<string>,
triggerBg: IColorSelectPanelRef<string>,
emit,
isShow: IColorSelectPanelRef<boolean>,
hex: IColorSelectPanelRef<string>,
color: Color
) => {
return () => {
if (isShow.value){
if (isShow.value) {
res.value = triggerBg.value
hex.value = triggerBg.value
color.reset(hex.value)
@ -38,19 +49,22 @@ export const onColorUpdate = (color: Color, res: IColorSelectPanelRef<string>) =
}
export const onHSVUpdate = (
color: Color, res: IColorSelectPanelRef<string>, hex: IColorSelectPanelRef<string>, emit
color: Color,
res: IColorSelectPanelRef<string>,
hex: IColorSelectPanelRef<string>,
emit
) => {
return {
onHueUpdate: (hue: number) => {
color.set({ h: hue })
color.set({ h: hue })
onColorUpdate(color, res)
hex.value = color.getHex();
hex.value = color.getHex()
emit('hue-update', hue)
},
onSVUpdate: ({ s, v }: { s: number; v: number }) => {
color.set({ s, v })
onColorUpdate(color, res)
emit('sv-update', {s,v})
emit('sv-update', { s, v })
}
}
}
@ -65,23 +79,25 @@ export const onAlphaUpdate = (color: Color, res: IColorSelectPanelRef<string>) =
}
export const handleHistoryClick = (
hex:IColorSelectPanelRef<string>, res:IColorSelectPanelRef<string>,
color:Color
)=>{
return (history: string)=>{
hex.value = history;
res.value = history;
color.reset(history);
hex: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>,
color: Color
) => {
return (history: string) => {
hex.value = history
res.value = history
color.reset(history)
}
}
export const handlePredefineClick = (
hex: IColorSelectPanelRef<string>, res:IColorSelectPanelRef<string>,
hex: IColorSelectPanelRef<string>,
res: IColorSelectPanelRef<string>,
color: Color
) => {
return (selectedColor: string) => {
hex.value=selectedColor;
res.value=selectedColor;
color.reset(selectedColor);
hex.value = selectedColor
res.value = selectedColor
color.reset(selectedColor)
}
}

View File

@ -10,7 +10,10 @@ function hexToRgb(hex: string) {
export const normalizeHexColor = (color: string) => {
let normalizedColor: string = color.replace('#', '')
if (normalizedColor.length === 3) {
normalizedColor = normalizedColor.split('').map(char => char + char).join('')
normalizedColor = normalizedColor
.split('')
.map((char) => char + char)
.join('')
}
normalizedColor = normalizedColor.padEnd(6, '0')
@ -79,7 +82,9 @@ export default class Color {
if (!this.enableAlpha) {
return hsv(this.h, this.s, this.v).hex().toString()
}
return hsv(this.h, this.s, this.v, this.a / 100).hexa().toString()
return hsv(this.h, this.s, this.v, this.a / 100)
.hexa()
.toString()
}
/**

View File

@ -1,13 +1,6 @@
import {IColorSelectPanelRef as Ref} from '@/types';
import { IColorSelectPanelRef as Ref } from '@/types'
import Color from './utils/color'
import {
onConfirm,
onCancel,
onHSVUpdate,
onAlphaUpdate,
handleHistoryClick,
handlePredefineClick,
} from '.'
import { onConfirm, onCancel, onHSVUpdate, onAlphaUpdate, handleHistoryClick, handlePredefineClick } from '.'
export const api = [
'state',
@ -20,29 +13,20 @@ export const api = [
'onCancel',
'onAlphaUpdate',
'onHistoryClick',
'onPredefineColorClick',
'alpha'
'onPredefineColorClick'
]
export const renderless = (
props,
context,
{ emit }
) => {
export const renderless = (props, context, { emit }) => {
const { modelValue, visible, history, predefine } = context.toRefs(props)
const hex = context.ref(modelValue?.value ?? 'transparent')
const res = context.ref(modelValue?.value ?? 'transparent')
const triggerBg = context.ref(modelValue?.value ?? 'transparent')
const isShow = context.ref(visible?.value ?? false)
const cursor: Ref<HTMLElement> = context.ref()
const stack:Ref<string[]> = context.ref(
[...(history?.value ?? [])]
)
const predefineStack: Ref<string[]> = context.ref(
[...(predefine?.value ?? [])]
)
const enableHistory = history?.value;
const enablePredefineColor = predefine?.value;
const stack: Ref<string[]> = context.ref([...(history?.value ?? [])])
const predefineStack: Ref<string[]> = context.ref([...(predefine?.value ?? [])])
const enableHistory = history?.value
const enablePredefineColor = predefine?.value
const changeVisible = (state: boolean) => {
isShow.value = state
}
@ -59,12 +43,20 @@ export const renderless = (
enableHistory,
enablePredefineColor
})
context.watch(predefine, (newPredefine: string[])=>{
predefineStack.value = [...newPredefine];
}, {deep: true})
context.watch(history, (newHistory:string[]) => {
stack.value = [...newHistory]
}, {deep: true})
context.watch(
predefine,
(newPredefine: string[]) => {
predefineStack.value = [...newPredefine]
},
{ deep: true }
)
context.watch(
history,
(newHistory: string[]) => {
stack.value = [...newHistory]
},
{ deep: true }
)
context.watch(modelValue, (newValue) => {
hex.value = newValue
res.value = newValue
@ -85,9 +77,8 @@ export const renderless = (
onCancel: onCancel(res, triggerBg, emit, isShow, hex, color),
onAlphaUpdate: update,
onHistoryClick: handleHistoryClick(hex, res, color),
onPredefineColorClick: handlePredefineClick(hex,res,color),
cursor,
alpha: props.alpha
onPredefineColorClick: handlePredefineClick(hex, res, color),
cursor
}
return api
}

View File

@ -468,9 +468,9 @@ export const getImageWidth =
state.imageList = vm.$refs.viewerItem
} else {
imageW = parent.$el.querySelector('.aui-mobile-image-viewer__canvas').offsetWidth
imageW = parent.$el.querySelector('.tiny-mobile-image-viewer__canvas').offsetWidth
state.imageList = parent.$el.querySelectorAll('.aui-mobile-image-viewer__item')
state.imageList = parent.$el.querySelectorAll('.tiny-mobile-image-viewer__item')
}
state.imageItemWidth = imageW

View File

@ -293,7 +293,11 @@
theme('colors.color.border.separator.DEFAULT'),
theme('colors.color.border.separator.DEFAULT')
),
linear-gradient(-180deg, theme('colors.color.border.separator.DEFAULT'), theme('colors.color.border.separator.DEFAULT'));
linear-gradient(
-180deg,
theme('colors.color.border.separator.DEFAULT'),
theme('colors.color.border.separator.DEFAULT')
);
@apply bg-no-repeat;
.is__line::before {
@ -867,9 +871,9 @@
&.col__ellipsis {
.@{grid-prefix-cls}-cell {
&__tooltip:has(.aui-grid-tree__indent:nth-last-child(2):first-child),
&__title:has(.aui-grid-tree__indent:nth-last-child(2):first-child),
&__ellipsis:has(.aui-grid-tree__indent:nth-last-child(2):first-child) {
&__tooltip:has(.tiny-grid-tree__indent:nth-last-child(2):first-child),
&__title:has(.tiny-grid-tree__indent:nth-last-child(2):first-child),
&__ellipsis:has(.tiny-grid-tree__indent:nth-last-child(2):first-child) {
@apply inline-block;
}
}

View File

@ -360,7 +360,11 @@
theme('colors.color.border.separator.DEFAULT'),
theme('colors.color.border.separator.DEFAULT')
),
linear-gradient(-180deg, theme('colors.color.border.separator.DEFAULT'), theme('colors.color.border.separator.DEFAULT'));
linear-gradient(
-180deg,
theme('colors.color.border.separator.DEFAULT'),
theme('colors.color.border.separator.DEFAULT')
);
@apply bg-no-repeat;
.is__line::before {
@ -915,9 +919,9 @@
&.col__ellipsis {
.@{grid-prefix-cls}-cell {
&__tooltip:has(.aui-grid-tree__indent:nth-last-child(2):first-child),
&__title:has(.aui-grid-tree__indent:nth-last-child(2):first-child),
&__ellipsis:has(.aui-grid-tree__indent:nth-last-child(2):first-child) {
&__tooltip:has(.tiny-grid-tree__indent:nth-last-child(2):first-child),
&__title:has(.tiny-grid-tree__indent:nth-last-child(2):first-child),
&__ellipsis:has(.tiny-grid-tree__indent:nth-last-child(2):first-child) {
@apply inline-block;
}
}

View File

@ -301,11 +301,16 @@
.@{grid-prefix-cls}-header__column,
.@{grid-prefix-cls}-body__column,
.@{grid-prefix-cls}-footer__column {
border-right: 1px solid var(--ti-grid-border-color);
.@{grid-prefix-cls}-resizable {
right: -1px;
}
background-image: linear-gradient(-90deg, var(--ti-grid-border-color), var(--ti-grid-border-color)),
linear-gradient(-180deg, var(--ti-grid-border-color), var(--ti-grid-border-color));
background-repeat: no-repeat;
background-size:
1px 100%,
100% 1px;
background-position:
100% 0,
100% 100%;
border: none;
}
.@{grid-prefix-cls}__body-wrapper {

View File

@ -1,7 +1,8 @@
<template>
<div class="tiny-color-picker__trigger" v-clickoutside="onCancel" @click="() => changeVisible(!state.isShow)">
<div class="tiny-color-picker__trigger" @click="() => changeVisible(!state.isShow)">
<div
class="tiny-color-picker__inner" :style="{
class="tiny-color-picker__inner"
:style="{
background: state.triggerBg ?? ''
}"
>
@ -33,7 +34,7 @@ export default defineComponent({
props: [...props, 'modelValue', 'visible', 'alpha'],
components: {
IconChevronDown: IconChevronDown(),
ColorSelect: colorSelect,
ColorSelect: colorSelect
},
setup(props, context) {
return setup({ props, context, renderless, api })

View File

@ -1,34 +1,35 @@
<template>
<div class="tiny-color-select-panel__wrapper__alpha" ref="alphaWrapper">
<div
class="tiny-color-select-panel__wrapper__alpha__slider" :style="{
background: state.background
}"
ref="slider"
></div>
<div
class="tiny-color-select-panel__wrapper__alpha__thumb" :style="{
top: 0,
left: 0
}"
ref="alphaThumb"
></div>
</div>
</template>
<script>
import { defineComponent, setup } from '@opentiny/vue-common'
import { renderless, api } from '@opentiny/vue-renderless/color-select-panel/alpha-select/vue'
export default defineComponent({
emits: ['alpha-update'],
props: {
color: {
type: String
}
},
setup(props, context) {
return setup({ props, context, renderless, api })
},
})
</script>
<div class="tiny-color-select-panel__wrapper__alpha" ref="alphaWrapper">
<div
class="tiny-color-select-panel__wrapper__alpha__slider"
:style="{
background: state.background
}"
ref="slider"
></div>
<div
class="tiny-color-select-panel__wrapper__alpha__thumb"
:style="{
top: 0,
left: 0
}"
ref="alphaThumb"
></div>
</div>
</template>
<script>
import { defineComponent, setup } from '@opentiny/vue-common'
import { renderless, api } from '@opentiny/vue-renderless/color-select-panel/alpha-select/vue'
export default defineComponent({
emits: ['alpha-update'],
props: {
color: {
type: String
}
},
setup(props, context) {
return setup({ props, context, renderless, api, mono: true })
}
})
</script>

View File

@ -1,8 +1,10 @@
<template>
<div class="tiny-color-select-panel__wrapper__inner">
<div class="tiny-color-select-panel__wrapper__inner">
<div
class="tiny-color-select-panel__wrapper__inner__color-select" ref="wrapper" :style="{
background: state.background,
class="tiny-color-select-panel__wrapper__inner__color-select"
ref="wrapper"
:style="{
background: state.background
}"
>
<div class="white"></div>
@ -30,7 +32,7 @@ export default defineComponent({
}
},
setup(props, context) {
return setup({ props, context, renderless, api })
return setup({ props, context, renderless, api, mono: true })
}
})
</script>
</script>

View File

@ -22,7 +22,7 @@
* SOFTWARE.
*
*/
import { h, hooks, $prefix, appProperties, isVue3 } from '@opentiny/vue-common'
import { h, hooks, $prefix, appProperties } from '@opentiny/vue-common'
import Tooltip from '@opentiny/vue-tooltip'
import { extend } from '@opentiny/vue-renderless/common/object'
import { isEmptyObject, isObject, isNull } from '@opentiny/vue-renderless/common/type'
@ -912,18 +912,9 @@ export default {
* vue3不会拦截数组的常规操作push无响应等问题
* vue3需要同时监听data和数组长度watch监听会导致重复渲染
*/
if (isVue3) {
hooks.watch([() => table.data, () => table.data && table.data.length], () => {
table.handleDataChange()
})
} else {
hooks.watch(
() => table.data,
() => {
table.handleDataChange()
}
)
}
hooks.watch([() => table.data, () => table.data && table.data.length], () => {
table.handleDataChange()
})
hooks.onBeforeUnmount(() => {
const { elemStore, $refs } = table