From 092474eaa4cde8f5021e708d5c91ed992382644c Mon Sep 17 00:00:00 2001 From: fengchunqi Date: Tue, 11 Apr 2023 16:22:55 +0800 Subject: [PATCH 1/2] refactor(rate): rate tips --- .../__test__/__snapshots__/demo.test.jsx.snap | 7574 +++-------------- src/rate/__test__/demo.test.jsx | 22 +- src/rate/__test__/index.test.jsx | 57 +- src/rate/demos/action.vue | 25 + src/rate/demos/allow-half.vue | 13 - src/rate/demos/{filled.vue => base.vue} | 5 +- src/rate/demos/color.vue | 11 +- src/rate/demos/count.vue | 7 +- src/rate/demos/custom.vue | 15 + src/rate/demos/disabled.vue | 13 - src/rate/demos/icon.vue | 17 - src/rate/demos/mobile.vue | 43 +- src/rate/demos/outline.vue | 8 - src/rate/demos/show-text.vue | 26 + src/rate/demos/size.vue | 9 +- src/rate/demos/special.vue | 30 + src/rate/demos/text.vue | 25 - src/rate/rate.vue | 311 +- src/rate/style/index.js | 2 +- 19 files changed, 1392 insertions(+), 6821 deletions(-) create mode 100644 src/rate/demos/action.vue delete mode 100644 src/rate/demos/allow-half.vue rename src/rate/demos/{filled.vue => base.vue} (64%) create mode 100644 src/rate/demos/custom.vue delete mode 100644 src/rate/demos/disabled.vue delete mode 100644 src/rate/demos/icon.vue delete mode 100644 src/rate/demos/outline.vue create mode 100644 src/rate/demos/show-text.vue create mode 100644 src/rate/demos/special.vue delete mode 100644 src/rate/demos/text.vue diff --git a/src/rate/__test__/__snapshots__/demo.test.jsx.snap b/src/rate/__test__/__snapshots__/demo.test.jsx.snap index 73dc10158..b8aa37fca 100644 --- a/src/rate/__test__/__snapshots__/demo.test.jsx.snap +++ b/src/rate/__test__/__snapshots__/demo.test.jsx.snap @@ -1,347 +1,189 @@ // Vitest Snapshot v1 -exports[`Rate > Rate allowHalfVue demo works fine 1`] = ` +exports[`Rate > Rate actionVue demo works fine 1`] = `
-
- 半星评价 -
-
    + +

    + 只可选全星时 +

    +
