@nutui/nutui 3.1.22-beta.0 → 3.1.22
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.
- package/CHANGELOG.md +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +4203 -19263
- package/dist/nutui.umd.js +4208 -19368
- package/dist/packages/_es/ActionSheet.js +17 -167
- package/dist/packages/_es/Address.js +110 -552
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +53 -274
- package/dist/packages/_es/AudioOperate.js +13 -121
- package/dist/packages/_es/Avatar.js +38 -177
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -120
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +30 -237
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +147 -523
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -100
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +32 -84
- package/dist/packages/_es/CollapseItem.js +59 -272
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +56 -256
- package/dist/packages/_es/CountUp.js +140 -556
- package/dist/packages/_es/DatePicker.js +98 -332
- package/dist/packages/_es/Dialog.js +60 -271
- package/dist/packages/_es/Divider.js +13 -82
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +58 -212
- package/dist/packages/_es/Ellipsis.js +64 -0
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -151
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +77 -309
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +57 -268
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +18 -124
- package/dist/packages/_es/Menu.js +45 -118
- package/dist/packages/_es/MenuItem.js +37 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +74 -397
- package/dist/packages/_es/Notify.js +72 -246
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +131 -474
- package/dist/packages/_es/OverLay.js +24 -113
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +129 -469
- package/dist/packages/_es/Popover.js +318 -975
- package/dist/packages/_es/Popup.js +55 -313
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +84 -354
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +83 -427
- package/dist/packages/_es/Rate.js +35 -137
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +37 -257
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +24 -99
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +41 -179
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +84 -509
- package/dist/packages/_es/Step.js +20 -133
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +17 -100
- package/dist/packages/_es/Swipe.js +41 -197
- package/dist/packages/_es/Swiper.js +121 -433
- package/dist/packages/_es/SwiperItem.js +22 -53
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -39
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -151
- package/dist/packages/_es/Table.js +18 -196
- package/dist/packages/_es/Tabs.js +43 -217
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +18 -98
- package/dist/packages/_es/TimePannel.js +14 -66
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +71 -329
- package/dist/packages/_es/Uploader.js +104 -468
- package/dist/packages/_es/Video.js +74 -350
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +164 -682
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/animate/index.scss +299 -0
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +18 -1
- package/dist/packages/checkbox/index.scss +16 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/ellipsis/index.scss +12 -0
- package/dist/packages/formitem/index.scss +12 -0
- package/dist/packages/griditem/index.scss +11 -0
- package/dist/packages/image/index.scss +39 -0
- package/dist/packages/imagepreview/index.scss +21 -2
- package/dist/packages/input/index.scss +26 -1
- package/dist/packages/inputnumber/index.scss +21 -0
- package/dist/packages/locale/lang/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.d.ts +8 -0
- package/dist/packages/locale/lang/en-US.js +5 -97
- package/dist/packages/locale/lang/id-ID.d.ts +8 -0
- package/dist/packages/locale/lang/id-ID.js +5 -97
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -97
- package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -97
- package/dist/packages/menu/index.scss +45 -36
- package/dist/packages/menuitem/index.scss +4 -0
- package/dist/packages/navbar/index.scss +9 -0
- package/dist/packages/pagination/index.scss +19 -0
- package/dist/packages/radio/index.scss +19 -0
- package/dist/packages/range/index.scss +19 -0
- package/dist/packages/rate/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +21 -0
- package/dist/packages/switch/index.scss +4 -3
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +6 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +192 -12
- package/dist/smartips/tags.json +70 -10
- package/dist/smartips/web-types.json +6945 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +49 -3
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +15 -15
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +54 -50
- package/dist/styles/themes/jdb.scss +54 -50
- package/dist/styles/themes/jdt.scss +54 -50
- package/dist/styles/variables-jdb.scss +22 -1
- package/dist/styles/variables-jdt.scss +22 -1
- package/dist/styles/variables.scss +22 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +2 -2
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
- package/dist/types/__VUE/animate/type.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +5 -5
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +4 -4
- package/dist/types/__VUE/button/index.vue.d.ts +6 -6
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +3 -1
- package/dist/types/__VUE/comment/index.vue.d.ts +2 -2
- package/dist/types/__VUE/configprovider/common.d.ts +20 -0
- package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +25 -10
- package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +105 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
- package/dist/types/__VUE/input/index.vue.d.ts +6 -6
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/radio/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +4 -4
- package/dist/types/__VUE/rate/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +15 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +4 -4
- package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sticky/index.vue.d.ts +4 -4
- package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tag/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +10 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +5 -5
- package/dist/types/__VUE/uploader/index.vue.d.ts +6 -6
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +6 -3
|
@@ -1,201 +1,23 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { c as
|
|
26
|
-
import { h, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
27
|
-
import { _ as
|
|
6
|
+
import { c as t } from "./component.js";
|
|
7
|
+
import { h as e, reactive as a, computed as s, watch as l, toRefs as r, resolveComponent as n, openBlock as o, createElementBlock as _, normalizeClass as u, createElementVNode as c, Fragment as i, renderList as d, createTextVNode as m, toDisplayString as p, renderSlot as y, createBlock as b, createCommentVNode as f } from "vue";
|
|
8
|
+
import { _ as v } from "./plugin-vue_export-helper.js";
|
|
28
9
|
import "../locale/lang";
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
props: {
|
|
44
|
-
bordered: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: true
|
|
47
|
-
},
|
|
48
|
-
columns: {
|
|
49
|
-
type: Array,
|
|
50
|
-
default: () => {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
data: {
|
|
55
|
-
type: Object,
|
|
56
|
-
default: () => {
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
summary: {
|
|
61
|
-
type: Function,
|
|
62
|
-
default: null
|
|
63
|
-
},
|
|
64
|
-
striped: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
emits: ["sorter"],
|
|
70
|
-
setup(props, { emit, slots }) {
|
|
71
|
-
const state = reactive({
|
|
72
|
-
curData: props.data
|
|
73
|
-
});
|
|
74
|
-
const classes = computed(() => {
|
|
75
|
-
const prefixCls = componentName2;
|
|
76
|
-
return {
|
|
77
|
-
[prefixCls]: true
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
const cellClasses = (item) => {
|
|
81
|
-
return {
|
|
82
|
-
"nut-table__main__head__tr--border": props.bordered,
|
|
83
|
-
[`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
const getColumnItem = (value) => {
|
|
87
|
-
return props.columns.filter((item) => item.key === value)[0];
|
|
88
|
-
};
|
|
89
|
-
const handleSorterClick = (item) => {
|
|
90
|
-
if (item.sorter) {
|
|
91
|
-
emit("sorter", item);
|
|
92
|
-
state.curData = typeof item.sorter === "function" ? state.curData.sort(item.sorter) : item.sorter === "default" ? state.curData.sort() : state.curData;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const sortDataItem = () => {
|
|
96
|
-
return props.columns.map((columns) => {
|
|
97
|
-
return [columns.key, columns.render];
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
watch(() => props.data, (val) => {
|
|
101
|
-
state.curData = val.slice();
|
|
102
|
-
});
|
|
103
|
-
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
104
|
-
classes,
|
|
105
|
-
cellClasses,
|
|
106
|
-
getColumnItem,
|
|
107
|
-
handleSorterClick,
|
|
108
|
-
sortDataItem,
|
|
109
|
-
translate: translate2
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
const { componentName, create, translate } = createComponent("table");
|
|
115
|
-
const _sfc_main = create(component(componentName, translate));
|
|
116
|
-
const _hoisted_1 = { class: "nut-table__main__head" };
|
|
117
|
-
const _hoisted_2 = { class: "nut-table__main__head__tr" };
|
|
118
|
-
const _hoisted_3 = ["onClick"];
|
|
119
|
-
const _hoisted_4 = { class: "nut-table__main__body" };
|
|
120
|
-
const _hoisted_5 = { key: 1 };
|
|
121
|
-
const _hoisted_6 = {
|
|
122
|
-
key: 0,
|
|
123
|
-
class: "nut-table__summary"
|
|
124
|
-
};
|
|
125
|
-
const _hoisted_7 = ["innerHTML"];
|
|
126
|
-
const _hoisted_8 = {
|
|
127
|
-
key: 1,
|
|
128
|
-
class: "nut-table__nodata"
|
|
129
|
-
};
|
|
130
|
-
const _hoisted_9 = {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: "nut-table__nodata__text"
|
|
133
|
-
};
|
|
134
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
135
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
136
|
-
const _component_RenderColumn = resolveComponent("RenderColumn");
|
|
137
|
-
return openBlock(), createElementBlock("view", {
|
|
138
|
-
class: normalizeClass(_ctx.classes)
|
|
139
|
-
}, [
|
|
140
|
-
createElementVNode("view", {
|
|
141
|
-
class: normalizeClass(["nut-table__main", { "nut-table__main--striped": _ctx.striped }])
|
|
142
|
-
}, [
|
|
143
|
-
createElementVNode("view", _hoisted_1, [
|
|
144
|
-
createElementVNode("view", _hoisted_2, [
|
|
145
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
|
|
146
|
-
return openBlock(), createElementBlock("span", {
|
|
147
|
-
class: normalizeClass(["nut-table__main__head__tr__th", _ctx.cellClasses(item)]),
|
|
148
|
-
key: item.key,
|
|
149
|
-
onClick: ($event) => _ctx.handleSorterClick(item)
|
|
150
|
-
}, [
|
|
151
|
-
createTextVNode(toDisplayString(item.title) + " ", 1),
|
|
152
|
-
renderSlot(_ctx.$slots, "icon"),
|
|
153
|
-
!_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
|
|
154
|
-
key: 0,
|
|
155
|
-
name: "down-arrow",
|
|
156
|
-
size: "12px"
|
|
157
|
-
})) : createCommentVNode("", true)
|
|
158
|
-
], 10, _hoisted_3);
|
|
159
|
-
}), 128))
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
createElementVNode("view", _hoisted_4, [
|
|
163
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
|
|
164
|
-
return openBlock(), createElementBlock("view", {
|
|
165
|
-
class: "nut-table__main__body__tr",
|
|
166
|
-
key: item
|
|
167
|
-
}, [
|
|
168
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortDataItem(), ([value, render]) => {
|
|
169
|
-
return openBlock(), createElementBlock("span", {
|
|
170
|
-
class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
|
|
171
|
-
key: value
|
|
172
|
-
}, [
|
|
173
|
-
typeof item[value] === "function" || typeof render === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
|
|
174
|
-
key: 0,
|
|
175
|
-
slots: [render, item[value]],
|
|
176
|
-
record: item
|
|
177
|
-
}, null, 8, ["slots", "record"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
|
|
178
|
-
], 2);
|
|
179
|
-
}), 128))
|
|
180
|
-
]);
|
|
181
|
-
}), 128))
|
|
182
|
-
])
|
|
183
|
-
], 2),
|
|
184
|
-
_ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
|
|
185
|
-
createElementVNode("span", {
|
|
186
|
-
class: "nut-table__summary__text",
|
|
187
|
-
innerHTML: _ctx.summary().value
|
|
188
|
-
}, null, 8, _hoisted_7)
|
|
189
|
-
])) : createCommentVNode("", true),
|
|
190
|
-
!_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
191
|
-
createElementVNode("div", {
|
|
192
|
-
class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
|
|
193
|
-
}, [
|
|
194
|
-
renderSlot(_ctx.$slots, "nodata"),
|
|
195
|
-
!_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
|
|
196
|
-
], 2)
|
|
197
|
-
])) : createCommentVNode("", true)
|
|
198
|
-
], 2);
|
|
199
|
-
}
|
|
200
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
201
|
-
export { index as default };
|
|
10
|
+
var k = { setup: (t2) => () => e("view", {}, t2.slots[0] ? t2.slots[0](t2.record) : t2.slots[1](t2.record)), props: { slots: Array, record: Object } };
|
|
11
|
+
const { componentName: w, create: C, translate: D } = t("table"), h = C(((t2, e2) => ({ components: { RenderColumn: k }, props: { bordered: { type: Boolean, default: true }, columns: { type: Array, default: () => [] }, data: { type: Object, default: () => ({}) }, summary: { type: Function, default: null }, striped: { type: Boolean, default: false } }, emits: ["sorter"], setup(n2, { emit: o2, slots: _2 }) {
|
|
12
|
+
const u2 = a({ curData: n2.data }), c2 = s(() => ({ [t2]: true }));
|
|
13
|
+
return l(() => n2.data, (t3) => {
|
|
14
|
+
u2.curData = t3.slice();
|
|
15
|
+
}), { ...r(u2), classes: c2, cellClasses: (t3) => ({ "nut-table__main__head__tr--border": n2.bordered, [`nut-table__main__head__tr--align${t3.align ? t3.align : ""}`]: true }), getColumnItem: (t3) => n2.columns.filter((e3) => e3.key === t3)[0], handleSorterClick: (t3) => {
|
|
16
|
+
t3.sorter && (o2("sorter", t3), u2.curData = typeof t3.sorter == "function" ? u2.curData.sort(t3.sorter) : t3.sorter === "default" ? u2.curData.sort() : u2.curData);
|
|
17
|
+
}, sortDataItem: () => n2.columns.map((t3) => [t3.key, t3.render]), translate: e2 };
|
|
18
|
+
} }))(w, D)), g = { class: "nut-table__main__head" }, x = { class: "nut-table__main__head__tr" }, $ = ["onClick"], j = { class: "nut-table__main__body" }, I = { key: 1 }, A = { key: 0, class: "nut-table__summary" }, B = ["innerHTML"], H = { key: 1, class: "nut-table__nodata" }, L = { key: 0, class: "nut-table__nodata__text" };
|
|
19
|
+
var M = v(h, [["render", function(t2, e2, a2, s2, l2, r2) {
|
|
20
|
+
const v2 = n("nut-icon"), k2 = n("RenderColumn");
|
|
21
|
+
return o(), _("view", { class: u(t2.classes) }, [c("view", { class: u(["nut-table__main", { "nut-table__main--striped": t2.striped }]) }, [c("view", g, [c("view", x, [(o(true), _(i, null, d(t2.columns, (e3) => (o(), _("span", { class: u(["nut-table__main__head__tr__th", t2.cellClasses(e3)]), key: e3.key, onClick: (a3) => t2.handleSorterClick(e3) }, [m(p(e3.title) + " ", 1), y(t2.$slots, "icon"), !t2.$slots.icon && e3.sorter ? (o(), b(v2, { key: 0, name: "down-arrow", size: "12px" })) : f("", true)], 10, $))), 128))])]), c("view", j, [(o(true), _(i, null, d(t2.curData, (e3) => (o(), _("view", { class: "nut-table__main__body__tr", key: e3 }, [(o(true), _(i, null, d(t2.sortDataItem(), ([a3, s3]) => (o(), _("span", { class: u(["nut-table__main__body__tr__td", t2.cellClasses(t2.getColumnItem(a3))]), key: a3 }, [typeof e3[a3] == "function" || typeof s3 == "function" ? (o(), b(k2, { key: 0, slots: [s3, e3[a3]], record: e3 }, null, 8, ["slots", "record"])) : (o(), _("view", I, p(e3[a3]), 1))], 2))), 128))]))), 128))])], 2), t2.summary ? (o(), _("view", A, [c("span", { class: "nut-table__summary__text", innerHTML: t2.summary().value }, null, 8, B)])) : f("", true), t2.curData.length ? f("", true) : (o(), _("view", H, [c("div", { class: u(["nut-table__nodata", { "nut-table__nodata--border": t2.bordered }]) }, [y(t2.$slots, "nodata"), t2.$slots.nodata ? f("", true) : (o(), _("div", L, p(t2.translate("noData")), 1))], 2)]))], 2);
|
|
22
|
+
}]]);
|
|
23
|
+
export { M as default };
|
|
@@ -1,226 +1,52 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
1
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
19
3
|
* (c) 2022 @jdf2e.
|
|
20
4
|
* Released under the MIT License.
|
|
21
5
|
*/
|
|
22
|
-
import { c as
|
|
23
|
-
import { p as
|
|
24
|
-
import { provide, computed, ref, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
|
|
25
|
-
import { _
|
|
6
|
+
import { c as e } from "./component.js";
|
|
7
|
+
import { p as t } from "./pxCheck.js";
|
|
8
|
+
import { provide as l, computed as a, ref as i, watch as s, onMounted as n, onActivated as o, resolveComponent as r, openBlock as u, createElementBlock as p, normalizeClass as c, createElementVNode as d, normalizeStyle as y, renderSlot as m, Fragment as b, renderList as g, createCommentVNode as v, createVNode as f, toDisplayString as h } from "vue";
|
|
9
|
+
import { _ } from "./plugin-vue_export-helper.js";
|
|
26
10
|
import "../locale/lang";
|
|
27
|
-
class
|
|
11
|
+
class S {
|
|
28
12
|
constructor() {
|
|
29
|
-
this.title = "";
|
|
30
|
-
this.paneKey = "";
|
|
31
|
-
this.disabled = false;
|
|
13
|
+
this.title = "", this.paneKey = "", this.disabled = false;
|
|
32
14
|
}
|
|
33
15
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type: String,
|
|
46
|
-
default: "horizontal"
|
|
47
|
-
},
|
|
48
|
-
size: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: "normal"
|
|
51
|
-
},
|
|
52
|
-
type: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: "line"
|
|
55
|
-
},
|
|
56
|
-
titleScroll: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
ellipsis: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: true
|
|
63
|
-
},
|
|
64
|
-
autoHeight: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
},
|
|
68
|
-
background: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: ""
|
|
71
|
-
},
|
|
72
|
-
animatedTime: {
|
|
73
|
-
type: [Number, String],
|
|
74
|
-
default: 300
|
|
75
|
-
},
|
|
76
|
-
titleGutter: {
|
|
77
|
-
type: [Number, String],
|
|
78
|
-
default: 0
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
components: {},
|
|
82
|
-
emits: ["update:modelValue", "click", "change"],
|
|
83
|
-
setup(props, { emit, slots }) {
|
|
84
|
-
provide("activeKey", { activeKey: computed(() => props.modelValue) });
|
|
85
|
-
provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
|
|
86
|
-
const titles = ref([]);
|
|
87
|
-
const renderTitles = (vnodes) => {
|
|
88
|
-
vnodes.forEach((vnode, index2) => {
|
|
89
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
90
|
-
let type = vnode.type;
|
|
91
|
-
type = type.name || type;
|
|
92
|
-
if (type == "nut-tabpane") {
|
|
93
|
-
let title = new Title();
|
|
94
|
-
if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"]) || ((_c = vnode.props) == null ? void 0 : _c["paneKey"])) {
|
|
95
|
-
title.title = (_d = vnode.props) == null ? void 0 : _d.title;
|
|
96
|
-
title.paneKey = ((_e = vnode.props) == null ? void 0 : _e["pane-key"]) || ((_f = vnode.props) == null ? void 0 : _f["paneKey"]) || index2;
|
|
97
|
-
title.disabled = (_g = vnode.props) == null ? void 0 : _g.disabled;
|
|
98
|
-
}
|
|
99
|
-
titles.value.push(title);
|
|
100
|
-
} else {
|
|
101
|
-
renderTitles(vnode.children);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
const currentIndex = ref(props.modelValue || 0);
|
|
106
|
-
const findTabsIndex = (value) => {
|
|
107
|
-
let index2 = titles.value.findIndex((item) => item.paneKey == value);
|
|
108
|
-
if (titles.value.length == 0) {
|
|
109
|
-
console.error("[NutUI] <Tabs> \u5F53\u524D\u672A\u627E\u5230 TabPane \u7EC4\u4EF6\u5143\u7D20 , \u8BF7\u68C0\u67E5 .");
|
|
110
|
-
} else if (index2 == -1) {
|
|
111
|
-
console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
|
|
112
|
-
} else {
|
|
113
|
-
currentIndex.value = index2;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
|
|
117
|
-
titles.value = [];
|
|
118
|
-
if (vnodes && vnodes.length) {
|
|
119
|
-
renderTitles(vnodes);
|
|
120
|
-
}
|
|
121
|
-
findTabsIndex(props.modelValue);
|
|
122
|
-
};
|
|
123
|
-
watch(() => {
|
|
124
|
-
var _a;
|
|
125
|
-
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
126
|
-
}, (vnodes) => {
|
|
127
|
-
init(vnodes);
|
|
16
|
+
const k = { props: { modelValue: { type: [String, Number], default: 0 }, color: { type: String, default: "" }, direction: { type: String, default: "horizontal" }, size: { type: String, default: "normal" }, type: { type: String, default: "line" }, titleScroll: { type: Boolean, default: false }, ellipsis: { type: Boolean, default: true }, autoHeight: { type: Boolean, default: false }, background: { type: String, default: "" }, animatedTime: { type: [Number, String], default: 300 }, titleGutter: { type: [Number, String], default: 0 } }, components: {}, emits: ["update:modelValue", "click", "change"], setup(e2, { emit: r2, slots: u2 }) {
|
|
17
|
+
l("activeKey", { activeKey: a(() => e2.modelValue) }), l("autoHeight", { autoHeight: a(() => e2.autoHeight) });
|
|
18
|
+
const p2 = i([]), c2 = (e3) => {
|
|
19
|
+
e3.forEach((e4, t2) => {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
21
|
+
let l2 = e4.type;
|
|
22
|
+
if (l2 = l2.name || l2, l2 == "nut-tabpane") {
|
|
23
|
+
let l3 = new S();
|
|
24
|
+
(((_a = e4.props) == null ? void 0 : _a.title) || ((_b = e4.props) == null ? void 0 : _b["pane-key"]) || ((_c = e4.props) == null ? void 0 : _c.paneKey)) && (l3.title = (_d = e4.props) == null ? void 0 : _d.title, l3.paneKey = ((_e = e4.props) == null ? void 0 : _e["pane-key"]) || ((_f = e4.props) == null ? void 0 : _f.paneKey) || t2, l3.disabled = (_g = e4.props) == null ? void 0 : _g.disabled), p2.value.push(l3);
|
|
25
|
+
} else
|
|
26
|
+
c2(e4.children);
|
|
128
27
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
marginRight: pxCheck(props.titleGutter)
|
|
155
|
-
};
|
|
156
|
-
});
|
|
157
|
-
const methods = {
|
|
158
|
-
tabChange: (item, index2) => {
|
|
159
|
-
emit("click", item);
|
|
160
|
-
if (item.disabled) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
currentIndex.value = index2;
|
|
164
|
-
emit("update:modelValue", item.paneKey);
|
|
165
|
-
emit("change", item);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
return __spreadValues({
|
|
169
|
-
titles,
|
|
170
|
-
contentStyle,
|
|
171
|
-
tabsNavStyle,
|
|
172
|
-
titleStyle,
|
|
173
|
-
tabsActiveStyle
|
|
174
|
-
}, methods);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
const _hoisted_1 = ["onClick"];
|
|
178
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
179
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
180
|
-
return openBlock(), createElementBlock("view", {
|
|
181
|
-
class: normalizeClass(["nut-tabs", [_ctx.direction]])
|
|
182
|
-
}, [
|
|
183
|
-
createElementVNode("view", {
|
|
184
|
-
class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
|
|
185
|
-
style: normalizeStyle(_ctx.tabsNavStyle)
|
|
186
|
-
}, [
|
|
187
|
-
_ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
|
|
188
|
-
return openBlock(), createElementBlock("view", {
|
|
189
|
-
class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
|
|
190
|
-
style: normalizeStyle(_ctx.titleStyle),
|
|
191
|
-
onClick: ($event) => _ctx.tabChange(item, index2),
|
|
192
|
-
key: item.paneKey
|
|
193
|
-
}, [
|
|
194
|
-
_ctx.type == "line" ? (openBlock(), createElementBlock("view", {
|
|
195
|
-
key: 0,
|
|
196
|
-
class: "nut-tabs__titles-item__line",
|
|
197
|
-
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
198
|
-
}, null, 4)) : createCommentVNode("", true),
|
|
199
|
-
_ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
|
|
200
|
-
key: 1,
|
|
201
|
-
class: "nut-tabs__titles-item__smile",
|
|
202
|
-
style: normalizeStyle(_ctx.tabsActiveStyle)
|
|
203
|
-
}, [
|
|
204
|
-
createVNode(_component_nut_icon, {
|
|
205
|
-
color: _ctx.color,
|
|
206
|
-
name: "joy-smile"
|
|
207
|
-
}, null, 8, ["color"])
|
|
208
|
-
], 4)) : createCommentVNode("", true),
|
|
209
|
-
createElementVNode("view", {
|
|
210
|
-
class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
|
|
211
|
-
}, toDisplayString(item.title), 3)
|
|
212
|
-
], 14, _hoisted_1);
|
|
213
|
-
}), 128))
|
|
214
|
-
], 6),
|
|
215
|
-
createElementVNode("view", {
|
|
216
|
-
class: "nut-tabs__content",
|
|
217
|
-
style: normalizeStyle(_ctx.contentStyle)
|
|
218
|
-
}, [
|
|
219
|
-
renderSlot(_ctx.$slots, "default")
|
|
220
|
-
], 4)
|
|
221
|
-
], 2);
|
|
222
|
-
}
|
|
223
|
-
const { create } = createComponent("tabs");
|
|
224
|
-
const _sfc_main = create(component);
|
|
225
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
226
|
-
export { index as default };
|
|
28
|
+
}, d2 = i(e2.modelValue || 0), y2 = (e3) => {
|
|
29
|
+
let t2 = p2.value.findIndex((t3) => t3.paneKey == e3);
|
|
30
|
+
p2.value.length == 0 || t2 == -1 || (d2.value = t2);
|
|
31
|
+
}, m2 = (t2 = ((_a) => (_a = u2.default) == null ? void 0 : _a.call(u2))()) => {
|
|
32
|
+
p2.value = [], t2 && t2.length && c2(t2), y2(e2.modelValue);
|
|
33
|
+
};
|
|
34
|
+
s(() => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = u2.default) == null ? void 0 : _a.call(u2);
|
|
37
|
+
}, (e3) => {
|
|
38
|
+
m2(e3);
|
|
39
|
+
}), s(() => e2.modelValue, (e3) => {
|
|
40
|
+
y2(e3);
|
|
41
|
+
}), n(m2), o(m2);
|
|
42
|
+
const b2 = a(() => ({ transform: e2.direction == "horizontal" ? `translate3d(-${100 * d2.value}%, 0, 0)` : `translate3d( 0,-${100 * d2.value}%, 0)`, transitionDuration: `${e2.animatedTime}ms` })), g2 = a(() => ({ background: e2.background })), v2 = a(() => ({ color: e2.type == "smile" ? e2.color : "", background: e2.type == "line" ? e2.color : "" })), f2 = a(() => ({ marginLeft: t(e2.titleGutter), marginRight: t(e2.titleGutter) })), h2 = { tabChange: (e3, t2) => {
|
|
43
|
+
r2("click", e3), e3.disabled || (d2.value = t2, r2("update:modelValue", e3.paneKey), r2("change", e3));
|
|
44
|
+
} };
|
|
45
|
+
return { titles: p2, contentStyle: b2, tabsNavStyle: g2, titleStyle: f2, tabsActiveStyle: v2, ...h2 };
|
|
46
|
+
} }, K = ["onClick"];
|
|
47
|
+
const { create: w } = e("tabs");
|
|
48
|
+
var V = _(w(k), [["render", function(e2, t2, l2, a2, i2, s2) {
|
|
49
|
+
const n2 = r("nut-icon");
|
|
50
|
+
return u(), p("view", { class: c(["nut-tabs", [e2.direction]]) }, [d("view", { class: c(["nut-tabs__titles", { [e2.type]: e2.type, scrollable: e2.titleScroll, [e2.size]: e2.size }]), style: y(e2.tabsNavStyle) }, [e2.$slots.titles ? m(e2.$slots, "titles", { key: 0 }) : (u(true), p(b, { key: 1 }, g(e2.titles, (t3, l3) => (u(), p("view", { class: c(["nut-tabs__titles-item", { active: t3.paneKey == e2.modelValue, disabled: t3.disabled }]), style: y(e2.titleStyle), onClick: (a3) => e2.tabChange(t3, l3), key: t3.paneKey }, [e2.type == "line" ? (u(), p("view", { key: 0, class: "nut-tabs__titles-item__line", style: y(e2.tabsActiveStyle) }, null, 4)) : v("", true), e2.type == "smile" ? (u(), p("view", { key: 1, class: "nut-tabs__titles-item__smile", style: y(e2.tabsActiveStyle) }, [f(n2, { color: e2.color, name: "joy-smile" }, null, 8, ["color"])], 4)) : v("", true), d("view", { class: c(["nut-tabs__titles-item__text", { ellipsis: e2.ellipsis }]) }, h(t3.title), 3)], 14, K))), 128))], 6), d("view", { class: "nut-tabs__content", style: y(e2.contentStyle) }, [m(e2.$slots, "default")], 4)], 2);
|
|
51
|
+
}]]);
|
|
52
|
+
export { V as default };
|
package/dist/packages/_es/Tag.js
CHANGED
|
@@ -1,102 +1,25 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22
|
|
2
|
+
* @nutui/nutui v3.1.22 Fri Jun 24 2022 18:11:16 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { toRefs as e, computed as o, resolveComponent as l, openBlock as t, createElementBlock as a, normalizeClass as n, normalizeStyle as r, renderSlot as c, createBlock as s, createCommentVNode as u } from "vue";
|
|
7
|
+
import { c as p } from "./component.js";
|
|
8
|
+
import { _ as i } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
mark: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false
|
|
30
|
-
},
|
|
31
|
-
closeable: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ["close", "click"],
|
|
37
|
-
setup(props, { emit }) {
|
|
38
|
-
const { type, color, plain, round, mark, textColor } = toRefs(props);
|
|
39
|
-
const classes = computed(() => {
|
|
40
|
-
const prefixCls = componentName;
|
|
41
|
-
return {
|
|
42
|
-
[prefixCls]: true,
|
|
43
|
-
[`${prefixCls}--${type.value}`]: type.value,
|
|
44
|
-
[`${prefixCls}--plain`]: plain.value,
|
|
45
|
-
[`${prefixCls}--round`]: round.value,
|
|
46
|
-
[`${prefixCls}--mark`]: mark.value
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
const getStyle = () => {
|
|
50
|
-
if (color == null ? void 0 : color.value) {
|
|
51
|
-
return {
|
|
52
|
-
background: color.value,
|
|
53
|
-
color: textColor.value
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (plain.value) {
|
|
57
|
-
return {
|
|
58
|
-
color: "#FA2400",
|
|
59
|
-
background: "#fff",
|
|
60
|
-
border: "1px solid rgba(250,36,0,1)"
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
color: "",
|
|
65
|
-
background: ""
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
const onClose = (event) => {
|
|
69
|
-
event.stopPropagation();
|
|
70
|
-
emit("close", event);
|
|
71
|
-
};
|
|
72
|
-
const onClick = (event) => {
|
|
73
|
-
event.stopPropagation();
|
|
74
|
-
emit("click", event);
|
|
75
|
-
};
|
|
76
|
-
return {
|
|
77
|
-
classes,
|
|
78
|
-
getStyle,
|
|
79
|
-
onClose,
|
|
80
|
-
onClick
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
85
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
86
|
-
return openBlock(), createElementBlock("view", {
|
|
87
|
-
class: normalizeClass(_ctx.classes),
|
|
88
|
-
style: normalizeStyle(_ctx.getStyle()),
|
|
89
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
90
|
-
}, [
|
|
91
|
-
renderSlot(_ctx.$slots, "default"),
|
|
92
|
-
_ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
|
|
93
|
-
key: 0,
|
|
94
|
-
class: "nut-tag--close",
|
|
95
|
-
name: "close",
|
|
96
|
-
size: "12",
|
|
97
|
-
onClick: _ctx.onClose
|
|
98
|
-
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
99
|
-
], 6);
|
|
100
|
-
}
|
|
101
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
102
|
-
export { index as default };
|
|
10
|
+
const { componentName: d, create: f } = p("tag");
|
|
11
|
+
var m = i(f({ props: { color: { type: String, default: "" }, textColor: { type: String, default: "" }, type: { type: String, default: "default" }, plain: { type: Boolean, default: false }, round: { type: Boolean, default: false }, mark: { type: Boolean, default: false }, closeable: { type: Boolean, default: false } }, emits: ["close", "click"], setup(l2, { emit: t2 }) {
|
|
12
|
+
const { type: a2, color: n2, plain: r2, round: c2, mark: s2, textColor: u2 } = e(l2);
|
|
13
|
+
return { classes: o(() => {
|
|
14
|
+
const e2 = d;
|
|
15
|
+
return { [e2]: true, [`${e2}--${a2.value}`]: a2.value, [`${e2}--plain`]: r2.value, [`${e2}--round`]: c2.value, [`${e2}--mark`]: s2.value };
|
|
16
|
+
}), getStyle: () => (n2 == null ? void 0 : n2.value) ? { background: n2.value, color: u2.value } : r2.value ? { color: "#FA2400", background: "#fff", border: "1px solid rgba(250,36,0,1)" } : { color: "", background: "" }, onClose: (e2) => {
|
|
17
|
+
e2.stopPropagation(), t2("close", e2);
|
|
18
|
+
}, onClick: (e2) => {
|
|
19
|
+
e2.stopPropagation(), t2("click", e2);
|
|
20
|
+
} };
|
|
21
|
+
} }), [["render", function(e2, o2, p2, i2, d2, f2) {
|
|
22
|
+
const m2 = l("nut-icon");
|
|
23
|
+
return t(), a("view", { class: n(e2.classes), style: r(e2.getStyle()), onClick: o2[0] || (o2[0] = (...o3) => e2.onClick && e2.onClick(...o3)) }, [c(e2.$slots, "default"), e2.closeable ? (t(), s(m2, { key: 0, class: "nut-tag--close", name: "close", size: "12", onClick: e2.onClose }, null, 8, ["onClick"])) : u("", true)], 6);
|
|
24
|
+
}]]);
|
|
25
|
+
export { m as default };
|