persagy-vant 0.0.24 → 0.0.26

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 (361) hide show
  1. package/es/action-sheet/index.css +1 -1
  2. package/es/action-sheet/index.d.ts +0 -63
  3. package/es/action-sheet/index.less +0 -96
  4. package/es/action-sheet/index.mjs +0 -3
  5. package/es/action-sheet/style/index.mjs +0 -8
  6. package/es/action-sheet/style/less.mjs +0 -8
  7. package/es/background/Background.d.ts +23 -0
  8. package/es/background/Background.mjs +23 -0
  9. package/es/background/assets/background-default.png +0 -0
  10. package/es/background/assets/background-light.png +0 -0
  11. package/es/background/assets/background-style-1.png +0 -0
  12. package/es/background/assets/background-style-2.png +0 -0
  13. package/es/background/assets/background-style-3.png +0 -0
  14. package/es/background/index.css +1 -0
  15. package/es/background/index.d.ts +21 -0
  16. package/es/background/index.less +51 -0
  17. package/es/background/index.mjs +8 -0
  18. package/es/background/style/index.d.ts +1 -0
  19. package/es/background/style/index.mjs +2 -0
  20. package/es/background/style/less.d.ts +1 -0
  21. package/es/background/style/less.mjs +2 -0
  22. package/es/background/types.d.ts +1 -0
  23. package/es/background/types.mjs +0 -0
  24. package/es/background/var.css +0 -0
  25. package/es/background/var.less +6 -0
  26. package/es/cascader/style/index.mjs +0 -8
  27. package/es/cascader/style/less.mjs +0 -8
  28. package/es/{action-sheet/ActionSheetPanel.d.ts → checkbox-panel/CheckboxPanel.d.ts} +11 -26
  29. package/es/checkbox-panel/CheckboxPanel.mjs +100 -0
  30. package/es/checkbox-panel/index.css +1 -0
  31. package/es/checkbox-panel/index.d.ts +58 -0
  32. package/es/checkbox-panel/index.less +26 -0
  33. package/es/checkbox-panel/index.mjs +8 -0
  34. package/es/checkbox-panel/style/index.d.ts +1 -0
  35. package/es/checkbox-panel/style/index.mjs +16 -0
  36. package/es/checkbox-panel/style/less.d.ts +1 -0
  37. package/es/checkbox-panel/style/less.mjs +16 -0
  38. package/es/coupon-list/style/index.mjs +1 -3
  39. package/es/coupon-list/style/less.mjs +1 -3
  40. package/es/datetime-picker/DatetimePicker.mjs +1 -3
  41. package/es/empty/Empty.mjs +6 -274
  42. package/es/empty/assets/default.png +0 -0
  43. package/es/empty/assets/network.png +0 -0
  44. package/es/empty/index.css +1 -1
  45. package/es/empty/index.less +19 -1
  46. package/es/empty/var.less +6 -5
  47. package/es/field/Field.d.ts +17 -4
  48. package/es/field/Field.mjs +1 -1
  49. package/es/field/index.css +1 -1
  50. package/es/field/index.d.ts +9 -2
  51. package/es/field/var.less +1 -1
  52. package/es/filter-tag/FilterTag.d.ts +14 -0
  53. package/es/filter-tag/FilterTag.mjs +6 -1
  54. package/es/filter-tag/index.css +1 -1
  55. package/es/filter-tag/index.d.ts +10 -1
  56. package/es/filter-tag/index.less +16 -0
  57. package/es/filter-tag/var.less +5 -0
  58. package/es/floor-select/FloorSelect.d.ts +38 -0
  59. package/es/floor-select/FloorSelect.mjs +237 -0
  60. package/es/floor-select/index.css +1 -0
  61. package/es/floor-select/index.d.ts +32 -0
  62. package/es/floor-select/index.less +58 -0
  63. package/es/floor-select/index.mjs +8 -0
  64. package/es/floor-select/style/index.d.ts +1 -0
  65. package/es/floor-select/style/index.mjs +20 -0
  66. package/es/floor-select/style/less.d.ts +1 -0
  67. package/es/floor-select/style/less.mjs +20 -0
  68. package/es/floor-select/types.d.ts +18 -0
  69. package/es/floor-select/types.mjs +0 -0
  70. package/es/form-panel/FormPanel.d.ts +32 -0
  71. package/es/form-panel/FormPanel.mjs +64 -0
  72. package/es/form-panel/index.css +1 -0
  73. package/es/form-panel/index.d.ts +28 -0
  74. package/es/form-panel/index.less +95 -0
  75. package/es/form-panel/index.mjs +8 -0
  76. package/es/form-panel/style/index.d.ts +1 -0
  77. package/es/form-panel/style/index.mjs +11 -0
  78. package/es/form-panel/style/less.d.ts +1 -0
  79. package/es/form-panel/style/less.mjs +11 -0
  80. package/es/friendly-tip/FriendlyTip.d.ts +86 -0
  81. package/es/friendly-tip/FriendlyTip.mjs +60 -0
  82. package/es/friendly-tip/index.css +1 -0
  83. package/es/friendly-tip/index.d.ts +64 -0
  84. package/es/friendly-tip/index.less +48 -0
  85. package/es/friendly-tip/index.mjs +8 -0
  86. package/es/friendly-tip/style/index.d.ts +1 -0
  87. package/es/friendly-tip/style/index.mjs +7 -0
  88. package/es/friendly-tip/style/less.d.ts +1 -0
  89. package/es/friendly-tip/style/less.mjs +7 -0
  90. package/es/friendly-tip/var.css +0 -0
  91. package/es/friendly-tip/var.less +10 -0
  92. package/es/index.d.ts +8 -1
  93. package/es/index.mjs +22 -1
  94. package/es/location-select/style/index.mjs +1 -1
  95. package/es/location-select/style/less.mjs +1 -1
  96. package/es/material-add/MaterialAdd.d.ts +14 -1
  97. package/es/material-add/MaterialAdd.mjs +98 -50
  98. package/es/material-add/index.d.ts +10 -1
  99. package/es/material-add/style/index.mjs +1 -1
  100. package/es/material-add/style/less.mjs +1 -1
  101. package/es/material-add/types.d.ts +9 -0
  102. package/es/multi-person-select/MultiPersonSelect.d.ts +1 -1
  103. package/es/multi-person-select/index.d.ts +1 -1
  104. package/es/multi-person-select/style/index.mjs +1 -1
  105. package/es/multi-person-select/style/less.mjs +1 -1
  106. package/es/notify/index.css +1 -1
  107. package/es/notify/index.less +10 -0
  108. package/es/notify/var.less +3 -0
  109. package/es/object-select/style/index.mjs +1 -1
  110. package/es/object-select/style/less.mjs +1 -1
  111. package/es/popover/Popover.mjs +5 -4
  112. package/es/popover/index.css +1 -1
  113. package/es/popover/index.less +12 -5
  114. package/es/popover/var.less +1 -1
  115. package/es/quantity-input/QuantityInput.d.ts +1 -1
  116. package/es/quantity-input/index.d.ts +2 -2
  117. package/es/radio-panel/RadioPanel.d.ts +41 -0
  118. package/es/radio-panel/RadioPanel.mjs +83 -0
  119. package/es/radio-panel/index.css +1 -0
  120. package/es/radio-panel/index.d.ts +31 -0
  121. package/es/radio-panel/index.less +26 -0
  122. package/es/radio-panel/index.mjs +8 -0
  123. package/es/radio-panel/style/index.d.ts +1 -0
  124. package/es/radio-panel/style/index.mjs +15 -0
  125. package/es/radio-panel/style/less.d.ts +1 -0
  126. package/es/radio-panel/style/less.mjs +15 -0
  127. package/es/rate/Rate.d.ts +1 -1
  128. package/es/rate/Rate.mjs +2 -1
  129. package/es/rate/RateCell.d.ts +196 -0
  130. package/es/rate/RateCell.mjs +60 -0
  131. package/es/rate/index.css +1 -1
  132. package/es/rate/index.d.ts +136 -0
  133. package/es/rate/index.less +35 -0
  134. package/es/rate/index.mjs +8 -0
  135. package/es/rate/style/index.mjs +5 -0
  136. package/es/rate/style/less.mjs +5 -0
  137. package/es/rate/var.less +1 -1
  138. package/es/search/Search.d.ts +13 -3
  139. package/es/search/index.d.ts +9 -2
  140. package/es/sidebar-item/SidebarItem.mjs +1 -2
  141. package/es/single-person-select/style/index.mjs +1 -2
  142. package/es/single-person-select/style/less.mjs +1 -2
  143. package/es/style/base.css +1 -1
  144. package/es/style/css-variables.css +1 -1
  145. package/es/style/css-variables.less +10 -0
  146. package/es/tab/style/index.mjs +0 -8
  147. package/es/tab/style/less.mjs +0 -8
  148. package/es/tabbar/index.css +1 -1
  149. package/es/tabbar/var.less +1 -1
  150. package/es/tabs/Tabs.mjs +5 -1
  151. package/es/tabs/index.css +1 -1
  152. package/es/tabs/index.less +4 -0
  153. package/es/tabs/style/index.mjs +0 -8
  154. package/es/tabs/style/less.mjs +0 -8
  155. package/es/tag/Tag.d.ts +13 -3
  156. package/es/tag/Tag.mjs +1 -1
  157. package/es/tag/index.d.ts +9 -2
  158. package/es/work-order-card/WorkOrderCard.d.ts +145 -0
  159. package/es/work-order-card/WorkOrderCard.mjs +121 -0
  160. package/es/work-order-card/index.css +1 -0
  161. package/es/work-order-card/index.d.ts +107 -0
  162. package/es/work-order-card/index.less +34 -0
  163. package/es/work-order-card/index.mjs +8 -0
  164. package/es/work-order-card/style/index.d.ts +1 -0
  165. package/es/work-order-card/style/index.mjs +8 -0
  166. package/es/work-order-card/style/less.d.ts +1 -0
  167. package/es/work-order-card/style/less.mjs +8 -0
  168. package/es/work-order-card/types.d.ts +16 -0
  169. package/es/work-order-card/types.mjs +0 -0
  170. package/es/work-order-card/var.css +0 -0
  171. package/es/work-order-card/var.less +6 -0
  172. package/es/work-order-filter/style/index.mjs +1 -1
  173. package/es/work-order-filter/style/less.mjs +1 -1
  174. package/lib/action-sheet/index.css +1 -1
  175. package/lib/action-sheet/index.d.ts +0 -63
  176. package/lib/action-sheet/index.js +0 -3
  177. package/lib/action-sheet/index.less +0 -96
  178. package/lib/action-sheet/style/index.js +0 -8
  179. package/lib/action-sheet/style/less.js +0 -8
  180. package/lib/background/Background.d.ts +23 -0
  181. package/lib/background/Background.js +42 -0
  182. package/lib/background/assets/background-default.png +0 -0
  183. package/lib/background/assets/background-light.png +0 -0
  184. package/lib/background/assets/background-style-1.png +0 -0
  185. package/lib/background/assets/background-style-2.png +0 -0
  186. package/lib/background/assets/background-style-3.png +0 -0
  187. package/lib/background/index.css +1 -0
  188. package/lib/background/index.d.ts +21 -0
  189. package/lib/background/index.js +37 -0
  190. package/lib/background/index.less +51 -0
  191. package/lib/background/style/index.d.ts +1 -0
  192. package/lib/background/style/index.js +2 -0
  193. package/lib/background/style/less.d.ts +1 -0
  194. package/lib/background/style/less.js +2 -0
  195. package/lib/background/types.d.ts +1 -0
  196. package/lib/background/types.js +15 -0
  197. package/lib/background/var.css +0 -0
  198. package/lib/background/var.less +6 -0
  199. package/lib/cascader/style/index.js +0 -8
  200. package/lib/cascader/style/less.js +0 -8
  201. package/lib/{action-sheet/ActionSheetPanel.d.ts → checkbox-panel/CheckboxPanel.d.ts} +11 -26
  202. package/lib/checkbox-panel/CheckboxPanel.js +119 -0
  203. package/lib/checkbox-panel/index.css +1 -0
  204. package/lib/checkbox-panel/index.d.ts +58 -0
  205. package/lib/checkbox-panel/index.js +37 -0
  206. package/lib/checkbox-panel/index.less +26 -0
  207. package/lib/checkbox-panel/style/index.d.ts +1 -0
  208. package/lib/checkbox-panel/style/index.js +16 -0
  209. package/lib/checkbox-panel/style/less.d.ts +1 -0
  210. package/lib/checkbox-panel/style/less.js +16 -0
  211. package/lib/coupon-list/style/index.js +1 -3
  212. package/lib/coupon-list/style/less.js +1 -3
  213. package/lib/datetime-picker/DatetimePicker.js +1 -3
  214. package/lib/empty/Empty.js +6 -274
  215. package/lib/empty/assets/default.png +0 -0
  216. package/lib/empty/assets/network.png +0 -0
  217. package/lib/empty/index.css +1 -1
  218. package/lib/empty/index.less +19 -1
  219. package/lib/empty/var.less +6 -5
  220. package/lib/field/Field.d.ts +17 -4
  221. package/lib/field/Field.js +1 -1
  222. package/lib/field/index.css +1 -1
  223. package/lib/field/index.d.ts +9 -2
  224. package/lib/field/var.less +1 -1
  225. package/lib/filter-tag/FilterTag.d.ts +14 -0
  226. package/lib/filter-tag/FilterTag.js +6 -1
  227. package/lib/filter-tag/index.css +1 -1
  228. package/lib/filter-tag/index.d.ts +10 -1
  229. package/lib/filter-tag/index.less +16 -0
  230. package/lib/filter-tag/var.less +5 -0
  231. package/lib/floor-select/FloorSelect.d.ts +38 -0
  232. package/lib/floor-select/FloorSelect.js +256 -0
  233. package/lib/floor-select/index.css +1 -0
  234. package/lib/floor-select/index.d.ts +32 -0
  235. package/lib/floor-select/index.js +37 -0
  236. package/lib/floor-select/index.less +58 -0
  237. package/lib/floor-select/style/index.d.ts +1 -0
  238. package/lib/floor-select/style/index.js +20 -0
  239. package/lib/floor-select/style/less.d.ts +1 -0
  240. package/lib/floor-select/style/less.js +20 -0
  241. package/lib/floor-select/types.d.ts +18 -0
  242. package/lib/floor-select/types.js +15 -0
  243. package/lib/form-panel/FormPanel.d.ts +32 -0
  244. package/lib/form-panel/FormPanel.js +83 -0
  245. package/lib/form-panel/index.css +1 -0
  246. package/lib/form-panel/index.d.ts +28 -0
  247. package/lib/form-panel/index.js +37 -0
  248. package/lib/form-panel/index.less +95 -0
  249. package/lib/form-panel/style/index.d.ts +1 -0
  250. package/lib/form-panel/style/index.js +11 -0
  251. package/lib/form-panel/style/less.d.ts +1 -0
  252. package/lib/form-panel/style/less.js +11 -0
  253. package/lib/friendly-tip/FriendlyTip.d.ts +86 -0
  254. package/lib/friendly-tip/FriendlyTip.js +79 -0
  255. package/lib/friendly-tip/index.css +1 -0
  256. package/lib/friendly-tip/index.d.ts +64 -0
  257. package/lib/friendly-tip/index.js +37 -0
  258. package/lib/friendly-tip/index.less +48 -0
  259. package/lib/friendly-tip/style/index.d.ts +1 -0
  260. package/lib/friendly-tip/style/index.js +7 -0
  261. package/lib/friendly-tip/style/less.d.ts +1 -0
  262. package/lib/friendly-tip/style/less.js +7 -0
  263. package/lib/friendly-tip/var.css +0 -0
  264. package/lib/friendly-tip/var.less +10 -0
  265. package/lib/index.css +1 -1
  266. package/lib/index.d.ts +8 -1
  267. package/lib/index.js +22 -1
  268. package/lib/index.less +16 -9
  269. package/lib/location-select/style/index.js +1 -1
  270. package/lib/location-select/style/less.js +1 -1
  271. package/lib/material-add/MaterialAdd.d.ts +14 -1
  272. package/lib/material-add/MaterialAdd.js +98 -50
  273. package/lib/material-add/index.d.ts +10 -1
  274. package/lib/material-add/style/index.js +1 -1
  275. package/lib/material-add/style/less.js +1 -1
  276. package/lib/material-add/types.d.ts +9 -0
  277. package/lib/multi-person-select/MultiPersonSelect.d.ts +1 -1
  278. package/lib/multi-person-select/index.d.ts +1 -1
  279. package/lib/multi-person-select/style/index.js +1 -1
  280. package/lib/multi-person-select/style/less.js +1 -1
  281. package/lib/notify/index.css +1 -1
  282. package/lib/notify/index.less +10 -0
  283. package/lib/notify/var.less +3 -0
  284. package/lib/object-select/style/index.js +1 -1
  285. package/lib/object-select/style/less.js +1 -1
  286. package/lib/popover/Popover.js +5 -4
  287. package/lib/popover/index.css +1 -1
  288. package/lib/popover/index.less +12 -5
  289. package/lib/popover/var.less +1 -1
  290. package/lib/quantity-input/QuantityInput.d.ts +1 -1
  291. package/lib/quantity-input/index.d.ts +2 -2
  292. package/lib/radio-panel/RadioPanel.d.ts +41 -0
  293. package/lib/radio-panel/RadioPanel.js +102 -0
  294. package/lib/radio-panel/index.css +1 -0
  295. package/lib/radio-panel/index.d.ts +31 -0
  296. package/lib/radio-panel/index.js +37 -0
  297. package/lib/radio-panel/index.less +26 -0
  298. package/lib/radio-panel/style/index.d.ts +1 -0
  299. package/lib/radio-panel/style/index.js +15 -0
  300. package/lib/radio-panel/style/less.d.ts +1 -0
  301. package/lib/radio-panel/style/less.js +15 -0
  302. package/lib/rate/Rate.d.ts +1 -1
  303. package/lib/rate/Rate.js +2 -1
  304. package/lib/rate/RateCell.d.ts +196 -0
  305. package/lib/rate/RateCell.js +89 -0
  306. package/lib/rate/index.css +1 -1
  307. package/lib/rate/index.d.ts +136 -0
  308. package/lib/rate/index.js +8 -0
  309. package/lib/rate/index.less +35 -0
  310. package/lib/rate/style/index.js +5 -0
  311. package/lib/rate/style/less.js +5 -0
  312. package/lib/rate/var.less +1 -1
  313. package/lib/search/Search.d.ts +13 -3
  314. package/lib/search/index.d.ts +9 -2
  315. package/lib/sidebar-item/SidebarItem.js +1 -2
  316. package/lib/single-person-select/style/index.js +1 -2
  317. package/lib/single-person-select/style/less.js +1 -2
  318. package/lib/style/base.css +1 -1
  319. package/lib/style/css-variables.css +1 -1
  320. package/lib/style/css-variables.less +10 -0
  321. package/lib/tab/style/index.js +0 -8
  322. package/lib/tab/style/less.js +0 -8
  323. package/lib/tabbar/index.css +1 -1
  324. package/lib/tabbar/var.less +1 -1
  325. package/lib/tabs/Tabs.js +5 -1
  326. package/lib/tabs/index.css +1 -1
  327. package/lib/tabs/index.less +4 -0
  328. package/lib/tabs/style/index.js +0 -8
  329. package/lib/tabs/style/less.js +0 -8
  330. package/lib/tag/Tag.d.ts +13 -3
  331. package/lib/tag/Tag.js +1 -1
  332. package/lib/tag/index.d.ts +9 -2
  333. package/lib/vant.cjs.js +3497 -3138
  334. package/lib/vant.es.js +3498 -3139
  335. package/lib/vant.js +5700 -5341
  336. package/lib/vant.min.js +1 -1
  337. package/lib/web-types.json +1 -1
  338. package/lib/work-order-card/WorkOrderCard.d.ts +145 -0
  339. package/lib/work-order-card/WorkOrderCard.js +140 -0
  340. package/lib/work-order-card/index.css +1 -0
  341. package/lib/work-order-card/index.d.ts +107 -0
  342. package/lib/work-order-card/index.js +37 -0
  343. package/lib/work-order-card/index.less +34 -0
  344. package/lib/work-order-card/style/index.d.ts +1 -0
  345. package/lib/work-order-card/style/index.js +8 -0
  346. package/lib/work-order-card/style/less.d.ts +1 -0
  347. package/lib/work-order-card/style/less.js +8 -0
  348. package/lib/work-order-card/types.d.ts +16 -0
  349. package/lib/work-order-card/types.js +15 -0
  350. package/lib/work-order-card/var.css +0 -0
  351. package/lib/work-order-card/var.less +6 -0
  352. package/lib/work-order-filter/style/index.js +1 -1
  353. package/lib/work-order-filter/style/less.js +1 -1
  354. package/package.json +2 -2
  355. package/skills/use-persagy-vant/SKILL.md +8 -7
  356. package/skills/use-persagy-vant/references/business-component-catalog.md +5 -0
  357. package/skills/use-persagy-vant/references/component-catalog.md +7 -4
  358. package/skills/use-persagy-vant/references/design-interaction-baseline.md +71 -0
  359. package/skills/use-persagy-vant/references/page-recipes.md +22 -5
  360. package/es/action-sheet/ActionSheetPanel.mjs +0 -145
  361. package/lib/action-sheet/ActionSheetPanel.js +0 -174
