ソースを参照

fix: 级联修改

Drjnigfubo 3 年 前
コミット
8f66308c85

+ 1 - 0
src/packages/__VUE/cascader/doc.en-US.md

@@ -435,6 +435,7 @@ export default {
 | close-icon-position `v3.1.21` | Cancel the button position and inherit the popup component                                                   | String   | "top-right" |
 | close-icon `v3.1.21` | Customize the close button and inherit the popup component                                                   | String   | "close"     |
 | closeable `v3.1.21` | Whether to display the close button and inherit the popup component                                          | Boolean  | true        |
+| poppable `v3.2.3` | Whether to display the popup(After setting to false, the title is invalid) | Boolean   | true     |
 
 ### Events
 

+ 1 - 0
src/packages/__VUE/cascader/doc.md

@@ -435,6 +435,7 @@ export default {
 | close-icon-position `v3.1.21` | 取消按钮位置,继承 Popup 组件 | String   | "top-right"      |
 | close-icon `v3.1.21` | 自定义关闭按钮,继承 Popup 组件 | String   | "close"     |
 | closeable `v3.1.21` | 是否显示关闭按钮,继承 Popup 组件 | Boolean   | true     |
+| poppable `v3.2.3` | 是否需要弹层展示(设置为false后,title失效) | Boolean   | true     |
 
 ### Events
 

+ 36 - 14
src/packages/__VUE/cascader/index.taro.vue

@@ -1,18 +1,36 @@
 <template>
-  <nut-popup
-    v-model:visible="innerVisible"
-    position="bottom"
-    pop-class="nut-cascader__popup"
-    round
-    :closeable="!closeable"
-    :close-icon="closeIcon"
-    :destroy-on-close="false"
-    :close-icon-position="closeIconPosition"
-  >
-    <template v-if="title">
-      <view class="nut-cascader__bar" v-html="title"></view>
-    </template>
+  <template v-if="poppable">
+    <nut-popup
+      v-model:visible="innerVisible"
+      position="bottom"
+      pop-class="nut-cascader__popup"
+      round
+      :closeable="!closeable"
+      :close-icon="closeIcon"
+      :destroy-on-close="false"
+      :close-icon-position="closeIconPosition"
+    >
+      <template v-if="title">
+        <view class="nut-cascader__bar" v-html="title"></view>
+      </template>
 
+      <nut-cascader-item
+        @change="onChange"
+        @path-change="onPathChange"
+        :modelValue="innerValue"
+        :options="options"
+        :lazy="lazy"
+        :lazy-load="lazyLoad"
+        :value-key="valueKey"
+        :text-key="textKey"
+        :children-key="childrenKey"
+        :convert-config="convertConfig"
+        :visible="innerVisible"
+      />
+    </nut-popup>
+  </template>
+
+  <template v-else>
     <nut-cascader-item
       @change="onChange"
       @path-change="onPathChange"
@@ -26,7 +44,7 @@
       :convert-config="convertConfig"
       :visible="innerVisible"
     />
-  </nut-popup>
+  </template>
 </template>
 <script lang="ts">
 import { watch, ref, Ref, computed } from 'vue';
@@ -63,6 +81,10 @@ export default create({
       type: String,
       default: 'children'
     },
+    poppable: {
+      type: Boolean,
+      default: true
+    },
     convertConfig: Object
   },
   emits: ['update:modelValue', 'change', 'pathChange', 'update:visible'],

+ 35 - 14
src/packages/__VUE/cascader/index.vue

@@ -1,18 +1,35 @@
 <template>
-  <nut-popup
-    v-model:visible="innerVisible"
-    position="bottom"
-    pop-class="nut-cascader__popup"
-    round
-    :closeable="!closeable"
-    :close-icon="closeIcon"
-    :destroy-on-close="false"
-    :close-icon-position="closeIconPosition"
-  >
-    <template v-if="title">
-      <view class="nut-cascader__bar" v-html="title"></view>
-    </template>
+  <template v-if="poppable">
+    <nut-popup
+      v-model:visible="innerVisible"
+      position="bottom"
+      pop-class="nut-cascader__popup"
+      round
+      :closeable="!closeable"
+      :close-icon="closeIcon"
+      :destroy-on-close="false"
+      :close-icon-position="closeIconPosition"
+    >
+      <template v-if="title">
+        <view class="nut-cascader__bar" v-html="title"></view>
+      </template>
 
+      <nut-cascader-item
+        @change="onChange"
+        @path-change="onPathChange"
+        :modelValue="innerValue"
+        :options="options"
+        :lazy="lazy"
+        :lazy-load="lazyLoad"
+        :value-key="valueKey"
+        :text-key="textKey"
+        :children-key="childrenKey"
+        :convert-config="convertConfig"
+        :visible="innerVisible"
+      />
+    </nut-popup>
+  </template>
+  <template v-else>
     <nut-cascader-item
       @change="onChange"
       @path-change="onPathChange"
@@ -26,7 +43,7 @@
       :convert-config="convertConfig"
       :visible="innerVisible"
     />
-  </nut-popup>
+  </template>
 </template>
 <script lang="ts">
 import { watch, ref, Ref, computed } from 'vue';
@@ -63,6 +80,10 @@ export default create({
       type: String,
       default: 'children'
     },
+    poppable: {
+      type: Boolean,
+      default: true
+    },
     convertConfig: Object
   },
   emits: ['update:modelValue', 'change', 'pathChange', 'update:visible'],

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

@@ -348,8 +348,8 @@ export default {
 | title-gutter         | Label gap                                                                                                                          | number,string | 0          |
 | size`v3.1.13`        | Tab bar font size optional value  `large` `normal` `small`                                                                         | string        | normal     |
 | auto-height`v3.1.21` | Automatic height. When set to `true`, `nut-tabs` and `nut-tabs__content` will change with the height of the current `nut-tabpane`. | boolean       | false      |
-| sticky`v3.1.22` `applet not supported` | Whether to use sticky mode| boolean       | false      |
-| top`v3.1.22` `applet not supported` | Sticky offset top | number       | 0      |
+| sticky`v3.2.3` `applet not supported` | Whether to use sticky mode| boolean       | false      |
+| top`v3.2.3` `applet not supported` | Sticky offset top | number       | 0      |
 
 ## Tabs Slots
 

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

@@ -348,8 +348,8 @@ export default {
 | title-gutter         | 标签间隙                                                                                          | number,string | 0          |
 | size`v3.1.13`        | 标签栏字体尺寸大小 可选值  large normal small                                                     | string        | normal     |
 | auto-height`v3.1.21` | 自动高度。设置为 true 时,nut-tabs 和 nut-tabs__content 会随着当前 nut-tabpane 的高度而发生变化。 | boolean       | false      |
-| sticky`v3.1.22` `小程序不支持` | 是否使用粘性布局 | boolean       | false      |
-| top`v3.1.22` `小程序不支持` | 粘性布局下的吸顶距离 | number       | 0      |
+| sticky`v3.2.3` `小程序不支持` | 是否使用粘性布局 | boolean       | false      |
+| top`v3.2.3` `小程序不支持` | 粘性布局下的吸顶距离 | number       | 0      |
 
 ## Tabs Slots