@meethive/components 0.0.13 → 0.0.15

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 (57) hide show
  1. package/es/EditTable/Body.js +108 -24
  2. package/es/EditTable/EditTable.js +111 -35
  3. package/es/EditTable/FormItem.js +46 -18
  4. package/es/EditTable/Group.js +167 -53
  5. package/es/EditTable/Header.js +79 -21
  6. package/es/EditTable/components/ContextMenu/Menu.js +79 -29
  7. package/es/EditTable/components/Search/Search.js +132 -33
  8. package/es/EditTable/components/Search/Sort.js +91 -32
  9. package/es/FullPage/FullPage.js +23 -9
  10. package/es/Icon/Icon.js +43 -23
  11. package/es/Markdown/Markdown.js +9 -4
  12. package/es/RadioButton/RadioButton.js +31 -12
  13. package/es/Skeleton/Skeleton.js +33 -9
  14. package/es/Skeleton/components/DashBoardCard.js +40 -9
  15. package/es/Skeleton/components/DashBoardChart.js +67 -9
  16. package/es/Skeleton/components/Detail.js +75 -9
  17. package/es/Skeleton/components/Drawer.js +59 -9
  18. package/es/Skeleton/components/Item.js +17 -7
  19. package/es/Skeleton/components/List.js +27 -11
  20. package/es/Skeleton/components/ListCard.js +36 -10
  21. package/es/Skeleton/components/ListCardItem.js +71 -8
  22. package/es/Skeleton/components/ListTable.js +53 -9
  23. package/es/Skeleton/components/Page.js +40 -10
  24. package/es/Skeleton/components/Search.js +39 -8
  25. package/es/Skeleton/components/Tree.js +46 -9
  26. package/es/TimeFormat/TimeFormat.js +18 -9
  27. package/es/Title/Title.js +22 -10
  28. package/es/ValueItem/ValueItem.js +171 -43
  29. package/lib/EditTable/Body.js +108 -24
  30. package/lib/EditTable/EditTable.js +111 -35
  31. package/lib/EditTable/FormItem.js +46 -18
  32. package/lib/EditTable/Group.js +167 -53
  33. package/lib/EditTable/Header.js +79 -21
  34. package/lib/EditTable/components/ContextMenu/Menu.js +79 -29
  35. package/lib/EditTable/components/Search/Search.js +132 -33
  36. package/lib/EditTable/components/Search/Sort.js +91 -32
  37. package/lib/FullPage/FullPage.js +23 -9
  38. package/lib/Icon/Icon.js +43 -23
  39. package/lib/Markdown/Markdown.js +9 -4
  40. package/lib/RadioButton/RadioButton.js +31 -12
  41. package/lib/Skeleton/Skeleton.js +33 -9
  42. package/lib/Skeleton/components/DashBoardCard.js +40 -9
  43. package/lib/Skeleton/components/DashBoardChart.js +67 -9
  44. package/lib/Skeleton/components/Detail.js +75 -9
  45. package/lib/Skeleton/components/Drawer.js +59 -9
  46. package/lib/Skeleton/components/Item.js +17 -7
  47. package/lib/Skeleton/components/List.js +27 -11
  48. package/lib/Skeleton/components/ListCard.js +36 -10
  49. package/lib/Skeleton/components/ListCardItem.js +71 -8
  50. package/lib/Skeleton/components/ListTable.js +53 -9
  51. package/lib/Skeleton/components/Page.js +40 -10
  52. package/lib/Skeleton/components/Search.js +39 -8
  53. package/lib/Skeleton/components/Tree.js +46 -9
  54. package/lib/TimeFormat/TimeFormat.js +18 -9
  55. package/lib/Title/Title.js +22 -10
  56. package/lib/ValueItem/ValueItem.js +171 -43
  57. package/package.json +9 -9
