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,377 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础使用</h5>
|
|
8
|
+
<div class="resize">
|
|
9
|
+
<table-wid v-bind="data_1" />
|
|
10
|
+
</div>
|
|
11
|
+
<hr>
|
|
12
|
+
<p></p>
|
|
13
|
+
</section>
|
|
14
|
+
|
|
15
|
+
<!--自定义色彩及单元行点击效果-->
|
|
16
|
+
<section>
|
|
17
|
+
<h5>自定义色彩及单元行点击效果</h5>
|
|
18
|
+
<p>通过 <code>colors</code> 属性可以自定义表格标题色、行首色、奇数行色、偶数行色、行悬停色、表格描边色及表格轮廓色。此外单元格内容都支持超文本设置。需要注意的是,只有在设置了行悬停色的前提下,才能够通过 <code>on_click</code> API 为单元行绑定点击事件,在回调函数中可获取当前行索引。</p>
|
|
19
|
+
<p>通过 <code>enable_row_click</code> 和 <code>disable_row_click</code> 方法,可以切换单元行的点击效果,前提依然需要设置行悬停色。</p>
|
|
20
|
+
<div class="resize">
|
|
21
|
+
<table-wid ref="table_2" v-bind="data_2.props" @on_click="$_show_row_number2" />
|
|
22
|
+
<div class="flex mrg-t-1">
|
|
23
|
+
<tag-wid @on_click="$_toggle_row_enable2" v-bind="data_2.tag_data" v-model="data_2.enable" />
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<hr>
|
|
27
|
+
<p></p>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<!--自定义单元格宽度-->
|
|
31
|
+
<section>
|
|
32
|
+
<h5>自定义单元格宽度</h5>
|
|
33
|
+
<p>通过 <code>thead</code> 属性中的 <b>grow</b> 字段可以设置单元格的自生长比率从而决定其显示宽度。此外 <b>width</b> 字段可以设置单元格的固定宽度。</p>
|
|
34
|
+
<div class="resize">
|
|
35
|
+
<table-wid v-bind="data_3" />
|
|
36
|
+
</div>
|
|
37
|
+
<hr>
|
|
38
|
+
<p></p>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<!--设置单元格封面及按钮-->
|
|
42
|
+
<section>
|
|
43
|
+
<h5>设置单元格封面及按钮</h5>
|
|
44
|
+
<p><code>tbody</code> 属性对应的数据元素可以设置为 "纯文本"、"tag-wid" 以及 "b-img"。</p>
|
|
45
|
+
<div class="resize">
|
|
46
|
+
<table-wid v-bind="data_4" />
|
|
47
|
+
</div>
|
|
48
|
+
<hr>
|
|
49
|
+
<p></p>
|
|
50
|
+
</section>
|
|
51
|
+
|
|
52
|
+
<!--复选单元行-->
|
|
53
|
+
<section>
|
|
54
|
+
<h5>复选单元行</h5>
|
|
55
|
+
<p>通过 <code>enable_row_select</code> 和 <code>disable_row_select</code> 方法,可以切换单元行的首项选择控件,进而实现单元行的复选效果。</p>
|
|
56
|
+
<div class="resize">
|
|
57
|
+
<table-wid ref="table_5" v-bind="data_5.props" @on_select="$_select5" />
|
|
58
|
+
<div class="flex mrg-t-1">
|
|
59
|
+
<tag-wid @on_click="$_toggle_row_select5" v-bind="data_5.tag_data" v-model="data_5.enable" />
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<p>
|
|
63
|
+
当前所选数据行:
|
|
64
|
+
<template v-if="data_5.selected.length">
|
|
65
|
+
<code v-for="row of data_5.selected">{{row + 1}}</code>
|
|
66
|
+
</template>
|
|
67
|
+
<span v-else class="alpha-d5">暂无选择</span>
|
|
68
|
+
</p>
|
|
69
|
+
<hr>
|
|
70
|
+
<p></p>
|
|
71
|
+
</section>
|
|
72
|
+
|
|
73
|
+
<!--单元行折叠-->
|
|
74
|
+
<section>
|
|
75
|
+
<h5>单元行折叠</h5>
|
|
76
|
+
<p>通过 <code>collapse</code> 属性可设置单元行折叠显示行数。</p>
|
|
77
|
+
<div class="resize">
|
|
78
|
+
<table-wid v-bind="data_6.props"/>
|
|
79
|
+
</div>
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
</article>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<script>
|
|
86
|
+
import HeaderInfo from "@/components/header-info"
|
|
87
|
+
import tagWid from "@/components/BTXUI/tag/tag-wid"
|
|
88
|
+
import TableWid from "@/components/BTXUI/table/table-wid"
|
|
89
|
+
|
|
90
|
+
export default {
|
|
91
|
+
name: "table_wid_demo",
|
|
92
|
+
components: {
|
|
93
|
+
HeaderInfo,
|
|
94
|
+
TableWid,
|
|
95
|
+
tagWid
|
|
96
|
+
},
|
|
97
|
+
data(){
|
|
98
|
+
const tag_data = {
|
|
99
|
+
text: "考试通过",
|
|
100
|
+
actText: "考试未过",
|
|
101
|
+
colors: {
|
|
102
|
+
normal: {
|
|
103
|
+
text: "dgray",
|
|
104
|
+
bg: "neutral",
|
|
105
|
+
},
|
|
106
|
+
act: {
|
|
107
|
+
text: "light",
|
|
108
|
+
bg: "green",
|
|
109
|
+
},
|
|
110
|
+
hover: {
|
|
111
|
+
text: "dgray",
|
|
112
|
+
bg: "#ddd",
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
mode: "checkbox"
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
//初始化入参
|
|
121
|
+
header_info: {
|
|
122
|
+
name: TableWid.name,
|
|
123
|
+
...TableWid.introduce,
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
data_1: {
|
|
127
|
+
thead: [
|
|
128
|
+
{
|
|
129
|
+
title: "Name"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: "Sex"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: "Rank"
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
tbody: [
|
|
139
|
+
["nick", "male", 87],
|
|
140
|
+
["tommy", "male", 92],
|
|
141
|
+
["lucy", "female", 90],
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
data_2: {
|
|
146
|
+
props: {
|
|
147
|
+
thead: [
|
|
148
|
+
{
|
|
149
|
+
title: "<span class='color-main'>Name</span>"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
title: "<span class='color-light'>Sex</span>"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
title: "<span class='color-light'>Rank</span>"
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
tbody: [
|
|
159
|
+
["nick", "<span class='color-blue'>male</span>", 87],
|
|
160
|
+
["tommy", "<span class='color-blue'>male</span>", 92],
|
|
161
|
+
["lucy", "<span class='color-red'>female</span>", 90],
|
|
162
|
+
["neo", "<span class='color-blue'>male</span>", "<span class='round-md bg-color-green color-light pad-h-1'>100</span>"],
|
|
163
|
+
["robbin", "<span class='color-red'>female</span>", 88],
|
|
164
|
+
],
|
|
165
|
+
colors: {
|
|
166
|
+
thead: "sub",
|
|
167
|
+
row: {
|
|
168
|
+
head: "rgba(255,255,255,.7)",
|
|
169
|
+
odd: "lgray",
|
|
170
|
+
even: "#ddd",
|
|
171
|
+
hover: "#d7d7d7"
|
|
172
|
+
},
|
|
173
|
+
line: "lgray",
|
|
174
|
+
outline: "sub"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
tag_data: {
|
|
178
|
+
id: "data_2",
|
|
179
|
+
text: "启用单元行点击",
|
|
180
|
+
actText: "禁用单元行点击",
|
|
181
|
+
colors: {
|
|
182
|
+
normal: {
|
|
183
|
+
text: "dgray",
|
|
184
|
+
bg: "lgray"
|
|
185
|
+
},
|
|
186
|
+
hover: {
|
|
187
|
+
text: "dgray",
|
|
188
|
+
bg: "#ddd",
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
mode: "checkbox"
|
|
192
|
+
},
|
|
193
|
+
enable: true
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
data_3: {
|
|
197
|
+
thead: [
|
|
198
|
+
{
|
|
199
|
+
title: "Name",
|
|
200
|
+
width: 7,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
title: "Age",
|
|
204
|
+
grow: 1,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
title: "Sex",
|
|
208
|
+
grow: 2,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
title: "Rank",
|
|
212
|
+
grow: 3,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
tbody: [
|
|
216
|
+
["nick", 23, "male", 87],
|
|
217
|
+
["tommy", 22, "male", 92],
|
|
218
|
+
["lucy", 23, "female", 90],
|
|
219
|
+
["neo", 20, "male", 100],
|
|
220
|
+
["robbin", 25, "female", 88],
|
|
221
|
+
],
|
|
222
|
+
colors: {
|
|
223
|
+
thead: "lgray",
|
|
224
|
+
row: {
|
|
225
|
+
head: "none",
|
|
226
|
+
odd: "lgray",
|
|
227
|
+
even: "lgray",
|
|
228
|
+
},
|
|
229
|
+
line: "#fff",
|
|
230
|
+
outline: "none"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
data_4: {
|
|
235
|
+
thead: [
|
|
236
|
+
{
|
|
237
|
+
title: "Cover",
|
|
238
|
+
grow: 1,
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
title: "Name",
|
|
242
|
+
grow: 1,
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
title: "subject",
|
|
246
|
+
grow: 2,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
title: "pass",
|
|
250
|
+
grow: 1,
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
tbody: [
|
|
254
|
+
[{
|
|
255
|
+
src: require("@/assets/img/head.jpg"),
|
|
256
|
+
height: 5
|
|
257
|
+
}, "nick", "javascript", {
|
|
258
|
+
tag_data,
|
|
259
|
+
selected: false,
|
|
260
|
+
callback: this.$_show_pass4
|
|
261
|
+
}],
|
|
262
|
+
[{
|
|
263
|
+
src: require("@/assets/img/head2.jpg"),
|
|
264
|
+
height: 5
|
|
265
|
+
}, "nick", "html", {
|
|
266
|
+
tag_data,
|
|
267
|
+
selected: false,
|
|
268
|
+
callback: this.$_show_pass4
|
|
269
|
+
}],
|
|
270
|
+
[{
|
|
271
|
+
src: require("@/assets/img/head.jpg"),
|
|
272
|
+
height: 5
|
|
273
|
+
}, "nick", "css", {
|
|
274
|
+
tag_data,
|
|
275
|
+
selected: false,
|
|
276
|
+
callback: this.$_show_pass4
|
|
277
|
+
}],
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
data_5: {
|
|
282
|
+
props: {
|
|
283
|
+
thead: [
|
|
284
|
+
{
|
|
285
|
+
title: "Name"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
title: "subject"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
title: "Rank"
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
tbody: [
|
|
295
|
+
["nick", "javascript", 78],
|
|
296
|
+
["nick", "html", 99],
|
|
297
|
+
["nick", "css", 100],
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
tag_data: {
|
|
301
|
+
id: "data_5",
|
|
302
|
+
text: "启用单元行选择",
|
|
303
|
+
actText: "禁用单元行选择",
|
|
304
|
+
colors: {
|
|
305
|
+
normal: {
|
|
306
|
+
text: "dgray",
|
|
307
|
+
bg: "lgray"
|
|
308
|
+
},
|
|
309
|
+
hover: {
|
|
310
|
+
text: "dgray",
|
|
311
|
+
bg: "#ddd",
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
mode: "checkbox"
|
|
315
|
+
},
|
|
316
|
+
selected: [],
|
|
317
|
+
enable: false
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
data_6: {
|
|
321
|
+
props: {
|
|
322
|
+
thead: [
|
|
323
|
+
{
|
|
324
|
+
title: "Name"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
title: "subject"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
title: "Rank"
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
tbody: [
|
|
334
|
+
["nick", "javascript", 78],
|
|
335
|
+
["nick", "html", 99],
|
|
336
|
+
["nick", "css", 100],
|
|
337
|
+
["nick", "php", 89],
|
|
338
|
+
["nick", "typescript", 91],
|
|
339
|
+
],
|
|
340
|
+
collapse: {
|
|
341
|
+
rows: 3,
|
|
342
|
+
tag_data: {
|
|
343
|
+
text: "Spread",
|
|
344
|
+
actText: "Collapse",
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
methods: {
|
|
353
|
+
|
|
354
|
+
$_show_row_number2(index){
|
|
355
|
+
this.$confirm.toast(`当前点击行号为:${index + 1}`);
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
$_toggle_row_enable2(id, state){
|
|
359
|
+
this.$refs.table_2[state? 'enable_row_click': 'disable_row_click']();
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
$_show_pass4(row, state) {
|
|
363
|
+
const subject = this.data_4.tbody[row][2];
|
|
364
|
+
this.$confirm.toast(`<b>${subject}</b> 学科${state? '通过': '未通过'}考试`, 2000, state? "success": "notic");
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
$_toggle_row_select5(id, state){
|
|
368
|
+
this.$refs.table_5[state? 'enable_row_select': 'disable_row_select']();
|
|
369
|
+
},
|
|
370
|
+
|
|
371
|
+
$_select5(selected_rows){
|
|
372
|
+
this.data_5.selected = selected_rows;
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
</script>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article>
|
|
3
|
+
<header-info v-bind="header_info" />
|
|
4
|
+
|
|
5
|
+
<!--基础单选使用-->
|
|
6
|
+
<section>
|
|
7
|
+
<h5>基础单选使用</h5>
|
|
8
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
9
|
+
<tag-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
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
19
|
+
<tag-wid v-bind="data_2.props" v-model="data_2.selected" />
|
|
20
|
+
</div>
|
|
21
|
+
<hr>
|
|
22
|
+
<p></p>
|
|
23
|
+
</section>
|
|
24
|
+
|
|
25
|
+
<!--双向绑定默认值-->
|
|
26
|
+
<section>
|
|
27
|
+
<h5>双向绑定默认值</h5>
|
|
28
|
+
<p>通过 <code>v-model</code> 可以初始化及双向绑定标签状态,状态值可以是布尔值或对应的数字(true: 1, false: 0)。通过外部设置可以将单选按钮重新复位。</p>
|
|
29
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
30
|
+
<tag-wid v-bind="data_3.props" v-model="data_3.selected" />
|
|
31
|
+
</div>
|
|
32
|
+
<p class="resize flex">
|
|
33
|
+
<btn-wid btnText="复位标签状态" @on_click="$_click3" />
|
|
34
|
+
</p>
|
|
35
|
+
<hr>
|
|
36
|
+
<p></p>
|
|
37
|
+
</section>
|
|
38
|
+
|
|
39
|
+
<!--设置标签颜色-->
|
|
40
|
+
<section>
|
|
41
|
+
<h5>设置标签颜色</h5>
|
|
42
|
+
<p>通过 <code>colors</code> 属性可以自定义色彩方案。</p>
|
|
43
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
44
|
+
<tag-wid v-bind="data_4.props" v-model="data_4.selected" />
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
</article>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import HeaderInfo from "@/components/header-info"
|
|
53
|
+
import TagWid from "@/components/BTXUI/tag/tag-wid"
|
|
54
|
+
import BtnWid from "@/components/BTXUI/btn/btn-wid"
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
name: "tag_wid_demo",
|
|
58
|
+
components: {
|
|
59
|
+
HeaderInfo,
|
|
60
|
+
TagWid,
|
|
61
|
+
BtnWid
|
|
62
|
+
},
|
|
63
|
+
data(){
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
//初始化入参
|
|
67
|
+
header_info: {
|
|
68
|
+
name: TagWid.name,
|
|
69
|
+
...TagWid.introduce,
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
data_1: {
|
|
73
|
+
props: {
|
|
74
|
+
id: "a",
|
|
75
|
+
text: "单选标签"
|
|
76
|
+
},
|
|
77
|
+
selected: false
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
data_2: {
|
|
81
|
+
props: {
|
|
82
|
+
id: "a",
|
|
83
|
+
text: "复选标签",
|
|
84
|
+
mode: "checkbox"
|
|
85
|
+
},
|
|
86
|
+
selected: false
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
data_3: {
|
|
90
|
+
props: {
|
|
91
|
+
id: "a",
|
|
92
|
+
text: "单选标签",
|
|
93
|
+
actText: "选中状态",
|
|
94
|
+
mode: "radio"
|
|
95
|
+
},
|
|
96
|
+
selected: 1
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
data_4: {
|
|
100
|
+
props: {
|
|
101
|
+
id: "a",
|
|
102
|
+
text: "单选标签",
|
|
103
|
+
actText: "选中状态",
|
|
104
|
+
mode: "checkbox",
|
|
105
|
+
colors: {
|
|
106
|
+
normal: {
|
|
107
|
+
text: "light",
|
|
108
|
+
bg: "#444",
|
|
109
|
+
},
|
|
110
|
+
act: {
|
|
111
|
+
text: "main",
|
|
112
|
+
bg: "sub",
|
|
113
|
+
},
|
|
114
|
+
hover: {
|
|
115
|
+
text: "sub",
|
|
116
|
+
bg: "dark",
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
selected: false
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
|
|
127
|
+
$_click3(){
|
|
128
|
+
this.data_3.selected = false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</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>通过 v-model 绑定响应式数据。</p>
|
|
9
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
10
|
+
<tags-wid v-bind="data_1.props" v-model="data_1.selected" />
|
|
11
|
+
</div>
|
|
12
|
+
<p>当前所选数据:<code v-for="id of data_1.selected">{{id}}</code></p>
|
|
13
|
+
<hr>
|
|
14
|
+
<p></p>
|
|
15
|
+
</section>
|
|
16
|
+
|
|
17
|
+
<!--复选使用-->
|
|
18
|
+
<section>
|
|
19
|
+
<h5>复选使用</h5>
|
|
20
|
+
<p>数据属性 <code>mode="checkbox"</code> 可以设置复选框操作。</p>
|
|
21
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
22
|
+
<tags-wid v-bind="data_2.props" v-model="data_2.selected" />
|
|
23
|
+
</div>
|
|
24
|
+
<p>当前所选数据:<code v-for="id of data_2.selected">{{id}}</code></p>
|
|
25
|
+
<hr>
|
|
26
|
+
<p></p>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<!--自定义配色-->
|
|
30
|
+
<section>
|
|
31
|
+
<h5>自定义配色</h5>
|
|
32
|
+
<p>通过 <code>colors</code> 属性可以自定义色彩方案。</p>
|
|
33
|
+
<div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
|
|
34
|
+
<tags-wid v-bind="data3.props" v-model="data3.selected" />
|
|
35
|
+
</div>
|
|
36
|
+
</section>
|
|
37
|
+
|
|
38
|
+
</article>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import HeaderInfo from "@/components/header-info"
|
|
43
|
+
import TagsWid from "@/components/BTXUI/tags/tags-wid"
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
name: "tags_wid_demo",
|
|
47
|
+
components: {
|
|
48
|
+
HeaderInfo,
|
|
49
|
+
TagsWid
|
|
50
|
+
},
|
|
51
|
+
data(){
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
//初始化入参
|
|
55
|
+
header_info: {
|
|
56
|
+
name: TagsWid.name,
|
|
57
|
+
...TagsWid.introduce,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
//基础渲染数据1
|
|
61
|
+
data_1: {
|
|
62
|
+
props: {
|
|
63
|
+
tagList: [
|
|
64
|
+
{
|
|
65
|
+
id: "html",
|
|
66
|
+
text: "html"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "css",
|
|
70
|
+
text: "css"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "javascript",
|
|
74
|
+
text: "javascript"
|
|
75
|
+
},
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
selected: []
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
//基础渲染数据2
|
|
82
|
+
data_2: {
|
|
83
|
+
props: {
|
|
84
|
+
tagList: [
|
|
85
|
+
{
|
|
86
|
+
id: "html",
|
|
87
|
+
text: "html"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "css",
|
|
91
|
+
text: "css"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "javascript",
|
|
95
|
+
text: "javascript"
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
mode: "checkbox"
|
|
99
|
+
},
|
|
100
|
+
selected: []
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
//数据3
|
|
104
|
+
data3: {
|
|
105
|
+
props: {
|
|
106
|
+
tagList: [
|
|
107
|
+
{
|
|
108
|
+
id: "html",
|
|
109
|
+
text: "html"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "css",
|
|
113
|
+
text: "css"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "javascript",
|
|
117
|
+
text: "javascript"
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
colors: {
|
|
121
|
+
normal: {
|
|
122
|
+
text: "light",
|
|
123
|
+
bg: "#444",
|
|
124
|
+
},
|
|
125
|
+
act: {
|
|
126
|
+
text: "main",
|
|
127
|
+
bg: "sub",
|
|
128
|
+
},
|
|
129
|
+
hover: {
|
|
130
|
+
text: "sub",
|
|
131
|
+
bg: "dark",
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
selected: [],
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
methods: {
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|