Browse Source

upgrade cap 5.1.0

pull/278/head
cKey 5 years ago
parent
commit
5b94ccf256
  1. 2
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN/Abp/MessageService/Notifications/IMyNotificationAppService.cs
  2. 9
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN/Abp/MessageService/Notifications/INotificationAppService.cs
  3. 2
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs
  4. 2
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Notifications/MyNotificationAppService.cs
  5. 35
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Notifications/NotificationAppService.cs
  6. 2
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs
  7. 6
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Notifications/MyNotificationController.cs
  8. 26
      aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Notifications/NotificationController.cs
  9. 8
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  10. 6
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj
  11. 6
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj
  12. 6
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj
  13. 6
      aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/LINGYUN.Abp.IdentityServer4.HttpApi.Host.csproj
  14. 6
      aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj
  15. 6
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
  16. 6
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
  17. 155
      vueJs/package-lock.json
  18. 3
      vueJs/package.json
  19. 27
      vueJs/src/components/MarkdownEditor/default-options.ts
  20. 128
      vueJs/src/components/MarkdownEditor/index.vue
  21. 6
      vueJs/src/router/modules/components.ts
  22. 135
      vueJs/src/views/components-demo/markdown.vue

2
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN/Abp/MessageService/Notifications/IMyNotificationAppService.cs

@ -14,8 +14,6 @@ namespace LINGYUN.Abp.MessageService.Notifications
>, >,
IDeleteAppService<long> IDeleteAppService<long>
{ {
Task SendNofiterAsync(NotificationSendDto input);
Task<ListResultDto<NotificationGroupDto>> GetAssignableNotifiersAsync(); Task<ListResultDto<NotificationGroupDto>> GetAssignableNotifiersAsync();
} }
} }

9
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application.Contracts/LINGYUN/Abp/MessageService/Notifications/INotificationAppService.cs

@ -0,0 +1,9 @@
using System.Threading.Tasks;
namespace LINGYUN.Abp.MessageService.Notifications
{
public interface INotificationAppService
{
Task SendAsync(NotificationSendDto input);
}
}

2
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Chat/ChatAppService.cs

