btxui 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/README.md +42 -0
  2. package/app.vue +162 -0
  3. package/assets/css/_main.js +73 -0
  4. package/assets/css/btx.min.css +1 -0
  5. package/assets/css/btx.mob.min.css +1 -0
  6. package/assets/css/btx.pad.min.css +1 -0
  7. package/assets/css/btx.webapp.min.css +1 -0
  8. package/assets/css/custom_fonts/iconfont.css +37 -0
  9. package/assets/css/custom_fonts/iconfont.eot +0 -0
  10. package/assets/css/custom_fonts/iconfont.svg +47 -0
  11. package/assets/css/custom_fonts/iconfont.ttf +0 -0
  12. package/assets/css/custom_fonts/iconfont.woff +0 -0
  13. package/assets/css/custom_fonts/iconfont.woff2 +0 -0
  14. package/assets/css/res-l.css +47 -0
  15. package/assets/css/res-m.css +47 -0
  16. package/assets/css/res-s.css +61 -0
  17. package/assets/custom_fonts/iconfont.css +37 -0
  18. package/assets/custom_fonts/iconfont.eot +0 -0
  19. package/assets/custom_fonts/iconfont.svg +47 -0
  20. package/assets/custom_fonts/iconfont.ttf +0 -0
  21. package/assets/custom_fonts/iconfont.woff +0 -0
  22. package/assets/custom_fonts/iconfont.woff2 +0 -0
  23. package/assets/js/Btx.js +196 -0
  24. package/assets/js/Utils.js +421 -0
  25. package/assets/js/fastclick.js +802 -0
  26. package/assets/js/lazy.min.js +2 -0
  27. package/assets/js/touchwipe.js +111 -0
  28. package/assets/server.js +8 -0
  29. package/assets/start_site_code_str.js +119 -0
  30. package/cdn/css/btx.min.css +1 -0
  31. package/cdn/css/btx.min.css.map +1 -0
  32. package/cdn/fonts/iconfont.ttf +0 -0
  33. package/cdn/fonts/iconfont.woff +0 -0
  34. package/cdn/fonts/iconfont.woff2 +0 -0
  35. package/components/BTXUI/app/app-wid.vue +182 -0
  36. package/components/BTXUI/btn/btn-wid.vue +128 -0
  37. package/components/BTXUI/carousel/carousel-wid.vue +138 -0
  38. package/components/BTXUI/checkbox/checkbox-wid.vue +72 -0
  39. package/components/BTXUI/confirm/confirm-wid.vue +279 -0
  40. package/components/BTXUI/content/content-checkbox-wid.vue +44 -0
  41. package/components/BTXUI/content/content-node-wid.vue +114 -0
  42. package/components/BTXUI/content/content-tag-wid.vue +25 -0
  43. package/components/BTXUI/content/content-wid.vue +254 -0
  44. package/components/BTXUI/core/anis/ani-fail.vue +46 -0
  45. package/components/BTXUI/core/anis/ani-loading.vue +32 -0
  46. package/components/BTXUI/core/anis/ani-notic.vue +47 -0
  47. package/components/BTXUI/core/anis/ani-success.vue +48 -0
  48. package/components/BTXUI/core/b-drag.vue +258 -0
  49. package/components/BTXUI/core/b-grid.vue +84 -0
  50. package/components/BTXUI/core/b-hot.vue +171 -0
  51. package/components/BTXUI/core/b-icon.vue +76 -0
  52. package/components/BTXUI/core/b-img.vue +84 -0
  53. package/components/BTXUI/core/b-input.vue +198 -0
  54. package/components/BTXUI/core/b-list.vue +276 -0
  55. package/components/BTXUI/core/b-text/doc.ts +9 -0
  56. package/components/BTXUI/core/b-text/index.vue +16 -0
  57. package/components/BTXUI/core/b-textarea.vue +58 -0
  58. package/components/BTXUI/core/b-video.vue +35 -0
  59. package/components/BTXUI/core/b-view/doc.ts +10 -0
  60. package/components/BTXUI/core/b-view/index.vue +20 -0
  61. package/components/BTXUI/core/b-webview.vue +20 -0
  62. package/components/BTXUI/core/lib/ChapterLink.js +49 -0
  63. package/components/BTXUI/core/lib/Search.vue +60 -0
  64. package/components/BTXUI/core/styles/doc.ts +55 -0
  65. package/components/BTXUI/core/styles/index.vue +98 -0
  66. package/components/BTXUI/core/styles/prestyles.ts +471 -0
  67. package/components/BTXUI/core/styles/theme.ts +29 -0
  68. package/components/BTXUI/drawer/drawer-wid.vue +165 -0
  69. package/components/BTXUI/drawer/title-tag-wid.vue +114 -0
  70. package/components/BTXUI/form/form-select-wid.vue +57 -0
  71. package/components/BTXUI/form/form-wid.vue +324 -0
  72. package/components/BTXUI/formPannel/form-pannel-wid.vue +133 -0
  73. package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +149 -0
  74. package/components/BTXUI/index.js +83 -0
  75. package/components/BTXUI/pageFlip/page-flip-wid.vue +206 -0
  76. package/components/BTXUI/pannel/pannel-wid.vue +167 -0
  77. package/components/BTXUI/range/range-wid.vue +134 -0
  78. package/components/BTXUI/search/search-wid.vue +80 -0
  79. package/components/BTXUI/select/select-wid.vue +186 -0
  80. package/components/BTXUI/slider/slider-wid.vue +444 -0
  81. package/components/BTXUI/tab/tab-wid.vue +109 -0
  82. package/components/BTXUI/table/table-wid.vue +324 -0
  83. package/components/BTXUI/tag/tag-wid.vue +183 -0
  84. package/components/BTXUI/tags/tags-wid.vue +121 -0
  85. package/components/BTXUI/tooltip/tooltip-wid.vue +146 -0
  86. package/components/BTXUI/upload/upload-wid.vue +215 -0
  87. package/components/BTXUI/waterfall/waterfall-wid.vue +166 -0
  88. package/components/header-info.vue +167 -0
  89. package/composables/@types.ts +4 -0
  90. package/composables/api.ts +18 -0
  91. package/env.d.ts +5 -0
  92. package/main.js +6 -0
  93. package/nuxt.config.ts +51 -0
  94. package/package.json +23 -0
  95. package/pages/article.vue +16 -0
  96. package/pages/download.vue +50 -0
  97. package/pages/example/app_wid/app/data_demo.vue +9 -0
  98. package/pages/example/app_wid/app/download_demo.vue +9 -0
  99. package/pages/example/app_wid/app/list_demo.vue +11 -0
  100. package/pages/example/app_wid/app/system_demo.vue +9 -0
  101. package/pages/example/app_wid/app_wid_demo.vue +198 -0
  102. package/pages/example/app_wid/btn_wid_demo.vue +179 -0
  103. package/pages/example/app_wid/carousel_wid_demo.vue +152 -0
  104. package/pages/example/app_wid/checkbox_wid_demo.vue +65 -0
  105. package/pages/example/app_wid/confirm_wid_demo.vue +197 -0
  106. package/pages/example/app_wid/content_wid_demo.vue +369 -0
  107. package/pages/example/app_wid/drawer_wid_demo.vue +155 -0
  108. package/pages/example/app_wid/form_pannel_wid_demo.vue +338 -0
  109. package/pages/example/app_wid/form_wid_demo.vue +550 -0
  110. package/pages/example/app_wid/imgs_upload_wid_demo.vue +159 -0
  111. package/pages/example/app_wid/index.js +158 -0
  112. package/pages/example/app_wid/page_flip_wid_demo.vue +99 -0
  113. package/pages/example/app_wid/pannel_wid_demo.vue +177 -0
  114. package/pages/example/app_wid/range_wid_demo.vue +101 -0
  115. package/pages/example/app_wid/search_wid_demo.vue +75 -0
  116. package/pages/example/app_wid/select_wid_demo.vue +217 -0
  117. package/pages/example/app_wid/slider_wid_demo.vue +143 -0
  118. package/pages/example/app_wid/tab_wid_demo.vue +170 -0
  119. package/pages/example/app_wid/table_wid_demo.vue +377 -0
  120. package/pages/example/app_wid/tag_wid_demo.vue +133 -0
  121. package/pages/example/app_wid/tags_wid_demo.vue +143 -0
  122. package/pages/example/app_wid/tooltip_wid_demo.vue +117 -0
  123. package/pages/example/app_wid/upload_wid_demo.vue +123 -0
  124. package/pages/example/base_wid/b_drag_demo.vue +159 -0
  125. package/pages/example/base_wid/b_grid_demo.vue +225 -0
  126. package/pages/example/base_wid/b_hot_demo.vue +135 -0
  127. package/pages/example/base_wid/b_icon_demo.vue +80 -0
  128. package/pages/example/base_wid/b_img_demo.vue +95 -0
  129. package/pages/example/base_wid/b_input_demo.vue +171 -0
  130. package/pages/example/base_wid/b_list_demo.vue +241 -0
  131. package/pages/example/base_wid/b_style_demo.vue +928 -0
  132. package/pages/example/base_wid/b_text_demo.vue +36 -0
  133. package/pages/example/base_wid/b_textarea_demo.vue +64 -0
  134. package/pages/example/base_wid/b_video_demo.vue +42 -0
  135. package/pages/example/base_wid/b_view_demo.vue +36 -0
  136. package/pages/example/base_wid/index.js +76 -0
  137. package/pages/example/content.js +49 -0
  138. package/pages/example/global_style/animation.vue +197 -0
  139. package/pages/example/global_style/color.vue +134 -0
  140. package/pages/example/global_style/decoration.vue +546 -0
  141. package/pages/example/global_style/icon.vue +345 -0
  142. package/pages/example/global_style/index.js +52 -0
  143. package/pages/example/global_style/layout.vue +846 -0
  144. package/pages/example/global_style/special.vue +37 -0
  145. package/pages/example/global_style/table.vue +298 -0
  146. package/pages/example/global_style/text.vue +159 -0
  147. package/pages/index.vue +29 -0
  148. package/pages/level_widget.vue +11 -0
  149. package/pages/start.vue +200 -0
  150. package/plugins/index.ts +2 -0
  151. package/public/favicon.gif +0 -0
  152. package/public/fonts/iconfont.ttf +0 -0
  153. package/public/fonts/iconfont.woff +0 -0
  154. package/public/fonts/iconfont.woff2 +0 -0
  155. package/public/img/banner.jpg +0 -0
  156. package/public/img/banner2.jpg +0 -0
  157. package/public/img/bg_pattern.png +0 -0
  158. package/public/img/btx.jpg +0 -0
  159. package/public/img/btx_ui.jpg +0 -0
  160. package/public/img/dir.png +0 -0
  161. package/public/img/f.png +0 -0
  162. package/public/img/head.jpg +0 -0
  163. package/public/img/head2.jpg +0 -0
  164. package/public/img/home_ico.png +0 -0
  165. package/public/img/icons.svg +164 -0
  166. package/public/img/mechanism/b-style.png +0 -0
  167. package/public/img/mechanism/slider-wid.png +0 -0
  168. package/public/img/mechanism/upload-wid.png +0 -0
  169. package/public/img/transform_origin.png +0 -0
  170. package/sass/animation.scss +400 -0
  171. package/sass/btx.mob.scss +10 -0
  172. package/sass/btx.pad.scss +3 -0
  173. package/sass/btx.scss +22 -0
  174. package/sass/btx.webapp.scss +22 -0
  175. package/sass/colors.scss +65 -0
  176. package/sass/decoration.scss +220 -0
  177. package/sass/flex.scss +29 -0
  178. package/sass/icons.scss +100 -0
  179. package/sass/layout.scss +88 -0
  180. package/sass/reset.scss +111 -0
  181. package/sass/response/flex_mixin.scss +91 -0
  182. package/sass/response/layout_mixin.scss +227 -0
  183. package/sass/response/main.scss +59 -0
  184. package/sass/response/text_mixin.scss +65 -0
  185. package/sass/scroll.scss +100 -0
  186. package/sass/special.scss +13 -0
  187. package/sass/table.scss +103 -0
  188. package/sass/text.scss +86 -0
  189. package/sass/webpack.config.js +31 -0
  190. package/tsconfig.json +4 -0
