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,60 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
name: "Search",
|
|
4
|
+
/*
|
|
5
|
+
* init-data{
|
|
6
|
+
* [* data-mode: "搜索模式: input、change"],
|
|
7
|
+
* [* data-notic: "搜索提示"],
|
|
8
|
+
* }
|
|
9
|
+
* */
|
|
10
|
+
props: {
|
|
11
|
+
dataMode: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false
|
|
14
|
+
},
|
|
15
|
+
dataNotic: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
|
|
23
|
+
//搜索内容
|
|
24
|
+
search_text: "",
|
|
25
|
+
|
|
26
|
+
//input 模式搜索计时器
|
|
27
|
+
t: null,
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
|
|
33
|
+
//清空输入内容
|
|
34
|
+
clear_text(){
|
|
35
|
+
this.search_text = "";
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
//搜索
|
|
39
|
+
$_search(e) {
|
|
40
|
+
if (this.dataMode === "input") { //input 模式(搜索缓冲时间间隔:1s)
|
|
41
|
+
clearTimeout(this.t)
|
|
42
|
+
this.t = setTimeout(() => {
|
|
43
|
+
this.search_text = e.target.value;
|
|
44
|
+
this.$emit("on_search", this.search_text);
|
|
45
|
+
}, 1000)
|
|
46
|
+
} else { //change 模式
|
|
47
|
+
this.$emit("on_search", this.search_text);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
//修正 webview 软键盘偏移页面 bug
|
|
52
|
+
$_debug_webview(){
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
window.scrollTo(0, 0);
|
|
55
|
+
}, 0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: "b-style",
|
|
3
|
+
desc: [
|
|
4
|
+
"BTX·UI 推荐使用组件取代全局样式作为前端视图层开发的基础,秉持组件复用而非样式复用可以让开发更为高效且易于管理。框架在组件分层设计上分为了 “基础组件”、“应用组件”、“主题组件”。",
|
|
5
|
+
"<code>b-style</code> 是样式处理的底层模块,所有基础组件均继承自该模块,可通过 <b>styles</b> 属性进行样式绑定,其样式规范,基于并扩展 BTX·UI 全局样式语法,因此可以像添加标签类属性那样进行样式设置,目的是为了让 web 和 webApp 在样式语法上尽可能的统一。",
|
|
6
|
+
{
|
|
7
|
+
cover: "b-style.png",
|
|
8
|
+
title: "样式解析机制原理"
|
|
9
|
+
},
|
|
10
|
+
"【exp】:",
|
|
11
|
+
"class 全局样式:<code><div class=\"pright fsize-1d5\">hello world</div></code>",
|
|
12
|
+
"styles 组件样式:<code><b-view styles=\"pright fsize-1.5\">hello world</b-view></code>",
|
|
13
|
+
"组件样式使用时需要注意两点:",
|
|
14
|
+
"<b>1.</b> 部分样式值添加顺序会影响样式优先级,比如添加上侧圆角样式,应该先设置尺寸,再设置方向,否则方向设置会被覆盖而无效。<br>【exp】:<code><b-view styles=\"round-sm round-t\"></b-view></code>",
|
|
15
|
+
"<b>2.</b> 部分样式值需要通过组件结构嵌套进行复合使用,比如同时添加模糊和低明度滤镜样式。<br>【exp】:<code><b-view styles=\"blur-sm\"><b-view styles=\"dark-sm\"></b-view></b-view></code>"
|
|
16
|
+
],
|
|
17
|
+
extend: [],
|
|
18
|
+
dependent: [],
|
|
19
|
+
api: {
|
|
20
|
+
methods: [
|
|
21
|
+
{
|
|
22
|
+
name: "toggle_style",
|
|
23
|
+
ef: "切换状态样式",
|
|
24
|
+
params: "states",
|
|
25
|
+
return: "-"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "reset_style",
|
|
29
|
+
ef: "恢复原始样式",
|
|
30
|
+
params: "-",
|
|
31
|
+
return: "-"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "has_state",
|
|
35
|
+
ef: "判断是否具备某项样式状态",
|
|
36
|
+
params: "state",
|
|
37
|
+
return: "bool"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "append_state",
|
|
41
|
+
ef: "追加样式状态",
|
|
42
|
+
params: "styles, state",
|
|
43
|
+
return: "-"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
init_data: `{
|
|
48
|
+
/* styles: "样式值规范" */,
|
|
49
|
+
/* states: {
|
|
50
|
+
state: "样式状态",
|
|
51
|
+
style: "样式值规范"
|
|
52
|
+
}... */,
|
|
53
|
+
/* dynamic: "动态样式值规范" */
|
|
54
|
+
}`
|
|
55
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot/>
|
|
3
|
+
</template>
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import prestyles from "./prestyles.ts"
|
|
6
|
+
import theme from "./theme.ts"
|
|
7
|
+
import { onMounted, computed, reactive } from "vue"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
// 样式集
|
|
11
|
+
class?: string,
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
// 全局样式 id
|
|
15
|
+
const GLOBAL_STYLE_NAME = "BTXUIGlobal";
|
|
16
|
+
|
|
17
|
+
// 全局样式对象
|
|
18
|
+
const $style = ref();
|
|
19
|
+
|
|
20
|
+
// 全局样式类映射表
|
|
21
|
+
const styleMap = computed(() => {
|
|
22
|
+
const list = [];
|
|
23
|
+
for(let item of $style.value.sheet.rules) {
|
|
24
|
+
list.push(item.selectorText.substr(1));
|
|
25
|
+
}
|
|
26
|
+
return list;
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
// 设置全局 style
|
|
30
|
+
const initStyle = () => {
|
|
31
|
+
let $_style = document.head.querySelector(`#${ GLOBAL_STYLE_NAME }`);
|
|
32
|
+
if(!$_style) {
|
|
33
|
+
$_style = document.createElement("style");
|
|
34
|
+
$_style.setAttribute("type", "text/css");
|
|
35
|
+
$_style.setAttribute("id", GLOBAL_STYLE_NAME);
|
|
36
|
+
document.head.appendChild($_style);
|
|
37
|
+
}
|
|
38
|
+
$style.value = $_style;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 分解样式集
|
|
42
|
+
const styles = reactive({}) as any;
|
|
43
|
+
const validValue = (val: any) => {
|
|
44
|
+
if(!isNaN(val*1)) return val; // 数值判断
|
|
45
|
+
if(theme.colors[val]) return theme.colors[val]; // 颜色判断
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
const parseStyle = (rule: any) => {
|
|
49
|
+
// 使用预置样式
|
|
50
|
+
let style = prestyles[rule];
|
|
51
|
+
if(style) return style;
|
|
52
|
+
|
|
53
|
+
const rules = rule.split("-");
|
|
54
|
+
const dirs = {
|
|
55
|
+
l: "left",
|
|
56
|
+
t: "top",
|
|
57
|
+
r: "right",
|
|
58
|
+
b: "bottom",
|
|
59
|
+
};
|
|
60
|
+
let [r1, r2, r3, r4] = rules;
|
|
61
|
+
|
|
62
|
+
// 设置多段样式
|
|
63
|
+
style = prestyles[r1];
|
|
64
|
+
if(style) {
|
|
65
|
+
// property-value[-unit]:
|
|
66
|
+
// 【exp】:mrg-5 | mrg-5-px => mrg: 5rem; | mrg: 5px;
|
|
67
|
+
let value = validValue(r2);
|
|
68
|
+
if(value) return `${ style.pro }: ${ value }${ r3 || style.unit || "" }`;
|
|
69
|
+
|
|
70
|
+
// property[-direction]-value[-unit]:
|
|
71
|
+
// 【exp】:mrg-l-5 | mrg-l-5-px => margin-left: 5rem; | margin-left: 5px;
|
|
72
|
+
value = validValue(r3);
|
|
73
|
+
if(value) return `${ style.pro }-${ dirs[<"l"|"t"|"r"|"b">r2] || r2 }: ${ value }${ r4 || style.unit || "" }`;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const parseStyles = () => {
|
|
77
|
+
if(!props.class) return;
|
|
78
|
+
props.class.split(" ").forEach((rule: string) => {
|
|
79
|
+
if(!styleMap.value.includes(rule)) {
|
|
80
|
+
styleMap.value.push(rule);
|
|
81
|
+
styles[rule] = parseStyle(rule);
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 设置全局类
|
|
87
|
+
const setStyle = () => {
|
|
88
|
+
Object.keys(styles).forEach(key => {
|
|
89
|
+
$style.value.sheet.addRule(`.${ key }`, styles[key]);
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onMounted(() => {
|
|
94
|
+
initStyle();
|
|
95
|
+
parseStyles();
|
|
96
|
+
setStyle();
|
|
97
|
+
})
|
|
98
|
+
</script>
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
interface Prestyles {
|
|
2
|
+
[key:string]: any
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export default <Prestyles>{
|
|
6
|
+
|
|
7
|
+
//预置样式-----------------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
//重置初始字号及行高
|
|
10
|
+
"resize": `font-size: 1rem; lineHeight: 1.5;`,
|
|
11
|
+
|
|
12
|
+
//文字加粗
|
|
13
|
+
"bold": `font-weight: bold;`,
|
|
14
|
+
|
|
15
|
+
//隐藏显示
|
|
16
|
+
"show": `display: "block";`,
|
|
17
|
+
"hide": `display: "none";`,
|
|
18
|
+
|
|
19
|
+
//布局
|
|
20
|
+
"flex": `display: "flex"; justifyContent: "flex-start"; alignItems: "stretch";`,
|
|
21
|
+
"flex-column": `display: "flex"; flexDirection: "column";`,
|
|
22
|
+
"flex-1": `display: "flex"; justifyContent: "flex-start"; alignItems: "flex-start";`,
|
|
23
|
+
"flex-2": `display: "flex"; justifyContent: "center"; alignItems: "flex-start";`,
|
|
24
|
+
"flex-3": `display: "flex"; justifyContent: "flex-end"; alignItems: "flex-start";`,
|
|
25
|
+
"flex-4": `display: "flex"; justifyContent: "flex-start"; alignItems: "center"`,
|
|
26
|
+
"flex-5": {
|
|
27
|
+
display: "flex",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
},
|
|
31
|
+
"flex-6": {
|
|
32
|
+
display: "flex",
|
|
33
|
+
justifyContent: "flex-end",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
},
|
|
36
|
+
"flex-7": {
|
|
37
|
+
display: "flex",
|
|
38
|
+
justifyContent: "flex-start",
|
|
39
|
+
alignItems: "flex-end",
|
|
40
|
+
},
|
|
41
|
+
"flex-8": {
|
|
42
|
+
display: "flex",
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
alignItems: "flex-end",
|
|
45
|
+
},
|
|
46
|
+
"flex-9": {
|
|
47
|
+
display: "flex",
|
|
48
|
+
justifyContent: "flex-end",
|
|
49
|
+
alignItems: "flex-end",
|
|
50
|
+
},
|
|
51
|
+
"flex-between": {
|
|
52
|
+
display: "flex",
|
|
53
|
+
justifyContent: "space-between",
|
|
54
|
+
alignItems: "center"
|
|
55
|
+
},
|
|
56
|
+
"flex-around": {
|
|
57
|
+
display: "flex",
|
|
58
|
+
justifyContent: "space-around",
|
|
59
|
+
alignItems: "center"
|
|
60
|
+
},
|
|
61
|
+
"grid": {
|
|
62
|
+
display: "flex",
|
|
63
|
+
flexWrap: "wrap",
|
|
64
|
+
alignContent: "flex-start"
|
|
65
|
+
},
|
|
66
|
+
"max-h": {
|
|
67
|
+
height: "100%",
|
|
68
|
+
},
|
|
69
|
+
"max-w": {
|
|
70
|
+
width: "100%",
|
|
71
|
+
},
|
|
72
|
+
"max": {
|
|
73
|
+
height: "100%",
|
|
74
|
+
width: "100%",
|
|
75
|
+
},
|
|
76
|
+
"max-screen": {
|
|
77
|
+
height: "100%",
|
|
78
|
+
width: "100%",
|
|
79
|
+
position: "fixed",
|
|
80
|
+
left: 0,
|
|
81
|
+
top: 0
|
|
82
|
+
},
|
|
83
|
+
"item": {
|
|
84
|
+
breakInside: "avoid",
|
|
85
|
+
mozPageBreakInside: "avoid",
|
|
86
|
+
webkitColumnBreakInside: "avoid"
|
|
87
|
+
},
|
|
88
|
+
"fixed": { position: "fixed" },
|
|
89
|
+
"rel": { position: "relative" },
|
|
90
|
+
"abs": { position: "absolute" },
|
|
91
|
+
"z-1": { zIndex: -1 },
|
|
92
|
+
"z0": { zIndex: 0 },
|
|
93
|
+
"z1": { zIndex: 1 },
|
|
94
|
+
"z2": { zIndex: 2 },
|
|
95
|
+
"z3": { zIndex: 3 },
|
|
96
|
+
"z4": { zIndex: 4 },
|
|
97
|
+
"z5": { zIndex: 5 },
|
|
98
|
+
"z6": { zIndex: 6 },
|
|
99
|
+
"z7": { zIndex: 7 },
|
|
100
|
+
"z8": { zIndex: 8 },
|
|
101
|
+
"z9": { zIndex: 9 },
|
|
102
|
+
"z10": { zIndex: 10 },
|
|
103
|
+
|
|
104
|
+
//溢出处理
|
|
105
|
+
"no-scroll": { overflow: "hidden" },
|
|
106
|
+
"over-show": { overflow: "visible" },
|
|
107
|
+
"over-scroll": { overflow: "scroll" },
|
|
108
|
+
"over-hide": { overflow: "hidden" },
|
|
109
|
+
|
|
110
|
+
// 背景
|
|
111
|
+
"bg-repeat": { backgroundRepeat: "repeat" },
|
|
112
|
+
"bg-repeat-x": { backgroundRepeat: "repeat-x" },
|
|
113
|
+
"bg-repeat-y": { backgroundRepeat: "repeat-y" },
|
|
114
|
+
// size
|
|
115
|
+
"bg-size-cover": `background-size: cover;`,
|
|
116
|
+
"bg-size-contain": `background-size: contain;`,
|
|
117
|
+
"bg-size-max": `background-size: 100% 100%;`,
|
|
118
|
+
"bg-size-max-h": `background-size: auto 100%;`,
|
|
119
|
+
"bg-size-max-w": `background-size: 100% auto;`,
|
|
120
|
+
|
|
121
|
+
"bg-pos-1": { backgroundPosition: "left top" },
|
|
122
|
+
"bg-pos-2": { backgroundPosition: "center top" },
|
|
123
|
+
"bg-pos-3": { backgroundPosition: "right top" },
|
|
124
|
+
"bg-pos-4": { backgroundPosition: "left center" },
|
|
125
|
+
"bg-pos-5": { backgroundPosition: "center center" },
|
|
126
|
+
"bg-pos-6": { backgroundPosition: "right center" },
|
|
127
|
+
"bg-pos-7": { backgroundPosition: "left bottom" },
|
|
128
|
+
"bg-pos-8": { backgroundPosition: "center bottom" },
|
|
129
|
+
"bg-pos-9": { backgroundPosition: "right bottom" },
|
|
130
|
+
|
|
131
|
+
//圆角
|
|
132
|
+
"round": `border-radius: 50%;`,
|
|
133
|
+
"round-lg": `borderRadius: 24px;`,
|
|
134
|
+
"round-md": `border-radius: 10px;`,
|
|
135
|
+
"round-sm": `borderRadius: 4px;`,
|
|
136
|
+
"round-t": `borderBottomRightRadius: 0; borderBottomLeftRadius: 0;`,
|
|
137
|
+
"round-b": `borderTopRightRadius: 0; borderTopLeftRadius: 0;`,
|
|
138
|
+
"round-l": `borderTopRightRadius: 0; borderBottomRightRadius: 0;`,
|
|
139
|
+
"round-r": `borderTopLeftRadius: 0; borderBottomLeftRadius: 0;`,
|
|
140
|
+
|
|
141
|
+
//描边
|
|
142
|
+
"line": `borderStyle: solid;`,
|
|
143
|
+
"dashed": `borderStyle: dashed;`,
|
|
144
|
+
"line-l": `borderLeftStyle: solid;`,
|
|
145
|
+
"line-r": `borderRightStyle: solid;`,
|
|
146
|
+
"line-t": `borderTopStyle: solid;`,
|
|
147
|
+
"line-b": `borderBottomStyle: solid;`,
|
|
148
|
+
"dashed-l": `borderLeftStyle: dashed;`,
|
|
149
|
+
"dashed-r": `borderRightStyle: dashed;`,
|
|
150
|
+
"dashed-t": `borderTopStyle: dashed;`,
|
|
151
|
+
"dashed-b": `borderBottomStyle: dashed;`,
|
|
152
|
+
"line-outside": `backgroundClip: padding-box;`,
|
|
153
|
+
|
|
154
|
+
//文字描边
|
|
155
|
+
"text-line": {
|
|
156
|
+
textShadow: "1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5)"
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
//单行省略文本
|
|
160
|
+
"ellipsis": {
|
|
161
|
+
overflow: "hidden",
|
|
162
|
+
textOverflow: "ellipsis",
|
|
163
|
+
whiteSpace: "nowrap"
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
//阴影
|
|
167
|
+
"shadow": { boxShadow: "0 4px 17px" },
|
|
168
|
+
"shadow-sm": { boxShadow: "0 2px 4px" },
|
|
169
|
+
"shadow-lg": { boxShadow: "0 14px 40px" },
|
|
170
|
+
"shadow-relief": { boxShadow: "1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4)" },
|
|
171
|
+
|
|
172
|
+
//过渡动画
|
|
173
|
+
"trans": { transition: "all .7s" },
|
|
174
|
+
"trans-fast": { transition: "all .4s" },
|
|
175
|
+
"trans-slow": { transition: "all 1.4s" },
|
|
176
|
+
"trans-no": { transition: "none" },
|
|
177
|
+
|
|
178
|
+
//模糊滤镜
|
|
179
|
+
"blur-no": { filter: "blur(0px)" },
|
|
180
|
+
"blur-sm": { filter: "blur(2px)" },
|
|
181
|
+
"blur-md": { filter: "blur(7px)" },
|
|
182
|
+
"blur-lg": { filter: "blur(17px)" },
|
|
183
|
+
|
|
184
|
+
//明度滤镜
|
|
185
|
+
"dark-no": { filter: "brightness(100%)" },
|
|
186
|
+
"dark-sm": { filter: "brightness(80%)" },
|
|
187
|
+
"dark-md": { filter: "brightness(50%)" },
|
|
188
|
+
"dark-lg": { filter: "brightness(20%)" },
|
|
189
|
+
|
|
190
|
+
// 纯度滤镜
|
|
191
|
+
"gray-no": `filter: grayscale(0%);`,
|
|
192
|
+
"gray-sm": `filter: grayscale(40%);`,
|
|
193
|
+
"gray-md": `filter: grayscale(70%);`,
|
|
194
|
+
"gray-lg": `filter: grayscale(100%);`,
|
|
195
|
+
|
|
196
|
+
// 特殊
|
|
197
|
+
"bg-none": `pointerEvents: none;`,
|
|
198
|
+
"bg-use": `pointerEvents: auto;`,
|
|
199
|
+
"touch-none": `touchAction: none;`,
|
|
200
|
+
|
|
201
|
+
// 二段赋值-----------------------------------------------------------------------------------
|
|
202
|
+
|
|
203
|
+
// 文本对齐
|
|
204
|
+
"p": {
|
|
205
|
+
pro: "text-align"
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
// 文字颜色
|
|
209
|
+
"color": {
|
|
210
|
+
pro: "color"
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
// 背景色
|
|
214
|
+
"bg": {
|
|
215
|
+
pro: "background"
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
// 宽度
|
|
219
|
+
"w": {
|
|
220
|
+
pro: "width",
|
|
221
|
+
unit: "rem"
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
// 高度
|
|
225
|
+
"h": {
|
|
226
|
+
pro: "height",
|
|
227
|
+
unit: "rem"
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
// 内边距
|
|
231
|
+
"pad": {
|
|
232
|
+
pro: "padding",
|
|
233
|
+
unit: "rem"
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
// 外边距
|
|
237
|
+
"mrg": {
|
|
238
|
+
pro: "margin",
|
|
239
|
+
unit: "rem"
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
"rule_2": {
|
|
243
|
+
|
|
244
|
+
//字体
|
|
245
|
+
"font": {
|
|
246
|
+
pro: "fontFamily"
|
|
247
|
+
},
|
|
248
|
+
|
|
249
|
+
//字号
|
|
250
|
+
"fsize": {
|
|
251
|
+
pro: "fontSize",
|
|
252
|
+
unit: "em"
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
//行高
|
|
256
|
+
"lh": {
|
|
257
|
+
pro: "lineHeight",
|
|
258
|
+
},
|
|
259
|
+
|
|
260
|
+
//字符间距
|
|
261
|
+
"lspace": {
|
|
262
|
+
pro: "letterSpacing",
|
|
263
|
+
unit: "rem"
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
//不透明度
|
|
267
|
+
"alpha": {
|
|
268
|
+
pro: "opacity",
|
|
269
|
+
extra: {
|
|
270
|
+
visibility: "visible"
|
|
271
|
+
},
|
|
272
|
+
escape: {
|
|
273
|
+
"0": {
|
|
274
|
+
visibility: "hidden"
|
|
275
|
+
},
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
//描边颜色
|
|
280
|
+
"line": {
|
|
281
|
+
pro: "borderColor"
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
//自生长比率
|
|
285
|
+
"grow": {
|
|
286
|
+
pro: "flexGrow",
|
|
287
|
+
extra: {
|
|
288
|
+
flexBasis: 0
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
//弹性布局项目排序
|
|
293
|
+
"order": {
|
|
294
|
+
pro: "order"
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
//多列布局容器
|
|
298
|
+
"column": {
|
|
299
|
+
pro: "columnCount",
|
|
300
|
+
extra: {
|
|
301
|
+
columnGap: 0
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
//最大宽
|
|
306
|
+
"rw": {
|
|
307
|
+
pro: "maxWidth",
|
|
308
|
+
unit: "rem"
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
//最小宽
|
|
312
|
+
"lw": {
|
|
313
|
+
pro: "minWidth",
|
|
314
|
+
unit: "rem"
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
//最大高
|
|
318
|
+
"th": {
|
|
319
|
+
pro: "maxHeight",
|
|
320
|
+
unit: "rem"
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
//最小高
|
|
324
|
+
"bh": {
|
|
325
|
+
pro: "minHeight",
|
|
326
|
+
unit: "rem"
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
//基于容器左侧水平位移
|
|
330
|
+
"l": {
|
|
331
|
+
pro: "left",
|
|
332
|
+
unit: "rem"
|
|
333
|
+
},
|
|
334
|
+
|
|
335
|
+
//基于容器右侧水平位移
|
|
336
|
+
"r": {
|
|
337
|
+
pro: "right",
|
|
338
|
+
unit: "rem"
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
//基于容器上侧垂直位移
|
|
342
|
+
"t": {
|
|
343
|
+
pro: "top",
|
|
344
|
+
unit: "rem"
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
//基于容器下侧垂直位移
|
|
348
|
+
"b": {
|
|
349
|
+
pro: "bottom",
|
|
350
|
+
unit: "rem"
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
//水平位移
|
|
354
|
+
"translateX": {
|
|
355
|
+
pro: "transform",
|
|
356
|
+
tmp: "translateX(%{}%)",
|
|
357
|
+
unit: "%"
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
//垂直位移
|
|
361
|
+
"translateY": {
|
|
362
|
+
pro: "transform",
|
|
363
|
+
tmp: "translateY(%{}%)",
|
|
364
|
+
unit: "%"
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
//放缩
|
|
368
|
+
"scale": {
|
|
369
|
+
pro: "transform",
|
|
370
|
+
tmp: "scale(%{}%)"
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
//旋转
|
|
374
|
+
"rotate": {
|
|
375
|
+
pro: "transform",
|
|
376
|
+
tmp: "rotate(%{}%)",
|
|
377
|
+
unit: "deg"
|
|
378
|
+
},
|
|
379
|
+
|
|
380
|
+
//变形
|
|
381
|
+
"transform": {
|
|
382
|
+
pro: "transform",
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
//变形中心点
|
|
386
|
+
"origin": {
|
|
387
|
+
pro: "transformOrigin"
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
//描边粗细
|
|
391
|
+
"thick": {
|
|
392
|
+
pro: "borderWidth",
|
|
393
|
+
unit: "px"
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
//过渡动画延迟
|
|
397
|
+
"trans": {
|
|
398
|
+
pro: "transition"
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
//三段赋值-----------------------------------------------------------------------------------
|
|
404
|
+
|
|
405
|
+
"rule_3": {
|
|
406
|
+
|
|
407
|
+
//左侧
|
|
408
|
+
"l": {
|
|
409
|
+
pro: ["Left"],
|
|
410
|
+
unit: "rem"
|
|
411
|
+
},
|
|
412
|
+
|
|
413
|
+
//右侧
|
|
414
|
+
"r": {
|
|
415
|
+
pro: ["Right"],
|
|
416
|
+
unit: "rem"
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
//上侧
|
|
420
|
+
"t": {
|
|
421
|
+
pro: ["Top"],
|
|
422
|
+
unit: "rem"
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
//下侧
|
|
426
|
+
"b": {
|
|
427
|
+
pro: ["Bottom"],
|
|
428
|
+
unit: "rem"
|
|
429
|
+
},
|
|
430
|
+
|
|
431
|
+
//垂直方向
|
|
432
|
+
"v": {
|
|
433
|
+
pro: ["Top", "Bottom"],
|
|
434
|
+
unit: "rem"
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
//水平方向
|
|
438
|
+
"h": {
|
|
439
|
+
pro: ["Left", "Right"],
|
|
440
|
+
unit: "rem"
|
|
441
|
+
},
|
|
442
|
+
|
|
443
|
+
//背景颜色
|
|
444
|
+
"gradient": {
|
|
445
|
+
pro: ["Image"],
|
|
446
|
+
tmp: "-webkit-linear-gradient(%{}%)"
|
|
447
|
+
},
|
|
448
|
+
|
|
449
|
+
//背景颜色
|
|
450
|
+
"color": {
|
|
451
|
+
pro: ["Color"],
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
//背景尺寸
|
|
455
|
+
"size": {
|
|
456
|
+
pro: ["Size"],
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
//背景定位
|
|
460
|
+
"pos": {
|
|
461
|
+
pro: ["Position"],
|
|
462
|
+
},
|
|
463
|
+
|
|
464
|
+
//过渡动画延迟
|
|
465
|
+
"delay": {
|
|
466
|
+
pro: ["Delay"],
|
|
467
|
+
unit: "s"
|
|
468
|
+
},
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
}
|