<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # Loading ## Usage ```vue <template> <div class="p-5" ref="wrapEl" v-loading="loadingRef" loading-tip="加載中..."> <a-alert message="函數方式" /> <a-button class="my-4 mr-4" type="primary" @click="openFnFullLoading">全屏 Loading</a-button> <a-button class="my-4" type="primary" @click="openFnWrapLoading">容器內 Loading</a-button> </div> </template> <script lang="ts"> import { defineComponent, reactive, toRefs, ref } from 'vue'; import { Loading, useLoading } from '/@/components/Loading'; export default defineComponent({ components: { Loading }, setup() { const [openFullLoading, closeFullLoading] = useLoading({ tip: '加載中...', }); const [openWrapLoading, closeWrapLoading] = useLoading({ target: wrapEl, props: { tip: '加載中...', absolute: true, }, }); function openFnFullLoading() { openFullLoading(); setTimeout(() => { closeFullLoading(); }, 2000); } function openFnWrapLoading() { openWrapLoading(); setTimeout(() => { closeWrapLoading(); }, 2000); } return { openFnFullLoading, openFnWrapLoading, ...toRefs(compState), }; }, }); </script> ``` ## useLoading 使用 ```ts import { useLoading } from '/@/components/Loading'; const [open, close, setTip] = useLoading(opt: Partial<LoadingProps> | Partial<UseLoadingOptions>); ``` ### UseLoadingOptions | 屬性 | 類型 | 默認值 | 可選值 | 說明 | | ------ | --------------------------------- | ------ | ------ | ---------------- | | target | `HTMLElement or Ref<HTMLElement>` | - | - | 掛載的 dom 節點 | | props | `LoadingProps` | - | - | loading 組件參數 | ### LoadingProps | 屬性 | 類型 | 默認值 | 可選值 | 說明 | | --- | --- | --- | --- | --- | | tip | `string` | - | - | 加載文本 | | size | `default, small , large` | `default` | - | 大小 | | absolute | `boolean` | false | - | 絕對定位,為 `false` 時可以全屏 | | loading | `boolean` | - | - | 當前加載狀態 | | background | `string` | - | - | 背景色, | | theme | `'dark' or 'light'` | `light` | - | 背景色主題 ,當背景色不為空時使用背景色 | ### 返回值 **open** 打開 loading **close** 關閉 loading **setTip** 設置加在提示文案(v2.6.2以上版本)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看