@@ -0,0 +1,152 @@
1
+ <template>
2
+ <article>
3
+ <header-info v-bind="header_info" />
4
+
5
+ <!--基础使用-->
6
+ <section>
7
+ <h5>基础使用</h5>
8
+ <p>通过 <code>items</code> 属性可以配置走马灯的播放内容;<code>visiableCount</code> 属性可设置显示内容数目;<code>rule</code> 属性可设置内容间隔;<code>speed</code> 属性可设置播放速率。</p>
9
+ <div>
10
+ <carousel-wid v-bind="data_1">
11
+ <div :slot="item.id" :key="item.id" v-for="item of data_1.items"
12
+ :class="`flex-5 round-sm bg-color-${item.color} h-10`">
13
+ {{item.text}}
14
+ </div>
15
+ </carousel-wid>
16
+ </div>
17
+ <hr>
18
+ <p></p>
19
+ </section>
20
+
21
+ <!--外部控制-->
22
+ <section>
23
+ <h5>外部控制</h5>
24
+ <p>通过 API <code>play</code> 和 <code>pause</code> 方法可以实现走马灯的外部控制。</p>
25
+ <div>
26
+ <carousel-wid v-bind="data_2" ref="carousel">
27
+ <div :slot="item.id" :key="item.id" v-for="item of data_1.items"
28
+ :class="`flex-5 bg-color-lgray h-10 line line-neutral thick-1`">
29
+ {{item.text}}
30
+ </div>
31
+ </carousel-wid>
32
+ </div>
33
+ <div class="flex mrg-t-1">
34
+ <tag-wid @on_click="$_toggle_state" v-bind="data_2.tag_data" v-model="data_2.enable" />
35
+ </div>
36
+ </section>
37
+
38
+ </article>
39
+ </template>
40
+
41
+ <script>
42
+ import HeaderInfo from "@/components/header-info"
43
+ import CarouselWid from "@/components/BTXUI/carousel/carousel-wid"
44
+ import tagWid from "@/components/BTXUI/tag/tag-wid"
45
+
46
+ export default {
47
+ name: "carousel_wid_demo",
48
+ components: {
49
+ HeaderInfo,
50
+ CarouselWid,
51
+ tagWid
52
+ },
53
+ data(){
54
+ return {
55
+
56
+ //初始化入参
57
+ header_info: {
58
+ name: CarouselWid.name,
59
+ ...CarouselWid.introduce,
60
+ },
61
+
62
+ data_1: {
63
+ items: [
64
+ {
65
+ id: "a",
66
+ text: "Html",
67
+ color: "red"
68
+ },
69
+ {
70
+ id: "b",
71
+ text: "Css",
72
+ color: "blue"
73
+ },
74
+ {
75
+ id: "c",
76
+ text: "Javascript",
77
+ color: "green"
78
+ },
79
+ {
80
+ id: "d",
81
+ text: "Php",
82
+ color: "yellow"
83
+ },
84
+ {
85
+ id: "e",
86
+ text: "Typescript",
87
+ color: "lgray"
88
+ }
89
+ ],
90
+ visiableCount: 4,
91
+ rule: 6,
92
+ speed: 2
93
+ },
94
+
95
+ data_2: {
96
+ items: [
97
+ {
98
+ id: "a",
99
+ text: "Html",
100
+ color: "red"
101
+ },
102
+ {
103
+ id: "b",
104
+ text: "Css",
105
+ color: "blue"
106
+ },
107
+ {
108
+ id: "c",
109
+ text: "Javascript",
110
+ color: "green"
111
+ },
112
+ {
113
+ id: "d",
114
+ text: "Php",
115
+ color: "yellow"
116
+ },
117
+ {
118
+ id: "e",
119
+ text: "Typescript",
120
+ color: "lgray"
121
+ }
122
+ ],
123
+ tag_data: {
124
+ id: "data_2",
125
+ text: "暂停",
126
+ actText: "播放",
127
+ colors: {
128
+ normal: {
129
+ text: "dgray",
130
+ bg: "lgray"
131
+ },
132
+ hover: {
133
+ text: "dgray",
134
+ bg: "#ddd",
135
+ }
136
+ },
137
+ mode: "checkbox"
138
+ },
139
+ enable: false
140
+ }
141
+
142
+ }
143
+ },
144
+ methods: {
145
+
146
+ $_toggle_state(){
147
+ this.$refs.carousel[this.data_2.enable? "pause": "play"]();
148
+ }
149
+
150
+ }
151
+ }
152
+ </script>
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <article>
3
+ <header-info v-bind="header_info" />
4
+
5
+ <!--基础使用-->
6
+ <section>
7
+ <h5>基础使用</h5>
8
+ <div class="resize flex bg-color-lgray pad-v-1 pad-h-2 round-sm">
9
+ <checkbox-wid v-bind="data_1.props" v-model="data_1.selected" />
10
+ </div>
11
+ <hr>
12
+ <p></p>
13
+ </section>
14
+
15
+ <!--纯复选框使用-->
16
+ <section>
17
+ <h5>纯复选框使用</h5>
18
+ <p><code>text</code> 属性可缺省,显示为纯复选框。</p>
19
+ <div class="resize flex bg-color-lgray pad-v-1 pad-h-2 round-sm">
20
+ <checkbox-wid v-bind="data_2.props" v-model="data_2.selected" />
21
+ </div>
22
+ </section>
23
+
24
+ </article>
25
+ </template>
26
+
27
+ <script>
28
+ import HeaderInfo from "@/components/header-info"
29
+ import CheckboxWid from "@/components/BTXUI/checkbox/checkbox-wid"
30
+
31
+ export default {
32
+ name: "checkbox_wid_demo",
33
+ components: {
34
+ HeaderInfo,
35
+ CheckboxWid
36
+ },
37
+ data(){
38
+ return {
39
+
40
+ //初始化入参
41
+ header_info: {
42
+ name: CheckboxWid.name,
43
+ ...CheckboxWid.introduce,
44
+ },
45
+
46
+ data_1: {
47
+ props: {
48
+ id: "a",
49
+ text: "编辑模式",
50
+ actText: "退出编辑"
51
+ },
52
+ selected: false
53
+ },
54
+
55
+ data_2: {
56
+ props: {
57
+ id: "b"
58
+ },
59
+ selected: false
60
+ }
61
+
62
+ }
63
+ }
64
+ }
65
+ </script>
@@ -0,0 +1,197 @@
1
+ <template>
2
+ <article>
3
+ <header-info v-bind="header_info" />
4
+
5
+ <!--toast 弹窗-->
6
+ <section>
7
+ <h5>toast 弹窗</h5>
8
+ <p>使用 toast 方法开启提示弹窗,参数 <code>duration</code> 可设置弹窗持续显示时间;<code>state</code> 可设置弹窗状态图标,其中:success 成功、fail 失败、notic 提示,为动态图标。</p>
9
+ <div class="resize flex">
10
+ <div class="mrg-r-1">
11
+ <btn-wid @on_click="$_show_pannel1" btnText="显示 toast 弹窗" />
12
+ </div>
13
+ <div class="mrg-r-1">
14
+ <btn-wid @on_click="$_show_pannel1_fail" btnText="fail 弹窗" />
15
+ </div>
16
+ <div class="mrg-r-1">
17
+ <btn-wid @on_click="$_show_pannel1_success" btnText="success 弹窗" />
18
+ </div>
19
+ <btn-wid @on_click="$_show_pannel1_notic" btnText="notic 弹窗" />
20
+ </div>
21
+ <hr>
22
+ <p></p>
23
+ </section>
24
+
25
+ <!--alert 弹窗-->
26
+ <section>
27
+ <h5>alert 弹窗</h5>
28
+ <p>使用 alert 方法开启警示弹窗,参数 <code>btn_cname</code> 可设置按钮文字,且支持键盘"回车"触发按钮。</p>
29
+ <div class="resize flex">
30
+ <btn-wid @on_click="$_show_pannel2" btnText="显示 alert 弹窗" />
31
+ </div>
32
+ <hr>
33
+ <p></p>
34
+ </section>
35
+
36
+ <!--confirm 弹窗-->
37
+ <section>
38
+ <h5>confirm 弹窗</h5>
39
+ <p>使用 confirm 方法开启确认弹窗,参数 <code>success</code> 可设置确认回调(支持键盘"回车"触发);<code>error</code> 可设置取消回调。</p>
40
+ <div class="resize flex">
41
+ <btn-wid @on_click="$_show_pannel3" btnText="显示 confirm 弹窗" />
42
+ </div>
43
+ <p>下一步操作:<span :class="data_3? 'color-green': 'color-red'">{{data_3? '已获取通讯录权限': '未获取权限'}}</span></p>
44
+ <hr>
45
+ <p></p>
46
+ </section>
47
+
48
+ <!--prograss 弹窗-->
49
+ <section>
50
+ <h5>prograss 弹窗</h5>
51
+ <p>使用 prograss 方法开启加载弹窗,参数 <code>result</code> 可设置加载结束弹窗状态图标(success 成功、fail 失败),若为 true 则会执行关闭。</p>
52
+ <div class="resize flex">
53
+ <div class="mrg-r-1">
54
+ <btn-wid @on_click="$_show_pannel4_success" btnText="prograss 弹窗 3 秒加载成功" />
55
+ </div>
56
+ <btn-wid @on_click="$_show_pannel4_fail" btnText="prograss 弹窗 3 秒加载失败" />
57
+ </div>
58
+ <p>加载状态:<span :class="`color-${data_4.color}`">{{data_4.text}}</span></p>
59
+ <hr>
60
+ <p></p>
61
+ </section>
62
+
63
+ <!--prograss 弹窗显示实时加载进度-->
64
+ <section>
65
+ <h5>prograss 弹窗显示实时加载进度</h5>
66
+ <p>可多次执行 prograss 方法修改其中 text 信息以显示实时加载进度。</p>
67
+ <div class="resize flex">
68
+ <btn-wid @on_click="$_show_pannel5" btnText="开始加载" />
69
+ </div>
70
+ <p>加载状态:<span :class="data_5 === '加载完成!'? 'color-green': ''">{{data_5}}</span></p>
71
+ </section>
72
+
73
+ </article>
74
+ </template>
75
+
76
+ <script>
77
+ import HeaderInfo from "@/components/header-info"
78
+ import BtnWid from "@/components/BTXUI/btn/btn-wid"
79
+ import ConfirmWid from "@/components/BTXUI/confirm/confirm-wid"
80
+
81
+ export default {
82
+ name: "confirm_wid_demo",
83
+ components: {
84
+ HeaderInfo,
85
+ BtnWid
86
+ },
87
+ data(){
88
+ return {
89
+
90
+ //初始化入参
91
+ header_info: {
92
+ name: ConfirmWid.name,
93
+ ...ConfirmWid.introduce,
94
+ },
95
+
96
+ //数据3
97
+ data_3: false,
98
+
99
+ //数据4
100
+ data_4: {
101
+ color: "",
102
+ text: "尚未加载"
103
+ },
104
+
105
+ //数据5
106
+ data_5: "尚未加载"
107
+
108
+ }
109
+ },
110
+ methods: {
111
+
112
+ //显示面板1
113
+ $_show_pannel1(){
114
+ this.$confirm.toast("hello javascript", 3000)
115
+ },
116
+
117
+ //显示面板1 - fail 状态
118
+ $_show_pannel1_fail(){
119
+ this.$confirm.toast("this operate is fail", 3000, "fail")
120
+ },
121
+
122
+ //显示面板1 - success 状态
123
+ $_show_pannel1_success(){
124
+ this.$confirm.toast("this operate is success", 3000, "success")
125
+ },
126
+
127
+ //显示面板1 - notic 状态
128
+ $_show_pannel1_notic(){
129
+ this.$confirm.toast("this operate has done", 3000, "notic")
130
+ },
131
+
132
+ //显示面板2
133
+ $_show_pannel2(){
134
+ this.$confirm.alert("当前应用已获取您的本地定位!", "success", "已知晓")
135
+ },
136
+
137
+ //显示面板3
138
+ $_show_pannel3(){
139
+ this.$confirm.confirm("当前应用需要获取您的手机通讯录<br>是否同意?", ()=>{
140
+ this.data_3 = true;
141
+ }, ()=>{
142
+ this.data_3 = false;
143
+ })
144
+ },
145
+
146
+ //显示面板4 - success 状态
147
+ $_show_pannel4_success(){
148
+ this.$confirm.prograss("页面获取中!");
149
+ this.data_4 = {
150
+ text: "加载中...",
151
+ color: "dgray"
152
+ };
153
+ setTimeout(()=>{
154
+ this.$confirm.prograss("页面获取成功!", "success");
155
+ this.data_4 = {
156
+ text: "加载成功!",
157
+ color: "green"
158
+ };
159
+ }, 3000)
160
+ },
161
+
162
+ //显示面板4 - fail 状态
163
+ $_show_pannel4_fail(){
164
+ this.$confirm.prograss("页面获取中!");
165
+ this.data_4 = {
166
+ text: "加载中...",
167
+ color: "dgray"
168
+ };
169
+ setTimeout(()=>{
170
+ this.$confirm.prograss("页面获取失败!", "fail");
171
+ this.data_4 = {
172
+ text: "加载失败!",
173
+ color: "red"
174
+ };
175
+ }, 3000)
176
+ },
177
+
178
+ //显示面板5
179
+ $_show_pannel5(){
180
+ this.$confirm.prograss("加载进度 0%");
181
+ this.data_5 = "加载中...";
182
+ let prograss = 0,
183
+ t = setInterval(()=>{
184
+ prograss += 10;
185
+ if(prograss === 100){
186
+ this.$confirm.prograss("数据获取完成!", "success");
187
+ this.data_5 = "加载完成!";
188
+ clearInterval(t);
189
+ }else{
190
+ this.$confirm.prograss(`加载进度 ${prograss}%`);
191
+ }
192
+ }, 1000)
193
+ },
194
+
195
+ }
196
+ }
197
+ </script>