wd-button.wxss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. /**
  2. * 这里是uni-app内置的常用样式变量
  3. *
  4. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  5. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  6. *
  7. */
  8. /**
  9. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  10. *
  11. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  12. */
  13. /* 颜色变量 */
  14. /* 行为相关颜色 */
  15. /* 文字基本颜色 */
  16. /* 背景颜色 */
  17. /* 边框颜色 */
  18. /* 尺寸变量 */
  19. /* 文字尺寸 */
  20. /* 图片尺寸 */
  21. /* Border Radius */
  22. /* 水平间距 */
  23. /* 垂直间距 */
  24. /* 透明度 */
  25. /* 文章场景相关 */
  26. /**
  27. * 混合宏
  28. */
  29. /**
  30. * SCSS 配置项:命名空间以及BEM
  31. */
  32. /**
  33. * 辅助函数
  34. */
  35. /**
  36. * SCSS 配置项:命名空间以及BEM
  37. */
  38. /* 转换成字符串 */
  39. /* 判断是否存在 Modifier */
  40. /* 判断是否存在伪类 */
  41. /**
  42. * 主题色切换
  43. * @params $theme-color 主题色
  44. * @params $type 变暗’dark‘ 变亮 'light'
  45. * @params $mix-color 自己设置的混色
  46. */
  47. /**
  48. * 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
  49. * @params $open-linear 是否开启线性渐变色
  50. * @params $deg 渐变色角度
  51. * @params $theme-color 当前配色
  52. * @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
  53. * @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
  54. * @params [Array] $per-list 渐变色比例
  55. */
  56. /**
  57. * BEM,定义块(b)
  58. */
  59. /* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
  60. /* 此方法用于生成穿透样式 */
  61. /* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
  62. /* 定义状态(m) */
  63. /* 定义状态(m) */
  64. /* 对于需要需要嵌套在 m 底下的 e,调用这个混合宏,一般在切换整个组件的状态,如切换颜色的时候 */
  65. /* 状态,生成 is-$state 类名 */
  66. /**
  67. * 常用混合宏
  68. */
  69. /* 单行超出隐藏 */
  70. /* 多行超出隐藏 */
  71. /* 清除浮动 */
  72. /* 0.5px 边框 指定方向*/
  73. /* 0.5px 边框 环绕 */
  74. /**
  75. * 三角形实现尖角样式,适用于背景透明情况
  76. * @param $size 三角形高,底边为 $size * 2
  77. * @param $bg 三角形背景颜色
  78. */
  79. /**
  80. * 正方形实现尖角样式,适用于背景不透明情况
  81. * @param $size 正方形边长
  82. * @param $bg 正方形背景颜色
  83. * @param $z-index z-index属性值,不得大于外部包裹器
  84. * @param $box-shadow 阴影
  85. */
  86. /**
  87. * 辅助函数
  88. */
  89. /**
  90. * SCSS 配置项:命名空间以及BEM
  91. */
  92. /* 转换成字符串 */
  93. /* 判断是否存在 Modifier */
  94. /* 判断是否存在伪类 */
  95. /**
  96. * 主题色切换
  97. * @params $theme-color 主题色
  98. * @params $type 变暗’dark‘ 变亮 'light'
  99. * @params $mix-color 自己设置的混色
  100. */
  101. /**
  102. * 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
  103. * @params $open-linear 是否开启线性渐变色
  104. * @params $deg 渐变色角度
  105. * @params $theme-color 当前配色
  106. * @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
  107. * @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
  108. * @params [Array] $per-list 渐变色比例
  109. */
  110. /**
  111. * UI规范基础变量
  112. */
  113. /*----------------------------------------- Theme color. start ----------------------------------------*/
  114. /* 主题颜色 */
  115. /* 辅助色 */
  116. /* 文字颜色(默认浅色背景下 */
  117. /* 暗黑模式 */
  118. /* 图形颜色 */
  119. /*----------------------------------------- Theme color. end -------------------------------------------*/
  120. /*-------------------------------- Theme color application size. start --------------------------------*/
  121. /* 文字字号 */
  122. /* 文字字重 */
  123. /* 尺寸 */
  124. /*-------------------------------- Theme color application size. end --------------------------------*/
  125. /* component var */
  126. /* action-sheet */
  127. /* badge */
  128. /* button */
  129. /* cell */
  130. /* calendar */
  131. /* checkbox */
  132. /* collapse */
  133. /* divider */
  134. /* drop-menu */
  135. /* input-number */
  136. /* input */
  137. /* textarea */
  138. /* loadmore */
  139. /* message-box */
  140. /* notice-bar */
  141. /* pagination */
  142. /* picker */
  143. /* col-picker */
  144. /* overlay */
  145. /* popup */
  146. /* progress */
  147. /* radio */
  148. /* search */
  149. /* slider */
  150. /* sort-button */
  151. /* steps */
  152. /* switch */
  153. /* tabs */
  154. /* tag */
  155. /* toast */
  156. /* loading */
  157. /* tooltip */
  158. /* popover */
  159. /* grid-item */
  160. /* statustip */
  161. /* card */
  162. /* upload */
  163. /* curtain */
  164. /* notify */
  165. /* skeleton */
  166. /* circle */
  167. /* swiper */
  168. /* swiper-nav */
  169. /* segmented */
  170. /* tabbar */
  171. /* tabbar-item */
  172. /* navbar */
  173. /* navbar-capsule */
  174. /* table */
  175. /* sidebar */
  176. /* sidebar-item */
  177. /* fab */
  178. /* count-down */
  179. /* keyboard */
  180. /* number-keyboard */
  181. /* passwod-input */
  182. /* form-item */
  183. /* backtop */
  184. /* index-bar */
  185. /* text */
  186. /* video-preview */
  187. /* img-cropper */
  188. /* floating-panel */
  189. /* signature */
  190. .wot-theme-dark .wd-button.is-info.data-v-aa3a6253 {
  191. background: var(--wot-dark-background4, #323233);
  192. color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
  193. }
  194. .wot-theme-dark .wd-button.is-plain.data-v-aa3a6253 {
  195. background: transparent;
  196. }
  197. .wot-theme-dark .wd-button.is-plain.is-info.data-v-aa3a6253 {
  198. color: var(--wot-dark-color, var(--wot-color-white, rgb(255, 255, 255)));
  199. }
  200. .wot-theme-dark .wd-button.is-plain.is-info.data-v-aa3a6253::after {
  201. border-color: var(--wot-dark-background5, #646566);
  202. }
  203. .wot-theme-dark .wd-button.is-text.is-disabled.data-v-aa3a6253 {
  204. color: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
  205. background: transparent;
  206. }
  207. .wot-theme-dark .wd-button.is-icon.data-v-aa3a6253 {
  208. color: var(--wot-dark-color, var(--wot-color-white, rgb(255, 255, 255)));
  209. }
  210. .wot-theme-dark .wd-button.is-icon.is-disabled.data-v-aa3a6253 {
  211. color: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
  212. background: transparent;
  213. }
  214. .wd-button.data-v-aa3a6253 {
  215. margin-left: initial;
  216. margin-right: initial;
  217. position: relative;
  218. display: inline-block;
  219. outline: none;
  220. -webkit-appearance: none;
  221. outline: none;
  222. background: transparent;
  223. box-sizing: border-box;
  224. border: none;
  225. border-radius: 0;
  226. color: var(--wot-button-normal-color, var(--wot-color-title, var(--wot-color-black, rgb(0, 0, 0))));
  227. transition: opacity 0.2s;
  228. -webkit-user-select: none;
  229. -moz-user-select: none;
  230. user-select: none;
  231. font-weight: normal;
  232. }
  233. .wd-button.data-v-aa3a6253::before {
  234. position: absolute;
  235. top: 50%;
  236. left: 50%;
  237. width: 100%;
  238. height: 100%;
  239. background: var(--wot-color-black, rgb(0, 0, 0));
  240. border: inherit;
  241. border-color: var(--wot-color-black, rgb(0, 0, 0));
  242. border-radius: inherit;
  243. transform: translate(-50%, -50%);
  244. opacity: 0;
  245. content: " ";
  246. }
  247. .wd-button.data-v-aa3a6253::after {
  248. border: none;
  249. border-radius: 0;
  250. }
  251. .wd-button__content.data-v-aa3a6253 {
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. height: 100%;
  256. }
  257. .wd-button--active.data-v-aa3a6253:active::before {
  258. opacity: 0.15;
  259. }
  260. .wd-button.is-disabled.data-v-aa3a6253 {
  261. opacity: var(--wot-button-disabled-opacity, 0.6);
  262. }
  263. .wd-button__loading.data-v-aa3a6253 {
  264. margin-right: 5px;
  265. animation: wd-rotate-aa3a6253 0.8s linear infinite;
  266. animation-duration: 2s;
  267. }
  268. .wd-button__loading-svg.data-v-aa3a6253 {
  269. width: 100%;
  270. height: 100%;
  271. background-size: cover;
  272. background-repeat: no-repeat;
  273. }
  274. .wd-button.is-primary.data-v-aa3a6253 {
  275. background: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
  276. color: var(--wot-button-primary-color, var(--wot-color-white, rgb(255, 255, 255)));
  277. }
  278. .wd-button.is-success.data-v-aa3a6253 {
  279. background: var(--wot-button-success-bg-color, var(--wot-color-success, #34d19d));
  280. color: var(--wot-button-success-color, var(--wot-color-white, rgb(255, 255, 255)));
  281. }
  282. .wd-button.is-info.data-v-aa3a6253 {
  283. background: var(--wot-button-info-bg-color, #f0f0f0);
  284. color: var(--wot-button-info-color, var(--wot-color-title, var(--wot-color-black, rgb(0, 0, 0))));
  285. }
  286. .wd-button.is-warning.data-v-aa3a6253 {
  287. background: var(--wot-button-warning-bg-color, var(--wot-color-warning, #f0883a));
  288. color: var(--wot-button-warning-color, var(--wot-color-white, rgb(255, 255, 255)));
  289. }
  290. .wd-button.is-error.data-v-aa3a6253 {
  291. background: var(--wot-button-error-bg-color, var(--wot-color-danger, #fa4350));
  292. color: var(--wot-button-error-color, var(--wot-color-white, rgb(255, 255, 255)));
  293. }
  294. .wd-button.is-small.data-v-aa3a6253 {
  295. height: var(--wot-button-small-height, 28px);
  296. padding: var(--wot-button-small-padding, 0 12px);
  297. border-radius: var(--wot-button-small-radius, 2px);
  298. font-size: var(--wot-button-small-fs, var(--wot-fs-secondary, 12px));
  299. font-weight: normal;
  300. }
  301. .wd-button.is-small .wd-button__loading.data-v-aa3a6253 {
  302. width: var(--wot-button-small-loading, 14px);
  303. height: var(--wot-button-small-loading, 14px);
  304. }
  305. .wd-button.is-medium.data-v-aa3a6253 {
  306. height: var(--wot-button-medium-height, 36px);
  307. padding: var(--wot-button-medium-padding, 0 16px);
  308. border-radius: var(--wot-button-medium-radius, 4px);
  309. font-size: var(--wot-button-medium-fs, var(--wot-fs-content, 14px));
  310. min-width: 120px;
  311. }
  312. .wd-button.is-medium.is-round.is-icon.data-v-aa3a6253 {
  313. min-width: 0;
  314. border-radius: 50%;
  315. }
  316. .wd-button.is-medium.is-round.is-text.data-v-aa3a6253 {
  317. border-radius: 0;
  318. min-width: 0;
  319. }
  320. .wd-button.is-medium .wd-button__loading.data-v-aa3a6253 {
  321. width: var(--wot-button-medium-loading, 18px);
  322. height: var(--wot-button-medium-loading, 18px);
  323. }
  324. .wd-button.is-large.data-v-aa3a6253 {
  325. height: var(--wot-button-large-height, 44px);
  326. padding: var(--wot-button-large-padding, 0 36px);
  327. border-radius: var(--wot-button-large-radius, 8px);
  328. font-size: var(--wot-button-large-fs, var(--wot-fs-title, 16px));
  329. }
  330. .wd-button.is-large.data-v-aa3a6253::after {
  331. border-radius: var(--wot-button-large-radius, 8px);
  332. }
  333. .wd-button.is-large .wd-button__loading.data-v-aa3a6253 {
  334. width: var(--wot-button-large-loading, 24px);
  335. height: var(--wot-button-large-loading, 24px);
  336. }
  337. .wd-button.is-round.data-v-aa3a6253 {
  338. border-radius: 999px;
  339. }
  340. .wd-button.is-text.data-v-aa3a6253 {
  341. color: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
  342. min-width: 0;
  343. padding: 4px 0;
  344. }
  345. .wd-button.is-text.data-v-aa3a6253::after {
  346. display: none;
  347. }
  348. .wd-button.is-text.wd-button--active.data-v-aa3a6253 {
  349. opacity: var(--wot-button-text-hover-opacity, 0.7);
  350. }
  351. .wd-button.is-text.wd-button--active.data-v-aa3a6253:active::before {
  352. display: none;
  353. }
  354. .wd-button.is-text.is-disabled.data-v-aa3a6253 {
  355. color: var(--wot-button-normal-disabled-color, rgba(0, 0, 0, 0.25));
  356. background: transparent;
  357. }
  358. .wd-button.is-plain.data-v-aa3a6253 {
  359. background: var(--wot-button-plain-bg-color, var(--wot-color-white, rgb(255, 255, 255)));
  360. border: 1px solid currentColor;
  361. }
  362. .wd-button.is-plain.is-primary.data-v-aa3a6253 {
  363. color: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
  364. }
  365. .wd-button.is-plain.is-success.data-v-aa3a6253 {
  366. color: var(--wot-button-success-bg-color, var(--wot-color-success, #34d19d));
  367. }
  368. .wd-button.is-plain.is-info.data-v-aa3a6253 {
  369. color: var(--wot-button-info-plain-normal-color, rgba(0, 0, 0, 0.85));
  370. border-color: var(--wot-button-info-plain-border-color, rgba(0, 0, 0, 0.45));
  371. }
  372. .wd-button.is-plain.is-warning.data-v-aa3a6253 {
  373. color: var(--wot-button-warning-bg-color, var(--wot-color-warning, #f0883a));
  374. }
  375. .wd-button.is-plain.is-error.data-v-aa3a6253 {
  376. color: var(--wot-button-error-bg-color, var(--wot-color-danger, #fa4350));
  377. }
  378. .wd-button.is-hairline.data-v-aa3a6253 {
  379. border-width: 0;
  380. }
  381. .wd-button.is-hairline.is-plain.data-v-aa3a6253 {
  382. position: relative;
  383. }
  384. .wd-button.is-hairline.is-plain.data-v-aa3a6253::after {
  385. position: absolute;
  386. display: block;
  387. content: " ";
  388. pointer-events: none;
  389. width: 200%;
  390. height: 200%;
  391. left: 0;
  392. top: 0;
  393. border: 1px solid var(--wot-color-border-light, #e8e8e8);
  394. transform: scale(0.5);
  395. box-sizing: border-box;
  396. transform-origin: left top;
  397. }
  398. .wd-button.is-hairline.is-plain.data-v-aa3a6253::before {
  399. border-radius: inherit;
  400. }
  401. .wd-button.is-hairline.is-plain.data-v-aa3a6253::after {
  402. border-color: inherit;
  403. }
  404. .wd-button.is-hairline.is-plain.is-round.data-v-aa3a6253::after {
  405. border-radius: inherit !important;
  406. }
  407. .wd-button.is-hairline.is-plain.is-large.data-v-aa3a6253::after {
  408. border-radius: calc(2 * var(--wot-button-large-radius, 8px));
  409. }
  410. .wd-button.is-hairline.is-plain.is-medium.data-v-aa3a6253::after {
  411. border-radius: calc(2 * var(--wot-button-medium-radius, 4px));
  412. }
  413. .wd-button.is-hairline.is-plain.is-small.data-v-aa3a6253::after {
  414. border-radius: calc(2 * var(--wot-button-small-radius, 2px));
  415. }
  416. .wd-button.is-block.data-v-aa3a6253 {
  417. display: block;
  418. }
  419. .wd-button.is-icon.data-v-aa3a6253 {
  420. width: var(--wot-button-icon-size, 40px);
  421. height: var(--wot-button-icon-size, 40px);
  422. padding: 0;
  423. border-radius: 50%;
  424. color: var(--wot-button-icon-color, rgba(0, 0, 0, 0.65));
  425. }
  426. .wd-button.is-icon.data-v-aa3a6253::after {
  427. display: none;
  428. }
  429. .wd-button.is-icon.data-v-aa3a6253 .wd-button__icon {
  430. margin-right: 0;
  431. }
  432. .wd-button.is-icon.is-disabled.data-v-aa3a6253 {
  433. color: var(--wot-button-icon-disabled-color, var(--wot-color-icon-disabled, #a7a7a7));
  434. background: transparent;
  435. }
  436. .data-v-aa3a6253 .wd-button__icon {
  437. display: block;
  438. margin-right: 6px;
  439. font-size: var(--wot-button-icon-fs, 1.18em);
  440. vertical-align: middle;
  441. }
  442. .wd-button__text.data-v-aa3a6253 {
  443. -webkit-user-select: none;
  444. -moz-user-select: none;
  445. user-select: none;
  446. white-space: nowrap;
  447. }
  448. @keyframes wd-rotate-aa3a6253 {
  449. from {
  450. transform: rotate(0deg);
  451. }
  452. to {
  453. transform: rotate(360deg);
  454. }
  455. }