@nutui/nutui 4.0.2 → 4.0.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +2 -2
- package/dist/packages/_es/ActionSheet.js +2 -2
- package/dist/packages/_es/Address.js +5 -2
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +7 -1
- package/dist/packages/_es/AudioOperate.js +2 -1
- package/dist/packages/_es/Avatar.js +3 -1
- package/dist/packages/_es/AvatarGroup.js +2 -1
- package/dist/packages/_es/Backtop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +3 -3
- package/dist/packages/_es/CalendarItem.js +2 -2
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +6 -3
- package/dist/packages/_es/Category.js +3 -1
- package/dist/packages/_es/CategoryPane.js +4 -1
- package/dist/packages/_es/Cell.js +2 -1
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +2 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +2 -1
- package/dist/packages/_es/Comment.js +6 -1
- package/dist/packages/_es/ConfigProvider.js +2 -34
- package/dist/packages/_es/Countdown.js +9 -1
- package/dist/packages/_es/Countup.js +11 -1
- package/dist/packages/_es/DatePicker.js +3 -1
- package/dist/packages/_es/Dialog.js +7 -4
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +1 -1
- package/dist/packages/_es/Ellipsis.js +3 -1
- package/dist/packages/_es/Empty.js +4 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +1 -1
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +3 -2
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +5 -4
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +13 -7
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +6 -4
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +1 -1
- package/dist/packages/_es/MenuItem.js +2 -2
- package/dist/packages/_es/Navbar.js +7 -1
- package/dist/packages/_es/Noticebar.js +5 -3
- package/dist/packages/_es/Notify.js +5 -2
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Overlay.js +2 -2
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +3 -1
- package/dist/packages/_es/Popover.js +2 -2
- package/dist/packages/_es/Popup.js +2 -2
- package/dist/packages/_es/Price.js +7 -2
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +5 -1
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/Searchbar.js +2 -1
- package/dist/packages/_es/ShortPassword.js +3 -2
- package/dist/packages/_es/SideNavbar.js +1 -1
- package/dist/packages/_es/SideNavbarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +11 -1
- package/dist/packages/_es/Sku.js +16 -2
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +2 -2
- package/dist/packages/_es/SubSideNavbar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +2 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +13 -8
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +6 -1
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +171 -26
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/Textarea.js +2 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +2 -2
- package/dist/packages/_es/Toast.js +10 -2
- package/dist/packages/_es/Tour.js +3 -2
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +4 -2
- package/dist/packages/_es/Video.js +19 -1
- package/dist/packages/_es/Watermark.js +1 -1
- package/dist/packages/_es/{common-05c67d9a.js → common-b9a5e726.js} +9 -1
- package/dist/packages/_es/{component-bb5ff48e.js → component-81a4c1d0.js} +6 -6
- package/dist/packages/_es/{index-a564e25f.js → index-c55ad69e.js} +2 -2
- package/dist/packages/_es/{index-c4bbec14.js → index-cb5fe1dc.js} +38 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-ee936659.js → index.vue_vue_type_script_lang-22dfc112.js} +2 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-8b9f3de5.js → index.vue_vue_type_script_lang-442e4704.js} +2 -1
- package/dist/packages/_es/{index.vue_vue_type_script_lang-8f90bbd8.js → index.vue_vue_type_script_lang-cc5c4086.js} +1 -1
- package/dist/packages/_es/{interceptor-648bf3d0.js → interceptor-956b24fc.js} +1 -1
- package/dist/packages/_es/{mountComponent-3865592f.js → mountComponent-1ece4110.js} +1 -1
- package/dist/packages/input/index.scss +2 -2
- package/dist/packages/menuitem/index.scss +1 -1
- package/dist/packages/navbar/index.scss +0 -1
- package/dist/packages/price/index.scss +5 -10
- package/dist/smartips/web-types.json +20 -20
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +53 -53
- package/dist/styles/themes/jdb.scss +53 -53
- package/dist/styles/themes/jddkh.scss +53 -53
- package/dist/styles/themes/jdt.scss +53 -53
- package/dist/types/__VUE/configprovider/index.vue.d.ts +4 -4
- package/dist/types/__VUE/input/index.vue.d.ts +3 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -2
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
- package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +20 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { reactive, onMounted, watch, computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, vShow, createVNode, render } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
|
-
import { C as CreateComponent } from "./mountComponent-
|
|
6
|
+
import { C as CreateComponent } from "./mountComponent-1ece4110.js";
|
|
7
7
|
import { Success, Failure, Tips, Loading } from "@nutui/icons-vue";
|
|
8
8
|
const { create } = createComponent("toast");
|
|
9
9
|
const _sfc_main = create({
|
|
@@ -196,7 +196,9 @@ const defaultOptions = {
|
|
|
196
196
|
msg: "",
|
|
197
197
|
id: "",
|
|
198
198
|
duration: 2e3,
|
|
199
|
+
//显示时间(毫秒)
|
|
199
200
|
center: true,
|
|
201
|
+
// 未实现
|
|
200
202
|
type: "text",
|
|
201
203
|
title: "",
|
|
202
204
|
customClass: "",
|
|
@@ -205,13 +207,19 @@ const defaultOptions = {
|
|
|
205
207
|
iconSize: "20",
|
|
206
208
|
icon: null,
|
|
207
209
|
textAlignCenter: true,
|
|
210
|
+
// 未实现
|
|
208
211
|
loadingRotate: true,
|
|
212
|
+
// 未实现
|
|
209
213
|
bgColor: "",
|
|
210
214
|
onClose: null,
|
|
215
|
+
// 未实现
|
|
211
216
|
unmount: null,
|
|
212
217
|
cover: false,
|
|
218
|
+
//透明遮罩层 // 未实现
|
|
213
219
|
coverColor: "",
|
|
220
|
+
// 未实现
|
|
214
221
|
closeOnClickOverlay: false
|
|
222
|
+
// 未实现
|
|
215
223
|
};
|
|
216
224
|
let idsMap = [];
|
|
217
225
|
let optsMap = [];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { reactive, ref, computed, onMounted, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vShow, Fragment, renderList, normalizeStyle, createCommentVNode, createVNode, withCtx, renderSlot, toDisplayString } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { u as useRect } from "./index-29892cda.js";
|
|
4
4
|
import { Close } from "@nutui/icons-vue";
|
|
5
5
|
import Popover from "./Popover.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
8
8
|
import "./renderIcon-3d0fd47c.js";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-c55ad69e.js";
|
|
10
10
|
import "./Overlay.js";
|
|
11
11
|
const { create } = createComponent("tour");
|
|
12
12
|
const _sfc_main = create({
|
|
@@ -19,6 +19,7 @@ const _sfc_main = create({
|
|
|
19
19
|
type: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "step"
|
|
22
|
+
// tile
|
|
22
23
|
},
|
|
23
24
|
steps: {
|
|
24
25
|
type: Array,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
2
|
-
import { m as myFixed, c as createComponent } from "./component-
|
|
2
|
+
import { m as myFixed, c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { TriangleUp, TriangleDown } from "@nutui/icons-vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
5
5
|
import "../locale/lang";
|
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { reactive, computed, h, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createElementVNode, toDisplayString, createVNode } from "vue";
|
|
8
|
-
import { c as createComponent } from "./component-
|
|
9
|
-
import { f as funInterceptor } from "./interceptor-
|
|
8
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
9
|
+
import { f as funInterceptor } from "./interceptor-956b24fc.js";
|
|
10
10
|
import Progress from "./Progress.js";
|
|
11
11
|
import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
|
|
12
12
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -103,9 +103,11 @@ const _sfc_main = create({
|
|
|
103
103
|
props: {
|
|
104
104
|
name: { type: String, default: "file" },
|
|
105
105
|
url: { type: String, default: "" },
|
|
106
|
+
// defaultFileList: { type: Array, default: () => new Array<FileItem>() },
|
|
106
107
|
timeout: { type: [Number, String], default: 1e3 * 30 },
|
|
107
108
|
fileList: { type: Array, default: () => [] },
|
|
108
109
|
isPreview: { type: Boolean, default: true },
|
|
110
|
+
// picture、list
|
|
109
111
|
listType: { type: String, default: "picture" },
|
|
110
112
|
isDeletable: { type: Boolean, default: true },
|
|
111
113
|
method: { type: String, default: "post" },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, ref, computed, watch, nextTick, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, createCommentVNode, withDirectives, vShow, normalizeClass, toDisplayString, normalizeStyle, withModifiers } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
function throttle(fn, delay) {
|
|
@@ -29,13 +29,17 @@ const _sfc_main = create({
|
|
|
29
29
|
type: Object,
|
|
30
30
|
default: {
|
|
31
31
|
autoplay: false,
|
|
32
|
+
//是否自动播放
|
|
32
33
|
volume: 0.5,
|
|
33
34
|
poster: "",
|
|
34
35
|
loop: false,
|
|
35
36
|
controls: true,
|
|
36
37
|
muted: false,
|
|
38
|
+
//是否静音
|
|
37
39
|
disabled: false,
|
|
40
|
+
//禁止操作
|
|
38
41
|
playsinline: false,
|
|
42
|
+
//行内展示
|
|
39
43
|
touchPlay: false,
|
|
40
44
|
preload: ""
|
|
41
45
|
},
|
|
@@ -52,30 +56,44 @@ const _sfc_main = create({
|
|
|
52
56
|
const state = reactive({
|
|
53
57
|
videoElm: null,
|
|
54
58
|
initial: true,
|
|
59
|
+
//控制封面的显示
|
|
55
60
|
showToolbox: false,
|
|
61
|
+
//控制控制器和标题的显示
|
|
62
|
+
// 视频容器元素
|
|
56
63
|
player: {
|
|
57
64
|
$player: null,
|
|
58
65
|
pos: null
|
|
59
66
|
},
|
|
67
|
+
// progress进度条元素
|
|
60
68
|
progressBar: {
|
|
61
69
|
progressElm: null,
|
|
70
|
+
// 进度条DOM对象
|
|
62
71
|
pos: null
|
|
63
72
|
},
|
|
73
|
+
// video控制显示设置
|
|
64
74
|
videoSet: {
|
|
65
75
|
loaded: 0,
|
|
76
|
+
// 缓存长度
|
|
66
77
|
displayTime: "00:00",
|
|
78
|
+
// 进度时间
|
|
67
79
|
totalTime: "00:00",
|
|
80
|
+
// 总时间
|
|
68
81
|
progress: {
|
|
69
82
|
width: 0,
|
|
83
|
+
// 进度条长度
|
|
70
84
|
current: 0
|
|
85
|
+
// 进度条当前位置
|
|
71
86
|
}
|
|
72
87
|
},
|
|
73
88
|
state: {
|
|
74
89
|
controlShow: true,
|
|
75
90
|
vol: 0.5,
|
|
91
|
+
//音量
|
|
76
92
|
currentTime: 0,
|
|
93
|
+
//当前时间
|
|
77
94
|
fullScreen: false,
|
|
78
95
|
playing: false,
|
|
96
|
+
//是否正在播放
|
|
79
97
|
isLoading: false,
|
|
80
98
|
isEnd: false,
|
|
81
99
|
isError: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reactive, watch, computed, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
5
|
const { componentName, create } = createComponent("watermark");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowReactive, getCurrentInstance, provide, markRaw, isVNode, computed, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
4
4
|
function flattenVNodes(children, childName) {
|
|
5
5
|
const result = [];
|
|
@@ -68,33 +68,41 @@ function useProvide(key, childName) {
|
|
|
68
68
|
const { componentName } = createComponent("grid");
|
|
69
69
|
const GRID_KEY = Symbol("grid");
|
|
70
70
|
const gridProps = {
|
|
71
|
+
// 列数
|
|
71
72
|
columnNum: {
|
|
72
73
|
type: [Number, String],
|
|
73
74
|
default: 4
|
|
74
75
|
},
|
|
76
|
+
// 是否显示边框
|
|
75
77
|
border: {
|
|
76
78
|
type: Boolean,
|
|
77
79
|
default: true
|
|
78
80
|
},
|
|
81
|
+
// 格子之间间隔距离
|
|
79
82
|
gutter: {
|
|
80
83
|
type: [Number, String],
|
|
81
84
|
default: 0
|
|
82
85
|
},
|
|
86
|
+
// 是否内容居中
|
|
83
87
|
center: {
|
|
84
88
|
type: Boolean,
|
|
85
89
|
default: true
|
|
86
90
|
},
|
|
91
|
+
// 是否固定正方形
|
|
87
92
|
square: {
|
|
88
93
|
type: Boolean,
|
|
89
94
|
default: false
|
|
90
95
|
},
|
|
96
|
+
// 内容与文字翻转
|
|
91
97
|
reverse: {
|
|
92
98
|
type: Boolean,
|
|
93
99
|
default: false
|
|
94
100
|
},
|
|
101
|
+
// 内容排列方向
|
|
95
102
|
direction: {
|
|
96
103
|
type: String
|
|
97
104
|
},
|
|
105
|
+
// 是否开启点击反馈
|
|
98
106
|
clickable: {
|
|
99
107
|
type: Boolean,
|
|
100
108
|
default: false
|
|
@@ -127,15 +127,15 @@ function createComponent(name) {
|
|
|
127
127
|
}
|
|
128
128
|
export {
|
|
129
129
|
TypeOfFun as T,
|
|
130
|
-
|
|
130
|
+
isDate as a,
|
|
131
131
|
body as b,
|
|
132
132
|
createComponent as c,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
preventDefault as d,
|
|
134
|
+
clamp as e,
|
|
135
|
+
isPromise as f,
|
|
136
|
+
isObject as g,
|
|
137
137
|
getPropByPath as h,
|
|
138
|
-
|
|
138
|
+
isArray as i,
|
|
139
139
|
isString as j,
|
|
140
140
|
isFunction as k,
|
|
141
141
|
getScrollTopRoot as l,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createComponent } from "./component-
|
|
1
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
2
2
|
import { reactive, computed, watch, watchEffect, toRefs, resolveComponent, openBlock, createBlock, Teleport, mergeProps, createCommentVNode, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, vShow } from "vue";
|
|
3
3
|
import Overlay from "./Overlay.js";
|
|
4
4
|
import { Close } from "@nutui/icons-vue";
|
|
@@ -149,8 +149,8 @@ const component = (componentName2, components) => {
|
|
|
149
149
|
emit("update:visible", false);
|
|
150
150
|
};
|
|
151
151
|
const onClickOverlay = (e) => {
|
|
152
|
+
emit("click-overlay", e);
|
|
152
153
|
if (props.closeOnClickOverlay) {
|
|
153
|
-
emit("click-overlay", e);
|
|
154
154
|
emit("update:visible", false);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import { ref, computed, reactive, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createTextVNode } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { r as requestAniFrame } from "./raf-729dad54.js";
|
|
4
4
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
6
|
const Utils = {
|
|
7
|
+
/**
|
|
8
|
+
* 是否为闫年
|
|
9
|
+
* @return {Boolse} true|false
|
|
10
|
+
*/
|
|
7
11
|
isLeapYear: function(y) {
|
|
8
12
|
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
|
|
9
13
|
},
|
|
14
|
+
/**
|
|
15
|
+
* 返回星期数
|
|
16
|
+
* @return {String}
|
|
17
|
+
*/
|
|
10
18
|
getWhatDay: function(year, month, day) {
|
|
11
19
|
const date = new Date(year + "/" + month + "/" + day);
|
|
12
20
|
const index = date.getDay();
|
|
13
21
|
const dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
|
14
22
|
return dayNames[index];
|
|
15
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* 返回星期数
|
|
26
|
+
* @return {Number}
|
|
27
|
+
*/
|
|
16
28
|
getMonthPreDay: function(year, month) {
|
|
17
29
|
const date = new Date(year + "/" + month + "/01");
|
|
18
30
|
let day = date.getDay();
|
|
@@ -21,16 +33,28 @@ const Utils = {
|
|
|
21
33
|
}
|
|
22
34
|
return day;
|
|
23
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* 返回月份天数
|
|
38
|
+
* @return {Number}
|
|
39
|
+
*/
|
|
24
40
|
getMonthDays: function(year, month) {
|
|
25
41
|
if (/^0/.test(month)) {
|
|
26
42
|
month = month.split("")[1];
|
|
27
43
|
}
|
|
28
44
|
return [0, 31, this.isLeapYear(Number(year)) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
|
|
29
45
|
},
|
|
46
|
+
/**
|
|
47
|
+
* 补齐数字位数
|
|
48
|
+
* @return {string}
|
|
49
|
+
*/
|
|
30
50
|
getNumTwoBit: function(n) {
|
|
31
51
|
n = Number(n);
|
|
32
52
|
return (n > 9 ? "" : "0") + n;
|
|
33
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* 日期对象转成字符串
|
|
56
|
+
* @return {string}
|
|
57
|
+
*/
|
|
34
58
|
date2Str: function(date, split) {
|
|
35
59
|
split = split || "-";
|
|
36
60
|
const y = date.getFullYear();
|
|
@@ -38,6 +62,11 @@ const Utils = {
|
|
|
38
62
|
const d = this.getNumTwoBit(date.getDate());
|
|
39
63
|
return [y, m, d].join(split);
|
|
40
64
|
},
|
|
65
|
+
/**
|
|
66
|
+
* 返回日期格式字符串
|
|
67
|
+
* @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
|
|
68
|
+
* @return {string} '2014-12-31'
|
|
69
|
+
*/
|
|
41
70
|
getDay: function(i) {
|
|
42
71
|
i = i || 0;
|
|
43
72
|
let date = new Date();
|
|
@@ -45,6 +74,10 @@ const Utils = {
|
|
|
45
74
|
date = new Date(date.getTime() + diff);
|
|
46
75
|
return this.date2Str(date);
|
|
47
76
|
},
|
|
77
|
+
/**
|
|
78
|
+
* 时间比较
|
|
79
|
+
* @return {Boolean}
|
|
80
|
+
*/
|
|
48
81
|
compareDate: function(date1, date2) {
|
|
49
82
|
const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
|
|
50
83
|
const endTime = new Date(date2.replace("-", "/").replace("-", "/"));
|
|
@@ -53,6 +86,10 @@ const Utils = {
|
|
|
53
86
|
}
|
|
54
87
|
return true;
|
|
55
88
|
},
|
|
89
|
+
/**
|
|
90
|
+
* 时间是否相等
|
|
91
|
+
* @return {Boolean}
|
|
92
|
+
*/
|
|
56
93
|
isEqual: function(date1, date2) {
|
|
57
94
|
const startTime = new Date(date1).getTime();
|
|
58
95
|
const endTime = new Date(date2).getTime();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { provide, readonly, computed, watch, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
const { componentName, create } = createComponent("radio-group");
|
|
4
4
|
const _sfc_main = create({
|
|
5
5
|
props: {
|
|
@@ -10,6 +10,7 @@ const _sfc_main = create({
|
|
|
10
10
|
direction: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "vertical"
|
|
13
|
+
//horizontal
|
|
13
14
|
},
|
|
14
15
|
textPosition: {
|
|
15
16
|
type: String,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, computed, h } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { CheckNormal, CheckChecked } from "@nutui/icons-vue";
|
|
4
4
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
5
5
|
const { componentName, create } = createComponent("radio");
|
|
@@ -16,6 +16,7 @@ const _sfc_main = create({
|
|
|
16
16
|
shape: {
|
|
17
17
|
type: String,
|
|
18
18
|
default: "round"
|
|
19
|
+
// button
|
|
19
20
|
},
|
|
20
21
|
label: {
|
|
21
22
|
type: [String, Number, Boolean],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, reactive, computed, watch, onMounted, onUnmounted, h, unref } from "vue";
|
|
2
|
-
import { c as createComponent } from "./component-
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { u as useRect } from "./index-29892cda.js";
|
|
4
4
|
const { componentName, create } = createComponent("sticky");
|
|
5
5
|
const _sfc_main = create({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApp } from "vue";
|
|
2
|
-
import { j as isString, k as isFunction } from "./component-
|
|
2
|
+
import { j as isString, k as isFunction } from "./component-81a4c1d0.js";
|
|
3
3
|
const CreateComponent = (options, component) => {
|
|
4
4
|
let elWarp = document.body;
|
|
5
5
|
const teleport = options.teleport || "body";
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
font-size: 0;
|
|
3
3
|
display: inline;
|
|
4
4
|
color: $primary-color;
|
|
5
|
+
&--strike {
|
|
6
|
+
[class*='nut-price'] {
|
|
7
|
+
text-decoration: line-through;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
5
10
|
&--symbol {
|
|
6
11
|
display: inline-block;
|
|
7
12
|
font-size: $font-size-3;
|
|
8
|
-
// margin-right: 4px;
|
|
9
13
|
}
|
|
10
14
|
&--large {
|
|
11
15
|
display: inline-block;
|
|
@@ -15,11 +19,6 @@
|
|
|
15
19
|
display: inline-block;
|
|
16
20
|
font-size: $price-big-size;
|
|
17
21
|
}
|
|
18
|
-
// &--small {
|
|
19
|
-
// display: inline-block;
|
|
20
|
-
// font-size: $font-size-4;
|
|
21
|
-
// }
|
|
22
|
-
|
|
23
22
|
&--decimal-large {
|
|
24
23
|
display: inline-block;
|
|
25
24
|
font-size: $price-decimal-big-size;
|
|
@@ -52,8 +51,4 @@
|
|
|
52
51
|
display: inline-block;
|
|
53
52
|
font-size: $price-symbol-small-size;
|
|
54
53
|
}
|
|
55
|
-
// &--decimal--big {
|
|
56
|
-
// display: inline-block;
|
|
57
|
-
// font-size: $price-medium-size;
|
|
58
|
-
// }
|
|
59
54
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.3-beta.1",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -1428,24 +1428,6 @@
|
|
|
1428
1428
|
"type": "string",
|
|
1429
1429
|
"kind": "expression"
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
"name": "font-class-name",
|
|
1434
|
-
"default": "`nutui-iconfont`",
|
|
1435
|
-
"description": "自定义 icon 字体基础类名",
|
|
1436
|
-
"value": {
|
|
1437
|
-
"type": "string",
|
|
1438
|
-
"kind": "expression"
|
|
1439
|
-
}
|
|
1440
|
-
},
|
|
1441
|
-
{
|
|
1442
|
-
"name": "class-prefix",
|
|
1443
|
-
"default": "`nut-icon`",
|
|
1444
|
-
"description": "自定义 icon 类名前缀,用于使用自定义图标",
|
|
1445
|
-
"value": {
|
|
1446
|
-
"type": "string",
|
|
1447
|
-
"kind": "expression"
|
|
1448
|
-
}
|
|
1449
1431
|
}
|
|
1450
1432
|
]
|
|
1451
1433
|
},
|
|
@@ -3840,7 +3822,7 @@
|
|
|
3840
3822
|
{
|
|
3841
3823
|
"name": "close-on-click-overlay",
|
|
3842
3824
|
"default": "`true`",
|
|
3843
|
-
"description": "
|
|
3825
|
+
"description": "点击遮罩时是否关闭",
|
|
3844
3826
|
"value": {
|
|
3845
3827
|
"type": "boolean",
|
|
3846
3828
|
"kind": "expression"
|
|
@@ -4438,6 +4420,15 @@
|
|
|
4438
4420
|
"type": "string",
|
|
4439
4421
|
"kind": "expression"
|
|
4440
4422
|
}
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
"name": "strike-through",
|
|
4426
|
+
"default": "false",
|
|
4427
|
+
"description": "是否展示划线价",
|
|
4428
|
+
"value": {
|
|
4429
|
+
"type": "boolean",
|
|
4430
|
+
"kind": "expression"
|
|
4431
|
+
}
|
|
4441
4432
|
}
|
|
4442
4433
|
]
|
|
4443
4434
|
},
|
|
@@ -5892,6 +5883,15 @@
|
|
|
5892
5883
|
"kind": "expression"
|
|
5893
5884
|
}
|
|
5894
5885
|
},
|
|
5886
|
+
{
|
|
5887
|
+
"name": "swipeable",
|
|
5888
|
+
"default": "`false`",
|
|
5889
|
+
"description": "是否开启手势左右滑动切换",
|
|
5890
|
+
"value": {
|
|
5891
|
+
"type": "boolean",
|
|
5892
|
+
"kind": "expression"
|
|
5893
|
+
}
|
|
5894
|
+
},
|
|
5895
5895
|
{
|
|
5896
5896
|
"name": "title-scroll",
|
|
5897
5897
|
"default": "`false`",
|