我正在使用 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)我还有另一个问题,似乎在任何地方都找不到答案。
目前正在与一个需要自定义类来设置其元素样式的团队合作。他们想要一个宽度百分比类,他们可以将任何东西放在任何东西上,使某些东西具有一定的百分比宽度。
我做的:
@for $i from 0 through 100 {
.width-percentage-#{$i} {
width: #{$i}% !important;
}
}
Run Code Online (Sandbox Code Playgroud)
但是 IntelliJ 抛出了一个错误..