Browse Source

Merge branch 'v4' of https://github.com/Ymm0008/nutui into v4

Ymm0008 3 years ago
parent
commit
d6e067021f

+ 0 - 1
publish/nutui-taro/package.json

@@ -52,7 +52,6 @@
     }
     }
   },
   },
   "dependencies": {
   "dependencies": {
-    "@nutui/icons-vue": "0.0.19",
     "@nutui/icons-vue-taro": "0.0.3",
     "@nutui/icons-vue-taro": "0.0.3",
     "@tarojs/components": "3.5.6",
     "@tarojs/components": "3.5.6",
     "sass": "^1.50.0",
     "sass": "^1.50.0",

+ 0 - 4
src/packages/__VUE/imagepreview/index.taro.vue

@@ -76,10 +76,6 @@ export default create({
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    closeIcon: {
-      type: String,
-      default: 'circle-close'
-    },
     closeIconPosition: {
     closeIconPosition: {
       type: String,
       type: String,
       default: 'top-right' // top-right  top-left
       default: 'top-right' // top-right  top-left

+ 1 - 1
src/packages/__VUE/imagepreview/index.ts

@@ -38,7 +38,7 @@ class ImagePreviewFunction {
   constructor(_options: ImagePreviewOptions) {
   constructor(_options: ImagePreviewOptions) {
     const options = Object.assign(this.options, _options);
     const options = Object.assign(this.options, _options);
     const { instance, unmount } = CreateComponent(options, {
     const { instance, unmount } = CreateComponent(options, {
-      name: 'imagepreview',
+      name: 'image-preview',
       components: [Popup, Video, Swiper, SwiperItem, Overlay],
       components: [Popup, Video, Swiper, SwiperItem, Overlay],
       wrapper: () => {
       wrapper: () => {
         return {
         return {

+ 2 - 4
src/packages/__VUE/imagepreview/index.vue

@@ -73,10 +73,6 @@ export default create({
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    closeIcon: {
-      type: String,
-      default: 'circle-close'
-    },
     closeIconPosition: {
     closeIconPosition: {
       type: String,
       type: String,
       default: 'top-right' // top-right  top-left
       default: 'top-right' // top-right  top-left
@@ -141,6 +137,7 @@ export default create({
     const init = () => {
     const init = () => {
       if (swipeRef.value) {
       if (swipeRef.value) {
         const rect = useRect(swipeRef.value);
         const rect = useRect(swipeRef.value);
+        console.log('show');
         state.rootHeight = rect.height;
         state.rootHeight = rect.height;
         state.rootWidth = rect.width;
         state.rootWidth = rect.width;
       }
       }
@@ -149,6 +146,7 @@ export default create({
     watch(
     watch(
       () => props.show,
       () => props.show,
       (val) => {
       (val) => {
+        console.log('展示', val);
         state.showPop = val;
         state.showPop = val;
         init();
         init();
       }
       }

+ 3 - 2
src/packages/__VUE/menu/doc.en-US.md

@@ -218,8 +218,8 @@ export default {
     <template #icon>
     <template #icon>
       <TriangleDown />
       <TriangleDown />
     </template>
     </template>
-    <nut-menu-item v-model="state.value1" :options="options1" />
-    <nut-menu-item v-model="state.value2" @change="handleChange" :options="options2">
+    <nut-menu-item v-model="state.value1" :options="state.options1" />
+    <nut-menu-item v-model="state.value2" @change="handleChange" :options="state.options2">
       <template #icon>
       <template #icon>
         <Checked></Checked>
         <Checked></Checked>
       </template>
       </template>
@@ -229,6 +229,7 @@ export default {
 
 
 <script>
 <script>
 import { reactive, ref } from 'vue';
 import { reactive, ref } from 'vue';
+import { TriangleDown, Checked } from '@nutui/icons-vue';
 
 
 export default {
 export default {
   setup() {
   setup() {

+ 3 - 2
src/packages/__VUE/menu/doc.md

@@ -219,8 +219,8 @@ export default {
     <template #icon>
     <template #icon>
       <TriangleDown />
       <TriangleDown />
     </template>
     </template>
-    <nut-menu-item v-model="state.value1" :options="options1" />
-    <nut-menu-item v-model="state.value2" @change="handleChange" :options="options2">
+    <nut-menu-item v-model="state.value1" :options="state.options1" />
+    <nut-menu-item v-model="state.value2" @change="handleChange" :options="state.options2">
       <template #icon>
       <template #icon>
         <Checked></Checked>
         <Checked></Checked>
       </template>
       </template>
@@ -230,6 +230,7 @@ export default {
 
 
 <script>
 <script>
 import { reactive, ref } from 'vue';
 import { reactive, ref } from 'vue';
+import { TriangleDown, Checked } from '@nutui/icons-vue';
 
 
 export default {
 export default {
   setup() {
   setup() {

+ 3 - 2
src/packages/__VUE/menu/doc.taro.md

@@ -219,8 +219,8 @@ export default {
     <template #icon>
     <template #icon>
       <TriangleDown />
       <TriangleDown />
     </template>
     </template>
-    <nut-menu-item v-model="state.value1" :options="options1" />
-    <nut-menu-item v-model="state.value2" @change="handleChange" :options="options2">
+    <nut-menu-item v-model="state.value1" :options="state.options1" />
+    <nut-menu-item v-model="state.value2" @change="handleChange" :options="state.options2">
       <template #icon>
       <template #icon>
         <Checked></Checked>
         <Checked></Checked>
       </template>
       </template>
@@ -230,6 +230,7 @@ export default {
 
 
 <script>
 <script>
 import { reactive, ref } from 'vue';
 import { reactive, ref } from 'vue';
+import { TriangleDown, Checked } from '@nutui/icons-vue';
 
 
 export default {
 export default {
   setup() {
   setup() {

+ 0 - 2
src/packages/__VUE/popup/index.vue

@@ -7,8 +7,6 @@
       :z-index="zIndex"
       :z-index="zIndex"
       :lock-scroll="lockScroll"
       :lock-scroll="lockScroll"
       :duration="duration"
       :duration="duration"
-      :overlay-class="overlayClass"
-      :overlay-style="overlayStyle"
       @click="onClickOverlay"
       @click="onClickOverlay"
       v-bind="$attrs"
       v-bind="$attrs"
     />
     />

+ 0 - 7
src/packages/__VUE/popup/props.ts

@@ -71,12 +71,5 @@ export const popupProps = {
   safeAreaInsetBottom: {
   safeAreaInsetBottom: {
     type: Boolean,
     type: Boolean,
     default: false
     default: false
-  },
-  overlayClass: {
-    type: String,
-    default: ''
-  },
-  overlayStyle: {
-    type: Object as PropType<CSSProperties>
   }
   }
 };
 };

+ 2 - 2
src/packages/__VUE/price/doc.md

@@ -112,8 +112,8 @@ app.use(Price);
 | symbol         | 符号类型                                | String           | &yen;  |
 | symbol         | 符号类型                                | String           | &yen;  |
 | decimal-digits | 小数位位数                              | Number  | 2     |
 | decimal-digits | 小数位位数                              | Number  | 2     |
 | thousands      | 是否按照千分号形式显示                    | Boolean          | false  |
 | thousands      | 是否按照千分号形式显示                    | Boolean          | false  |
-| position       | 符号显示在价格前或者后,`before`、`after`  | String           | before |
-| size           | 价格尺寸,`large`、`normal`、`small`     | String           | large |
+| position       | 符号显示在价格前或者后,`before`、`after`  | String           | `before` |
+| size           | 价格尺寸,`large`、`normal`、`small`     | String           | `large` |
 
 
 
 
 ## 主题定制
 ## 主题定制

+ 3 - 2
src/packages/__VUE/pullrefresh/index.scss

@@ -18,8 +18,9 @@
       justify-content: center;
       justify-content: center;
 
 
       &-icon {
       &-icon {
-        width: 28px;
-        height: 24px;
+        margin-right: 4px;
+        width: 16px;
+        height: 16px;
       }
       }
       &-text {
       &-text {
         font-size: $font-size-2;
         font-size: $font-size-2;

+ 1 - 1
src/packages/__VUE/switch/demo.vue

@@ -54,7 +54,7 @@
     <h2>{{ translate('title8') }}</h2>
     <h2>{{ translate('title8') }}</h2>
     <nut-cell>
     <nut-cell>
       <nut-switch v-model="checked" @change="change" loading>
       <nut-switch v-model="checked" @change="change" loading>
-        <template #icon><Loading /></template>
+        <template #icon><Loading name="loading" /></template>
       </nut-switch>
       </nut-switch>
     </nut-cell>
     </nut-cell>
   </div>
   </div>

+ 1 - 1
src/packages/__VUE/switch/index.taro.vue

@@ -2,7 +2,7 @@
   <view :class="classes" @click="onClick" :style="style">
   <view :class="classes" @click="onClick" :style="style">
     <view class="nut-switch-button">
     <view class="nut-switch-button">
       <slot name="icon" v-if="loading">
       <slot name="icon" v-if="loading">
-        <Loading1 />
+        <Loading1 name="loading" />
       </slot>
       </slot>
       <template v-if="activeText">
       <template v-if="activeText">
         <view class="nut-switch-label open" v-show="modelValue">{{ activeText }}</view>
         <view class="nut-switch-label open" v-show="modelValue">{{ activeText }}</view>

+ 1 - 1
src/packages/__VUE/switch/index.vue

@@ -2,7 +2,7 @@
   <view :class="classes" @click="onClick" :style="style">
   <view :class="classes" @click="onClick" :style="style">
     <view class="nut-switch-button">
     <view class="nut-switch-button">
       <slot name="icon" v-if="loading">
       <slot name="icon" v-if="loading">
-        <Loading1 />
+        <Loading1 name="loading" />
       </slot>
       </slot>
       <template v-if="activeText">
       <template v-if="activeText">
         <view class="nut-switch-label open" v-show="modelValue">{{ activeText }}</view>
         <view class="nut-switch-label open" v-show="modelValue">{{ activeText }}</view>

+ 1 - 1
src/sites/mobile-taro/vue/src/feedback/pages/switch/index.vue

@@ -37,7 +37,7 @@
 
 
     <h2>自定义加载图标</h2>
     <h2>自定义加载图标</h2>
     <nut-cell>
     <nut-cell>
-      <nut-switch v-model="checked" @change="switchChange"><Loading /></nut-switch>
+      <nut-switch v-model="checked" @change="switchChange"><Loading name="loading" /></nut-switch>
     </nut-cell>
     </nut-cell>
   </div>
   </div>
 </template>
 </template>