hzzt-plus 1.0.6 → 2.0.0

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 (150) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +558 -355
  3. package/dist/index.full.min.js +10 -10
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +13 -13
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +559 -357
  8. package/dist/locale/en.js +1 -1
  9. package/dist/locale/en.min.js +1 -1
  10. package/dist/locale/en.min.mjs +1 -1
  11. package/dist/locale/en.mjs +1 -1
  12. package/dist/locale/zh-cn.js +1 -1
  13. package/dist/locale/zh-cn.min.js +1 -1
  14. package/dist/locale/zh-cn.min.mjs +1 -1
  15. package/dist/locale/zh-cn.mjs +1 -1
  16. package/es/component.mjs +3 -1
  17. package/es/component.mjs.map +1 -1
  18. package/es/components/click-input/src/click-input2.mjs +1 -1
  19. package/es/components/click-input/src/click-input2.mjs.map +1 -1
  20. package/es/components/collapse/index.d.ts +161 -8
  21. package/es/components/collapse/src/collapse.vue.d.ts +161 -8
  22. package/es/components/collapse/src/collapse2.mjs +50 -29
  23. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  24. package/es/components/icon/index.mjs +4 -0
  25. package/es/components/icon/index.mjs.map +1 -1
  26. package/es/components/icon/src/components/index.d.ts +2 -0
  27. package/es/components/icon/src/components/index.mjs +3 -0
  28. package/es/components/icon/src/components/index.mjs.map +1 -0
  29. package/es/components/icon/src/components/minus-square-outline.mjs +29 -0
  30. package/es/components/icon/src/components/minus-square-outline.mjs.map +1 -0
  31. package/es/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
  32. package/es/components/icon/src/components/plus-square-outline.mjs +29 -0
  33. package/es/components/icon/src/components/plus-square-outline.mjs.map +1 -0
  34. package/es/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
  35. package/es/components/index.d.ts +1 -0
  36. package/es/components/index.mjs +2 -1
  37. package/es/components/index.mjs.map +1 -1
  38. package/es/components/pagination/index.d.ts +2 -2
  39. package/es/components/pagination/src/index.mjs +49 -21
  40. package/es/components/pagination/src/index.mjs.map +1 -1
  41. package/es/components/pagination/src/index.vue.d.ts +2 -2
  42. package/es/components/scroll/index.d.ts +5 -0
  43. package/es/components/scroll/index.mjs +9 -0
  44. package/es/components/scroll/index.mjs.map +1 -0
  45. package/es/components/scroll/src/scroll.d.ts +2 -0
  46. package/es/components/scroll/src/scroll.mjs +2 -0
  47. package/es/components/scroll/src/scroll.mjs.map +1 -0
  48. package/es/components/scroll/src/scroll.vue.d.ts +147 -0
  49. package/es/components/scroll/src/scroll2.mjs +88 -0
  50. package/es/components/scroll/src/scroll2.mjs.map +1 -0
  51. package/es/components/scroll/style/css.d.ts +2 -0
  52. package/es/components/scroll/style/css.mjs +3 -0
  53. package/es/components/scroll/style/css.mjs.map +1 -0
  54. package/es/components/scroll/style/index.d.ts +2 -0
  55. package/es/components/scroll/style/index.mjs +3 -0
  56. package/es/components/scroll/style/index.mjs.map +1 -0
  57. package/es/components/select-input/index.d.ts +39 -0
  58. package/es/components/select-input/src/select-input.vue.d.ts +39 -0
  59. package/es/components/select-textarea/index.mjs +2 -2
  60. package/es/components/select-textarea/src/select-textarea.mjs +100 -30
  61. package/es/components/select-textarea/src/select-textarea.mjs.map +1 -1
  62. package/es/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
  63. package/es/components/select-textarea/src/select-textarea2.mjs +30 -100
  64. package/es/components/select-textarea/src/select-textarea2.mjs.map +1 -1
  65. package/es/components/title/src/title.d.ts +6 -0
  66. package/es/components/title/src/title.mjs +4 -1
  67. package/es/components/title/src/title.mjs.map +1 -1
  68. package/es/components/title/src/title.vue.d.ts +39 -0
  69. package/es/components/title/src/title2.mjs +28 -12
  70. package/es/components/title/src/title2.mjs.map +1 -1
  71. package/es/index.mjs +2 -1
  72. package/es/index.mjs.map +1 -1
  73. package/es/version.d.ts +1 -1
  74. package/es/version.mjs +1 -1
  75. package/es/version.mjs.map +1 -1
  76. package/global.d.ts +1 -0
  77. package/lib/component.js +3 -1
  78. package/lib/component.js.map +1 -1
  79. package/lib/components/click-input/src/click-input2.js +1 -1
  80. package/lib/components/click-input/src/click-input2.js.map +1 -1
  81. package/lib/components/collapse/index.d.ts +161 -8
  82. package/lib/components/collapse/src/collapse.vue.d.ts +161 -8
  83. package/lib/components/collapse/src/collapse2.js +49 -28
  84. package/lib/components/collapse/src/collapse2.js.map +1 -1
  85. package/lib/components/icon/index.js +4 -0
  86. package/lib/components/icon/index.js.map +1 -1
  87. package/lib/components/icon/src/components/index.d.ts +2 -0
  88. package/lib/components/icon/src/components/index.js +12 -0
  89. package/lib/components/icon/src/components/index.js.map +1 -0
  90. package/lib/components/icon/src/components/minus-square-outline.js +33 -0
  91. package/lib/components/icon/src/components/minus-square-outline.js.map +1 -0
  92. package/lib/components/icon/src/components/minus-square-outline.vue.d.ts +2 -0
  93. package/lib/components/icon/src/components/plus-square-outline.js +33 -0
  94. package/lib/components/icon/src/components/plus-square-outline.js.map +1 -0
  95. package/lib/components/icon/src/components/plus-square-outline.vue.d.ts +2 -0
  96. package/lib/components/index.d.ts +1 -0
  97. package/lib/components/index.js +3 -1
  98. package/lib/components/index.js.map +1 -1
  99. package/lib/components/pagination/index.d.ts +2 -2
  100. package/lib/components/pagination/src/index.js +48 -20
  101. package/lib/components/pagination/src/index.js.map +1 -1
  102. package/lib/components/pagination/src/index.vue.d.ts +2 -2
  103. package/lib/components/scroll/index.d.ts +5 -0
  104. package/lib/components/scroll/index.js +14 -0
  105. package/lib/components/scroll/index.js.map +1 -0
  106. package/lib/components/scroll/src/scroll.d.ts +2 -0
  107. package/lib/components/scroll/src/scroll.js +3 -0
  108. package/lib/components/scroll/src/scroll.js.map +1 -0
  109. package/lib/components/scroll/src/scroll.vue.d.ts +147 -0
  110. package/lib/components/scroll/src/scroll2.js +92 -0
  111. package/lib/components/scroll/src/scroll2.js.map +1 -0
  112. package/lib/components/scroll/style/css.d.ts +2 -0
  113. package/lib/components/scroll/style/css.js +6 -0
  114. package/lib/components/scroll/style/css.js.map +1 -0
  115. package/lib/components/scroll/style/index.d.ts +2 -0
  116. package/lib/components/scroll/style/index.js +6 -0
  117. package/lib/components/scroll/style/index.js.map +1 -0
  118. package/lib/components/select-input/index.d.ts +39 -0
  119. package/lib/components/select-input/src/select-input.vue.d.ts +39 -0
  120. package/lib/components/select-textarea/index.js +2 -2
  121. package/lib/components/select-textarea/src/select-textarea.js +100 -31
  122. package/lib/components/select-textarea/src/select-textarea.js.map +1 -1
  123. package/lib/components/select-textarea/src/select-textarea.vue.d.ts +39 -0
  124. package/lib/components/select-textarea/src/select-textarea2.js +31 -100
  125. package/lib/components/select-textarea/src/select-textarea2.js.map +1 -1
  126. package/lib/components/title/src/title.d.ts +6 -0
  127. package/lib/components/title/src/title.js +4 -1
  128. package/lib/components/title/src/title.js.map +1 -1
  129. package/lib/components/title/src/title.vue.d.ts +39 -0
  130. package/lib/components/title/src/title2.js +27 -11
  131. package/lib/components/title/src/title2.js.map +1 -1
  132. package/lib/index.js +33 -31
  133. package/lib/index.js.map +1 -1
  134. package/lib/version.d.ts +1 -1
  135. package/lib/version.js +1 -1
  136. package/lib/version.js.map +1 -1
  137. package/package.json +1 -1
  138. package/theme/hzzt-collapse.css +1 -1
  139. package/theme/hzzt-pagination.css +1 -1
  140. package/theme/hzzt-scan.css +1 -1
  141. package/theme/hzzt-scroll.css +1 -0
  142. package/theme/hzzt-title.css +1 -1
  143. package/theme/index.css +1 -1
  144. package/theme/src/collapse.scss +45 -39
  145. package/theme/src/index.scss +1 -0
  146. package/theme/src/pagination.scss +24 -6
  147. package/theme/src/scan.scss +3 -3
  148. package/theme/src/scroll.scss +42 -0
  149. package/theme/src/title.scss +14 -5
  150. package/web-types.json +1 -1
