javascript - 在 Vue Scoped scss 上没有显示 Flex 属性,为什么?
问题描述
嗨,我有以下带有 vue 公式的代码
<template>
<div class="repeatable-container">
<FormulateForm>
<FormulateInput type="text" label="strength" placeholder="strength" />
<FormulateInput type="select" label="Quantity" placeholder="strength" />
<FormulateInput
type="select"
label="Method of intake"
placeholder="strength"
/>
<span>Remove Dossage</span>
</FormulateForm>
</div>
</template>
<script>
export default {
name: "RepeatableGroup",
};
</script>
//When scoped on style flex property of .formulate-input-wrapper is not taking but it takes if i remove it ,Can any body got idea?
<style lang="scss" scoped >
.repeatable-container {
.formulate-form,
.formulate-input-wrapper {
display: flex !important;
}
}
.formulate-input-wrapper {
display: flex !important;
}
</style>
这是图像
解决方案
那是因为有了scoped
,父组件的样式不会泄漏到子组件中。
推荐阅读
- arrays - Laravel 为数字字段返回一个空数组
- linux - 使用 sed 在 Bash 中解析 HTML 表格
- vue.js - Vuetify 断点在 Nuxt.js 中不起作用
- python - pytorch DataLoader 中的管道损坏
- reactjs - React,如何调试(axios)404错误?
- wpf - WPF RibbonTabHeader 样式绑定到 RibbonTab 属性
- python - 如何用python在一个zip中打开一个zip中的csv?
- amplience-dynamic-content - 如何使用数据参数调用 Amplience 车把服务
- android - 从绝对位置获取列和行索引
- drupal - Drupal 8 将 API 文件迁移到媒体实体