Browse Source

Merge branch 'next' of https://github.com/jdf2e/nutui into next

Drjnigfubo 3 years ago
parent
commit
a3e7bcdb51

+ 5 - 3
README.md

@@ -44,11 +44,13 @@
 </p>
 
 <p align="center">
-  <a href="https://nutui.jd.com/jdl/#/index">京东物流视觉(Vue2)</a>
+  <a href="https://nutui.jd.com/jdl/#/index" target="_blank">京东物流视觉(Vue2)</a>
   &nbsp;
-  <a href="https://nutui.jd.com/jdt/#/">京东科技视觉(Vue3)</a>
+  <a href="https://nutui.jd.com/jdt/#/" target="_blank">京东科技视觉(Vue3)</a>
   &nbsp;
-  <a href="https://nutui.jd.com/theme/#/base">组件级UI定制</a>
+  <a href="https://nutui.jd.com/?jdb#/zh-CN/component/button" target="_blank">京东零售B商城视觉(Vue3)</a>
+  &nbsp;
+  <a href="https://nutui.jd.com/theme/#/base" target="_blank">组件级UI定制</a>
 </p>
 
 > Nut[nʌt],源自电影《冰河世纪》里松鼠 Scrat "执迷不悟",一生追求,即便引发大灾难也绝不松手的坚果。

+ 11 - 0
src/packages/__VUE/dialog/__tests__/index.spec.ts

@@ -38,6 +38,17 @@ test('should render dialog template', async () => {
   expect(await overLay.find('.nut-dialog__content'));
 });
 
+test('header slot', async () => {
+  const wrapper = mount(DialogTemplate, {
+    slots: {
+      header: 'test-title'
+    }
+  });
+
+  const overLay = wrapper.getComponent(OverLay);
+  expect(await overLay.find('.nut-dialog__header'));
+});
+
 // test('should render dialog methods', async () => {
 // Dialog({
 //   title: '基础弹框',

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

@@ -13,7 +13,7 @@
     @click-close-icon="closed"
   >
     <view :class="classes">
-      <view v-if="title" class="nut-dialog__header">
+      <view v-if="$slots.header || title" class="nut-dialog__header">
         <slot v-if="$slots.header" name="header"></slot>
         <template v-else>{{ title }}</template>
       </view>

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

@@ -13,7 +13,7 @@
     @click-close-icon="closed"
   >
     <view :class="classes">
-      <view v-if="title" class="nut-dialog__header">
+      <view v-if="$slots.header || title" class="nut-dialog__header">
         <slot v-if="$slots.header" name="header"></slot>
         <template v-else>{{ title }}</template>
       </view>

+ 14 - 0
src/packages/__VUE/picker/ColumnTaro.vue

@@ -307,6 +307,20 @@ export default create({
     );
 
     watch(
+      () => props.itemShow,
+      (val) => {
+        if (val) {
+          setTimeout(() => {
+            getReference();
+          }, 200);
+        }
+      },
+      {
+        deep: true
+      }
+    );
+
+    watch(
       () => props.value,
       (val) => {
         state.transformY = 0;

+ 3 - 0
src/packages/__VUE/tabs/common.ts

@@ -79,6 +79,9 @@ export const component = {
           }
           titles.value.push(title);
         } else {
+          if (vnode.children == ' ') {
+            return;
+          }
           renderTitles(vnode.children as VNode[]);
         }
       });