@nutui/nutui 3.2.2 → 3.2.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +4 -4
- package/dist/nutui.es.js +2136 -1419
- package/dist/nutui.umd.js +2145 -1427
- package/dist/packages/_es/ActionSheet.js +4 -22
- package/dist/packages/_es/Address.js +63 -57
- package/dist/packages/_es/AddressList.js +12 -9
- package/dist/packages/_es/Animate.js +2 -21
- package/dist/packages/_es/Audio.js +11 -25
- package/dist/packages/_es/AudioOperate.js +3 -23
- package/dist/packages/_es/Avatar.js +6 -21
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +74 -22
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +17 -9
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +72 -68
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +31 -17
- package/dist/packages/_es/CheckboxGroup.js +14 -7
- package/dist/packages/_es/CircleProgress.js +4 -4
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +22 -19
- package/dist/packages/_es/CollapseItem.js +18 -32
- package/dist/packages/_es/Comment.js +13 -9
- package/dist/packages/_es/ConfigProvider.js +8 -4
- package/dist/packages/_es/CountDown.js +40 -46
- package/dist/packages/_es/CountUp.js +41 -40
- package/dist/packages/_es/DatePicker.js +25 -33
- package/dist/packages/_es/Dialog.js +13 -28
- package/dist/packages/_es/Divider.js +7 -24
- package/dist/packages/_es/Drag.js +2 -2
- package/dist/packages/_es/Ecard.js +8 -5
- package/dist/packages/_es/Elevator.js +27 -39
- package/dist/packages/_es/Ellipsis.js +21 -31
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +23 -12
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +15 -11
- package/dist/packages/_es/Image.js +8 -24
- package/dist/packages/_es/ImagePreview.js +34 -48
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +5 -24
- package/dist/packages/_es/Input.js +8 -5
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +10 -25
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +21 -30
- package/dist/packages/_es/Menu.js +13 -7
- package/dist/packages/_es/MenuItem.js +2 -21
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +18 -29
- package/dist/packages/_es/Notify.js +16 -32
- package/dist/packages/_es/NumberKeyboard.js +23 -18
- package/dist/packages/_es/OldPicker.js +47 -46
- package/dist/packages/_es/OverLay.js +11 -23
- package/dist/packages/_es/Pagination.js +6 -6
- package/dist/packages/_es/Picker.js +66 -59
- package/dist/packages/_es/Popover.js +55 -52
- package/dist/packages/_es/Popup.js +35 -40
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +2 -2
- package/dist/packages/_es/PullRefresh.js +5 -20
- package/dist/packages/_es/Radio.js +25 -13
- package/dist/packages/_es/RadioGroup.js +12 -5
- package/dist/packages/_es/Range.js +20 -33
- package/dist/packages/_es/Rate.js +6 -24
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +6 -25
- package/dist/packages/_es/ShortPassword.js +18 -11
- package/dist/packages/_es/SideNavBar.js +6 -24
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +2 -21
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +30 -35
- package/dist/packages/_es/Step.js +4 -22
- package/dist/packages/_es/Steps.js +8 -4
- package/dist/packages/_es/Sticky.js +23 -12
- package/dist/packages/_es/SubSideNavBar.js +4 -22
- package/dist/packages/_es/Swipe.js +5 -24
- package/dist/packages/_es/Swiper.js +23 -14
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +10 -7
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +7 -4
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +10 -25
- package/dist/packages/_es/Tabs.js +99 -34
- package/dist/packages/_es/Tag.js +1 -2
- package/dist/packages/_es/TextArea.js +8 -5
- package/dist/packages/_es/TimeDetail.js +5 -24
- package/dist/packages/_es/TimePannel.js +4 -22
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +21 -37
- package/dist/packages/_es/TrendArrow.js +131 -0
- package/dist/packages/_es/Uploader.js +40 -34
- package/dist/packages/_es/Video.js +22 -33
- package/dist/packages/_es/WaterMark.js +31 -41
- package/dist/packages/_es/common.js +21 -11
- package/dist/packages/_es/component.js +13 -6
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +39 -41
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +16 -1
- package/dist/packages/barrage/index.scss +27 -18
- package/dist/packages/ellipsis/index.scss +1 -0
- package/dist/packages/index.d.ts +5 -0
- package/dist/packages/list/index.scss +0 -1
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/picker/index.scss +14 -0
- package/dist/packages/tabbar/index.scss +3 -2
- package/dist/packages/trendarrow/index.scss +17 -0
- package/dist/smartips/attributes.json +76 -12
- package/dist/smartips/tags.json +30 -10
- package/dist/smartips/web-types.json +164 -13
- 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 +51 -5
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +64 -61
- 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 +53 -52
- package/dist/styles/themes/jdb.scss +53 -52
- package/dist/styles/themes/jdt.scss +53 -52
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +4 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +121 -74
- package/dist/types/__VUE/address/index.vue.d.ts +159 -91
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +9 -15
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +13 -17
- package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +9 -15
- package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +9 -15
- package/dist/types/__VUE/addresslist/index.vue.d.ts +25 -23
- package/dist/types/__VUE/animate/index.vue.d.ts +18 -19
- package/dist/types/__VUE/audio/index.vue.d.ts +33 -27
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +9 -15
- package/dist/types/__VUE/avatar/index.vue.d.ts +37 -31
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +37 -29
- package/dist/types/__VUE/backtop/index.vue.d.ts +34 -28
- package/dist/types/__VUE/badge/index.vue.d.ts +37 -31
- package/dist/types/__VUE/barrage/index.vue.d.ts +31 -26
- package/dist/types/__VUE/button/index.vue.d.ts +48 -37
- package/dist/types/__VUE/calendar/index.vue.d.ts +65 -45
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +101 -55
- package/dist/types/__VUE/card/index.vue.d.ts +37 -29
- package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +29 -33
- package/dist/types/__VUE/cascader/index.vue.d.ts +114 -74
- package/dist/types/__VUE/cascader/types.d.ts +5 -0
- package/dist/types/__VUE/category/index.vue.d.ts +14 -17
- package/dist/types/__VUE/categorypane/index.vue.d.ts +17 -19
- package/dist/types/__VUE/cell/index.vue.d.ts +58 -44
- package/dist/types/__VUE/cellgroup/index.vue.d.ts +13 -17
- package/dist/types/__VUE/checkbox/index.vue.d.ts +49 -35
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +17 -19
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +33 -27
- package/dist/types/__VUE/col/index.vue.d.ts +13 -17
- package/dist/types/__VUE/collapse/index.vue.d.ts +43 -34
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +32 -31
- package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +17 -19
- package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +17 -19
- package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +17 -19
- package/dist/types/__VUE/comment/index.vue.d.ts +41 -31
- package/dist/types/__VUE/configprovider/index.vue.d.ts +13 -17
- package/dist/types/__VUE/countdown/index.vue.d.ts +37 -30
- package/dist/types/__VUE/countup/index.vue.d.ts +76 -50
- package/dist/types/__VUE/datepicker/index.vue.d.ts +136 -82
- package/dist/types/__VUE/dialog/index.vue.d.ts +141 -85
- package/dist/types/__VUE/divider/index.vue.d.ts +21 -21
- package/dist/types/__VUE/drag/index.vue.d.ts +22 -19
- package/dist/types/__VUE/ecard/index.vue.d.ts +46 -33
- package/dist/types/__VUE/elevator/index.vue.d.ts +36 -26
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +44 -25
- package/dist/types/__VUE/empty/index.vue.d.ts +17 -19
- package/dist/types/__VUE/fixednav/index.vue.d.ts +42 -31
- package/dist/types/__VUE/form/common.d.ts +4 -0
- package/dist/types/__VUE/form/index.vue.d.ts +18 -15
- package/dist/types/__VUE/form/types.d.ts +3 -0
- package/dist/types/__VUE/formitem/index.vue.d.ts +46 -33
- package/dist/types/__VUE/formitem/types.d.ts +5 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +44 -35
- package/dist/types/__VUE/griditem/index.vue.d.ts +29 -28
- package/dist/types/__VUE/icon/index.vue.d.ts +30 -25
- package/dist/types/__VUE/image/index.vue.d.ts +41 -35
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +47 -39
- package/dist/types/__VUE/imagepreview/index.d.ts +4 -4
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +70 -47
- package/dist/types/__VUE/indicator/index.vue.d.ts +27 -23
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +49 -35
- package/dist/types/__VUE/input/index.vue.d.ts +137 -80
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +49 -35
- package/dist/types/__VUE/invoice/index.vue.d.ts +17 -19
- package/dist/types/__VUE/layout/index.vue.d.ts +2 -9
- package/dist/types/__VUE/list/index.vue.d.ts +19 -19
- package/dist/types/__VUE/menu/index.vue.d.ts +35 -32
- package/dist/types/__VUE/menuitem/index.vue.d.ts +26 -30
- package/dist/types/__VUE/navbar/index.vue.d.ts +45 -33
- package/dist/types/__VUE/noticebar/index.vue.d.ts +69 -47
- package/dist/types/__VUE/notify/index.vue.d.ts +45 -40
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +69 -46
- package/dist/types/__VUE/oldpicker/Column.vue.d.ts +22 -24
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +129 -82
- package/dist/types/__VUE/overlay/index.vue.d.ts +64 -1557
- package/dist/types/__VUE/pagination/index.vue.d.ts +45 -35
- package/dist/types/__VUE/picker/Column.vue.d.ts +30 -29
- package/dist/types/__VUE/picker/index.vue.d.ts +150 -91
- package/dist/types/__VUE/popover/index.vue.d.ts +112 -70
- package/dist/types/__VUE/popup/index.vue.d.ts +177 -73
- package/dist/types/__VUE/price/index.vue.d.ts +33 -27
- package/dist/types/__VUE/progress/index.vue.d.ts +54 -37
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +49 -27
- package/dist/types/__VUE/radio/index.vue.d.ts +37 -29
- package/dist/types/__VUE/radiogroup/index.vue.d.ts +17 -19
- package/dist/types/__VUE/range/index.vue.d.ts +50 -44
- package/dist/types/__VUE/rate/index.vue.d.ts +61 -41
- package/dist/types/__VUE/row/index.vue.d.ts +25 -23
- package/dist/types/__VUE/searchbar/index.vue.d.ts +62 -41
- package/dist/types/__VUE/searchbar/type.d.ts +5 -0
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +45 -33
- package/dist/types/__VUE/sidenavbar/index.vue.d.ts +10 -15
- package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +13 -17
- package/dist/types/__VUE/signature/index.vue.d.ts +25 -23
- package/dist/types/__VUE/skeleton/common.d.ts +1 -1
- package/dist/types/__VUE/skeleton/index.vue.d.ts +46 -34
- package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +9 -15
- package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +25 -23
- package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +9 -15
- package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +21 -21
- package/dist/types/__VUE/sku/index.vue.d.ts +129 -78
- package/dist/types/__VUE/step/index.vue.d.ts +27 -25
- package/dist/types/__VUE/steps/index.vue.d.ts +17 -19
- package/dist/types/__VUE/sticky/index.vue.d.ts +26 -25
- package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +17 -19
- package/dist/types/__VUE/swipe/index.vue.d.ts +24 -22
- package/dist/types/__VUE/swiper/index.vue.d.ts +59 -40
- package/dist/types/__VUE/swiperitem/index.vue.d.ts +8 -10
- package/dist/types/__VUE/switch/index.vue.d.ts +53 -37
- package/dist/types/__VUE/tabbar/index.vue.d.ts +34 -28
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +45 -36
- package/dist/types/__VUE/table/common.d.ts +1 -1
- package/dist/types/__VUE/table/index.vue.d.ts +26 -24
- package/dist/types/__VUE/tabpane/index.vue.d.ts +17 -19
- package/dist/types/__VUE/tabs/common.d.ts +13 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +72 -35
- package/dist/types/__VUE/tag/index.vue.d.ts +34 -27
- package/dist/types/__VUE/textarea/index.vue.d.ts +46 -34
- package/dist/types/__VUE/timedetail/index.vue.d.ts +13 -17
- package/dist/types/__VUE/timepannel/index.vue.d.ts +13 -17
- package/dist/types/__VUE/timeselect/index.vue.d.ts +34 -28
- package/dist/types/__VUE/toast/index.d.ts +5 -5
- package/dist/types/__VUE/toast/index.vue.d.ts +62 -54
- package/dist/types/__VUE/trendarrow/index.vue.d.ts +131 -0
- package/dist/types/__VUE/uploader/index.vue.d.ts +111 -68
- package/dist/types/__VUE/video/index.vue.d.ts +30 -20
- package/dist/types/__VUE/watermark/index.vue.d.ts +75 -49
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +2 -1
- package/package.json +5 -5
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createBlock } from "vue";
|
|
7
|
+
import { m as myFixed, c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
10
|
+
const { componentName, create } = createComponent("trendarrow");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
rate: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
digits: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 2
|
|
20
|
+
},
|
|
21
|
+
showSign: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
showZero: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
arrowLeft: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
syncTextColor: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
textColor: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "#333"
|
|
40
|
+
},
|
|
41
|
+
riseColor: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "#fa2c19"
|
|
44
|
+
},
|
|
45
|
+
dropColor: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "#64b578"
|
|
48
|
+
},
|
|
49
|
+
iconSize: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "12px"
|
|
52
|
+
},
|
|
53
|
+
upIconName: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "triangle-up"
|
|
56
|
+
},
|
|
57
|
+
downIconName: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: "triangle-down"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
setup(props) {
|
|
63
|
+
const state = reactive({
|
|
64
|
+
rateTrend: props.rate > 0 ? true : false
|
|
65
|
+
});
|
|
66
|
+
const classes = computed(() => {
|
|
67
|
+
const prefixCls = componentName;
|
|
68
|
+
return {
|
|
69
|
+
[prefixCls]: true
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const calcRate = computed(() => {
|
|
73
|
+
const { rate, digits, showSign, showZero } = props;
|
|
74
|
+
state.rateTrend = rate > 0 ? true : false;
|
|
75
|
+
const absRate = Math.abs(rate);
|
|
76
|
+
if (!showZero && rate === 0) {
|
|
77
|
+
return "--";
|
|
78
|
+
}
|
|
79
|
+
let resultRate = `${showSign && rate !== 0 ? state.rateTrend ? "+" : "-" : ""}${myFixed(
|
|
80
|
+
Number(absRate),
|
|
81
|
+
digits
|
|
82
|
+
)}%`;
|
|
83
|
+
return resultRate;
|
|
84
|
+
});
|
|
85
|
+
const calcStyle = computed(() => {
|
|
86
|
+
const { dropColor, riseColor, syncTextColor, textColor, rate } = props;
|
|
87
|
+
let style = {
|
|
88
|
+
color: rate === 0 ? textColor : syncTextColor ? state.rateTrend ? riseColor : dropColor : textColor
|
|
89
|
+
};
|
|
90
|
+
return style;
|
|
91
|
+
});
|
|
92
|
+
const calcIconProps = computed(() => {
|
|
93
|
+
const { dropColor, riseColor, iconSize, upIconName, downIconName } = props;
|
|
94
|
+
let iconProps = {
|
|
95
|
+
name: state.rateTrend ? upIconName : downIconName,
|
|
96
|
+
color: state.rateTrend ? riseColor : dropColor,
|
|
97
|
+
size: iconSize
|
|
98
|
+
};
|
|
99
|
+
return iconProps;
|
|
100
|
+
});
|
|
101
|
+
return { ...toRefs(state), classes, calcRate, calcStyle, calcIconProps };
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
105
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
106
|
+
return openBlock(), createElementBlock("view", {
|
|
107
|
+
class: normalizeClass(_ctx.classes),
|
|
108
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
109
|
+
}, [
|
|
110
|
+
!_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
111
|
+
key: 0,
|
|
112
|
+
class: "nut-trendarrow-icon-before nut-trendarrow-rate",
|
|
113
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
114
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true),
|
|
115
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
116
|
+
Number(_ctx.rate) !== 0 ? (openBlock(), createBlock(_component_nut_icon, {
|
|
117
|
+
key: 0,
|
|
118
|
+
size: _ctx.calcIconProps.size,
|
|
119
|
+
name: _ctx.calcIconProps.name,
|
|
120
|
+
color: _ctx.calcIconProps.color
|
|
121
|
+
}, null, 8, ["size", "name", "color"])) : createCommentVNode("", true)
|
|
122
|
+
]),
|
|
123
|
+
_ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
|
|
124
|
+
key: 1,
|
|
125
|
+
class: "nut-trendarrow-icon-after nut-trendarrow-rate",
|
|
126
|
+
style: normalizeStyle(_ctx.calcStyle)
|
|
127
|
+
}, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true)
|
|
128
|
+
], 2);
|
|
129
|
+
}
|
|
130
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
131
|
+
export { index as default };
|
|
@@ -1,26 +1,10 @@
|
|
|
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.2.
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
19
3
|
* (c) 2022 @jdf2e.
|
|
20
4
|
* Released under the MIT License.
|
|
21
5
|
*/
|
|
22
6
|
import { reactive, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createCommentVNode, renderList, createElementVNode, toDisplayString, createVNode, createBlock, createTextVNode, mergeProps } from "vue";
|
|
23
|
-
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { c as createComponent, i as isPromise } from "./component.js";
|
|
24
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
25
9
|
import "../locale/lang";
|
|
26
10
|
class UploadOptions {
|
|
@@ -45,10 +29,14 @@ class Uploader {
|
|
|
45
29
|
const xhr = new XMLHttpRequest();
|
|
46
30
|
xhr.timeout = options.timeout;
|
|
47
31
|
if (xhr.upload) {
|
|
48
|
-
xhr.upload.addEventListener(
|
|
49
|
-
|
|
50
|
-
(
|
|
51
|
-
|
|
32
|
+
xhr.upload.addEventListener(
|
|
33
|
+
"progress",
|
|
34
|
+
(e) => {
|
|
35
|
+
var _a2;
|
|
36
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, e, options);
|
|
37
|
+
},
|
|
38
|
+
false
|
|
39
|
+
);
|
|
52
40
|
xhr.onreadystatechange = () => {
|
|
53
41
|
var _a2, _b;
|
|
54
42
|
if (xhr.readyState === 4) {
|
|
@@ -87,9 +75,10 @@ class Uploader {
|
|
|
87
75
|
url: options.url,
|
|
88
76
|
filePath: options.taroFilePath,
|
|
89
77
|
fileType: options.fileType,
|
|
90
|
-
header:
|
|
91
|
-
"Content-Type": "multipart/form-data"
|
|
92
|
-
|
|
78
|
+
header: {
|
|
79
|
+
"Content-Type": "multipart/form-data",
|
|
80
|
+
...options.headers
|
|
81
|
+
},
|
|
93
82
|
formData: options.formData,
|
|
94
83
|
name: options.name,
|
|
95
84
|
success(response) {
|
|
@@ -240,9 +229,11 @@ const _sfc_main = create({
|
|
|
240
229
|
if (props.autoUpload) {
|
|
241
230
|
task.upload();
|
|
242
231
|
} else {
|
|
243
|
-
uploadQueue.push(
|
|
244
|
-
resolve
|
|
245
|
-
|
|
232
|
+
uploadQueue.push(
|
|
233
|
+
new Promise((resolve, reject) => {
|
|
234
|
+
resolve(task);
|
|
235
|
+
})
|
|
236
|
+
);
|
|
246
237
|
}
|
|
247
238
|
};
|
|
248
239
|
const clearUploadQueue = (index2 = -1) => {
|
|
@@ -250,6 +241,7 @@ const _sfc_main = create({
|
|
|
250
241
|
uploadQueue.splice(index2, 1);
|
|
251
242
|
} else {
|
|
252
243
|
uploadQueue = [];
|
|
244
|
+
fileList.splice(0, fileList.length);
|
|
253
245
|
}
|
|
254
246
|
};
|
|
255
247
|
const submit = () => {
|
|
@@ -304,15 +296,29 @@ const _sfc_main = create({
|
|
|
304
296
|
}
|
|
305
297
|
return files;
|
|
306
298
|
};
|
|
299
|
+
const deleted = (file, index2) => {
|
|
300
|
+
fileList.splice(index2, 1);
|
|
301
|
+
emit("delete", {
|
|
302
|
+
file,
|
|
303
|
+
fileList,
|
|
304
|
+
index: index2
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
307
|
const onDelete = (file, index2) => {
|
|
308
308
|
clearUploadQueue(index2);
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
309
|
+
let fn = props.beforeDelete(file, fileList);
|
|
310
|
+
if (isPromise(fn)) {
|
|
311
|
+
fn.then((res) => {
|
|
312
|
+
if (res) {
|
|
313
|
+
deleted(file, index2);
|
|
314
|
+
}
|
|
315
|
+
}).catch((error) => {
|
|
316
|
+
console.log(error, "\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
315
317
|
});
|
|
318
|
+
} else if (fn) {
|
|
319
|
+
deleted(file, index2);
|
|
320
|
+
} else {
|
|
321
|
+
console.log("\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01");
|
|
316
322
|
}
|
|
317
323
|
};
|
|
318
324
|
const onChange = (event) => {
|
|
@@ -1,24 +1,5 @@
|
|
|
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.2.
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -95,16 +76,23 @@ const _sfc_main = create({
|
|
|
95
76
|
const isDisabled = computed(() => {
|
|
96
77
|
return props.options.disabled;
|
|
97
78
|
});
|
|
98
|
-
watch(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
79
|
+
watch(
|
|
80
|
+
() => props.source,
|
|
81
|
+
(newValue) => {
|
|
82
|
+
if (newValue.src) {
|
|
83
|
+
nextTick(() => {
|
|
84
|
+
state.videoElm.load();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
103
87
|
}
|
|
104
|
-
|
|
105
|
-
watch(
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
);
|
|
89
|
+
watch(
|
|
90
|
+
() => props.options,
|
|
91
|
+
(newValue) => {
|
|
92
|
+
state.state.isMuted = newValue ? newValue.muted : false;
|
|
93
|
+
},
|
|
94
|
+
{ immediate: true }
|
|
95
|
+
);
|
|
108
96
|
const init = () => {
|
|
109
97
|
state.videoElm = root.value;
|
|
110
98
|
if (props.options.autoplay) {
|
|
@@ -233,9 +221,10 @@ const _sfc_main = create({
|
|
|
233
221
|
onMounted(() => {
|
|
234
222
|
init();
|
|
235
223
|
});
|
|
236
|
-
return
|
|
237
|
-
root
|
|
238
|
-
|
|
224
|
+
return {
|
|
225
|
+
root,
|
|
226
|
+
...toRefs(props),
|
|
227
|
+
...toRefs(state),
|
|
239
228
|
handleError,
|
|
240
229
|
isDisabled,
|
|
241
230
|
play,
|
|
@@ -246,7 +235,7 @@ const _sfc_main = create({
|
|
|
246
235
|
retry,
|
|
247
236
|
fullScreen,
|
|
248
237
|
translate
|
|
249
|
-
}
|
|
238
|
+
};
|
|
250
239
|
}
|
|
251
240
|
});
|
|
252
241
|
const _hoisted_1 = {
|
|
@@ -1,24 +1,5 @@
|
|
|
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.2.
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -139,7 +120,13 @@ const _sfc_main = create({
|
|
|
139
120
|
img.referrerPolicy = "no-referrer";
|
|
140
121
|
img.src = image;
|
|
141
122
|
img.onload = () => {
|
|
142
|
-
ctx.drawImage(
|
|
123
|
+
ctx.drawImage(
|
|
124
|
+
img,
|
|
125
|
+
-imageWidth * ratio / 2,
|
|
126
|
+
-imageHeight * ratio / 2,
|
|
127
|
+
imageWidth * ratio,
|
|
128
|
+
imageHeight * ratio
|
|
129
|
+
);
|
|
143
130
|
ctx.restore();
|
|
144
131
|
state.base64Url = canvas.toDataURL();
|
|
145
132
|
};
|
|
@@ -160,25 +147,28 @@ const _sfc_main = create({
|
|
|
160
147
|
}
|
|
161
148
|
};
|
|
162
149
|
init();
|
|
163
|
-
watch(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
150
|
+
watch(
|
|
151
|
+
() => [
|
|
152
|
+
zIndex,
|
|
153
|
+
gapX,
|
|
154
|
+
gapY,
|
|
155
|
+
width,
|
|
156
|
+
height,
|
|
157
|
+
rotate,
|
|
158
|
+
image,
|
|
159
|
+
imageWidth,
|
|
160
|
+
imageHeight,
|
|
161
|
+
content,
|
|
162
|
+
fontStyle,
|
|
163
|
+
fontWeight,
|
|
164
|
+
fontColor,
|
|
165
|
+
fontSize,
|
|
166
|
+
fontFamily
|
|
167
|
+
],
|
|
168
|
+
() => {
|
|
169
|
+
init();
|
|
170
|
+
}
|
|
171
|
+
);
|
|
182
172
|
const classes = computed(() => {
|
|
183
173
|
const prefixCls = componentName;
|
|
184
174
|
return {
|
|
@@ -186,7 +176,7 @@ const _sfc_main = create({
|
|
|
186
176
|
[`${prefixCls}-full-page`]: props.fullPage
|
|
187
177
|
};
|
|
188
178
|
});
|
|
189
|
-
return
|
|
179
|
+
return { ...toRefs(state), classes };
|
|
190
180
|
}
|
|
191
181
|
});
|
|
192
182
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { shallowReactive, getCurrentInstance, provide, markRaw, isVNode, computed, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
9
|
function flattenVNodes(children, childName) {
|
|
@@ -54,11 +54,17 @@ function useProvide(key, childName) {
|
|
|
54
54
|
};
|
|
55
55
|
const extend = Object.assign;
|
|
56
56
|
return (value) => {
|
|
57
|
-
provide(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
provide(
|
|
58
|
+
key,
|
|
59
|
+
extend(
|
|
60
|
+
{
|
|
61
|
+
add,
|
|
62
|
+
remove,
|
|
63
|
+
internalChildren
|
|
64
|
+
},
|
|
65
|
+
value
|
|
66
|
+
)
|
|
67
|
+
);
|
|
62
68
|
return {
|
|
63
69
|
internalChildren
|
|
64
70
|
};
|
|
@@ -126,10 +132,14 @@ const component = {
|
|
|
126
132
|
});
|
|
127
133
|
return () => {
|
|
128
134
|
var _a;
|
|
129
|
-
return h(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
return h(
|
|
136
|
+
"view",
|
|
137
|
+
{
|
|
138
|
+
class: rootClass.value,
|
|
139
|
+
style: rootStyle.value
|
|
140
|
+
},
|
|
141
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
142
|
+
);
|
|
133
143
|
};
|
|
134
144
|
}
|
|
135
145
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.4-beta.0 Fri Oct 14 2022 14:39:24 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { defineComponent } from "vue";
|
|
7
7
|
import locale from "../locale/lang";
|
|
8
8
|
const TypeOfFun = (value) => {
|
|
9
|
-
if (
|
|
9
|
+
if (null === value) {
|
|
10
10
|
return "null";
|
|
11
11
|
}
|
|
12
12
|
const type = typeof value;
|
|
13
|
-
if (
|
|
13
|
+
if ("undefined" === type || "string" === type) {
|
|
14
14
|
return type;
|
|
15
15
|
}
|
|
16
16
|
const typeString = toString.call(value);
|
|
@@ -28,8 +28,8 @@ const TypeOfFun = (value) => {
|
|
|
28
28
|
case "[object RegExp]":
|
|
29
29
|
return "regexp";
|
|
30
30
|
case "[object Object]":
|
|
31
|
-
if (value.nodeType
|
|
32
|
-
if (value.nodeType
|
|
31
|
+
if (void 0 !== value.nodeType) {
|
|
32
|
+
if (3 == value.nodeType) {
|
|
33
33
|
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
34
34
|
} else {
|
|
35
35
|
return "element";
|
|
@@ -75,6 +75,13 @@ const floatData = (format, dataOp, mapOps) => {
|
|
|
75
75
|
}
|
|
76
76
|
return format;
|
|
77
77
|
};
|
|
78
|
+
function myFixed(num, digit = 2) {
|
|
79
|
+
if (Object.is(parseFloat(num), NaN)) {
|
|
80
|
+
return console.log(`\u4F20\u5165\u7684\u503C\uFF1A${num}\u4E0D\u662F\u4E00\u4E2A\u6570\u5B57`);
|
|
81
|
+
}
|
|
82
|
+
num = parseFloat(num);
|
|
83
|
+
return (Math.round((num + Number.EPSILON) * Math.pow(10, digit)) / Math.pow(10, digit)).toFixed(digit);
|
|
84
|
+
}
|
|
78
85
|
function createComponent(name) {
|
|
79
86
|
const componentName = "nut-" + name;
|
|
80
87
|
return {
|
|
@@ -99,4 +106,4 @@ function createComponent(name) {
|
|
|
99
106
|
}
|
|
100
107
|
};
|
|
101
108
|
}
|
|
102
|
-
export { TypeOfFun as T,
|
|
109
|
+
export { TypeOfFun as T, isObject as a, createComponent as c, floatData as f, getPropByPath as g, isPromise as i, myFixed as m };
|