@uxda/appkit 4.2.62 → 4.2.64

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/appkit.css CHANGED
@@ -826,7 +826,7 @@ page {
826
826
  .account-view .row {
827
827
  display: flex;
828
828
  flex-direction: row;
829
- margin: 10px 15px;
829
+ padding: 10px 15px;
830
830
  }
831
831
  .account-view .jusify-right {
832
832
  justify-content: flex-end;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
4
4
  import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, createCommentVNode, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, withDirectives, vShow, useModel, mergeModels, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
5
5
  import '@nutui/nutui-taro/dist/packages/grid/style/css';
6
6
  import '@nutui/nutui-taro/dist/packages/griditem/style/css';
7
- import Taro, { getSystemInfoSync, getMenuButtonBoundingClientRect, uploadFile, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, useDidShow, showModal, getStorageSync, chooseImage, useRouter } from '@tarojs/taro';
7
+ import Taro, { getSystemInfoSync, getMenuButtonBoundingClientRect, uploadFile, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, useDidShow, showModal, getStorageSync, useRouter } from '@tarojs/taro';
8
8
  import '@nutui/nutui-taro/dist/packages/popup/style/css';
9
9
  import isMobilePhone from 'validator/es/lib/isMobilePhone';
10
10
  import isIdentityCard from 'validator/es/lib/isIdentityCard';
@@ -2535,9 +2535,7 @@ var script$v = /* @__PURE__ */ defineComponent({
2535
2535
  _cache[0] || (_cache[0] = createElementVNode(
2536
2536
  "div",
2537
2537
  { class: "consumption-filter-title" },
2538
- [
2539
- createElementVNode("h3", null, "\u9009\u62E9\u7B5B\u9009\u9879")
2540
- ],
2538
+ " \u9009\u62E9\u7B5B\u9009\u9879 ",
2541
2539
  -1
2542
2540
  /* HOISTED */
2543
2541
  )),
@@ -3793,9 +3791,7 @@ var script$n = /* @__PURE__ */ defineComponent({
3793
3791
  _cache[0] || (_cache[0] = createElementVNode(
3794
3792
  "div",
3795
3793
  { class: "list-filter-picker-title" },
3796
- [
3797
- createElementVNode("h3", null, "\u9009\u62E9\u7B5B\u9009\u9879")
3798
- ],
3794
+ " \u9009\u62E9\u7B5B\u9009\u9879 ",
3799
3795
  -1
3800
3796
  /* HOISTED */
3801
3797
  )),
@@ -6037,12 +6033,18 @@ var script$9 = /* @__PURE__ */ defineComponent({
6037
6033
  });
6038
6034
  updateImage(res.tempFilePath);
6039
6035
  } else {
6040
- let res = await chooseImage({
6041
- count: 1
6036
+ let res = await chooseMedia({
6037
+ count: 1,
6038
+ sourceType: ["album"]
6039
+ // "camera" | "album"
6042
6040
  });
6043
- if (res.tempFilePaths) {
6044
- const filePath = res.tempFilePaths[0];
6045
- emits("crop", filePath);
6041
+ if (res.tempFiles) {
6042
+ const { tempFilePath } = res.tempFiles[0];
6043
+ if (Taro.getEnv() === "WEB") {
6044
+ updateImage(tempFilePath);
6045
+ return;
6046
+ }
6047
+ emits("crop", tempFilePath);
6046
6048
  }
6047
6049
  }
6048
6050
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.62",
3
+ "version": "4.2.64",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -444,7 +444,7 @@ onMounted(() => {
444
444
  .row {
445
445
  display: flex;
446
446
  flex-direction: row;
447
- margin: 10px 15px;
447
+ padding: 10px 15px;
448
448
  }
449
449
 
450
450
  .jusify-right {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="consumption-filter">
3
3
  <div class="consumption-filter-title">
4
- <h3>选择筛选项</h3>
4
+ 选择筛选项
5
5
  </div>
6
6
  <div class="consumption-filter-content">
7
7
  <template v-for="(item, index) in filterSections" :key="index">
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="list-filter-picker">
3
3
  <div class="list-filter-picker-title">
4
- <h3>选择筛选项</h3>
4
+ 选择筛选项
5
5
  </div>
6
6
  <div class="list-filter-picker-content">
7
7
  <template v-for="(item, index) in filterSections" :key="index">
@@ -128,7 +128,7 @@
128
128
  </template>
129
129
 
130
130
  <script lang="ts" setup>
131
- import Taro, { useDidShow, showToast, showLoading, hideLoading, uploadFile, showModal, chooseImage } from "@tarojs/taro";
131
+ import Taro, { useDidShow, showToast, showLoading, hideLoading, uploadFile, showModal, chooseMedia } from "@tarojs/taro";
132
132
  import { ref, onMounted, reactive, onUnmounted } from "vue";
133
133
  import { useAppKitOptions } from "../../Appkit";
134
134
  import { useEncode } from "../../shared/composables/useEncode";
@@ -198,13 +198,19 @@ async function toUpload() {
198
198
 
199
199
  updateImage(res.tempFilePath);
200
200
  } else {
201
- let res = await chooseImage({
201
+ let res = await chooseMedia({
202
202
  count: 1,
203
+ sourceType: ['album'], // "camera" | "album"
203
204
  });
204
- if (res.tempFilePaths) {
205
- const filePath = res.tempFilePaths[0];
205
+ if (res.tempFiles) {
206
+ const { tempFilePath } = res.tempFiles[0];
206
207
 
207
- emits("crop", filePath);
208
+ if (Taro.getEnv() === "WEB") {
209
+ updateImage(tempFilePath);
210
+ return
211
+ }
212
+
213
+ emits("crop", tempFilePath);
208
214
  }
209
215
  }
210
216
  }