|
7 | 7 | <PackageTips Name="BootstrapBlazor.ImageCropper" /> |
8 | 8 |
|
9 | 9 | <DemoBlock Title="@Localizer["ImageCropperNormalText"]" Introduction="@Localizer["ImageCropperNormalIntro"]" Name="Normal"> |
10 | | - <ImageCropper @ref="_cropper" Url="@_images[0]"></ImageCropper> |
| 10 | + <ImageCropper @ref="_cropper" Url="@_images[0]" Options="_roundOptions1"></ImageCropper> |
11 | 11 | <section ignore> |
12 | 12 | <BootstrapInputGroup> |
13 | | - <Button Text="OK" OnClick="Crop" /> |
14 | | - <Button Text="@Localizer["ImageCropperResetText"]" OnClick="_cropper.Reset" /> |
15 | | - <Button Text="@Localizer["ImageCropperReplaceText"]" OnClick="OnClickReplace" /> |
16 | | - <Button Text="@Localizer["ImageCropperRotateText"]" OnClick="Rotate" /> |
17 | | - <Button Text="@Localizer["ImageCropperEnableText"]" OnClick="_cropper.Enable" /> |
18 | | - <Button Text="@Localizer["ImageCropperDisabledText"]" OnClick="_cropper.Disable" /> |
19 | | - <Button Text="@Localizer["ImageCropperClearText"]" OnClick="_cropper.Clear" /> |
| 13 | + <Button Text="OK" OnClick="Crop"></Button> |
| 14 | + <Button Text="@Localizer["ImageCropperResetText"]" OnClick="_cropper.Reset"></Button> |
| 15 | + <Button Text="@Localizer["ImageCropperReplaceText"]" OnClick="OnClickReplace"></Button> |
| 16 | + <Button Text="@Localizer["ImageCropperRotateText"]" OnClick="Rotate"></Button> |
| 17 | + <Button Text="@Localizer["ImageCropperEnableText"]" OnClick="_cropper.Enable"></Button> |
| 18 | + <Button Text="@Localizer["ImageCropperDisabledText"]" OnClick="_cropper.Disable"></Button> |
| 19 | + <Button Text="@Localizer["ImageCropperClearText"]" OnClick="_cropper.Clear"></Button> |
20 | 20 | </BootstrapInputGroup> |
| 21 | + |
| 22 | + <div class="d-flex mt-3" style="gap: 0.5rem;"> |
| 23 | + <div class="bb-cropper-preview bb-cropper-preview1 bb-cropper-preview-lg"></div> |
| 24 | + <div class="bb-cropper-preview bb-cropper-preview1 bb-cropper-preview-md"></div> |
| 25 | + <div class="bb-cropper-preview bb-cropper-preview1 bb-cropper-preview-sm"></div> |
| 26 | + <div class="bb-cropper-preview bb-cropper-preview1 bb-cropper-preview-xs"></div> |
| 27 | + </div> |
| 28 | + |
21 | 29 | @if (!string.IsNullOrEmpty(_base64String)) |
22 | 30 | { |
23 | | - <img src="@_base64String" style="width: 240px;" /> |
24 | | - <Textarea Value="@_base64String" rows="3" class="mt-3" /> |
| 31 | + <img src="@_base64String" style="width: 240px; margin-top: 1rem;" /> |
| 32 | + <Textarea Value="@_base64String" rows="3" class="mt-3"></Textarea> |
25 | 33 | } |
26 | 34 | </section> |
27 | 35 | </DemoBlock> |
28 | 36 |
|
29 | | -<DemoBlock Title="@Localizer["ImageCropperNormalText"]" Introduction="@Localizer["ImageCropperNormalIntro"]" Name="Normal"> |
30 | | - <ImageCropper @ref="_roundCropper" Url="@_images[0]" CropperShape="ImageCropperShape.Round" Options="_roundOptions" /> |
| 37 | +<DemoBlock Title="@Localizer["ImageCropperRoundText"]" Introduction="@Localizer["ImageCropperRoundIntro"]" Name="Round"> |
| 38 | + <ImageCropper @ref="_roundCropper" Url="@_images[0]" Options="_roundOptions2"></ImageCropper> |
31 | 39 | <section ignore> |
32 | 40 | <BootstrapInputGroup> |
33 | | - <Button Text="OK" OnClick="RoundCrop" /> |
| 41 | + <Button Text="OK" OnClick="RoundCrop"></Button> |
34 | 42 | </BootstrapInputGroup> |
| 43 | + |
| 44 | + <div class="d-flex mt-3" style="gap: 0.5rem;"> |
| 45 | + <div class="bb-cropper-preview bb-cropper-preview-round bb-cropper-preview-lg"></div> |
| 46 | + <div class="bb-cropper-preview bb-cropper-preview-round bb-cropper-preview-md"></div> |
| 47 | + <div class="bb-cropper-preview bb-cropper-preview-round bb-cropper-preview-sm"></div> |
| 48 | + <div class="bb-cropper-preview bb-cropper-preview-round bb-cropper-preview-xs"></div> |
| 49 | + </div> |
| 50 | + |
35 | 51 | @if (!string.IsNullOrEmpty(_base64String2)) |
36 | 52 | { |
37 | | - <img src="@_base64String2" style="width: 240px;" /> |
| 53 | + <img src="@_base64String2" style="width: 240px; margin-top: 1rem;" /> |
38 | 54 | } |
39 | 55 | </section> |
40 | 56 | </DemoBlock> |
|
0 commit comments