@@ -4,23 +4,25 @@
4
4
 
5
5
  ## 页面骨架与状态
6
6
 
7
- - `nav-bar`、`tabbar`、`tab`、`tabs`、`sidebar`:页面与分区导航。
7
+ - `background`:带主题背景的页面内容容器;普通页面仍以 `--van-gray-1` 为默认背景,只有设计明确要求时才选择内置主题或自定义背景图。
8
+ - `nav-bar`、`tabbar`、`tab`、`tabs`、`sidebar`:页面与分区导航。标签较多时优先使用 `tabs` 的滚动或更多面板能力;筛选型分区选择 `type="filter"`。
8
9
  - `cell`、`cell-group`、`row`、`col`、`space`、`divider`:信息布局与分组。
9
10
  - `empty`、`loading`、`skeleton`、`overlay`、`pull-refresh`、`list`、`pagination`:加载、空态、刷新与列表分页。
10
11
  - `bottom-action-bar`、`action-bar`、`submit-bar`:固定操作区;不要自行实现 fixed footer。
11
12
 
12
13
  ## 表单与通用选择
13
14
 
14
- - `form`、`field`:表单结构、校验、输入与只读选择入口。
15
+ - `form-panel` + `form` + `field`:多字段编辑的表单面板、校验、输入与只读选择入口;不要将同一编辑任务拆为零散弹层。
15
16
  - `checkbox`、`radio`、`switch`、`stepper`、`rate`、`slider`:布尔、单选、多选与数值录入。
