Skip to content

Commit f0fd903

Browse files
committed
新增:文件上传管理页面支持图标显示,支持顺序选择
1 parent 673aadb commit f0fd903

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+228
-125
lines changed

module/Blog/Docs/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.3.0
1+
## 3.3.0 页面变量优化,快捷操作方法优化
22

33
- 新增:博客各页面增加标题、关键词和描述变量
44
- 新增:博客详情页面增加 _cover, _summary, _images 变量

module/Vendor/Docs/module/content.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- Captcha 人机验证提供者
1212
- CensorImage 图片智能审核提供者
1313
- CensorText 文字智能审核提供者
14+
- ContentVerify 内容审核提供者
15+
- DataRef 上传文件引用引用提供者
1416
- HomePage 首页提供者
1517
- IDManager ID管理提供者
1618
- LBS 地理位置服务提供者

module/Vendor/Docs/release.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
## 4.2.0
1+
## 4.2.0 临时文件清理任务调度,缓存自动清理
22

33
- 新增:临时上传文件data_temp自动清除调度任务
44
- 新增:临时缓存文件自动清理任务调度
5+
- 新增:DataRefProvider 提供文件引用提供者模块
56

67
---
78

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
4+
namespace Module\Vendor\Provider\DataRef;
5+
6+
7+
abstract class AbstractDataRefProvider
8+
{
9+
abstract public function name();
10+
11+
abstract public function title();
12+
13+
abstract function isUsing($category, $path, $data, $param = []);
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
4+
namespace Module\Vendor\Provider\DataRef;
5+
6+
7+
use Module\Vendor\Provider\ProviderTrait;
8+
9+
/**
10+
* @method static AbstractDataRefProvider[] listAll()
11+
*/
12+
class DataRefProvider
13+
{
14+
use ProviderTrait;
15+
}

module/Vendor/QuickRun/ImageDesign/ImageDesignUtil.php

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
class ImageDesignUtil
1515
{
16+
const LINE_BREAK = '[BR]';
17+
1618
public static function renderBase64DataString($imageConfig, $variables = [])
1719
{
1820
$image = self::render($imageConfig, $variables);
@@ -48,6 +50,12 @@ private static function rectRadius($fillColor, $width, $height, $radius)
4850
return $out;
4951
}
5052

53+
public static function textLineCount($text)
54+
{
55+
$pcs = explode(self::LINE_BREAK, $text);
56+
return count($pcs);
57+
}
58+
5159
public static function render($imageConfig, $variables = [])
5260
{
5361
BizException::throwsIfEmpty('imageConfig 为空', $imageConfig);
@@ -82,21 +90,40 @@ public static function render($imageConfig, $variables = [])
8290
$item['y'] = intval($item['y']);
8391
switch ($item['type']) {
8492
case 'text':
85-
$lines = explode("[BR]", $item['data']['text']);
86-
$y = $item['y'];
87-
foreach ($lines as $line) {
88-
$line = trim($line);
89-
if (empty($line)) {
90-
continue;
93+
$lineHeight = isset($item['data']['lineHeight']) ? $item['data']['lineHeight'] : 1.2;
94+
$lines = explode(self::LINE_BREAK, $item['data']['text']);
95+
$offsets = [];
96+
if (!empty($item['data']['shadowOffset'])) {
97+
if (empty($item['data']['shadowColor'])) {
98+
$item['data']['shadowColor'] = '#000000';
99+
}
100+
$offsets[] = [
101+
'x' => $item['data']['shadowOffset'],
102+
'y' => $item['data']['shadowOffset'],
103+
'color' => $item['data']['shadowColor']
104+
];
105+
}
106+
$offsets[] = [
107+
'x' => 0,
108+
'y' => 0,
109+
'color' => $item['data']['color']
110+
];
111+
foreach ($offsets as $offset) {
112+
$y = $item['y'];
113+
foreach ($lines as $line) {
114+
$line = trim($line);
115+
if (empty($line)) {
116+
continue;
117+
}
118+
$image->text($line, $item['x'] + $offset['x'], $y + $offset['y'], function ($font) use ($item, $offset, $fontPath) {
119+
$font->file($fontPath);
120+
$font->size($item['data']['size']);
121+
$font->color($offset['color']);
122+
$font->align($item['data']['align']);
123+
$font->valign('top');
124+
});
125+
$y += $item['data']['size'] * $lineHeight;
91126
}
92-
$image->text($line, $item['x'], $y, function ($font) use ($item, $fontPath) {
93-
$font->file($fontPath);
94-
$font->size($item['data']['size']);
95-
$font->color($item['data']['color']);
96-
$font->align($item['data']['align']);
97-
$font->valign('top');
98-
});
99-
$y += $item['data']['size'] * 1.2;
100127
}
101128
break;
102129
case 'rect':

public/asset/common/admin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/asset/common/base.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/asset/common/clipboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/asset/common/commonVerify.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)