提交 e5ffa6aa 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊 提交者: 折腾笔记

feat(x): 同步 vue app-x 分支产物代码,内置组件 button 边缘条件兼容处理

上级 6ae9e67a
......@@ -7300,6 +7300,13 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
vnode.patchFlag !== 32) {
currentBlock.push(vnode);
}
if (type == "button") {
if (vnode.props == null)
vnode.props = /* @__PURE__ */ new Map();
if (!vnode.props["hoverClass"] && !vnode.props["hover-class"]) {
vnode.props["hoverClass"] = "button-hover";
}
}
return vnode;
}
const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
......@@ -8624,7 +8631,13 @@ function transformAttr(el, key, value, instance) {
if (opts) {
const camelized = camelize(key);
if (opts["class"].indexOf(camelized) > -1) {
return [camelized, parseClassList([value], instance, el)];
const classStyle = parseClassList([value], instance, el);
if (el.tagName === "BUTTON") {
if (value === "none" || value == "button-hover" && classStyle.size == 0) {
return [camelized, value];
}
}
return [camelized, classStyle];
}
if (opts["style"].indexOf(camelized) > -1) {
if (isString(value)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册