1
0
mirror of https://github.com/cjango/dcat-vue.git synced 2025-12-06 14:20:03 +08:00
This commit is contained in:
weiwait
2023-03-18 14:23:42 +08:00
parent b19c3042e4
commit c28202c232
7 changed files with 40 additions and 44 deletions

View File

@@ -77,8 +77,7 @@
store.request({method: 'get', url: '/admin'}) store.request({method: 'get', url: '/admin'})
.then(res => console.log(res)); .then(res => console.log(res));
console.log(store.forms.list)
store.getForm('kvs as field name').value = []
} }
JS); JS);

View File

@@ -1 +1 @@
.file-list-wrap[data-v-7fb984ad]{margin-top:6px!important}.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.3333333333%;left:0;top:33.3333333333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.3333333333%;top:0;width:33.3333333333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(../images/bg.png)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.n-modal-container{z-index:99999999!important}.modal-container[data-v-546838c3]{border-radius:10px}.modal-container .cropper-container[data-v-546838c3]{width:480px;height:270px}.modal-container .cropper-container img[data-v-546838c3]{max-width:100%;display:block}.modal-container .large[data-v-546838c3]{width:960px!important;height:540px!important}.modal-container .cropper-controls[data-v-546838c3]{padding:11px 0 11px 11px;background-color:#c9c9c9;border-radius:0 0 6px 6px}.file-list-wrap[data-v-12d14073]{margin-top:2px!important}.preview[data-v-12d14073]{width:138px;height:138px;border:1px solid #dae1e7;border-radius:10px;background-color:#f1f1f1;display:flex;justify-content:center;align-items:center}.preview img[data-v-12d14073]{max-width:100%;max-height:100%;border-radius:4px;padding:1px}.preview[data-v-12d14073]:hover{border:1px dashed #2dd3c4}.custom-upload-dragger[data-v-12d14073]{width:138px;height:138px;display:flex;justify-content:center;align-items:center;border-radius:10px}.custom-upload-dragger .btn-plus[data-v-12d14073]{font-size:88px;color:#b0b0b0}.add[data-v-a3db4e10]{font-size:20px}.map-container{margin-top:18px;height:var(--4f1ff08f)}.map-container canvas{border-radius:10px;box-shadow:1px 1px 6px #aaa} .file-list-wrap[data-v-c1ad4641]{margin-top:6px!important}.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.3333333333%;left:0;top:33.3333333333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.3333333333%;top:0;width:33.3333333333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(../images/bg.png)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.n-modal-container{z-index:99999999!important}.modal-container[data-v-546838c3]{border-radius:10px}.modal-container .cropper-container[data-v-546838c3]{width:480px;height:270px}.modal-container .cropper-container img[data-v-546838c3]{max-width:100%;display:block}.modal-container .large[data-v-546838c3]{width:960px!important;height:540px!important}.modal-container .cropper-controls[data-v-546838c3]{padding:11px 0 11px 11px;background-color:#c9c9c9;border-radius:0 0 6px 6px}.file-list-wrap[data-v-de6bd7c1]{margin-top:2px!important}.preview[data-v-de6bd7c1]{width:138px;height:138px;border:1px solid #dae1e7;border-radius:10px;background-color:#f1f1f1;display:flex;justify-content:center;align-items:center}.preview img[data-v-de6bd7c1]{max-width:100%;max-height:100%;border-radius:4px;padding:1px}.preview[data-v-de6bd7c1]:hover{border:1px dashed #2dd3c4}.custom-upload-dragger[data-v-de6bd7c1]{width:138px;height:138px;display:flex;justify-content:center;align-items:center;border-radius:10px}.custom-upload-dragger .btn-plus[data-v-de6bd7c1]{font-size:88px;color:#b0b0b0}.add[data-v-253dd88f]{font-size:20px}.map-container{margin-top:18px;height:var(--3b487f31)}.map-container canvas{border-radius:10px;box-shadow:1px 1px 6px #aaa}

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,6 @@ namespace Weiwait\DcatVue\Field;
use Dcat\Admin\Form\Field; use Dcat\Admin\Form\Field;
use Dcat\Admin\Support\Helper; use Dcat\Admin\Support\Helper;
use Dcat\Admin\Widgets\Checkbox as WidgetCheckbox;
use Weiwait\DcatVue\Field\Traits\FieldCommon; use Weiwait\DcatVue\Field\Traits\FieldCommon;
use Weiwait\DcatVue\Field\Traits\HasOptions; use Weiwait\DcatVue\Field\Traits\HasOptions;
use Weiwait\DcatVue\Field\Traits\HasWatch; use Weiwait\DcatVue\Field\Traits\HasWatch;

View File

@@ -3,7 +3,6 @@
namespace Weiwait\DcatVue\Field; namespace Weiwait\DcatVue\Field;
use Dcat\Admin\Form\Field; use Dcat\Admin\Form\Field;
use Illuminate\Support\Str;
use Weiwait\DcatVue\Field\Traits\FieldCommon; use Weiwait\DcatVue\Field\Traits\FieldCommon;
use Weiwait\DcatVue\Field\Traits\HasWatch; use Weiwait\DcatVue\Field\Traits\HasWatch;

View File

@@ -2,18 +2,14 @@
namespace Weiwait\DcatVue\Field\Traits; namespace Weiwait\DcatVue\Field\Traits;
use Dcat\Admin\Exception\RuntimeException;
use Dcat\Admin\Form\Field;
use Illuminate\Database\Eloquent\Model;
trait HasWatch trait HasWatch
{ {
public function watch(string $field, string $handler): static public function watch(string $target, string $handler): static
{ {
$this->addVariables([ $this->addVariables([
'watches' => array_merge( 'watches' => array_merge(
$this->variables()['watches'] ?? [], $this->variables()['watches'] ?? [],
[compact('field', 'handler')] [compact('target', 'handler')]
) )
]); ]);

View File

@@ -122,4 +122,7 @@ return [
'2.10.0' => [ '2.10.0' => [
'fixed bugs & optimizing', 'fixed bugs & optimizing',
], ],
'2.10.1' => [
'optimizing',
],
]; ];