Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

filter.vue 912B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <!-- style="filter: grayscale(1)" -->
  3. <view :class="state.isEnableSetGray?'setGray':''">
  4. <slot></slot>
  5. </view>
  6. </template>
  7. <script setup lang="ts">
  8. import {onLoad} from "@dcloudio/uni-app";
  9. import {getItem} from "@/utils/storage";
  10. import {getCodeName} from "@/datas/queryKey.js";
  11. import {reactive} from "vue";
  12. const state = reactive({
  13. isEnableSetGray:false
  14. })
  15. onLoad((option : any) => {
  16. getGlobalParam(); //全局配置数据
  17. });
  18. const getGlobalParam=()=>{
  19. const data=getItem('globalParam')
  20. // 在那能看到打印
  21. console.log("全局配置数据1111",getCodeName('IS_ENABLE',data.setGray))
  22. // 申办时是否允许修改OCR识别出来的车辆信息数据
  23. if(getCodeName('IS_ENABLE',data.setGray)=='启用'){
  24. state.isEnableSetGray=true;
  25. }else{
  26. state.isEnableSetGray=false;
  27. }
  28. }
  29. </script>
  30. <style >
  31. .setGray{
  32. filter: grayscale(1) !important;
  33. }
  34. </style>