package/dist/locale/en.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Hzzt Plus v1.0.6 */
1
+ /*! Hzzt Plus v2.0.0 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1,2 +1,2 @@
1
- /*! Hzzt Plus v1.0.6 */(function(e,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleEn=r())})(this,function(){"use strict";var e={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};return e});
1
+ /*! Hzzt Plus v2.0.0 */(function(e,r){typeof exports=="object"&&typeof module!="undefined"?module.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis!="undefined"?globalThis:e||self,e.HzztPlusLocaleEn=r())})(this,function(){"use strict";var e={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};return e});
2
2
  //# sourceMappingURL=en.min.js.map
@@ -1,2 +1,2 @@
1
- /*! Hzzt Plus v1.0.6 */var r={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};export{r as default};
1
+ /*! Hzzt Plus v2.0.0 */var r={name:"en",hzzt:{collapse:{expand:"expand",retract:"retract"},pagination:{total:"",strip:""},pageSize:{total:"Total ",strip:"",page:"page",d:"",per_page:"per page"},quarterpicker:{prevYear:"Previous Year",nextYear:"Next Year",year:"",firstQuarter:"First quarter",secondQuarter:"Second quarter",thirdQuarter:"Third quarter",fourthQuarter:"Fourth quarter"}}};export{r as default};
2
2
  //# sourceMappingURL=en.min.mjs.map
