Skip to content

Commit

Permalink
fix: 修复框选在放大缩小情况下生成的框大小和鼠标实际拖拽距离大小不一致的问题 (#97)
Browse files Browse the repository at this point in the history
* feat: 更改元素样式的时候,同时选中的其他元素样式也会一起更改,加入willOutOfBounds来配置是否允许元素超出画布范围

* fix: 修复选中单个文本样式不更新问题

* feat: 支持二维码条码颜色改变

* feat: 新增一个模板配置项,让用户选择是否像qt designer一样生成field

* fix: 修复在放大缩小的情况下拖拽选择框和实际鼠标拖拽距离不一致的问题

* fix bwip 条码、二维码 颜色优化

* feat: 新增qid,qtdesign mode不改变options,修复设计面板不应用框选拖拽修改

---------

Co-authored-by: the-didi <[email protected]>
Co-authored-by: xavier <[email protected]>
  • Loading branch information
3 people committed Jan 24, 2024
1 parent 4dfa1d9 commit ec519d2
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 57 deletions.
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,73 @@
### 💐 同时自动更新 GitHub Pages 同步 Gitee;
### 💐 感谢各位贡献者的支持。 🔥

## 0.0.57-beta9

<details>
<summary>01. 🌈 新增支持 模版 控制元素是否可超出面板 </summary>

```js
new hiprint.PrintTemplate({
template: panel,
willOutofBounds: true, // 是否允许组件内的控件超出范围
})
```
</details>
<details>
<summary>02. 🌈 新增支持 拖拽元素 生成 类 QT Designer 唯一 field </summary>

```js
new hiprint.PrintTemplate({
template: panel,
qtDesigner: true, // 是否开启类似QT Designer的唯一field生成模式
})
```
```json
{
"options": {
// ... 省略其他属性 ...
"field": "textType",
"title": "单据类型",
"qid": "textType_1", // 唯一 id
// ... 省略其他属性 ...
},
"printElementType": {
"title": "单据类型",
"type": "text"
}
}
```
</details>
<details>
<summary>03. ✨ 调整优化 bwip 条码、二维码 填充色统一 </summary>

> 设置移入 样式面板 => "条码颜色"

```json
{
"options": {
"barColor": "#000", // 条码、二维码 填充颜色
}
}
```
</details>
<details>
<summary>04. 🐛️ fix 面板缩放后 框选框不跟鼠标问题 </summary>
</details>

## 0.0.57-beta8
<details>
<summary>01. 🌈 新增支持 添加全选 api </summary>

```js
const template = new hiprint.PrintTemplate({
template: panel,
})
template.selectAllElements()
```
</details>

## 0.0.57-beta3
<details>
<summary>01. 🌈 新增支持 近期社区 pr 部分中文 i18n 机翻 </summary>
Expand Down
1 change: 1 addition & 0 deletions src/demo/custom/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const aProvider = function (ops) {
testData: '单据表头',
height: 17,
fontSize: 16.5,
field: "headera",
fontWeight: "700",
textAlign: "center",
hideTitle: true
Expand Down
2 changes: 2 additions & 0 deletions src/demo/design/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ export default {
],
dataMode: 1, // 1:getJson 其他:getJsonTid 默认1
history: true, // 是否需要 撤销重做功能
willOutOfBounds: true, // 是否允许组件内的控件超出范围
qtDesigner: true, // 是否开启类似QT Designer的唯一field生成模式
onDataChanged: (type, json) => {
console.log(type); // 新增、移动、删除、修改(参数调整)、大小、旋转
console.log(json); // 返回 template
Expand Down
Loading

0 comments on commit ec519d2

Please sign in to comment.