btxui 1.0.1 → 1.0.3
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/demo.html +1 -0
- package/index.common.js +93 -0
- package/index.common.js.map +1 -0
- package/index.umd.js +104 -0
- package/index.umd.js.map +1 -0
- package/index.umd.min.js +2 -0
- package/index.umd.min.js.map +1 -0
- package/package.json +12 -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 -6
- 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 -29
- 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,114 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view styles="flex-column">
|
|
3
|
-
<template v-for="item of treeData">
|
|
4
|
-
<!--子级-->
|
|
5
|
-
<b-view v-if="item.sub_data" styles="mrg-b-2px">
|
|
6
|
-
<drawer-wid :ref="`drawer_${item.index_data.tag_data.id}`"
|
|
7
|
-
:tag-data="item.index_data.tag_data"
|
|
8
|
-
:spread="item.spread"
|
|
9
|
-
:arrow-fixed="false"
|
|
10
|
-
@on_title_enter="item.tooltip && $_show_tooltip(item.tooltip, $event)"
|
|
11
|
-
@on_title_move="item.tooltip && $_move_tooltip($event)"
|
|
12
|
-
@on_title_leave="item.tooltip && $_hide_tooltip()"
|
|
13
|
-
@on_toggle="$_content_toggle">
|
|
14
|
-
<b-view styles="pad-l-3 pad-t-4px">
|
|
15
|
-
<!-- <content-node-wid :tree-data="item.sub_data"
|
|
16
|
-
:content-id="item.index_data.tag_data.id"
|
|
17
|
-
@on_tooltip_show="$_show_tooltip"
|
|
18
|
-
@on_tooltip_move="$_move_tooltip"
|
|
19
|
-
@on_tooltip_hide="$_hide_tooltip"
|
|
20
|
-
@on_select="$_item_select"
|
|
21
|
-
@on_toggle="$_drawer_resize" /> -->
|
|
22
|
-
</b-view>
|
|
23
|
-
</drawer-wid>
|
|
24
|
-
</b-view>
|
|
25
|
-
|
|
26
|
-
<!--选项-->
|
|
27
|
-
<b-view v-else styles="mrg-b-2px" :key="item.index_data.tag_data.id">
|
|
28
|
-
<!--单选-->
|
|
29
|
-
<content-tag-wid v-if="item.index_data.tag_data.mode === 'radio'"
|
|
30
|
-
v-bind="item.index_data.tag_data"
|
|
31
|
-
v-model="item.index_data.selected"
|
|
32
|
-
@on_click="$_item_select"
|
|
33
|
-
@on_enter="item.tooltip && $_show_tooltip(item.tooltip, $event)"
|
|
34
|
-
@on_move="item.tooltip && $_move_tooltip($event)"
|
|
35
|
-
@on_leave="item.tooltip && $_hide_tooltip()" />
|
|
36
|
-
|
|
37
|
-
<!--多选-->
|
|
38
|
-
<content-checkbox-wid v-else-if="item.index_data.tag_data.mode === 'checkbox' && item.checkbox"
|
|
39
|
-
v-bind="item.index_data.tag_data"
|
|
40
|
-
v-model="item.index_data.selected"
|
|
41
|
-
@on_click="$_item_select"
|
|
42
|
-
@on_enter="item.tooltip && $_show_tooltip(item.tooltip, $event)"
|
|
43
|
-
@on_move="item.tooltip && $_move_tooltip($event)"
|
|
44
|
-
@on_leave="item.tooltip && $_hide_tooltip()" />
|
|
45
|
-
<b-view v-else
|
|
46
|
-
:styles="`flex max-w pad-h-1.4 pad-v-.5 round-sm color-${item.index_data.tag_data.colors.normal.text} bg-color-${item.index_data.tag_data.colors.normal.bg}`">
|
|
47
|
-
{{item.index_data.tag_data.text}}
|
|
48
|
-
</b-view>
|
|
49
|
-
</b-view>
|
|
50
|
-
</template>
|
|
51
|
-
</b-view>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
import BView from "@/components/BTXUI/core/b-view";
|
|
56
|
-
import DrawerWid from "@/components/BTXUI/drawer/drawer-wid"
|
|
57
|
-
import ContentTagWid from "./content-tag-wid"
|
|
58
|
-
import ContentCheckboxWid from "./content-checkbox-wid"
|
|
59
|
-
// import ContentNodeWid from "./content-node-wid";
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
name: "content-node-wid",
|
|
63
|
-
components: {
|
|
64
|
-
DrawerWid,
|
|
65
|
-
ContentTagWid,
|
|
66
|
-
ContentCheckboxWid,
|
|
67
|
-
// ContentNodeWid,
|
|
68
|
-
BView,
|
|
69
|
-
},
|
|
70
|
-
props: {
|
|
71
|
-
treeData: {
|
|
72
|
-
required: true,
|
|
73
|
-
type: Array
|
|
74
|
-
},
|
|
75
|
-
contentId: {
|
|
76
|
-
required: false,
|
|
77
|
-
type: [String, Number]
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
|
|
82
|
-
//透传数据选择
|
|
83
|
-
$_item_select(id, state){
|
|
84
|
-
this.$emit("on_select", id, state);
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
//透传子级展开状态
|
|
88
|
-
$_content_toggle(state){
|
|
89
|
-
this.$emit("on_toggle", state, this.contentId);
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
//重置下级内容高度
|
|
93
|
-
$_drawer_resize(state, content_id){
|
|
94
|
-
this.$refs[`drawer_${content_id}`][0].comp_height();
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
//显示浮框
|
|
98
|
-
$_show_tooltip(text){
|
|
99
|
-
this.$emit("on_tooltip_show", text);
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
//移动浮框
|
|
103
|
-
$_move_tooltip(e){
|
|
104
|
-
this.$emit("on_tooltip_move", e);
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
//隐藏浮框
|
|
108
|
-
$_hide_tooltip(){
|
|
109
|
-
this.$emit("on_tooltip_hide");
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</script>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-hot @on_click="$_click"
|
|
3
|
-
@on_move="$emit('on_move', $event)"
|
|
4
|
-
@on_enter="$emit('on_enter', $event)"
|
|
5
|
-
@on_leave="$emit('on_leave', $event)"
|
|
6
|
-
:styles="`flex max-w pad-h-1.4 pad-v-.5 round-sm color-${tag_colors.normal.text} bg-color-${tag_colors.normal.bg}`"
|
|
7
|
-
:states="{
|
|
8
|
-
act: {
|
|
9
|
-
style: `bg-color-${tag_colors.act.bg} color-${tag_colors.act.text}`,
|
|
10
|
-
state: selected
|
|
11
|
-
}
|
|
12
|
-
}"
|
|
13
|
-
:hover="`bg-color-${tag_colors.hover.bg} color-${tag_colors.hover.text}`">
|
|
14
|
-
<b-text v-html="tag_text" />
|
|
15
|
-
</b-hot>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import TagWid from "@/components/BTXUI/tag/tag-wid"
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
extends: TagWid,
|
|
23
|
-
name: "content-tag-wid"
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view>
|
|
3
|
-
<!--提示框组件-->
|
|
4
|
-
<tooltip-wid ref="tooltip" v-bind="tooltipData" />
|
|
5
|
-
|
|
6
|
-
<!--目录结构组件-->
|
|
7
|
-
<content-node-wid :tree-data="tree_data"
|
|
8
|
-
@on_select="$_select"
|
|
9
|
-
@on_tooltip_show="$_show_tooltip"
|
|
10
|
-
@on_tooltip_move="$_move_tooltip"
|
|
11
|
-
@on_tooltip_hide="$_hide_tooltip" />
|
|
12
|
-
</b-view>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import BView from "@/components/BTXUI/core/b-view"
|
|
17
|
-
import TooltipWid from "@/components/BTXUI/tooltip/tooltip-wid"
|
|
18
|
-
import ContentNodeWid from "./content-node-wid"
|
|
19
|
-
|
|
20
|
-
const desc = ["该组件用于处理树形结构数据的可视化及交互操作。"],
|
|
21
|
-
extend = [],
|
|
22
|
-
dependent = ["tooltip-wid", "content-node-wid", "b-view"],
|
|
23
|
-
api = {
|
|
24
|
-
methods: [
|
|
25
|
-
{
|
|
26
|
-
name: "clear_selected",
|
|
27
|
-
ef: "清空所选数据",
|
|
28
|
-
params: "-",
|
|
29
|
-
return: "-"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
event: [
|
|
33
|
-
{
|
|
34
|
-
name: "on_select",
|
|
35
|
-
ef: "执行数据项点选",
|
|
36
|
-
params: "selected_data_id"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
init_data = `{
|
|
41
|
-
dataTree: [
|
|
42
|
-
{
|
|
43
|
-
id: "数据标识",
|
|
44
|
-
text: "数据标题",
|
|
45
|
-
tooltip: "悬停提示文本(支持超文本),缺省无提示",
|
|
46
|
-
checkbox: "是否显示复选框,缺省仅显示文字",
|
|
47
|
-
selected: "是否选中,缺省不选中",
|
|
48
|
-
children: "嵌套结构,可缺省",
|
|
49
|
-
spread: "是否展开子级,缺省关闭",
|
|
50
|
-
spread_fixed: "展开固定,禁止层级塌陷,缺省关闭",
|
|
51
|
-
},...
|
|
52
|
-
],
|
|
53
|
-
/* mode: "选择模式(默认"radio":单选、"checkbox":复选)" */,
|
|
54
|
-
/* colors: "(参照:tag-wid 组件 colors 入参)" */,
|
|
55
|
-
/* tooltipData: "(参照:tooltip-wid 组件入参)" */,
|
|
56
|
-
}`;
|
|
57
|
-
|
|
58
|
-
export default {
|
|
59
|
-
name: "content-wid",
|
|
60
|
-
introduce: { desc, extend, dependent, api, init_data },
|
|
61
|
-
components: {
|
|
62
|
-
BView,
|
|
63
|
-
ContentNodeWid,
|
|
64
|
-
TooltipWid
|
|
65
|
-
},
|
|
66
|
-
props: {
|
|
67
|
-
dataTree: {
|
|
68
|
-
required: true,
|
|
69
|
-
type: Array
|
|
70
|
-
},
|
|
71
|
-
mode: {
|
|
72
|
-
required: false,
|
|
73
|
-
type: String,
|
|
74
|
-
default: "radio"
|
|
75
|
-
},
|
|
76
|
-
colors: {
|
|
77
|
-
required: false,
|
|
78
|
-
type: Object,
|
|
79
|
-
default: ()=>{
|
|
80
|
-
return {
|
|
81
|
-
normal: {
|
|
82
|
-
text: "dgray",
|
|
83
|
-
bg: "none",
|
|
84
|
-
line: "none",
|
|
85
|
-
},
|
|
86
|
-
act: {
|
|
87
|
-
text: "blue",
|
|
88
|
-
bg: "none",
|
|
89
|
-
line: "none",
|
|
90
|
-
},
|
|
91
|
-
hover: {
|
|
92
|
-
text: "blue",
|
|
93
|
-
bg: "none",
|
|
94
|
-
line: "none",
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
tooltipData: {
|
|
100
|
-
required: false,
|
|
101
|
-
type: Object
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
data(){
|
|
105
|
-
return {
|
|
106
|
-
|
|
107
|
-
//单选数据
|
|
108
|
-
selected_data: "",
|
|
109
|
-
|
|
110
|
-
//多选数据
|
|
111
|
-
selected_datas: [],
|
|
112
|
-
|
|
113
|
-
//树形数据(视图渲染)
|
|
114
|
-
tree_data: [],
|
|
115
|
-
|
|
116
|
-
//展开数据(多级关联选择)
|
|
117
|
-
spread_data: [],
|
|
118
|
-
|
|
119
|
-
//索引数据(操作数据)
|
|
120
|
-
index_data: {}
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
computed: {
|
|
125
|
-
|
|
126
|
-
//悬浮提示框
|
|
127
|
-
tooltip(){
|
|
128
|
-
return this.$refs.tooltip;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
methods: {
|
|
133
|
-
|
|
134
|
-
//清空所选数据
|
|
135
|
-
clear_selected(){
|
|
136
|
-
const reset_ids = [];
|
|
137
|
-
if(this.mode === "radio") { //单选模式
|
|
138
|
-
this.selected_data && reset_ids.push(this.selected_data);
|
|
139
|
-
this.selected_data = "";
|
|
140
|
-
}else { //多选模式
|
|
141
|
-
this.selected_datas.forEach(id => {
|
|
142
|
-
reset_ids.push(id);
|
|
143
|
-
})
|
|
144
|
-
this.selected_datas = [];
|
|
145
|
-
}
|
|
146
|
-
reset_ids.forEach(id => {
|
|
147
|
-
this.index_data[id].selected = false;
|
|
148
|
-
})
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
//初始化数据
|
|
152
|
-
$_init_data(){
|
|
153
|
-
this.tree_data = this.$_gen_data(this.dataTree);
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
//构造数据
|
|
157
|
-
$_gen_data(tree_data, id_prefix=""){
|
|
158
|
-
return tree_data.map((data, i)=>{
|
|
159
|
-
let {id, text, tooltip, checkbox, children, selected, spread, spread_fixed} = data,
|
|
160
|
-
mode = this.mode,
|
|
161
|
-
colors = {...this.colors},
|
|
162
|
-
_id = id_prefix? `${id_prefix}_${i}`: i,
|
|
163
|
-
sub_data;
|
|
164
|
-
|
|
165
|
-
//初始化数据
|
|
166
|
-
if(selected){
|
|
167
|
-
if(mode === "checkbox" && checkbox){ //复选模式
|
|
168
|
-
this.selected_datas.push(id)
|
|
169
|
-
}else if(mode === "radio"){
|
|
170
|
-
this.selected_data = id;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
//下级折叠处理
|
|
175
|
-
if(children){
|
|
176
|
-
colors.act = {
|
|
177
|
-
text: colors.normal.text,
|
|
178
|
-
bg: colors.normal.bg,
|
|
179
|
-
line: colors.normal.line
|
|
180
|
-
}
|
|
181
|
-
if(spread_fixed){ //强制展开
|
|
182
|
-
spread = true;
|
|
183
|
-
mode = "radio"
|
|
184
|
-
}else{
|
|
185
|
-
mode = "checkbox"
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const tag_data = {
|
|
190
|
-
...data,
|
|
191
|
-
mode,
|
|
192
|
-
colors
|
|
193
|
-
}, index_data = {
|
|
194
|
-
_id,
|
|
195
|
-
tag_data,
|
|
196
|
-
selected,
|
|
197
|
-
};
|
|
198
|
-
this.index_data[id] = index_data;
|
|
199
|
-
this.spread_data.push(index_data);
|
|
200
|
-
|
|
201
|
-
//下级递归数据处理
|
|
202
|
-
if(children) sub_data = this.$_gen_data(children, _id);
|
|
203
|
-
|
|
204
|
-
return {
|
|
205
|
-
index_data,
|
|
206
|
-
spread,
|
|
207
|
-
tooltip,
|
|
208
|
-
checkbox,
|
|
209
|
-
sub_data
|
|
210
|
-
}
|
|
211
|
-
})
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
//执行选择
|
|
215
|
-
$_select(id, state){
|
|
216
|
-
if(this.mode === "radio"){ //单选数据
|
|
217
|
-
if(this.selected_data){
|
|
218
|
-
this.index_data[this.selected_data].selected = false;
|
|
219
|
-
}
|
|
220
|
-
this.selected_data = id;
|
|
221
|
-
this.$emit("on_select", this.selected_data);
|
|
222
|
-
}else if(this.mode === "checkbox"){ //多选数据
|
|
223
|
-
if(state){ //添加
|
|
224
|
-
this.selected_datas.push(id);
|
|
225
|
-
}else{ //移除
|
|
226
|
-
this.selected_datas.splice(this.selected_datas.findIndex((val)=>{
|
|
227
|
-
return val === id;
|
|
228
|
-
}), 1);
|
|
229
|
-
}
|
|
230
|
-
this.$emit("on_select", this.selected_datas);
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
//显示浮框
|
|
235
|
-
$_show_tooltip(text){
|
|
236
|
-
this.tooltip.show(text);
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
//移动浮框
|
|
240
|
-
$_move_tooltip(e){
|
|
241
|
-
this.tooltip.set_pos(e.pageX, e.pageY);
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
//隐藏浮框
|
|
245
|
-
$_hide_tooltip(){
|
|
246
|
-
this.tooltip.hide();
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
mounted(){
|
|
251
|
-
this.$_init_data();
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
</script>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view styles="flex-5 t-f3">
|
|
3
|
-
<b-text class="ani-fail-part1" styles="w-3px h-1.7 rel l-2px bg-color-red round-sm"></b-text>
|
|
4
|
-
<b-text class="ani-fail-part2" styles="w-3px h-1.7 rel r-1px bg-color-red round-sm"></b-text>
|
|
5
|
-
</b-view>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import BView from "../b-view";
|
|
10
|
-
import BText from "../b-text";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: "ani-fail",
|
|
14
|
-
components: {
|
|
15
|
-
BView,
|
|
16
|
-
BText,
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.ani-fail-part1{
|
|
23
|
-
animation: ani_fail_part1 .3s .7s;
|
|
24
|
-
animation-fill-mode: both;
|
|
25
|
-
}
|
|
26
|
-
.ani-fail-part2{
|
|
27
|
-
animation: ani_fail_part2 .5s 1s;
|
|
28
|
-
animation-fill-mode: both;
|
|
29
|
-
}
|
|
30
|
-
@keyframes ani_fail_part1 {
|
|
31
|
-
from {
|
|
32
|
-
transform: scale(0) rotate(45deg);
|
|
33
|
-
}
|
|
34
|
-
to {
|
|
35
|
-
transform: scale(1) rotate(45deg);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
@keyframes ani_fail_part2 {
|
|
39
|
-
from {
|
|
40
|
-
transform: scale(0) rotate(-45deg);
|
|
41
|
-
}
|
|
42
|
-
to {
|
|
43
|
-
transform: scale(1) rotate(-45deg);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view styles="flex-5 t-f3">
|
|
3
|
-
<b-view class="ani-loading" styles="rel w-2.2 h-2.2 round"></b-view>
|
|
4
|
-
</b-view>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import BView from "../b-view";
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
name: "ani-loading",
|
|
12
|
-
components: {
|
|
13
|
-
BView,
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<style scoped>
|
|
19
|
-
.ani-loading {
|
|
20
|
-
animation: ani_rotate 1s linear infinite;
|
|
21
|
-
border: 3px solid #ddd;
|
|
22
|
-
border-left-color: #4085f3;
|
|
23
|
-
}
|
|
24
|
-
@keyframes ani_rotate {
|
|
25
|
-
from {
|
|
26
|
-
transform: rotate(0deg);
|
|
27
|
-
}
|
|
28
|
-
to {
|
|
29
|
-
transform: rotate(360deg);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view styles="flex-5 t-f3 rotate-90">
|
|
3
|
-
<b-text class="ani-notic-part1" styles="w-3px h-3px bg-color-blue round"></b-text>
|
|
4
|
-
<b-text class="ani-notic-part2" styles="w-1.3 h-3px mrg-l-4px bg-color-blue round-sm"></b-text>
|
|
5
|
-
</b-view>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import BView from "../b-view";
|
|
10
|
-
import BText from "../b-text";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: "ani-notic",
|
|
14
|
-
components: {
|
|
15
|
-
BView,
|
|
16
|
-
BText,
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.ani-notic-part1{
|
|
23
|
-
animation: ani_notic_part1 .3s .7s;
|
|
24
|
-
animation-fill-mode: both;
|
|
25
|
-
}
|
|
26
|
-
.ani-notic-part2{
|
|
27
|
-
animation: ani_notic_part2 .5s 1s;
|
|
28
|
-
animation-fill-mode: both;
|
|
29
|
-
transform-origin: left;
|
|
30
|
-
}
|
|
31
|
-
@keyframes ani_notic_part1 {
|
|
32
|
-
from {
|
|
33
|
-
transform: scale(0);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
transform: scale(1);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
@keyframes ani_notic_part2 {
|
|
40
|
-
from {
|
|
41
|
-
transform: scaleX(0);
|
|
42
|
-
}
|
|
43
|
-
to {
|
|
44
|
-
transform: scaleX(1);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<b-view styles="flex-5 transform-translateY(.9rem)rotate(45deg)">
|
|
3
|
-
<b-text class="ani-success-part1" styles="w-1 h-3px bg-color-green round-sm"></b-text>
|
|
4
|
-
<b-text class="ani-success-part2" styles="w-1.7 h-3px bg-color-green round-sm rel t-1px l-f1px"></b-text>
|
|
5
|
-
</b-view>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import BView from "../b-view";
|
|
10
|
-
import BText from "../b-text";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: "ani-success",
|
|
14
|
-
components: {
|
|
15
|
-
BView,
|
|
16
|
-
BText,
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.ani-success-part1{
|
|
23
|
-
animation: ani_success_part1 .3s .7s;
|
|
24
|
-
animation-fill-mode: both;
|
|
25
|
-
transform-origin: left;
|
|
26
|
-
}
|
|
27
|
-
.ani-success-part2{
|
|
28
|
-
animation: ani_success_part2 .5s 1s;
|
|
29
|
-
animation-fill-mode: both;
|
|
30
|
-
transform-origin: left;
|
|
31
|
-
}
|
|
32
|
-
@keyframes ani_success_part1 {
|
|
33
|
-
from {
|
|
34
|
-
transform: scaleX(0);
|
|
35
|
-
}
|
|
36
|
-
to {
|
|
37
|
-
transform: scaleX(1);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
@keyframes ani_success_part2 {
|
|
41
|
-
from {
|
|
42
|
-
transform: scaleY(0) rotate(-90deg);
|
|
43
|
-
}
|
|
44
|
-
to {
|
|
45
|
-
transform: scaleY(1) rotate(-90deg);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
</style>
|