fix
This commit is contained in:
parent
f8d8d02321
commit
799c0ff08f
@ -209,14 +209,14 @@ EOF;
|
||||
$this->jsContent .= <<<EOF
|
||||
|
||||
// 字段 {$options['label']} $field
|
||||
layui.use(['upload', 'layer', 'jquery', 'popup'], function() {
|
||||
layui.use(['upload', 'layer', 'jquery', 'popup', 'util'], function() {
|
||||
let input = layui.jquery('#$id').prev();
|
||||
input.prev().html(input.val());
|
||||
layui.upload.render({
|
||||
elem: '#$id',$options_string
|
||||
done: function (res) {
|
||||
if (res.code) return layui.popup.failure(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().html(res.data.path);
|
||||
this.item.prev().val(res.data.path).prev().html(layui.util.escape(res.data.path));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -237,6 +237,7 @@ EOF;
|
||||
$id = $this->createId($field);
|
||||
|
||||
unset($props['lay-verify']);
|
||||
$props['field'] = $props['field'] ?? '__file__';
|
||||
$options_string = '';
|
||||
foreach ($props as $key => $item) {
|
||||
if (is_array($item)) {
|
||||
|
@ -38,7 +38,7 @@
|
||||
layui.use(['form', 'button', 'popup', 'layer', 'jquery'], function() {
|
||||
var $ = layui.jquery, layer = layui.layer, form = layui.form;
|
||||
function switchCaptcha() {
|
||||
$('.codeImage').attr("src", "/app/admin/plugin/captcha/login?v=" + new Date().getTime());
|
||||
$('.codeImage').attr("src", "/app/admin/account/captcha/login?v=" + new Date().getTime());
|
||||
}
|
||||
switchCaptcha();
|
||||
// 登 录 提 交
|
||||
|
@ -50,10 +50,6 @@
|
||||
<button class="pear-btn pear-btn-xs tool-btn" lay-event="remove">删除</button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="templet-image">
|
||||
<img src="{{d.avatar}}" style="max-width:32px;max-height:32px;" />
|
||||
</script>
|
||||
|
||||
<script src="/app/admin/component/layui/layui.js"></script>
|
||||
<script src="/app/admin/component/pear/pear.js"></script>
|
||||
<script src="/app/admin/admin/js/index.js"></script>
|
||||
@ -132,7 +128,9 @@
|
||||
return '<a href="' + d[field] + '" target="_blank">' + d[field] + '</a>';
|
||||
};
|
||||
} else if (control === 'uploadimage') {
|
||||
schema.templet = '#templet-image';
|
||||
schema.templet = function (d) {
|
||||
return '<img src="'+d[field]+'" style="max-width:32px;max-height:32px;" />'
|
||||
};
|
||||
} else if (['select', 'selectmulti', 'treeselect', 'treeselectmulti'].indexOf(control) !== -1) {
|
||||
let props = getProps(item.control_args);
|
||||
apiResults[field] = [];
|
||||
|
Loading…
Reference in New Issue
Block a user