-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
117 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<nz-layout class="common-layout" style="padding-left: 0"> | ||
<nz-sider nzTheme="light"> | ||
<ul nz-menu nzMode="inline"> | ||
<li nz-menu-group nzTitle="插件"> | ||
<ul> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'plugins', 'richtext']">块编辑器</li> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'plugins', 'store']">本地存储</li> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'plugins', 'table']">动态表格</li> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'plugins', 'upload']">上传</li> | ||
</ul> | ||
</li> | ||
<li nz-menu-group nzTitle="引擎"> | ||
<ul> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'blocks', 'grid']">栅格</li> | ||
<li nz-menu-item nzMatchRouter [routerLink]="['/experiment', 'blocks', 'card']">卡片</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</nz-sider> | ||
<nz-layout> | ||
<nz-content style="padding: 8px"> | ||
<router-outlet></router-outlet> | ||
</nz-content> | ||
</nz-layout> | ||
</nz-layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Routes } from '@angular/router'; | ||
|
||
import { environment } from '@env'; | ||
|
||
import { AppGuard } from '../app/app.guard'; | ||
|
||
export let experiments: Routes = []; | ||
|
||
if (!environment.production) { | ||
experiments = [ | ||
{ | ||
path: 'experiment', | ||
loadChildren: () => import('../experiment/experiment.module').then(m => m.ExperimentModule), | ||
canActivate: [AppGuard], | ||
data: { | ||
breadcrumb: $localize`实验开发` | ||
} | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<nz-card> | ||
<form nz-form nzLayout="vertical" id="form" [formGroup]="form" (wpxSubmit)="submit($event)"> | ||
<nz-form-item> | ||
<nz-form-label>Avatar</nz-form-label> | ||
<nz-form-control> | ||
<wpx-upload-avatar | ||
wpxExt="image" | ||
[wpxAccept]="['image/jpeg', 'image/png']" | ||
[wpxFallback]="['assets', 'photon.svg'] | wpxAssets" | ||
formControlName="avatar" | ||
> | ||
</wpx-upload-avatar> | ||
</nz-form-control> | ||
</nz-form-item> | ||
</form> | ||
</nz-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { FormBuilder, FormGroup } from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'exp-upload', | ||
templateUrl: './upload.component.html' | ||
}) | ||
export class UploadComponent implements OnInit { | ||
form!: FormGroup; | ||
|
||
constructor(private fb: FormBuilder) {} | ||
|
||
ngOnInit(): void { | ||
this.form = this.fb.group({ | ||
avatar: [null] | ||
}); | ||
} | ||
|
||
submit(data: any): void { | ||
console.log(data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
import { ShareModule } from '@common/share.module'; | ||
import { WpxRichtextModule } from '@weplanx/ng/richtext'; | ||
|
||
import { UploadComponent } from './upload.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: UploadComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ShareModule, WpxRichtextModule, RouterModule.forChild(routes)], | ||
declarations: [UploadComponent] | ||
}) | ||
export class UploadModule {} |