btxui 1.0.2 → 1.0.5
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.
- package/favicon.png +0 -0
- package/index.js +3289 -0
- package/index.js.gz +0 -0
- package/index.umd.cjs +1 -0
- package/package.json +11 -23
- package/README.md +0 -42
- package/app.vue +0 -162
- package/assets/css/_main.js +0 -73
- package/assets/css/btx.min.css +0 -1
- package/assets/css/btx.mob.min.css +0 -1
- package/assets/css/btx.pad.min.css +0 -1
- package/assets/css/btx.webapp.min.css +0 -1
- package/assets/css/custom_fonts/iconfont.css +0 -37
- package/assets/css/custom_fonts/iconfont.eot +0 -0
- package/assets/css/custom_fonts/iconfont.svg +0 -47
- package/assets/css/custom_fonts/iconfont.ttf +0 -0
- package/assets/css/custom_fonts/iconfont.woff +0 -0
- package/assets/css/custom_fonts/iconfont.woff2 +0 -0
- package/assets/css/res-l.css +0 -47
- package/assets/css/res-m.css +0 -47
- package/assets/css/res-s.css +0 -61
- package/assets/custom_fonts/iconfont.css +0 -37
- package/assets/custom_fonts/iconfont.eot +0 -0
- package/assets/custom_fonts/iconfont.svg +0 -47
- package/assets/custom_fonts/iconfont.ttf +0 -0
- package/assets/custom_fonts/iconfont.woff +0 -0
- package/assets/custom_fonts/iconfont.woff2 +0 -0
- package/assets/js/Btx.js +0 -196
- package/assets/js/Utils.js +0 -421
- package/assets/js/fastclick.js +0 -802
- package/assets/js/lazy.min.js +0 -2
- package/assets/js/touchwipe.js +0 -111
- package/assets/server.js +0 -8
- package/assets/start_site_code_str.js +0 -119
- package/cdn/css/btx.min.css +0 -1
- package/cdn/css/btx.min.css.map +0 -1
- package/cdn/fonts/iconfont.ttf +0 -0
- package/cdn/fonts/iconfont.woff +0 -0
- package/cdn/fonts/iconfont.woff2 +0 -0
- package/components/BTXUI/app/app-wid.vue +0 -182
- package/components/BTXUI/btn/btn-wid.vue +0 -128
- package/components/BTXUI/carousel/carousel-wid.vue +0 -138
- package/components/BTXUI/checkbox/checkbox-wid.vue +0 -72
- package/components/BTXUI/confirm/confirm-wid.vue +0 -279
- package/components/BTXUI/content/content-checkbox-wid.vue +0 -44
- package/components/BTXUI/content/content-node-wid.vue +0 -114
- package/components/BTXUI/content/content-tag-wid.vue +0 -25
- package/components/BTXUI/content/content-wid.vue +0 -254
- package/components/BTXUI/core/anis/ani-fail.vue +0 -46
- package/components/BTXUI/core/anis/ani-loading.vue +0 -32
- package/components/BTXUI/core/anis/ani-notic.vue +0 -47
- package/components/BTXUI/core/anis/ani-success.vue +0 -48
- package/components/BTXUI/core/b-drag.vue +0 -258
- package/components/BTXUI/core/b-grid.vue +0 -84
- package/components/BTXUI/core/b-hot.vue +0 -171
- package/components/BTXUI/core/b-icon.vue +0 -76
- package/components/BTXUI/core/b-img.vue +0 -84
- package/components/BTXUI/core/b-input.vue +0 -198
- package/components/BTXUI/core/b-list.vue +0 -276
- package/components/BTXUI/core/b-text/doc.ts +0 -9
- package/components/BTXUI/core/b-text/index.vue +0 -16
- package/components/BTXUI/core/b-textarea.vue +0 -58
- package/components/BTXUI/core/b-video.vue +0 -35
- package/components/BTXUI/core/b-view/doc.ts +0 -10
- package/components/BTXUI/core/b-view/index.vue +0 -20
- package/components/BTXUI/core/b-webview.vue +0 -20
- package/components/BTXUI/core/lib/ChapterLink.js +0 -49
- package/components/BTXUI/core/lib/Search.vue +0 -60
- package/components/BTXUI/core/styles/doc.ts +0 -55
- package/components/BTXUI/core/styles/index.vue +0 -98
- package/components/BTXUI/core/styles/prestyles.ts +0 -471
- package/components/BTXUI/core/styles/theme.ts +0 -29
- package/components/BTXUI/drawer/drawer-wid.vue +0 -165
- package/components/BTXUI/drawer/title-tag-wid.vue +0 -114
- package/components/BTXUI/form/form-select-wid.vue +0 -57
- package/components/BTXUI/form/form-wid.vue +0 -324
- package/components/BTXUI/formPannel/form-pannel-wid.vue +0 -133
- package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +0 -149
- package/components/BTXUI/index.js +0 -83
- package/components/BTXUI/pageFlip/page-flip-wid.vue +0 -206
- package/components/BTXUI/pannel/pannel-wid.vue +0 -167
- package/components/BTXUI/range/range-wid.vue +0 -134
- package/components/BTXUI/search/search-wid.vue +0 -80
- package/components/BTXUI/select/select-wid.vue +0 -186
- package/components/BTXUI/slider/slider-wid.vue +0 -444
- package/components/BTXUI/tab/tab-wid.vue +0 -109
- package/components/BTXUI/table/table-wid.vue +0 -324
- package/components/BTXUI/tag/tag-wid.vue +0 -183
- package/components/BTXUI/tags/tags-wid.vue +0 -121
- package/components/BTXUI/tooltip/tooltip-wid.vue +0 -146
- package/components/BTXUI/upload/upload-wid.vue +0 -215
- package/components/BTXUI/waterfall/waterfall-wid.vue +0 -166
- package/components/header-info.vue +0 -167
- package/composables/@types.ts +0 -4
- package/composables/api.ts +0 -18
- package/env.d.ts +0 -5
- package/main.js +0 -16
- package/nuxt.config.ts +0 -51
- package/pages/article.vue +0 -16
- package/pages/download.vue +0 -50
- package/pages/example/app_wid/app/data_demo.vue +0 -9
- package/pages/example/app_wid/app/download_demo.vue +0 -9
- package/pages/example/app_wid/app/list_demo.vue +0 -11
- package/pages/example/app_wid/app/system_demo.vue +0 -9
- package/pages/example/app_wid/app_wid_demo.vue +0 -198
- package/pages/example/app_wid/btn_wid_demo.vue +0 -179
- package/pages/example/app_wid/carousel_wid_demo.vue +0 -152
- package/pages/example/app_wid/checkbox_wid_demo.vue +0 -65
- package/pages/example/app_wid/confirm_wid_demo.vue +0 -197
- package/pages/example/app_wid/content_wid_demo.vue +0 -369
- package/pages/example/app_wid/drawer_wid_demo.vue +0 -155
- package/pages/example/app_wid/form_pannel_wid_demo.vue +0 -338
- package/pages/example/app_wid/form_wid_demo.vue +0 -550
- package/pages/example/app_wid/imgs_upload_wid_demo.vue +0 -159
- package/pages/example/app_wid/index.js +0 -158
- package/pages/example/app_wid/page_flip_wid_demo.vue +0 -99
- package/pages/example/app_wid/pannel_wid_demo.vue +0 -177
- package/pages/example/app_wid/range_wid_demo.vue +0 -101
- package/pages/example/app_wid/search_wid_demo.vue +0 -75
- package/pages/example/app_wid/select_wid_demo.vue +0 -217
- package/pages/example/app_wid/slider_wid_demo.vue +0 -143
- package/pages/example/app_wid/tab_wid_demo.vue +0 -170
- package/pages/example/app_wid/table_wid_demo.vue +0 -377
- package/pages/example/app_wid/tag_wid_demo.vue +0 -133
- package/pages/example/app_wid/tags_wid_demo.vue +0 -143
- package/pages/example/app_wid/tooltip_wid_demo.vue +0 -117
- package/pages/example/app_wid/upload_wid_demo.vue +0 -123
- package/pages/example/base_wid/b_drag_demo.vue +0 -159
- package/pages/example/base_wid/b_grid_demo.vue +0 -225
- package/pages/example/base_wid/b_hot_demo.vue +0 -135
- package/pages/example/base_wid/b_icon_demo.vue +0 -80
- package/pages/example/base_wid/b_img_demo.vue +0 -95
- package/pages/example/base_wid/b_input_demo.vue +0 -171
- package/pages/example/base_wid/b_list_demo.vue +0 -241
- package/pages/example/base_wid/b_style_demo.vue +0 -928
- package/pages/example/base_wid/b_text_demo.vue +0 -36
- package/pages/example/base_wid/b_textarea_demo.vue +0 -64
- package/pages/example/base_wid/b_video_demo.vue +0 -42
- package/pages/example/base_wid/b_view_demo.vue +0 -36
- package/pages/example/base_wid/index.js +0 -76
- package/pages/example/content.js +0 -49
- package/pages/example/global_style/animation.vue +0 -197
- package/pages/example/global_style/color.vue +0 -134
- package/pages/example/global_style/decoration.vue +0 -546
- package/pages/example/global_style/icon.vue +0 -345
- package/pages/example/global_style/index.js +0 -52
- package/pages/example/global_style/layout.vue +0 -846
- package/pages/example/global_style/special.vue +0 -37
- package/pages/example/global_style/table.vue +0 -298
- package/pages/example/global_style/text.vue +0 -159
- package/pages/index.vue +0 -43
- package/pages/level_widget.vue +0 -11
- package/pages/start.vue +0 -200
- package/plugins/index.ts +0 -2
- package/public/favicon.gif +0 -0
- package/public/fonts/iconfont.ttf +0 -0
- package/public/fonts/iconfont.woff +0 -0
- package/public/fonts/iconfont.woff2 +0 -0
- package/public/img/banner.jpg +0 -0
- package/public/img/banner2.jpg +0 -0
- package/public/img/bg_pattern.png +0 -0
- package/public/img/btx.jpg +0 -0
- package/public/img/btx_ui.jpg +0 -0
- package/public/img/dir.png +0 -0
- package/public/img/f.png +0 -0
- package/public/img/head.jpg +0 -0
- package/public/img/head2.jpg +0 -0
- package/public/img/home_ico.png +0 -0
- package/public/img/icons.svg +0 -164
- package/public/img/mechanism/b-style.png +0 -0
- package/public/img/mechanism/slider-wid.png +0 -0
- package/public/img/mechanism/upload-wid.png +0 -0
- package/public/img/transform_origin.png +0 -0
- package/sass/animation.scss +0 -400
- package/sass/btx.mob.scss +0 -10
- package/sass/btx.pad.scss +0 -3
- package/sass/btx.scss +0 -22
- package/sass/btx.webapp.scss +0 -22
- package/sass/colors.scss +0 -65
- package/sass/decoration.scss +0 -220
- package/sass/flex.scss +0 -29
- package/sass/icons.scss +0 -100
- package/sass/layout.scss +0 -88
- package/sass/reset.scss +0 -111
- package/sass/response/flex_mixin.scss +0 -91
- package/sass/response/layout_mixin.scss +0 -227
- package/sass/response/main.scss +0 -59
- package/sass/response/text_mixin.scss +0 -65
- package/sass/scroll.scss +0 -100
- package/sass/special.scss +0 -13
- package/sass/table.scss +0 -103
- package/sass/text.scss +0 -86
- package/sass/webpack.config.js +0 -31
- package/tsconfig.json +0 -4
|
@@ -1,152 +0,0 @@
|
|
|
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>
|
|
@@ -1,65 +0,0 @@
|
|
|
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>
|
|
@@ -1,197 +0,0 @@
|
|
|
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>
|