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.
- package/README.md +42 -0
- package/app.vue +162 -0
- package/assets/css/_main.js +73 -0
- package/assets/css/btx.min.css +1 -0
- package/assets/css/btx.mob.min.css +1 -0
- package/assets/css/btx.pad.min.css +1 -0
- package/assets/css/btx.webapp.min.css +1 -0
- package/assets/css/custom_fonts/iconfont.css +37 -0
- package/assets/css/custom_fonts/iconfont.eot +0 -0
- package/assets/css/custom_fonts/iconfont.svg +47 -0
- 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 +47 -0
- package/assets/css/res-m.css +47 -0
- package/assets/css/res-s.css +61 -0
- package/assets/custom_fonts/iconfont.css +37 -0
- package/assets/custom_fonts/iconfont.eot +0 -0
- package/assets/custom_fonts/iconfont.svg +47 -0
- 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 +196 -0
- package/assets/js/Utils.js +421 -0
- package/assets/js/fastclick.js +802 -0
- package/assets/js/lazy.min.js +2 -0
- package/assets/js/touchwipe.js +111 -0
- package/assets/server.js +8 -0
- package/assets/start_site_code_str.js +119 -0
- package/cdn/css/btx.min.css +1 -0
- package/cdn/css/btx.min.css.map +1 -0
- 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 +182 -0
- package/components/BTXUI/btn/btn-wid.vue +128 -0
- package/components/BTXUI/carousel/carousel-wid.vue +138 -0
- package/components/BTXUI/checkbox/checkbox-wid.vue +72 -0
- package/components/BTXUI/confirm/confirm-wid.vue +279 -0
- package/components/BTXUI/content/content-checkbox-wid.vue +44 -0
- package/components/BTXUI/content/content-node-wid.vue +114 -0
- package/components/BTXUI/content/content-tag-wid.vue +25 -0
- package/components/BTXUI/content/content-wid.vue +254 -0
- package/components/BTXUI/core/anis/ani-fail.vue +46 -0
- package/components/BTXUI/core/anis/ani-loading.vue +32 -0
- package/components/BTXUI/core/anis/ani-notic.vue +47 -0
- package/components/BTXUI/core/anis/ani-success.vue +48 -0
- package/components/BTXUI/core/b-drag.vue +258 -0
- package/components/BTXUI/core/b-grid.vue +84 -0
- package/components/BTXUI/core/b-hot.vue +171 -0
- package/components/BTXUI/core/b-icon.vue +76 -0
- package/components/BTXUI/core/b-img.vue +84 -0
- package/components/BTXUI/core/b-input.vue +198 -0
- package/components/BTXUI/core/b-list.vue +276 -0
- package/components/BTXUI/core/b-text/doc.ts +9 -0
- package/components/BTXUI/core/b-text/index.vue +16 -0
- package/components/BTXUI/core/b-textarea.vue +58 -0
- package/components/BTXUI/core/b-video.vue +35 -0
- package/components/BTXUI/core/b-view/doc.ts +10 -0
- package/components/BTXUI/core/b-view/index.vue +20 -0
- package/components/BTXUI/core/b-webview.vue +20 -0
- package/components/BTXUI/core/lib/ChapterLink.js +49 -0
- package/components/BTXUI/core/lib/Search.vue +60 -0
- package/components/BTXUI/core/styles/doc.ts +55 -0
- package/components/BTXUI/core/styles/index.vue +98 -0
- package/components/BTXUI/core/styles/prestyles.ts +471 -0
- package/components/BTXUI/core/styles/theme.ts +29 -0
- package/components/BTXUI/drawer/drawer-wid.vue +165 -0
- package/components/BTXUI/drawer/title-tag-wid.vue +114 -0
- package/components/BTXUI/form/form-select-wid.vue +57 -0
- package/components/BTXUI/form/form-wid.vue +324 -0
- package/components/BTXUI/formPannel/form-pannel-wid.vue +133 -0
- package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +149 -0
- package/components/BTXUI/index.js +83 -0
- package/components/BTXUI/pageFlip/page-flip-wid.vue +206 -0
- package/components/BTXUI/pannel/pannel-wid.vue +167 -0
- package/components/BTXUI/range/range-wid.vue +134 -0
- package/components/BTXUI/search/search-wid.vue +80 -0
- package/components/BTXUI/select/select-wid.vue +186 -0
- package/components/BTXUI/slider/slider-wid.vue +444 -0
- package/components/BTXUI/tab/tab-wid.vue +109 -0
- package/components/BTXUI/table/table-wid.vue +324 -0
- package/components/BTXUI/tag/tag-wid.vue +183 -0
- package/components/BTXUI/tags/tags-wid.vue +121 -0
- package/components/BTXUI/tooltip/tooltip-wid.vue +146 -0
- package/components/BTXUI/upload/upload-wid.vue +215 -0
- package/components/BTXUI/waterfall/waterfall-wid.vue +166 -0
- package/components/header-info.vue +167 -0
- package/composables/@types.ts +4 -0
- package/composables/api.ts +18 -0
- package/env.d.ts +5 -0
- package/main.js +6 -0
- package/nuxt.config.ts +51 -0
- package/package.json +23 -0
- package/pages/article.vue +16 -0
- package/pages/download.vue +50 -0
- package/pages/example/app_wid/app/data_demo.vue +9 -0
- package/pages/example/app_wid/app/download_demo.vue +9 -0
- package/pages/example/app_wid/app/list_demo.vue +11 -0
- package/pages/example/app_wid/app/system_demo.vue +9 -0
- package/pages/example/app_wid/app_wid_demo.vue +198 -0
- package/pages/example/app_wid/btn_wid_demo.vue +179 -0
- package/pages/example/app_wid/carousel_wid_demo.vue +152 -0
- package/pages/example/app_wid/checkbox_wid_demo.vue +65 -0
- package/pages/example/app_wid/confirm_wid_demo.vue +197 -0
- package/pages/example/app_wid/content_wid_demo.vue +369 -0
- package/pages/example/app_wid/drawer_wid_demo.vue +155 -0
- package/pages/example/app_wid/form_pannel_wid_demo.vue +338 -0
- package/pages/example/app_wid/form_wid_demo.vue +550 -0
- package/pages/example/app_wid/imgs_upload_wid_demo.vue +159 -0
- package/pages/example/app_wid/index.js +158 -0
- package/pages/example/app_wid/page_flip_wid_demo.vue +99 -0
- package/pages/example/app_wid/pannel_wid_demo.vue +177 -0
- package/pages/example/app_wid/range_wid_demo.vue +101 -0
- package/pages/example/app_wid/search_wid_demo.vue +75 -0
- package/pages/example/app_wid/select_wid_demo.vue +217 -0
- package/pages/example/app_wid/slider_wid_demo.vue +143 -0
- package/pages/example/app_wid/tab_wid_demo.vue +170 -0
- package/pages/example/app_wid/table_wid_demo.vue +377 -0
- package/pages/example/app_wid/tag_wid_demo.vue +133 -0
- package/pages/example/app_wid/tags_wid_demo.vue +143 -0
- package/pages/example/app_wid/tooltip_wid_demo.vue +117 -0
- package/pages/example/app_wid/upload_wid_demo.vue +123 -0
- package/pages/example/base_wid/b_drag_demo.vue +159 -0
- package/pages/example/base_wid/b_grid_demo.vue +225 -0
- package/pages/example/base_wid/b_hot_demo.vue +135 -0
- package/pages/example/base_wid/b_icon_demo.vue +80 -0
- package/pages/example/base_wid/b_img_demo.vue +95 -0
- package/pages/example/base_wid/b_input_demo.vue +171 -0
- package/pages/example/base_wid/b_list_demo.vue +241 -0
- package/pages/example/base_wid/b_style_demo.vue +928 -0
- package/pages/example/base_wid/b_text_demo.vue +36 -0
- package/pages/example/base_wid/b_textarea_demo.vue +64 -0
- package/pages/example/base_wid/b_video_demo.vue +42 -0
- package/pages/example/base_wid/b_view_demo.vue +36 -0
- package/pages/example/base_wid/index.js +76 -0
- package/pages/example/content.js +49 -0
- package/pages/example/global_style/animation.vue +197 -0
- package/pages/example/global_style/color.vue +134 -0
- package/pages/example/global_style/decoration.vue +546 -0
- package/pages/example/global_style/icon.vue +345 -0
- package/pages/example/global_style/index.js +52 -0
- package/pages/example/global_style/layout.vue +846 -0
- package/pages/example/global_style/special.vue +37 -0
- package/pages/example/global_style/table.vue +298 -0
- package/pages/example/global_style/text.vue +159 -0
- package/pages/index.vue +29 -0
- package/pages/level_widget.vue +11 -0
- package/pages/start.vue +200 -0
- package/plugins/index.ts +2 -0
- 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 +164 -0
- 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 +400 -0
- package/sass/btx.mob.scss +10 -0
- package/sass/btx.pad.scss +3 -0
- package/sass/btx.scss +22 -0
- package/sass/btx.webapp.scss +22 -0
- package/sass/colors.scss +65 -0
- package/sass/decoration.scss +220 -0
- package/sass/flex.scss +29 -0
- package/sass/icons.scss +100 -0
- package/sass/layout.scss +88 -0
- package/sass/reset.scss +111 -0
- package/sass/response/flex_mixin.scss +91 -0
- package/sass/response/layout_mixin.scss +227 -0
- package/sass/response/main.scss +59 -0
- package/sass/response/text_mixin.scss +65 -0
- package/sass/scroll.scss +100 -0
- package/sass/special.scss +13 -0
- package/sass/table.scss +103 -0
- package/sass/text.scss +86 -0
- package/sass/webpack.config.js +31 -0
- package/tsconfig.json +4 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础搜索框-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础搜索框</h5>
|
|
8
|
+
<div class="resize flex">
|
|
9
|
+
<search-wid @on_search="(val)=>{data_1.val = val}" />
|
|
10
|
+
</div>
|
|
11
|
+
<p>搜索内容:<code>{{data_1.val}}</code></p>
|
|
12
|
+
<hr>
|
|
13
|
+
<p></p>
|
|
14
|
+
</section>
|
|
15
|
+
|
|
16
|
+
<!--样式化搜索框-->
|
|
17
|
+
<section>
|
|
18
|
+
<h5>样式化搜索框</h5>
|
|
19
|
+
<p>通过 <code>notic</code> 属性可以设置文本框提示内容;<code>colors</code> 属性可以设置搜索框色彩风格;而 <code>icon</code> 属性则可以设置图标显示位置。</p>
|
|
20
|
+
<div class="resize flex">
|
|
21
|
+
<search-wid v-bind="data_2" @on_search="(val)=>{data_2.val = val}" />
|
|
22
|
+
</div>
|
|
23
|
+
<p>搜索内容:<code>{{data_2.val}}</code></p>
|
|
24
|
+
<hr>
|
|
25
|
+
<p></p>
|
|
26
|
+
</section>
|
|
27
|
+
|
|
28
|
+
<!--搜索提示-->
|
|
29
|
+
<section>
|
|
30
|
+
<h5>搜索提示</h5>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
</article>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import HeaderInfo from "@/components/header-info"
|
|
38
|
+
import SearchWid from "@/components/BTXUI/search/search-wid"
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: "search_wid_demo",
|
|
42
|
+
components: {
|
|
43
|
+
HeaderInfo,
|
|
44
|
+
SearchWid
|
|
45
|
+
},
|
|
46
|
+
data(){
|
|
47
|
+
return {
|
|
48
|
+
|
|
49
|
+
//初始化入参
|
|
50
|
+
header_info: {
|
|
51
|
+
name: SearchWid.name,
|
|
52
|
+
...SearchWid.introduce,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
data_1: {
|
|
56
|
+
val: "暂无内容"
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
data_2: {
|
|
60
|
+
notic: "请输入您的姓名",
|
|
61
|
+
icon: "right",
|
|
62
|
+
colors: {
|
|
63
|
+
text: "light",
|
|
64
|
+
bg: "dgray",
|
|
65
|
+
line: "dark"
|
|
66
|
+
},
|
|
67
|
+
val: "暂无内容"
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础下拉框-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础下拉框</h5>
|
|
8
|
+
<p>通过 <code>placeholder</code> 属性可以设置提示文字。</p>
|
|
9
|
+
<div class="resize w-15">
|
|
10
|
+
<select-wid v-bind="data_1.props" v-model="data_1.selected" />
|
|
11
|
+
</div>
|
|
12
|
+
<p>所选项:
|
|
13
|
+
<code v-if="data_1.selected">{{data_1.selected}}</code>
|
|
14
|
+
<span v-else class="alpha-d5">暂无选择</span>
|
|
15
|
+
</p>
|
|
16
|
+
<hr>
|
|
17
|
+
<p></p>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<!--默认下拉项-->
|
|
21
|
+
<section>
|
|
22
|
+
<h5>默认下拉项</h5>
|
|
23
|
+
<p>通过 <code>v-model</code> 可以初始化及双向绑定下拉所选项。</p>
|
|
24
|
+
<div class="resize w-15">
|
|
25
|
+
<select-wid v-bind="data_2.props" v-model="data_2.selected" />
|
|
26
|
+
</div>
|
|
27
|
+
<p>所选项:<code>{{data_2.selected}}</code></p>
|
|
28
|
+
<hr>
|
|
29
|
+
<p></p>
|
|
30
|
+
</section>
|
|
31
|
+
|
|
32
|
+
<!--下拉选项最大显示行数-->
|
|
33
|
+
<section>
|
|
34
|
+
<h5>下拉选项最大显示行数</h5>
|
|
35
|
+
<p>通过 <code>rows</code> 属性可以设置下拉选项最大显示行数。当总数据项不足最大行数时会保持默认行数。</p>
|
|
36
|
+
<div class="resize flex">
|
|
37
|
+
<div class="w-15">
|
|
38
|
+
<select-wid v-bind="data_3.props1" v-model="data_3.selected1" />
|
|
39
|
+
</div>
|
|
40
|
+
<div class="w-15 mrg-l-2">
|
|
41
|
+
<select-wid v-bind="data_3.props2" v-model="data_3.selected2" />
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<hr>
|
|
45
|
+
<p></p>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
<!--自定义颜色-->
|
|
49
|
+
<section>
|
|
50
|
+
<h5>自定义颜色</h5>
|
|
51
|
+
<p>通过 <code>colors</code> 属性可以设置下拉列表的背景及文字颜色。</p>
|
|
52
|
+
<div class="resize flex">
|
|
53
|
+
<div class="w-15">
|
|
54
|
+
<select-wid v-bind="data_4.props" v-model="data_4.selected" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<p></p>
|
|
58
|
+
</section>
|
|
59
|
+
|
|
60
|
+
</article>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script>
|
|
64
|
+
import HeaderInfo from "@/components/header-info"
|
|
65
|
+
import SelectWid from "@/components/BTXUI/select/select-wid"
|
|
66
|
+
|
|
67
|
+
export default {
|
|
68
|
+
name: "select_wid_demo",
|
|
69
|
+
components: {
|
|
70
|
+
HeaderInfo,
|
|
71
|
+
SelectWid
|
|
72
|
+
},
|
|
73
|
+
data(){
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
//初始化入参
|
|
77
|
+
header_info: {
|
|
78
|
+
name: SelectWid.name,
|
|
79
|
+
...SelectWid.introduce,
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
data_1: {
|
|
83
|
+
props: {
|
|
84
|
+
listData: [
|
|
85
|
+
{
|
|
86
|
+
text: "html + css",
|
|
87
|
+
val: "html&css",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
text: "javascript",
|
|
91
|
+
val: "js",
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
placeholder: "请选择相关技术"
|
|
95
|
+
},
|
|
96
|
+
selected: ""
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
data_2: {
|
|
100
|
+
props: {
|
|
101
|
+
listData: [
|
|
102
|
+
{
|
|
103
|
+
text: "html + css",
|
|
104
|
+
val: "html&css",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
text: "javascript",
|
|
108
|
+
val: "js",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
text: "vue3.0",
|
|
112
|
+
val: "vue",
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
placeholder: "请选择相关技术"
|
|
116
|
+
},
|
|
117
|
+
selected: "js"
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
data_3: {
|
|
121
|
+
props1: {
|
|
122
|
+
listData: [
|
|
123
|
+
{
|
|
124
|
+
text: "html + css",
|
|
125
|
+
val: "html&css",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
text: "javascript",
|
|
129
|
+
val: "js",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
text: "vue",
|
|
133
|
+
val: "vue",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
text: "react",
|
|
137
|
+
val: "react",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
text: "nodejs",
|
|
141
|
+
val: "nodejs",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
text: "webpack",
|
|
145
|
+
val: "webpack",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
text: "typescript",
|
|
149
|
+
val: "typescript",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
text: "php",
|
|
153
|
+
val: "php",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
text: "c#",
|
|
157
|
+
val: "c#",
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
rows: 3,
|
|
161
|
+
placeholder: "请选择相关技术"
|
|
162
|
+
},
|
|
163
|
+
props2: {
|
|
164
|
+
listData: [
|
|
165
|
+
{
|
|
166
|
+
text: "html + css",
|
|
167
|
+
val: "html&css",
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
rows: 3,
|
|
171
|
+
placeholder: "请选择相关技术"
|
|
172
|
+
},
|
|
173
|
+
selected1: "php",
|
|
174
|
+
selected2: ""
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
data_4: {
|
|
178
|
+
props: {
|
|
179
|
+
listData: [
|
|
180
|
+
{
|
|
181
|
+
text: "html + css",
|
|
182
|
+
val: "html&css",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
text: "javascript",
|
|
186
|
+
val: "js",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
text: "php",
|
|
190
|
+
val: "php",
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
rows: 3,
|
|
194
|
+
placeholder: "请选择相关技术",
|
|
195
|
+
colors: {
|
|
196
|
+
text: "blue",
|
|
197
|
+
normal: {
|
|
198
|
+
text: "sub",
|
|
199
|
+
bg: "dgray"
|
|
200
|
+
},
|
|
201
|
+
hover: {
|
|
202
|
+
text: "sub",
|
|
203
|
+
bg: "dark"
|
|
204
|
+
},
|
|
205
|
+
act: {
|
|
206
|
+
text: "dark",
|
|
207
|
+
bg: "sub"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
selected: ""
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
</script>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础使用</h5>
|
|
8
|
+
<p>通过 <code>pages</code> 属性配置好页面数据,再通过插槽形式插入对应页面内容即可使用。<code>view</code> 属性可以设置页面高度及背景色。<code>showDot</code> 属性可以显示轮播点(轮播点支持点击分页)。<code>showFlipBtn</code> 属性则可以显示默认分页按钮。<code>autoPlayDuration</code> 属性可以设置自动播放时间间隔(单位毫秒)。<code>loop</code> 属性可以设置是否循环播放。<code>keyboardFlip</code> 属性可以启动键盘左右分页功能(注:同一页面仅限单个实例使用)。</p>
|
|
9
|
+
<div class="resize">
|
|
10
|
+
<slider-wid v-bind="data_1">
|
|
11
|
+
<div v-for="page of data_1.pages" :key="page.id" :slot="page.id"
|
|
12
|
+
class="pad-t-4 pcenter fsize-1d4 alpha-d7" v-html="page.text">
|
|
13
|
+
</div>
|
|
14
|
+
</slider-wid>
|
|
15
|
+
</div>
|
|
16
|
+
<hr>
|
|
17
|
+
<p></p>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<!--外部操作-->
|
|
21
|
+
<section>
|
|
22
|
+
<h5>外部操作</h5>
|
|
23
|
+
<p>通过 <code>next、prev、flip</code> API 方法可以实现组件的外部分页操作,当 <b>flip_ani</b> 参数为 false 时则为硬切换。<code>auto_play、stop_auto_play</code> 方法则可以控制自动播放效果。通过 <code>on_flip</code> 事件可以在回调函数中获取当前分页页码 <b>cur_page</b>。</p>
|
|
24
|
+
<div class="resize">
|
|
25
|
+
<slider-wid v-bind="data_2.props" ref="slider2" @on_flip="$_show_page2">
|
|
26
|
+
<div v-for="page of data_2.props.pages" :key="page.id" :slot="page.id"
|
|
27
|
+
class="pad-t-4 pcenter fsize-1d4 alpha-d7" v-html="page.text">
|
|
28
|
+
</div>
|
|
29
|
+
</slider-wid>
|
|
30
|
+
<div class="flex-between w-40 mrg-v-1">
|
|
31
|
+
<btn-wid btnText="Prev" @on_click="$_prev2" />
|
|
32
|
+
<btn-wid btnText="Next" @on_click="$_next2" />
|
|
33
|
+
<btn-wid btnText="Page 3" @on_click="$_flip2(3)" />
|
|
34
|
+
<btn-wid btnText="停止自动播放" @on_click="$_stop2" />
|
|
35
|
+
<btn-wid btnText="继续自动播放" @on_click="$_play2" />
|
|
36
|
+
</div>
|
|
37
|
+
<div>当前页码:<code>{{data_2.cur_page}}</code></div>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
</article>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import HeaderInfo from "@/components/header-info"
|
|
46
|
+
import SliderWid from "@/components/BTXUI/slider/slider-wid"
|
|
47
|
+
import BtnWid from "@/components/BTXUI/btn/btn-wid"
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
name: "slider_wid_demo",
|
|
51
|
+
components: {
|
|
52
|
+
HeaderInfo,
|
|
53
|
+
SliderWid,
|
|
54
|
+
BtnWid
|
|
55
|
+
},
|
|
56
|
+
data(){
|
|
57
|
+
const pages = [
|
|
58
|
+
{ id: "a", text: "javascript" },
|
|
59
|
+
{ id: "b", text: "css<br>Cascading Style Sheets<br>层叠样式表" },
|
|
60
|
+
{ id: "c", text: "php" }
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
//初始化入参
|
|
66
|
+
header_info: {
|
|
67
|
+
name: SliderWid.name,
|
|
68
|
+
...SliderWid.introduce,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
data_1: {
|
|
72
|
+
pages,
|
|
73
|
+
view: {
|
|
74
|
+
height: 17,
|
|
75
|
+
bg_color: "lgray"
|
|
76
|
+
},
|
|
77
|
+
showDot: {
|
|
78
|
+
bottom: 2,
|
|
79
|
+
color: "yellow",
|
|
80
|
+
act_color: "blue"
|
|
81
|
+
},
|
|
82
|
+
showFlipBtn: true,
|
|
83
|
+
autoPlayDuration: 3000,
|
|
84
|
+
loop: true,
|
|
85
|
+
keyboardFlip: true
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
data_2: {
|
|
89
|
+
props: {
|
|
90
|
+
pages,
|
|
91
|
+
view: {
|
|
92
|
+
height: 17,
|
|
93
|
+
bg_color: "lgray"
|
|
94
|
+
},
|
|
95
|
+
showDot: {
|
|
96
|
+
bottom: 2,
|
|
97
|
+
color: "yellow",
|
|
98
|
+
act_color: "blue"
|
|
99
|
+
},
|
|
100
|
+
autoPlayDuration: 3000,
|
|
101
|
+
loop: true
|
|
102
|
+
},
|
|
103
|
+
cur_page: 1
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
computed: {
|
|
109
|
+
|
|
110
|
+
slider2(){
|
|
111
|
+
return this.$refs.slider2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
},
|
|
115
|
+
methods: {
|
|
116
|
+
|
|
117
|
+
$_prev2(){
|
|
118
|
+
this.slider2.prev();
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
$_next2(){
|
|
122
|
+
this.slider2.next(false); //硬切换
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
$_flip2(page){
|
|
126
|
+
this.slider2.flip(3, false); //硬切换
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
$_show_page2(page){
|
|
130
|
+
this.data_2.cur_page = page;
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
$_stop2(){
|
|
134
|
+
this.slider2.stop_auto_play();
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
$_play2(){
|
|
138
|
+
this.slider2.auto_play();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--选项卡切换使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>选项卡切换使用</h5>
|
|
8
|
+
<p>通过 v-model 绑定响应式数据。</p>
|
|
9
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
10
|
+
<tab-wid v-bind="data_1.props" v-model="data_1.cur_tab">
|
|
11
|
+
<div class="h-10 bg-color-light round-b round-sm shadow-sm color-neutral pad-2" :slot="item.id" v-for="item of data_1.props.tagsData.tagList" :key="item.id">
|
|
12
|
+
<span class="color-mgray">{{data_1.content[item.id]}}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</tab-wid>
|
|
15
|
+
</div>
|
|
16
|
+
<p>当前所选数据:<code>{{data_1.cur_tab}}</code></p>
|
|
17
|
+
<hr>
|
|
18
|
+
<p></p>
|
|
19
|
+
</section>
|
|
20
|
+
|
|
21
|
+
<!--自定义颜色方案-->
|
|
22
|
+
<section>
|
|
23
|
+
<h5>自定义颜色方案</h5>
|
|
24
|
+
<p>通过 <code>colors</code> 字段可以配置标签色彩体系。</p>
|
|
25
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
26
|
+
<tab-wid v-bind="data_2.props" v-model="data_2.cur_tab">
|
|
27
|
+
<div class="h-10 bg-color-light round-b round-sm shadow-sm color-neutral pad-2" :slot="item.id" v-for="item of data_2.props.tagsData.tagList" :key="item.id">
|
|
28
|
+
<span class="color-mgray">{{data_2.content[item.id]}}</span>
|
|
29
|
+
</div>
|
|
30
|
+
</tab-wid>
|
|
31
|
+
</div>
|
|
32
|
+
<hr>
|
|
33
|
+
<p></p>
|
|
34
|
+
</section>
|
|
35
|
+
|
|
36
|
+
<!--滑动切换-->
|
|
37
|
+
<section>
|
|
38
|
+
<h5>滑动切换</h5>
|
|
39
|
+
<p>通过 <code>smooth</code> 字段可以设置内容滑动切换效果。</p>
|
|
40
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
41
|
+
<tab-wid v-bind="data_3.props" v-model="data_3.cur_tab">
|
|
42
|
+
<div class="h-10 bg-color-light round-b round-sm shadow-sm color-neutral pad-2" :slot="item.id" v-for="item of data_3.props.tagsData.tagList" :key="item.id">
|
|
43
|
+
<span class="color-mgray">{{data_3.content[item.id]}}</span>
|
|
44
|
+
</div>
|
|
45
|
+
</tab-wid>
|
|
46
|
+
</div>
|
|
47
|
+
</section>
|
|
48
|
+
|
|
49
|
+
</article>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
import HeaderInfo from "@/components/header-info"
|
|
54
|
+
import TabWid from "@/components/BTXUI/tab/tab-wid"
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
name: "tab_wid_demo",
|
|
58
|
+
components: {
|
|
59
|
+
HeaderInfo,
|
|
60
|
+
TabWid
|
|
61
|
+
},
|
|
62
|
+
data(){
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
//初始化入参
|
|
66
|
+
header_info: {
|
|
67
|
+
name: TabWid.name,
|
|
68
|
+
...TabWid.introduce,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
data_1: {
|
|
72
|
+
props: {
|
|
73
|
+
tagsData: {
|
|
74
|
+
tagList: [
|
|
75
|
+
{
|
|
76
|
+
id: "html",
|
|
77
|
+
text: "html"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "css",
|
|
81
|
+
text: "css"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "javascript",
|
|
85
|
+
text: "javascript"
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
cur_tab: "html",
|
|
91
|
+
content: {
|
|
92
|
+
html: "html 是用于网页布局的标记语言",
|
|
93
|
+
css: "css 是用于网页样式的语言",
|
|
94
|
+
javascript: "javascript 是用于网页交互行为的脚本语言"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
data_2: {
|
|
99
|
+
props: {
|
|
100
|
+
tagsData: {
|
|
101
|
+
tagList: [
|
|
102
|
+
{
|
|
103
|
+
id: "html",
|
|
104
|
+
text: "html"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "css",
|
|
108
|
+
text: "css"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "javascript",
|
|
112
|
+
text: "javascript"
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
colors: {
|
|
116
|
+
normal: {
|
|
117
|
+
text: "light",
|
|
118
|
+
bg: "#444",
|
|
119
|
+
},
|
|
120
|
+
hover: {
|
|
121
|
+
text: "mgray",
|
|
122
|
+
bg: "#333",
|
|
123
|
+
},
|
|
124
|
+
act: {
|
|
125
|
+
text: "blue",
|
|
126
|
+
bg: "light",
|
|
127
|
+
},
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
cur_tab: "css",
|
|
132
|
+
content: {
|
|
133
|
+
html: "html 是用于网页布局的标记语言",
|
|
134
|
+
css: "css 是用于网页样式的语言",
|
|
135
|
+
javascript: "javascript 是用于网页交互行为的脚本语言"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
data_3: {
|
|
140
|
+
props: {
|
|
141
|
+
tagsData: {
|
|
142
|
+
tagList: [
|
|
143
|
+
{
|
|
144
|
+
id: "html",
|
|
145
|
+
text: "html"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "css",
|
|
149
|
+
text: "css"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: "javascript",
|
|
153
|
+
text: "javascript"
|
|
154
|
+
},
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
smooth: true
|
|
158
|
+
},
|
|
159
|
+
cur_tab: "css",
|
|
160
|
+
content: {
|
|
161
|
+
html: "html 是用于网页布局的标记语言",
|
|
162
|
+
css: "css 是用于网页样式的语言",
|
|
163
|
+
javascript: "javascript 是用于网页交互行为的脚本语言"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</script>
|