vue-devui 1.0.0-rc.8 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +188 -149
  2. package/alert/index.es.js +14 -9
  3. package/alert/index.umd.js +1 -1
  4. package/alert/style.css +1 -1
  5. package/auto-complete/index.es.js +8392 -418
  6. package/auto-complete/index.umd.js +29 -5
  7. package/auto-complete/style.css +1 -1
  8. package/avatar/index.es.js +59 -74
  9. package/avatar/index.umd.js +1 -1
  10. package/badge/index.es.js +10 -4
  11. package/badge/index.umd.js +1 -1
  12. package/badge/style.css +1 -1
  13. package/button/index.es.js +191 -53
  14. package/button/index.umd.js +17 -17
  15. package/button/style.css +1 -1
  16. package/card/index.es.js +7 -3
  17. package/card/index.umd.js +1 -1
  18. package/card/style.css +1 -1
  19. package/checkbox/index.es.js +8050 -241
  20. package/checkbox/index.umd.js +27 -1
  21. package/checkbox/style.css +1 -1
  22. package/{date-picker → collapse}/index.d.ts +0 -0
  23. package/collapse/index.es.js +213 -0
  24. package/collapse/index.umd.js +1 -0
  25. package/{date-picker → collapse}/package.json +1 -1
  26. package/collapse/style.css +1 -0
  27. package/countdown/index.es.js +56 -13
  28. package/countdown/index.umd.js +1 -1
  29. package/date-picker-pro/index.d.ts +7 -0
  30. package/date-picker-pro/index.es.js +12022 -0
  31. package/date-picker-pro/index.umd.js +27 -0
  32. package/date-picker-pro/package.json +7 -0
  33. package/date-picker-pro/style.css +1 -0
  34. package/drawer/index.es.js +24 -7
  35. package/drawer/index.umd.js +1 -1
  36. package/drawer/style.css +1 -1
  37. package/dropdown/index.es.js +190 -165
  38. package/dropdown/index.umd.js +1 -1
  39. package/dropdown/style.css +1 -1
  40. package/editable-select/index.es.js +785 -145
  41. package/editable-select/index.umd.js +1 -1
  42. package/editable-select/style.css +1 -1
  43. package/form/index.es.js +399 -300
  44. package/form/index.umd.js +16 -16
  45. package/form/style.css +1 -1
  46. package/fullscreen/index.es.js +2 -2
  47. package/fullscreen/index.umd.js +1 -1
  48. package/grid/index.es.js +8 -6
  49. package/grid/index.umd.js +1 -1
  50. package/icon/index.es.js +185 -23
  51. package/icon/index.umd.js +1 -1
  52. package/icon/style.css +1 -0
  53. package/image-preview/index.es.js +2 -2
  54. package/image-preview/index.umd.js +1 -1
  55. package/image-preview/style.css +1 -1
  56. package/input/index.es.js +8220 -45
  57. package/input/index.umd.js +27 -1
  58. package/input/style.css +1 -1
  59. package/input-number/index.es.js +279 -204
  60. package/input-number/index.umd.js +1 -1
  61. package/input-number/style.css +1 -1
  62. package/layout/index.es.js +3 -3
  63. package/layout/index.umd.js +1 -1
  64. package/loading/index.es.js +53 -53
  65. package/loading/index.umd.js +1 -1
  66. package/loading/style.css +1 -1
  67. package/mention/index.d.ts +7 -0
  68. package/mention/index.es.js +8319 -0
  69. package/mention/index.umd.js +36 -0
  70. package/mention/package.json +7 -0
  71. package/mention/style.css +1 -0
  72. package/menu/index.d.ts +7 -0
  73. package/menu/index.es.js +921 -0
  74. package/menu/index.umd.js +1 -0
  75. package/menu/package.json +7 -0
  76. package/menu/style.css +1 -0
  77. package/message/index.d.ts +7 -0
  78. package/message/index.es.js +539 -0
  79. package/message/index.umd.js +1 -0
  80. package/message/package.json +7 -0
  81. package/message/style.css +1 -0
  82. package/modal/index.es.js +451 -173
  83. package/modal/index.umd.js +1 -1
  84. package/modal/style.css +1 -1
  85. package/notification/index.es.js +212 -70
  86. package/notification/index.umd.js +1 -1
  87. package/notification/style.css +1 -1
  88. package/nuxt/components/CheckboxButton.js +3 -0
  89. package/nuxt/components/Collapse.js +3 -0
  90. package/nuxt/components/CollapseItem.js +3 -0
  91. package/nuxt/components/DRangeDatePickerPro.js +3 -0
  92. package/nuxt/components/DatePickerPro.js +3 -0
  93. package/nuxt/components/Icon.js +1 -0
  94. package/nuxt/components/IconGroup.js +3 -0
  95. package/nuxt/components/LABEL_DATA.js +3 -0
  96. package/nuxt/components/Mention.js +3 -0
  97. package/nuxt/components/Menu.js +3 -0
  98. package/nuxt/components/MenuItem.js +3 -0
  99. package/nuxt/components/Message.js +3 -0
  100. package/nuxt/components/Option.js +3 -0
  101. package/nuxt/components/OptionGroup.js +3 -0
  102. package/nuxt/components/RadioButton.js +3 -0
  103. package/nuxt/components/Step.js +3 -0
  104. package/nuxt/components/Steps.js +3 -0
  105. package/nuxt/components/SubMenu.js +3 -0
  106. package/nuxt/components/TABLE_TOKEN.js +3 -0
  107. package/nuxt/components/TimePicker.js +3 -0
  108. package/nuxt/components/TimeSelect.js +3 -0
  109. package/nuxt/components/animationInjectionKey.js +3 -0
  110. package/nuxt/components/collapseItemProps.js +3 -0
  111. package/nuxt/components/collapseProps.js +3 -0
  112. package/nuxt/components/datePickerProCommonProps.js +3 -0
  113. package/nuxt/components/datePickerProPanelProps.js +3 -0
  114. package/nuxt/components/datePickerProProps.js +3 -0
  115. package/nuxt/components/iconProps.js +1 -0
  116. package/nuxt/components/mentionProps.js +3 -0
  117. package/nuxt/components/messageProps.js +3 -0
  118. package/nuxt/components/paginationInjectionKey.js +3 -0
  119. package/nuxt/components/roundInjectionKey.js +3 -0
  120. package/nuxt/components/skeletonItemProps.js +3 -0
  121. package/nuxt/components/stepProps.js +3 -0
  122. package/nuxt/components/stepsProps.js +3 -0
  123. package/nuxt/components/svgIconProps.js +3 -0
  124. package/nuxt/components/tableProps.js +3 -0
  125. package/nuxt/components/timerPickerPanelProps.js +3 -0
  126. package/nuxt/components/treeNodeProps.js +3 -0
  127. package/overlay/index.es.js +89 -142
  128. package/overlay/index.umd.js +1 -1
  129. package/overlay/style.css +1 -1
  130. package/package.json +8 -4
  131. package/pagination/index.es.js +10180 -129
  132. package/pagination/index.umd.js +27 -1
  133. package/pagination/style.css +1 -1
  134. package/panel/index.es.js +4 -0
  135. package/panel/index.umd.js +1 -1
  136. package/panel/style.css +1 -1
  137. package/popover/index.es.js +262 -229
  138. package/popover/index.umd.js +15 -15
  139. package/popover/style.css +1 -1
  140. package/progress/index.es.js +2 -2
  141. package/progress/index.umd.js +2 -2
  142. package/progress/style.css +1 -1
  143. package/radio/index.es.js +7954 -156
  144. package/radio/index.umd.js +27 -1
  145. package/radio/style.css +1 -1
  146. package/rate/index.es.js +16 -8
  147. package/rate/index.umd.js +1 -1
  148. package/rate/style.css +1 -1
  149. package/result/index.es.js +170 -22
  150. package/result/index.umd.js +1 -1
  151. package/result/style.css +1 -1
  152. package/search/index.es.js +3829 -1042
  153. package/search/index.umd.js +18 -18
  154. package/search/style.css +1 -1
  155. package/select/index.es.js +9202 -495
  156. package/select/index.umd.js +27 -1
  157. package/select/style.css +1 -1
  158. package/skeleton/index.es.js +89 -263
  159. package/skeleton/index.umd.js +1 -1
  160. package/skeleton/style.css +1 -1
  161. package/slider/index.es.js +118 -145
  162. package/slider/index.umd.js +1 -1
  163. package/slider/style.css +1 -1
  164. package/splitter/index.es.js +454 -233
  165. package/splitter/index.umd.js +13 -13
  166. package/splitter/style.css +1 -1
  167. package/statistic/index.es.js +34 -16
  168. package/statistic/index.umd.js +1 -1
  169. package/statistic/style.css +1 -1
  170. package/status/index.es.js +6 -2
  171. package/status/index.umd.js +1 -1
  172. package/status/style.css +1 -1
  173. package/steps/index.d.ts +7 -0
  174. package/steps/index.es.js +387 -0
  175. package/steps/index.umd.js +1 -0
  176. package/steps/package.json +7 -0
  177. package/steps/style.css +1 -0
  178. package/style.css +1 -1
  179. package/switch/index.es.js +7787 -62
  180. package/switch/index.umd.js +27 -1
  181. package/switch/style.css +1 -1
  182. package/table/index.es.js +5225 -1726
  183. package/table/index.umd.js +18 -18
  184. package/table/style.css +1 -1
  185. package/tabs/index.es.js +303 -102
  186. package/tabs/index.umd.js +1 -1
  187. package/tabs/style.css +1 -1
  188. package/tag/index.es.js +11 -8
  189. package/tag/index.umd.js +1 -1
  190. package/tag/style.css +1 -1
  191. package/textarea/index.es.js +7876 -41
  192. package/textarea/index.umd.js +35 -1
  193. package/textarea/style.css +1 -1
  194. package/time-picker/index.d.ts +7 -0
  195. package/time-picker/index.es.js +9549 -0
  196. package/time-picker/index.umd.js +27 -0
  197. package/time-picker/package.json +7 -0
  198. package/time-picker/style.css +1 -0
  199. package/time-select/index.d.ts +7 -0
  200. package/time-select/index.es.js +9607 -0
  201. package/time-select/index.umd.js +27 -0
  202. package/time-select/package.json +7 -0
  203. package/time-select/style.css +1 -0
  204. package/timeline/index.es.js +170 -22
  205. package/timeline/index.umd.js +1 -1
  206. package/timeline/style.css +1 -1
  207. package/tooltip/index.es.js +286 -238
  208. package/tooltip/index.umd.js +14 -14
  209. package/tooltip/style.css +1 -1
  210. package/tree/index.es.js +11342 -793
  211. package/tree/index.umd.js +27 -1
  212. package/tree/style.css +1 -1
  213. package/upload/index.es.js +458 -102
  214. package/upload/index.umd.js +1 -1
  215. package/upload/style.css +1 -1
  216. package/vue-devui.es.js +20475 -11072
  217. package/vue-devui.umd.js +31 -24
  218. package/date-picker/index.es.js +0 -1097
  219. package/date-picker/index.umd.js +0 -1
  220. package/date-picker/style.css +0 -1
  221. package/nuxt/components/DatePicker.js +0 -3
  222. package/nuxt/components/FormControl.js +0 -3
  223. package/nuxt/components/FormLabel.js +0 -3
  224. package/nuxt/components/Loading.js +0 -3
  225. package/nuxt/components/StickSlider.js +0 -3
  226. package/nuxt/components/formControlProps.js +0 -3
  227. package/nuxt/components/overlayEmits.js +0 -3
  228. package/nuxt/components/overlayProps.js +0 -3
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, createVNode } from "vue";
1
+ import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps } from "vue";
2
2
  const resultProps = {
3
3
  icon: {
4
4
  type: String,
@@ -13,6 +13,7 @@ const resultProps = {
13
13
  default: ""
14
14
  }
15
15
  };
16
+ const DEFAULT_PREFIX = "icon";
16
17
  const iconProps = {
17
18
  name: {
18
19
  type: String,
@@ -20,43 +21,190 @@ const iconProps = {
20
21
  required: true
21
22
  },
22
23
  size: {
23
- type: String,
24
+ type: [Number, String],
24
25
  default: "inherit"
25
26
  },
26
27
  color: {
27
28
  type: String,
28
29
  default: "inherit"
29
30
  },
31
+ component: {
32
+ type: Object,
33
+ default: null
34
+ },
30
35
  classPrefix: {
31
36
  type: String,
32
- default: "icon"
37
+ default: DEFAULT_PREFIX
38
+ },
39
+ operable: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ rotate: {
48
+ type: [Number, String]
33
49
  }
34
50
  };
35
- var Icon = defineComponent({
36
- name: "DIcon",
37
- props: iconProps,
51
+ const svgIconProps = {
52
+ name: {
53
+ type: String,
54
+ default: "",
55
+ required: true
56
+ },
57
+ color: {
58
+ type: String,
59
+ default: "inherit"
60
+ },
61
+ size: {
62
+ type: [Number, String],
63
+ default: "inherit"
64
+ }
65
+ };
66
+ function createBem(namespace, element, modifier) {
67
+ let cls = namespace;
68
+ if (element) {
69
+ cls += `__${element}`;
70
+ }
71
+ if (modifier) {
72
+ cls += `--${modifier}`;
73
+ }
74
+ return cls;
75
+ }
76
+ function useNamespace(block, needDot = false) {
77
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
78
+ const b = () => createBem(namespace);
79
+ const e = (element) => element ? createBem(namespace, element) : "";
80
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
81
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
82
+ return {
83
+ b,
84
+ e,
85
+ m,
86
+ em
87
+ };
88
+ }
89
+ var icon = "";
90
+ var svgIcon = defineComponent({
91
+ name: "DSvgIcon",
92
+ props: svgIconProps,
38
93
  setup(props) {
39
94
  const {
40
95
  name,
41
- size,
42
96
  color,
43
- classPrefix
97
+ size
44
98
  } = toRefs(props);
99
+ const ns = useNamespace("svg-icon");
100
+ const iconName = computed(() => `#icon-${name.value}`);
101
+ const iconSize = computed(() => {
102
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
103
+ });
104
+ const styles = {
105
+ width: iconSize.value,
106
+ height: iconSize.value
107
+ };
45
108
  return () => {
46
- return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
47
- "src": name.value,
48
- "alt": name.value.split("/")[name.value.split("/").length - 1],
49
- "style": {
50
- width: size.value,
51
- verticalAlign: "text-bottom"
52
- }
53
- }, null) : createVNode("i", {
54
- "class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
55
- "style": {
56
- fontSize: size.value,
57
- color: color.value
58
- }
59
- }, null);
109
+ return createVNode("svg", {
110
+ "class": ns.b(),
111
+ "style": styles
112
+ }, [createVNode("use", {
113
+ "xlink:href": iconName.value,
114
+ "fill": color.value
115
+ }, null)]);
116
+ };
117
+ }
118
+ });
119
+ function isUrl(value) {
120
+ return /^((http|https):)?\/\//.test(value);
121
+ }
122
+ function useIconDom(props, ctx) {
123
+ const {
124
+ component,
125
+ name,
126
+ size,
127
+ color,
128
+ classPrefix,
129
+ rotate
130
+ } = toRefs(props);
131
+ const ns = useNamespace("icon");
132
+ const iconSize = computed(() => {
133
+ return typeof size.value === "number" ? `${size.value}px` : size.value;
134
+ });
135
+ const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
136
+ const imgIconDom = () => {
137
+ return createVNode("img", mergeProps({
138
+ "src": name.value,
139
+ "alt": name.value.split("/")[name.value.split("/").length - 1],
140
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
141
+ "style": {
142
+ width: iconSize.value || "",
143
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
144
+ verticalAlign: "middle"
145
+ }
146
+ }, ctx.attrs), null);
147
+ };
148
+ const svgIconDom = () => {
149
+ return createVNode(IconComponent, mergeProps({
150
+ "name": name.value,
151
+ "color": color.value,
152
+ "size": iconSize.value,
153
+ "class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
154
+ "style": {
155
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
156
+ }
157
+ }, ctx.attrs), null);
158
+ };
159
+ const fontIconDom = () => {
160
+ const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
161
+ return createVNode("i", mergeProps({
162
+ "class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
163
+ "style": {
164
+ fontSize: iconSize.value,
165
+ color: color.value,
166
+ transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
167
+ }
168
+ }, ctx.attrs), null);
169
+ };
170
+ const iconDom = () => {
171
+ return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
172
+ };
173
+ return {
174
+ iconDom
175
+ };
176
+ }
177
+ var Icon = defineComponent({
178
+ name: "DIcon",
179
+ props: iconProps,
180
+ emits: ["click"],
181
+ setup(props, ctx) {
182
+ const {
183
+ disabled,
184
+ operable
185
+ } = toRefs(props);
186
+ const {
187
+ iconDom
188
+ } = useIconDom(props, ctx);
189
+ const ns = useNamespace("icon");
190
+ const wrapClassed = computed(() => ({
191
+ [ns.e("container")]: true,
192
+ [ns.m("disabled")]: disabled.value,
193
+ [ns.m("operable")]: operable.value,
194
+ [ns.m("no-slots")]: !Object.keys(ctx.slots).length
195
+ }));
196
+ const onClick = (e) => {
197
+ if (disabled.value) {
198
+ return;
199
+ }
200
+ ctx.emit("click", e);
201
+ };
202
+ return () => {
203
+ var _a, _b, _c, _d;
204
+ return createVNode("div", {
205
+ "class": wrapClassed.value,
206
+ "onClick": onClick
207
+ }, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
60
208
  };
61
209
  }
62
210
  });
@@ -1 +1 @@
1
- (function(s,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis!="undefined"?globalThis:s||self,e(s.index={},s.Vue))})(this,function(s,e){"use strict";const u={icon:{type:String,default:"info"},title:{type:String,default:""},desc:{type:String,default:""}},c={name:{type:String,default:"",required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}};var f=e.defineComponent({name:"DIcon",props:c,setup(i){const{name:t,size:n,color:l,classPrefix:o}=e.toRefs(i);return()=>/^((https?):)?\/\//.test(t.value)?e.createVNode("img",{src:t.value,alt:t.value.split("/")[t.value.split("/").length-1],style:{width:n.value,verticalAlign:"text-bottom"}},null):e.createVNode("i",{class:`${o.value} ${o.value}-${t.value}`,style:{fontSize:n.value,color:l.value}},null)}}),v="",r=e.defineComponent({name:"DResult",props:u,setup(i,t){let n;return function(l){l.success="right-o",l.danger="error-o",l.warning="warning-o",l.info="info-o"}(n||(n={})),()=>{var l,o,a,d;return e.createVNode("div",{class:"devui-result"},[t.slots.icon?e.createVNode("div",null,[(l=t.slots)==null?void 0:l.icon()]):e.createVNode(f,{name:n[i.icon]||"",class:`devui-result__icon-${i.icon}`,size:"64px"},null),e.createVNode("div",{class:"devui-result__title"},[t.slots.title?(o=t.slots)==null?void 0:o.title():i.title]),e.createVNode("div",{class:"devui-result__desc"},[t.slots.desc?(a=t.slots)==null?void 0:a.desc():i.desc]),e.createVNode("div",{class:"devui-result__extra"},[t.slots.extra?(d=t.slots)==null?void 0:d.extra():""])])}}}),p={title:"Result \u7ED3\u679C",category:"\u53CD\u9988",status:"100%",install(i){i.component(r.name,r)}};s.Result=r,s.default=p,s.resultProps=u,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
1
+ (function(u,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis!="undefined"?globalThis:u||self,e(u.index={},u.Vue))})(this,function(u,e){"use strict";const y={icon:{type:String,default:"info"},title:{type:String,default:""},desc:{type:String,default:""}},b={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},h={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function f(o,s,l){let n=o;return s&&(n+=`__${s}`),l&&(n+=`--${l}`),n}function v(o,s=!1){const l=s?`.devui-${o}`:`devui-${o}`;return{b:()=>f(l),e:t=>t?f(l,t):"",m:t=>t?f(l,"",t):"",em:(t,c)=>t&&c?f(l,t,c):""}}var z="",N=e.defineComponent({name:"DSvgIcon",props:h,setup(o){const{name:s,color:l,size:n}=e.toRefs(o),r=v("svg-icon"),i=e.computed(()=>`#icon-${s.value}`),a=e.computed(()=>typeof n.value=="number"?`${n.value}px`:n.value),t={width:a.value,height:a.value};return()=>e.createVNode("svg",{class:r.b(),style:t},[e.createVNode("use",{"xlink:href":i.value,fill:l.value},null)])}});function S(o){return/^((http|https):)?\/\//.test(o)}function D(o,s){const{component:l,name:n,size:r,color:i,classPrefix:a,rotate:t}=e.toRefs(o),c=v("icon"),d=e.computed(()=>typeof r.value=="number"?`${r.value}px`:r.value),p=l.value?e.resolveDynamicComponent(l.value):e.resolveDynamicComponent(N),m=()=>e.createVNode("img",e.mergeProps({src:n.value,alt:n.value.split("/")[n.value.split("/").length-1],class:[(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{width:d.value||"",transform:`rotate(${t==null?void 0:t.value}deg)`,verticalAlign:"middle"}},s.attrs),null),$=()=>e.createVNode(p,e.mergeProps({name:n.value,color:i.value,size:d.value,class:[(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null),C=()=>{const P=/^icon-/.test(n.value)?n.value:`${a.value}-${n.value}`;return e.createVNode("i",e.mergeProps({class:[a.value,P,(t==null?void 0:t.value)==="infinite"&&c.m("spin")],style:{fontSize:d.value,color:i.value,transform:`rotate(${t==null?void 0:t.value}deg)`}},s.attrs),null)};return{iconDom:()=>l.value?$():S(n.value)?m():C()}}var _=e.defineComponent({name:"DIcon",props:b,emits:["click"],setup(o,s){const{disabled:l,operable:n}=e.toRefs(o),{iconDom:r}=D(o,s),i=v("icon"),a=e.computed(()=>({[i.e("container")]:!0,[i.m("disabled")]:l.value,[i.m("operable")]:n.value,[i.m("no-slots")]:!Object.keys(s.slots).length})),t=c=>{l.value||s.emit("click",c)};return()=>{var c,d,p,m;return e.createVNode("div",{class:a.value,onClick:t},[(d=(c=s.slots).prefix)==null?void 0:d.call(c),r(),(m=(p=s.slots).suffix)==null?void 0:m.call(p)])}}}),R="",g=e.defineComponent({name:"DResult",props:y,setup(o,s){let l;return function(n){n.success="right-o",n.danger="error-o",n.warning="warning-o",n.info="info-o"}(l||(l={})),()=>{var n,r,i,a;return e.createVNode("div",{class:"devui-result"},[s.slots.icon?e.createVNode("div",null,[(n=s.slots)==null?void 0:n.icon()]):e.createVNode(_,{name:l[o.icon]||"",class:`devui-result__icon-${o.icon}`,size:"64px"},null),e.createVNode("div",{class:"devui-result__title"},[s.slots.title?(r=s.slots)==null?void 0:r.title():o.title]),e.createVNode("div",{class:"devui-result__desc"},[s.slots.desc?(i=s.slots)==null?void 0:i.desc():o.desc]),e.createVNode("div",{class:"devui-result__extra"},[s.slots.extra?(a=s.slots)==null?void 0:a.extra():""])])}}}),V={title:"Result \u7ED3\u679C",category:"\u53CD\u9988",status:"100%",install(o){o.component(g.name,g)}};u.Result=g,u.default=V,u.resultProps=y,Object.defineProperty(u,"__esModule",{value:!0}),u[Symbol.toStringTag]="Module"});
package/result/style.css CHANGED
@@ -1 +1 @@
1
- .devui-result{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;padding:30px}.devui-result__icon-success:before{color:var(--devui-success, #50d4ab)}.devui-result__icon-danger:before{color:var(--devui-danger, #f66f6a)}.devui-result__icon-warning:before{color:var(--devui-warning, #fac20a)}.devui-result__icon-info:before{color:var(--devui-info, #5e7ce0)}.devui-result__title{margin-top:20px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size-lg, 14px)}.devui-result__desc{margin-top:10px;color:var(--devui-text-weak, #575d6c);font-size:var(--devui-font-size-md, 12px)}.devui-result__extra{margin-top:30px}
1
+ .devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--no-slots i,.devui-icon--no-slots img{display:block}.devui-icon--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #adb0b8)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 2px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-result{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;padding:30px}.devui-result__icon-success:before{color:var(--devui-success, #50d4ab)}.devui-result__icon-danger:before{color:var(--devui-danger, #f66f6a)}.devui-result__icon-warning:before{color:var(--devui-warning, #fac20a)}.devui-result__icon-info:before{color:var(--devui-info, #5e7ce0)}.devui-result__title{margin-top:20px;color:var(--devui-text, #252b3a);font-size:var(--devui-font-size-lg, 14px)}.devui-result__desc{margin-top:10px;color:var(--devui-text-weak, #575d6c);font-size:var(--devui-font-size-md, 14px)}.devui-result__extra{margin-top:30px}