16
17
  - `picker`、`datetime-picker`、`calendar`、`area`、`cascader`、`tree-select`:普通选项、日期、地区、级联与树形数据选择。
17
- - `search`、`filter-tag`、`dropdown-menu`、`dropdown-item`:搜索与轻量筛选。
18
+ - `search`、`filter-tag`、`dropdown-menu`、`dropdown-item`:搜索与轻量筛选;短选项的外露筛选优先使用 `filter-tag`,需要更大触达面积时选其大尺寸规格。
18
19
 
19
20
  ## 内容与反馈
20
21
 
21
22
  - `card`、`tag`、`badge`、`notice-bar`、`image`、`icon`:内容展示与状态标识。
22
23
  - `popup`、`action-sheet`、`share-sheet`、`popover`:动作选择与自定义容器。
23
- - `dialog`、`toast`、`notify`:确认、短反馈与通知;不得重复封装确认弹窗或全局提示。
24
+ - `dialog`、`toast`、`notify`:确认、短反馈与顶部通知;不得重复封装确认弹窗或全局提示。
25
+ - `friendly-tip`、`popover`:基于触发元素的引导说明和轻量操作菜单。一次性友好引导使用 `friendly-tip`,点击空白处关闭;不要手写定位气泡。
24
26
  - `swipe`、`swipe-item`、`swipe-cell`、`collapse`、`grid`、`index-bar`:浏览、滑动操作、折叠和网格内容。
