This commit is contained in:
pushuo 2022-08-05 16:49:41 +08:00
parent ff10ec9370
commit 0c74fc87eb
6 changed files with 23 additions and 15 deletions

View File

@ -12,6 +12,7 @@ use Beike\Admin\View\Components\Header;
use Beike\Admin\View\Components\Sidebar;
use Beike\Admin\View\Components\Form\Image;
use Beike\Admin\View\Components\Form\Input;
use Beike\Admin\View\Components\Form\Select;
use Beike\Console\Commands\MakeRootAdminUser;
use Beike\Admin\View\Components\Form\InputLocale;
use Beike\Admin\View\Components\Form\SwitchRadio;
@ -46,6 +47,7 @@ class AdminServiceProvider extends ServiceProvider
'form-input-locale' => InputLocale::class,
'form-switch' => SwitchRadio::class,
'form-input' => Input::class,
'form-select' => Select::class,
'form-image' => Image::class,
]);

View File

@ -1,5 +1,5 @@
<div class="row g-3 mb-3">
<label for="" class="wp-200 col-form-label text-end">{{ $title ?? '' }}</label>
<label for="" class="wp-200 col-form-label text-end opacity-75">{{ $title ?? '' }}</label>
<div class="col-auto wp-200-">
{{ $slot }}
</div>

View File

@ -1,10 +1,8 @@
<x-admin::form.row :title="$title">
{{-- <input type="text" name="{{ $name }}" class="form-control wp-400" value="{{ $value }}" placeholder="{{ $title }}"> --}}
<select class="form-select" aria-label="Default select example">
<option selected>Open this select menu</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<select class="form-select wp-200 me-3" name="{{ $name }}">
@foreach ($options as $option)
<option value="{{ $option['value'] }}" {{ $option['value'] == $value ? 'selected': '' }}>{{ $option['label'] }}</option>
@endforeach
</select>
{{ $slot }}
</x-admin::form.row>

View File

@ -204,14 +204,14 @@
const ordersChart = new Chart(orders, {
type: 'line',
data: {
labels: Array.from({length: 30}, (v, k) => k + 1),
labels: {!! $order_trends['latest_month']->pluck('date') !!},
datasets: [{
// label: ["订单数"],
fill: true,
backgroundColor : gradient, // Put the gradient here as a fill color
borderColor : "#4da4f9",
borderWidth: 2,
data: Array.from({length: 30}, () => Math.floor(Math.random() * 23.7)),
data: {!! $order_trends['latest_month']->pluck('total') !!},
// borderDash: [],
responsive: true,
lineTension: 0.4,

View File

@ -60,7 +60,7 @@
<div class="text-muted font-size-12 lh-base">管理后台目录,默认为admin</div>
</x-admin-form-input>
<x-admin::form.row title="模版主题">
{{-- <x-admin::form.row title="模版主题">
<select class="form-select wp-200 me-3" name="theme" aria-label="Default select example">
@foreach ($themes as $theme)
<option
@ -71,13 +71,21 @@
@endforeach
</select>
<div class="text-muted font-size-12 lh-base">主题模板选择</div>
</x-admin::form.row>
</x-admin::form.row> --}}
<x-admin-form-select title="模版主题" name="theme" :value="old('theme', system_setting('base.theme', 'default'))" :options="$themes">
<div class="text-muted font-size-12 lh-base">主题模板选择</div>
</x-admin-form-select>
<x-admin-form-switch name="tax" title="启用税费" value="{{ old('tax', system_setting('base.tax', '0')) }}">
<div class="text-muted font-size-12 lh-base">是否启用税费计算</div>
</x-admin-form-switch>
<x-admin::form.row title="税费地址">
<x-admin-form-select title="税费地址" name="tax_address" :value="old('tax_address', system_setting('base.address', 'shipping'))" :options="$tax_address">
<div class="text-muted font-size-12 lh-base">按什么地址计算税费</div>
</x-admin-form-select>
{{-- <x-admin::form.row title="税费地址">
<select class="form-select wp-200 me-3" name="tax_address" aria-label="Default select example">
@foreach ($tax_address as $address)
<option
@ -88,7 +96,7 @@
@endforeach
</select>
<div class="text-muted font-size-12 lh-base">按什么地址计算税费</div>
</x-admin::form.row>
</x-admin::form.row> --}}
<x-admin::form.row title="">
<button type="submit" class="btn btn-primary mt-4">提交</button>

View File

@ -7,14 +7,14 @@
aria-expanded="false">
@foreach (currencies() as $currency)
@if ($currency->code == current_currency_code())
{{ $currency->name }}
{{ $currency->symbol_left }} {{ $currency->name }}
@endif
@endforeach
</a>
<div class="dropdown-menu" aria-labelledby="currency-dropdown">
@foreach (currencies() as $currency)
<a class="dropdown-item" href="{{ shop_route('currency.switch', [$currency->code]) }}">{{ $currency->name }}</a>
<a class="dropdown-item" href="{{ shop_route('currency.switch', [$currency->code]) }}">{{ $currency->symbol_left }} {{ $currency->name }}</a>
@endforeach
</div>
</div>