小编R-b*_*b-n的帖子

Storybook 在 Show Code 中显示所有内容

我正在使用 Vue 3 + Storybook。一切正常,除了当我单击“显示代码”时,它只显示所有内容而不仅仅是模板..我做错了什么?

在此处输入图片说明

这是我的故事:

import Button from './Button.vue';

export default {
  title: 'Components/Button',
  component: Button
};

const Template = (args) => ({
  // Components used in your story `template` are defined in the `components` object
  components: { Button },
  // The story's `args` need to be mapped into the template through the `setup()` method
  setup() {
    return { args };
  },
  // And then the `args` are bound to your component with `v-bind="args"`
  template: '<my-button v-bind="args" />',
}); …
Run Code Online (Sandbox Code Playgroud)

vue.js storybook

5
推荐指数
2
解决办法
565
查看次数

@for 循环中的 SASS 宽度百分比

我还有另一个问题,似乎在任何地方都找不到答案。

目前正在与一个需要自定义类来设置其元素样式的团队合作。他们想要一个宽度百分比类,他们可以将任何东西放在任何东西上,使某些东西具有一定的百分比宽度。

我做的:

@for $i from 0 through 100 {
    .width-percentage-#{$i} {
        width: #{$i}% !important;
    }
}
Run Code Online (Sandbox Code Playgroud)

但是 IntelliJ 抛出了一个错误..

sass percentage

3
推荐指数
1
解决办法
1940
查看次数

标签 统计

percentage ×1

sass ×1

storybook ×1

vue.js ×1