@ -9,6 +9,7 @@ using Volo.Abp.Users;
namespace LINGYUN.Abp.MessageService.Chat namespace LINGYUN.Abp.MessageService.Chat
{ {
[Authorize]
public class ChatAppService : ApplicationService, IChatAppService public class ChatAppService : ApplicationService, IChatAppService
{ {
protected IMessageSender MessageSender => LazyServiceProvider.LazyGetRequiredService<IMessageSender>(); protected IMessageSender MessageSender => LazyServiceProvider.LazyGetRequiredService<IMessageSender>();
@ -24,7 +25,6 @@ namespace LINGYUN.Abp.MessageService.Chat
_userGroupStore = userGroupStore; _userGroupStore = userGroupStore;
} }
[Authorize]
public virtual async Task<PagedResultDto<ChatMessage>> GetMyChatMessageAsync(UserMessageGetByPagedDto input) public virtual async Task<PagedResultDto<ChatMessage>> GetMyChatMessageAsync(UserMessageGetByPagedDto input)
{ {
var chatMessageCount = await _messageStore var chatMessageCount = await _messageStore

2
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Notifications/MyNotificationAppService.cs

@ -1,4 +1,5 @@
using LINGYUN.Abp.Notifications; using LINGYUN.Abp.Notifications;
using Microsoft.AspNetCore.Authorization;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
@ -7,6 +8,7 @@ using Volo.Abp.Users;
namespace LINGYUN.Abp.MessageService.Notifications namespace LINGYUN.Abp.MessageService.Notifications
{ {
[Authorize]
public class MyNotificationAppService : ApplicationService, IMyNotificationAppService public class MyNotificationAppService : ApplicationService, IMyNotificationAppService
{ {
protected INotificationSender NotificationSender { get; } protected INotificationSender NotificationSender { get; }

35
aspnet-core/modules/message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/Notifications/NotificationAppService.cs

@ -0,0 +1,35 @@
using LINGYUN.Abp.Notifications;
using Microsoft.AspNetCore.Authorization;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.MessageService.Notifications
{
[Authorize]
public class NotificationAppService : ApplicationService, INotificationAppService
{
protected INotificationSender NotificationSender { get; }
public NotificationAppService(
INotificationSender notificationSender)
{
NotificationSender = notificationSender;
}
public virtual async Task SendAsync(NotificationSendDto input)
{
UserIdentifier user = null;
if (input.ToUserId.HasValue)
{
user = new UserIdentifier(input.ToUserId.Value, input.ToUserName);
}
await NotificationSender
.SendNofiterAsync(
input.Name,
input.Data,
user,
CurrentTenant.Id,
input.Severity);
}
}
}

2
aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs

@ -39,7 +39,7 @@ namespace LINGYUN.Abp.MessageService.Chat
return await _chatAppService.GetMyLastChatMessageAsync(input); return await _chatAppService.GetMyLastChatMessageAsync(input);
} }
[HttpGet] [HttpPost]
[Route("send-message")] [Route("send-message")]
public virtual async Task<ChatMessageSendResultDto> SendMessageAsync(ChatMessage input) public virtual async Task<ChatMessageSendResultDto> SendMessageAsync(ChatMessage input)
{ {

6
aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Notifications/MyNotificationController.cs

@ -19,12 +19,6 @@ namespace LINGYUN.Abp.MessageService.Notifications
MyNotificationAppService = myNotificationAppService; MyNotificationAppService = myNotificationAppService;
} }
[HttpPost]
public virtual async Task SendNofiterAsync(NotificationSendDto input)
{
await MyNotificationAppService.SendNofiterAsync(input);
}
[HttpDelete] [HttpDelete]
[Route("{id}")] [Route("{id}")]
public virtual async Task DeleteAsync(long id) public virtual async Task DeleteAsync(long id)

26
aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Notifications/NotificationController.cs

@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.MessageService.Notifications
{
[RemoteService(Name = AbpMessageServiceConsts.RemoteServiceName)]
[Route("api/notifilers")]
public class NotificationController : AbpController, INotificationAppService
{
protected INotificationAppService NotificationAppService { get; }
public NotificationController(
INotificationAppService notificationAppService)
{
NotificationAppService = notificationAppService;
}
[HttpPost]
public virtual async Task SendAsync(NotificationSendDto input)
{
await NotificationAppService.SendAsync(input);
}
}
}

8
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
@ -22,9 +22,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Serilog.Enrichers.Assembly" Version="2.0.0" /> <PackageReference Include="Serilog.Enrichers.Assembly" Version="2.0.0" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" /> <PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" />

6
aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj

@ -23,9 +23,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

6
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj

@ -11,9 +11,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.Sqlite" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Sqlite" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="5.0.*" />
<PackageReference Include="Ocelot.Provider.Polly" Version="16.0.1" /> <PackageReference Include="Ocelot.Provider.Polly" Version="16.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />

6
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj

@ -11,9 +11,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

6
aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/LINGYUN.Abp.IdentityServer4.HttpApi.Host.csproj

@ -21,9 +21,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

6
aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj

@ -6,9 +6,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

6
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj

@ -16,9 +16,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

6
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj

@ -20,9 +20,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.3" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

155
vueJs/package-lock.json

@ -2224,7 +2224,8 @@
"@types/estree": { "@types/estree": {
"version": "0.0.44", "version": "0.0.44",
"resolved": "https://registry.npm.taobao.org/@types/estree/download/@types/estree-0.0.44.tgz", "resolved": "https://registry.npm.taobao.org/@types/estree/download/@types/estree-0.0.44.tgz",
"integrity": "sha1-mAzFopo+876m/x99AhBH1+pXXiE=" "integrity": "sha1-mAzFopo+876m/x99AhBH1+pXXiE=",
"dev": true
}, },
"@types/events": { "@types/events": {
"version": "3.0.0", "version": "3.0.0",
@ -2325,6 +2326,7 @@
"version": "3.3.36", "version": "3.3.36",
"resolved": "https://registry.npm.taobao.org/@types/jquery/download/@types/jquery-3.3.36.tgz", "resolved": "https://registry.npm.taobao.org/@types/jquery/download/@types/jquery-3.3.36.tgz",
"integrity": "sha1-qGjBwkSp97mI2PxWoyNPIuc8V7g=", "integrity": "sha1-qGjBwkSp97mI2PxWoyNPIuc8V7g=",
"dev": true,
"requires": { "requires": {
"@types/sizzle": "*" "@types/sizzle": "*"
} }
@ -2350,25 +2352,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/linkify-it": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/@types/linkify-it/download/@types/linkify-it-2.1.0.tgz",
"integrity": "sha1-6j3WTEgFWXMReQth6HLL0e0s2AY="
},
"@types/lodash": { "@types/lodash": {
"version": "4.14.150", "version": "4.14.150",
"resolved": "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.150.tgz", "resolved": "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.150.tgz",
"integrity": "sha1-ZJ/kRoTD8fy2Fk2UPFphl36M8L0=", "integrity": "sha1-ZJ/kRoTD8fy2Fk2UPFphl36M8L0=",
"dev": true "dev": true
}, },
"@types/markdown-it": {
"version": "0.0.7",
"resolved": "https://registry.npm.taobao.org/@types/markdown-it/download/@types/markdown-it-0.0.7.tgz",
"integrity": "sha1-dQcEhaPYrRHn3rgof0QwvhW/TTk=",
"requires": {
"@types/linkify-it": "*"
}
},
"@types/mime": { "@types/mime": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/@types/mime/download/@types/mime-2.0.1.tgz?cache=0&sync_timestamp=1588201521623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fmime%2Fdownload%2F%40types%2Fmime-2.0.1.tgz", "resolved": "https://registry.npm.taobao.org/@types/mime/download/@types/mime-2.0.1.tgz?cache=0&sync_timestamp=1588201521623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fmime%2Fdownload%2F%40types%2Fmime-2.0.1.tgz",
@ -2450,7 +2439,8 @@
"@types/sizzle": { "@types/sizzle": {
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/@types/sizzle/download/@types/sizzle-2.3.2.tgz", "resolved": "https://registry.npm.taobao.org/@types/sizzle/download/@types/sizzle-2.3.2.tgz",
"integrity": "sha1-qBG4wY4rq6t9VCszZYh64uTZ3kc=" "integrity": "sha1-qBG4wY4rq6t9VCszZYh64uTZ3kc=",
"dev": true
}, },
"@types/sortablejs": { "@types/sortablejs": {
"version": "1.10.4", "version": "1.10.4",
@ -2480,6 +2470,7 @@
"version": "0.23.3", "version": "0.23.3",
"resolved": "https://registry.npm.taobao.org/@types/tern/download/@types/tern-0.23.3.tgz", "resolved": "https://registry.npm.taobao.org/@types/tern/download/@types/tern-0.23.3.tgz",
"integrity": "sha1-S1RTjwSojJ/3neH2+U9XWn8zlGA=", "integrity": "sha1-S1RTjwSojJ/3neH2+U9XWn8zlGA=",
"dev": true,
"requires": { "requires": {
"@types/estree": "*" "@types/estree": "*"
} }
@ -7623,7 +7614,8 @@
"entities": { "entities": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz", "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz",
"integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=" "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=",
"dev": true
}, },
"errno": { "errno": {
"version": "0.1.7", "version": "0.1.7",
@ -8337,10 +8329,6 @@
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
"dev": true "dev": true
}, },
"eve": {
"version": "git+ssh://git@github.com/adobe-webplatform/eve.git#eef80ed8d188423c2272746fb8ae5cc8dad84cb1",
"from": "eve@git://github.com/adobe-webplatform/eve.git#eef80ed"
},
"event-pubsub": { "event-pubsub": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz", "resolved": "https://registry.npm.taobao.org/event-pubsub/download/event-pubsub-4.3.0.tgz",
@ -10217,7 +10205,8 @@
"highlight.js": { "highlight.js": {
"version": "9.18.1", "version": "9.18.1",
"resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.1.tgz?cache=0&sync_timestamp=1587986410564&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhighlight.js%2Fdownload%2Fhighlight.js-9.18.1.tgz", "resolved": "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.18.1.tgz?cache=0&sync_timestamp=1587986410564&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhighlight.js%2Fdownload%2Fhighlight.js-9.18.1.tgz",
"integrity": "sha1-7SGqAB/mJSuxCj121HVzxlOf4Tw=" "integrity": "sha1-7SGqAB/mJSuxCj121HVzxlOf4Tw=",
"dev": true
}, },
"hmac-drbg": { "hmac-drbg": {
"version": "1.0.1", "version": "1.0.1",
@ -14309,11 +14298,6 @@
} }
} }
}, },
"jquery": {
"version": "3.5.0",
"resolved": "https://registry.npm.taobao.org/jquery/download/jquery-3.5.0.tgz?cache=0&sync_timestamp=1586533553065&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjquery%2Fdownload%2Fjquery-3.5.0.tgz",
"integrity": "sha1-mYC5fZ5BlGEcNlMOfcRqWNc0D8k="
},
"js-beautify": { "js-beautify": {
"version": "1.11.0", "version": "1.11.0",
"resolved": "https://registry.npm.taobao.org/js-beautify/download/js-beautify-1.11.0.tgz", "resolved": "https://registry.npm.taobao.org/js-beautify/download/js-beautify-1.11.0.tgz",
@ -14651,14 +14635,6 @@
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true "dev": true
}, },
"linkify-it": {
"version": "2.2.0",
"resolved": "https://registry.npm.taobao.org/linkify-it/download/linkify-it-2.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flinkify-it%2Fdownload%2Flinkify-it-2.2.0.tgz",
"integrity": "sha1-47VGl+eL+RXHCjis14/QngBYsc8=",
"requires": {
"uc.micro": "^1.0.1"
}
},
"lint-staged": { "lint-staged": {
"version": "10.2.0", "version": "10.2.0",
"resolved": "https://registry.npm.taobao.org/lint-staged/download/lint-staged-10.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flint-staged%2Fdownload%2Flint-staged-10.2.0.tgz", "resolved": "https://registry.npm.taobao.org/lint-staged/download/lint-staged-10.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flint-staged%2Fdownload%2Flint-staged-10.2.0.tgz",
@ -15960,18 +15936,6 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"markdown-it": {
"version": "9.1.0",
"resolved": "https://registry.npm.taobao.org/markdown-it/download/markdown-it-9.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmarkdown-it%2Fdownload%2Fmarkdown-it-9.1.0.tgz",
"integrity": "sha1-35YBwWhWhwTVVLH/+a8MW1YRaNk=",
"requires": {
"argparse": "^1.0.7",
"entities": "~1.1.1",
"linkify-it": "^2.0.0",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
}
},
"md5.js": { "md5.js": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz", "resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz",
@ -15988,11 +15952,6 @@
"resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz", "resolved": "https://registry.npm.taobao.org/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz",
"integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs=" "integrity": "sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs="
}, },
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/mdurl/download/mdurl-1.0.1.tgz",
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4="
},
"media-typer": { "media-typer": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz",
@ -17361,11 +17320,6 @@
} }
} }
}, },
"plantuml-encoder": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/plantuml-encoder/download/plantuml-encoder-1.4.0.tgz",
"integrity": "sha1-eJkwLPeF3pVr8aFn4VQg/u5Zdfc="
},
"please-upgrade-node": { "please-upgrade-node": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npm.taobao.org/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz", "resolved": "https://registry.npm.taobao.org/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz",
@ -18345,13 +18299,6 @@
"integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=", "integrity": "sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=",
"dev": true "dev": true
}, },
"raphael": {
"version": "git+ssh://git@github.com/nhn/raphael.git#78a6ed3ec269f33b6457b0ec66f8c3d1f2ed70e0",
"from": "raphael@git+https://github.com/nhn/raphael.git#2.2.0-c",
"requires": {
"eve": "eve@git://github.com/adobe-webplatform/eve.git#eef80ed"
}
},
"raw-body": { "raw-body": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz", "resolved": "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz",
@ -19728,10 +19675,6 @@
"resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsprintf-js%2Fdownload%2Fsprintf-js-1.0.3.tgz", "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsprintf-js%2Fdownload%2Fsprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
}, },
"squire-rte": {
"version": "git+ssh://git@github.com/seonim-ryu/Squire.git#fd40b4e3020845825701e9689f190bab3f4775d4",
"from": "squire-rte@github:seonim-ryu/Squire#fd40b4e3020845825701e9689f190bab3f4775d4"
},
"ssf": { "ssf": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "https://registry.npm.taobao.org/ssf/download/ssf-0.10.3.tgz?cache=0&sync_timestamp=1583708815803&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssf%2Fdownload%2Fssf-0.10.3.tgz", "resolved": "https://registry.npm.taobao.org/ssf/download/ssf-0.10.3.tgz?cache=0&sync_timestamp=1583708815803&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssf%2Fdownload%2Fssf-0.10.3.tgz",
@ -20458,11 +20401,6 @@
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
"dev": true "dev": true
}, },
"to-mark": {
"version": "1.1.9",
"resolved": "https://registry.npm.taobao.org/to-mark/download/to-mark-1.1.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fto-mark%2Fdownload%2Fto-mark-1.1.9.tgz",
"integrity": "sha1-LPvI52XEMN3LRqIYvgebTKJ3PVs="
},
"to-object-path": { "to-object-path": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz",
@ -20846,74 +20784,6 @@
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true "dev": true
}, },
"tui-chart": {
"version": "3.11.2",
"resolved": "https://registry.npm.taobao.org/tui-chart/download/tui-chart-3.11.2.tgz",
"integrity": "sha1-LRjs3+JlSL+ELoG2woscfiIvs8w=",
"requires": {
"core-js": "^3.6.4",
"raphael": "raphael@git+https://github.com/nhn/raphael.git#2.2.0-c",
"tui-code-snippet": "^2.3.1"
},
"dependencies": {
"tui-code-snippet": {
"version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/tui-code-snippet/download/tui-code-snippet-2.3.2.tgz?cache=0&sync_timestamp=1586137651875&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftui-code-snippet%2Fdownload%2Ftui-code-snippet-2.3.2.tgz",
"integrity": "sha1-Oes85G6pIEOzJE8VV5ckhTWIDF0="
}
}
},
"tui-code-snippet": {
"version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/tui-code-snippet/download/tui-code-snippet-1.5.2.tgz?cache=0&sync_timestamp=1586137651875&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftui-code-snippet%2Fdownload%2Ftui-code-snippet-1.5.2.tgz",
"integrity": "sha1-9Ljw8ayZawtbYh93yVB68ZoN4jg="
},
"tui-color-picker": {
"version": "2.2.6",
"resolved": "https://registry.npm.taobao.org/tui-color-picker/download/tui-color-picker-2.2.6.tgz?cache=0&sync_timestamp=1578537206138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftui-color-picker%2Fdownload%2Ftui-color-picker-2.2.6.tgz",
"integrity": "sha1-urVORzgOVQuzrIrpdAIbPMJRiqk=",
"requires": {
"tui-code-snippet": "^2.2.0"
},
"dependencies": {
"tui-code-snippet": {
"version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/tui-code-snippet/download/tui-code-snippet-2.3.2.tgz?cache=0&sync_timestamp=1586137651875&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftui-code-snippet%2Fdownload%2Ftui-code-snippet-2.3.2.tgz",
"integrity": "sha1-Oes85G6pIEOzJE8VV5ckhTWIDF0="
}
}
},
"tui-editor": {
"version": "1.4.10",
"resolved": "https://registry.npm.taobao.org/tui-editor/download/tui-editor-1.4.10.tgz",
"integrity": "sha1-xprBWEL4GSdIV/GEMA0k8KXtZxc=",
"requires": {
"@types/codemirror": "0.0.71",
"@types/jquery": "^3.3.29",
"@types/markdown-it": "0.0.7",
"codemirror": "^5.48.4",
"highlight.js": "^9.12.0",
"jquery": "^3.3.1",
"markdown-it": "^9.0.0",
"plantuml-encoder": "^1.2.5",
"resize-observer-polyfill": "^1.5.0",
"squire-rte": "squire-rte@github:seonim-ryu/Squire#fd40b4e3020845825701e9689f190bab3f4775d4",
"to-mark": "^1.1.9",
"tui-chart": "^3.7.0",
"tui-code-snippet": "^1.5.0",
"tui-color-picker": "^2.2.1"
},
"dependencies": {
"@types/codemirror": {
"version": "0.0.71",
"resolved": "https://registry.npm.taobao.org/@types/codemirror/download/@types/codemirror-0.0.71.tgz",
"integrity": "sha1-hh8byzEAwKBkVnxUAPKYHPSujKc=",
"requires": {
"@types/tern": "*"
}
}
}
},
"tunnel-agent": { "tunnel-agent": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz", "resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
@ -20979,11 +20849,6 @@
"integrity": "sha1-QJ64VE6gM1cRIFhp7EWKsQnuEGE=", "integrity": "sha1-QJ64VE6gM1cRIFhp7EWKsQnuEGE=",
"dev": true "dev": true
}, },
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npm.taobao.org/uc.micro/download/uc.micro-1.0.6.tgz",
"integrity": "sha1-nEEagCpAmpH8bPdAgbq6NLJEmaw="
},
"uglify-js": { "uglify-js": {
"version": "3.4.10", "version": "3.4.10",
"resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1586950053979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1586950053979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz",

3
vueJs/package.json

@ -15,7 +15,7 @@
"test:unit": "jest --clearCache && vue-cli-service test:unit" "test:unit": "jest --clearCache && vue-cli-service test:unit"
}, },
"dependencies": { "dependencies": {
"@microsoft/signalr": "^3.1.4", "@microsoft/signalr": "^5.0.7",
"@tinymce/tinymce-vue": "^3.2.0", "@tinymce/tinymce-vue": "^3.2.0",
"axios": "^0.21.1", "axios": "^0.21.1",
"clipboard": "^2.0.6", "clipboard": "^2.0.6",
@ -43,7 +43,6 @@
"simple-progress-webpack-plugin": "^1.1.2", "simple-progress-webpack-plugin": "^1.1.2",
"sortablejs": "^1.10.2", "sortablejs": "^1.10.2",
"tinymce": "^5.2.1", "tinymce": "^5.2.1",
"tui-editor": "^1.4.10",
"view-design": "^4.2.0", "view-design": "^4.2.0",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-class-component": "^7.2.3", "vue-class-component": "^7.2.3",

27
vueJs/src/components/MarkdownEditor/default-options.ts

@ -1,27 +0,0 @@
// Doc: https://nhn.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
export default {
previewStyle: 'vertical',
usageStatistics: false,
toolbarItems: [
'heading',
'bold',
'italic',
'strike',
'divider',
'hr',
'quote',
'divider',
'ul',
'ol',
'task',
'indent',
'outdent',
'divider',
'table',
'image',
'link',
'divider',
'code',
'codeblock'
]
}

128
vueJs/src/components/MarkdownEditor/index.vue

@ -1,128 +0,0 @@
<template>
<div :id="id" />
</template>
<script lang="ts">
import 'codemirror/lib/codemirror.css' // codemirror
import 'tui-editor/dist/tui-editor.css' // editor ui
import 'tui-editor/dist/tui-editor-contents.css' // editor content
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
import defaultOptions from './default-options'
import TuiEditor from 'tui-editor'
const defaultId = () => 'markdown-editor-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
@Component({
name: 'MarkdownEditor'
})
export default class extends Vue {
@Prop({ required: true }) private value!: string
@Prop({ default: defaultId }) private id!: string
@Prop({ default: () => defaultOptions }) private options!: tuiEditor.IEditorOptions
@Prop({ default: 'markdown' }) private mode!: string
@Prop({ default: '300px' }) private height!: string
// https://github.com/nhnent/tui.editor/tree/master/src/js/langs
@Prop({ default: 'en_US' }) private language!: string
private markdownEditor?: tuiEditor.Editor
get editorOptions() {
const options = Object.assign({}, defaultOptions, this.options)
options.initialEditType = this.mode
options.height = this.height
options.language = this.language
return options
}
@Watch('value')
private onValueChange(value: string, oldValue: string) {
if (this.markdownEditor) {
if (value !== oldValue && value !== this.markdownEditor.getValue()) {
this.markdownEditor.setValue(value)
}
}
}
@Watch('language')
private onLanguageChange() {
this.destroyEditor()
this.initEditor()
}
@Watch('height')
private onHeightChange(value: string) {
if (this.markdownEditor) {
this.markdownEditor.height(value)
}
}
@Watch('mode')
private onModeChange(value: string) {
if (this.markdownEditor) {
this.markdownEditor.changeMode(value)
}
}
mounted() {
this.initEditor()
}
destroyed() {
this.destroyEditor()
}
private initEditor() {
const editorElement = document.getElementById(this.id)
if (!editorElement) return
this.editorOptions.el = editorElement
this.markdownEditor = new TuiEditor(this.editorOptions)
if (this.value) {
this.markdownEditor.setValue(this.value)
}
this.markdownEditor.on('change', () => {
if (this.markdownEditor !== undefined) {
this.$emit('input', this.markdownEditor.getValue())
}
})
}
private destroyEditor() {
if (!this.markdownEditor) return
this.markdownEditor.off('change')
this.markdownEditor.remove()
this.markdownEditor = undefined
}
public focus() {
if (this.markdownEditor) {
this.markdownEditor.focus()
}
}
public setValue(value: string) {
if (this.markdownEditor) {
this.markdownEditor.setValue(value)
}
}
public getValue() {
if (this.markdownEditor) {
return this.markdownEditor.getValue()
}
return ''
}
public setHtml(value: string) {
if (this.markdownEditor) {
this.markdownEditor.setHtml(value)
}
}
public getHtml() {
if (this.markdownEditor) {
return this.markdownEditor.getHtml()
}
return ''
}
}
</script>

6
vueJs/src/router/modules/components.ts

@ -17,12 +17,6 @@ const componentsRouter: RouteConfig = {
name: 'TinymceDemo', name: 'TinymceDemo',
meta: { title: 'tinymce' } meta: { title: 'tinymce' }
}, },
{
path: 'markdown',
component: () => import(/* webpackChunkName: "markdown" */ '@/views/components-demo/markdown.vue'),
name: 'MarkdownDemo',
meta: { title: 'markdown' }
},
{ {
path: 'json-editor', path: 'json-editor',
component: () => import(/* webpackChunkName: "json-editor" */ '@/views/components-demo/json-editor.vue'), component: () => import(/* webpackChunkName: "json-editor" */ '@/views/components-demo/json-editor.vue'),

135
vueJs/src/views/components-demo/markdown.vue

@ -1,135 +0,0 @@
<template>
<div class="components-container">
<aside>
Markdown is based on
<a
href="https://github.com/nhnent/tui.editor"
target="_blank"
>tui.editor</a> simply wrapped with Vue.
<a
target="_blank"
href="https://armour.github.io/vue-typescript-admin-docs/features/components/markdown-editor.html"
>
Documentation </a>
</aside>
<div class="editor-container">
<el-tag class="tag-title">
Basic:
</el-tag>
<markdown-editor
ref="markdownEditor"
v-model="content1"
height="300px"
/>
</div>
<div class="editor-container">
<el-tag class="tag-title">
Markdown Mode:
</el-tag>
<markdown-editor
v-model="content2"
height="200px"
:options="{hideModeSwitch: true, previewStyle: 'tab'}"
/>
</div>
<div class="editor-container">
<el-tag class="tag-title">
Customize Toolbar:
</el-tag>
<markdown-editor
v-model="content3"
:options="{toolbarItems: ['heading','bold','italic']}"
/>
</div>
<div class="editor-container">
<el-tag class="tag-title">
I18n:
</el-tag>
<el-alert
:closable="false"
title="You can change the language of the admin system to see the effect"
type="success"
/>
<markdown-editor
v-model="content4"
height="300px"
:language="language"
/>
</div>
<el-button
style="margin-top:80px;"
type="primary"
icon="el-icon-document"
@click="getHtml"
>
Get HTML
</el-button>
<!-- eslint-disable vue/no-v-html -->
<div v-html="html" />
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { AppModule } from '@/store/modules/app'
import MarkdownEditor from '@/components/MarkdownEditor/index.vue'
const content = `
**This is test**
* vue
* element
* webpack
`
@Component({
name: 'MarkdownDemo',
components: {
MarkdownEditor
}
})
export default class extends Vue {
private content1 = content
private content2 = content
private content3 = content
private content4 = content
private html = ''
// Mapping for local lang to tuiEditor lang
// https://github.com/nhnent/tui.editor/tree/master/src/js/langs
private languageTypeList: { [key: string]: string } = {
en: 'en_US',
zh: 'zh_CN',
es: 'es_ES',
ja: 'ja_JP',
ko: 'ko_KR'
}
mounted() {
// FIXES weird focus issue caused by MarkdownEditor
window.scrollTo(0, 0)
}
get language() {
return this.languageTypeList[AppModule.language]
}
private getHtml() {
this.html = (this.$refs.markdownEditor as MarkdownEditor).getHtml()
}
}
</script>
<style lang="scss" scoped>
.editor-container {
margin-bottom: 30px;
}
.tag-title {
margin-bottom: 5px;
}
</style>
Loading…
Cancel
Save