@@ -1,35 +1,57 @@
1
- import { defineComponent, ref, computed } from 'vue';
2
- import { Space as ASpace, Input as AInput, Button as AButton } from 'ant-design-vue';
3
- import EditTable from '../../EditTable.js';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "jetlinks-table-search"
5
+ };
6
+ const _hoisted_2 = {
7
+ class: "jetlinks-table-search-header"
8
+ };
9
+ const _hoisted_3 = {
10
+ key: 0,
11
+ style: {
12
+ "margin": "12px 0"
13
+ }
14
+ };
15
+ const _hoisted_4 = {
16
+ key: 0
17
+ };
18
+ const _hoisted_5 = {
19
+ key: 1
20
+ };
21
+ const _hoisted_6 = {
22
+ key: 1
23
+ };
24
+ const _hoisted_7 = {
25
+ class: "jetlinks-table-search-result-total"
26
+ };
27
+ import { ref, computed } from 'vue';
28
+ import Table from '../../EditTable.js';
4
29
  import DragModal from '../../../DragModal/DragModal.js';
5
30
  import Ellipsis from '../../../Ellipsis/Ellipsis.js';
6
31
  import { useTableDataSource, useTableOpenGroup, useTableTool, useGroupOptions } from '../../context';
7
32
  import { useLocaleReceiver } from '../../../LocaleReciver';
8
33
  import { isNumber, isArray, isObject, isBoolean } from 'lodash-es';
