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