25
27
 
26
28
  ## 选型规则
@@ -29,3 +31,4 @@
29
31
  - 可分页的业务列表:组合 `list`、`pull-refresh`、`empty`、`loading`,不要手写重复加载状态。
30
32
  - 选择入口默认使用 `field` 或 `cell`,具体选择面板优先从 `business-component-catalog.md` 选择。
31
33
  - 页面有主操作时优先使用 `bottom-action-bar`;在表单提交语义明确时使用 `submit-bar`。
34
+ - 非破坏性的局部快捷操作使用 `popover`;会影响全局数据或需要确认的操作不使用气泡菜单。
@@ -0,0 +1,71 @@
1
+ # 设计与交互基线
2
+
3
+ 除非产品需求、页面原型或组件自身能力明确要求不同,否则页面必须遵循本基线。优先使用 Persagy Vant 已提供的能力;组件不支持时,只能在页面层实现,不得复制或改造组件内部实现。页面层级、面板深度和组件变量均以目标组件 README 与 demo 为准。
4
+
5
+ ## 页面结构与导航
6
+
7
+ - 应用外页面层级不超过 `5` 级;动态面板嵌套不超过 `2` 层。复杂且相对独立的功能使用独立页面;需要即时录入、查看或回显当前页面数据的轻量任务使用动态面板。
8
+ - 普通下钻页面进入和返回使用左右转场;从左上角关闭的页面优先使用上下转场;展开与收起提供缓动效果。优先复用组件内置动效。
9
+ - 带返回箭头的页面支持从左侧边缘左滑返回;仅在宿主框架支持时启用,不得以页面 CSS 模拟系统手势。
10
+
11
+ ## 布局与视觉
12
+
13
+ - 普通页面背景使用 `--van-gray-1`;信息展示和录入控件以白色卡片承载。
14
+ - 卡片内容与页面左右边缘保持 `16px` 间距;卡片之间间距 `8px`。
15
+ - 模块之间、控件之间使用 `8px` 或 `12px` 间距;仅左右排布的两组字段,纵向间距不得小于 `8px`。
16
+ - 文本按内容与可读性选择换行;超出两行时省略。字段无数据时整项隐藏,不展示空占位字段。
17
+ - 触发器没有内置按压态时,叠加 `5%` 黑色透明遮罩作为按压反馈;有内置按压态的组件不重复添加。
18
+ - 字体跟随设备系统字体。常规层级使用:一级标题 `16px` 加粗、二级标题与正文 `14px`、补充说明 `12px`、底部菜单最小 `10px`;有明确业务需要时可调整。
19
+ - 信息层级最多使用四级:一级标题优先采用 `blue-mark`,二级使用灰底加粗文本,三级使用白底加粗文本,四级使用弱化的卡片内容;特殊业务可按组件文档调整。
20
+ - `blue-mark` 用作一级标题时优先选 `16px` 规格,作为二级分类时可选 `14px` 规格;与下方内容左对齐,长文本允许换行或省略,换行时顶部对齐。
21
+ - 即时反馈控件(如开关、单选、多选、滚轮、滑块)可不额外设置按压态;所有其他可点击文本和自定义触发器必须提供按压态。
22
+ - 触控热区最小为 `24 × 24px`;视觉元素不足时用透明容器扩大热区,并在受限空间内尽量增大可点范围。
23
+
24
+ ## 输入、上传与时间
25
+
26
+ - 文本域最大输入 `200` 字,并在输入阶段限制或阻止超出内容。
27
+ - 图片/视频上传最多 `9` 个。已达上限再次触发上传时,提示“最多支持上传9个”。
28
+ - 时间选择器默认定位到当前时间;需要时间节点时精确到秒。
29
+ - 涉及多个字段的编辑时,使用 `form` 承载于表单面板中完成;不得将同一编辑任务拆散到多个零散入口。
30
+ - 选项不超过 `3` 个且文案短时可外露单选;其他单选使用单选面板。多选枚举选项超过 `6` 个时,优先选用组件库提供的底部多选快捷操作能力。
31
+ - 必填或流程起点的输入框、搜索框可在进入页面时自动聚焦并唤起键盘;键盘主操作键应能直接触发后续搜索或保存。连续输入框支持键盘切换至下一项。
32
+
33
+ ## 全局操作
34
+
35
+ - 作用于当前页面或当前数据集的操作统一集成到 `bottom-action-bar`。
36
+ - 根据操作数量选择组件文档中对应的操作栏变量、布局或溢出方案;先阅读 `bottom-action-bar` 的 README 和 demo,不得臆造变量或布局规则。
37
+ - 局部内容操作仍放置在其所属内容附近,不强行放入底部操作栏。
38
+
39
+ ## 搜索、列表与加载
40
+
41
+ - 点击搜索入口后自动聚焦并唤起键盘;非业务必需时,在搜索态提供取消操作。键盘唤起后内容区不保留无关内容。
42
+ - 列表使用 `pull-refresh` 处理下拉刷新,使用 `list` 处理滚动加载;无更多数据时展示明确的结束提示。
43
+ - 请求超过 `500ms` 时展示加载反馈:局部请求使用 `loading` 或 `skeleton`,全局请求使用全局加载状态。
44
+
45
+ ## 页面状态与信息反馈
46
+
47
+ - 页面初始化展示加载状态;加载完成无数据时展示空状态页面。
48
+ - 操作成功或失败均提供全局反馈;重要或高风险信息使用 `dialog`、`notice-bar` 等强提醒样式。
49
+ - 所有不可用操作都必须可被点击或聚焦后说明具体不可用原因,提示文案为“`<具体原因>`”,不得只展示禁用态而无解释。
50
+ - 友好提示仅展示一次,点击空白区域后消失。
51
+ - 折叠/展开内容默认展开第一组数据。
52
+ - 保存筛选条件后,筛选对应数据并提示“保存成功”;筛选图标右上角显示徽标标记。
53
+ - 重要文本优先完整换行;采用省略时,提供下钻、展开、气泡或全局提示等方式查看完整内容。长度不稳定的内容可在最大高度后提供“展开”入口。
54
+
55
+ ## 提交校验
56
+
57
+ - 底部主操作触发时先执行必填校验:存在未填必填项时提示“必填项未填写”。
58
+ - 名称或其他定义为唯一的内容重复时提示“内容已重复”。
59
+ - 提交成功时提示“提交成功”,并防止重复提交直至请求完成。
60
+
61
+ ## 交付前自查
62
+
63
+ ```md
64
+ ## 规范落实项
65
+ - 布局与文本:<背景、卡片间距、文本溢出和空字段处理方式>
66
+ - 页面结构与触达:<页面/面板层级、导航动效、热区、信息层级;不涉及则说明>
67
+ - 输入与选择:<200 字限制、9 个上传限制、时间、键盘、单选/多选策略;不涉及则说明>
68
+ - 编辑与全局操作:<表单面板、底部操作栏及其变量/布局选择;不涉及则说明>
69
+ - 页面状态:<500ms 加载策略、空状态、禁用原因、展开默认值>
70
+ - 操作反馈:<保存筛选、提交校验和成功提示;不涉及则说明>
71
+ ```
@@ -5,7 +5,7 @@
5
5
  ## 创建/编辑业务单据