9
- export default defineComponent({
10
- name: 'JEditTableSearch',
11
- components: {
12
- ASpace,
13
- AInput,
14
- AButton,
15
- EditTable,
16
- DragModal,
17
- Ellipsis
34
+ const __sfc_main__ = _defineComponent({
35
+ ...{
36
+ name: 'JEditTableSearch'
18
37
  },
38
+ __name: 'Search',
19
39
  props: {
20
40
  searchKey: {
21
41
  type: String,
22
- default: 'id'
42
+ required: false
23
43
  },
24
44
  columns: {
25
45
  type: Array,
26
- default: undefined
46
+ required: false
27
47
  }
28
48
  },
29
49
  emits: ['close'],
30
- setup(props, {
31
- emit
50
+ setup(__props, {
51
+ emit: __emit
32
52
  }) {
53
+ const props = __props;
54
+ const emit = __emit;
33
55
  const [contextLocale] = useLocaleReceiver('EditTable');
34
56
  const dataSource = useTableDataSource();
35
57
  const openGroup = useTableOpenGroup();
@@ -70,7 +92,7 @@ export default defineComponent({
70
92
  __oldSerial: item.__serial
71
93
  }));
72
94
  const _filterArray = cloneDataSource.filter(item => {
73
- let targetValue = item[props.searchKey];
95
+ let targetValue = item[props.searchKey || 'id'];
74
96
  if (targetValue) {
75
97
  if (isNumber(targetValue) || isBoolean(targetValue)) {
76
98
  targetValue = String(targetValue);
@@ -131,21 +153,98 @@ export default defineComponent({
131
153
  selectedRowKeys.value = [record.id];
132
154
  selectedTableRow(record);
133
155
  };
134
- return {
135
- contextLocale,
136
- openGroup,
137
- searchValue,
138
- filterArray,
139
- visible,
140
- modalHeight,
141
- tableHeight,
142
- selectedRowKeys,
143
- tableRef,
144
- myColumns,
145
- search,
146
- heightChange,
147
- onClose,
148
- onSelect
156
+ return (_ctx, _cache) => {
157
+ const _component_a_input = _resolveComponent("a-input");
158
+ const _component_a_button = _resolveComponent("a-button");
159
+ const _component_a_space = _resolveComponent("a-space");
160
+ return _openBlock(), _createBlock(DragModal, {
161
+ width: 800,
162
+ height: modalHeight.value,
163
+ title: false,
164
+ footer: false,
165
+ "drag-rang": [600, 200],
166
+ "body-style": {
167
+ overflow: 'hidden'
168
+ },
169
+ onHeightChange: heightChange
170
+ }, {
171
+ default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("div", null, [_createVNode(_component_a_space, null, {
172
+ default: _withCtx(() => [_createElementVNode("span", null, _toDisplayString(_unref(contextLocale).Search.find), 1 /* TEXT */), _createVNode(_component_a_input, {
173
+ value: searchValue.value,
174
+ "onUpdate:value": _cache[0] || (_cache[0] = $event => searchValue.value = $event),
175
+ "allow-clear": "",
176
+ maxlength: 64,
177
+ placeholder: _unref(contextLocale).Search.placeholder,
178
+ onDrag: _cache[1] || (_cache[1] = _withModifiers(() => {}, ["stop"]))
179
+ }, null, 8 /* PROPS */, ["value", "placeholder"]), _createVNode(_component_a_button, {
180
+ type: "primary",
181
+ ghost: "",
182
+ onClick: _cache[2] || (_cache[2] = () => search('all'))
183
+ }, {
184
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Search.all), 1 /* TEXT */)]),
185
+ _: 1 /* STABLE */
186
+ }), _createVNode(_component_a_button, {
187
+ type: "primary",
188
+ ghost: "",
189
+ onClick: _cache[3] || (_cache[3] = () => search('prev'))
190
+ }, {
191
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Search.prev), 1 /* TEXT */)]),
192
+ _: 1 /* STABLE */
193
+ }), _createVNode(_component_a_button, {
194
+ type: "primary",
195
+ ghost: "",
196
+ onClick: _cache[4] || (_cache[4] = () => search('next'))
197
+ }, {
198
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Search.next), 1 /* TEXT */)]),
199
+ _: 1 /* STABLE */
200
+ })]),
201
+ _: 1 /* STABLE */
202
+ })]), _createElementVNode("div", null, [_createVNode(_component_a_button, {
203
+ type: "primary",
204
+ onClick: _withModifiers(onClose, ["stop"])
205
+ }, {
206
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Search.close), 1 /* TEXT */)]),
207
+ _: 1 /* STABLE */
208
+ })])]), visible.value ? (_openBlock(), _createElementBlock("div", _hoisted_3, [_createVNode(Table, {
209
+ ref_key: "tableRef",
210
+ ref: tableRef,
211
+ "data-source": filterArray.value,
212
+ columns: myColumns.value,
213
+ height: tableHeight.value,
214
+ "disable-menu": false,
215
+ "cell-height": 36,
216
+ "row-selection": {
217
+ onSelect: onSelect,
218
+ selectedRowKeys: selectedRowKeys.value
219
+ },
220
+ serial: {
221
+ width: _unref(openGroup) ? 150 : 66,
222
+ title: _unref(contextLocale).serial
223
+ }
224
+ }, {
225
+ serial: _withCtx(({
226
+ record
227
+ }) => [_unref(openGroup) ? (_openBlock(), _createElementBlock("span", _hoisted_4, [_createVNode(Ellipsis, null, {
228
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(record.expands.groupName) + " " + _toDisplayString(_unref(contextLocale).Search.rd) + " " + _toDisplayString(record.__oldSerial) + " " + _toDisplayString(_unref(contextLocale).Search.row), 1 /* TEXT */)]),
229
+ _: 2 /* DYNAMIC */
230
+ }, 1024 /* DYNAMIC_SLOTS */)])) : (_openBlock(), _createElementBlock("span", _hoisted_5, _toDisplayString(record.__oldSerial), 1 /* TEXT */))]),
231
+ id: _withCtx(({
232
+ record
233
+ }) => [_createVNode(Ellipsis, null, {
234
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(record.id), 1 /* TEXT */)]),
235
+ _: 2 /* DYNAMIC */
236
+ }, 1024 /* DYNAMIC_SLOTS */)]),
237
+ name: _withCtx(({
238
+ record
239
+ }) => [_createVNode(Ellipsis, null, {
240
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(record.name), 1 /* TEXT */)]),
241
+ _: 2 /* DYNAMIC */
242
+ }, 1024 /* DYNAMIC_SLOTS */)]),
243
+ _: 1 /* STABLE */
244
+ }, 8 /* PROPS */, ["data-source", "columns", "height", "row-selection", "serial"])])) : _createCommentVNode("v-if", true), visible.value ? (_openBlock(), _createElementBlock("div", _hoisted_6, [_createTextVNode(_toDisplayString(_unref(contextLocale).Search.found) + " ", 1 /* TEXT */), _createElementVNode("span", _hoisted_7, _toDisplayString(filterArray.value.length), 1 /* TEXT */), _createTextVNode(" " + _toDisplayString(_unref(contextLocale).Search.related), 1 /* TEXT */)])) : _createCommentVNode("v-if", true)])]),
245
+ _: 1 /* STABLE */
246
+ }, 8 /* PROPS */, ["height"]);
149
247
  };
