diff --git a/public/static/admin/js/mall/goods.js b/public/static/admin/js/mall/goods.js index 6c7e7a8..aae212d 100644 --- a/public/static/admin/js/mall/goods.js +++ b/public/static/admin/js/mall/goods.js @@ -94,17 +94,10 @@ define(["jquery", "easy-admin"], function ($, ea) { }, }) - let colors = [ - '#f10f0f', // 红色 - '#ffaf00', // 橙色 - '#FF69B4', // 猛男粉 - '#0087ff', // 蓝色 - '#00ff00', // 青青草原 - ]; var demo1 = xmSelect.render({ el: '#demo1', name: 'xxx', // form表单提交的name - theme: {color: colors[Math.floor(Math.random() * colors.length)]}, + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, data: [ {name: 'Make', value: 1}, {name: 'PHP', value: 2}, @@ -123,17 +116,10 @@ define(["jquery", "easy-admin"], function ($, ea) { }, }) - let colors = [ - '#f10f0f', // 红色 - '#ffaf00', // 橙色 - '#FF69B4', // 猛男粉 - '#0087ff', // 蓝色 - '#00ff00', // 青青草原 - ]; var demo1 = xmSelect.render({ el: '#demo1', name: 'xxx', // form表单提交的name - theme: {color: colors[Math.floor(Math.random() * colors.length)]}, + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'}, data: [ {name: 'Make', value: 1}, {name: 'PHP', value: 2, selected: true,}, diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index b6d8dbb..cafbf80 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -879,7 +879,8 @@ define(["jquery", "tableSelect", "miniTheme", "xmSelect", "lazyload"], function }) init.xmSelectModel[index] = xmSelect.render({ el: '.xmSelect-' + index, language: 'zn', data: keysArray, name: index, - filterable: true, paging: true, pageSize: 10, theme: {color: '#16b777'}, toolbar: {show: true}, + filterable: true, paging: true, pageSize: 10, toolbar: {show: true}, + theme: {color: getComputedStyle(document.documentElement).getPropertyValue('--ea8-theme-main-color') || '#16b777'} }) }) }