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,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础按钮-->
|
|
6
|
+
<section id="sec_1">
|
|
7
|
+
<h5>基础按钮</h5>
|
|
8
|
+
<p>可以设计为按钮样式,并通过 <code>@on_click</code> 事件绑定点击回调,此外可以通过 <code>hover</code> 属性设置鼠标悬停样式。</p>
|
|
9
|
+
<p>
|
|
10
|
+
<b-hot styles="flex-5 h-3 w-10 bg-color-blue color-light round-sm"
|
|
11
|
+
hover="bg-color-red"
|
|
12
|
+
@on_click="$_click1">
|
|
13
|
+
按钮
|
|
14
|
+
</b-hot>
|
|
15
|
+
</p>
|
|
16
|
+
<p>当前计数:<code>{{data_1}}</code></p>
|
|
17
|
+
<hr>
|
|
18
|
+
<p></p>
|
|
19
|
+
</section>
|
|
20
|
+
|
|
21
|
+
<!--基础链接-->
|
|
22
|
+
<section>
|
|
23
|
+
<h5>基础链接</h5>
|
|
24
|
+
<p>通过 <code>link</code> 属性可以设置外链或 vue 组件路由;而 <code>forbid</code> 属性则可以禁用链接跳转功能。</p>
|
|
25
|
+
<p>
|
|
26
|
+
<b-hot hover="color-blue" link="http://baidu.com">baidu.com</b-hot>
|
|
27
|
+
<b-hot class="mrg-l-3" hover="color-mgray" link="http://baidu.com" :forbid="true">被禁用的百度链接</b-hot>
|
|
28
|
+
</p>
|
|
29
|
+
<hr>
|
|
30
|
+
<p></p>
|
|
31
|
+
</section>
|
|
32
|
+
|
|
33
|
+
<!--hover 鼠标悬停效果-->
|
|
34
|
+
<section>
|
|
35
|
+
<h5>hover 鼠标悬停效果</h5>
|
|
36
|
+
<p>通过 <code>@on_enter</code> 事件绑定鼠标移入回调;<code>@on_leave</code> 事件绑定鼠标移出回调。</p>
|
|
37
|
+
<p>
|
|
38
|
+
<b-hot styles="flex-5 h-3 w-10 bg-color-lgray round-sm"
|
|
39
|
+
hover="bg-color-blue color-light"
|
|
40
|
+
@on_enter="$_enter3" @on_leave="$_leave3">
|
|
41
|
+
{{data_3}}
|
|
42
|
+
</b-hot>
|
|
43
|
+
</p>
|
|
44
|
+
<hr>
|
|
45
|
+
<p></p>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
<!--内链跳转定位-->
|
|
49
|
+
<section>
|
|
50
|
+
<h5>内链跳转定位</h5>
|
|
51
|
+
<p>通过 <code>link</code> 属性可配置内部链接跳转。其中 <b>chapter_id</b> 字段决定跳转元素位置。<b>chapter_link_data</b> 字段则包含了:ani_speed:平移动画缓动速率、offset:位移偏移、callback:滚动完成回调函数(直接硬跳转无效)。</p>
|
|
52
|
+
<p class="flex">
|
|
53
|
+
<b-hot styles="flex-5 h-3 w-14 bg-color-lgray round-sm"
|
|
54
|
+
hover="bg-color-blue color-light"
|
|
55
|
+
:link="data_4.no_1">
|
|
56
|
+
滑至 "基础按钮"
|
|
57
|
+
</b-hot>
|
|
58
|
+
<b-hot styles="flex-5 h-3 w-14 bg-color-lgray round-sm mrg-l-1"
|
|
59
|
+
hover="bg-color-blue color-light"
|
|
60
|
+
:link="data_4.no_2">
|
|
61
|
+
跳至 "基础按钮"
|
|
62
|
+
</b-hot>
|
|
63
|
+
</p>
|
|
64
|
+
</section>
|
|
65
|
+
|
|
66
|
+
</article>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
import HeaderInfo from "@/components/header-info"
|
|
71
|
+
import BHot from "@/components/BTXUI/core/b-hot"
|
|
72
|
+
|
|
73
|
+
export default {
|
|
74
|
+
name: "b_hot_demo",
|
|
75
|
+
components: {
|
|
76
|
+
HeaderInfo,
|
|
77
|
+
BHot
|
|
78
|
+
},
|
|
79
|
+
data(){
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
//初始化入参
|
|
83
|
+
header_info: {
|
|
84
|
+
name: BHot.name,
|
|
85
|
+
...BHot.introduce,
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
//按钮数据1
|
|
89
|
+
data_1: 0,
|
|
90
|
+
|
|
91
|
+
//按钮数据3
|
|
92
|
+
data_3: "鼠标移出",
|
|
93
|
+
|
|
94
|
+
//按钮数据4
|
|
95
|
+
data_4: {
|
|
96
|
+
no_1: {
|
|
97
|
+
chapter_id: "sec_1",
|
|
98
|
+
chapter_link_data: {
|
|
99
|
+
ani_speed: .3,
|
|
100
|
+
offset: -40,
|
|
101
|
+
callback: ()=>{
|
|
102
|
+
this.$confirm.toast("已滚动至 \"基础按钮\" 位置")
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
no_2: {
|
|
107
|
+
chapter_id: "sec_1",
|
|
108
|
+
chapter_link_data: {
|
|
109
|
+
ani_speed: 0,
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
|
|
118
|
+
//点击按钮1
|
|
119
|
+
$_click1(){
|
|
120
|
+
this.data_1++;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
//鼠标移入按钮3
|
|
124
|
+
$_enter3(){
|
|
125
|
+
this.data_3 = "鼠标移入";
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
//鼠标移出按钮3
|
|
129
|
+
$_leave3(){
|
|
130
|
+
this.data_3 = "鼠标移出";
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</script>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--字体图标-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>字体图标</h5>
|
|
8
|
+
<p>通过 <code>icon</code> 属性即可设置框架预置字体图标,图标字体源来自框架的 css 文件,图标效果可参考 <b>"全局样式 - 图标"</b>。</p>
|
|
9
|
+
<p>也可以使用自定义字体图标,需要首先引入相应字体图标样式文件,然后设置 <code>styles</code> 属性 <b>font-*</b> 样式值为对应字体名,再通过 <code>icon</code> 属性绑定图标名(图标类名必须符合 <b>ico-name</b> 格式,图标名即 <b>name</b>)即可。</p>
|
|
10
|
+
<p>系统预置字体图标:</p>
|
|
11
|
+
<div class="flex-between fsize-2 w-40">
|
|
12
|
+
<b-icon icon="download" />
|
|
13
|
+
<b-icon icon="ui" />
|
|
14
|
+
<b-icon icon="list" />
|
|
15
|
+
<b-icon icon="system" />
|
|
16
|
+
<b-icon icon="user" />
|
|
17
|
+
</div>
|
|
18
|
+
<p>自定义扩展字体图标:</p>
|
|
19
|
+
<div class="flex-between fsize-2 w-40">
|
|
20
|
+
<b-icon styles="font-iconfont" icon="info" />
|
|
21
|
+
<b-icon styles="font-iconfont" icon="phone" />
|
|
22
|
+
<b-icon styles="font-iconfont" icon="integral" />
|
|
23
|
+
<b-icon styles="font-iconfont" icon="assets" />
|
|
24
|
+
<b-icon styles="font-iconfont" icon="readed" />
|
|
25
|
+
</div>
|
|
26
|
+
<hr>
|
|
27
|
+
<p></p>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<!--图片图标-->
|
|
31
|
+
<section>
|
|
32
|
+
<h5>图片图标</h5>
|
|
33
|
+
<p>通过 <code>bgImg</code> 属性即可设置图片图标。</p>
|
|
34
|
+
<div>
|
|
35
|
+
<b-icon :bg-img="require('@/assets/img/home_ico.png')"
|
|
36
|
+
styles="bg-pos-center w-10 h-5 round-sm line line-lgray thick-1" />
|
|
37
|
+
</div>
|
|
38
|
+
<hr>
|
|
39
|
+
<p></p>
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<!--css 动画图标-->
|
|
43
|
+
<section>
|
|
44
|
+
<h5>css 动画图标</h5>
|
|
45
|
+
<p>可以使用框架预置的 4 项 css 动画图标(动画机制:html 标签 + css),同样通过 <code>icon</code> 属性进行设置,属性值分别为:<b>ani_success</b>、<b>ani_fail</b>、<b>ani_notic</b>、<b>ani_loading</b>。</p>
|
|
46
|
+
<div class="flex-between w-40">
|
|
47
|
+
<b-icon icon="ani_success" />
|
|
48
|
+
<b-icon icon="ani_fail" />
|
|
49
|
+
<b-icon icon="ani_notic" />
|
|
50
|
+
<b-icon icon="ani_loading" />
|
|
51
|
+
</div>
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
</article>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import HeaderInfo from "@/components/header-info"
|
|
59
|
+
import BIcon from "@/components/BTXUI/core/b-icon"
|
|
60
|
+
import "@/assets/custom_fonts/iconfont.css"
|
|
61
|
+
|
|
62
|
+
export default {
|
|
63
|
+
name: "b_icon_demo",
|
|
64
|
+
components: {
|
|
65
|
+
HeaderInfo,
|
|
66
|
+
BIcon
|
|
67
|
+
},
|
|
68
|
+
data(){
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
//初始化入参
|
|
72
|
+
header_info: {
|
|
73
|
+
name: BIcon.name,
|
|
74
|
+
...BIcon.introduce,
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础使用</h5>
|
|
8
|
+
<p>通过 <code>img</code> 属性绑定图像资源即可显示。</p>
|
|
9
|
+
<p>
|
|
10
|
+
<b-img v-bind="data_1" />
|
|
11
|
+
</p>
|
|
12
|
+
<hr>
|
|
13
|
+
<p></p>
|
|
14
|
+
</section>
|
|
15
|
+
|
|
16
|
+
<!--样式使用-->
|
|
17
|
+
<section>
|
|
18
|
+
<h5>样式使用</h5>
|
|
19
|
+
<p>通过 <code>styles</code> 属性可以应用框架封装样式体系。因此可以像添加标签类属性那样进行样式设置。此外独有 <code>objFit</code> 属性用以设置 object-fit 样式。</p>
|
|
20
|
+
<div class="resize flex pcenter">
|
|
21
|
+
<div class="mrg-r-1">
|
|
22
|
+
<b-img v-bind="data_2.props1" styles="round-sm w-11 h-6" />
|
|
23
|
+
<div>fill(默认值)</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="mrg-r-1">
|
|
26
|
+
<b-img v-bind="data_2.props2" styles="round-sm w-11 h-6" />
|
|
27
|
+
<div>cover</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="mrg-r-1">
|
|
30
|
+
<b-img v-bind="data_2.props3" styles="round-sm w-11 h-6 bg-color-mgray" />
|
|
31
|
+
<div>contain</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="mrg-r-1">
|
|
34
|
+
<b-img v-bind="data_2.props4" styles="round-sm w-11 h-6" />
|
|
35
|
+
<div>none</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<b-img v-bind="data_2.props5" styles="round-sm w-11 h-6 bg-color-mgray" />
|
|
39
|
+
<div>scale-down</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</section>
|
|
43
|
+
|
|
44
|
+
</article>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import HeaderInfo from "@/components/header-info"
|
|
49
|
+
import BImg from "@/components/BTXUI/core/b-img"
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: "b_hot_demo",
|
|
53
|
+
components: {
|
|
54
|
+
HeaderInfo,
|
|
55
|
+
BImg
|
|
56
|
+
},
|
|
57
|
+
data(){
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
//初始化入参
|
|
61
|
+
header_info: {
|
|
62
|
+
name: BImg.name,
|
|
63
|
+
...BImg.introduce,
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
data_1: {
|
|
67
|
+
img: require('@/assets/img/head.jpg')
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
data_2: {
|
|
71
|
+
props1: {
|
|
72
|
+
img: require('@/assets/img/head2.jpg')
|
|
73
|
+
},
|
|
74
|
+
props2: {
|
|
75
|
+
img: require('@/assets/img/head2.jpg'),
|
|
76
|
+
objFit: "cover"
|
|
77
|
+
},
|
|
78
|
+
props3: {
|
|
79
|
+
img: require('@/assets/img/head2.jpg'),
|
|
80
|
+
objFit: "contain"
|
|
81
|
+
},
|
|
82
|
+
props4: {
|
|
83
|
+
img: require('@/assets/img/head2.jpg'),
|
|
84
|
+
objFit: "none"
|
|
85
|
+
},
|
|
86
|
+
props5: {
|
|
87
|
+
img: require('@/assets/img/head2.jpg'),
|
|
88
|
+
objFit: "scale-down"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础输入型表单元素-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础输入型表单元素</h5>
|
|
8
|
+
<p>通过 <code>v-model</code> 可以初始化及双向绑定输入内容。其它属性如:<code>type</code>、<code>name</code>、<code>maxlength</code> 等,在使用上同 input 元素保持一致。</p>
|
|
9
|
+
<p class="resize">
|
|
10
|
+
<b-input styles="pad-h-1 h-3 bg-color-lgray line line-#ddd thick-1 round-sm" v-bind="data_1.props" v-model="data_1.val" />
|
|
11
|
+
</p>
|
|
12
|
+
<p>当前输入内容:
|
|
13
|
+
<code v-if="data_1.val">{{data_1.val}}</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 class="resize">
|
|
24
|
+
<b-input styles="pad-h-1 h-3 bg-color-lgray line line-#ddd thick-1 round-sm" v-bind="data_2.props" v-model="data_2.val" />
|
|
25
|
+
</p>
|
|
26
|
+
<p>当前输入内容:
|
|
27
|
+
<code v-if="data_2.val">{{data_2.val}}</code>
|
|
28
|
+
<span v-else class="alpha-d5">暂无内容</span>
|
|
29
|
+
</p>
|
|
30
|
+
<hr>
|
|
31
|
+
<p></p>
|
|
32
|
+
</section>
|
|
33
|
+
|
|
34
|
+
<!--输入验证-->
|
|
35
|
+
<section>
|
|
36
|
+
<h5>输入验证</h5>
|
|
37
|
+
<p>通过 <code>rule</code> 属性可设置表单项验证,其中 <b>type</b> 字段可以自定义正则验证,也可以使用框架预置的一些常用正则方案,包括:emil:验证邮箱、url:验证网址、tel:验证手机号、uid:验证身份证号、zh:验证中文字符、uname:验证一般账户名,英文、数字、下划线、required:非空验证(英文、数字、下划线、中文、.)。</p>
|
|
38
|
+
<div class="resize">
|
|
39
|
+
<p>
|
|
40
|
+
<b-input styles="pad-h-1 h-3 bg-color-lgray line line-#ddd thick-1 round-sm"
|
|
41
|
+
v-bind="data_3.props"
|
|
42
|
+
v-model="data_3.val"
|
|
43
|
+
@on_check="$_check3"/>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
<p>当前输入内容:
|
|
47
|
+
<code v-if="data_3.final_val">{{data_3.final_val}}</code>
|
|
48
|
+
<span v-else class="alpha-d5">暂无内容</span>
|
|
49
|
+
</p>
|
|
50
|
+
<hr>
|
|
51
|
+
<p></p>
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
<!--激活样式-->
|
|
55
|
+
<section>
|
|
56
|
+
<h5>激活样式</h5>
|
|
57
|
+
<p>通过 <code>focus</code> 属性可设置表单项激活样式值。</p>
|
|
58
|
+
<p class="resize">
|
|
59
|
+
<b-input styles="pad-h-1 h-3 bg-color-lgray line line-#ddd thick-1 round-sm" v-bind="data_4.props" v-model="data_4.val" />
|
|
60
|
+
</p>
|
|
61
|
+
<hr>
|
|
62
|
+
<p></p>
|
|
63
|
+
</section>
|
|
64
|
+
|
|
65
|
+
<!--回车输入-->
|
|
66
|
+
<section>
|
|
67
|
+
<h5>回车输入</h5>
|
|
68
|
+
<p>输入框激活状态时,按下键盘回车键,可触发 <code>on_enter</code> 事件。</p>
|
|
69
|
+
<p class="resize">
|
|
70
|
+
<b-input styles="pad-h-1 h-3 bg-color-lgray line line-#ddd thick-1 round-sm"
|
|
71
|
+
@on_enter="$_enter5"
|
|
72
|
+
v-bind="data_5.props"
|
|
73
|
+
v-model="data_5.val" />
|
|
74
|
+
</p>
|
|
75
|
+
</section>
|
|
76
|
+
|
|
77
|
+
</article>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script>
|
|
81
|
+
import HeaderInfo from "@/components/header-info"
|
|
82
|
+
import BInput from "@/components/BTXUI/core/b-input"
|
|
83
|
+
import BtnWid from "@/components/BTXUI/btn/btn-wid"
|
|
84
|
+
|
|
85
|
+
export default {
|
|
86
|
+
name: "b_input_demo",
|
|
87
|
+
components: {
|
|
88
|
+
HeaderInfo,
|
|
89
|
+
BInput,
|
|
90
|
+
BtnWid
|
|
91
|
+
},
|
|
92
|
+
data(){
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
//初始化入参
|
|
96
|
+
header_info: {
|
|
97
|
+
name: BInput.name,
|
|
98
|
+
...BInput.introduce,
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
data_1: {
|
|
102
|
+
props: {
|
|
103
|
+
type: "text",
|
|
104
|
+
name: "uname",
|
|
105
|
+
placeholder: "请输入用户名"
|
|
106
|
+
},
|
|
107
|
+
val: ""
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
data_2: {
|
|
111
|
+
props: {
|
|
112
|
+
type: "text",
|
|
113
|
+
name: "uname",
|
|
114
|
+
placeholder: "请输入用户名"
|
|
115
|
+
},
|
|
116
|
+
val: "neo"
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
data_3: {
|
|
120
|
+
props: {
|
|
121
|
+
type: "text",
|
|
122
|
+
name: "tel",
|
|
123
|
+
placeholder: "请输入手机号",
|
|
124
|
+
rule: {
|
|
125
|
+
type: "tel",
|
|
126
|
+
notic: "手机号输入有误!"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
val: "",
|
|
130
|
+
final_val: ""
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
data_4: {
|
|
134
|
+
props: {
|
|
135
|
+
type: "text",
|
|
136
|
+
name: "uname",
|
|
137
|
+
placeholder: "请输入用户名",
|
|
138
|
+
focus: "color-blue bg-color-light"
|
|
139
|
+
},
|
|
140
|
+
val: "neo"
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
data_5: {
|
|
144
|
+
props: {
|
|
145
|
+
type: "text",
|
|
146
|
+
name: "uname",
|
|
147
|
+
placeholder: "请输入用户名",
|
|
148
|
+
focus: "color-blue bg-color-light"
|
|
149
|
+
},
|
|
150
|
+
val: "Lily"
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
methods: {
|
|
156
|
+
|
|
157
|
+
$_check3(res){
|
|
158
|
+
if(res.pass){
|
|
159
|
+
this.data_3.final_val = this.data_3.val;
|
|
160
|
+
}else{
|
|
161
|
+
this.$confirm.toast(res.notic, 3000, "fail");
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
$_enter5(text, e){
|
|
166
|
+
this.$confirm.toast(`当前输入内容:${text}`, 2000)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</script>
|