mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-13 14:56:54 +08:00
feat(build): Add loading and skeleton to blocks schema.
This commit is contained in:
parent
b9e6f1ce19
commit
1398ca3506
@ -791,23 +791,27 @@ describe('block areas', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('user defined loading', async () => {
|
||||
test('user defined skeleton', async () => {
|
||||
const components = {
|
||||
pages: [
|
||||
{
|
||||
id: 'page_1',
|
||||
type: 'Container',
|
||||
auth,
|
||||
loading: {
|
||||
custom: true,
|
||||
},
|
||||
skeleton: [
|
||||
{
|
||||
custom: true,
|
||||
},
|
||||
],
|
||||
blocks: [
|
||||
{
|
||||
id: 'block_1',
|
||||
type: 'Input',
|
||||
loading: {
|
||||
custom: true,
|
||||
},
|
||||
skeleton: [
|
||||
{
|
||||
custom: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -823,9 +827,11 @@ test('user defined loading', async () => {
|
||||
pageId: 'page_1',
|
||||
blockId: 'page_1',
|
||||
type: 'Container',
|
||||
loading: {
|
||||
custom: true,
|
||||
},
|
||||
skeleton: [
|
||||
{
|
||||
custom: true,
|
||||
},
|
||||
],
|
||||
requests: [],
|
||||
areas: {
|
||||
content: {
|
||||
@ -834,9 +840,11 @@ test('user defined loading', async () => {
|
||||
id: 'block:page_1:block_1:0',
|
||||
blockId: 'block_1',
|
||||
type: 'Input',
|
||||
loading: {
|
||||
custom: true,
|
||||
},
|
||||
skeleton: [
|
||||
{
|
||||
custom: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -219,10 +219,10 @@ export default {
|
||||
type: 'Block "layout" should be an object.',
|
||||
},
|
||||
},
|
||||
loading: {
|
||||
type: 'object',
|
||||
skeleton: {
|
||||
type: 'array',
|
||||
errorMessage: {
|
||||
type: 'Block "loading" should be an object.',
|
||||
type: 'Block "skeleton" should be an array.',
|
||||
},
|
||||
},
|
||||
style: {
|
||||
@ -232,6 +232,7 @@ export default {
|
||||
},
|
||||
},
|
||||
visible: {},
|
||||
loading: {},
|
||||
blocks: {
|
||||
type: 'array',
|
||||
items: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user