6
6
 
7
7
  1. `nav-bar` 放置标题和返回操作。
8
- 2. `form` + `field` 组织输入与校验;选择字段仅作为触发器。
8
+ 2. 多字段编辑在表单面板内使用 `form` + `field` 组织输入与校验;选择字段仅作为触发器。
9
9
  3. 需要人员、位置、对象或物料时,接入对应 Persagy 业务组件。
10
10
  4. 使用 `bottom-action-bar` 放置保存、提交或次操作;提交中禁用重复点击。
11
11
  5. 成功使用 `toast`,离开未保存页面使用 `dialog` 确认。
@@ -14,8 +14,8 @@
14
14
 
15
15
  1. 顶部使用 `search` 或已有的筛选触发入口。
16
16
  2. 工单场景使用 `work-order-filter`;其他复杂条件使用 `popup` + `form` + 现有选择组件。
17
- 3. 使用 `pull-refresh` + `list` 呈现数据,首屏/分页加载使用 `loading`,无结果使用 `empty`。
18
- 4. 列表项使用 `cell` 或 `card`;状态使用 `tag` 或 `badge`。
17
+ 3. 搜索触发后自动聚焦;非业务必需时提供取消操作。使用 `pull-refresh` + `list` 呈现数据,首屏/分页加载使用 `loading`,无结果使用 `empty`,末页显示无更多数据提示。
18
+ 4. 简单列表项使用 `cell` 或 `card`;工单需要展示标签、位置、展开详情或行内操作时使用 `work-order-card`;状态使用 `tag` 或 `badge`。
19
19
 