150
248
  }
151
- });
249
+ });
250
+ export default __sfc_main__;
@@ -1,43 +1,55 @@
1
- import { defineComponent, ref, reactive } from 'vue';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "jetlinks-table-sort-content"
5
+ };
6
+ const _hoisted_2 = {
7
+ class: "jetlinks-table-sort-title"
8
+ };
9
+ const _hoisted_3 = {
10
+ class: "table-sort-body"
11
+ };
12
+ const _hoisted_4 = {
13
+ class: "jetlinks-table-sort-footer"
14
+ };
15
+ import { ref, reactive } from 'vue';
2
16
  import { Popover as APopover, Table as ATable, Space as ASpace, Button as AButton } from 'ant-design-vue';
3
17
  import { useTableTool, useTableWrapper } from '../../context';
4
18
  import { useLocaleReceiver } from '../../../LocaleReciver';
5
19
  import AIcon from '../../../Icon';
6
- export default defineComponent({
7
- name: 'JEditTableSearchSort',
8
- components: {
9
- APopover,
10
- ATable,
11
- ASpace,
12
- AButton,
13
- AIcon
20
+ const __sfc_main__ = _defineComponent({
21
+ ...{
22
+ name: 'JEditTableSearchSort'
14
23
  },
24
+ __name: 'Sort',
15
25
  props: {
16
26
  dataSource: {
17
27
  type: [Function, Array],
18
- default: () => []
28
+ required: false
19
29
  },
20
30
  sortKey: {
21
31
  type: [String, Array],
22
- default: undefined
32
+ required: false
23
33
  },
24
34
  dataIndex: {
25
35
  type: [Number, String],
26
- default: undefined
36
+ required: false
27
37
  },
28
38
  selectedRowKeys: {
29
39
  type: Array,
30
- default: () => []
40
+ required: false
31
41
  },
32
42
  active: {
33
43
  type: Boolean,
34
- default: false
44
+ required: false
35
45
  }
36
46
  },
37
- emits: ['click'],
38
- setup(props, {
39
- emit
47
+ emits: ["click"],
48
+ setup(__props, {
49
+ emit: __emit
40
50
  }) {
51
+ const props = __props;
52
+ const emit = __emit;
41
53
  const [contextLocale] = useLocaleReceiver('EditTable');
42
54
  const tableWrapperRef = useTableWrapper();
43
55
  const tableTool = useTableTool();
@@ -54,7 +66,7 @@ export default defineComponent({
54
66
  }]);
55
67
  const visibleChange = e => {
56
68
  if (e) {
57
- mySelectedRowKeys.value = props.selectedRowKeys;
69
+ mySelectedRowKeys.value = props.selectedRowKeys ?? [];
58
70
  const ds = typeof props.dataSource === 'function' ? props.dataSource() : props.dataSource;
59
71
  localDataSource.value = (ds || []).map((item, index) => Object.assign(item, {
60
72
  __index: index + 1
@@ -86,19 +98,66 @@ export default defineComponent({
86
98
  tableTool.order('desc', props.sortKey, handleSortRowKeys(), props.dataIndex);
87
99
  emit('click');
88
100
  };
89
- return {
90
- props,
91
- contextLocale,
92
- tableWrapperRef,
93
- visible,
94
- localDataSource,
95
- mySelectedRowKeys,
96
- columns,
97
- visibleChange,
98
- onSelectChange,
99
- cleanParams,
100
- onAsc,
101
- onDesc
101
+ return (_ctx, _cache) => {
102
+ return _openBlock(), _createBlock(_unref(APopover), {
103
+ trigger: "click",
104
+ placement: "bottom",
105
+ "overlay-style": {
106
+ zIndex: 1050
107
+ },
108
+ "get-popup-container": node => _unref(tableWrapperRef) || node,
109
+ onVisibleChange: visibleChange
110
+ }, {
111
+ content: _withCtx(() => [_createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, _toDisplayString(_unref(contextLocale).Sort.sort), 1 /* TEXT */), _createElementVNode("div", _hoisted_3, [visible.value ? (_openBlock(), _createBlock(_unref(ATable), {
112
+ key: 0,
113
+ size: "small",
114
+ columns: columns,
115
+ "data-source": localDataSource.value,
116
+ "row-selection": {
117
+ selectedRowKeys: mySelectedRowKeys.value,
118
+ onChange: onSelectChange
119
+ },
120
+ pagination: false,
121
+ scroll: localDataSource.value.length > 5 ? {
122
+ y: 200
123
+ } : undefined
124
+ }, null, 8 /* PROPS */, ["columns", "data-source", "row-selection", "scroll"])) : _createCommentVNode("v-if", true)]), _createElementVNode("div", _hoisted_4, [_createVNode(_unref(ASpace), {
125
+ size: 16
126
+ }, {
127
+ default: _withCtx(() => [_createVNode(_unref(AButton), {
128
+ type: "primary",
129
+ disabled: !mySelectedRowKeys.value.length,
130
+ onClick: cleanParams
131
+ }, {
132
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Sort.clean), 1 /* TEXT */)]),
133
+ _: 1 /* STABLE */
134
+ }, 8 /* PROPS */, ["disabled"]), _createVNode(_unref(AButton), {
135
+ type: "primary",
136
+ ghost: "",
137
+ onClick: onAsc
138
+ }, {
139
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Sort.up), 1 /* TEXT */)]),
140
+ _: 1 /* STABLE */
141
+ }), _createVNode(_unref(AButton), {
142
+ type: "primary",
143
+ ghost: "",
144
+ onClick: onDesc
145
+ }, {
146
+ default: _withCtx(() => [_createTextVNode(_toDisplayString(_unref(contextLocale).Sort.down), 1 /* TEXT */)]),
147
+ _: 1 /* STABLE */
148
+ })]),
149
+ _: 1 /* STABLE */
150
+ })])])]),
151
+ default: _withCtx(() => [_createVNode(_unref(AIcon), {
152
+ type: "icon-paixu",
153
+ class: _normalizeClass({
154
+ 'table-sort-icon': true,
155
+ active: props.active
156
+ })
157
+ }, null, 8 /* PROPS */, ["class"])]),
158
+ _: 1 /* STABLE */
159
+ }, 8 /* PROPS */, ["get-popup-container"]);
102
160
  };
103
161
  }
104
- });
162
+ });
163
+ export default __sfc_main__;
@@ -1,9 +1,17 @@
1
- import { defineComponent, ref, inject } from 'vue';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "full-page-warp-content"
5
+ };
6
+ import { ref, inject } from 'vue';
2
7
  import { useElementBounding } from '@vueuse/core';