+
-
  • - - - - - - - + 点击或滑动 +
  • - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - - - - - - - - - + +
  • + + + - -
  • + + + +
    +
    + +

    - - - - - - - - - - - - - - - - - - - - - - - -

  • -
  • + +
    + +
    - - - - - - - + 点击或滑动 +
    - - - - - - - - - - - - - - - -
  • -
  • - - - - - - - - - - - - - - - - - - - - - - + + + + + -
  • + + + + + + +`; + +exports[`Rate > Rate baseVue demo works fine 1`] = ` +
    +
    + 实心评分 +
    + +
    +
    - + + + + + + +
    +
    @@ -360,244 +202,41 @@ exports[`Rate > Rate colorVue demo works fine 1`] = `
    - 空心评分 + 填充评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    +
    @@ -609,354 +248,41 @@ exports[`Rate > Rate colorVue demo works fine 1`] = `
    - 实心评分 + 线描评分
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • + + + + + -
    +
    + @@ -972,1055 +298,179 @@ exports[`Rate > Rate countVue demo works fine 1`] = `
    - 自定义数量 + 自定义评分数量
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + -
    +
    + `; -exports[`Rate > Rate disabledVue demo works fine 1`] = ` +exports[`Rate > Rate customVue demo works fine 1`] = `
    - 仅展示 + 自定义评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    +
    `; -exports[`Rate > Rate filledVue demo works fine 1`] = ` +exports[`Rate > Rate mobileVue demo works fine 1`] = `
    -
    - 请点击评分 -
    - + Rate 评分 + +

    + 用于对某行为/事物进行打分。 +

    +
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • +

      + 实心评分 +

      +
    +
    + +
    - - - - - - - - + +
    - - - - - - - -
  • - - - - - - - - - - - - - - -
  • -
  • - - - - - - - - - - - - - - -
  • -
  • - - - - - - - - - - - - - - -
  • - - - -
    - -
    -`; - -exports[`Rate > Rate iconVue demo works fine 1`] = ` -
    -
    - 规格20 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - + +
    + + +
    - +
    - - +
    - - -`; - -exports[`Rate > Rate mobileVue demo works fine 1`] = ` -
    -

    - Rate 评分 -

    -

    - 用于对某行为/事物进行打分。 -

    -

    - 01 类型 -

    +

    - 实心评分 + 自定义评分

    Rate mobileVue demo works fine 1`] = `
    - 请点击评分 + 自定义评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    +
    @@ -2279,7 +534,7 @@ exports[`Rate > Rate mobileVue demo works fine 1`] = `

    - 空心评分 + 自定义评分数量

    Rate mobileVue demo works fine 1`] = `
    - 请点击评分 + 自定义评分数量
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + -
    +
    +
    @@ -2538,587 +590,337 @@ exports[`Rate > Rate mobileVue demo works fine 1`] = `

    - 自定义数量评分 + 带描述评分

    +
    - 自定义数量 + 带描述评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + + +
    + + 一般 + + +
    + +
    +
    +
    + 带描述评分 +
    + +
    +
    + + + + + + + +
    + + 5 分 + + +
    + +
    +
    +
    + 带描述评分 +
    + +
    +
    + + + + + + - +
    +
    +
    - -

    - 半星评分 -

    + 02 组件状态 + +
    +
    - 半星评价 + +

    + 只可选全星时 +

    -
    + +
    +
    + 点击或滑动 +
    + +
    +
    + + + + + + + +
    + + +
    + +
    + +
    +
    +
    +
    -
      - -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • - -
    +

    + 可选半星时 +

    +
    +
    + +
    +
    + 点击或滑动 +
    + +
    +
    + + + + + + + +
    + + +
    + +
    +
    -
    +
    - +

    + 03 组件样式 +

    - 带描述评分 + 评分大小

    Rate mobileVue demo works fine 1`] = `
    - 请点击评分 + 大尺寸 24
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    - - 3 分 - +
    + +
    - 请点击评分 + 小尺寸 20
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    - - 一般 - -
    - -
    -
    -
    - 请点击评分 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • - -
    - - 一般 - -
    - -
    - - -
    - -
    -
    - -

    - 禁用评分 -

    -
    -
    - -
    -
    - 仅展示 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • - -
    +
    +
    +
    Rate mobileVue demo works fine 1`] = `
    - 空心评分 + 填充评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    +
    @@ -4398,354 +1095,41 @@ exports[`Rate > Rate mobileVue demo works fine 1`] = `
    - 实心评分 + 线描评分
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • + + + + + -
    +
    + @@ -4763,861 +1147,63 @@ exports[`Rate > Rate mobileVue demo works fine 1`] = `

    - 02 规格 + 04 特殊样式

    - 评价规格 + 竖向带描述评分

    -
    -
    - 规格20 -
    +
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    -
    - -
    -
    -
    - 规格16 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • - -
    - -
    - - - - -
    -
    - -

    - 自定义图标评分 -

    -
    -
    - -
    - 规格20 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - -
    • - -
    - + 可以前往
    @@ -5627,731 +1213,155 @@ exports[`Rate > Rate mobileVue demo works fine 1`] = `
    `; -exports[`Rate > Rate outlineVue demo works fine 1`] = ` -
    -
    - 请点击评分 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • - -
    - -
    - -
    -`; - -exports[`Rate > Rate sizeVue demo works fine 1`] = ` +exports[`Rate > Rate showTextVue demo works fine 1`] = `
    - 规格20 + 带描述评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    +
    + + 一般 +
    - 规格16 + 带描述评分
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + + +
    + + 5 分 + + +
    + +
    +
    +
    + 带描述评分 +
    + +
    +
    - + + + + + + +
    +
    @@ -6360,745 +1370,153 @@ exports[`Rate > Rate sizeVue demo works fine 1`] = `
    `; -exports[`Rate > Rate textVue demo works fine 1`] = ` +exports[`Rate > Rate sizeVue demo works fine 1`] = `
    - 请点击评分 + 大尺寸 24
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    - - 3 分 - +
    + +
    - 请点击评分 + 小尺寸 20
    -
      -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • + + + + + -
    - - 一般 - +
    + +
    + + +`; + +exports[`Rate > Rate specialVue demo works fine 1`] = ` +
    + +
    - 请点击评分 -
    - -
    -
      - -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • -
    • - - - - - - - - - - - - - - -
    • - -
    - - 一般 - + + + + + + +
    - + + +
    +
    + 可以前往
    diff --git a/src/rate/__test__/demo.test.jsx b/src/rate/__test__/demo.test.jsx index 5053c0ce7..1b91945f2 100644 --- a/src/rate/__test__/demo.test.jsx +++ b/src/rate/__test__/demo.test.jsx @@ -3,28 +3,26 @@ */ import { mount } from '@vue/test-utils'; -import allowHalfVue from '@/rate/demos/allow-half.vue'; +import actionVue from '@/rate/demos/action.vue'; +import baseVue from '@/rate/demos/base.vue'; import colorVue from '@/rate/demos/color.vue'; import countVue from '@/rate/demos/count.vue'; -import disabledVue from '@/rate/demos/disabled.vue'; -import filledVue from '@/rate/demos/filled.vue'; -import iconVue from '@/rate/demos/icon.vue'; +import customVue from '@/rate/demos/custom.vue'; import mobileVue from '@/rate/demos/mobile.vue'; -import outlineVue from '@/rate/demos/outline.vue'; +import showTextVue from '@/rate/demos/show-text.vue'; import sizeVue from '@/rate/demos/size.vue'; -import textVue from '@/rate/demos/text.vue'; +import specialVue from '@/rate/demos/special.vue'; const mapper = { - allowHalfVue, + actionVue, + baseVue, colorVue, countVue, - disabledVue, - filledVue, - iconVue, + customVue, mobileVue, - outlineVue, + showTextVue, sizeVue, - textVue, + specialVue, }; describe('Rate', () => { diff --git a/src/rate/__test__/index.test.jsx b/src/rate/__test__/index.test.jsx index 810901c59..c95e5ba43 100644 --- a/src/rate/__test__/index.test.jsx +++ b/src/rate/__test__/index.test.jsx @@ -1,7 +1,7 @@ import { ref } from 'vue'; import { mount } from '@vue/test-utils'; import { describe, it, expect, vi } from 'vitest'; -import { StarFilledIcon, StarIcon } from 'tdesign-icons-vue-next'; +import { IconFont, StarIcon } from 'tdesign-icons-vue-next'; import Rate from '../rate.vue'; import { trigger } from '../../image-viewer/__test__/touch'; @@ -18,65 +18,56 @@ describe('Rate', () => { describe('Rate', () => { it('create', async () => { const wrapper = mount(() => ); - expect(wrapper.classes()).toContain('t-rate'); - const items = wrapper.findAll('.t-rate--item'); + expect(wrapper.classes()).toContain(`${name}`); + const items = wrapper.findAll(`.${name}__icon`); expect(items.length).toBe(5); - const icon = wrapper.findComponent(StarFilledIcon); + const icon = wrapper.findComponent(IconFont); expect(icon.exists()).toBeTruthy(); }); it(': count', async () => { const wrapper = mount(() => ); - const items = wrapper.findAll('.t-rate--item'); + const items = wrapper.findAll(`.${name}__icon`); expect(items.length).toBe(10); }); it(': gap', async () => { const wrapper = mount(() => ); - const items = wrapper.findAll('.t-rate--item'); + const items = wrapper.findAll(`.${name}__icon`); for (let i = 0; i < items.length - 1; i++) { expect(getComputedStyle(items[i].element, null).marginRight).toBe('10px'); } expect(getComputedStyle(items[items.length - 1].element, null).marginRight).toBe('0px'); }); - it(': variant', async () => { - const wrapper = mount(() => ); - const icon = wrapper.findComponent(StarIcon); - expect(icon.exists()).toBeTruthy(); - }); - it(': allowHalf', async () => { const value = ref(0); const showText = true; const texts = ['很差', '差', '一般', '好评', '优秀']; const onChange = vi.fn(); const wrapper = mount(() => ); - const leftIcons = wrapper.findAll('.t-rate--icon-left'); - const rightIcons = wrapper.findAll('.t-rate--icon-right'); - await leftIcons[0].trigger('click'); + const icons = wrapper.findAll(`.${name}__icon`); + await icons[0].trigger('click'); + let tips = wrapper.find(`.${name}__tips`) + expect(tips.exists()).toBeTruthy(); + let tipsItem = tips.findAll(`.${name}__tips-item`); + await tipsItem[0].trigger('click'); expect(onChange).toHaveBeenCalledTimes(1); - expect(leftIcons[0].exists()).toBeTruthy(); + expect(icons[0].exists()).toBeTruthy(); expect(value.value).toBe(0.5); - await rightIcons[0].trigger('click'); + await icons[0].trigger('click'); + tips = wrapper.find(`.${name}__tips`) + expect(tips.exists()).toBeTruthy(); + tipsItem = tips.findAll(`.${name}__tips-item`); + await tipsItem[1].trigger('click'); expect(onChange).toHaveBeenCalledTimes(2); - expect(rightIcons[0].exists()).toBeTruthy(); + expect(icons[0].exists()).toBeTruthy(); expect(value.value).toBe(1); - const $target = wrapper.find(`.${name}--list`); + const $target = wrapper.find(`.${name}__wrapper`); await move($target); expect(onChange).toHaveBeenCalledTimes(3); }); - it(': clearable', async () => { - const value = ref(1); - const wrapper = mount(() => ); - const icons = wrapper.findAll('.t-rate--icon'); - await icons[1].trigger('click'); - expect(value.value).toBe(2); - await icons[1].trigger('click'); - expect(value.value).toBe(0); - }); - it(': showText && texts', async () => { const defaultValue = 3; const showText = true; @@ -90,10 +81,10 @@ describe('Rate', () => { onChange, }, }); - const $text = wrapper.find(`.${name}--text`); + const $text = wrapper.find(`.${name}__text`); expect($text.text()).toEqual(texts[defaultValue - 1]); - const icons = wrapper.findAll(`.${name}--icon`); + const icons = wrapper.findAll(`.${name}__icon`); const index = 3; await icons[index].trigger('click'); expect(onChange).toHaveBeenLastCalledWith(index + 1); @@ -108,8 +99,8 @@ describe('Rate', () => { }, }); // disabled = true, 不触发 change, touch 无效 - const $target = wrapper.find(`.${name}--list`); - const icons = wrapper.findAll(`.${name}--icon`); + const $target = wrapper.find(`.${name}__wrapper`); + const icons = wrapper.findAll(`.${name}__icon`); const index = 3; await icons[index].trigger('click'); diff --git a/src/rate/demos/action.vue b/src/rate/demos/action.vue new file mode 100644 index 000000000..cc5420f75 --- /dev/null +++ b/src/rate/demos/action.vue @@ -0,0 +1,25 @@ + + + + diff --git a/src/rate/demos/allow-half.vue b/src/rate/demos/allow-half.vue deleted file mode 100644 index bc6b787b9..000000000 --- a/src/rate/demos/allow-half.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/src/rate/demos/filled.vue b/src/rate/demos/base.vue similarity index 64% rename from src/rate/demos/filled.vue rename to src/rate/demos/base.vue index e7d0eefff..f6c842ecd 100644 --- a/src/rate/demos/filled.vue +++ b/src/rate/demos/base.vue @@ -1,6 +1,6 @@ @@ -11,6 +11,5 @@ import CustomCell from './components/custom-cell.vue'; const changeValue = (val: Number) => { console.log('current value is', val); }; -const defaultGap = 8; const value = ref(3); diff --git a/src/rate/demos/color.vue b/src/rate/demos/color.vue index 4b2343c92..7d00724e4 100644 --- a/src/rate/demos/color.vue +++ b/src/rate/demos/color.vue @@ -1,9 +1,9 @@ @@ -11,8 +11,7 @@ import { ref } from 'vue'; import CustomCell from './components/custom-cell.vue'; -const defaultGap = 8; -const value = ref(2.5); +const value = ref(2); const value1 = ref(3); diff --git a/src/rate/demos/size.vue b/src/rate/demos/size.vue index dbef48324..616c66314 100644 --- a/src/rate/demos/size.vue +++ b/src/rate/demos/size.vue @@ -1,9 +1,9 @@ @@ -11,7 +11,6 @@ import { ref } from 'vue'; import CustomCell from './components/custom-cell.vue'; -const defaultGap = 8; const value = ref(3); const value1 = ref(3); diff --git a/src/rate/demos/special.vue b/src/rate/demos/special.vue new file mode 100644 index 000000000..fae38a3fb --- /dev/null +++ b/src/rate/demos/special.vue @@ -0,0 +1,30 @@ + + + + diff --git a/src/rate/demos/text.vue b/src/rate/demos/text.vue deleted file mode 100644 index 1aec81eff..000000000 --- a/src/rate/demos/text.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - diff --git a/src/rate/rate.vue b/src/rate/rate.vue index 344a99e66..20e4fd7c2 100644 --- a/src/rate/rate.vue +++ b/src/rate/rate.vue @@ -1,38 +1,85 @@ + diff --git a/src/rate/demos/base.vue b/src/rate/demos/base.vue index f6c842ecd..7922049c8 100644 --- a/src/rate/demos/base.vue +++ b/src/rate/demos/base.vue @@ -1,15 +1,31 @@ + + diff --git a/src/rate/demos/color.vue b/src/rate/demos/color.vue index 7d00724e4..ead90fabd 100644 --- a/src/rate/demos/color.vue +++ b/src/rate/demos/color.vue @@ -1,21 +1,37 @@ + diff --git a/src/rate/demos/components/custom-cell.vue b/src/rate/demos/components/custom-cell.vue deleted file mode 100644 index ffcdd9b17..000000000 --- a/src/rate/demos/components/custom-cell.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/src/rate/demos/count.vue b/src/rate/demos/count.vue index 549fba1a5..1ca222712 100644 --- a/src/rate/demos/count.vue +++ b/src/rate/demos/count.vue @@ -1,12 +1,28 @@ + + diff --git a/src/rate/demos/custom.vue b/src/rate/demos/custom.vue index e010f9331..99c35f754 100644 --- a/src/rate/demos/custom.vue +++ b/src/rate/demos/custom.vue @@ -1,15 +1,32 @@ + + diff --git a/src/rate/demos/mobile.vue b/src/rate/demos/mobile.vue index 7f4ded5bf..36b51bf47 100644 --- a/src/rate/demos/mobile.vue +++ b/src/rate/demos/mobile.vue @@ -15,15 +15,18 @@ +
    +
    +
    @@ -40,22 +43,3 @@ import SizeDemo from './size.vue'; import ColorDemo from './color.vue'; import SpecialDemo from './special.vue'; - - diff --git a/src/rate/demos/show-text.vue b/src/rate/demos/show-text.vue index 836420ff8..999357534 100644 --- a/src/rate/demos/show-text.vue +++ b/src/rate/demos/show-text.vue @@ -1,26 +1,43 @@ + diff --git a/src/rate/demos/size.vue b/src/rate/demos/size.vue index 616c66314..6e4d83883 100644 --- a/src/rate/demos/size.vue +++ b/src/rate/demos/size.vue @@ -1,21 +1,37 @@ + diff --git a/src/rate/demos/special.vue b/src/rate/demos/special.vue index fae38a3fb..094ea005f 100644 --- a/src/rate/demos/special.vue +++ b/src/rate/demos/special.vue @@ -1,18 +1,27 @@ +