• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/*** if arkts 1.2 */
22import { Content } from '../../@ohos.arkui.node';
23/*** endif */
24
25/**
26 * Define Content type
27 *
28 * @typedef {import('../api/@ohos.arkui.node').Content} Content
29 * @syscap SystemCapability.ArkUI.ArkUI.Full
30 * @crossplatform
31 * @atomicservice
32 * @since 12
33 */
34declare type Content = import('../api/@ohos.arkui.node').Content;
35
36/**
37 * Define ContentSlot attribute, to prevent improper recursive usage of ContentSlot
38 *
39 * @syscap SystemCapability.ArkUI.ArkUI.Full
40 * @crossplatform
41 * @atomicservice
42 * @since arkts {'1.1':'12','1.2':'20'}
43 * @arkts 1.1&1.2
44 */
45declare class ContentSlotAttribute {
46}
47
48/**
49 * Placeholder component for NodeContent and ComponentContent
50 *
51 * @interface ContentSlotInterface
52 * @syscap SystemCapability.ArkUI.ArkUI.Full
53 * @crossplatform
54 * @atomicservice
55 * @since arkts {'1.1':'12','1.2':'20'}
56 * @arkts 1.1&1.2
57 */
58interface ContentSlotInterface {
59  /**
60   * Called when the content is added to the placeholder component
61   *
62   * @param { Content } content - Indicates the class object of ComponentContent or NodeContent
63   * @returns { ContentSlotAttribute }
64   * @syscap SystemCapability.ArkUI.ArkUI.Full
65   * @crossplatform
66   * @atomicservice
67   * @since arkts {'1.1':'12','1.2':'20'}
68   * @arkts 1.1&1.2
69   */
70  (content: Content): ContentSlotAttribute;
71}
72
73/**
74 * Defines the ContentSlot Component
75 *
76 * @syscap SystemCapability.ArkUI.ArkUI.Full
77 * @crossplatform
78 * @atomicservice
79 * @since 12
80 */
81declare const ContentSlot: ContentSlotInterface;