20
20
  ## 详情与处理页
21
21
 
@@ -23,8 +23,25 @@
23
23
  2. 需要展开内容使用 `collapse`,需要图文使用 `image`,需要状态标记使用 `tag`/`badge`。
24
24
  3. 主要处理动作使用 `bottom-action-bar`;可能造成数据变更的操作先经 `dialog`。
25
25
 
26
+ ## 编辑与全局操作
27
+
28
+ 1. 多个字段需要一次性编辑时,打开表单面板完成编辑、校验与提交。
29
+ 2. 当前页面或当前数据集的全局操作统一放入 `bottom-action-bar`。
30
+ 3. 按操作数量选择 `bottom-action-bar` 文档提供的变量、布局或溢出方案;使用前必须查阅其 README 和 demo。
31
+
26
32
  ## 选择型流程
27
33
 
28
34
  1. 使用 `field` 或 `cell` 显示当前选择结果并触发面板。
29
- 2. 使用业务组件完成选择;仅在通用场景选择 `picker`、`cascader`、`tree-select`、`calendar` 等。
30
- 3. 使用对应 `change`、`confirm`、`select` 事件同步页面状态,不读取组件内部 DOM。
35
+ 2. 选项不超过 3 个且文本短时可外露单选;其他单选及所有复杂选择均使用面板。多选枚举选项超过 6 个时,优先选择组件库的底部多选快捷操作能力。
36
+ 3. 使用业务组件完成选择;仅在通用场景选择 `picker`、`cascader`、`tree-select`、`calendar` 等。
37
+ 4. 使用对应 `change`、`confirm`、`select` 事件同步页面状态,不读取组件内部 DOM。
38
+
39
+ ## 楼层空间选择
40
+
41
+ 1. 按楼座、楼层筛选空间时使用 `floor-select`,不要自行组合侧边导航、楼层标签和空间单元格。
42
+ 2. 通过 `change` 事件同步所选空间和所属楼座;需要自定义空间展示时使用组件公开插槽。
43
+
44
+ ## 一次性友好引导
45
+
46
+ 1. 对首次出现或需要解释的局部功能使用 `friendly-tip`,通过参考元素定位。
47
+ 2. 提示仅在首次满足展示条件时出现;点击页面空白区域后关闭并记录已读状态。
@@ -1,145 +0,0 @@
1
- import { computed, defineComponent, createVNode as _createVNode } from "vue";
2
- import { makeArrayProp, makeStringProp, createNamespace } from "../utils/index.mjs";
3
- import ActionSheet from "./ActionSheet.mjs";
4
- import { NavBar } from "../nav-bar/index.mjs";
5
- import { Icon } from "../icon/index.mjs";
6
- import { Cell } from "../cell/index.mjs";
7
- import { Checkbox } from "../checkbox/index.mjs";
8
- import { CheckboxGroup } from "../checkbox-group/index.mjs";
9
- import { Button } from "../button/index.mjs";
10
- const [name, bem] = createNamespace("action-sheet-panel");
11
- const actionSheetPanelProps = {
12
- show: Boolean,
13
- type: makeStringProp("form"),
14
- title: String,
15
- options: makeArrayProp(),
16
- modelValue: [String, Array],
17
- confirmText: makeStringProp("\u786E\u5B9A"),
18
- selectAllText: makeStringProp("\u5168\u9009"),
19
- cancelSelectAllText: makeStringProp("\u53D6\u6D88\u5168\u9009")
20
- };
21
- var stdin_default = defineComponent({
22
- name,
23
- props: actionSheetPanelProps,
24
- emits: ["update:show", "update:modelValue", "select", "confirm"],
25
- setup(props, {
26
- emit,
27
- slots
28
- }) {
29
- const isCheckboxPanel = computed(() => props.type === "checkbox");
30
- const selectedValues = computed(() => Array.isArray(props.modelValue) ? props.modelValue : []);
31
- const isAllSelected = computed(() => {
32
- const selectableOptions = props.options.filter((option) => !option.disabled);
33
- return selectableOptions.length > 0 && selectableOptions.every((option) => selectedValues.value.includes(option.value));
34
- });
35
- const close = () => emit("update:show", false);
36
- const selectRadioOption = (option) => {
37
- if (option.disabled) {
38
- return;
39
- }
40
- emit("update:modelValue", option.value);
41
- emit("select", option.value);
42
- close();
43
- };
44
- const toggleCheckboxOption = (option) => {
45
- if (option.disabled) {
46
- return;
47
- }
48
- const values = [...selectedValues.value];
49
- const index = values.indexOf(option.value);
50
- if (index === -1) {
51
- values.push(option.value);
52
- } else {
53
- values.splice(index, 1);
54
- }
55
- emit("update:modelValue", values);
56
- };
57
- const toggleAll = () => {
58
- emit("update:modelValue", isAllSelected.value ? [] : props.options.filter((option) => !option.disabled).map((option) => option.value));
59
- };
60
- const confirm = () => {
61
- emit("confirm", props.modelValue);
62
- close();
63
- };
64
- const renderNav = () => _createVNode("div", {
65
- "class": bem("nav-wrapper")
66
- }, [_createVNode(NavBar, {
67
- "title": props.title,
68
- "class": bem("nav")
69
- }, {
70
- left: () => _createVNode(Icon, {
71
- "name": "cross",
72
- "size": "22",
73
- "onClick": close
74
- }, null),
75
- right: isCheckboxPanel.value ? () => _createVNode("span", {
76
- "class": bem("select-all"),
77
- "onClick": toggleAll
78
- }, [isAllSelected.value ? props.cancelSelectAllText : props.selectAllText]) : void 0
79
- })]);
80
- const renderOptions = () => {
81
- var _a;
82
- if (props.type === "radio") {
83
- return _createVNode("div", {
84
- "class": bem("card")
85
- }, [props.options.map((option) => _createVNode(Cell, {
86
- "key": option.value,
87
- "clickable": !option.disabled,
88
- "title": option.label,
89
- "titleStyle": {
90
- color: props.modelValue === option.value ? "var(--van-primary-color)" : void 0
91
- },
92
- "onClick": () => selectRadioOption(option)
93
- }, {
94
- "right-icon": () => props.modelValue === option.value ? _createVNode(Icon, {
95
- "name": "success",
96
- "color": "var(--van-primary-color)"
97
- }, null) : null
98
- }))]);
99
- }
100
- if (isCheckboxPanel.value) {
101
- return _createVNode(CheckboxGroup, {
102
- "modelValue": selectedValues.value,
103
- "class": bem("card"),
104
- "onUpdate:modelValue": (value) => emit("update:modelValue", value)
105
- }, {
106
- default: () => [props.options.map((option) => _createVNode(Cell, {
107
- "key": option.value,
108
- "clickable": !option.disabled,
109
- "title": option.label,
110
- "onClick": () => toggleCheckboxOption(option)
111
- }, {
112
- "right-icon": () => _createVNode(Checkbox, {
113
- "name": option.value,
114
- "disabled": option.disabled,
115
- "onClick": (event) => event.stopPropagation()
116
- }, null)
117
- }))]
118
- });
119
- }
120
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
121
- };
122
- return () => _createVNode(ActionSheet, {
123
- "show": props.show,
124
- "class": bem(),
125
- "onUpdate:show": (show) => emit("update:show", show)
126
- }, {
127
- default: () => [_createVNode("div", {
128
- "class": bem("content")
129
- }, [renderNav(), _createVNode("div", {
130
- "class": bem("body")
131
- }, [renderOptions()]), props.type !== "radio" && _createVNode("div", {
132
- "class": bem("footer")
133
- }, [_createVNode(Button, {
134
- "block": true,
135
- "type": "primary",
136
- "onClick": confirm
137
- }, {
138
- default: () => [props.confirmText]
139
- })])])]
140
- });
141
- }
142
- });
143
- export {
144
- stdin_default as default
145
- };
@@ -1,174 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name2 in all)
9
- __defProp(target, name2, { get: all[name2], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var stdin_exports = {};
29
- __export(stdin_exports, {
30
- default: () => stdin_default
31
- });
32
- module.exports = __toCommonJS(stdin_exports);
33
- var import_vue = require("vue");
34
- var import_utils = require("../utils");
35
- var import_ActionSheet = __toESM(require("./ActionSheet"));
36
- var import_nav_bar = require("../nav-bar");
37
- var import_icon = require("../icon");
38
- var import_cell = require("../cell");
39
- var import_checkbox = require("../checkbox");
40
- var import_checkbox_group = require("../checkbox-group");
41
- var import_button = require("../button");
42
- const [name, bem] = (0, import_utils.createNamespace)("action-sheet-panel");
43
- const actionSheetPanelProps = {
44
- show: Boolean,
45
- type: (0, import_utils.makeStringProp)("form"),
46
- title: String,
47
- options: (0, import_utils.makeArrayProp)(),
48
- modelValue: [String, Array],
49
- confirmText: (0, import_utils.makeStringProp)("\u786E\u5B9A"),
50
- selectAllText: (0, import_utils.makeStringProp)("\u5168\u9009"),
51
- cancelSelectAllText: (0, import_utils.makeStringProp)("\u53D6\u6D88\u5168\u9009")
52
- };
53
- var stdin_default = (0, import_vue.defineComponent)({
54
- name,
55
- props: actionSheetPanelProps,
56
- emits: ["update:show", "update:modelValue", "select", "confirm"],
57
- setup(props, {
58
- emit,
59
- slots
60
- }) {
61
- const isCheckboxPanel = (0, import_vue.computed)(() => props.type === "checkbox");
62
- const selectedValues = (0, import_vue.computed)(() => Array.isArray(props.modelValue) ? props.modelValue : []);
63
- const isAllSelected = (0, import_vue.computed)(() => {
64
- const selectableOptions = props.options.filter((option) => !option.disabled);
65
- return selectableOptions.length > 0 && selectableOptions.every((option) => selectedValues.value.includes(option.value));
66
- });
67
- const close = () => emit("update:show", false);
68
- const selectRadioOption = (option) => {
69
- if (option.disabled) {
70
- return;
71
- }
72
- emit("update:modelValue", option.value);
73
- emit("select", option.value);
74
- close();
75
- };
76
- const toggleCheckboxOption = (option) => {
77
- if (option.disabled) {
78
- return;
79
- }
80
- const values = [...selectedValues.value];
81
- const index = values.indexOf(option.value);
82
- if (index === -1) {
83
- values.push(option.value);
84
- } else {
85
- values.splice(index, 1);
86
- }
87
- emit("update:modelValue", values);
88
- };
89
- const toggleAll = () => {
90
- emit("update:modelValue", isAllSelected.value ? [] : props.options.filter((option) => !option.disabled).map((option) => option.value));
91
- };
92
- const confirm = () => {
93
- emit("confirm", props.modelValue);
94
- close();
95
- };
96
- const renderNav = () => (0, import_vue.createVNode)("div", {
97
- "class": bem("nav-wrapper")
98
- }, [(0, import_vue.createVNode)(import_nav_bar.NavBar, {
99
- "title": props.title,
100
- "class": bem("nav")
101
- }, {
102
- left: () => (0, import_vue.createVNode)(import_icon.Icon, {
103
- "name": "cross",
104
- "size": "22",
105
- "onClick": close
106
- }, null),
107
- right: isCheckboxPanel.value ? () => (0, import_vue.createVNode)("span", {
108
- "class": bem("select-all"),
109
- "onClick": toggleAll
110
- }, [isAllSelected.value ? props.cancelSelectAllText : props.selectAllText]) : void 0
111
- })]);
112
- const renderOptions = () => {
113
- var _a;
114
- if (props.type === "radio") {
115
- return (0, import_vue.createVNode)("div", {
116
- "class": bem("card")
117
- }, [props.options.map((option) => (0, import_vue.createVNode)(import_cell.Cell, {
118
- "key": option.value,
119
- "clickable": !option.disabled,
120
- "title": option.label,
121
- "titleStyle": {
122
- color: props.modelValue === option.value ? "var(--van-primary-color)" : void 0
123
- },
124
- "onClick": () => selectRadioOption(option)
125
- }, {
126
- "right-icon": () => props.modelValue === option.value ? (0, import_vue.createVNode)(import_icon.Icon, {
127
- "name": "success",
128
- "color": "var(--van-primary-color)"
129
- }, null) : null
130
- }))]);
131
- }
132
- if (isCheckboxPanel.value) {
133
- return (0, import_vue.createVNode)(import_checkbox_group.CheckboxGroup, {
134
- "modelValue": selectedValues.value,
135
- "class": bem("card"),
136
- "onUpdate:modelValue": (value) => emit("update:modelValue", value)
137
- }, {
138
- default: () => [props.options.map((option) => (0, import_vue.createVNode)(import_cell.Cell, {
139
- "key": option.value,
140
- "clickable": !option.disabled,
141
- "title": option.label,
142
- "onClick": () => toggleCheckboxOption(option)
143
- }, {
144
- "right-icon": () => (0, import_vue.createVNode)(import_checkbox.Checkbox, {
145
- "name": option.value,
146
- "disabled": option.disabled,
147
- "onClick": (event) => event.stopPropagation()
148
- }, null)
149
- }))]
150
- });
151
- }
152
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
153
- };
154
- return () => (0, import_vue.createVNode)(import_ActionSheet.default, {
155
- "show": props.show,
156
- "class": bem(),
157
- "onUpdate:show": (show) => emit("update:show", show)
158
- }, {
159
- default: () => [(0, import_vue.createVNode)("div", {
160
- "class": bem("content")
161
- }, [renderNav(), (0, import_vue.createVNode)("div", {
162
- "class": bem("body")
163
- }, [renderOptions()]), props.type !== "radio" && (0, import_vue.createVNode)("div", {
164
- "class": bem("footer")
165
- }, [(0, import_vue.createVNode)(import_button.Button, {
166
- "block": true,
167
- "type": "primary",
168
- "onClick": confirm
169
- }, {
170
- default: () => [props.confirmText]
171
- })])])]
172
- });
173
- }
174
- });