You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
7.0 KiB
1 line
7.0 KiB
3 years ago
|
{"remainingRequest":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\src\\components\\ThemePicker\\index.vue?vue&type=style&index=0&lang=css&","dependencies":[{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\src\\components\\ThemePicker\\index.vue","mtime":1634007164431},{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-html\\RK-project\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi50aGVtZS1tZXNzYWdlLAoudGhlbWUtcGlja2VyLWRyb3Bkb3duIHsKICB6LWluZGV4OiA5OTk5OSAhaW1wb3J0YW50Owp9CgoudGhlbWUtcGlja2VyIC5lbC1jb2xvci1waWNrZXJfX3RyaWdnZXIgewogIGhlaWdodDogMjZweCAhaW1wb3J0YW50OwogIHdpZHRoOiAyNnB4ICFpbXBvcnRhbnQ7CiAgcGFkZGluZzogMnB4Owp9CgoudGhlbWUtcGlja2VyLWRyb3Bkb3duIC5lbC1jb2xvci1kcm9wZG93bl9fbGluay1idG4gewogIGRpc3BsYXk6IG5vbmU7Cn0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/ThemePicker","sourcesContent":["<template>\n <el-color-picker\n v-model=\"theme\"\n :predefine=\"['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d', ]\"\n class=\"theme-picker\"\n popper-class=\"theme-picker-dropdown\"\n />\n</template>\n\n<script>\nconst version = require('element-ui/package.json').version // element-ui version from node_modules\nconst ORIGINAL_THEME = '#409EFF' // default color\n\nexport default {\n data() {\n return {\n chalk: '', // content of theme-chalk css\n theme: ''\n }\n },\n computed: {\n defaultTheme() {\n return this.$store.state.settings.theme\n }\n },\n watch: {\n defaultTheme: {\n handler: function(val, oldVal) {\n this.theme = val\n },\n immediate: true\n },\n async theme(val) {\n const oldVal = this.chalk ? this.theme : ORIGINAL_THEME\n if (typeof val !== 'string') return\n const themeCluster = this.getThemeCluster(val.replace('#', ''))\n const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))\n console.log(themeCluster, originalCluster)\n\n const $message = this.$message({\n message: ' Compiling the theme',\n customClass: 'theme-message',\n type: 'success',\n duration: 0,\n iconClass: 'el-icon-loading'\n })\n\n const getHandler = (variable, id) => {\n return () => {\n const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))\n const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster)\n\n let styleTag = document.getElementById(id)\n if (!styleTag) {\n styleTag = document.createElement('style')\n styleTag.setAttribute('id', id)\n document.head.appendChild(styleTag)\n }\n styleTag.innerText = newStyle\n }\n }\n\n if (!this.chalk) {\n const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`\n await this.getCSSString(url, 'chalk')\n }\n\n
|