@@ -1,4 +1,4 @@
1
- /*! Hzzt Plus v1.0.6 */
1
+ /*! Hzzt Plus v2.0.0 */
2
2
 
3
3
  var en = {
4
4
  name: "en",
@@ -1,4 +1,4 @@
1
- /*! Hzzt Plus v1.0.6 */
1
+ /*! Hzzt Plus v2.0.0 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1,2 +1,2 @@
1
- /*! Hzzt Plus v1.0.6 */(function(u,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e():typeof define=="function"&&define.amd?define(e):(u=typeof globalThis!="undefined"?globalThis:u||self,u.HzztPlusLocaleZhCn=e())})(this,function(){"use strict";var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};return u});
1
+ /*! Hzzt Plus v2.0.0 */(function(u,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e():typeof define=="function"&&define.amd?define(e):(u=typeof globalThis!="undefined"?globalThis:u||self,u.HzztPlusLocaleZhCn=e())})(this,function(){"use strict";var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};return u});
2
2
  //# sourceMappingURL=zh-cn.min.js.map
@@ -1,2 +1,2 @@
1
- /*! Hzzt Plus v1.0.6 */var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};export{u as default};
1
+ /*! Hzzt Plus v2.0.0 */var u={name:"zh-cn",hzzt:{collapse:{expand:"\u5C55\u5F00",retract:"\u6536\u8D77"},pagination:{total:"\u5171",strip:"\u6761"},pageSize:{total:"\u5171",strip:"\u6761",d:"\u7B2C",page:"\u9875",per_page:"\u6BCF\u9875"},quarterpicker:{prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",year:"\u5E74",firstQuarter:"\u7B2C\u4E00\u5B63\u5EA6",secondQuarter:"\u7B2C\u4E8C\u5B63\u5EA6",thirdQuarter:"\u7B2C\u4E09\u5B63\u5EA6",fourthQuarter:"\u7B2C\u56DB\u5B63\u5EA6"}}};export{u as default};
2
2
  //# sourceMappingURL=zh-cn.min.mjs.map
@@ -1,4 +1,4 @@
1
- /*! Hzzt Plus v1.0.6 */
1
+ /*! Hzzt Plus v2.0.0 */
2
2
 
3
3
  var zhCn = {
4
4
  name: "zh-cn",
package/es/component.mjs CHANGED
@@ -17,6 +17,7 @@ import { HzztInputRange } from './components/input-range/index.mjs';
17
17
  import { HzztCascader } from './components/cascader/index.mjs';
18
18
  import { HzztSelect } from './components/select/index.mjs';
19
19
  import { HzztClickInput } from './components/click-input/index.mjs';
20
+ import { HzztScroll } from './components/scroll/index.mjs';
20
21
 
21
22
  var Components = [
22
23
  HzztConfigProvider,
@@ -37,7 +38,8 @@ var Components = [
37
38
  HzztInputRange,
38
39
  HzztCascader,
39
40
  HzztSelect,
40
- HzztClickInput
41
+ HzztClickInput,
42
+ HzztScroll
41
43
  ];
42
44
 
43
45
  export { Components as default };
@@ -1 +1 @@
1
- {"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\nimport { HzztInputRange } from '@hzzt-plus/components/input-range'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\nimport { HzztSelect } from '@hzzt-plus/components/select'\nimport { HzztClickInput } from '@hzzt-plus/components/click-input'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n HzztInputRange,\n HzztCascader,\n HzztSelect,\n HzztClickInput,\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,iBAAe;AACf,EAAE,kBAAkB;AACpB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,mBAAmB;AACrB,EAAE,eAAe;AACjB,EAAE,iBAAiB;AACnB,EAAE,QAAQ;AACV,EAAE,eAAe;AACjB,EAAE,kBAAkB;AACpB,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,CAAC;;;;"}
1
+ {"version":3,"file":"component.mjs","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\nimport { HzztCheckButton } from '@hzzt-plus/components/check-button'\nimport { HzztQuarterPicker } from '@hzzt-plus/components/quarter-picker'\nimport { HzztScan } from '@hzzt-plus/components/scan'\nimport { HzztSelectInput } from '@hzzt-plus/components/select-input'\nimport { HzztSelectTextarea } from '@hzzt-plus/components/select-textarea'\nimport { HzztInputRange } from '@hzzt-plus/components/input-range'\nimport { HzztCascader } from '@hzzt-plus/components/cascader'\nimport { HzztSelect } from '@hzzt-plus/components/select'\nimport { HzztClickInput } from '@hzzt-plus/components/click-input'\nimport { HzztScroll } from '@hzzt-plus/components/scroll'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n HzztCheckButton,\n HzztQuarterPicker,\n HzztScan,\n HzztSelectInput,\n HzztSelectTextarea,\n HzztInputRange,\n HzztCascader,\n HzztSelect,\n HzztClickInput,\n HzztScroll,\n] as Plugin[]\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,iBAAe;AACf,EAAE,kBAAkB;AACpB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,mBAAmB;AACrB,EAAE,eAAe;AACjB,EAAE,iBAAiB;AACnB,EAAE,QAAQ;AACV,EAAE,eAAe;AACjB,EAAE,kBAAkB;AACpB,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,EAAE,UAAU;AACZ,CAAC;;;;"}
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  "flex width-100% align-items-center"
32
32
  ]);
33
33
  const spanClass = computed(() => [
34
- nsInput.em("span"),
34
+ nsInput.e("span"),
35
35
  "flex width-100% align-items-center"
36
36
  ]);
37
37
  watch(() => props.modelValue, (v) => {
@@ -1 +1 @@
1
- {"version":3,"file":"click-input2.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n v-if=\"!trueReadonly\"\n ref=\"inputRef\"\n v-model=\"inputVal\"\n v-bind=\"inputProps\"\n clearable\n :size=\"trueSize\"\n @keyup.enter=\"change\"\n @blur=\"change\"\n />\n <div v-else class=\"width-100%\" :class=\"spanClass\" @click=\"edit\">\n {{ inputVal || ' ' }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {computed, ref, watch, nextTick} from 'vue'\n import {clickInputEmits, clickInputProps} from './click-input'\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import {ElInput} from 'element-plus'\n\n defineOptions({\n name: 'HzztClickInput',\n })\n\n const props = defineProps(clickInputProps)\n const emit = defineEmits(clickInputEmits)\n\n const _inputVal = ref(props.modelValue || '');\n const inputVal = ref(props.modelValue || '');\n const inputRef = ref();\n const editable = ref(false);\n\n const nsInput = useNamespace('click-input')\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value)\n\n const containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n 'flex width-100% align-items-center',\n ])\n\n const spanClass = computed(() => [\n nsInput.em('span'),\n 'flex width-100% align-items-center',\n ])\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v || '';\n _inputVal.value = v || '';\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change() {\n editable.value = false;\n if (_inputVal.value === inputVal.value) {\n return;\n }\n input(inputVal.value);\n emit('change', inputVal.value);\n }\n\n function edit() {\n if (trueDisabled.value || props.readonly) {\n return;\n }\n editable.value = true;\n nextTick(() => {\n inputRef.value.focus();\n });\n }\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCAyBgB,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,SAAY,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC5C,IAAA,MAAM,QAAW,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC3C,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AACrB,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,OAAA,GAAU,aAAa,aAAa,CAAA,CAAA;AAC1C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAM,eAAe,QAAS,CAAA,MAAM;AAEpC,MAAM,OAAA,CAAA,CAAA,EAAA;AAEN,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,MAClC,oCAAU;AAAA,KACV,CAAA,CAAA;AAAwB,IACxB,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACD,OAAA,CAAA,EAAA,CAAA,MAAA,CAAA;AAED,MAAM,oCAA2B;AAAA,KAC/B,CAAA,CAAA;AAAiB,IACjB,KAAA,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACD,QAAA,CAAA,KAAA,GAAA,CAAA,IAAA,EAAA,CAAA;AAED,MAAA,SAAY,CAAA,KAAA,GAAkB,CAAA,IAAA,EAAA,CAAA;AAC5B,KAAA,CAAA,CAAA;AACA,IAAA,SAAA,WAAkB;AAAK,MACxB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,kBAAiB;AAAA,MACnB,QAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AAEA,MAAA,IAAA,SAAkB,CAAA,KAAA,KAAA,QAAA,CAAA,KAAA,EAAA;AAChB,QAAA,OAAS;AACT,OAAI;AACF,MAAA,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAAA,MACF,IAAA,CAAA,QAAA,EAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAA;AACA,IAAK,SAAA,IAAA,GAAA;AAAwB,MAC/B,IAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,EAAA;AAEA,QAAA,OAAgB;AACd,OAAI;AACF,MAAA,QAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,MACF,QAAA,CAAA,MAAA;AACA,QAAA,QAAiB,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA;AACjB,OAAA,CAAA,CAAA;AACE,KAAA;AAAqB,IAAA,OACtB,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACH,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"click-input2.mjs","sources":["../../../../../../packages/components/click-input/src/click-input.vue"],"sourcesContent":["<template>\n <div :class=\"containerCls\">\n <el-input\n v-if=\"!trueReadonly\"\n ref=\"inputRef\"\n v-model=\"inputVal\"\n v-bind=\"inputProps\"\n clearable\n :size=\"trueSize\"\n @keyup.enter=\"change\"\n @blur=\"change\"\n />\n <div v-else class=\"width-100%\" :class=\"spanClass\" @click=\"edit\">\n {{ inputVal || ' ' }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {computed, ref, watch, nextTick} from 'vue'\n import {clickInputEmits, clickInputProps} from './click-input'\n import {useGlobalSize, useNamespace} from \"@hzzt-plus/hooks\";\n import {useFormDisabled, useFormSize} from \"element-plus\";\n import {ElInput} from 'element-plus'\n\n defineOptions({\n name: 'HzztClickInput',\n })\n\n const props = defineProps(clickInputProps)\n const emit = defineEmits(clickInputEmits)\n\n const _inputVal = ref(props.modelValue || '');\n const inputVal = ref(props.modelValue || '');\n const inputRef = ref();\n const editable = ref(false);\n\n const nsInput = useNamespace('click-input')\n const formSize = useFormSize()\n const formDisabled = useFormDisabled()\n\n const trueSize = computed(\n () => props.size || formSize.value || useGlobalSize().value\n )\n\n const trueDisabled = computed(() => props.disabled || formDisabled.value)\n\n const trueReadonly = computed(() => trueDisabled.value || props.readonly || !editable.value)\n\n const containerCls = computed(() => [\n nsInput.b(),\n nsInput.m(trueSize.value),\n 'flex width-100% align-items-center',\n ])\n\n const spanClass = computed(() => [\n nsInput.e('span'),\n 'flex width-100% align-items-center',\n ])\n\n watch(() => props.modelValue, (v) => {\n inputVal.value = v || '';\n _inputVal.value = v || '';\n })\n\n function input(val: string) {\n emit('update:modelValue', val);\n emit('input', val);\n }\n\n function change() {\n editable.value = false;\n if (_inputVal.value === inputVal.value) {\n return;\n }\n input(inputVal.value);\n emit('change', inputVal.value);\n }\n\n function edit() {\n if (trueDisabled.value || props.readonly) {\n return;\n }\n editable.value = true;\n nextTick(() => {\n inputRef.value.focus();\n });\n }\n\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;;mCAyBgB,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAA,MAAM,SAAY,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC5C,IAAA,MAAM,QAAW,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,IAAc,EAAE,CAAA,CAAA;AAC3C,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AACrB,IAAM,MAAA,QAAA,GAAW,IAAI,KAAK,CAAA,CAAA;AAE1B,IAAM,MAAA,OAAA,GAAU,aAAa,aAAa,CAAA,CAAA;AAC1C,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,eAAe,eAAgB,EAAA,CAAA;AAErC,IAAA,MAAM,QAAW,GAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,QAAA,CAAA,KAAA,IAAA,aAAA,EAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,kBACH,GAAA,QAAiB,CAAA,MAAA,kBAAuB,YAAE,CAAA,KAAA,CAAA,CAAA;AAAA,IACxD,MAAA,YAAA,GAAA,QAAA,CAAA,MAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,IAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAM,eAAe,QAAS,CAAA,MAAM;AAEpC,MAAM,OAAA,CAAA,CAAA,EAAA;AAEN,MAAM,OAAA,CAAA,CAAA,CAAA,QAAA,CAAe;AAAe,MAClC,oCAAU;AAAA,KACV,CAAA,CAAA;AAAwB,IACxB,MAAA,SAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACD,OAAA,CAAA,CAAA,CAAA,MAAA,CAAA;AAED,MAAM,oCAA2B;AAAA,KAC/B,CAAA,CAAA;AAAgB,IAChB,KAAA,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,CAAA,CAAA,KAAA;AAAA,MACD,QAAA,CAAA,KAAA,GAAA,CAAA,IAAA,EAAA,CAAA;AAED,MAAA,SAAY,CAAA,KAAA,GAAkB,CAAA,IAAA,EAAA,CAAA;AAC5B,KAAA,CAAA,CAAA;AACA,IAAA,SAAA,WAAkB;AAAK,MACxB,IAAA,CAAA,mBAAA,EAAA,GAAA,CAAA,CAAA;AAED,MAAA,IAAA,CAAA,SAA4B,GAAA,CAAA,CAAA;AAC1B,KAAA;AACA,IAAA,kBAAiB;AAAA,MACnB,QAAA,CAAA,KAAA,GAAA,KAAA,CAAA;AAEA,MAAA,IAAA,SAAkB,CAAA,KAAA,KAAA,QAAA,CAAA,KAAA,EAAA;AAChB,QAAA,OAAS;AACT,OAAI;AACF,MAAA,KAAA,CAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AAAA,MACF,IAAA,CAAA,QAAA,EAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAA;AACA,IAAK,SAAA,IAAA,GAAA;AAAwB,MAC/B,IAAA,YAAA,CAAA,KAAA,IAAA,KAAA,CAAA,QAAA,EAAA;AAEA,QAAA,OAAgB;AACd,OAAI;AACF,MAAA,QAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,MACF,QAAA,CAAA,MAAA;AACA,QAAA,QAAiB,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA;AACjB,OAAA,CAAA,CAAA;AACE,KAAA;AAAqB,IAAA,OACtB,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACH,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -7,7 +7,11 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
7
7
  type: StringConstructor;
8
8
  default: string;
9
9
  };
10
- expand: {
10
+ showLine: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ modelValue: {
11
15
  type: BooleanConstructor;
12
16
  default: boolean;
13
17
  };
@@ -22,16 +26,158 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
22
26
  type: StringConstructor;
23
27
  default: string;
24
28
  };
25
- expand: {
29
+ showLine: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ modelValue: {
26
34
  type: BooleanConstructor;
27
35
  default: boolean;
28
36
  };
29
37
  }>> & {
30
- [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
38
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
39
  }>>;
32
- active: import("vue").Ref<boolean>;
40
+ emit: (event: "update:modelValue", ...args: any[]) => void;
41
+ expand: import("vue").Ref<boolean>;
33
42
  toggle: () => void;
34
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ HzztIcon: import("vue").DefineComponent<{
44
+ name: {
45
+ type: StringConstructor;
46
+ required: true;
47
+ };
48
+ type: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ }, {
53
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
54
+ name: {
55
+ type: StringConstructor;
56
+ required: true;
57
+ };
58
+ type: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ }>> & {
63
+ [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
64
+ }>>;
65
+ attrs: {
66
+ [x: string]: unknown;
67
+ };
68
+ componentName: import("vue").ComputedRef<string>;
69
+ ElIcon: import("element-plus/es/utils").SFCWithInstall<{
70
+ new (...args: any[]): {
71
+ $: import("vue").ComponentInternalInstance;
72
+ $data: {};
73
+ $props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
74
+ readonly size: {
75
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
76
+ readonly required: false;
77
+ readonly validator: ((val: unknown) => boolean) | undefined;
78
+ __epPropKey: true;
79
+ };
80
+ readonly color: {
81
+ readonly type: import("vue").PropType<string>;
82
+ readonly required: false;
83
+ readonly validator: ((val: unknown) => boolean) | undefined;
84
+ __epPropKey: true;
85
+ };
86
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
87
+ $attrs: {
88
+ [x: string]: unknown;
89
+ };
90
+ $refs: {
91
+ [x: string]: unknown;
92
+ };
93
+ $slots: Readonly<{
94
+ [name: string]: import("vue").Slot | undefined;
95
+ }>;
96
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
97
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
98
+ $emit: (event: string, ...args: any[]) => void;
99
+ $el: any;
100
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
101
+ readonly size: {
102
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
103
+ readonly required: false;
104
+ readonly validator: ((val: unknown) => boolean) | undefined;
105
+ __epPropKey: true;
106
+ };
107
+ readonly color: {
108
+ readonly type: import("vue").PropType<string>;
109
+ readonly required: false;
110
+ readonly validator: ((val: unknown) => boolean) | undefined;
111
+ __epPropKey: true;
112
+ };
113
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
114
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
115
+ created?: ((() => void) | (() => void)[]) | undefined;
116
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
117
+ mounted?: ((() => void) | (() => void)[]) | undefined;
118
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
119
+ updated?: ((() => void) | (() => void)[]) | undefined;
120
+ activated?: ((() => void) | (() => void)[]) | undefined;
121
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
122
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
123
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
124
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
125
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
126
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
127
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
128
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
129
+ };
130
+ $forceUpdate: () => void;
131
+ $nextTick: typeof import("vue").nextTick;
132
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
133
+ } & Readonly<import("vue").ExtractPropTypes<{
134
+ readonly size: {
135
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
136
+ readonly required: false;
137
+ readonly validator: ((val: unknown) => boolean) | undefined;
138
+ __epPropKey: true;
139
+ };
140
+ readonly color: {
141
+ readonly type: import("vue").PropType<string>;
142
+ readonly required: false;
143
+ readonly validator: ((val: unknown) => boolean) | undefined;
144
+ __epPropKey: true;
145
+ };
146
+ }>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
147
+ __isFragment?: undefined;
148
+ __isTeleport?: undefined;
149
+ __isSuspense?: undefined;
150
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
151
+ readonly size: {
152
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
153
+ readonly required: false;
154
+ readonly validator: ((val: unknown) => boolean) | undefined;
155
+ __epPropKey: true;
156
+ };
157
+ readonly color: {
158
+ readonly type: import("vue").PropType<string>;
159
+ readonly required: false;
160
+ readonly validator: ((val: unknown) => boolean) | undefined;
161
+ __epPropKey: true;
162
+ };
163
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
164
+ $slots: {
165
+ default?(_: {}): any;
166
+ };
167
+ })>;
168
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
169
+ name: {
170
+ type: StringConstructor;
171
+ required: true;
172
+ };
173
+ type: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ }>>, {
178
+ type: string;
179
+ }>;
180
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
181
  defaultActive: {
36
182
  type: BooleanConstructor;
37
183
  default: boolean;
@@ -40,14 +186,21 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
40
186
  type: StringConstructor;
41
187
  default: string;
42
188
  };
43
- expand: {
189
+ showLine: {
44
190
  type: BooleanConstructor;
45
191
  default: boolean;
46
192
  };
47
- }>>, {
193
+ modelValue: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ }>> & {
198
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
199
+ }, {
200
+ modelValue: boolean;
48
201
  defaultActive: boolean;
49
202
  title: string;
50
- expand: boolean;
203
+ showLine: boolean;
51
204
  }>> & Record<string, any>;
52
205
  export default HzztCollapse;
53
206
  export * from './src/collapse';
@@ -7,7 +7,11 @@ declare const _default: import("vue").DefineComponent<{
7
7
  type: StringConstructor;
8
8
  default: string;
9
9
  };
10
- expand: {
10
+ showLine: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ modelValue: {
11
15
  type: BooleanConstructor;
12
16
  default: boolean;
13
17
  };
@@ -22,16 +26,158 @@ declare const _default: import("vue").DefineComponent<{
22
26
  type: StringConstructor;
23
27
  default: string;
24
28
  };
25
- expand: {
29
+ showLine: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ modelValue: {
26
34
  type: BooleanConstructor;
27
35
  default: boolean;
28
36
  };
29
37
  }>> & {
30
- [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
38
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
39
  }>>;
32
- active: import("vue").Ref<boolean>;
40
+ emit: (event: "update:modelValue", ...args: any[]) => void;
41
+ expand: import("vue").Ref<boolean>;
33
42
  toggle: () => void;
34
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
+ HzztIcon: import("vue").DefineComponent<{
44
+ name: {
45
+ type: StringConstructor;
46
+ required: true;
47
+ };
48
+ type: {
49
+ type: StringConstructor;
50
+ default: string;
51
+ };
52
+ }, {
53
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
54
+ name: {
55
+ type: StringConstructor;
56
+ required: true;
57
+ };
58
+ type: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ }>> & {
63
+ [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
64
+ }>>;
65
+ attrs: {
66
+ [x: string]: unknown;
67
+ };
68
+ componentName: import("vue").ComputedRef<string>;
69
+ ElIcon: import("element-plus/es/utils").SFCWithInstall<{
70
+ new (...args: any[]): {
71
+ $: import("vue").ComponentInternalInstance;
72
+ $data: {};
73
+ $props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
74
+ readonly size: {
75
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
76
+ readonly required: false;
77
+ readonly validator: ((val: unknown) => boolean) | undefined;
78
+ __epPropKey: true;
79
+ };
80
+ readonly color: {
81
+ readonly type: import("vue").PropType<string>;
82
+ readonly required: false;
83
+ readonly validator: ((val: unknown) => boolean) | undefined;
84
+ __epPropKey: true;
85
+ };
86
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
87
+ $attrs: {
88
+ [x: string]: unknown;
89
+ };
90
+ $refs: {
91
+ [x: string]: unknown;
92
+ };
93
+ $slots: Readonly<{
94
+ [name: string]: import("vue").Slot | undefined;
95
+ }>;
96
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
97
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
98
+ $emit: (event: string, ...args: any[]) => void;
99
+ $el: any;
100
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
101
+ readonly size: {
102
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
103
+ readonly required: false;
104
+ readonly validator: ((val: unknown) => boolean) | undefined;
105
+ __epPropKey: true;
106
+ };
107
+ readonly color: {
108
+ readonly type: import("vue").PropType<string>;
109
+ readonly required: false;
110
+ readonly validator: ((val: unknown) => boolean) | undefined;
111
+ __epPropKey: true;
112
+ };
113
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
114
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
115
+ created?: ((() => void) | (() => void)[]) | undefined;
116
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
117
+ mounted?: ((() => void) | (() => void)[]) | undefined;
118
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
119
+ updated?: ((() => void) | (() => void)[]) | undefined;
120
+ activated?: ((() => void) | (() => void)[]) | undefined;
121
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
122
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
123
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
124
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
125
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
126
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
127
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
128
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
129
+ };
130
+ $forceUpdate: () => void;
131
+ $nextTick: typeof import("vue").nextTick;
132
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
133
+ } & Readonly<import("vue").ExtractPropTypes<{
134
+ readonly size: {
135
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
136
+ readonly required: false;
137
+ readonly validator: ((val: unknown) => boolean) | undefined;
138
+ __epPropKey: true;
139
+ };
140
+ readonly color: {
141
+ readonly type: import("vue").PropType<string>;
142
+ readonly required: false;
143
+ readonly validator: ((val: unknown) => boolean) | undefined;
144
+ __epPropKey: true;
145
+ };
146
+ }>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
147
+ __isFragment?: undefined;
148
+ __isTeleport?: undefined;
149
+ __isSuspense?: undefined;
150
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
151
+ readonly size: {
152
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number) | ((new (...args: any[]) => string | number) | (() => string | number))[], unknown, unknown>>;
153
+ readonly required: false;
154
+ readonly validator: ((val: unknown) => boolean) | undefined;
155
+ __epPropKey: true;
156
+ };
157
+ readonly color: {
158
+ readonly type: import("vue").PropType<string>;
159
+ readonly required: false;
160
+ readonly validator: ((val: unknown) => boolean) | undefined;
161
+ __epPropKey: true;
162
+ };
163
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
164
+ $slots: {
165
+ default?(_: {}): any;
166
+ };
167
+ })>;
168
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
169
+ name: {
170
+ type: StringConstructor;
171
+ required: true;
172
+ };
173
+ type: {
174
+ type: StringConstructor;
175
+ default: string;
176
+ };
177
+ }>>, {
178
+ type: string;
179
+ }>;
180
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
181
  defaultActive: {
36
182
  type: BooleanConstructor;
37
183
  default: boolean;
@@ -40,13 +186,20 @@ declare const _default: import("vue").DefineComponent<{
40
186
  type: StringConstructor;
41
187
  default: string;
42
188
  };
43
- expand: {
189
+ showLine: {
44
190
  type: BooleanConstructor;
45
191
  default: boolean;
46
192
  };
47
- }>>, {
193
+ modelValue: {
194
+ type: BooleanConstructor;
195
+ default: boolean;
196
+ };
197
+ }>> & {
198
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
199
+ }, {
200
+ modelValue: boolean;
48
201
  defaultActive: boolean;
49
202
  title: string;
50
- expand: boolean;
203
+ showLine: boolean;
51
204
  }>;
52
205
  export default _default;
@@ -1,18 +1,17 @@
1
- import { createElementVNode, defineComponent, ref, watch, openBlock, createElementBlock, toDisplayString, unref, createCommentVNode, renderSlot } from 'vue';
1
+ import { defineComponent, ref, watch, openBlock, createElementBlock, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, unref, withDirectives, vShow } from 'vue';
2
2
  import '../../../hooks/index.mjs';
3
+ import HzztIcon from '../../icon/src/index.mjs';
3
4
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
5
  import { useLocale } from '../../../hooks/use-locale/index.mjs';
5
6
 
6
- const _hoisted_1 = { class: "hzzt-collapse" };
7
- const _hoisted_2 = { class: "flex align-items-center" };
8
- const _hoisted_3 = { class: "hzzt-collapse-title-wrapper" };
9
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-title-block" }, null, -1);
10
- const _hoisted_5 = { class: "hzzt-collapse-title" };
11
- const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "hzzt-collapse-line" }, null, -1);
12
- const _hoisted_7 = {
7
+ const _hoisted_1 = { class: "hzzt-collapse flex column" };
8
+ const _hoisted_2 = { class: "hzzt-collapse__top" };
9
+ const _hoisted_3 = { class: "hzzt-collapse__title" };
10
+ const _hoisted_4 = {
13
11
  key: 0,
14
- class: "hzzt-collapse-text"
12
+ class: "hzzt-collapse__line"
15
13
  };
14
+ const _hoisted_5 = { class: "hzzt-collapse__content flex-1" };
16
15
  const __default__ = defineComponent({
17
16
  name: "HzztCollapse"
18
17
  });
@@ -21,44 +20,66 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
20
  props: {
22
21
  defaultActive: {
23
22
  type: Boolean,
24
- default: false
23
+ default: true
25
24
  },
26
25
  title: {
27
26
  type: String,
28
27
  default: ""
29
28
  },
30
- expand: {
29
+ showLine: {
30
+ type: Boolean,
31
+ default: true
32
+ },
33
+ modelValue: {
31
34
  type: Boolean,
32
35
  default: true
33
36
  }
34
37
  },
35
- setup(__props) {
38
+ emits: ["update:modelValue"],
39
+ setup(__props, { emit }) {
36
40
  const props = __props;
37
41
  const { t } = useLocale();
38
- const active = ref(props.defaultActive);
39
- watch(() => props.defaultActive, (val) => {
40
- active.value = val;
42
+ const expand = ref(props.modelValue);
43
+ if (!props.defaultActive) {
44
+ emit("update:modelValue", false);
45
+ expand.value = false;
46
+ }
47
+ watch(() => props.modelValue, (v) => {
48
+ expand.value = v;
41
49
  });
42
50
  function toggle() {
43
- active.value = !active.value;
51
+ expand.value = !expand.value;
52
+ emit("update:modelValue", expand.value);
44
53
  }
45
54
  return (_ctx, _cache) => {
46
55
  return openBlock(), createElementBlock("div", _hoisted_1, [
47
- createElementVNode("div", {
48
- class: "hzzt-collapse-header",
49
- onClick: toggle
50
- }, [
51
- createElementVNode("div", _hoisted_2, [
52
- createElementVNode("div", _hoisted_3, [
53
- _hoisted_4,
54
- createElementVNode("div", _hoisted_5, toDisplayString(__props.title), 1)
55
- ]),
56
- _hoisted_6
56
+ createElementVNode("div", _hoisted_2, [
57
+ createElementVNode("div", _hoisted_3, [
58
+ renderSlot(_ctx.$slots, "title", {}, () => [
59
+ createTextVNode(toDisplayString(__props.title), 1)
60
+ ])
57
61
  ]),
58
- __props.expand ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(active.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)) : createCommentVNode("v-if", true)
62
+ __props.showLine ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("v-if", true),
63
+ renderSlot(_ctx.$slots, "toggle-btn", {}, () => [
64
+ createElementVNode("div", {
65
+ class: "hzzt-collapse__btn",
66
+ onClick: toggle
67
+ }, [
68
+ createVNode(HzztIcon, {
69
+ name: !expand.value ? "hzzt-plus-square-outline" : "hzzt-minus-square-outline",
70
+ class: "hzzt-collapse__icon",
71
+ size: "14"
72
+ }, null, 8, ["name"]),
73
+ createElementVNode("span", null, toDisplayString(expand.value ? unref(t)("hzzt.collapse.retract") : unref(t)("hzzt.collapse.expand")), 1)
74
+ ])
75
+ ])
76
+ ]),
77
+ withDirectives(createElementVNode("div", _hoisted_5, [
78
+ renderSlot(_ctx.$slots, "default")
79
+ ], 512), [
80
+ [vShow, expand.value]
59
81
  ]),
60
- renderSlot(_ctx.$slots, "active", { active: active.value }),
61
- renderSlot(_ctx.$slots, "default")
82
+ renderSlot(_ctx.$slots, "active", { active: expand.value })
62
83
  ]);
63
84
  };
64
85
  }