qinyan 1 年之前
父節點
當前提交
dc57dcc713
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/modules/editor/components/CompUI/formItems/NewColorPicker/ColorList.tsx

+ 6 - 1
src/modules/editor/components/CompUI/formItems/NewColorPicker/ColorList.tsx

@@ -48,7 +48,12 @@ export default defineComponent({
       const list = props.data;
       const list = props.data;
       const propsColor = formatColor(value);
       const propsColor = formatColor(value);
       return (
       return (
-        <div class={cx("grid gap-16px", `grid-cols-${columns}`)}>
+        <div
+          class="grid gap-16px"
+          style={{
+            gridTemplateColumns: `repeat(${columns}, 1fr)`,
+          }}
+        >
           {list.map((item: string | gradientColorType, index: number) => {
           {list.map((item: string | gradientColorType, index: number) => {
             const thisColor = formatColor(item);
             const thisColor = formatColor(item);
             const active = thisColor === propsColor ? true : false;
             const active = thisColor === propsColor ? true : false;