3
8
  import { FullPageConfig } from '../utils/constants';
4
- export default defineComponent({
5
- name: 'JFullPage',
6
- setup() {
9
+ const __sfc_main__ = _defineComponent({
10
+ ...{
11
+ name: 'JFullPage'
12
+ },
13
+ __name: 'FullPage',
14
+ setup(__props) {
7
15
  const config = inject(FullPageConfig, {
8
16
  reduceHeight: 24
9
17
  });
@@ -11,10 +19,16 @@ export default defineComponent({
11
19
  const {
12
20
  y
13
21
  } = useElementBounding(fullPage);
14
- return {
15
- config,
16
- fullPage,
17
- y
22
+ return (_ctx, _cache) => {
23
+ return _openBlock(), _createElementBlock("div", {
24
+ class: "full-page-warp",
25
+ ref_key: "fullPage",
26
+ ref: fullPage,
27
+ style: _normalizeStyle({
28
+ minHeight: `calc(100vh - ${_unref(y) + _unref(config).reduceHeight}px)`
29
+ })
30
+ }, [_createElementVNode("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")])], 4 /* STYLE */);
18
31
  };
19
32
  }
20
- });
33
+ });
34
+ export default __sfc_main__;
package/es/Icon/Icon.js CHANGED
@@ -1,25 +1,39 @@
1
- import { defineComponent, watchEffect, inject, h } from 'vue';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
+ import { watchEffect, inject, h, useAttrs } from 'vue';
2
4
  import * as aIcon from '@ant-design/icons-vue';
3
5
  import { createFromIconfontCN } from '@ant-design/icons-vue';
4
6
  import { ComponentsEnum } from '../utils/constants';
5
- let MyIcon = createFromIconfontCN({
6
- scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
7
- });
8
- const AntdIcon = props => {
9
- return h(aIcon[props.type]);
10
- };
11
- const Icon = props => {
12
- return Object.keys(aIcon).includes(props.type) ? h(AntdIcon, props) : h(MyIcon, props);
13
- };
14
- export default defineComponent({
15
- name: 'AIcon',
16
- props: ['type', 'scriptUrl', 'class'],
17
- emits: ['click'],
18
- setup(props, {
19
- emit,
20
- attrs
7
+ const __sfc_main__ = _defineComponent({
8
+ ...{
9
+ name: 'AIcon'
10
+ },
11
+ __name: 'Icon',
12
+ props: {
13
+ type: {
14
+ type: String,
15
+ required: false
16
+ },
17
+ scriptUrl: {
18
+ type: String,
19
+ required: false
20
+ },
21
+ class: {
22
+ type: String,
23
+ required: false
24
+ }
25
+ },
26
+ emits: ["click"],
27
+ setup(__props, {
28
+ emit: __emit
21
29
  }) {
30
+ const props = __props;
31
+ const emit = __emit;
32
+ const attrs = useAttrs();
22
33
  const config = inject(ComponentsEnum.Icon, {});
34
+ let MyIcon = createFromIconfontCN({
35
+ scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
36
+ });
23
37
  watchEffect(() => {
24
38
  const url = props.scriptUrl || config.scriptUrl;
25
39
  if (url) {
@@ -28,15 +42,21 @@ export default defineComponent({
28
42
  });
29
43
  }
30
44
  });
45
+ const AntdIcon = props => {
46
+ return h(aIcon[props.type]);
47
+ };
48
+ const Icon = props => {
49
+ return Object.keys(aIcon).includes(props.type) ? h(AntdIcon, props) : h(MyIcon, props);
50
+ };
31
51
  const click = () => {
32
52
  emit('click');
33
53
  };
34
- return () => {
35
- return h(Icon, {
36
- ...props,
37
- style: attrs.style,
54
+ return (_ctx, _cache) => {
55
+ return _openBlock(), _createBlock(Icon, _mergeProps(props, {
56
+ style: _unref(attrs).style,
38
57
  onClick: click
39
- });
58
+ }), null, 16 /* FULL_PROPS */, ["style"]);
40
59
  };
41
60
  }
42
- });
61
+ });
62
+ export default __sfc_main__;
@@ -1,4 +1,4 @@
1
- import { defineComponent, onMounted, onUpdated, ref } from 'vue';
1
+ import { h, defineComponent, onMounted, onUpdated, ref } from 'vue';
2
2
  import MarkdownIt from 'markdown-it';
3
3
  import MarkdownItAbbr from 'markdown-it-abbr';
4
4
  import MarkdownItAnchor from 'markdown-it-anchor';
@@ -46,7 +46,7 @@ const props = {
46
46
  },
47
47
  quotes: {
48
48
  type: String,
49
- default: ''
49
+ default: '""\'\''
50
50
  },
51
51
  source: {
52
52
  type: String,
@@ -94,8 +94,13 @@ export default defineComponent({
94
94
  };
95
95
  onMounted(() => renderMarkdown());
96
96
  onUpdated(() => renderMarkdown());
97
- return {
98
- md
97
+ return () => {
98
+ return h('div', {
99
+ innerHTML: md.value,
100
+ style: {
101
+ height: '100%'
102
+ }
103
+ });
99
104
  };
100
105
  }
101
106
  });
@@ -1,25 +1,36 @@
1
- import { defineComponent, ref, computed, watch } from 'vue';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
3
+ const _hoisted_1 = ["onClick"];
4
+ import { ref, computed, watch } from 'vue';
2
5
  import useRadioButtonStyle from './style';
3
- export default defineComponent({
4
- name: 'JRadioButton',
6
+ const __sfc_main__ = _defineComponent({
7
+ ...{
8
+ name: 'JRadioButton'
9
+ },
10
+ __name: 'RadioButton',
5
11
  props: {
6
12
  value: {
7
13
  type: [String, Number],
14
+ required: false,
8
15
  default: undefined
9
16
  },
10
17
  options: {
11
18
  type: Array,
19
+ required: false,
12
20
  default: () => []
13
21
  },
14
22
  columns: {
15
23
  type: Number,
24
+ required: false,
16
25
  default: 3
17
26
  }
18
27
  },
19
- emits: ['update:value'],
20
- setup(props, {
21
- emit
28
+ emits: ["update:value", "select"],
29
+ setup(__props, {
30
+ emit: __emit
22
31
  }) {
32
+ const props = __props;
33
+ const emit = __emit;
23
34
  const prefixCls = computed(() => 'j-radio-button');
24
35
  const [wrapSSR, hashId] = useRadioButtonStyle(prefixCls);
25
36
  const myValue = ref(props.value);
@@ -38,11 +49,19 @@ export default defineComponent({
38
49
  watch(() => props.value, () => {
39
50
  myValue.value = props.value;
40
51
  });
41
- return {
42
- hashId,
43
- myValue,
44
- styles,
45
- onClick
52
+ return (_ctx, _cache) => {
53
+ return _openBlock(), _createElementBlock("div", {
54
+ class: _normalizeClass(['j-radio-button', _unref(hashId)]),
55
+ style: _normalizeStyle(styles.value)
56
+ }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, item => {
57
+ return _openBlock(), _createElementBlock("div", {
58
+ class: _normalizeClass(['j-radio-button-item', {
59
+ 'active': myValue.value === item.value
60
+ }]),
61
+ onClick: $event => onClick(item)
62
+ }, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1);
63
+ }), 256 /* UNKEYED_FRAGMENT */))], 6 /* CLASS, STYLE */);
46
64
  };
47
65
  }
48
- });
66
+ });
67
+ export default __sfc_main__;
@@ -1,26 +1,50 @@
1
- import { defineComponent, computed } from 'vue';
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { unref as _unref, renderSlot as _renderSlot, createCommentVNode as _createCommentVNode, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "j-skeleton-flex-column"
5
+ };
6
+ import { computed } from 'vue';
2
7
  import Item from './components/Item.js';
3
8
  import useSkeletonStyle from './style';
4
- export default defineComponent({
5
- name: 'JSkeleton',
6
- components: {
7
- Item
9
+ const __sfc_main__ = _defineComponent({
10
+ ...{
11
+ name: 'JSkeleton'
8
12
  },
13
+ __name: 'Skeleton',
9
14
  props: {
10
15
  active: {
11
16
  type: Boolean,
17
+ required: false,
12
18
  default: true
13
19
  },
14
20
  loading: {
15
21
  type: Boolean,
22
+ required: false,
16
23
  default: true
17
24
  }
18
25
  },
19
- setup(props) {
26
+ setup(__props) {
27
+ const props = __props;
20
28
  const prefixCls = computed(() => 'j-skeleton');
21
29
  const [wrapSSR, hashId] = useSkeletonStyle(prefixCls);
22
- return {
23
- hashId
30
+ return (_ctx, _cache) => {
31
+ return _openBlock(), _createElementBlock("div", {
32
+ class: _normalizeClass(['j-skeleton', _unref(hashId)])
33
+ }, [!__props.loading ? _renderSlot(_ctx.$slots, "default", {
34
+ key: 0
35
+ }) : _createCommentVNode("v-if", true), _createElementVNode("div", _hoisted_1, [_createVNode(Item, {
36
+ active: __props.active,
37
+ width: "40%"
38
+ }, null, 8 /* PROPS */, ["active"]), (_openBlock(), _createElementBlock(_Fragment, null, _renderList(3, item => {
39
+ return _createVNode(Item, {
40
+ key: item,
41
+ active: __props.active
42
+ }, null, 8 /* PROPS */, ["active"]);
43
+ }), 64 /* STABLE_FRAGMENT */)), _createVNode(Item, {
44
+ active: __props.active,
45
+ width: "80%"
46
+ }, null, 8 /* PROPS */, ["active"])])], 2 /* CLASS */);
24
47
  };
25
48
  }
26
- });
49
+ });
50
+ export default __sfc_main__;