小编mis*_*aah的帖子

如何在 Tailwind 中设置文本渐变颜色变化的动画?

我有一个 div,里面有文本,有渐变配色方案。

<div
      className="bg-gradient-to-r bg-clip-text text-transparent from-indigo-500 to-purple-500"
    >
      SampleText
</div>
Run Code Online (Sandbox Code Playgroud)

我想对其进行动画处理,以便渐变在设定的持续时间内在from-indigo-500 to-purple-500from-purple-500 to-indigo-500无限之间保持平滑变化。

css tailwind-css

5
推荐指数
1
解决办法
8784
查看次数

Vuetify Autocompletes:如何搜索对象的多个属性?

Vue代码:

<template>
  <div>
    <v-card
      color="grey darken-2"
      dark
    >
      <v-card-text>
        <v-autocomplete
          spellcheck="false"
          v-model="model"
          :items="items"
          :loading="isLoading"
          :search-input.sync="search"
          @change="search=''"
          color="white"
          hide-no-data
          hide-selected
          clearable
          item-text="CodeAndName"
          item-value="Code"
          placeholder="Search stock symbols and names"
          prepend-icon="mdi-account-search"
          return-object
          autofocus
          dense
        >
          <template v-slot:item="{ item }">
            <v-list>
            <v-list-item-title class="justify-center">{{item.Code}}</v-list-item-title>
            <v-list-item-subtitle>{{item.Name}}</v-list-item-subtitle>
            <v-list-item-subtitle>{{item.Exchange}}</v-list-item-subtitle>
            </v-list>
          </template>
        </v-autocomplete>
      </v-card-text>
      <v-divider></v-divider>
    </v-card>
    <Chart v-if="model" :exchangeCode="model.Exchange" :symbol="model.Code"/>
  </div>
</template>
Run Code Online (Sandbox Code Playgroud)

JS代码:

import Chart from './GChart.vue'
export default {
  name: "Search",
  components: {
    Chart,
  },
  data: () => ({
    symbolsExchangesNames: [],
    isLoading: false,
    model: null,
    search: null
  }), …
Run Code Online (Sandbox Code Playgroud)

vue.js vuetify.js

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

推送路线时将对象作为 prop 传递

该功能位于路由器视图之外的组件中。

goToMarkets(){
      this.$router.push({path: '/markets', params: {stock: this.model}})
    }
Run Code Online (Sandbox Code Playgroud)

但该道具在“市场”组件中未定义

路由器:

const routes = [
  {
    path: '/markets',
    name: 'Markets',
    component: Markets,
    props: true
  },]
Run Code Online (Sandbox Code Playgroud)

市场组成部分:

props: {
    stock: Object
  },
Run Code Online (Sandbox Code Playgroud)

该 prop 在 Markets 组件中未定义,即使它在传递之前(在第一个函数中)并未定义。

javascript vue.js

2
推荐指数
1
解决办法
3926
查看次数

标签 统计

vue.js ×2

css ×1

javascript ×1

tailwind-css ×1

vuetify.js ×1