@nutui/nutui 3.2.6-beta.1 → 3.2.6-beta.2
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/README.md +18 -4
- package/dist/nutui.es.js +4461 -4135
- package/dist/nutui.umd.js +4559 -4133
- package/dist/packages/_es/ActionSheet.js +19 -18
- package/dist/packages/_es/Address.js +85 -94
- package/dist/packages/_es/AddressList.js +12 -25
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +2 -9
- package/dist/packages/_es/AudioOperate.js +1 -5
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +108 -55
- package/dist/packages/_es/Badge.js +12 -10
- package/dist/packages/_es/Barrage.js +103 -79
- package/dist/packages/_es/Button.js +3 -5
- package/dist/packages/_es/Calendar.js +23 -36
- package/dist/packages/_es/CalendarItem.js +3 -4
- package/dist/packages/_es/Card.js +5 -15
- package/dist/packages/_es/Cascader.js +11 -12
- package/dist/packages/_es/Category.js +12 -13
- package/dist/packages/_es/CategoryPane.js +13 -17
- package/dist/packages/_es/Cell.js +12 -9
- package/dist/packages/_es/CellGroup.js +2 -4
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +82 -98
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +34 -65
- package/dist/packages/_es/CollapseItem.js +60 -93
- package/dist/packages/_es/Comment.js +19 -43
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +52 -47
- package/dist/packages/_es/DatePicker.js +54 -37
- package/dist/packages/_es/Dialog.js +88 -9
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +49 -75
- package/dist/packages/_es/Ecard.js +18 -20
- package/dist/packages/_es/Elevator.js +76 -101
- package/dist/packages/_es/Ellipsis.js +100 -140
- package/dist/packages/_es/Empty.js +4 -6
- package/dist/packages/_es/FixedNav.js +6 -11
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +1 -3
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +27 -10
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +114 -13
- package/dist/packages/_es/ImagePreview.js +411 -149
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +115 -103
- package/dist/packages/_es/Input.js +32 -56
- package/dist/packages/_es/InputNumber.js +16 -25
- package/dist/packages/_es/Invoice.js +5 -6
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +34 -47
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +29 -56
- package/dist/packages/_es/Navbar.js +39 -49
- package/dist/packages/_es/NoticeBar.js +45 -54
- package/dist/packages/_es/Notify.js +162 -44
- package/dist/packages/_es/NumberKeyboard.js +20 -15
- package/dist/packages/_es/OldPicker.js +116 -130
- package/dist/packages/_es/OverLay.js +28 -5
- package/dist/packages/_es/Pagination.js +5 -8
- package/dist/packages/_es/Picker.js +74 -198
- package/dist/packages/_es/Popover.js +881 -201
- package/dist/packages/_es/Popup.js +84 -28
- package/dist/packages/_es/Price.js +6 -22
- package/dist/packages/_es/Progress.js +11 -18
- package/dist/packages/_es/PullRefresh.js +2 -4
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +34 -48
- package/dist/packages/_es/Rate.js +14 -15
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +36 -39
- package/dist/packages/_es/ShortPassword.js +66 -97
- package/dist/packages/_es/SideNavBar.js +18 -7
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +80 -113
- package/dist/packages/_es/Skeleton.js +11 -12
- package/dist/packages/_es/Sku.js +38 -63
- package/dist/packages/_es/Step.js +2 -7
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +23 -33
- package/dist/packages/_es/SubSideNavBar.js +2 -4
- package/dist/packages/_es/Swipe.js +26 -41
- package/dist/packages/_es/Swiper.js +21 -38
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +13 -15
- package/dist/packages/_es/TabbarItem.js +30 -24
- package/dist/packages/_es/Table.js +17 -22
- package/dist/packages/_es/Tabs.js +16 -49
- package/dist/packages/_es/Tag.js +5 -6
- package/dist/packages/_es/TextArea.js +49 -114
- package/dist/packages/_es/TimeDetail.js +3 -4
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +10 -12
- package/dist/packages/_es/Toast.js +164 -53
- package/dist/packages/_es/TrendArrow.js +4 -6
- package/dist/packages/_es/Uploader.js +140 -141
- package/dist/packages/_es/Video.js +18 -39
- package/dist/packages/_es/WaterMark.js +14 -22
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +6 -44
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +7 -64
- package/dist/packages/_es/index4.js +62 -424
- package/dist/packages/_es/{index.taro.js → index5.js} +154 -167
- 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 +3 -21
- package/dist/packages/checkbox/index.scss +1 -0
- 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/menuitem/index.scss +12 -3
- package/dist/smartips/attributes.json +5 -1
- package/dist/smartips/tags.json +1 -0
- package/dist/smartips/web-types.json +11 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/__VUE/actionsheet/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
- package/dist/types/__VUE/address/{index.taro.vue.d.ts → index.vue.d.ts} +33 -73
- package/dist/types/__VUE/addresslist/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.taro.vue.d.ts → index.vue.d.ts} +6 -6
- package/dist/types/__VUE/avatargroup/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/backtop/{index.taro.vue.d.ts → index.vue.d.ts} +37 -15
- package/dist/types/__VUE/badge/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/barrage/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendar/{index.taro.vue.d.ts → index.vue.d.ts} +1 -13
- package/dist/types/__VUE/calendaritem/{index.taro.vue.d.ts → index.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/category/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.taro.vue.d.ts → index.vue.d.ts} +5 -12
- package/dist/types/__VUE/checkbox/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.taro.vue.d.ts → index.vue.d.ts} +15 -14
- package/dist/types/__VUE/collapse/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.taro.vue.d.ts → index.vue.d.ts} +10 -2
- package/dist/types/__VUE/comment/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
- package/dist/types/__VUE/configprovider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.taro.vue.d.ts → index.vue.d.ts} +7 -5
- package/dist/types/__VUE/datepicker/{index.taro.vue.d.ts → index.vue.d.ts} +5 -5
- package/dist/types/__VUE/dialog/index.d.ts +48 -0
- package/dist/types/__VUE/dialog/{index.taro.vue.d.ts → index.vue.d.ts} +12 -9
- package/dist/types/__VUE/divider/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/drag/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/ecard/{index.taro.vue.d.ts → index.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.taro.vue.d.ts → index.vue.d.ts} +2 -11
- package/dist/types/__VUE/ellipsis/{index.taro.vue.d.ts → index.vue.d.ts} +0 -4
- package/dist/types/__VUE/empty/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/form/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/griditem/{index.taro.vue.d.ts → index.vue.d.ts} +27 -2
- package/dist/types/__VUE/image/index.vue.d.ts +117 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +109 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +25 -0
- package/dist/types/__VUE/imagepreview/{index.taro.vue.d.ts → index.vue.d.ts} +44 -33
- package/dist/types/__VUE/indicator/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.taro.vue.d.ts → index.vue.d.ts} +12 -19
- package/dist/types/__VUE/input/{index.taro.vue.d.ts → index.vue.d.ts} +16 -34
- package/dist/types/__VUE/inputnumber/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
- package/dist/types/__VUE/menuitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.taro.vue.d.ts → index.vue.d.ts} +3 -2
- package/dist/types/__VUE/noticebar/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
- package/dist/types/__VUE/notify/index.d.ts +26 -0
- package/dist/types/__VUE/notify/{index.taro.vue.d.ts → index.vue.d.ts} +18 -5
- package/dist/types/__VUE/numberkeyboard/{index.taro.vue.d.ts → index.vue.d.ts} +29 -5
- package/dist/types/__VUE/oldpicker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +17 -28
- package/dist/types/__VUE/oldpicker/{index.taro.vue.d.ts → index.vue.d.ts} +44 -64
- package/dist/types/__VUE/pagination/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +4 -16
- package/dist/types/__VUE/picker/{index.taro.vue.d.ts → index.vue.d.ts} +28 -53
- package/dist/types/__VUE/popover/{index.taro.vue.d.ts → index.vue.d.ts} +13 -15
- package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
- package/dist/types/__VUE/price/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
- package/dist/types/__VUE/progress/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.taro.vue.d.ts → index.vue.d.ts} +7 -8
- package/dist/types/__VUE/rate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.taro.vue.d.ts → index.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.taro.vue.d.ts → index.vue.d.ts} +21 -6
- package/dist/types/__VUE/sidenavbar/{index.taro.vue.d.ts → index.vue.d.ts} +5 -0
- package/dist/types/__VUE/signature/{index.taro.vue.d.ts → index.vue.d.ts} +5 -8
- package/dist/types/__VUE/skeleton/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/index.vue.d.ts +310 -0
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/swiper/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
- package/dist/types/__VUE/swiperitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
- package/dist/types/__VUE/tabbaritem/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
- package/dist/types/__VUE/table/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
- package/dist/types/__VUE/tag/type.d.ts +5 -0
- package/dist/types/__VUE/textarea/{index.taro.vue.d.ts → index.vue.d.ts} +3 -5
- package/dist/types/__VUE/timedetail/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.taro.vue.d.ts → index.vue.d.ts} +8 -7
- package/dist/types/__VUE/toast/index.d.ts +16 -0
- package/dist/types/__VUE/toast/{index.taro.vue.d.ts → index.vue.d.ts} +22 -44
- package/dist/types/__VUE/trendarrow/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.taro.vue.d.ts → index.vue.d.ts} +13 -22
- package/dist/types/__VUE/watermark/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +3 -2
- package/dist/packages/_es/use-lock-scroll.js +0 -23
- package/dist/types/__VUE/button/index.taro.vue.d.ts +0 -116
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +0 -74
- package/dist/types/__VUE/image/index.taro.vue.d.ts +0 -33
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +0 -85
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +0 -1728
- package/dist/types/__VUE/sku/index.taro.vue.d.ts +0 -182
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, reactive, computed, watch, onMounted,
|
|
6
|
+
import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createTextVNode, withModifiers } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useTaroRect } from "./index.js";
|
|
9
|
-
import Taro from "@tarojs/taro";
|
|
10
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
9
|
import "../locale/lang";
|
|
12
10
|
const { componentName, create } = createComponent("ellipsis");
|
|
@@ -18,7 +16,7 @@ const _sfc_main = create({
|
|
|
18
16
|
},
|
|
19
17
|
direction: {
|
|
20
18
|
type: String,
|
|
21
|
-
default: "
|
|
19
|
+
default: "end"
|
|
22
20
|
},
|
|
23
21
|
rows: {
|
|
24
22
|
type: [Number, String],
|
|
@@ -44,14 +42,9 @@ const _sfc_main = create({
|
|
|
44
42
|
emits: ["click", "change"],
|
|
45
43
|
setup(props, { emit }) {
|
|
46
44
|
const root = ref(null);
|
|
47
|
-
|
|
48
|
-
let contantCopy = ref(props.content);
|
|
45
|
+
let container = null;
|
|
49
46
|
let maxHeight = 0;
|
|
50
|
-
let lineHeight = 0;
|
|
51
|
-
let originHeight = 0;
|
|
52
47
|
const ellipsis = ref();
|
|
53
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
54
|
-
let widthRef = ref("auto");
|
|
55
48
|
const state = reactive({
|
|
56
49
|
exceeded: false,
|
|
57
50
|
expanded: false
|
|
@@ -65,113 +58,108 @@ const _sfc_main = create({
|
|
|
65
58
|
watch(
|
|
66
59
|
() => props.content,
|
|
67
60
|
(newV, oldVal) => {
|
|
61
|
+
if (newV != oldVal) {
|
|
62
|
+
if (container) {
|
|
63
|
+
document.body.appendChild(container);
|
|
64
|
+
}
|
|
65
|
+
createContainer();
|
|
66
|
+
}
|
|
68
67
|
}
|
|
69
68
|
);
|
|
70
69
|
onMounted(() => {
|
|
71
|
-
|
|
72
|
-
getReference();
|
|
73
|
-
}, 500);
|
|
70
|
+
createContainer();
|
|
74
71
|
});
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
const createContainer = () => {
|
|
73
|
+
if (!root.value)
|
|
74
|
+
return;
|
|
75
|
+
const originStyle = window.getComputedStyle(root.value);
|
|
76
|
+
container = document.createElement("div");
|
|
77
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
|
78
|
+
styleNames.forEach((name) => {
|
|
79
|
+
container.style.setProperty(name, originStyle.getPropertyValue(name));
|
|
80
|
+
});
|
|
81
|
+
container.style.position = "fixed";
|
|
82
|
+
container.style.left = "999999px";
|
|
83
|
+
container.style.top = "999999px";
|
|
84
|
+
container.style.zIndex = "-1000";
|
|
85
|
+
container.style.height = "auto";
|
|
86
|
+
container.style.minHeight = "auto";
|
|
87
|
+
container.style.maxHeight = "auto";
|
|
88
|
+
container.style.textOverflow = "clip";
|
|
89
|
+
container.style.whiteSpace = "normal";
|
|
90
|
+
container.style.webkitLineClamp = "unset";
|
|
91
|
+
container.style.display = "block";
|
|
92
|
+
const lineHeight = pxToNumber(originStyle.lineHeight === "normal" ? props.lineHeight : originStyle.lineHeight);
|
|
93
|
+
maxHeight = Math.floor(
|
|
94
|
+
lineHeight * (Number(props.rows) + 0.5) + pxToNumber(originStyle.paddingTop) + pxToNumber(originStyle.paddingBottom)
|
|
95
|
+
);
|
|
96
|
+
container.innerText = props.content;
|
|
97
|
+
document.body.appendChild(container);
|
|
98
|
+
calcEllipse();
|
|
92
99
|
};
|
|
93
|
-
const calcEllipse =
|
|
94
|
-
|
|
95
|
-
if (refe.height <= maxHeight) {
|
|
100
|
+
const calcEllipse = () => {
|
|
101
|
+
if (container.offsetHeight <= maxHeight) {
|
|
96
102
|
state.exceeded = false;
|
|
97
103
|
} else {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
);
|
|
105
|
-
} else if (props.direction === "end") {
|
|
106
|
-
const end = rowNum * (Number(props.rows) + 0.5);
|
|
107
|
-
tailor(0, end);
|
|
108
|
-
} else {
|
|
109
|
-
const start = props.content.length - rowNum * (Number(props.rows) + 0.5) - 5;
|
|
110
|
-
tailor(start, props.content.length);
|
|
111
|
-
}
|
|
104
|
+
state.exceeded = true;
|
|
105
|
+
const end = props.content.length;
|
|
106
|
+
const middle = Math.floor((0 + end) / 2);
|
|
107
|
+
const ellipsised = props.direction === "middle" ? tailorMiddle([0, middle], [middle, end]) : tailor(0, end);
|
|
108
|
+
ellipsis.value = ellipsised;
|
|
109
|
+
document.body.removeChild(container);
|
|
112
110
|
}
|
|
113
111
|
};
|
|
114
|
-
const tailor =
|
|
112
|
+
const tailor = (left, right) => {
|
|
115
113
|
const actionText = state.expanded ? props.collapseText : props.expandText;
|
|
116
114
|
const end = props.content.length;
|
|
117
115
|
if (right - left <= 1) {
|
|
118
|
-
state.exceeded = true;
|
|
119
116
|
if (props.direction === "end") {
|
|
120
|
-
|
|
117
|
+
return {
|
|
121
118
|
leading: props.content.slice(0, left) + props.symbol
|
|
122
119
|
};
|
|
123
120
|
} else {
|
|
124
|
-
|
|
121
|
+
return {
|
|
125
122
|
tailing: props.symbol + props.content.slice(right, end)
|
|
126
123
|
};
|
|
127
124
|
}
|
|
128
|
-
return false;
|
|
129
125
|
}
|
|
130
126
|
const middle = Math.round((left + right) / 2);
|
|
131
127
|
if (props.direction === "end") {
|
|
132
|
-
|
|
128
|
+
container.innerText = props.content.slice(0, middle) + props.symbol + actionText;
|
|
133
129
|
} else {
|
|
134
|
-
|
|
130
|
+
container.innerText = actionText + props.symbol + props.content.slice(middle, end);
|
|
135
131
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (props.direction === "end") {
|
|
140
|
-
tailor(middle, right);
|
|
141
|
-
} else {
|
|
142
|
-
tailor(left, middle);
|
|
143
|
-
}
|
|
132
|
+
if (container.offsetHeight <= maxHeight) {
|
|
133
|
+
if (props.direction === "end") {
|
|
134
|
+
return tailor(middle, right);
|
|
144
135
|
} else {
|
|
145
|
-
|
|
146
|
-
tailor(left, middle);
|
|
147
|
-
} else {
|
|
148
|
-
tailor(middle, right);
|
|
149
|
-
}
|
|
136
|
+
return tailor(left, middle);
|
|
150
137
|
}
|
|
151
|
-
}
|
|
138
|
+
} else {
|
|
139
|
+
if (props.direction === "end") {
|
|
140
|
+
return tailor(left, middle);
|
|
141
|
+
} else {
|
|
142
|
+
return tailor(middle, right);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
152
145
|
};
|
|
153
|
-
const tailorMiddle =
|
|
146
|
+
const tailorMiddle = (leftPart, rightPart) => {
|
|
154
147
|
const actionText = state.expanded ? props.collapseText : props.expandText;
|
|
155
148
|
const end = props.content.length;
|
|
156
149
|
if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {
|
|
157
|
-
|
|
158
|
-
ellipsis.value = {
|
|
150
|
+
return {
|
|
159
151
|
leading: props.content.slice(0, leftPart[0]) + props.symbol,
|
|
160
152
|
tailing: props.symbol + props.content.slice(rightPart[1], end)
|
|
161
153
|
};
|
|
162
|
-
return false;
|
|
163
154
|
}
|
|
164
155
|
const leftPartMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
|
|
165
156
|
const rightPartMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
tailorMiddle([leftPart[0], leftPartMiddle], [rightPartMiddle, rightPart[1]]);
|
|
173
|
-
}
|
|
174
|
-
}, 10);
|
|
157
|
+
container.innerText = props.content.slice(0, leftPartMiddle) + props.symbol + actionText + props.symbol + props.content.slice(rightPartMiddle, end);
|
|
158
|
+
if (container.offsetHeight <= maxHeight) {
|
|
159
|
+
return tailorMiddle([leftPartMiddle, leftPart[1]], [rightPart[0], rightPartMiddle]);
|
|
160
|
+
} else {
|
|
161
|
+
return tailorMiddle([leftPart[0], leftPartMiddle], [rightPartMiddle, rightPart[1]]);
|
|
162
|
+
}
|
|
175
163
|
};
|
|
176
164
|
const pxToNumber = (value) => {
|
|
177
165
|
if (!value)
|
|
@@ -191,65 +179,37 @@ const _sfc_main = create({
|
|
|
191
179
|
const handleClick = () => {
|
|
192
180
|
emit("click");
|
|
193
181
|
};
|
|
194
|
-
return {
|
|
195
|
-
...toRefs(state),
|
|
196
|
-
root,
|
|
197
|
-
rootContain,
|
|
198
|
-
ellipsis,
|
|
199
|
-
classes,
|
|
200
|
-
contantCopy,
|
|
201
|
-
clickHandle,
|
|
202
|
-
handleClick,
|
|
203
|
-
refRandomId,
|
|
204
|
-
widthRef
|
|
205
|
-
};
|
|
182
|
+
return { ...toRefs(state), root, ellipsis, classes, clickHandle, handleClick };
|
|
206
183
|
}
|
|
207
184
|
});
|
|
208
|
-
const _hoisted_1 =
|
|
209
|
-
const _hoisted_2 = { key:
|
|
210
|
-
const _hoisted_3 = { key:
|
|
211
|
-
const _hoisted_4 = { key: 2 };
|
|
212
|
-
const _hoisted_5 = ["id"];
|
|
185
|
+
const _hoisted_1 = { key: 0 };
|
|
186
|
+
const _hoisted_2 = { key: 1 };
|
|
187
|
+
const _hoisted_3 = { key: 2 };
|
|
213
188
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
214
|
-
return openBlock(), createElementBlock("view",
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.clickHandle(2), ["stop"]))
|
|
239
|
-
}, toDisplayString(_ctx.collapseText), 1)) : createCommentVNode("", true)
|
|
240
|
-
])) : createCommentVNode("", true)
|
|
241
|
-
], 10, _hoisted_1),
|
|
242
|
-
createTextVNode(),
|
|
243
|
-
createElementVNode("view", {
|
|
244
|
-
class: "nut-ellipsis-copy",
|
|
245
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
246
|
-
ref: "rootContain",
|
|
247
|
-
id: "rootContain" + _ctx.refRandomId,
|
|
248
|
-
style: normalizeStyle({ width: _ctx.widthRef })
|
|
249
|
-
}, [
|
|
250
|
-
createElementVNode("view", null, toDisplayString(_ctx.contantCopy), 1)
|
|
251
|
-
], 12, _hoisted_5)
|
|
252
|
-
]);
|
|
189
|
+
return openBlock(), createElementBlock("view", {
|
|
190
|
+
class: normalizeClass(_ctx.classes),
|
|
191
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
192
|
+
ref: "root"
|
|
193
|
+
}, [
|
|
194
|
+
!_ctx.exceeded ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true),
|
|
195
|
+
_ctx.exceeded && !_ctx.expanded ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
196
|
+
createTextVNode(toDisplayString(_ctx.ellipsis.leading) + " ", 1),
|
|
197
|
+
_ctx.expandText ? (openBlock(), createElementBlock("span", {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: "nut-ellipsis-text",
|
|
200
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.clickHandle(1), ["stop"]))
|
|
201
|
+
}, toDisplayString(_ctx.expandText), 1)) : createCommentVNode("", true),
|
|
202
|
+
createTextVNode(" " + toDisplayString(_ctx.ellipsis.tailing), 1)
|
|
203
|
+
])) : createCommentVNode("", true),
|
|
204
|
+
_ctx.exceeded && _ctx.expanded ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
205
|
+
createTextVNode(toDisplayString(_ctx.content) + " ", 1),
|
|
206
|
+
_ctx.expandText ? (openBlock(), createElementBlock("span", {
|
|
207
|
+
key: 0,
|
|
208
|
+
class: "nut-ellipsis-text",
|
|
209
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.clickHandle(2), ["stop"]))
|
|
210
|
+
}, toDisplayString(_ctx.collapseText), 1)) : createCommentVNode("", true)
|
|
211
|
+
])) : createCommentVNode("", true)
|
|
212
|
+
], 2);
|
|
253
213
|
}
|
|
254
|
-
var
|
|
255
|
-
export {
|
|
214
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
215
|
+
export { index as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode,
|
|
6
|
+
import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -68,11 +68,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
68
68
|
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
69
69
|
], 64))
|
|
70
70
|
], 4),
|
|
71
|
-
createTextVNode(),
|
|
72
71
|
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.description || _ctx.translate("noData")), 1)),
|
|
73
|
-
createTextVNode(),
|
|
74
72
|
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
|
|
75
73
|
]);
|
|
76
74
|
}
|
|
77
|
-
var
|
|
78
|
-
export {
|
|
75
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
76
|
+
export { index as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
|
-
import { computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode,
|
|
7
|
+
import { computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, renderSlot, createElementVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const { componentName, translate } = createComponent("fixednav");
|
|
@@ -94,27 +94,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
94
94
|
"z-index": 200,
|
|
95
95
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateValue(false))
|
|
96
96
|
}, null, 8, ["visible"])) : createCommentVNode("", true),
|
|
97
|
-
createTextVNode(),
|
|
98
97
|
renderSlot(_ctx.$slots, "list", {}, () => [
|
|
99
98
|
createElementVNode("view", _hoisted_1, [
|
|
100
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navList, (item,
|
|
99
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navList, (item, index2) => {
|
|
101
100
|
return openBlock(), createElementBlock("view", {
|
|
102
101
|
class: normalizeClass(["nut-fixednav__list-item", { active: item.id == _ctx.current }]),
|
|
103
102
|
onClick: ($event) => _ctx.selected(item, $event),
|
|
104
|
-
key: item.id ||
|
|
103
|
+
key: item.id || index2
|
|
105
104
|
}, [
|
|
106
105
|
createElementVNode("img", {
|
|
107
106
|
src: item.icon
|
|
108
107
|
}, null, 8, _hoisted_3),
|
|
109
|
-
createTextVNode(),
|
|
110
108
|
createElementVNode("view", _hoisted_4, toDisplayString(item.text), 1),
|
|
111
|
-
createTextVNode(),
|
|
112
109
|
item.num ? (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item.num), 1)) : createCommentVNode("", true)
|
|
113
110
|
], 10, _hoisted_2);
|
|
114
111
|
}), 128))
|
|
115
112
|
])
|
|
116
113
|
]),
|
|
117
|
-
createTextVNode(),
|
|
118
114
|
createElementVNode("div", {
|
|
119
115
|
class: "nut-fixednav__btn",
|
|
120
116
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.updateValue())
|
|
@@ -124,7 +120,6 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
124
120
|
name: "left",
|
|
125
121
|
color: "#fff"
|
|
126
122
|
}),
|
|
127
|
-
createTextVNode(),
|
|
128
123
|
createElementVNode("view", _hoisted_6, toDisplayString(_ctx.visible ? _ctx.activeText || _ctx.translate("activeText") : _ctx.unActiveText || _ctx.translate("unActiveText")), 1)
|
|
129
124
|
])
|
|
130
125
|
])
|
|
@@ -132,5 +127,5 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
132
127
|
}
|
|
133
128
|
const { create } = createComponent("fixednav");
|
|
134
129
|
const _sfc_main = create(component);
|
|
135
|
-
var
|
|
136
|
-
export {
|
|
130
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
|
|
131
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -40,7 +40,7 @@ const component = {
|
|
|
40
40
|
);
|
|
41
41
|
const findFormItem = (vnodes) => {
|
|
42
42
|
let task = [];
|
|
43
|
-
vnodes.forEach((vnode,
|
|
43
|
+
vnodes.forEach((vnode, index2) => {
|
|
44
44
|
var _a, _b, _c, _d;
|
|
45
45
|
let type = vnode.type;
|
|
46
46
|
type = type.name || type;
|
|
@@ -165,5 +165,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
165
|
})
|
|
166
166
|
], 32);
|
|
167
167
|
}
|
|
168
|
-
var
|
|
169
|
-
export {
|
|
168
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
169
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -99,7 +99,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
99
|
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
100
100
|
])
|
|
101
101
|
], 6)) : createCommentVNode("", true),
|
|
102
|
-
createTextVNode(),
|
|
103
102
|
createElementVNode("view", _hoisted_1, [
|
|
104
103
|
createElementVNode("view", {
|
|
105
104
|
class: "nut-form-item__body__slots",
|
|
@@ -107,7 +106,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
106
|
}, [
|
|
108
107
|
renderSlot(_ctx.$slots, "default")
|
|
109
108
|
], 4),
|
|
110
|
-
createTextVNode(),
|
|
111
109
|
_ctx.parent[_ctx.prop] && _ctx.showErrorMessage ? (openBlock(), createElementBlock("view", {
|
|
112
110
|
key: 0,
|
|
113
111
|
class: "nut-form-item__body__tips",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.6-beta.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, mergeProps,
|
|
6
|
+
import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, mergeProps, toDisplayString } from "vue";
|
|
7
|
+
import { u as useRouter } from "./index.js";
|
|
7
8
|
import { c as createComponent } from "./component.js";
|
|
8
9
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
10
|
import { G as GRID_KEY } from "./common.js";
|
|
@@ -16,10 +17,10 @@ function useInject(key) {
|
|
|
16
17
|
const { add, remove, internalChildren } = parent;
|
|
17
18
|
add(instance);
|
|
18
19
|
onUnmounted(() => remove(instance));
|
|
19
|
-
const
|
|
20
|
+
const index2 = computed(() => internalChildren.indexOf(instance));
|
|
20
21
|
return {
|
|
21
22
|
parent,
|
|
22
|
-
index
|
|
23
|
+
index: index2
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
return {
|
|
@@ -41,6 +42,17 @@ const _sfc_main = create({
|
|
|
41
42
|
},
|
|
42
43
|
iconColor: {
|
|
43
44
|
type: String
|
|
45
|
+
},
|
|
46
|
+
to: {
|
|
47
|
+
type: [String, Object]
|
|
48
|
+
},
|
|
49
|
+
url: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
replace: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
44
56
|
}
|
|
45
57
|
},
|
|
46
58
|
emits: ["click"],
|
|
@@ -48,7 +60,7 @@ const _sfc_main = create({
|
|
|
48
60
|
const Parent = useInject(GRID_KEY);
|
|
49
61
|
if (!Parent.parent)
|
|
50
62
|
return;
|
|
51
|
-
const
|
|
63
|
+
const index2 = Parent.index;
|
|
52
64
|
const parent = Parent.parent.props;
|
|
53
65
|
const rootClass = computed(() => {
|
|
54
66
|
const prefixCls = componentName;
|
|
@@ -64,7 +76,7 @@ const _sfc_main = create({
|
|
|
64
76
|
style.paddingTop = `${100 / +parent.columnNum}%`;
|
|
65
77
|
} else if (parent.gutter) {
|
|
66
78
|
style.paddingRight = pxCheck(parent.gutter);
|
|
67
|
-
if (
|
|
79
|
+
if (index2.value >= parent.columnNum) {
|
|
68
80
|
style.marginTop = pxCheck(parent.gutter);
|
|
69
81
|
}
|
|
70
82
|
}
|
|
@@ -80,7 +92,7 @@ const _sfc_main = create({
|
|
|
80
92
|
[`${prefixCls}--square`]: parent.square,
|
|
81
93
|
[`${prefixCls}--reverse`]: parent.reverse,
|
|
82
94
|
[`${prefixCls}--${parent.direction}`]: !!parent.direction,
|
|
83
|
-
[`${prefixCls}--clickable`]: parent.clickable
|
|
95
|
+
[`${prefixCls}--clickable`]: parent.clickable || props.to || props.url
|
|
84
96
|
};
|
|
85
97
|
});
|
|
86
98
|
const iconProps = computed(() => {
|
|
@@ -90,8 +102,14 @@ const _sfc_main = create({
|
|
|
90
102
|
color: props.iconColor || parent.iconColor
|
|
91
103
|
};
|
|
92
104
|
});
|
|
105
|
+
const router = useRouter();
|
|
93
106
|
const handleClick = (event) => {
|
|
94
107
|
emit("click", event);
|
|
108
|
+
if (props.to && router) {
|
|
109
|
+
router[props.replace ? "replace" : "push"](props.to);
|
|
110
|
+
} else if (props.url) {
|
|
111
|
+
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
112
|
+
}
|
|
95
113
|
};
|
|
96
114
|
return {
|
|
97
115
|
rootClass,
|
|
@@ -124,11 +142,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
124
142
|
size: _ctx.iconProps.size,
|
|
125
143
|
color: _ctx.iconProps.color
|
|
126
144
|
}), null, 16, ["name", "size", "color"])),
|
|
127
|
-
createTextVNode(),
|
|
128
145
|
_ctx.$slots.text ? renderSlot(_ctx.$slots, "text", { key: 2 }) : (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.text), 1))
|
|
129
146
|
], 64))
|
|
130
147
|
], 2)
|
|
131
148
|
], 6);
|
|
132
149
|
}
|
|
133
|
-
var
|
|
134
|
-
export {
|
|
150
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
151
|
+
export { index as default };
|