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.
Files changed (190) hide show
  1. package/README.md +42 -0
  2. package/app.vue +162 -0
  3. package/assets/css/_main.js +73 -0
  4. package/assets/css/btx.min.css +1 -0
  5. package/assets/css/btx.mob.min.css +1 -0
  6. package/assets/css/btx.pad.min.css +1 -0
  7. package/assets/css/btx.webapp.min.css +1 -0
  8. package/assets/css/custom_fonts/iconfont.css +37 -0
  9. package/assets/css/custom_fonts/iconfont.eot +0 -0
  10. package/assets/css/custom_fonts/iconfont.svg +47 -0
  11. package/assets/css/custom_fonts/iconfont.ttf +0 -0
  12. package/assets/css/custom_fonts/iconfont.woff +0 -0
  13. package/assets/css/custom_fonts/iconfont.woff2 +0 -0
  14. package/assets/css/res-l.css +47 -0
  15. package/assets/css/res-m.css +47 -0
  16. package/assets/css/res-s.css +61 -0
  17. package/assets/custom_fonts/iconfont.css +37 -0
  18. package/assets/custom_fonts/iconfont.eot +0 -0
  19. package/assets/custom_fonts/iconfont.svg +47 -0
  20. package/assets/custom_fonts/iconfont.ttf +0 -0
  21. package/assets/custom_fonts/iconfont.woff +0 -0
  22. package/assets/custom_fonts/iconfont.woff2 +0 -0
  23. package/assets/js/Btx.js +196 -0
  24. package/assets/js/Utils.js +421 -0
  25. package/assets/js/fastclick.js +802 -0
  26. package/assets/js/lazy.min.js +2 -0
  27. package/assets/js/touchwipe.js +111 -0
  28. package/assets/server.js +8 -0
  29. package/assets/start_site_code_str.js +119 -0
  30. package/cdn/css/btx.min.css +1 -0
  31. package/cdn/css/btx.min.css.map +1 -0
  32. package/cdn/fonts/iconfont.ttf +0 -0
  33. package/cdn/fonts/iconfont.woff +0 -0
  34. package/cdn/fonts/iconfont.woff2 +0 -0
  35. package/components/BTXUI/app/app-wid.vue +182 -0
  36. package/components/BTXUI/btn/btn-wid.vue +128 -0
  37. package/components/BTXUI/carousel/carousel-wid.vue +138 -0
  38. package/components/BTXUI/checkbox/checkbox-wid.vue +72 -0
  39. package/components/BTXUI/confirm/confirm-wid.vue +279 -0
  40. package/components/BTXUI/content/content-checkbox-wid.vue +44 -0
  41. package/components/BTXUI/content/content-node-wid.vue +114 -0
  42. package/components/BTXUI/content/content-tag-wid.vue +25 -0
  43. package/components/BTXUI/content/content-wid.vue +254 -0
  44. package/components/BTXUI/core/anis/ani-fail.vue +46 -0
  45. package/components/BTXUI/core/anis/ani-loading.vue +32 -0
  46. package/components/BTXUI/core/anis/ani-notic.vue +47 -0
  47. package/components/BTXUI/core/anis/ani-success.vue +48 -0
  48. package/components/BTXUI/core/b-drag.vue +258 -0
  49. package/components/BTXUI/core/b-grid.vue +84 -0
  50. package/components/BTXUI/core/b-hot.vue +171 -0
  51. package/components/BTXUI/core/b-icon.vue +76 -0
  52. package/components/BTXUI/core/b-img.vue +84 -0
  53. package/components/BTXUI/core/b-input.vue +198 -0
  54. package/components/BTXUI/core/b-list.vue +276 -0
  55. package/components/BTXUI/core/b-text/doc.ts +9 -0
  56. package/components/BTXUI/core/b-text/index.vue +16 -0
  57. package/components/BTXUI/core/b-textarea.vue +58 -0
  58. package/components/BTXUI/core/b-video.vue +35 -0
  59. package/components/BTXUI/core/b-view/doc.ts +10 -0
  60. package/components/BTXUI/core/b-view/index.vue +20 -0
  61. package/components/BTXUI/core/b-webview.vue +20 -0
  62. package/components/BTXUI/core/lib/ChapterLink.js +49 -0
  63. package/components/BTXUI/core/lib/Search.vue +60 -0
  64. package/components/BTXUI/core/styles/doc.ts +55 -0
  65. package/components/BTXUI/core/styles/index.vue +98 -0
  66. package/components/BTXUI/core/styles/prestyles.ts +471 -0
  67. package/components/BTXUI/core/styles/theme.ts +29 -0
  68. package/components/BTXUI/drawer/drawer-wid.vue +165 -0
  69. package/components/BTXUI/drawer/title-tag-wid.vue +114 -0
  70. package/components/BTXUI/form/form-select-wid.vue +57 -0
  71. package/components/BTXUI/form/form-wid.vue +324 -0
  72. package/components/BTXUI/formPannel/form-pannel-wid.vue +133 -0
  73. package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +149 -0
  74. package/components/BTXUI/index.js +83 -0
  75. package/components/BTXUI/pageFlip/page-flip-wid.vue +206 -0
  76. package/components/BTXUI/pannel/pannel-wid.vue +167 -0
  77. package/components/BTXUI/range/range-wid.vue +134 -0
  78. package/components/BTXUI/search/search-wid.vue +80 -0
  79. package/components/BTXUI/select/select-wid.vue +186 -0
  80. package/components/BTXUI/slider/slider-wid.vue +444 -0
  81. package/components/BTXUI/tab/tab-wid.vue +109 -0
  82. package/components/BTXUI/table/table-wid.vue +324 -0
  83. package/components/BTXUI/tag/tag-wid.vue +183 -0
  84. package/components/BTXUI/tags/tags-wid.vue +121 -0
  85. package/components/BTXUI/tooltip/tooltip-wid.vue +146 -0
  86. package/components/BTXUI/upload/upload-wid.vue +215 -0
  87. package/components/BTXUI/waterfall/waterfall-wid.vue +166 -0
  88. package/components/header-info.vue +167 -0
  89. package/composables/@types.ts +4 -0
  90. package/composables/api.ts +18 -0
  91. package/env.d.ts +5 -0
  92. package/main.js +6 -0
  93. package/nuxt.config.ts +51 -0
  94. package/package.json +23 -0
  95. package/pages/article.vue +16 -0
  96. package/pages/download.vue +50 -0
  97. package/pages/example/app_wid/app/data_demo.vue +9 -0
  98. package/pages/example/app_wid/app/download_demo.vue +9 -0
  99. package/pages/example/app_wid/app/list_demo.vue +11 -0
  100. package/pages/example/app_wid/app/system_demo.vue +9 -0
  101. package/pages/example/app_wid/app_wid_demo.vue +198 -0
  102. package/pages/example/app_wid/btn_wid_demo.vue +179 -0
  103. package/pages/example/app_wid/carousel_wid_demo.vue +152 -0
  104. package/pages/example/app_wid/checkbox_wid_demo.vue +65 -0
  105. package/pages/example/app_wid/confirm_wid_demo.vue +197 -0
  106. package/pages/example/app_wid/content_wid_demo.vue +369 -0
  107. package/pages/example/app_wid/drawer_wid_demo.vue +155 -0
  108. package/pages/example/app_wid/form_pannel_wid_demo.vue +338 -0
  109. package/pages/example/app_wid/form_wid_demo.vue +550 -0
  110. package/pages/example/app_wid/imgs_upload_wid_demo.vue +159 -0
  111. package/pages/example/app_wid/index.js +158 -0
  112. package/pages/example/app_wid/page_flip_wid_demo.vue +99 -0
  113. package/pages/example/app_wid/pannel_wid_demo.vue +177 -0
  114. package/pages/example/app_wid/range_wid_demo.vue +101 -0
  115. package/pages/example/app_wid/search_wid_demo.vue +75 -0
  116. package/pages/example/app_wid/select_wid_demo.vue +217 -0
  117. package/pages/example/app_wid/slider_wid_demo.vue +143 -0
  118. package/pages/example/app_wid/tab_wid_demo.vue +170 -0
  119. package/pages/example/app_wid/table_wid_demo.vue +377 -0
  120. package/pages/example/app_wid/tag_wid_demo.vue +133 -0
  121. package/pages/example/app_wid/tags_wid_demo.vue +143 -0
  122. package/pages/example/app_wid/tooltip_wid_demo.vue +117 -0
  123. package/pages/example/app_wid/upload_wid_demo.vue +123 -0
  124. package/pages/example/base_wid/b_drag_demo.vue +159 -0
  125. package/pages/example/base_wid/b_grid_demo.vue +225 -0
  126. package/pages/example/base_wid/b_hot_demo.vue +135 -0
  127. package/pages/example/base_wid/b_icon_demo.vue +80 -0
  128. package/pages/example/base_wid/b_img_demo.vue +95 -0
  129. package/pages/example/base_wid/b_input_demo.vue +171 -0
  130. package/pages/example/base_wid/b_list_demo.vue +241 -0
  131. package/pages/example/base_wid/b_style_demo.vue +928 -0
  132. package/pages/example/base_wid/b_text_demo.vue +36 -0
  133. package/pages/example/base_wid/b_textarea_demo.vue +64 -0
  134. package/pages/example/base_wid/b_video_demo.vue +42 -0
  135. package/pages/example/base_wid/b_view_demo.vue +36 -0
  136. package/pages/example/base_wid/index.js +76 -0
  137. package/pages/example/content.js +49 -0
  138. package/pages/example/global_style/animation.vue +197 -0
  139. package/pages/example/global_style/color.vue +134 -0
  140. package/pages/example/global_style/decoration.vue +546 -0
  141. package/pages/example/global_style/icon.vue +345 -0
  142. package/pages/example/global_style/index.js +52 -0
  143. package/pages/example/global_style/layout.vue +846 -0
  144. package/pages/example/global_style/special.vue +37 -0
  145. package/pages/example/global_style/table.vue +298 -0
  146. package/pages/example/global_style/text.vue +159 -0
  147. package/pages/index.vue +29 -0
  148. package/pages/level_widget.vue +11 -0
  149. package/pages/start.vue +200 -0
  150. package/plugins/index.ts +2 -0
  151. package/public/favicon.gif +0 -0
  152. package/public/fonts/iconfont.ttf +0 -0
  153. package/public/fonts/iconfont.woff +0 -0
  154. package/public/fonts/iconfont.woff2 +0 -0
  155. package/public/img/banner.jpg +0 -0
  156. package/public/img/banner2.jpg +0 -0
  157. package/public/img/bg_pattern.png +0 -0
  158. package/public/img/btx.jpg +0 -0
  159. package/public/img/btx_ui.jpg +0 -0
  160. package/public/img/dir.png +0 -0
  161. package/public/img/f.png +0 -0
  162. package/public/img/head.jpg +0 -0
  163. package/public/img/head2.jpg +0 -0
  164. package/public/img/home_ico.png +0 -0
  165. package/public/img/icons.svg +164 -0
  166. package/public/img/mechanism/b-style.png +0 -0
  167. package/public/img/mechanism/slider-wid.png +0 -0
  168. package/public/img/mechanism/upload-wid.png +0 -0
  169. package/public/img/transform_origin.png +0 -0
  170. package/sass/animation.scss +400 -0
  171. package/sass/btx.mob.scss +10 -0
  172. package/sass/btx.pad.scss +3 -0
  173. package/sass/btx.scss +22 -0
  174. package/sass/btx.webapp.scss +22 -0
  175. package/sass/colors.scss +65 -0
  176. package/sass/decoration.scss +220 -0
  177. package/sass/flex.scss +29 -0
  178. package/sass/icons.scss +100 -0
  179. package/sass/layout.scss +88 -0
  180. package/sass/reset.scss +111 -0
  181. package/sass/response/flex_mixin.scss +91 -0
  182. package/sass/response/layout_mixin.scss +227 -0
  183. package/sass/response/main.scss +59 -0
  184. package/sass/response/text_mixin.scss +65 -0
  185. package/sass/scroll.scss +100 -0
  186. package/sass/special.scss +13 -0
  187. package/sass/table.scss +103 -0
  188. package/sass/text.scss +86 -0
  189. package/sass/webpack.config.js +31 -0
  190. package/tsconfig.json +4 -0
