first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
var uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
|
||||
const colProps = {
|
||||
...uni_modules_wotDesignUni_components_common_props.baseProps,
|
||||
span: uni_modules_wotDesignUni_components_common_props.makeNumberProp(24),
|
||||
offset: uni_modules_wotDesignUni_components_common_props.makeNumberProp(0)
|
||||
};
|
||||
exports.colProps = colProps;
|
||||
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
var common_vendor = require("../../../../common/vendor.js");
|
||||
var uni_modules_wotDesignUni_components_composables_useParent = require("../composables/useParent.js");
|
||||
var uni_modules_wotDesignUni_components_wdRow_types = require("../wd-row/types.js");
|
||||
var uni_modules_wotDesignUni_components_wdCol_types = require("./types.js");
|
||||
var uni_modules_wotDesignUni_components_common_util = require("../common/util.js");
|
||||
require("../common/props.js");
|
||||
require("../common/AbortablePromise.js");
|
||||
const __default__ = {
|
||||
name: "wd-col",
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
virtualHost: true,
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
props: uni_modules_wotDesignUni_components_wdCol_types.colProps,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const { parent: row } = uni_modules_wotDesignUni_components_composables_useParent.useParent(uni_modules_wotDesignUni_components_wdRow_types.ROW_KEY);
|
||||
const rootStyle = common_vendor.computed$1(() => {
|
||||
const gutter = uni_modules_wotDesignUni_components_common_util.isDef(row) ? row.props.gutter || 0 : 0;
|
||||
const padding = `${gutter / 2}px`;
|
||||
const style = gutter > 0 ? `padding-left: ${padding}; padding-right: ${padding};background-clip: content-box;` : "";
|
||||
return `${style}${props.customStyle}`;
|
||||
});
|
||||
common_vendor.watch([() => props.span, () => props.offset], () => {
|
||||
check();
|
||||
});
|
||||
function check() {
|
||||
const { span, offset } = props;
|
||||
if (span < 0 || offset < 0) {
|
||||
console.error("[wot-design] warning(wd-col): attribute span/offset must be greater than or equal to 0");
|
||||
}
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.n(_ctx.span && "wd-col__" + _ctx.span),
|
||||
b: common_vendor.n(_ctx.offset && "wd-col__offset-" + _ctx.offset),
|
||||
c: common_vendor.n(_ctx.customClass),
|
||||
d: common_vendor.s(common_vendor.unref(rootStyle))
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-62edcad3"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/uni_modules/wot-design-uni/components/wd-col/wd-col.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-62edcad3', 'wd-col', a, b, c]}}" style="{{d}}"><slot/></view>
|
||||
@@ -0,0 +1,337 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* UI规范基础变量
|
||||
*/
|
||||
/*----------------------------------------- Theme color. start ----------------------------------------*/
|
||||
/* 主题颜色 */
|
||||
/* 辅助色 */
|
||||
/* 文字颜色(默认浅色背景下 */
|
||||
/* 暗黑模式 */
|
||||
/* 图形颜色 */
|
||||
/*----------------------------------------- Theme color. end -------------------------------------------*/
|
||||
/*-------------------------------- Theme color application size. start --------------------------------*/
|
||||
/* 文字字号 */
|
||||
/* 文字字重 */
|
||||
/* 尺寸 */
|
||||
/*-------------------------------- Theme color application size. end --------------------------------*/
|
||||
/* component var */
|
||||
/* action-sheet */
|
||||
/* badge */
|
||||
/* button */
|
||||
/* cell */
|
||||
/* calendar */
|
||||
/* checkbox */
|
||||
/* collapse */
|
||||
/* divider */
|
||||
/* drop-menu */
|
||||
/* input-number */
|
||||
/* input */
|
||||
/* textarea */
|
||||
/* loadmore */
|
||||
/* message-box */
|
||||
/* notice-bar */
|
||||
/* pagination */
|
||||
/* picker */
|
||||
/* col-picker */
|
||||
/* overlay */
|
||||
/* popup */
|
||||
/* progress */
|
||||
/* radio */
|
||||
/* search */
|
||||
/* slider */
|
||||
/* sort-button */
|
||||
/* steps */
|
||||
/* switch */
|
||||
/* tabs */
|
||||
/* tag */
|
||||
/* toast */
|
||||
/* loading */
|
||||
/* tooltip */
|
||||
/* popover */
|
||||
/* grid-item */
|
||||
/* statustip */
|
||||
/* card */
|
||||
/* upload */
|
||||
/* curtain */
|
||||
/* notify */
|
||||
/* skeleton */
|
||||
/* circle */
|
||||
/* swiper */
|
||||
/* swiper-nav */
|
||||
/* segmented */
|
||||
/* tabbar */
|
||||
/* tabbar-item */
|
||||
/* navbar */
|
||||
/* navbar-capsule */
|
||||
/* table */
|
||||
/* sidebar */
|
||||
/* sidebar-item */
|
||||
/* fab */
|
||||
/* count-down */
|
||||
/* keyboard */
|
||||
/* number-keyboard */
|
||||
/* passwod-input */
|
||||
/* form-item */
|
||||
/* backtop */
|
||||
/* index-bar */
|
||||
/* text */
|
||||
/* video-preview */
|
||||
/* img-cropper */
|
||||
/* floating-panel */
|
||||
/* signature */
|
||||
/**
|
||||
* 混合宏
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* BEM,定义块(b)
|
||||
*/
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 此方法用于生成穿透样式 */
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 定义状态(m) */
|
||||
/* 定义状态(m) */
|
||||
/* 对于需要需要嵌套在 m 底下的 e,调用这个混合宏,一般在切换整个组件的状态,如切换颜色的时候 */
|
||||
/* 状态,生成 is-$state 类名 */
|
||||
/**
|
||||
* 常用混合宏
|
||||
*/
|
||||
/* 单行超出隐藏 */
|
||||
/* 多行超出隐藏 */
|
||||
/* 清除浮动 */
|
||||
/* 0.5px 边框 指定方向*/
|
||||
/* 0.5px 边框 环绕 */
|
||||
/**
|
||||
* 三角形实现尖角样式,适用于背景透明情况
|
||||
* @param $size 三角形高,底边为 $size * 2
|
||||
* @param $bg 三角形背景颜色
|
||||
*/
|
||||
/**
|
||||
* 正方形实现尖角样式,适用于背景不透明情况
|
||||
* @param $size 正方形边长
|
||||
* @param $bg 正方形背景颜色
|
||||
* @param $z-index z-index属性值,不得大于外部包裹器
|
||||
* @param $box-shadow 阴影
|
||||
*/
|
||||
.wd-col.data-v-62edcad3 {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wd-col__1.data-v-62edcad3 {
|
||||
width: 4.1666666667%;
|
||||
}
|
||||
.wd-col__offset-1.data-v-62edcad3 {
|
||||
margin-left: 4.1666666667%;
|
||||
}
|
||||
.wd-col__2.data-v-62edcad3 {
|
||||
width: 8.3333333333%;
|
||||
}
|
||||
.wd-col__offset-2.data-v-62edcad3 {
|
||||
margin-left: 8.3333333333%;
|
||||
}
|
||||
.wd-col__3.data-v-62edcad3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
.wd-col__offset-3.data-v-62edcad3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
.wd-col__4.data-v-62edcad3 {
|
||||
width: 16.6666666667%;
|
||||
}
|
||||
.wd-col__offset-4.data-v-62edcad3 {
|
||||
margin-left: 16.6666666667%;
|
||||
}
|
||||
.wd-col__5.data-v-62edcad3 {
|
||||
width: 20.8333333333%;
|
||||
}
|
||||
.wd-col__offset-5.data-v-62edcad3 {
|
||||
margin-left: 20.8333333333%;
|
||||
}
|
||||
.wd-col__6.data-v-62edcad3 {
|
||||
width: 25%;
|
||||
}
|
||||
.wd-col__offset-6.data-v-62edcad3 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
.wd-col__7.data-v-62edcad3 {
|
||||
width: 29.1666666667%;
|
||||
}
|
||||
.wd-col__offset-7.data-v-62edcad3 {
|
||||
margin-left: 29.1666666667%;
|
||||
}
|
||||
.wd-col__8.data-v-62edcad3 {
|
||||
width: 33.3333333333%;
|
||||
}
|
||||
.wd-col__offset-8.data-v-62edcad3 {
|
||||
margin-left: 33.3333333333%;
|
||||
}
|
||||
.wd-col__9.data-v-62edcad3 {
|
||||
width: 37.5%;
|
||||
}
|
||||
.wd-col__offset-9.data-v-62edcad3 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
.wd-col__10.data-v-62edcad3 {
|
||||
width: 41.6666666667%;
|
||||
}
|
||||
.wd-col__offset-10.data-v-62edcad3 {
|
||||
margin-left: 41.6666666667%;
|
||||
}
|
||||
.wd-col__11.data-v-62edcad3 {
|
||||
width: 45.8333333333%;
|
||||
}
|
||||
.wd-col__offset-11.data-v-62edcad3 {
|
||||
margin-left: 45.8333333333%;
|
||||
}
|
||||
.wd-col__12.data-v-62edcad3 {
|
||||
width: 50%;
|
||||
}
|
||||
.wd-col__offset-12.data-v-62edcad3 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
.wd-col__13.data-v-62edcad3 {
|
||||
width: 54.1666666667%;
|
||||
}
|
||||
.wd-col__offset-13.data-v-62edcad3 {
|
||||
margin-left: 54.1666666667%;
|
||||
}
|
||||
.wd-col__14.data-v-62edcad3 {
|
||||
width: 58.3333333333%;
|
||||
}
|
||||
.wd-col__offset-14.data-v-62edcad3 {
|
||||
margin-left: 58.3333333333%;
|
||||
}
|
||||
.wd-col__15.data-v-62edcad3 {
|
||||
width: 62.5%;
|
||||
}
|
||||
.wd-col__offset-15.data-v-62edcad3 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
.wd-col__16.data-v-62edcad3 {
|
||||
width: 66.6666666667%;
|
||||
}
|
||||
.wd-col__offset-16.data-v-62edcad3 {
|
||||
margin-left: 66.6666666667%;
|
||||
}
|
||||
.wd-col__17.data-v-62edcad3 {
|
||||
width: 70.8333333333%;
|
||||
}
|
||||
.wd-col__offset-17.data-v-62edcad3 {
|
||||
margin-left: 70.8333333333%;
|
||||
}
|
||||
.wd-col__18.data-v-62edcad3 {
|
||||
width: 75%;
|
||||
}
|
||||
.wd-col__offset-18.data-v-62edcad3 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
.wd-col__19.data-v-62edcad3 {
|
||||
width: 79.1666666667%;
|
||||
}
|
||||
.wd-col__offset-19.data-v-62edcad3 {
|
||||
margin-left: 79.1666666667%;
|
||||
}
|
||||
.wd-col__20.data-v-62edcad3 {
|
||||
width: 83.3333333333%;
|
||||
}
|
||||
.wd-col__offset-20.data-v-62edcad3 {
|
||||
margin-left: 83.3333333333%;
|
||||
}
|
||||
.wd-col__21.data-v-62edcad3 {
|
||||
width: 87.5%;
|
||||
}
|
||||
.wd-col__offset-21.data-v-62edcad3 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
.wd-col__22.data-v-62edcad3 {
|
||||
width: 91.6666666667%;
|
||||
}
|
||||
.wd-col__offset-22.data-v-62edcad3 {
|
||||
margin-left: 91.6666666667%;
|
||||
}
|
||||
.wd-col__23.data-v-62edcad3 {
|
||||
width: 95.8333333333%;
|
||||
}
|
||||
.wd-col__offset-23.data-v-62edcad3 {
|
||||
margin-left: 95.8333333333%;
|
||||
}
|
||||
.wd-col__24.data-v-62edcad3 {
|
||||
width: 100%;
|
||||
}
|
||||
.wd-col__offset-24.data-v-62edcad3 {
|
||||
margin-left: 100%;
|
||||
}
|
||||
Reference in New Issue
Block a user