@@ -0,0 +1,227 @@
1
+ //生成定位类
2
+ @mixin auto_gen_position_class($suffix:"") {
3
+ .fixed#{$suffix}{
4
+ position: fixed;
5
+ }
6
+ .rel#{$suffix}{
7
+ position: relative;
8
+ }
9
+ .abs#{$suffix}{
10
+ position: absolute;
11
+ }
12
+ }
13
+
14
+ //生成强制隐藏与显示类
15
+ @mixin auto_gen_display_class($suffix:"") {
16
+ .hide#{$suffix}{
17
+ display: none !important; //强制隐藏
18
+ }
19
+ .show#{$suffix}{
20
+ display: block !important; //强制显示
21
+ }
22
+ }
23
+
24
+ //生成不同尺寸宽度及高度
25
+ @mixin auto_size($suffix:""){
26
+ .w-auto#{$suffix} {
27
+ width: auto;
28
+ }
29
+ .h-auto#{$suffix} {
30
+ height: auto;
31
+ }
32
+ .w-0#{$suffix} {
33
+ width: 0;
34
+ }
35
+ .h-0#{$suffix} {
36
+ height: 0;
37
+ }
38
+ .w-d5#{$suffix} {
39
+ width: .5rem;
40
+ }
41
+ .h-d5#{$suffix} {
42
+ height: .5rem;
43
+ }
44
+ .max-w#{$suffix} { //满宽
45
+ width: 100%;
46
+ }
47
+ .max-h#{$suffix} { //满高
48
+ height: 100%;
49
+ }
50
+ .max#{$suffix} { //满屏
51
+ width: 100%;
52
+ height: 100%;
53
+ }
54
+ @for $i from 1 to 11{
55
+ .w-#{$i}#{$suffix} {
56
+ width: #{$i}rem;
57
+ }
58
+ .h-#{$i}#{$suffix} {
59
+ height: #{$i}rem;
60
+ }
61
+ }
62
+ $vals: (15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100);
63
+ @each $val in $vals{
64
+ .w-#{$val}#{$suffix} {
65
+ width: #{$val}rem;
66
+ }
67
+ .h-#{$val}#{$suffix} {
68
+ height: #{$val}rem;
69
+ }
70
+ }
71
+ }
72
+
73
+ //生成不同尺寸宽度及高度上下限
74
+ @mixin auto_limit_size($suffix:""){
75
+ $vals: (10p 10%), (20p 20%), (30p 30%), (40p 40%), (50p 50%), (60p 60%), (70p 70%), (80p 80%), (90p 90%);
76
+ @each $val in $vals{
77
+ .rw-#{nth($val, 1)}#{$suffix} {
78
+ max-width: #{nth($val, 2)};
79
+ }
80
+ .lw-#{nth($val, 1)}#{$suffix} {
81
+ min-width: #{nth($val, 2)};
82
+ }
83
+ }
84
+ @for $i from 1 to 11{
85
+ .th-#{$i * 10}#{$suffix} {
86
+ max-height: #{$i * 10}rem;
87
+ }
88
+ .bh-#{$i * 10}#{$suffix} {
89
+ min-height: #{$i * 10}rem;
90
+ }
91
+ }
92
+ }
93
+
94
+ //生成内、外边距类
95
+ @mixin set_space($side, $val:0, $dir:all){
96
+ @if $dir == all{
97
+ #{$side}: $val;
98
+ }@else if $dir == v{ //vertical
99
+ #{$side}: {
100
+ top: $val;
101
+ bottom: $val;
102
+ }
103
+ }@else if $dir == h{ //horizontal
104
+ #{$side}: {
105
+ left: $val;
106
+ right: $val;
107
+ }
108
+ }@else{
109
+ #{$side}-#{$dir}: $val;
110
+ }
111
+ }
112
+ @mixin auto_gen_space_class($suffix:""){
113
+ $dirs: (-t top), (-r right), (-l left), (-b bottom), (-v v), (-h h), ("" all);
114
+ $vals: (0 0), (d5 .5), (1 1), (1d5 1.5), (2 2), (2d5 2.5), (3 3), (3d5 3.5), (4 4), (5 5), (6 6), (7 7), (8 8), (9 9), (10 10);
115
+
116
+ @for $i from 1 to length($dirs) + 1{
117
+ $dir: nth($dirs, $i);
118
+ @each $val in $vals{
119
+ .pad#{nth($dir, 1)}-#{nth($val, 1)}#{$suffix} {
120
+ @include set_space(padding, #{nth($val, 2)}rem, nth($dir, 2));
121
+ }
122
+ .mrg#{nth($dir, 1)}-#{nth($val, 1)}#{$suffix} {
123
+ @include set_space(margin, #{nth($val, 2)}rem, nth($dir, 2));
124
+ }
125
+ .mrg#{nth($dir, 1)}-auto#{$suffix} {
126
+ @include set_space(margin, auto, nth($dir, 2));
127
+ }
128
+ }
129
+ }
130
+ }
131
+
132
+ //生成放缩比率类
133
+ @mixin auto_gen_scale_class($suffix:""){
134
+ .scale-0#{$suffix} {
135
+ transform: scale(0);
136
+ }
137
+ @for $i from 1 to 10{
138
+ .scale-d#{$i}#{$suffix} {
139
+ transform: scale(calc($i / 10));
140
+ }
141
+ }
142
+ @for $i from 1 to 10{
143
+ .scale-1d#{$i}#{$suffix} {
144
+ transform: scale(calc($i / 10) + 1);
145
+ }
146
+ }
147
+ @for $i from 2 to 11{
148
+ .scale-#{$i}#{$suffix} {
149
+ transform: scale($i);
150
+ }
151
+ }
152
+ }
153
+
154
+ //生成 translate 平移类
155
+ @mixin auto_gen_translate_class($suffix:""){
156
+ $percent: (10 10%), (25 25%), (50 50%), (100 100%), (200 200%), (500 500%);
157
+ @for $i from 0 to 12{
158
+ @each $p in $percent{
159
+ .translateX-#{nth($p, 1)}#{$suffix} {
160
+ transform: translateX(nth($p, 2));
161
+ }
162
+ .translateX-f#{nth($p, 1)}#{$suffix} {
163
+ transform: translateX(nth($p, 2) * -1);
164
+ }
165
+ .translateY-#{nth($p, 1)}#{$suffix} {
166
+ transform: translateY(nth($p, 2));
167
+ }
168
+ .translateY-f#{nth($p, 1)}#{$suffix} {
169
+ transform: translateY(nth($p, 2) * -1);
170
+ }
171
+ }
172
+ }
173
+ }
174
+
175
+ //生成位移类
176
+ @mixin auto_gen_offset_class($suffix:""){
177
+ $dirs: (l left), (r right), (t top), (b bottom);
178
+ $percent: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200;
179
+ $units: rem, px;
180
+ @for $i from 0 to 12{
181
+ @each $dir in $dirs{
182
+ @if $i == 0{
183
+ .#{nth($dir, 1)}-#{$i}#{$suffix} {
184
+ #{nth($dir, 2)}: #{$i};
185
+ }
186
+ }@else {
187
+ @each $unit in $units{
188
+ .#{nth($dir, 1)}-#{$i}#{$unit}#{$suffix} { //正数
189
+ #{nth($dir, 2)}: #{$i}#{$unit};
190
+ }
191
+ .#{nth($dir, 1)}-f#{$i}#{$unit}#{$suffix} { //负数
192
+ #{nth($dir, 2)}: -#{$i}#{$unit};
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ //百分比位移
200
+ @each $dir in $dirs{
201
+ @each $v in $percent {
202
+ .#{nth($dir, 1)}-#{$v}p { //正数
203
+ #{nth($dir, 2)}: #{$v + '%'};
204
+ }
205
+ .#{nth($dir, 1)}-f#{$v}p { //负数
206
+ #{nth($dir, 2)}: -#{$v + '%'};
207
+ }
208
+ }
209
+ }
210
+
211
+ //auto 值
212
+ @each $dir in $dirs{
213
+ .#{nth($dir, 1)}-auto#{$suffix} {
214
+ #{nth($dir, 2)}: auto;
215
+ }
216
+ }
217
+ }
218
+
219
+ //生成多列布局容器类
220
+ @mixin auto_gen_column_class($suffix:""){
221
+ @for $i from 1 to 6{
222
+ .column-#{$i}#{$suffix} {
223
+ column-gap: 0;
224
+ column-count: #{$i};
225
+ }
226
+ }
227
+ }
@@ -0,0 +1,59 @@
1
+ @import "./text_mixin.scss";
2
+ @import "./layout_mixin.scss";
3
+ @import "./flex_mixin.scss";
4
+
5
+ @mixin auto_gen_response_class($suffix:"") {
6
+
7
+ //文本对齐
8
+ @include auto_gen_text_align_class($suffix);
9
+
10
+ //倍数字号
11
+ @include auto_gen_font_size_class($suffix);
12
+
13
+ //字符间距
14
+ @include auto_gen_letter_space_class($suffix);
15
+
16
+ //定位
17
+ @include auto_gen_position_class($suffix);
18
+
19
+ //强制隐藏与显示
20
+ @include auto_gen_display_class($suffix);
21
+
22
+ //生成不同尺寸宽度及高度
23
+ @include auto_size($suffix);
24
+
25
+ //生成不同尺寸宽度及高度上下限
26
+ @include auto_limit_size($suffix);
27
+
28
+ //内、外边距
29
+ @include auto_gen_space_class($suffix);
30
+
31
+ //生长方向类
32
+ @include auto_gen_flex_dir_class($suffix);
33
+
34
+ //九宫格对齐定位
35
+ @include auto_gen_flex_align_class($suffix);
36
+
37
+ //栅格布局
38
+ @include auto_gen_grid_class($suffix);
39
+
40
+ //生成自生长元素类
41
+ @include auto_gen_grow_class($suffix);
42
+
43
+ //生成项目排序元素类
44
+ @include auto_gen_order_class($suffix);
45
+
46
+ //放缩比率
47
+ @include auto_gen_scale_class($suffix);
48
+
49
+ //translate平移
50
+ @include auto_gen_translate_class($suffix);
51
+
52
+ //位移
53
+ @include auto_gen_offset_class($suffix);
54
+
55
+ //多列布局容器
56
+ @include auto_gen_column_class($suffix);
57
+
58
+ }
59
+
@@ -0,0 +1,65 @@
1
+ //生成文本对齐类
2
+ @mixin auto_gen_text_align_class($suffix:"") {
3
+ .pcenter#{$suffix} {
4
+ text-align: center;
5
+ }
6
+
7
+ .pright#{$suffix} {
8
+ text-align: right;
9
+ }
10
+
11
+ .pleft#{$suffix} {
12
+ text-align: left;
13
+ }
14
+
15
+ .pjustify#{$suffix} {
16
+ text-align: justify;
17
+ }
18
+
19
+ .pindent#{$suffix} {
20
+ text-indent: 2em;
21
+ }
22
+ }
23
+
24
+ //生成倍数字号类
25
+ @mixin auto_gen_font_size_class($suffix:"") {
26
+ @for $i from 0 to 6{
27
+
28
+ //处理缩小字号
29
+ @if $i == 0 {
30
+ .fsize-#{$i}#{$suffix} { //0 号字
31
+ font-size: 0;
32
+ }
33
+ @for $i from 1 to 10{
34
+ .fsize-d#{$i}#{$suffix} {
35
+ font-size: #{calc($i / 10)}em;
36
+ }
37
+ }
38
+ } @else if $i == 1 {
39
+ .fsize-#{$i}#{$suffix} {
40
+ font-size: #{$i}em;
41
+ }
42
+ @for $i from 1 to 10{
43
+ .fsize-1d#{$i}#{$suffix} {
44
+ font-size: #{1 + calc($i / 10)}em;
45
+ }
46
+ }
47
+ } @else if $i > 1 {
48
+ .fsize-#{$i}#{$suffix} {
49
+ font-size: #{$i}em;
50
+ }
51
+ .fsize-#{$i}d5#{$suffix} {
52
+ font-size: #{$i + 0.5}em;
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ //生成字符间距类
59
+ @mixin auto_gen_letter_space_class($suffix:"") {
60
+ @for $i from 0 to 6 {
61
+ .lspace-#{$i}#{$suffix}{
62
+ letter-spacing: #{$i}px;
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,100 @@
1
+ //IE 设置
2
+ %ie-set{
3
+ scrollbar-arrow-color: transparent;
4
+ scrollbar-face-color: transparent;
5
+ scrollbar-3dlight-color: transparent;
6
+ scrollbar-highlight-color: transparent;
7
+ scrollbar-shadow-color: transparent;
8
+ scrollbar-darkshadow-color: transparent;
9
+ scrollbar-track-color: transparent;
10
+ scrollbar-base-color: transparent;
11
+ }
12
+
13
+ //IE hovre 设置
14
+ %ie-hover-set{
15
+ scrollbar-arrow-color: #eee;
16
+ scrollbar-face-color: #eee;
17
+ scrollbar-3dlight-color: #eee;
18
+ scrollbar-highlight-color: #eee;
19
+ scrollbar-shadow-color: #eee;
20
+ scrollbar-darkshadow-color: #eee;
21
+ scrollbar-track-color: #eee;
22
+ scrollbar-base-color: #eee;
23
+ }
24
+
25
+ //webkit 设置
26
+ %webkit-set{
27
+ &::-webkit-scrollbar-thumb{
28
+ border-radius: 3px;
29
+ box-shadow: inset 0 0 5px transparent;
30
+ background: transparent;
31
+ }
32
+ &::-webkit-scrollbar-track{
33
+ box-shadow: inset 0 0 5px transparent;
34
+ border-radius: 3px;
35
+ background: transparent;
36
+ }
37
+ }
38
+
39
+ //webkit hovre 设置
40
+ %webkit-hover-set{
41
+ &::-webkit-scrollbar-thumb{
42
+ background: rgba(140,140,140,.2);
43
+ }
44
+ &::-webkit-scrollbar-track{
45
+ background: transparent;
46
+ }
47
+ }
48
+
49
+ %relative {
50
+ position: relative;
51
+ }
52
+
53
+ @mixin scroll_base($wide:3px){
54
+ @extend %relative;
55
+
56
+ //IE 设置
57
+ @extend %ie-set;
58
+
59
+ //webkit 设置
60
+ &::-webkit-scrollbar{
61
+ width: $wide;
62
+ height: $wide;
63
+ }
64
+ @extend %webkit-set;
65
+
66
+ &:hover, &:focus{
67
+
68
+ //IE hovre 设置
69
+ @extend %ie-hover-set;
70
+
71
+ //webkit hovre 设置
72
+ @extend %webkit-hover-set;
73
+ }
74
+ }
75
+
76
+ //纵向滚动条
77
+ .auto-scroll, .over-scroll {
78
+ overflow-y: auto;
79
+ @include scroll_base();
80
+ }
81
+ .wide-auto-scroll { //(易于拖动)
82
+ overflow-y: auto;
83
+ @include scroll_base(14px);
84
+ }
85
+
86
+ //横向滚动条(易于拖动)
87
+ .auto-h-scroll{
88
+ overflow-x: auto;
89
+ @include scroll_base(14px);
90
+ }
91
+
92
+ //溢出隐藏
93
+ .no-scroll, .over-hide{
94
+ overflow: hidden;
95
+ }
96
+
97
+ //溢出显示
98
+ .over-show{
99
+ overflow: visible;
100
+ }
@@ -0,0 +1,13 @@
1
+ .bg-none { pointer-events: none; } //背景点透效果
2
+ .bg-use { pointer-events: auto; } //背景常规效果(非点透)
3
+ .touch-none { touch-action: none; } //元素触控禁止
4
+
5
+ //元素长按选中禁止
6
+ .select-none {
7
+ -webkit-touch-callout:none;
8
+ -webkit-user-select:none;
9
+ -khtml-user-select:none;
10
+ -moz-user-select:none;
11
+ -ms-user-select:none;
12
+ user-select:none;
13
+ }
@@ -0,0 +1,103 @@
1
+ table{
2
+ width: 100%;
3
+ border-spacing: 0;
4
+ }
5
+
6
+ .table {
7
+ background-color: #fff;
8
+
9
+ //常规尺寸
10
+ th{
11
+ text-align: left;
12
+ border-bottom: 1px solid #ddd;
13
+ font-size: 1.2rem;
14
+ color: #222;
15
+ }
16
+ &:not([border]) tbody{
17
+ tr{
18
+ &:nth-child(even){
19
+ background-color: #f7f7f7;
20
+ }
21
+ &:last-child td{
22
+ border-bottom: 1px solid #eee;
23
+ }
24
+ }
25
+ }
26
+
27
+ td, th{
28
+ padding: .5rem 1rem;
29
+ }
30
+ td {
31
+ color: #555;
32
+ font-size: 1.1rem;
33
+ }
34
+
35
+ //宽松尺寸
36
+ &[easy]{
37
+ td, th{
38
+ padding: .7rem 1rem;
39
+ }
40
+ th{
41
+ font-size: 1.3rem;
42
+ }
43
+ td{
44
+ font-size: 1.2rem;
45
+ }
46
+ }
47
+
48
+ //紧凑尺寸
49
+ &[compact]{
50
+ td, th{
51
+ padding: .2rem 1rem;
52
+ }
53
+ th{
54
+ font-size: 1.1rem;
55
+ }
56
+ td{
57
+ font-size: 1rem;
58
+ }
59
+ }
60
+
61
+ //线框样式
62
+ &[border]{
63
+ border-collapse: collapse;
64
+ border-color: inherit;
65
+
66
+ th {
67
+ background-color: #f7f7f7;
68
+ }
69
+ }
70
+
71
+ //暗色样式
72
+ &[dark]{
73
+ background-color: #333;
74
+
75
+ th{
76
+ border-bottom: 1px solid #111;
77
+ background-color: #222;
78
+ color: #eee;
79
+ }
80
+ tbody{
81
+ tr{
82
+ &:nth-child(even){
83
+ background-color: #444;
84
+ }
85
+ &:last-child td{
86
+ border-bottom: 1px solid #eee;
87
+ }
88
+ }
89
+ }
90
+ td {
91
+ color: #999;
92
+ }
93
+ &[border]{
94
+ border-color: #111;
95
+ }
96
+ }
97
+
98
+ //响应式(内容不自动换行,溢出时出现横向滚动条)
99
+ &[response]{
100
+ white-space: nowrap;
101
+ }
102
+
103
+ }
package/sass/text.scss ADDED
@@ -0,0 +1,86 @@
1
+ p{
2
+ margin: 1.4em 0;
3
+
4
+ &:empty {
5
+ height: 1.4em;
6
+ }
7
+ }
8
+
9
+ h1 {
10
+ font-size: 2em;
11
+ }
12
+
13
+ h2 {
14
+ font-size: 1.8em;
15
+ }
16
+
17
+ h3 {
18
+ font-size: 1.6em;
19
+ }
20
+
21
+ h4 {
22
+ font-size: 1.4em;
23
+ }
24
+
25
+ h5 {
26
+ font-size: 1.2em;
27
+ }
28
+
29
+ h6 {
30
+ font-size: 1em;
31
+ }
32
+
33
+ article {
34
+ font-size: 1.2rem;
35
+ line-height: 1.7;
36
+
37
+ //编辑模式
38
+ &[contenteditable]{
39
+ border: none;
40
+ outline: none;
41
+ }
42
+
43
+ h1, h2, h3, h4, h5, h6{
44
+ margin-bottom: 1em;
45
+ }
46
+ ol, ul{
47
+ margin-bottom: 1.4em;
48
+ }
49
+ }
50
+
51
+ i {
52
+ display: inline-block;
53
+ }
54
+
55
+ abbr {
56
+ text-decoration: none;
57
+ }
58
+
59
+ code {
60
+ background-color: #f9f2f4;
61
+ color: #c7254e;
62
+ font-family: Consolas !important;
63
+ padding: 2px 6px;
64
+ margin: 0 2px;
65
+ border-radius: 4px;
66
+ word-break: break-all;
67
+ }
68
+
69
+ .bold {
70
+ font-weight: bold; //文字加粗
71
+ }
72
+
73
+ .no-wrap { //文本禁止换行
74
+ white-space: nowrap;
75
+ }
76
+
77
+ .ellipsis { //文本省略
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ white-space: nowrap;
81
+ }
82
+
83
+ .resize { //字号基准
84
+ font-size: 1rem;
85
+ line-height: 1.5;
86
+ }
@@ -0,0 +1,31 @@
1
+ const path = require("path")
2
+ const ExtractText = require("extract-text-webpack-plugin")
3
+
4
+ module.exports = {
5
+ entry: {
6
+ "btx.webapp": "./src/sass/btx.webapp.scss",
7
+ "btx": "./src/sass/btx.scss",
8
+ "btx.mob": "./src/sass/btx.mob.scss",
9
+ "btx.pad": "./src/sass/btx.pad.scss",
10
+ },
11
+ output: {
12
+ filename: "_main.js",
13
+ path: path.join(__dirname, "../css")
14
+ },
15
+ module: {
16
+ rules: [
17
+ {
18
+ test: /\.scss$/,
19
+ use: ExtractText.extract({
20
+ fallback: "style-loader",
21
+ use: ['css-loader', 'sass-loader']
22
+ })
23
+ }
24
+ ]
25
+ },
26
+ plugins: [
27
+ new ExtractText({
28
+ filename: `[name].min.css`
29
+ })
30
+ ]
31
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ // https://nuxt.com/docs/guide/concepts/typescript
3
+ "extends": "./.nuxt/tsconfig.json"
4
+ }